CN112040361B - Earphone control method, earphone control device and storage medium - Google Patents
Earphone control method, earphone control device and storage medium Download PDFInfo
- Publication number
- CN112040361B CN112040361B CN202010916697.2A CN202010916697A CN112040361B CN 112040361 B CN112040361 B CN 112040361B CN 202010916697 A CN202010916697 A CN 202010916697A CN 112040361 B CN112040361 B CN 112040361B
- Authority
- CN
- China
- Prior art keywords
- wireless
- target
- earphone
- wireless earphone
- wireless headset
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R1/00—Details of transducers, loudspeakers or microphones
- H04R1/10—Earpieces; Attachments therefor ; Earphones; Monophonic headphones
- H04R1/1041—Mechanical or electronic switches, or control elements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/02—Services making use of location information
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/80—Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
- H04W76/14—Direct-mode setup
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Physics & Mathematics (AREA)
- Acoustics & Sound (AREA)
- Telephone Function (AREA)
Abstract
本申请公开了一种耳机控制方法、装置及存储介质,应用于第一无线耳机,该第一无线耳机包括第一UWB模块,所述方法包括:建立所述第一无线耳机与第二无线耳机之间的通信连接,所述第二无线耳机包括第二UWB模块;在所述第一无线耳机与所述第二无线耳机中至少一个耳机未处于佩戴状态时,通过所述第一UWB模块和所述第二UWB模块确定所述第一无线耳机与所述第二无线耳机之间的目标距离;在所述目标距离大于预设距离,进行第一提示操作,所述第一提示操作用于提示寻找所述第一无线耳机和所述第二无线耳机中的至少一个耳机。采用本申请实施例可以在耳机未处于佩戴状态下,在耳机之间的距离超过一定范围,进行防丢提示,能够防止耳机丢失。
The present application discloses an earphone control method, device and storage medium, which are applied to a first wireless earphone, the first wireless earphone includes a first UWB module, and the method includes: establishing the first wireless earphone and the second wireless earphone The communication connection between the second wireless headset includes a second UWB module; when at least one of the first wireless headset and the second wireless headset is not in a wearing state, the first UWB module and the second wireless headset are not in the wearing state. The second UWB module determines the target distance between the first wireless headset and the second wireless headset; when the target distance is greater than a preset distance, a first prompt operation is performed, and the first prompt operation is used for Prompt to find at least one of the first wireless headset and the second wireless headset. By adopting the embodiment of the present application, when the earphones are not in the wearing state and the distance between the earphones exceeds a certain range, an anti-loss prompt can be performed, which can prevent the earphones from being lost.
Description
技术领域technical field
本申请涉及电子技术领域,尤其涉及一种耳机控制方法、装置及存储介质。The present application relates to the field of electronic technology, and in particular, to a headphone control method, device and storage medium.
背景技术Background technique
随着电子设备(如手机、平板电脑等等)的大量普及应用,电子设备能够支持的应用越来越多,功能越来越强大,电子设备向着多样化、个性化的方向发展,成为用户生活中不可缺少的电子用品。伴随着电子设备的普及,无线耳机也越来越受到欢迎,但是,无线耳机通过蓝牙模块与手机连接,容易丢失,通过蓝牙去进行寻找也是不便的。很难精确定位到丢失耳机,因此,如何防止无线耳机丢失的问题亟待解决。With the widespread application of electronic devices (such as mobile phones, tablet computers, etc.), electronic devices can support more and more applications, and their functions are becoming more and more powerful. Electronic devices are developing in the direction of diversification and personalization. Indispensable electronic supplies. With the popularization of electronic devices, wireless earphones are becoming more and more popular. However, wireless earphones are connected to mobile phones through a Bluetooth module, which is easy to lose, and it is inconvenient to find them through Bluetooth. It is difficult to precisely locate the lost earphone, and therefore, the problem of how to prevent the loss of the wireless earphone needs to be solved urgently.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供一种耳机控制方法、装置及存储介质,能够防止无线耳机丢失。Embodiments of the present application provide an earphone control method, device, and storage medium, which can prevent wireless earphones from being lost.
第一方面,本申请实施例提供一种耳机控制方法,应用于第一无线耳机,所述第一无线耳机包括第一UWB模块,所述方法包括:In a first aspect, an embodiment of the present application provides a headset control method, which is applied to a first wireless headset, where the first wireless headset includes a first UWB module, and the method includes:
建立所述第一无线耳机与第二无线耳机之间的通信连接,所述第二无线耳机包括第二UWB模块;establishing a communication connection between the first wireless headset and a second wireless headset, where the second wireless headset includes a second UWB module;
在所述第一无线耳机与所述第二无线耳机中至少一个耳机未处于佩戴状态时,通过所述第一UWB模块和所述第二UWB模块确定所述第一无线耳机与所述第二无线耳机之间的目标距离;When at least one of the first wireless earphone and the second wireless earphone is not in a wearing state, determining the first wireless earphone and the second wireless earphone through the first UWB module and the second UWB module target distance between wireless headsets;
在所述目标距离大于预设距离,进行第一提示操作,所述第一提示操作用于提示寻找所述第一无线耳机和所述第二无线耳机中的至少一个耳机。When the target distance is greater than the preset distance, a first prompt operation is performed, and the first prompt operation is used to prompt to find at least one of the first wireless earphone and the second wireless earphone.
第二方面,本申请实施例提供一种耳机控制装置,应用于第一无线耳机,所述第一无线耳机包括第一UWB模块,所述装置包括:建立单元、确定单元和提示单元,其中,In a second aspect, an embodiment of the present application provides a headset control device, which is applied to a first wireless headset, where the first wireless headset includes a first UWB module, and the device includes: a establishing unit, a determining unit, and a prompting unit, wherein,
所述建立单元,用于建立所述第一无线耳机与第二无线耳机之间的通信连接,所述第二无线耳机包括第二UWB模块;the establishing unit, configured to establish a communication connection between the first wireless headset and a second wireless headset, where the second wireless headset includes a second UWB module;
所述确定单元,用于在所述第一无线耳机与所述第二无线耳机中至少一个耳机未处于佩戴状态时,通过所述第一UWB模块和所述第二UWB模块确定所述第一无线耳机与所述第二无线耳机之间的目标距离;The determining unit is configured to determine the first wireless earphone through the first UWB module and the second UWB module when at least one earphone among the first wireless earphone and the second wireless earphone is not in a wearing state the target distance between the wireless headset and the second wireless headset;
所述提示单元,用于在所述目标距离大于预设距离,进行第一提示操作,所述第一提示操作用于提示寻找所述第一无线耳机和所述第二无线耳机中的至少一个耳机。The prompt unit is configured to perform a first prompt operation when the target distance is greater than a preset distance, and the first prompt operation is used to prompt to find at least one of the first wireless headset and the second wireless headset earphone.
第三方面,本申请实施例提供一种无线耳机,该无线耳机包括处理器、存储器、通信接口,以及一个或多个程序,所述一个或多个程序被存储在所述存储器中,并且被配置由所述处理器执行,所述程序包括用于执行如本申请实施例第一方面所述的方法中所描述的部分或全部步骤的指令。In a third aspect, embodiments of the present application provide a wireless headset, the wireless headset includes a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and are The configuration is executed by the processor, and the program includes instructions for executing some or all of the steps described in the method according to the first aspect of the embodiments of the present application.
第四方面,本申请实施例提供了一种计算机可读存储介质,其中,上述计算机可读存储介质用于存储计算机程序,其中,上述计算机程序被处理器执行,以实现如本申请实施例第一方面所述的方法中所描述的部分或全部步骤。In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, wherein the computer program is executed by a processor to implement the first embodiment of the present application. Some or all of the steps described in the method of an aspect.
第五方面,本申请实施例提供了一种计算机程序产品,其中,上述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,上述计算机程序可操作来使计算机执行如本申请实施例第一方面所述的方法中所描述的部分或全部步骤。该计算机程序产品可以为一个软件安装包。In a fifth aspect, an embodiment of the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute as implemented in the present application. For example, some or all of the steps described in the method described in the first aspect. The computer program product may be a software installation package.
实施本申请实施例,具有如下有益效果:Implementing the embodiments of the present application has the following beneficial effects:
可以看出,在本申请实施例中所描述的耳机控制方法、装置及存储介质,应用于第一无线耳机,第一无线耳机包括第一UWB模块,建立第一无线耳机与第二无线耳机之间的通信连接,第二无线耳机包括第二UWB模块,在第一无线耳机与第二无线耳机中至少一个耳机未处于佩戴状态时,通过第一UWB模块和第二UWB模块确定第一无线耳机与第二无线耳机之间的目标距离,在目标距离大于预设距离,进行第一提示操作,第一提示操作用于提示寻找第一无线耳机和第二无线耳机中的至少一个耳机,如此,可以在耳机未处于佩戴状态下,通过UWB实现距离检测,在耳机之间的距离超过一定范围,则进行防丢提示,能够防止耳机丢失。It can be seen that the headset control method, device, and storage medium described in the embodiments of the present application are applied to the first wireless headset, and the first wireless headset includes a first UWB module, which establishes a relationship between the first wireless headset and the second wireless headset. The second wireless headset includes a second UWB module, and when at least one of the first wireless headset and the second wireless headset is not in a wearing state, the first wireless headset is determined by the first UWB module and the second UWB module. The target distance from the second wireless headset, when the target distance is greater than the preset distance, a first prompt operation is performed, and the first prompt operation is used to prompt to find at least one headset in the first wireless headset and the second wireless headset, so, The distance detection can be realized through UWB when the earphones are not in the wearing state. When the distance between the earphones exceeds a certain range, an anti-lost prompt will be performed, which can prevent the earphones from being lost.
本申请的这些方面或其他方面在以下实施例的描述中会更加简明易懂。These and other aspects of the present application will be more clearly understood in the description of the following embodiments.
附图说明Description of drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only These are some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.
图1是本申请实施例提供的一种电子设备的结构示意图;1 is a schematic structural diagram of an electronic device provided by an embodiment of the present application;
图2是本申请实施例提供的一种电子设备的软件结构示意图;2 is a schematic diagram of a software structure of an electronic device provided by an embodiment of the present application;
图3A是本申请实施例提供的一种耳机控制方法的流程示意图;3A is a schematic flowchart of an earphone control method provided by an embodiment of the present application;
图3B是本申请实施例提供的一种无线耳机的结构示意图;3B is a schematic structural diagram of a wireless headset provided by an embodiment of the present application;
图3C是本申请实施例提供的一种耳机盒的结构示意图;3C is a schematic structural diagram of an earphone box provided by an embodiment of the present application;
图3D是本申请实施例提供的一种无线耳机定位的演示示意图;FIG. 3D is a schematic diagram illustrating the positioning of a wireless headset provided by an embodiment of the present application;
图3E是本申请实施例提供的另一种耳机控制方法的流程示意图;3E is a schematic flowchart of another headset control method provided by an embodiment of the present application;
图4是本申请实施例提供的另一种耳机控制方法的流程示意图;4 is a schematic flowchart of another headset control method provided by an embodiment of the present application;
图5是本申请实施例提供的一种无线耳机的结构示意图;5 is a schematic structural diagram of a wireless headset provided by an embodiment of the present application;
图6A是本申请实施例提供的一种耳机控制装置的功能单元组成框图;FIG. 6A is a block diagram of functional units of an earphone control device provided by an embodiment of the present application;
图6B是本申请实施例提供的另一种耳机控制装置的功能单元组成框图;FIG. 6B is a block diagram of functional units of another headset control device provided by an embodiment of the present application;
图6C是本申请实施例提供的另一种耳机控制装置的功能单元组成框图;FIG. 6C is a block diagram of functional units of another headset control device provided by an embodiment of the present application;
图6D是本申请实施例提供的另一种耳机控制装置的功能单元组成框图;FIG. 6D is a block diagram of functional units of another headset control device provided by an embodiment of the present application;
图6E是本申请实施例提供的另一种耳机控制装置的功能单元组成框图。FIG. 6E is a block diagram of functional units of another headphone control device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合附图,对本申请实施例中的技术方案进行描述。The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings.
为了更好地理解本申请实施例的方案,下面先对本申请实施例可能涉及的相关术语和概念进行介绍。In order to better understand the solutions of the embodiments of the present application, related terms and concepts that may be involved in the embodiments of the present application are first introduced below.
电子设备可以包括具备计算机能力的设备,例如,智能手机、车载设备、可穿戴设备、智能手表、智能眼镜、无线耳机(如蓝牙耳机)、耳机盒、计算设备或连接到无线调制解调器的其他处理设备,以及各种形式的用户设备(User Equipment,UE),移动台(MobileStation,MS),虚拟现实/增强现实设备,终端设备(terminal device)等等,电子设备还可以为基站或者服务器。Electronic devices may include computer-enabled devices such as smartphones, in-vehicle devices, wearable devices, smart watches, smart glasses, wireless headsets (eg, Bluetooth headsets), headset boxes, computing devices, or other processing devices connected to wireless modems , and various forms of user equipment (User Equipment, UE), mobile station (MobileStation, MS), virtual reality/augmented reality device, terminal device (terminal device), etc. The electronic device may also be a base station or a server.
电子设备还可以包括智能家居设备,智能家居设备可以为以下至少一种:智能音箱、智能摄像头、智能电饭煲、智能轮椅、智能按摩椅、智能家具、智能洗碗机、智能电视机、智能冰箱、智能电风扇、智能取暖器、智能晾衣架、智能灯、智能路由器、智能交换机、智能开关面板、智能加湿器、智能空调、智能门、智能窗、智能灶台、智能消毒柜、智能马桶、扫地机器人等等,在此不做限定。The electronic devices may also include smart home devices, and the smart home devices may be at least one of the following: smart speakers, smart cameras, smart rice cookers, smart wheelchairs, smart massage chairs, smart furniture, smart dishwashers, smart TVs, smart refrigerators, Smart fans, smart heaters, smart drying racks, smart lights, smart routers, smart switches, smart switch panels, smart humidifiers, smart air conditioners, smart doors, smart windows, smart cooktops, smart disinfection cabinets, smart toilets, floor sweeping Robots, etc., are not limited here.
本申请所公开的技术方案的软硬件运行环境介绍如下。The software and hardware operating environments of the technical solutions disclosed in this application are introduced as follows.
如图所示,图1示出了电子设备100的结构示意图。电子设备100可以包括处理器110、外部存储器接口120、内部存储器121、通用串行总线(universal serial bus,USB)接口130、充电管理模块140、电源管理模块141、电池142、天线1、天线2、移动通信模块150、无线通信模块160、音频模块170、扬声器170A、受话器170B、麦克风170C、耳机接口170D、传感器模块180、指南针190、马达191、指示器192、摄像头193、显示屏194以及用户标识模块(subscriber identification module,SIM)卡接口195等。As shown in the figure, FIG. 1 shows a schematic structural diagram of an electronic device 100 . The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a
可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100 . In other embodiments of the present application, the electronic device 100 may include more or less components than shown, or combine some components, or separate some components, or arrange different components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器AP,调制解调处理器,图形处理器GPU,图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器NPU等。其中,不同的处理单元可以是独立的部件,也可以集成在一个或多个处理器中。在一些实施例中,电子设备101也可以包括一个或多个处理器110。其中,控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。在其他一些实施例中,处理器110中还可以设置存储器,用于存储指令和数据。示例性地,处理器110中的存储器可以为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从存储器中直接调用。这样就避免了重复存取,减少了处理器110的等待时间,因而提高了电子设备101处理数据或执行指令的效率。The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor AP, a modem processor, a graphics processor GPU, an image signal processor (ISP), a controller, Video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor NPU, etc. Wherein, different processing units may be independent components, or may be integrated in one or more processors. In some embodiments, the electronic device 101 may also include one or more processors 110 . The controller can generate an operation control signal according to the instruction operation code and the timing signal, and complete the control of fetching and executing instructions. In some other embodiments, a memory may also be provided in the processor 110 for storing instructions and data. Illustratively, the memory in the processor 110 may be a cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 110 . If the processor 110 needs to use the instruction or data again, it can be called directly from memory. In this way, repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the electronic device 101 in processing data or executing instructions.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路间(inter-integrated circuit,I2C)接口、集成电路间音频(inter-integrated circuitsound,I2S)接口、脉冲编码调制(pulse code modulation,PCM)接口、通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口、移动产业处理器接口(mobile industry processor interface,MIPI)、用输入输出(general-purpose input/output,GPIO)接口、SIM卡接口和/或USB接口等。其中,USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口、Micro USB接口、USB Type C接口等。USB接口130可以用于连接充电器为电子设备101充电,也可以用于电子设备101与外围设备之间传输数据。该USB接口130也可以用于连接耳机,通过耳机播放音频。In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuitsound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous transceiver (universal asynchronous transmitter) receiver/transmitter, UART) interface, mobile industry processor interface (mobile industry processor interface, MIPI), general-purpose input/output (GPIO) interface, SIM card interface and/or USB interface, etc. The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 can be used to connect a charger to charge the electronic device 101, and can also be used to transmit data between the electronic device 101 and peripheral devices. The USB interface 130 can also be used to connect an earphone, and play audio through the earphone.
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 . In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。The
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110、内部存储器121、外部存储器、显示屏194、摄像头193和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量、电池循环次数、电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。The
电子设备100的无线通信功能可以通过天线1、天线2、移动通信模块150、无线通信模块160、调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 100 may be implemented by the
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G/6G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wirelesslocal area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络)、蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS)、调频(frequency modulation,FM)、近距离无线通信技术(near field communication,NFC)、红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
显示屏194用于显示图像、视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD)、有机发光二极管(organic light-emittingdiode,OLED)、有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrixorganic light emitting diode的,AMOLED)、柔性发光二极管(flex light-emittingdiode,FLED)、迷你发光二极管(mini light-emitting diode,miniled)、MicroLed、Micro-oLed、量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或多个显示屏194。The display screen 194 is used to display images, videos, and the like. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode). , AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), mini light-emitting diode (mini light-emitting diode, miniLED), MicroLed, Micro-oLed, quantum dot light emitting diode (quantum dot light emitting diode, QLED), etc. . In some embodiments, electronic device 100 may include one or more display screens 194 .
电子设备100可以通过ISP、摄像头193、视频编解码器、GPU、显示屏194以及应用处理器等实现拍摄功能。The electronic device 100 may implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点、亮度、肤色进行算法优化。ISP还可以对拍摄场景的曝光、色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。The ISP is used to process the data fed back by the camera 193 . For example, when taking a photo, the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing, converting it into an image visible to the naked eye. ISP can also perform algorithm optimization on image noise, brightness, and skin tone. ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP may be provided in the camera 193 .
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或多个摄像头193。Camera 193 is used to capture still images or video. The object is projected through the lens to generate an optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. DSP converts digital image signals into standard RGB, YUV and other formats of image signals. In some embodiments, the electronic device 100 may include one or more cameras 193 .
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。A digital signal processor is used to process digital signals, in addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy and so on.
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1、MPEG2、MPEG3、MPEG4等。Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos in various encoding formats, such as: moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, and so on.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别、指纹识别、语音识别、文本理解等。The NPU is a neural-network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transfer mode between neurons in the human brain, it can quickly process the input information, and can continuously learn by itself. Applications such as intelligent cognition of the electronic device 100 can be implemented through the NPU, such as image recognition, fingerprint recognition, speech recognition, text understanding, and the like.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100 . The external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example to save files like music, video etc in external memory card.
内部存储器121可以用于存储一个或多个计算机程序,该一个或多个计算机程序包括指令。处理器110可以通过运行存储在内部存储器121的上述指令,从而使得电子设备101执行本申请一些实施例中所提供的显示页面元素的方法,以及各种应用以及数据处理等。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统;该存储程序区还可以存储一个或多个应用(比如图库、联系人等)等。存储数据区可存储电子设备101使用过程中所创建的数据(比如照片,联系人等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如一个或多个磁盘存储部件,闪存部件,通用闪存存储器(universal flash storage,UFS)等。在一些实施例中,处理器110可以通过运行存储在内部存储器121的指令,和/或存储在设置于处理器110中的存储器的指令,来使得电子设备101执行本申请实施例中所提供的显示页面元素的方法,以及其他应用及数据处理。电子设备100可以通过音频模块170、扬声器170A、受话器170B、麦克风170C、耳机接口170D、以及应用处理器等实现音频功能。例如音乐播放、录音等。Internal memory 121 may be used to store one or more computer programs including instructions. The processor 110 may execute the above-mentioned instructions stored in the internal memory 121, thereby causing the electronic device 101 to execute the method for displaying page elements, various applications and data processing provided in some embodiments of the present application. The internal memory 121 may include a storage program area and a storage data area. Wherein, the stored program area may store the operating system; the stored program area may also store one or more applications (such as gallery, contacts, etc.) and the like. The storage data area may store data (such as photos, contacts, etc.) created during the use of the electronic device 101 and the like. In addition, the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic disk storage components, flash memory components, universal flash storage (UFS), and the like. In some embodiments, the processor 110 may cause the electronic device 101 to execute the instructions provided in the embodiments of the present application by executing the instructions stored in the internal memory 121 and/or the instructions stored in the memory provided in the processor 110 . Methods for displaying page elements, as well as other applications and data processing. The electronic device 100 may implement audio functions through an
传感器模块180可以包括压力传感器180A、陀螺仪传感器180B、气压传感器180C、磁传感器180D、加速度传感器180E、距离传感器180F、接近光传感器180G、指纹传感器180H、温度传感器180J、触摸传感器180K、环境光传感器180L、骨传导传感器180M等。The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and an ambient light sensor 180L, bone conduction sensor 180M, etc.
其中,压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备100根据压力传感器180A检测触摸操作强度。电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。The pressure sensor 180A is used to sense pressure signals, and can convert the pressure signals into electrical signals. In some embodiments, the pressure sensor 180A may be provided on the display screen 194 . There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, and the like. The capacitive pressure sensor may be comprised of at least two parallel plates of conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions. For example, when a touch operation whose intensity is less than the first pressure threshold acts on the short message application icon, the instruction for viewing the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, the instruction to create a new short message is executed.
陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即X、Y和Z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测电子设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。The gyro sensor 180B may be used to determine the motion attitude of the electronic device 100 . In some embodiments, the angular velocity of the electronic device 100 about three axes (ie, the X, Y, and Z axes) may be determined by the gyro sensor 180B. The gyro sensor 180B can be used for image stabilization. Exemplarily, when the shutter is pressed, the gyro sensor 180B detects the shaking angle of the electronic device 100, calculates the distance that the lens module needs to compensate according to the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse motion to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenarios.
加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes). The magnitude and direction of gravity can be detected when the electronic device 100 is stationary. It can also be used to identify the posture of electronic devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.
环境光传感器180L用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备100是否在口袋里,以防误触。The ambient light sensor 180L is used to sense ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket, so as to prevent accidental touch.
指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, accessing application locks, taking pictures with fingerprints, answering incoming calls with fingerprints, and the like.
温度传感器180J用于检测温度。在一些实施例中,电子设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,电子设备100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,电子设备100对电池142加热,以避免低温导致电子设备100异常关机。在其他一些实施例中,当温度低于又一阈值时,电子设备100对电池142的输出电压执行升压,以避免低温导致的异常关机。The temperature sensor 180J is used to detect the temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold value, the electronic device 100 reduces the performance of the processor located near the temperature sensor 180J in order to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the
触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。Touch sensor 180K, also called "touch panel". The touch sensor 180K may be disposed on the display screen 194 , and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”. The touch sensor 180K is used to detect a touch operation on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to touch operations may be provided through display screen 194 . In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the location where the display screen 194 is located.
示例性的,图2示出了电子设备100的软件结构框图。分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。应用程序层可以包括一系列应用程序包。Exemplarily, FIG. 2 shows a software structural block diagram of the electronic device 100 . The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, which are, from top to bottom, an application layer, an application framework layer, an Android runtime (Android runtime) and system libraries, and a kernel layer. The application layer can include a series of application packages.
如图2所示,应用程序层可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。As shown in Figure 2, the application layer can include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short messages.
应用程序框架层为应用程序层的应用程序提供应用编程接口(applicationprogramming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。The application framework layer provides an application programming interface (application programming interface, API) and a programming framework for the applications of the application layer. The application framework layer includes some predefined functions.
如图2所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。As shown in Figure 2, the application framework layer may include window managers, content providers, view systems, telephony managers, resource managers, notification managers, and the like.
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。A window manager is used to manage window programs. The window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, take screenshots, etc.
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。Content providers are used to store and retrieve data and make these data accessible to applications. Data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone book, etc.
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. View systems can be used to build applications. A display interface can consist of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。The phone manager is used to provide the communication function of the electronic device 100 . For example, the management of call status (including connecting, hanging up, etc.).
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。The resource manager provides various resources for the application, such as localization strings, icons, pictures, layout files, video files and so on.
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。The notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages, and can disappear automatically after a brief pause without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also display notifications in the status bar at the top of the system in the form of graphs or scroll bar text, such as notifications of applications running in the background, and notifications on the screen in the form of dialog windows. For example, text information is prompted in the status bar, a prompt sound is issued, the electronic device vibrates, and the indicator light flashes.
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。Android Runtime includes core libraries and a virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library consists of two parts: one is the function functions that the java language needs to call, and the other is the core library of Android.
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。The application layer and the application framework layer run in virtual machines. The virtual machine executes the java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, safety and exception management, and garbage collection.
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(media libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。A system library can include multiple functional modules. For example: surface manager (surface manager), media library (media libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。The Surface Manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。The media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
2D图形引擎是2D绘图的绘图引擎。2D graphics engine is a drawing engine for 2D drawing.
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。The kernel layer is the layer between hardware and software. The kernel layer contains at least display drivers, camera drivers, audio drivers, and sensor drivers.
如图3A所示,图3A是本申请实施例提供的一种耳机控制方法的流程示意图,应用于如图1或图2所示的电子设备,该电子设备可以为第一无线耳机,所述第一无线耳机包括第一UWB模块,所述方法包括:As shown in FIG. 3A , FIG. 3A is a schematic flowchart of a headset control method provided by an embodiment of the present application, which is applied to the electronic device shown in FIG. 1 or FIG. 2 , and the electronic device may be a first wireless headset. The first wireless headset includes a first UWB module, and the method includes:
301、建立所述第一无线耳机与第二无线耳机之间的通信连接,所述第二无线耳机包括第二UWB模块。301. Establish a communication connection between the first wireless headset and a second wireless headset, where the second wireless headset includes a second UWB module.
其中,第一无线耳机、第二无线耳机均可以包括至少一个通信模块,第一无线耳机、第二无线耳机之间可以通过彼此的通信模块实现第一无线耳机与第二无线耳机之间的通信连接,通信模块可以为以下至少一种:蓝牙模块、红外模块、超宽带(ultra wideband,UWB)模块、WIFI模块、移动通信模块(2G、3G、4G、5G、6G等)等等,在此不作限定,例如,第一无线耳机可以包括第一蓝牙模块,第二无线耳机可以包括第二蓝牙模块,通过第一蓝牙模块、第二蓝牙模块实现第一无线耳机与第二无线耳机之间的通信连接。UWB模块可以包括UWB天线,UWB天线能够用于实现发送或者接收UWB信号。Wherein, the first wireless earphone and the second wireless earphone can each include at least one communication module, and the first wireless earphone and the second wireless earphone can realize the communication between the first wireless earphone and the second wireless earphone through the mutual communication module. For connection, the communication module can be at least one of the following: a Bluetooth module, an infrared module, an ultra wideband (UWB) module, a WIFI module, a mobile communication module (2G, 3G, 4G, 5G, 6G, etc.), etc. Without limitation, for example, the first wireless headset may include a first Bluetooth module, and the second wireless headset may include a second Bluetooth module. communication connection. The UWB module may include a UWB antenna, which can be used to transmit or receive UWB signals.
具体实现中,第一无线耳机可以为主耳机或者从耳机,当然,第一无线耳机、第二无线耳机可以为预先配对的一对耳机。具体实现中,第一无线耳机、第二无线耳机中的至少一个与移动终端之间建立通信连接。如图3B所示,第一无线耳机可以包括第一UWB模块,第二无线耳机可以包括第二UWB模块。In a specific implementation, the first wireless earphone may be a master earphone or a slave earphone. Of course, the first wireless earphone and the second wireless earphone may be a pair of earphones paired in advance. In a specific implementation, a communication connection is established between at least one of the first wireless earphone and the second wireless earphone and the mobile terminal. As shown in FIG. 3B , the first wireless headset may include a first UWB module, and the second wireless headset may include a second UWB module.
302、在所述第一无线耳机与所述第二无线耳机中至少一个耳机未处于佩戴状态时,通过所述第一UWB模块和所述第二UWB模块确定所述第一无线耳机与所述第二无线耳机之间的目标距离。302. When at least one of the first wireless earphone and the second wireless earphone is not in a wearing state, use the first UWB module and the second UWB module to determine the first wireless earphone and the second wireless earphone. The target distance between the second wireless earphones.
具体实现中,佩戴状态可以是指耳机佩戴于耳朵上,第一无线耳机、第二无线耳机均可以包括接近传感器,例如,第一无线耳机可以通过接近传感器检测与人耳之间的距离,在该距离处于预设距离范围,则可以确认第一无线耳机处于佩戴状态。或者,第一无线耳机、第二无线耳机均可以包括加速度传感器,例如,第一无线耳机可以通过加速度传感器检测第一无线耳机的运动轨迹,将该运动轨迹与预设轨迹进行比对,在运动轨迹与预设轨迹比对成功时,则确认第一无线耳机处于佩戴状态,另外,第二无线耳机也可以通过同样方式检测其是否处于佩戴状态,第一无线耳机可以向第二无线耳机发送状态获取请求,该状态获取请求用于获取第二无线耳机的状态,接收由第二无线耳机发送的状态信息,在该状态信息指示第二无线耳机处于佩戴状态时,则第一无线耳机检测到第二无线耳机处于佩戴状态。In specific implementation, the wearing state may refer to the earphone being worn on the ear, and both the first wireless earphone and the second wireless earphone may include proximity sensors. If the distance is within the preset distance range, it can be confirmed that the first wireless earphone is in a wearing state. Alternatively, both the first wireless earphone and the second wireless earphone may include an acceleration sensor. For example, the first wireless earphone may detect the motion trajectory of the first wireless earphone through the acceleration sensor, and compare the motion trajectory with the preset trajectory. When the track is compared with the preset track successfully, it is confirmed that the first wireless earphone is in the wearing state. In addition, the second wireless earphone can also detect whether it is in the wearing state in the same way, and the first wireless earphone can send the state to the second wireless earphone. An acquisition request, the status acquisition request is used to acquire the status of the second wireless headset, and to receive status information sent by the second wireless headset. When the status information indicates that the second wireless headset is in a wearing state, the first wireless headset detects the first wireless headset. The second wireless headset is wearing.
进一步地,在第一无线耳机与第二无线耳机中至少一个耳机未处于佩戴状态时,第一无线耳机则可以通过第一UWB模块和第二UWB模块确定第一无线耳机与第二无线耳机之间的目标距离。具体实施中,通过UWB进行定位、测距的技术可包括:双向测距(two-wayRanging,TWR)技术,到达时间差(Temporary Domestic Off-Site Assignment,TDOA)技术、到达相位差(Phase Difference of Arrival,PDOA)技术等,此处不作限制。Further, when at least one of the first wireless earphone and the second wireless earphone is not in the wearing state, the first wireless earphone can determine the relationship between the first wireless earphone and the second wireless earphone through the first UWB module and the second UWB module. target distance between. In specific implementation, the technologies for positioning and ranging through UWB may include: two-way ranging (TWR) technology, Temporary Domestic Off-Site Assignment (TDOA) technology, Phase Difference of Arrival (Phase Difference of Arrival) technology , PDOA) technology, etc., which are not limited here.
在一个可能的示例中,上述步骤302之后,还可以包括如下步骤:In a possible example, after the
在所述第一无线耳机与所述第二无线耳机均处于佩戴状态时,休眠所述第一UWB模块,并指示所述第二无线耳机休眠所述第二UWB模块。When both the first wireless earphone and the second wireless earphone are in the wearing state, the first UWB module is hibernated, and the second wireless earphone is instructed to hibernate the second UWB module.
其中,具体实现中,第一无线耳机与第二无线耳机均处于佩戴状态,则说明用户在使用耳机,即耳机在用户耳朵上,则不存在耳机丢失的可能性,可以休眠第一UWB模块,如此,可以降低第一无线耳机的功耗,第一无线耳机还可以向第二无线耳机发送指令,以指示第二无线耳机休眠第二UWB模块,如此,可以降低第二无线耳机的功耗。Wherein, in the specific implementation, if both the first wireless earphone and the second wireless earphone are in the wearing state, it means that the user is using the earphone, that is, the earphone is on the user's ear, there is no possibility of the earphone being lost, and the first UWB module can be hibernated, In this way, the power consumption of the first wireless headset can be reduced, and the first wireless headset can also send an instruction to the second wireless headset to instruct the second wireless headset to sleep the second UWB module, thus reducing the power consumption of the second wireless headset.
303、在所述目标距离大于预设距离,进行第一提示操作,所述第一提示操作用于提示寻找所述第一无线耳机和所述第二无线耳机中的至少一个耳机。303. When the target distance is greater than a preset distance, perform a first prompt operation, where the first prompt operation is used to prompt to find at least one of the first wireless earphone and the second wireless earphone.
其中,预设距离可以由用户自行设置或者系统默认,该至少一个耳机可以理解为处于未佩戴状态下的无线耳机。具体实现中,目标距离大于预设距离,即第一无线耳机与第二无线耳机之间的距离超过一定范围,则说明第一无线耳机与第二无线耳机之间有可能至少有一个存在丢失或者将会造成丢失的可能,进行第一提示操作,第一提示操作可以用于提示寻找第一无线耳机和第二无线耳机中的至少一个耳机,例如,可以通过耳机盒或者手机寻找第一无线耳机和第二无线耳机中的至少一个耳机,如图3C所示,以耳机盒为例,耳机盒可以包括至少一个UWB模块,通过至少三个UWB模块可以实现耳机定位,由于耳机盒或者手机位置已知,则可以快速定位到耳机位置,结合室内地图,可以将第一无线耳机或者第二无线耳机的位置标记在室内地图中,如此,可以降低无线耳机丢失风险,提升用户体验。The preset distance may be set by the user or by default by the system, and the at least one earphone may be understood as a wireless earphone in an unworn state. In the specific implementation, if the target distance is greater than the preset distance, that is, the distance between the first wireless earphone and the second wireless earphone exceeds a certain range, it means that at least one of the first wireless earphone and the second wireless earphone may be lost or lost. It will cause the possibility of loss, and perform the first prompt operation. The first prompt operation can be used to prompt to find at least one of the first wireless earphone and the second wireless earphone. For example, the first wireless earphone can be found through the earphone box or mobile phone. and at least one earphone in the second wireless earphone, as shown in FIG. 3C, taking the earphone box as an example, the earphone box can include at least one UWB module, and the earphone positioning can be realized through at least three UWB modules. If you know the location of the headset, you can quickly locate the location of the headset. Combined with the indoor map, the location of the first wireless headset or the second wireless headset can be marked on the indoor map. In this way, the risk of losing the wireless headset can be reduced and the user experience can be improved.
其中,第一提示操作的提示方式可以为以下至少一种:语音提示、振动提示、显示提示、发光提示等等,在此不作限定。The prompting manner of the first prompting operation may be at least one of the following: voice prompting, vibration prompting, display prompting, light-emitting prompting, etc., which are not limited herein.
在一个可能的示例中,上述步骤302-步骤303之间,还可以包括如下步骤:In a possible example, between the above steps 302-303, the following steps may also be included:
A1、获取目标地理位置;A1. Obtain the target geographic location;
A2、按照预设的地理位置与距离阈值之间的映射关系,确定所述目标地理位置对应的所述预设距离。A2. Determine the preset distance corresponding to the target geographic location according to the mapping relationship between the preset geographic location and the distance threshold.
其中,第一无线耳机可以通过定位技术获取目标地理位置,定位技术可以是GPS定位技术或者UWB定位技术或者WIFI定位技术,在此不作限定。第一无线耳机中还可以预先存储预设的地理位置与距离阈值之间的映射关系,进而,可以依据该映射关系确定目标地理位置对应的预设距离,如此,可以实现不同的地理位置设置不同的距离,不同的地理位置对应不同的环境,环境不同,一旦耳机丢失,寻找耳机的难度不一样。Wherein, the first wireless headset may obtain the target geographic location through a positioning technology, and the positioning technology may be a GPS positioning technology, a UWB positioning technology, or a WIFI positioning technology, which is not limited herein. The first wireless headset may also pre-store a mapping relationship between a preset geographic location and a distance threshold, and then a preset distance corresponding to the target geographic location may be determined according to the mapping relationship. In this way, different geographic locations can be set differently. The distance, different geographical locations correspond to different environments, and the environment is different. Once the earphones are lost, the difficulty of finding the earphones is different.
在一个可能的示例中,上述步骤302之后,还可以包括如下步骤:In a possible example, after the
在所述目标距离小于或等于所述预设距离,进行第二提示操作,所述第二提示操作用于提示将所述第一无线耳机和所述第二无线耳机中的至少一个耳机放回目标耳机盒。When the target distance is less than or equal to the preset distance, a second prompt operation is performed, where the second prompt operation is used to prompt to put back at least one of the first wireless headset and the second wireless headset Target headset box.
其中,本申请实施例中,目标耳机盒可以为任一耳机盒,或者,目标耳机盒可以为预先与第一无线耳机、第二无线耳机绑定的耳机盒。其中,第二提示操作的提示方式可以为以下至少一种:语音提示、振动提示、显示提示、发光提示等等,在此不作限定。Wherein, in the embodiment of the present application, the target earphone box may be any earphone box, or the target earphone box may be an earphone box that is pre-bound with the first wireless earphone and the second wireless earphone. Wherein, the prompting manner of the second prompting operation may be at least one of the following: voice prompting, vibration prompting, display prompting, light-emitting prompting, etc., which are not limited herein.
具体实现中,在目标距离小于或等于预设距离,则说明第一无限耳机与第二无限耳机之间的距离比较近,则可以进行第二提示操作,第二提示操作用于提示将第一无线耳机和第二无线耳机中的至少一个耳机放回目标耳机盒,如此,可以提示用户及时放置好耳机,提升了用户体验。In the specific implementation, when the target distance is less than or equal to the preset distance, it means that the distance between the first infinite earphone and the second infinite earphone is relatively close, and then a second prompt operation can be performed, and the second prompt operation is used to prompt the first At least one of the wireless earphone and the second wireless earphone is put back into the target earphone box, so that the user can be prompted to place the earphone in time, which improves the user experience.
进一步地,请参阅图3D,图3D为本申请实施例提供的一种通过第三UWB模块获取第二无线耳机的位置信息的演示示意图,第一无线耳机包括第一UWB模块,第一UWB模块包括第一UWB天线;第二无线耳机包括第二UWB模块,第二UWB模块包括第二UWB天线;耳机盒或者手机包括至少一个UWB模块,该至少一个UWB模块包括UWB天线,如耳机盒或者手机的UWB模块包括第三UWB天线。其中,根据第一UWB天线接收的UWB信号以及第二UWB天线接收的UWB信号确定第一UWB天线相对于耳机盒或者手机的第一切斜角,具体地,可根据第一UWB天线接收的UWB信号与第二UWB天线接收的UWB信号确定UWB信号到达第一UWB天线与到达第二UWB天线的第一距离差;根据第一距离差和第一UWB天线与第二UWB天线之间的第一间隔距离确定第一UWB天线相对于耳机盒或者手机的第一切斜角。Further, please refer to FIG. 3D. FIG. 3D is a schematic diagram of a demonstration of obtaining location information of a second wireless headset through a third UWB module provided by an embodiment of the application. The first wireless headset includes a first UWB module, and the first UWB module It includes a first UWB antenna; the second wireless headset includes a second UWB module, and the second UWB module includes a second UWB antenna; the headset box or mobile phone includes at least one UWB module, and the at least one UWB module includes a UWB antenna, such as a headset box or a mobile phone The UWB module includes a third UWB antenna. Wherein, the first oblique angle of the first UWB antenna relative to the earphone box or the mobile phone is determined according to the UWB signal received by the first UWB antenna and the UWB signal received by the second UWB antenna. The signal and the UWB signal received by the second UWB antenna determine the first distance difference between the UWB signal reaching the first UWB antenna and the second UWB antenna; according to the first distance difference and the first distance between the first UWB antenna and the second UWB antenna The separation distance determines the first oblique angle of the first UWB antenna relative to the earphone box or the mobile phone.
其中,根据第一距离差,以及第一UWB天线与第二UWB天线之间的第一间隔距离确定第一UWB天线相对于耳机盒或者手机的第一切斜角,具体地,可根据如下公式确定耳机盒或者手机到第一无线耳机的第一UWB天线和第二无线耳机的第二UWB天线的连线的距离y:Wherein, according to the first distance difference, and the first separation distance between the first UWB antenna and the second UWB antenna, determine the first oblique angle of the first UWB antenna relative to the earphone box or the mobile phone, specifically, according to the following formula Determine the distance y from the headset box or mobile phone to the connection between the first UWB antenna of the first wireless headset and the second UWB antenna of the second wireless headset:
其中,如图3D所示,d为第一UWB天线与第二UWB天线之间的第一间隔距离,r为第一UWB天线与耳机盒或者手机之间的第一距离,p为UWB信号到达第一UWB天线的距离与到达第二UWB天线的距离之间的第一距离差(r-p);进一步地,可根据距离y与r为第一UWB天线与耳机盒或者手机之间的第一距离确定第一切斜角,其中,如图3D所示,根据距离y与r可构建一个直角三角形,x为直角三角形的一个直角边,该直角三角形的另一直角边为y,直角三角形的斜边为第一UWB天线与耳机盒或者手机之间的第一距离r,第一斜切角α的正弦值为y/r。Wherein, as shown in Figure 3D, d is the first separation distance between the first UWB antenna and the second UWB antenna, r is the first distance between the first UWB antenna and the earphone box or mobile phone, and p is the arrival of the UWB signal The first distance difference (r-p) between the distance of the first UWB antenna and the distance to the second UWB antenna; further, according to the distances y and r, it can be the first distance between the first UWB antenna and the earphone box or the mobile phone Determine the first oblique angle, where, as shown in Figure 3D, a right triangle can be constructed according to the distances y and r, where x is a right side of the right triangle, the other right side of the right triangle is y, and the oblique angle of the right triangle is y. The side is the first distance r between the first UWB antenna and the earphone box or the mobile phone, and the sine value of the first chamfer angle α is y/r.
举例说明下,如图3E所示,在第一无线耳机、第二无线耳机为蓝牙耳机,耳机盒为蓝牙耳机盒的情况下,在默认状态下,蓝牙耳机盒、左右耳机UWB耳机可以均处于sleep状态,当用户从蓝牙耳机盒中拿出耳机时,首先检测拿出数量,若拿出两个蓝牙耳机,则蓝牙耳机盒默认继续处于sleep状态,两个蓝牙耳机UWB开启,并设置定时器(timer),定时相互检测距离;若拿出一只耳机,则拿出耳机盒蓝牙盒UWB开启,并设置timer,定时相互检测距离,但是由于蓝牙耳机盒大概会放置于口袋或者其它有遮挡位置处,因此需要提示用户注意自己主动使用蓝牙耳机盒进行检测。蓝牙耳机上可以设置有接近传感器,以此,能够精准判断耳机是否处于佩戴状态中,具体情况如下:A、用户拿出两只耳机,且均未佩戴时,则两只蓝牙耳机UWB模块均开启,且定时相互检测相互距离,并且通过蓝牙通知蓝牙耳机盒注意两只耳机是否同时丢失。(防止两只耳机同时丢时且丢失距离很近,触发不了警报);B、用户拿出两只耳机,且只佩戴一只耳机时,则两只蓝牙耳机UWB模块均开启,且定时检测未佩戴耳机是否丢失;C、用户佩戴两只耳机时,UWB功能关闭,两层含义:1,两只耳机均佩戴时,UWB即使开启信号也会被隔断无法通信,2,佩戴状态默认耳机也不会丢失,关闭UWB以节省功耗;D、用户仅拿出一只耳机时,且未佩戴时,蓝牙耳机盒和拿出耳机通过UWB相互检测距离;E、用户仅拿出一只耳机时,且佩戴时,蓝牙耳机盒和拿出耳机UWB关闭。另外,具体实现中,只要蓝牙耳机盒UWB开启,则默认为接收,而蓝牙耳机处于发射端。两只蓝牙耳机相互定位时,默认以低电量耳机作为发射,高电量耳机作为接收。For example, as shown in FIG. 3E, in the case where the first wireless earphone and the second wireless earphone are Bluetooth earphones, and the earphone box is a Bluetooth earphone box, in the default state, the Bluetooth earphone box and the left and right earphone UWB earphones can all be in sleep state, when the user takes out the earphones from the bluetooth earphone box, the number of the earphones taken out is detected first. If two bluetooth earphones are taken out, the bluetooth earphone box continues to be in the sleep state by default, the two bluetooth earphones UWB is turned on, and the timer is set. (timer), check the distance from each other regularly; if you take out a headset, take out the earphone box and turn on the Bluetooth box UWB, and set the timer to detect the distance from each other regularly, but because the bluetooth earphone box will probably be placed in a pocket or other sheltered position Therefore, users need to be reminded to pay attention to their own initiative to use the Bluetooth headset box for detection. A proximity sensor can be set on the Bluetooth headset, so that it can accurately determine whether the headset is in the wearing state. The details are as follows: A. When the user takes out two headsets and neither is wearing them, the UWB modules of both Bluetooth headsets are turned on. , and regularly detect the mutual distance, and notify the Bluetooth headset box through Bluetooth to pay attention to whether the two headsets are lost at the same time. (To prevent the two earphones from being lost at the same time and the loss distance is very close, the alarm cannot be triggered); B. When the user takes out two earphones and wears only one earphone, the UWB modules of the two bluetooth earphones are both turned on, and the timing detection fails. Whether the headset is lost; C. When the user wears two headsets, the UWB function is turned off. There are two meanings: 1. When both headsets are worn, the UWB signal will be cut off and cannot communicate even if both headsets are turned on. 2. The default headset is not wearing It will be lost, turn off UWB to save power consumption; D. When the user only takes out one earphone and is not wearing it, the Bluetooth earphone box and the earphone will detect the distance from each other through UWB; E. When the user only takes out one earphone, And when wearing, the Bluetooth headset box and the UWB headset are turned off. In addition, in the specific implementation, as long as the Bluetooth headset box UWB is turned on, the default is to receive, and the Bluetooth headset is at the transmitting end. When two Bluetooth headsets are positioned with each other, the low-power headset is used as the transmitter by default, and the high-power headset is used as the receiver.
在一个可能的示例中,上述步骤301之前,还可以包括如下步骤:In a possible example, before the
B1、获取由所述第一无线耳机检测到的所述第二无线耳机的第一信号强度值;B1. Obtain the first signal strength value of the second wireless earphone detected by the first wireless earphone;
B2、在所述第一信号强度值处于预设信号强度范围时,执行所述建立所述第一无线耳机与第二无线耳机之间的通信连接的步骤。B2. When the first signal strength value is within a preset signal strength range, perform the step of establishing a communication connection between the first wireless earphone and the second wireless earphone.
其中,预设信号强度范围可以由用户自行设置或者系统默认。具体实现中,第一无线耳机可以获取由第一无限耳机检测到的第二无线耳机的第一信号强度值,在第一信号强度值处于预设信号强度范围时,则执行所述建立所述第一无线耳机与第二无线耳机之间的通信连接的步骤,反之,则可以不执行步骤301,如此,可以保证信号强度处于一定范围时,才建立第一无线耳机和第二无线耳机之间的通信连接。当然,上述第一信号强度值、预设信号强度范围均可以指蓝牙信号或者UWB信号,或者,其他信号,在此不做限定。The preset signal strength range may be set by the user or the system defaults. In a specific implementation, the first wireless earphone may acquire the first signal strength value of the second wireless earphone detected by the first wireless earphone, and when the first signal strength value is within the preset signal strength range, execute the establishment of the The step of communication connection between the first wireless earphone and the second wireless earphone, otherwise, step 301 may not be performed, so that the connection between the first wireless earphone and the second wireless earphone can be established only when the signal strength is within a certain range. communication connection. Of course, the above-mentioned first signal strength value and preset signal strength range may all refer to Bluetooth signals or UWB signals, or other signals, which are not limited herein.
进一步地,在一个可能的示例中,上述步骤B1,获取由所述第一无线耳机检测到的所述第二无线耳机的第一信号强度值,可以包括如下步骤:Further, in a possible example, the above step B1, acquiring the first signal strength value of the second wireless earphone detected by the first wireless earphone, may include the following steps:
B11、获取所述第二无线耳机在预设时间段的信号强度变化曲线,所述信号强度变化曲线的横轴为时间,纵轴为信号强度值;B11. Acquire a signal strength variation curve of the second wireless headset in a preset time period, where the horizontal axis of the signal strength variation curve is time, and the vertical axis is a signal strength value;
B12、对所述信号强度变化曲线进行采样,得到多个信号强度值;B12. Sampling the signal strength variation curve to obtain a plurality of signal strength values;
B13、依据所述多个信号强度值确定目标均值;B13. Determine a target mean value according to the plurality of signal strength values;
B14、依据所述多个信号强度值进行均方差运算,得到目标均方差;B14. Perform mean square error operation according to the plurality of signal strength values to obtain the target mean square error;
B15、按照预设的均方差与调节系数之间的映射关系,确定所述目标均方差对应的目标调节系数;B15, according to the preset mapping relationship between the mean square error and the adjustment coefficient, determine the target adjustment coefficient corresponding to the target mean square error;
B16、依据所述目标调节系数对所述目标均值进行调整,得到所述第二无线耳机的第一信号强度值。B16. Adjust the target mean value according to the target adjustment coefficient to obtain a first signal strength value of the second wireless earphone.
其中,上述预设时间段可以预先设置或者系统默认,预设时间段可以为当前时间之前的一段时间。第一无线耳机中还可以预先存储预设的均方差与调节系数之间的映射关系。The above-mentioned preset time period may be preset or defaulted by the system, and the preset time period may be a period of time before the current time. A preset mapping relationship between the mean square error and the adjustment coefficient may also be pre-stored in the first wireless earphone.
具体实现中,第一无线耳机可以获取由第一无线耳机检测到的第二无线耳机在预设时间段的信号强度变化曲线,该信号强度变化曲线的横轴为时间,纵轴为信号强度值,并对信号强度变化曲线进行均匀采样,得到多个信号强度值,以及依据多个信号强度值确定目标均值,依据多个信号强度值进行均方差运算,得到目标均方差,按照预设的均方差与调节系数之间的映射关系,确定目标均方差对应的目标调节系数,依据目标调节系数对目标均值进行调整,得第二无线耳机的第一信号强度。In a specific implementation, the first wireless earphone can acquire a signal strength variation curve of the second wireless earphone detected by the first wireless earphone in a preset time period, the horizontal axis of the signal strength variation curve is time, and the vertical axis is the signal strength value , and uniformly sample the signal strength variation curve to obtain multiple signal strength values, and determine the target mean value according to the multiple signal strength values, and perform the mean square error calculation according to the multiple signal strength values to obtain the target mean square deviation. The mapping relationship between the variance and the adjustment coefficient determines the target adjustment coefficient corresponding to the target mean square deviation, and adjusts the target mean value according to the target adjustment coefficient to obtain the first signal strength of the second wireless earphone.
本申请实施例中,取值范围也可以由用户自行设置或者系统自行更新,例如,调节系数的取值范围可以为-0.15~0.15之间,当然,进一步地,第一无线耳机可以依据目标调节系数对目标均值进行调整,得到第一信号强度值,第一信号强度值的具体计算方式可以参照如下公式:In this embodiment of the present application, the value range may also be set by the user or updated by the system. For example, the value range of the adjustment coefficient may be between -0.15 and 0.15. Of course, further, the first wireless headset may be adjusted according to the target. The coefficient adjusts the target mean value to obtain the first signal strength value. The specific calculation method of the first signal strength value can refer to the following formula:
第一信号强度值=(1+目标调节系数)*目标均值First signal strength value=(1+target adjustment coefficient)*target average
如此,均值反映了信号一段时间内的变化情况,均方差则反映了信号稳定性,进而,有助于精准检测第二无线耳机的信号强度。In this way, the mean value reflects the change of the signal over a period of time, and the mean square error reflects the signal stability, which in turn helps to accurately detect the signal strength of the second wireless earphone.
在一个可能的示例中,上述步骤303,进行第一提示操作,可以包括如下步骤:In a possible example, the above step 303, performing the first prompt operation, may include the following steps:
C1、获取目标指纹图像;C1. Obtain the target fingerprint image;
C2、对所述目标指纹图像进行图像质量评价,得到目标图像质量评价值;C2. Perform image quality evaluation on the target fingerprint image to obtain a target image quality evaluation value;
C3、在所述目标图像质量评价值大于预设图像质量评价阈值时,将所述目标指纹图像与预设指纹模板进行匹配;C3, when the target image quality evaluation value is greater than a preset image quality evaluation threshold, matching the target fingerprint image with a preset fingerprint template;
C4、在所述目标指纹图像与所述预设指纹模板匹配成功时,执行所述进行第一提示操作的步骤。C4. When the target fingerprint image is successfully matched with the preset fingerprint template, the step of performing the first prompting operation is performed.
其中,本申请实施例中,第一无线耳机可以包括指纹识别模组,通过该指纹识别模组实现指纹采集,或者,第一无线耳机可以获取由移动终端采集的目标指纹图像。预设图像质量评价阈值、预设指纹模板均可以由用户自行设置或者系统默认,且预设图像质量评价阈值、预设指纹模板均可以保存在第一无线耳机中。具体实现中,第一无线耳机可以通过摄像头获取目标指纹图像,并采用至少一个图像质量评价指标对目标指纹图像进行图像质量评价,得到目标图像质量评价值,图像质量评价指标可以为以下至少一种:信息熵、平均梯度、边缘保持度、清晰度等等,在此不做限定。进而,第一无线耳机可以在目标图像质量评价值大于预设图像质量评价阈值时,将目标指纹图像与预设指纹模板进行匹配,且在目标指纹图像与预设指纹模板匹配成功时,执行步骤303,否则,则可以提示重新采集指纹图像,如此,有助于提升指纹识别效率。Wherein, in the embodiment of the present application, the first wireless earphone may include a fingerprint identification module, and fingerprint collection is realized by the fingerprint identification module, or the first wireless earphone may acquire a target fingerprint image collected by a mobile terminal. The preset image quality evaluation threshold and the preset fingerprint template may be set by the user or the system defaults, and the preset image quality evaluation threshold and the preset fingerprint template may be stored in the first wireless headset. In a specific implementation, the first wireless headset can obtain the target fingerprint image through the camera, and use at least one image quality evaluation index to evaluate the image quality of the target fingerprint image to obtain the target image quality evaluation value, and the image quality evaluation index can be at least one of the following : information entropy, average gradient, edge retention, sharpness, etc., which are not limited here. Furthermore, the first wireless headset can match the target fingerprint image with the preset fingerprint template when the target image quality evaluation value is greater than the preset image quality evaluation threshold, and when the target fingerprint image and the preset fingerprint template are successfully matched, perform the steps 303, otherwise, it can prompt to re-collect the fingerprint image, which helps to improve the efficiency of fingerprint identification.
进一步地,上述步骤C2,对所述目标指纹图像进行图像质量评价,得到目标图像质量评价值,可以包括如下步骤:Further, in the above step C2, image quality evaluation is performed on the target fingerprint image to obtain a target image quality evaluation value, which may include the following steps:
C21、将所述目标指纹图像进行多尺度特征分解,得到低频特征分量图像和高频特征分量图像;C21, carrying out multi-scale feature decomposition on the target fingerprint image to obtain a low-frequency feature component image and a high-frequency feature component image;
C22、将所述低频特征分量图像划分为多个区域;C22. Divide the low-frequency feature component image into multiple regions;
C23、确定所述多个区域中每一区域对应的信息熵,得到多个信息熵;C23. Determine the information entropy corresponding to each area in the multiple areas, and obtain multiple information entropies;
C24、依据所述多个信息熵确定平均信息熵和目标均方差;C24. Determine the average information entropy and the target mean square error according to the plurality of information entropies;
C25、确定所述目标均方差对应的目标微调调节系数;C25. Determine the target fine-tuning adjustment coefficient corresponding to the target mean square error;
C26、依据所述目标微调调节系数对所述平均信息熵进行调节,得到目标信息熵;C26, adjusting the average information entropy according to the target fine-tuning adjustment coefficient to obtain target information entropy;
C27、按照预设的信息熵与评价值之间的映射关系,确定所述目标信息熵对应的第三评价值;C27, according to the preset mapping relationship between the information entropy and the evaluation value, determine the third evaluation value corresponding to the target information entropy;
C28、获取所述目标指纹图像对应的目标第一拍摄参数;C28, acquiring the target first shooting parameter corresponding to the target fingerprint image;
C29、按照预设的拍摄参数与低频权重之间的映射关系,确定所述目标第一拍摄参数对应的目标低频权重,依据该目标低频权重确定目标高频权重;C29, according to the mapping relationship between the preset shooting parameters and the low-frequency weight, determine the target low-frequency weight corresponding to the first shooting parameter of the target, and determine the target high-frequency weight according to the target low-frequency weight;
C30、依据所述高频特征分量图像确定目标特征点分布密度;C30. Determine the distribution density of target feature points according to the high-frequency feature component image;
C31、按照预设的特征点分布密度与评价值之间的映射关系,确定所述目标特征点分布密度对应的第四评价值;C31. Determine a fourth evaluation value corresponding to the distribution density of the target feature points according to the preset mapping relationship between the distribution density of the feature points and the evaluation value;
C32、依据所述第三评价值、所述第四评价值、所述目标低频权重和所述目标高频权重进行加权运算,得到所述目标指纹图像的目标图像质量评价值。C32. Perform a weighting operation according to the third evaluation value, the fourth evaluation value, the target low frequency weight and the target high frequency weight to obtain a target image quality evaluation value of the target fingerprint image.
具体实现中,第一无线耳机可以采用多尺度分解算法将目标指纹图像进行多尺度特征分解,得到低频特征分量图像和高频特征分量图像,多尺度分解算法可以为以下至少一种:金字塔变换算法、小波变换、轮廓波变换、剪切波变换等等,在此不做限定,具体实现中,低频特征分量图像的数量可以为1个,而高频特征分量图像的数量可以为1个或者多个。进一步地,可以将低频特征分量图像划分为多个区域,每一区域的面积大小相同或者不同。低频特征分量图像反映了图像的主体特征,可以占据图像的主要能量,而高频特征分量图像反映了图像的细节信息。In a specific implementation, the first wireless earphone can use a multi-scale decomposition algorithm to perform multi-scale feature decomposition on the target fingerprint image to obtain a low-frequency feature component image and a high-frequency feature component image. The multi-scale decomposition algorithm can be at least one of the following: pyramid transformation algorithm , wavelet transform, contourlet transform, shearlet transform, etc., which are not limited here. In the specific implementation, the number of low-frequency feature component images can be one, and the number of high-frequency feature component images can be one or more. indivual. Further, the low-frequency feature component image can be divided into multiple regions, and the area of each region is the same or different. The low-frequency feature component image reflects the main features of the image and can occupy the main energy of the image, while the high-frequency feature component image reflects the detailed information of the image.
进一步地,第一无线耳机可以确定多个区域中每一区域对应的信息熵,得到多个信息熵,依据多个信息熵确定平均信息熵和目标均方差,信息熵可以在一定程度上反映了图像信息多少,均方差则可以反映图像信息的稳定性。第一无线耳机中可以预先存储预设均方差与微调调节系数之间的映射关系,进而,可以依据该映射关系确定目标均方差对应的目标微调调节系数,本申请实施例中,微调调节系数的取值范围可以为-0.075~0.075。Further, the first wireless earphone can determine the information entropy corresponding to each of the multiple areas, obtain multiple information entropies, and determine the average information entropy and the target mean square error according to the multiple information entropies, and the information entropy can reflect the information entropy to a certain extent. How much image information, mean square error can reflect the stability of image information. The mapping relationship between the preset mean square error and the fine-tuning adjustment coefficient may be pre-stored in the first wireless earphone, and further, the target fine-tuning adjustment coefficient corresponding to the target mean square error may be determined according to the mapping relationship. In the embodiment of the present application, the fine-tuning adjustment coefficient is The value can range from -0.075 to 0.075.
进一步地,第一无线耳机可以依据目标微调调节系数对平均信息熵进行调节,得到目标信息熵,目标信息熵=(1+目标微调调节系数)*平均信息熵。第一无线耳机中可以预先存储预设的信息熵与评价值之间的映射关系,进而,可以按照预设的信息熵与评价值之间的映射关系,确定目标信息熵对应的第三评价值。Further, the first wireless earphone can adjust the average information entropy according to the target fine-tuning adjustment coefficient to obtain the target information entropy, where the target information entropy=(1+target fine-tuning adjustment coefficient)*average information entropy. A preset mapping relationship between information entropy and evaluation value may be pre-stored in the first wireless headset, and further, a third evaluation value corresponding to the target information entropy may be determined according to the preset mapping relationship between information entropy and evaluation value. .
另外,第一无线耳机可以获取目标指纹图像对应的目标第一拍摄参数,目标第一拍摄参数参见上述描述,在此不再赘述。第一无线耳机中还可以预先存储预设的拍摄参数与低频权重之间的映射关系,进而,可以按照预设的拍摄参数与低频权重之间的映射关系,确定目标第一拍摄参数对应的目标低频权重,依据该目标低频权重确定目标高频权重,目标低频权重+目标高频权重=1。In addition, the first wireless earphone can acquire the first shooting parameter of the target corresponding to the target fingerprint image, and the first shooting parameter of the target can refer to the above description, which will not be repeated here. The first wireless earphone may also pre-store the mapping relationship between the preset shooting parameters and the low-frequency weight, and further, the target corresponding to the first shooting parameter of the target may be determined according to the mapping relationship between the preset shooting parameters and the low-frequency weight. The low frequency weight, the target high frequency weight is determined according to the target low frequency weight, the target low frequency weight + the target high frequency weight=1.
进一步地,第一无线耳机可以依据高频特征分量图像确定目标特征点分布密度,目标特征点分布密度=高频特征分量图像的特征点总数量/区域面积。第一无线耳机中还可以预先存储预设的特征点分布密度与评价值之间的映射关系,进而,可以按照预设的特征点分布密度与评价值之间的映射关系,确定目标特征点分布密度对应的第四评价值,最后,依据第三评价值、第四评价值、目标低频权重和目标高频权重进行加权运算,得到目标指纹图像的目标图像质量评价值,具体如下:Further, the first wireless earphone can determine the distribution density of target feature points according to the high-frequency feature component image, where the target feature point distribution density=total number of feature points in the high-frequency feature component image/area area. The first wireless earphone may also pre-store a preset mapping relationship between the distribution density of feature points and the evaluation value, and further, according to the preset mapping relationship between the distribution density of feature points and the evaluation value, determine the distribution of target feature points. The fourth evaluation value corresponding to the density, and finally, according to the third evaluation value, the fourth evaluation value, the target low-frequency weight and the target high-frequency weight, a weighted operation is performed to obtain the target image quality evaluation value of the target fingerprint image, as follows:
目标图像质量评价值=第三评价值*目标低频权重+第四评价值*目标高频权重Target image quality evaluation value = third evaluation value * target low frequency weight + fourth evaluation value * target high frequency weight
如此,可以基于目标指纹图像的低频分量以及高频分量两个维度进行图像质量评价,能够精准得到与拍摄环境相宜的评价参数,即目标图像质量评价值。In this way, the image quality evaluation can be performed based on the two dimensions of the low-frequency component and the high-frequency component of the target fingerprint image, and an evaluation parameter suitable for the shooting environment, that is, the target image quality evaluation value, can be accurately obtained.
可以看出,在本申请实施例中所描述的耳机控制方法,应用于第一无线耳机,第一无线耳机包括第一UWB模块,建立第一无线耳机与第二无线耳机之间的通信连接,第二无线耳机包括第二UWB模块,在第一无线耳机与第二无线耳机中至少一个耳机未处于佩戴状态时,通过第一UWB模块和第二UWB模块确定第一无线耳机与第二无线耳机之间的目标距离,在目标距离大于预设距离,进行第一提示操作,第一提示操作用于提示寻找第一无线耳机和第二无线耳机中的至少一个耳机,如此,可以在耳机未处于佩戴状态下,通过UWB实现距离检测,在耳机之间的距离超过一定范围,则进行防丢提示,能够防止耳机丢失。It can be seen that the headset control method described in the embodiments of the present application is applied to the first wireless headset, and the first wireless headset includes a first UWB module to establish a communication connection between the first wireless headset and the second wireless headset, The second wireless headset includes a second UWB module, and when at least one of the first wireless headset and the second wireless headset is not in a wearing state, the first wireless headset and the second wireless headset are determined by the first UWB module and the second UWB module The target distance between the two, when the target distance is greater than the preset distance, the first prompt operation is performed, and the first prompt operation is used to prompt to find at least one of the first wireless headset and the second wireless headset. In the wearing state, distance detection is realized through UWB. When the distance between the headphones exceeds a certain range, an anti-lost prompt will be issued to prevent the loss of the headphones.
与上述图3A所示的实施例一致地,请参阅图4,图4是本申请实施例提供的一种耳机控制方法的流程示意图,如图所示,应用于如图1或图2所示的电子设备,该电子设备可以为第一无线耳机,所述第一无线耳机包括第一UWB模块,本耳机控制方法包括:Consistent with the embodiment shown in FIG. 3A above, please refer to FIG. 4 . FIG. 4 is a schematic flowchart of an earphone control method provided by an embodiment of the present application. The electronic device can be a first wireless headset, the first wireless headset includes a first UWB module, and the headset control method includes:
401、建立所述第一无线耳机与第二无线耳机之间的通信连接,所述第二无线耳机包括第二UWB模块。401. Establish a communication connection between the first wireless headset and a second wireless headset, where the second wireless headset includes a second UWB module.
402、在所述第一无线耳机与所述第二无线耳机中至少一个耳机未处于佩戴状态时,通过所述第一UWB模块和所述第二UWB模块确定所述第一无线耳机与所述第二无线耳机之间的目标距离。402. When at least one of the first wireless earphone and the second wireless earphone is not in a wearing state, use the first UWB module and the second UWB module to determine whether the first wireless earphone and the The target distance between the second wireless earphones.
403、在所述目标距离大于预设距离,进行第一提示操作,所述第一提示操作用于提示寻找所述第一无线耳机和所述第二无线耳机中的至少一个耳机。403. When the target distance is greater than a preset distance, perform a first prompt operation, where the first prompt operation is used to prompt to find at least one of the first wireless earphone and the second wireless earphone.
404、在所述目标距离小于或等于所述预设距离,进行第二提示操作,所述第二提示操作用于提示将所述第一无线耳机和所述第二无线耳机中的至少一个耳机放回目标耳机盒。404. When the target distance is less than or equal to the preset distance, perform a second prompting operation, where the second prompting operation is used to prompt to connect at least one of the first wireless headset and the second wireless headset. Put back the target headphone case.
其中,上述步骤401-步骤404的具体描述可以参照如图3A所描述的耳机控制方法的相应步骤,在此不再赘述。The specific description of the
可以看出,在本申请实施例中所描述的耳机控制方法,可以在耳机未处于佩戴状态下,通过UWB实现距离检测,在耳机之间的距离超过一定范围,则进行防丢提示,还可以在耳机之间的距离小于一定范围啥时,提示用户将耳机放回耳机盒,能够防止耳机丢失。It can be seen that the earphone control method described in the embodiments of the present application can realize distance detection through UWB when the earphones are not in the wearing state. When the distance between the earphones is less than a certain range, the user is prompted to put the earphones back into the earphone box, which can prevent the earphones from being lost.
与上述实施例一致地,请参阅图5,图5是本申请实施例提供的一种无线耳机的结构示意图,如图所示,该无线耳机包括处理器、存储器、通信接口以及一个或多个程序,该无线耳机可以为第一无线耳机,所述第一无线耳机包括第一UWB模块,上述一个或多个程序被存储在上述存储器中,并且被配置由上述处理器执行,本申请实施例中,上述程序包括用于执行以下步骤的指令:Consistent with the above-mentioned embodiment, please refer to FIG. 5, which is a schematic structural diagram of a wireless headset provided by an embodiment of the present application. As shown in the figure, the wireless headset includes a processor, a memory, a communication interface, and one or more A program, the wireless headset may be a first wireless headset, the first wireless headset includes a first UWB module, the above-mentioned one or more programs are stored in the above-mentioned memory, and are configured to be executed by the above-mentioned processor, an embodiment of the present application , the above program includes instructions for performing the following steps:
建立所述第一无线耳机与第二无线耳机之间的通信连接,所述第二无线耳机包括第二UWB模块;establishing a communication connection between the first wireless headset and a second wireless headset, where the second wireless headset includes a second UWB module;
在所述第一无线耳机与所述第二无线耳机中至少一个耳机未处于佩戴状态时,通过所述第一UWB模块和所述第二UWB模块确定所述第一无线耳机与所述第二无线耳机之间的目标距离;When at least one of the first wireless earphone and the second wireless earphone is not in a wearing state, determining the first wireless earphone and the second wireless earphone through the first UWB module and the second UWB module target distance between wireless headsets;
在所述目标距离大于预设距离,进行第一提示操作,所述第一提示操作用于提示寻找所述第一无线耳机和所述第二无线耳机中的至少一个耳机。When the target distance is greater than the preset distance, a first prompt operation is performed, and the first prompt operation is used to prompt to find at least one of the first wireless earphone and the second wireless earphone.
可以看出,在本申请实施例中所描述的第一无线耳机,第一无线耳机包括第一UWB模块,建立第一无线耳机与第二无线耳机之间的通信连接,第二无线耳机包括第二UWB模块,在第一无线耳机与第二无线耳机中至少一个耳机未处于佩戴状态时,通过第一UWB模块和第二UWB模块确定第一无线耳机与第二无线耳机之间的目标距离,在目标距离大于预设距离,进行第一提示操作,第一提示操作用于提示寻找第一无线耳机和第二无线耳机中的至少一个耳机,如此,可以在耳机未处于佩戴状态下,通过UWB实现距离检测,在耳机之间的距离超过一定范围,则进行防丢提示,能够防止耳机丢失。It can be seen that, in the first wireless headset described in the embodiments of the present application, the first wireless headset includes a first UWB module to establish a communication connection between the first wireless headset and the second wireless headset, and the second wireless headset includes the first UWB module. Two UWB modules, when at least one of the first wireless headset and the second wireless headset is not in a wearing state, the target distance between the first wireless headset and the second wireless headset is determined by the first UWB module and the second UWB module, When the target distance is greater than the preset distance, a first prompt operation is performed, and the first prompt operation is used to prompt to find at least one earphone among the first wireless earphone and the second wireless earphone. Realize distance detection. When the distance between the earphones exceeds a certain range, an anti-lost prompt will be performed, which can prevent earphones from being lost.
在一个可能的示例中,上述程序还包括用于执行以下步骤的指令:In one possible example, the above program further includes instructions for performing the following steps:
在所述目标距离小于或等于所述预设距离,进行第二提示操作,所述第二提示操作用于提示将所述第一无线耳机和所述第二无线耳机中的至少一个耳机放回目标耳机盒。When the target distance is less than or equal to the preset distance, a second prompt operation is performed, where the second prompt operation is used to prompt to put back at least one of the first wireless headset and the second wireless headset Target headset box.
在一个可能的示例中,上述程序还包括用于执行以下步骤的指令:In one possible example, the above program further includes instructions for performing the following steps:
获取所述目标耳机盒中包含的耳机数量;Obtain the number of earphones contained in the target earphone box;
在所述耳机数量为0时,执行所述建立所述第一耳机与第二耳机之间的通信连接的步骤。When the number of earphones is 0, the step of establishing a communication connection between the first earphone and the second earphone is performed.
在一个可能的示例中,上述程序还包括用于执行以下步骤的指令:In one possible example, the above program further includes instructions for performing the following steps:
在所述第一无线耳机与所述第二无线耳机均处于佩戴状态时,休眠所述第一UWB模块,并指示所述第二无线耳机休眠所述第二UWB模块。When both the first wireless earphone and the second wireless earphone are in the wearing state, the first UWB module is hibernated, and the second wireless earphone is instructed to hibernate the second UWB module.
在一个可能的示例中,上述程序还包括用于执行以下步骤的指令:In one possible example, the above program further includes instructions for performing the following steps:
获取目标地理位置;Get the target geographic location;
按照预设的地理位置与距离阈值之间的映射关系,确定所述目标地理位置对应的所述预设距离。The preset distance corresponding to the target geographic location is determined according to the mapping relationship between the preset geographic location and the distance threshold.
在一个可能的示例中,上述程序还包括用于执行以下步骤的指令:In one possible example, the above program further includes instructions for performing the following steps:
获取由所述第一无线耳机检测到的所述第二无线耳机的第一信号强度值;obtaining a first signal strength value of the second wireless earphone detected by the first wireless earphone;
在所述第一信号强度值处于预设信号强度范围时,执行所述建立所述第一无线耳机与第二无线耳机之间的通信连接的步骤。When the first signal strength value is within a preset signal strength range, the step of establishing a communication connection between the first wireless earphone and the second wireless earphone is performed.
在一个可能的示例中,在所述获取由所述第一无线耳机检测到的所述第二无线耳机的第一信号强度值方面,上述程序包括用于执行以下步骤的指令:In a possible example, in the aspect of acquiring the first signal strength value of the second wireless earphone detected by the first wireless earphone, the above program includes instructions for performing the following steps:
获取所述第二无线耳机在预设时间段的信号强度变化曲线,所述信号强度变化曲线的横轴为时间,纵轴为信号强度值;acquiring a signal strength variation curve of the second wireless headset in a preset time period, where the horizontal axis of the signal strength variation curve is time, and the vertical axis is a signal strength value;
对所述信号强度变化曲线进行采样,得到多个信号强度值;sampling the signal strength variation curve to obtain a plurality of signal strength values;
依据所述多个信号强度值确定目标均值;determining a target mean value according to the plurality of signal strength values;
依据所述多个信号强度值进行均方差运算,得到目标均方差;performing a mean square error operation according to the plurality of signal strength values to obtain a target mean square error;
按照预设的均方差与调节系数之间的映射关系,确定所述目标均方差对应的目标调节系数;According to the preset mapping relationship between the mean square error and the adjustment coefficient, determine the target adjustment coefficient corresponding to the target mean square error;
依据所述目标调节系数对所述目标均值进行调整,得到所述第二无线耳机的第一信号强度值。The target mean value is adjusted according to the target adjustment coefficient to obtain a first signal strength value of the second wireless earphone.
上述主要从方法侧执行过程的角度对本申请实施例的方案进行了介绍。可以理解的是,无线耳机为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所提供的实施例描述的各示例的单元及算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。The foregoing mainly introduces the solutions of the embodiments of the present application from the perspective of the method-side execution process. It can be understood that, in order to realize the above functions, the wireless headset includes corresponding hardware structures and/or software modules for performing each function. Those skilled in the art should easily realize that the present application can be implemented in hardware or in the form of a combination of hardware and computer software, in combination with the units and algorithm steps of each example described in the embodiments provided herein. Whether a function is performed by hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.
本申请实施例可以根据上述方法示例对无线耳机进行功能单元的划分,例如,可以对应各个功能划分各个功能单元,也可以将两个或两个以上的功能集成在一个处理单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。需要说明的是,本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In this embodiment of the present application, the wireless headset may be divided into functional units according to the foregoing method examples. For example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units. It should be noted that the division of units in the embodiments of the present application is illustrative, and is only a logical function division, and other division methods may be used in actual implementation.
图6A是本申请实施例中所涉及的耳机控制装置600的功能单元组成框图。该耳机控制装置600,应用于第一无线耳机,所述第一无线耳机包括第一UWB模块,所述装置包括:建立单元601、确定单元602和提示单元603,具体如下:FIG. 6A is a block diagram of functional units of the
所述建立单元601,用于建立所述第一无线耳机与第二无线耳机之间的通信连接,所述第二无线耳机包括第二UWB模块;The establishing
所述确定单元602,用于在所述第一无线耳机与所述第二无线耳机中至少一个耳机未处于佩戴状态时,通过所述第一UWB模块和所述第二UWB模块确定所述第一无线耳机与所述第二无线耳机之间的目标距离;The determining
所述提示单元603,用于在所述目标距离大于预设距离,进行第一提示操作,所述第一提示操作用于提示寻找所述第一无线耳机和所述第二无线耳机中的至少一个耳机。The prompting
可以看出,在本申请实施例中所描述的耳机控制装置,应用于第一无线耳机,第一无线耳机包括第一UWB模块,建立第一无线耳机与第二无线耳机之间的通信连接,第二无线耳机包括第二UWB模块,在第一无线耳机与第二无线耳机中至少一个耳机未处于佩戴状态时,通过第一UWB模块和第二UWB模块确定第一无线耳机与第二无线耳机之间的目标距离,在目标距离大于预设距离,进行第一提示操作,第一提示操作用于提示寻找第一无线耳机和第二无线耳机中的至少一个耳机,如此,可以在耳机未处于佩戴状态下,通过UWB实现距离检测,在耳机之间的距离超过一定范围,则进行防丢提示,能够防止耳机丢失。It can be seen that the headset control device described in the embodiments of the present application is applied to the first wireless headset, and the first wireless headset includes a first UWB module to establish a communication connection between the first wireless headset and the second wireless headset, The second wireless headset includes a second UWB module, and when at least one of the first wireless headset and the second wireless headset is not in a wearing state, the first wireless headset and the second wireless headset are determined by the first UWB module and the second UWB module The target distance between the two, when the target distance is greater than the preset distance, the first prompt operation is performed, and the first prompt operation is used to prompt to find at least one of the first wireless headset and the second wireless headset. In the wearing state, distance detection is realized through UWB. When the distance between the headphones exceeds a certain range, an anti-lost prompt will be issued to prevent the loss of the headphones.
在一个可能的示例中,所述装置还用于实现如下功能:In a possible example, the apparatus is further configured to implement the following functions:
所述提示单元603,还用于在所述目标距离小于或等于所述预设距离,进行第二提示操作,所述第二提示操作用于提示将所述第一无线耳机和所述第二无线耳机中的至少一个耳机放回目标耳机盒。The prompting
在一个可能的示例中,如图6B所示,图6B为图6A所示的耳机控制装置600的又一变型结构,其与图6A相比较,还可以包括第一获取单元604,具体如下:In a possible example, as shown in FIG. 6B , FIG. 6B is another modified structure of the
所述第一获取单元604,用于获取所述目标耳机盒中包含的耳机数量;The first obtaining
由所述建立单元601在所述耳机数量为0时,执行所述建立所述第一耳机与第二耳机之间的通信连接的步骤。The step of establishing a communication connection between the first earphone and the second earphone is performed by the establishing
在一个可能的示例中,如图6C所示,图6C为图6A所示的耳机控制装置600的又一变型结构,其与图6A相比较,还可以包括休眠单元605,具体如下:In a possible example, as shown in FIG. 6C , FIG. 6C is another modified structure of the
所述休眠单元605,用于在所述第一无线耳机与所述第二无线耳机均处于佩戴状态时,休眠所述第一UWB模块,并指示所述第二无线耳机休眠所述第二UWB模块。The
在一个可能的示例中,如图6D所示,图6D为图6A所示的耳机控制装置600的又一变型结构,其与图6A相比较,还可以包括第二获取单元606,具体如下:In a possible example, as shown in FIG. 6D, FIG. 6D is another modification structure of the
所述第二获取单元606,用于获取目标地理位置;The second obtaining
所述确定单元602,还用于按照预设的地理位置与距离阈值之间的映射关系,确定所述目标地理位置对应的所述预设距离。The determining
在一个可能的示例中,如图6E所示,图6E为图6A所示的耳机控制装置600的又一变型结构,其与图6A相比较,还可以包括第三获取单元607,具体如下:In a possible example, as shown in FIG. 6E , FIG. 6E is another modified structure of the
所述第三获取单元607,用于获取由所述第一无线耳机检测到的所述第二无线耳机的第一信号强度值;The third acquiring
由所述建立单元601在所述第一信号强度值处于预设信号强度范围时,执行所述建立所述第一无线耳机与第二无线耳机之间的通信连接的步骤。The step of establishing a communication connection between the first wireless headset and the second wireless headset is performed by the establishing
在一个可能的示例中,在所述获取由所述第一无线耳机检测到的所述第二无线耳机的第一信号强度值方面,所述第三获取单元607具体用于:In a possible example, in the aspect of acquiring the first signal strength value of the second wireless earphone detected by the first wireless earphone, the third acquiring
获取所述第二无线耳机在预设时间段的信号强度变化曲线,所述信号强度变化曲线的横轴为时间,纵轴为信号强度值;acquiring a signal strength variation curve of the second wireless headset in a preset time period, where the horizontal axis of the signal strength variation curve is time, and the vertical axis is a signal strength value;
对所述信号强度变化曲线进行采样,得到多个信号强度值;sampling the signal strength variation curve to obtain a plurality of signal strength values;
依据所述多个信号强度值确定目标均值;determining a target mean value according to the plurality of signal strength values;
依据所述多个信号强度值进行均方差运算,得到目标均方差;performing a mean square error operation according to the plurality of signal strength values to obtain a target mean square error;
按照预设的均方差与调节系数之间的映射关系,确定所述目标均方差对应的目标调节系数;According to the preset mapping relationship between the mean square error and the adjustment coefficient, determine the target adjustment coefficient corresponding to the target mean square error;
依据所述目标调节系数对所述目标均值进行调整,得到所述第二无线耳机的第一信号强度值。The target mean value is adjusted according to the target adjustment coefficient to obtain a first signal strength value of the second wireless earphone.
需要注意的是,本申请实施例所描述的电子设备是以功能单元的形式呈现。这里所使用的术语“单元”应当理解为尽可能最宽的含义,用于实现各个“单元”所描述功能的对象例如可以是集成电路ASIC,单个电路,用于执行一个或多个软件或固件程序的处理器(共享的、专用的或芯片组)和存储器,组合逻辑电路,和/或提供实现上述功能的其他合适的组件。It should be noted that the electronic devices described in the embodiments of the present application are presented in the form of functional units. The term "unit" as used herein should be understood in the broadest possible sense, and the object used to implement the functions described by each "unit" may be, for example, an integrated circuit ASIC, a single circuit for executing one or more software or firmware Program processors (shared, dedicated, or chipset) and memory, combinational logic circuits, and/or other suitable components that provide the functions described above.
其中,建立单元601、确定单元602、提示单元603、第一获取单元604、休眠单元605、第二获取单元606和第三获取单元607可以是控制电路或处理器或者通信电路中的一个或者多个,基于上述单元模块能够实现上述任一方法的功能或者步骤。Wherein, the establishing
本申请实施例还提供一种计算机存储介质,其中,该计算机存储介质存储用于电子数据交换的计算机程序,该计算机程序使得计算机执行如上述方法实施例中记载的任一方法的部分或全部步骤。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 causes the computer to execute part or all of the steps of any method described in the above method embodiments .
本申请实施例还提供一种计算机程序产品,上述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,上述计算机程序可操作来使计算机执行如上述方法实施例中记载的任一方法的部分或全部步骤。该计算机程序产品可以为一个软件安装包。Embodiments of the present application further provide a computer program product, where the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute any one of the method embodiments described above. some or all of the steps of the method. The computer program product may be a software installation package.
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请所必须的。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 concurrently. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred 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 the relevant 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 device embodiments described above are only illustrative. For example, the division of the above-mentioned units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated. to 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 above as separate components may or may not be physically separated, and components shown 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 may be implemented in the form of hardware, or may be implemented in the form of software functional units.
上述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储器中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储器中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本申请各个实施例上述方法的全部或部分步骤。而前述的存储器包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。The above-mentioned integrated units, if implemented in the form of software functional units and sold or used as independent products, 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 above-mentioned methods 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.
Claims (7)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010916697.2A CN112040361B (en) | 2020-09-03 | 2020-09-03 | Earphone control method, earphone control device and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010916697.2A CN112040361B (en) | 2020-09-03 | 2020-09-03 | Earphone control method, earphone control device and storage medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN112040361A CN112040361A (en) | 2020-12-04 |
| CN112040361B true CN112040361B (en) | 2022-05-13 |
Family
ID=73591949
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202010916697.2A Active CN112040361B (en) | 2020-09-03 | 2020-09-03 | Earphone control method, earphone control device and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN112040361B (en) |
Families Citing this family (15)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112653960B (en) * | 2020-12-19 | 2023-08-29 | 深圳市锐尔觅移动通信有限公司 | Wireless earphone control method, wireless earphone control device, electronic equipment and computer storage medium |
| CN113207052B (en) * | 2021-01-28 | 2024-08-13 | 珠海市杰理科技股份有限公司 | Communication connection method and device, Bluetooth headset, communication system, and storage medium |
| US12457440B2 (en) | 2021-02-04 | 2025-10-28 | Amosense Co., Ltd. | Wireless earphones |
| CN113115179B (en) * | 2021-03-24 | 2023-03-24 | 维沃移动通信有限公司 | Working state adjusting method and device |
| CN113099357B (en) * | 2021-04-09 | 2022-11-04 | 恒玄科技(上海)股份有限公司 | Master-slave switching method and device of wireless earphone and wireless earphone |
| CN113259803B (en) * | 2021-05-13 | 2022-10-18 | 恒玄科技(上海)股份有限公司 | Wireless earphone assembly and signal processing method thereof |
| CN115474238B (en) * | 2021-06-10 | 2025-10-14 | 华为技术有限公司 | Data stream transmission method, device, communication device and storage medium |
| CN113423059B (en) * | 2021-06-21 | 2023-08-08 | 歌尔智能科技有限公司 | Equipment positioning method, device, system and readable storage medium |
| CN117651930A (en) | 2021-07-19 | 2024-03-05 | 三星电子株式会社 | Electronic device for controlling external electronic device and operating method of electronic device |
| CN116233292B (en) * | 2021-12-02 | 2025-11-25 | Oppo广东移动通信有限公司 | Measurement methods, terminal equipment, electronic equipment and readable storage media |
| CN114189794B (en) * | 2021-12-10 | 2024-03-22 | 深圳市昂思科技有限公司 | Hearing aid anti-lost method, device, electronic equipment and computer readable medium |
| CN115550828B (en) * | 2022-11-25 | 2023-04-04 | 杭州兆华电子股份有限公司 | Construction method suitable for TWS Bluetooth headset adaptation test system |
| CN116847239A (en) * | 2023-08-09 | 2023-10-03 | 青岛柯锐思德电子科技有限公司 | TWS earphone system with UWB positioning and searching functions and searching method |
| CN117041853B (en) * | 2023-08-31 | 2024-02-09 | 上海柯锐芯微电子有限公司 | Device and method for detecting and quickly retrieving loss of low-power-consumption wireless earphone |
| CN117295007B (en) * | 2023-09-21 | 2024-04-05 | 青岛柯锐思德电子科技有限公司 | Intelligent watch and TWS earphone accurate positioning system and method based on UWB |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111601209A (en) * | 2020-06-24 | 2020-08-28 | Oppo(重庆)智能科技有限公司 | Control method, control device, wireless headset and storage medium |
Family Cites Families (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8526646B2 (en) * | 2004-05-10 | 2013-09-03 | Peter V. Boesen | Communication device |
| CN201142111Y (en) * | 2007-12-24 | 2008-10-29 | 联想(北京)有限公司 | Bluetooth anti-theft device and Bluetooth earphone |
| US9980189B2 (en) * | 2015-10-20 | 2018-05-22 | Bragi GmbH | Diversity bluetooth system and method |
| CN206002688U (en) * | 2016-08-30 | 2017-03-08 | 李言飞 | A kind of distance-measuring equipment and range-measurement system |
| CN207926863U (en) * | 2018-02-27 | 2018-09-28 | 奥维通信股份有限公司 | A kind of earphone system based on UWB positioning applications |
| CN109379653B (en) * | 2018-09-30 | 2020-12-04 | Oppo广东移动通信有限公司 | Audio transmission method, device, electronic device and storage medium |
| CN210072891U (en) * | 2019-08-07 | 2020-02-14 | 超互联科技股份有限公司 | Two-way tracking system |
| CN110972063B (en) * | 2019-10-25 | 2020-12-11 | 珠海格力电器股份有限公司 | Distance measurement method, device and system and readable medium |
| CN111063170B (en) * | 2019-11-29 | 2021-12-07 | 歌尔股份有限公司 | TWS earphone loss prevention method, TWS earphone and computer readable storage medium |
| CN111586519B (en) * | 2020-05-18 | 2022-06-03 | 歌尔科技有限公司 | Wireless earphone loss alarm method and device, wireless earphone and storage medium |
-
2020
- 2020-09-03 CN CN202010916697.2A patent/CN112040361B/en active Active
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111601209A (en) * | 2020-06-24 | 2020-08-28 | Oppo(重庆)智能科技有限公司 | Control method, control device, wireless headset and storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN112040361A (en) | 2020-12-04 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN112040361B (en) | Earphone control method, earphone control device and storage medium | |
| CN110543289B (en) | Method for controlling volume and electronic equipment | |
| CN112469015B (en) | Bluetooth connection method and electronic device | |
| WO2021213164A1 (en) | Application interface interaction method, electronic device, and computer readable storage medium | |
| WO2021104104A1 (en) | Energy-efficient display processing method, and apparatus | |
| CN111555825B (en) | Radio frequency resource allocation method and device | |
| CN112087649B (en) | Equipment searching method and electronic equipment | |
| CN113177229B (en) | Data processing method and related device | |
| CN110401768A (en) | The method and apparatus for adjusting the working condition of electronic equipment | |
| CN114596819B (en) | Brightness adjusting method and related device | |
| WO2023193720A1 (en) | Control method and central control equipment | |
| CN113311380B (en) | Calibration method, device and storage medium | |
| CN114063806B (en) | Method for preventing accidental touch and electronic device | |
| CN111880661A (en) | Gesture recognition method and device | |
| CN115022982B (en) | Multi-screen cooperative non-inductive access method, electronic equipment and storage medium | |
| WO2022152174A1 (en) | Screen projection method and electronic device | |
| CN114336998A (en) | Charging control method, charging control device and storage medium | |
| WO2021129453A1 (en) | Screenshot method and related device | |
| CN114422686A (en) | Parameter adjustment method and related device | |
| CN111836226B (en) | Data transmission control method, device and storage medium | |
| CN114172282B (en) | Charging control method, device and storage medium | |
| CN115079981A (en) | Equipment control method and related device | |
| CN114244655A (en) | Signal processing method and related device | |
| CN116110363A (en) | Noise reduction method and related products | |
| CN114465852A (en) | Signal processing method and related device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |

