CN115942253A - A prompting method and related device - Google Patents
A prompting method and related device Download PDFInfo
- Publication number
- CN115942253A CN115942253A CN202310050589.5A CN202310050589A CN115942253A CN 115942253 A CN115942253 A CN 115942253A CN 202310050589 A CN202310050589 A CN 202310050589A CN 115942253 A CN115942253 A CN 115942253A
- Authority
- CN
- China
- Prior art keywords
- bluetooth peripheral
- prompt
- bluetooth
- data
- electronic device
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Telephone Function (AREA)
Abstract
Description
技术领域technical field
本申请涉及蓝牙技术领域,尤其涉及一种提示方法及相关装置。The present application relates to the technical field of bluetooth, in particular to a prompt method and a related device.
背景技术Background technique
蓝牙技术是一种支持设备短距离通讯的无线电技术,能够支持在包括智能手机、无线耳机、笔记本电脑、蓝牙音响、智能手表等众多设备之间进行无线信息交互。利用蓝牙技术能够有效地简化移动通信终端设备之间的通信。随着科学技术的发展,为了方便用户的日常使用以及携带,蓝牙外设的体积较小(例如:蓝牙耳机、智能手表等),但是由于蓝牙外设的体积较小,会经常出现蓝牙外设丢失的情况,用户很难找到蓝牙外设。Bluetooth technology is a radio technology that supports short-distance communication between devices. It can support wireless information interaction between many devices including smartphones, wireless headsets, laptops, Bluetooth speakers, and smart watches. Utilizing bluetooth technology can effectively simplify the communication between mobile communication terminal equipment. With the development of science and technology, in order to facilitate users' daily use and portability, Bluetooth peripherals are small in size (for example: Bluetooth headsets, smart watches, etc.), but due to the small size of Bluetooth peripherals, Bluetooth peripherals often appear In the case of loss, it is difficult for the user to find the Bluetooth peripheral.
当前技术中,当电子设备与蓝牙外设处于蓝牙连接状态时(其中电子设备以手机、蓝牙外设以智能手表为例),常用的提示蓝牙外设位置的方法是手机通过HFP协议(Hands-Free Profile)向智能手表发送私有AT指令,智能手表响应于私有AT指令,播放预先设置于智能手表内的特定铃声,用户可以根据智能手表播放的特定铃声,寻找丢失的智能手表。但是不同品牌的电子设备和蓝牙外设所用的私有AT指令各不相同,所以当电子设备与其他品牌的蓝牙外设处于蓝牙连接状态时,无法执行上述的提示蓝牙外设位置的方法。In the current technology, when the electronic device and the Bluetooth peripheral are in the Bluetooth connection state (the electronic device is a mobile phone, and the Bluetooth peripheral is a smart watch), the commonly used method for prompting the location of the Bluetooth peripheral is that the mobile phone passes the HFP protocol (Hands- Free Profile) sends a private AT command to the smart watch, and the smart watch responds to the private AT command to play a specific ringtone preset in the smart watch, and the user can find the lost smart watch according to the specific ringtone played by the smart watch. However, different brands of electronic devices and Bluetooth peripherals use different private AT commands, so when the electronic device is in a Bluetooth connection state with other brands of Bluetooth peripherals, the above method of prompting the location of the Bluetooth peripheral cannot be executed.
由此可见,当前常用的提示蓝牙外设位置的方法难以与第三方兼容,适配性差。It can be seen that the currently commonly used method for prompting the location of the Bluetooth peripheral is difficult to be compatible with a third party and has poor adaptability.
发明内容Contents of the invention
本申请提供的一种提示方法及相关装置,能够提高查找蓝牙外设的方法与第三方的兼容性以及适配性。The present application provides a prompting method and a related device, which can improve the compatibility and adaptability of the method for finding Bluetooth peripherals and third parties.
为达到上述目的,本申请采用如下技术方案:In order to achieve the above object, the application adopts the following technical solutions:
本申请的第一方面提供一种提示方法,该方法应用于电子设备,并且该电子设备与待查找的蓝牙外设处于蓝牙连接状态,该方法包括:获取针对蓝牙外设的查找操作,响应于针对于蓝牙外设的查找操作,与该蓝牙外设建立SCO链路,通过SCO链路向蓝牙外设发送第一提示数据,使得蓝牙外设根据接收到的第一提示数据,提示用户蓝牙外设的位置,与此同时,接收蓝牙外设通过SCO链路发送的第二提示数据,根据第二提示数据提示该蓝牙外设的位置。在保证电子设备与蓝牙外设处于蓝牙连接状态时,进行SCO链路的建立,并且基于SCO链路完成提示任务,由于SCO链路是蓝牙协议中定义的基础链路,所以该方法能够适用于不同品牌之间的电子设备和蓝牙外设,提高了与第三方的兼容性和适配性。并且SCO链路能够实现数据的实时双向传输,电子设备在向蓝牙外设发送第一提示数据的同时,可以接收蓝牙外设发送的第二提示数据,根据第二提示数据,提示蓝牙外设的位置,提高了提示蓝牙外设的位置的准确性和速度,进一步提高了查找蓝牙外设的效率。The first aspect of the present application provides a prompt method, the method is applied to an electronic device, and the electronic device is in a Bluetooth connection state with the Bluetooth peripheral device to be searched, the method includes: obtaining a search operation for the Bluetooth peripheral device, responding to For the search operation of the Bluetooth peripheral, establish a SCO link with the Bluetooth peripheral, and send the first prompt data to the Bluetooth peripheral through the SCO link, so that the Bluetooth peripheral prompts the user for the Bluetooth peripheral according to the received first prompt data. At the same time, receive the second prompt data sent by the Bluetooth peripheral through the SCO link, and prompt the location of the Bluetooth peripheral according to the second prompt data. When ensuring that the electronic device and the Bluetooth peripheral are in the Bluetooth connection state, the SCO link is established, and the prompt task is completed based on the SCO link. Since the SCO link is the basic link defined in the Bluetooth protocol, this method can be applied to Electronic devices and Bluetooth peripherals between different brands, improving compatibility and adaptability with third parties. And the SCO link can realize real-time two-way transmission of data. While sending the first prompt data to the Bluetooth peripheral, the electronic device can receive the second prompt data sent by the Bluetooth peripheral. According to the second prompt data, it can prompt the Bluetooth peripheral. Location, which improves the accuracy and speed of prompting the location of Bluetooth peripherals, and further improves the efficiency of finding Bluetooth peripherals.
在一种可能的实现方式中,第二提示数据是由蓝牙外设的麦克风采集周围环境,得到的第二实时音频数据。蓝牙外设的麦克风采集周围环境的音频数据,获取有关蓝牙外设位置的相关数据。In a possible implementation manner, the second prompt data is the second real-time audio data obtained by collecting the surrounding environment by the microphone of the Bluetooth peripheral. The microphone of the Bluetooth peripheral collects audio data of the surrounding environment to obtain relevant data about the location of the Bluetooth peripheral.
在一种可能的实现方式中,电子设备播放第二实时音频数据,从而提示用户该蓝牙外设的位置。播放第二实时音频数据,从而可以根据第二实时音频数据,确定蓝牙外设周围环境的有关信息,从而实现提示用户蓝牙外设位置的任务。In a possible implementation manner, the electronic device plays the second real-time audio data, so as to prompt the user of the location of the Bluetooth peripheral. The second real-time audio data is played, so that the relevant information of the surrounding environment of the Bluetooth peripheral can be determined according to the second real-time audio data, thereby realizing the task of prompting the user for the location of the Bluetooth peripheral.
在一种可能的实现方式中,第一提示数据是第一实时音频数据,电子设备通过SCO链路将第一实时音频数据发送给具有扬声器的蓝牙外设,蓝牙外设通过扬声器播放该第一实时音频数据,从而提示用户该蓝牙外设的位置。蓝牙外设播放电子设备获取的实时音频数据,不容受其他蓝牙外设的影响。In a possible implementation manner, the first prompt data is the first real-time audio data, and the electronic device sends the first real-time audio data to the Bluetooth peripheral with a speaker through the SCO link, and the Bluetooth peripheral plays the first real-time audio data through the speaker. Real-time audio data, thereby prompting the user the location of the Bluetooth peripheral. The Bluetooth peripheral plays the real-time audio data obtained by the electronic device and cannot be affected by other Bluetooth peripherals.
在一种可能的实现方式中,第一提示数据是预先存储在电子设备的提示音频数据,电子设备通过SCO链路将提示音频数据发送给具有扬声器的蓝牙外设,蓝牙外设通过扬声器播放提示音频数据,从而提示用户该蓝牙外设的位置。由于是存储于电子设备的提示音频数据,不会受蓝牙外设的内存大小的限制,也不会占据蓝牙外设的内存,从而影响运行速度。In a possible implementation, the first prompt data is prompt audio data pre-stored in the electronic device, the electronic device sends the prompt audio data to the Bluetooth peripheral with a speaker through the SCO link, and the Bluetooth peripheral plays the prompt through the speaker Audio data, thereby prompting the user the location of the Bluetooth peripheral. Since it is the prompt audio data stored in the electronic device, it will not be limited by the memory size of the Bluetooth peripheral, nor will it occupy the memory of the Bluetooth peripheral, thereby affecting the running speed.
在一种可能的实现方式中,第一提示数据是携带预设振动频率的振动控制数据,电子设备通过SCO链路将振动控制数据发送给具有马达的蓝牙外设,以控制蓝牙外设的马达产生预设频率的振动,从而提示用户该蓝牙外设的位置。振动提示可以适用于特殊场景,例如:会议、上课等场景,提高了方法的适用性,也提高了用户的体验感。In a possible implementation, the first prompt data is vibration control data carrying a preset vibration frequency, and the electronic device sends the vibration control data to the Bluetooth peripheral with a motor through the SCO link to control the motor of the Bluetooth peripheral Vibration at a preset frequency is generated to alert the user of the location of the Bluetooth peripheral. Vibration prompts can be applied to special scenarios, such as meetings, classes, etc., which improves the applicability of the method and improves the user experience.
在一种可能的实现方式中,第一提示数据是界面控制数据,电子设备通过SCO链路将界面控制数据发送给具有显示屏的蓝牙外设,以控制蓝牙外设的显示屏的界面显示,从而提示用户该蓝牙外设的位置。In a possible implementation manner, the first prompt data is interface control data, and the electronic device sends the interface control data to the Bluetooth peripheral with a display screen through the SCO link, so as to control the interface display of the display screen of the Bluetooth peripheral, Thus, the user is prompted for the location of the Bluetooth peripheral.
在一种可能的实现方式中,第一提示数据是灯光控制数据,电子设备通过SCO链路将灯光控制数据发送给具有闪光灯的蓝牙外设,以控制蓝牙外设的闪光灯,从而提示用户该蓝牙外设的位置。In a possible implementation, the first prompt data is light control data, and the electronic device sends the light control data to the Bluetooth peripheral with a flashlight through the SCO link to control the flashlight of the Bluetooth peripheral, thereby prompting the user that the Bluetooth The location of the peripheral.
在一种可能的实现方式中,电子设备获取结束查找操作后,与该蓝牙外设断开SCO链路。恢复初始电子设备与蓝牙外设的蓝牙连接状态,电子设备与蓝牙外设可以正常实现蓝牙数据传输,从而实现对应的功能。In a possible implementation manner, the electronic device disconnects the SCO link with the bluetooth peripheral after acquiring and finishing the search operation. The initial Bluetooth connection state between the electronic device and the Bluetooth peripheral is restored, and the electronic device and the Bluetooth peripheral can normally realize Bluetooth data transmission, thereby realizing corresponding functions.
第二方面,本申请提供了一种提示方法,应用于蓝牙外设,并且蓝牙外设与电子设备处于蓝牙连接状态,该方法包括:在电子设备响应于查找操作,与蓝牙外设建立SCO链路之后,接收电子设备通过SCO链路发送的第一提示数据,根据第一提示数据,提示用户本身的位置;与此同时,通过SCO链路,向电子设备发送第二提示数据,从而使电子设备根据第二提示数据,提示用户该蓝牙外设的位置。在保证电子设备与蓝牙外设处于蓝牙连接状态时,进行SCO链路的建立,并且基于SCO链路完成提示任务,由于SCO链路是蓝牙协议中定义的基础链路,所以该方法能够适用于不同品牌之间的电子设备和蓝牙外设,提高了与第三方的兼容性和适配性。并且SCO链路能够实现数据的实时双向传输,电子设备在向蓝牙外设发送第一提示数据的同时,可以接收蓝牙外设发送的第二提示数据,根据第二提示数据,提示蓝牙外设的位置,提高了提示蓝牙外设的位置的准确性和速度,进一步提高了查找蓝牙外设的效率。In the second aspect, the present application provides a prompt method, which is applied to Bluetooth peripherals, and the Bluetooth peripherals and electronic devices are in a Bluetooth connection state. The method includes: when the electronic device responds to the search operation, establishes a SCO chain with the Bluetooth peripherals After receiving the first reminder data sent by the electronic device through the SCO link, the user's own location is prompted according to the first reminder data; at the same time, the second reminder data is sent to the electronic device through the SCO link, so that the electronic device The device prompts the user for the location of the Bluetooth peripheral according to the second prompt data. When ensuring that the electronic device and the Bluetooth peripheral are in the Bluetooth connection state, the SCO link is established, and the prompt task is completed based on the SCO link. Since the SCO link is the basic link defined in the Bluetooth protocol, this method can be applied to Electronic devices and Bluetooth peripherals between different brands, improving compatibility and adaptability with third parties. And the SCO link can realize real-time two-way transmission of data. While sending the first prompt data to the Bluetooth peripheral, the electronic device can receive the second prompt data sent by the Bluetooth peripheral. According to the second prompt data, it can prompt the Bluetooth peripheral. Location, which improves the accuracy and speed of prompting the location of Bluetooth peripherals, and further improves the efficiency of finding Bluetooth peripherals.
在一种可能的实现方式中,第一提示数据是第一实时音频数据,蓝牙外设通过扬声器播放该第一实时音频数据,从而提示用户该蓝牙外设的位置。在保证实现提示蓝牙外设位置任务的同时,不需要占据蓝牙外设的内存,从而消除对蓝牙外设的运行速度的影响。In a possible implementation manner, the first prompt data is first real-time audio data, and the Bluetooth peripheral device plays the first real-time audio data through a speaker, thereby prompting the user of the location of the Bluetooth peripheral device. While ensuring the realization of the task of prompting the location of the Bluetooth peripheral, it does not need to occupy the memory of the Bluetooth peripheral, thereby eliminating the impact on the running speed of the Bluetooth peripheral.
在一种可能的实现方式中,第一提示数据是预先存储于电子设备的提示音频数据,蓝牙外设通过扬声器播放该提示音频数据,从而提示用户该蓝牙外设的位置。由于是存储于电子设备,不会受蓝牙外设的内存大小的限制,不需要占据蓝牙外设的内存,从而消除对蓝牙外设的运行速度的影响。In a possible implementation manner, the first prompt data is prompt audio data pre-stored in the electronic device, and the Bluetooth peripheral device plays the prompt audio data through a speaker, thereby prompting the user of the location of the Bluetooth peripheral device. Because it is stored in the electronic device, it will not be limited by the memory size of the Bluetooth peripheral, and does not need to occupy the memory of the Bluetooth peripheral, thereby eliminating the impact on the running speed of the Bluetooth peripheral.
在一种可能的实现方式中,第一提示数据是携带预设振动频率的振动控制数据,根据振动控制数据,控制蓝牙外设的马达产生预设振动频率的振动,从而提示用户该蓝牙外设的位置。振动提示可以适用于特殊场景,例如:会议、上课等场景,即保证了在特殊场景下实现提示任务,也提高了用户的体验感。In a possible implementation, the first prompt data is vibration control data carrying a preset vibration frequency. According to the vibration control data, the motor of the Bluetooth peripheral device is controlled to generate vibration with a preset vibration frequency, thereby prompting the user that the Bluetooth peripheral device s position. Vibration reminders can be applied to special scenarios, such as meetings, classes, etc., which not only ensures the realization of reminder tasks in special scenarios, but also improves the user experience.
在一种可能的实现方式中,第一提示数据是界面控制数据,蓝牙外设根据界面控制数据,控制蓝牙外设的显示器的界面显示,从而提示用户该蓝牙外设的位置。In a possible implementation manner, the first prompt data is interface control data, and the Bluetooth peripheral device controls the interface display of the display of the Bluetooth peripheral device according to the interface control data, thereby prompting the user of the location of the Bluetooth peripheral device.
在一种可能的实现方式中,第一提示数据是灯光控制数据,蓝牙外设根据灯光控制数据,控制蓝牙外设的闪光灯,从而提示用户该蓝牙外设的位置。In a possible implementation manner, the first prompt data is light control data, and the Bluetooth peripheral device controls the flash light of the Bluetooth peripheral device according to the light control data, thereby prompting the user of the location of the Bluetooth peripheral device.
在一种可能的实现方式中,第二提示数据是由蓝牙外设的麦克风采集周围环境,得到的第二实时音频数据,并通过SCO链路发送给电子设备,电子设备播放该第二实时音频数据,从而提示用户该蓝牙外设的位置。播放第二实时音频数据,从而可以根据第二实时音频数据,确定蓝牙外设周围环境的有关信息,从而实现提示用户蓝牙外设位置的任务,提高了提示蓝牙外设位置的准确性。In a possible implementation, the second prompt data is the second real-time audio data obtained by collecting the surrounding environment by the microphone of the Bluetooth peripheral, and sending it to the electronic device through the SCO link, and the electronic device plays the second real-time audio data, thereby prompting the user the location of the Bluetooth peripheral. Play the second real-time audio data, so that the relevant information of the surrounding environment of the Bluetooth peripheral can be determined according to the second real-time audio data, thereby realizing the task of prompting the user for the location of the Bluetooth peripheral, and improving the accuracy of prompting the location of the Bluetooth peripheral.
在一种可能的实现方式中,电子设备获取结束查找操作后,与该蓝牙外设断开SCO链路。恢复初始电子设备与蓝牙外设的蓝牙连接状态,电子设备与蓝牙外设可以正常实现蓝牙数据传输,从而实现对应的功能。In a possible implementation manner, the electronic device disconnects the SCO link with the bluetooth peripheral after acquiring and finishing the search operation. The initial Bluetooth connection state between the electronic device and the Bluetooth peripheral is restored, and the electronic device and the Bluetooth peripheral can normally realize Bluetooth data transmission, thereby realizing corresponding functions.
第三方面,本申请提供了一种电子设备,该电子设备包括处理器和存储器;存储器存储计算机执行指令;处理器执行存储器存储的计算机执行指令,使得处理器执行上述第一方面的方法。In a third aspect, the present application provides an electronic device, which includes a processor and a memory; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, so that the processor executes the method of the first aspect above.
第四方面,本申请提供了一种蓝牙外设,该蓝牙外设包括处理器和存储器;存储器存储计算机执行指令;处理器执行存储器存储的计算机执行指令,使得处理器执行上述第二方面的方法。In a fourth aspect, the present application provides a Bluetooth peripheral, which includes a processor and a memory; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, so that the processor executes the method of the second aspect above .
第五方面,本申请提供了一种计算机可读存储介质,计算机可读存储介质中存储有计算机程序或指令,当计算机程序或指令被运行时,实现上述第一方面、第二方面的方法。In a fifth aspect, the present application provides a computer-readable storage medium, in which a computer program or instruction is stored, and when the computer program or instruction is executed, the above-mentioned methods of the first aspect and the second aspect are implemented.
第六方面,本申请提供了一种计算机程序产品,包括计算机程序或指令,该计算机程序或指令被处理器执行时,实现上述第一方面、第二方面的方法。In a sixth aspect, the present application provides a computer program product, including a computer program or an instruction. When the computer program or instruction is executed by a processor, the methods of the first aspect and the second aspect above are implemented.
附图说明Description of drawings
图1为本申请实施例提供的一种现有的电子设备查找蓝牙外设方法的流程示意图;FIG. 1 is a schematic flow diagram of an existing method for an electronic device to find Bluetooth peripherals provided by an embodiment of the present application;
图2A为本申请实施例提供的一种电子设备的组成示例图;FIG. 2A is a composition example diagram of an electronic device provided in an embodiment of the present application;
图2B为本申请实施例提供的一种电子设备的软件结构示例图;FIG. 2B is an example diagram of a software structure of an electronic device provided in an embodiment of the present application;
图3为本申请实施例提供的一种提示方法的应用场景示意图;FIG. 3 is a schematic diagram of an application scenario of a prompt method provided by an embodiment of the present application;
图4为本申请实施例提供的一种提示方法的流程示意图;FIG. 4 is a schematic flowchart of a prompting method provided in an embodiment of the present application;
图5A为本申请实施例提供的一种电子设备的桌面界面示意图;FIG. 5A is a schematic diagram of a desktop interface of an electronic device provided in an embodiment of the present application;
图5B为本申请实施例提供的一种电子设备的查找蓝牙外设应用的界面示意图;FIG. 5B is a schematic interface diagram of an application for searching Bluetooth peripherals of an electronic device provided in an embodiment of the present application;
图6为本申请实施例提供的一种手机与蓝牙耳机处于蓝牙连接状态的场景示意图;FIG. 6 is a schematic diagram of a scene where a mobile phone and a Bluetooth headset are in a Bluetooth connection state provided by an embodiment of the present application;
图7为本申请实施例提供的又一种提示方法的流程示意图;FIG. 7 is a schematic flowchart of another prompting method provided by the embodiment of the present application;
图8为本申请实施例提供的又一种电子设备的查找蓝牙外设应用的界面示意图;FIG. 8 is a schematic diagram of an interface of another electronic device for searching a Bluetooth peripheral application provided by an embodiment of the present application;
图9为本申请实施例提供的又一种电子设备的查找蓝牙外设应用的界面示意图;FIG. 9 is a schematic diagram of an interface of another electronic device for searching a Bluetooth peripheral application provided by an embodiment of the present application;
图10为本申请实施例提供的又一种提示方法的流程示意图。FIG. 10 is a schematic flowchart of another prompting method provided by the embodiment of the present application.
具体实施方式Detailed ways
本申请说明书和权利要求书及附图说明中的术语“第一”、“第二”和“第三”等是用于区别不同对象,而不是用于限定特定顺序。The terms "first", "second" and "third" in the specification, claims and description of the drawings of this application are used to distinguish different objects, rather than to limit a specific order.
在本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。In the embodiments of the present application, words such as "exemplary" or "for example" are used as examples, illustrations or illustrations. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of the present application shall not be interpreted as being more preferred or more advantageous than other embodiments or design schemes. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete manner.
为了下述各实施例的描述清楚简洁,首先给出相关技术的简要介绍:In order to make the description of the following embodiments clear and concise, a brief introduction of related technologies is first given:
电话免提协议(Hands-Free Profile,HFP),也可以直接称为为免提协议。蓝牙外设通过HPF协议定义好的AT指令(AT command)控制电子设备,例如:接听来电、挂断通话、拒绝接听来电等。The Hands-Free Profile (HFP) can also be directly referred to as the Hands-Free Profile. The Bluetooth peripheral controls the electronic device through the AT command (AT command) defined by the HPF protocol, such as: answering the call, hanging up the call, refusing to answer the call, etc.
AT(attention)指令。AT指令是指蓝牙通信协议中使用的控制命令。例如,可以预先设置私有AT指令,用于指示智能手表播放预存的特定铃声。AT (attention) command. AT commands refer to the control commands used in the Bluetooth communication protocol. For example, private AT commands can be pre-set to instruct the smart watch to play a pre-stored specific ringtone.
面向连接的异步传输链路(Asynchronous Connection less,ACL链路)是蓝牙的基本连接技术,一般用于传输连接类的协商信令,用于保持蓝牙连接。ACL链路还支持单向传输音频数据。例如:当手机可以通过ACL链路向蓝牙耳机发送音频数据时,蓝牙耳机无法同时向手机发送音频数据。The connection-oriented asynchronous transmission link (Asynchronous Connection less, ACL link) is the basic connection technology of Bluetooth, which is generally used to transmit connection negotiation signaling and maintain Bluetooth connection. ACL links also support unidirectional transmission of audio data. For example: when the mobile phone can send audio data to the Bluetooth headset through the ACL link, the Bluetooth headset cannot send audio data to the mobile phone at the same time.
面向连接的同步传输链路(Synchronous Connection Oriented,SCO链路)是蓝牙基带支持的连接技术,利用保留时隙传输数据。SCO链路支持双向传输音频数据。例如:当手机通过SCO链路向蓝牙耳机发送音频数据时,蓝牙耳机也可以通过该SCO链路向手机发送音频数据。The connection-oriented synchronous transmission link (Synchronous Connection Oriented, SCO link) is a connection technology supported by the Bluetooth baseband, which uses reserved time slots to transmit data. The SCO link supports bidirectional transmission of audio data. For example: when the mobile phone sends audio data to the Bluetooth headset through the SCO link, the Bluetooth headset can also send audio data to the mobile phone through the SCO link.
进一步,SCO链路具体包括:基础的SCO链路和扩展的SCO链路(ExtendedSynchronous Connection-Oriented,eSCO链路)。eSCO链路利用保留时隙传输数据,设置有重新发送窗口,利用重新发送窗口可以对数据进行重传。eSCO链路同样支持双向传输音频数据。Further, the SCO link specifically includes: a basic SCO link and an extended SCO link (Extended Synchronous Connection-Oriented, eSCO link). The eSCO link uses reserved time slots to transmit data, and a resend window is set, and data can be retransmitted using the resend window. The eSCO link also supports bidirectional transmission of audio data.
下面结合当前已有的提示蓝牙外设位置的方法,对比说明一下本申请提供的一种提示方法的优势。The advantages of the prompting method provided by the present application will be compared and described below in combination with the currently existing methods for prompting the location of the Bluetooth peripheral.
为了方便理解,下面结合图1详细介绍一下当前已有的提示蓝牙外设的方法。下面电子设备以手机10为例、蓝牙外设以智能手表20为例进行说明,其中手机10与智能手表20为同品牌设备,并且预先设置过用于提示智能手表20所处位置的私有AT指令的情况下。For the convenience of understanding, the current existing methods for prompting Bluetooth peripherals will be introduced in detail below in conjunction with FIG. 1 . The following electronic devices are illustrated by taking the
首先,需要保证手机10和智能手表20处于蓝牙连接状态,即手机10和智能手表20的ACL链路处于连接状态。在手机10和智能手表20处于蓝牙连接状态下,用户进行查找智能手表20(蓝牙外设)的操作,例如:用户点击手机10的桌面上特定的查找蓝牙外设应用的图标。手机10响应于用户的操作,通过HFP协议(也可以说是通过ACL链路)向智能手机20发送私有AT指令,智能手表20响应于该私有AT指令,播放预先设置于智能手表内的特定铃声,与此同时,智能手表20响应于私有AT指令,向手机10返回对于私有AT指令的答复信息。用户可以根据智能手表20播放的特定铃声,提示用户智能手表20的位置,从而进行智能手表20的查找。First, it is necessary to ensure that the
上述方法中的私有AT指令,是针对手机10和智能手表20预先设置的,例如:手机10和智能手表20预先设置私有AT指令A作为手机10查找智能手表20的私有AT指令;手机11和智能手表21预先设置私有AT指令B作为手机11查找智能手表21的私有AT指令,若手机11向智能手表21发送私有AT指令A,就无法实现查找蓝牙外设(智能手表20)的目的;若手机10向智能手表21发送私有AT指令A或私有AT指令B,都无法实现查找蓝牙外设(智能手表21)的目的。私有AT指令对于不同品牌/不同设备都是特有的,私有AT指令的无法适配所有蓝牙外设,导致当前已有的电子设备查找蓝牙外设的方法的适配性较低,会导致许多电子设备、蓝牙外设无法使用该查找功能,没有办法解决蓝牙外设丢失问题。The private AT command in the above method is preset for the
进一步,上述方法中,智能手表20响应于私有AT指令,播放预先设置于智能手表20内的特定铃声,提示用户智能手表20位置的方式过于单一,例如:在智能手表20内预先设置了特定铃声,那么智能手表20响应于私有AT指令,就播放预先设置的特定铃声;在智能手表20内预先设置的特定振动频率,那么智能手表20响应于私有AT指令,就产生预先设置的特定振动频率的振动。Further, in the above method, the
虽然说可以在智能手表20内预先设置多首铃声,可以对预先设置的多首铃声循环播放,但是这些特定铃声、特定振动的数据都是存储在蓝牙外设(智能手表20)内的,蓝牙外设的存储空间有限,也会限制提示用户蓝牙外设位置的方式。当蓝牙外设为智能手表时,智能手表的存储空间一般为1-2G,智能手表的存储空间会限制预设铃声的数量,会限制提示用户智能手表位置的方式的数量;若在智能手表内预设多个铃声的话,还会占据智能手表的一部分存储空间,甚至还会影响智能手表的运行速度。当蓝牙外设为蓝牙耳机时,具有存储功能的蓝牙耳机的存储空间也是有限的,也会限制存储预设铃声的数量,使得提示用户蓝牙外设位置的方式收到限制。进一步,在日常生活中常用的蓝牙耳机一般不具有存储功能,对于不具有存储功能的蓝牙耳机,上述方法根本无法实现,进一步体现了当前常见的提示蓝牙外设位置方法的局限性,不能完全适配,适配性低。Although multiple ring tones can be pre-set in the
本申请提供一种提示方法,该方法包括:在电子设备与蓝牙外设处于蓝牙连接的状态下,响应于用户针对蓝牙外设的查找操作,电子设备和蓝牙外设建立SCO链路,电子设备通过SCO链路向蓝牙外设发送第一提示数据,蓝牙外设接收到第一提示数据后,根据第一提示数据,提示用户蓝牙外设的位置,与此同时,蓝牙外设通过SCO链路向电子设备发送第二提示数据,电子设备根据第二提示数据,提示用户蓝牙外设的位置。在保证电子设备与蓝牙外设处于蓝牙连接状态时,进行SCO链路的建立,并且基于SCO链路完成提示任务,由于SCO链路是蓝牙协议中定义的基础链路,所以该方法能够适用于不同品牌之间的电子设备和蓝牙外设,提高了与第三方的兼容性和适配性。The present application provides a prompt method, which includes: when the electronic device and the Bluetooth peripheral are in the state of Bluetooth connection, in response to the user's search operation for the Bluetooth peripheral, the electronic device and the Bluetooth peripheral establish an SCO link, and the electronic device Send the first prompt data to the Bluetooth peripheral through the SCO link. After receiving the first prompt data, the Bluetooth peripheral will prompt the user for the location of the Bluetooth peripheral according to the first prompt data. At the same time, the Bluetooth peripheral will pass the SCO link. The second prompt data is sent to the electronic device, and the electronic device prompts the user for the location of the Bluetooth peripheral device according to the second prompt data. When ensuring that the electronic device and the Bluetooth peripheral are in the Bluetooth connection state, the SCO link is established, and the prompt task is completed based on the SCO link. Since the SCO link is the basic link defined in the Bluetooth protocol, this method can be applied to Electronic devices and Bluetooth peripherals between different brands, improving compatibility and adaptability with third parties.
进一步,SCO链路能够实现数据的实时双向传输,电子设备在向蓝牙外设发送第一提示数据的同时,可以接收蓝牙外设发送的第二提示数据,根据第二提示数据,提示蓝牙外设的位置,提高了提示蓝牙外设的位置的准确性和速度,进一步提高了查找蓝牙外设的效率。Further, the SCO link can realize real-time two-way transmission of data. When the electronic device sends the first prompt data to the Bluetooth peripheral, it can also receive the second prompt data sent by the Bluetooth peripheral, and prompt the Bluetooth peripheral according to the second prompt data. location, which improves the accuracy and speed of prompting the location of the Bluetooth peripheral, and further improves the efficiency of finding the Bluetooth peripheral.
进一步,电子设备侧的存储空间相对较大,通过SCO链路可以将存储在电子设备侧的数据传输给蓝牙外设,从而实现提示任务,所以不会收到蓝牙外设侧的存储空间的限制,不会影响到蓝牙外设的运行速度;并且电子设备侧的存储空间较大,在不影响运行速度的同时,仍然可以存储多种模式的数据,从而实现提示的多样性。Furthermore, the storage space on the side of the electronic device is relatively large, and the data stored on the side of the electronic device can be transmitted to the Bluetooth peripheral through the SCO link, so as to realize the reminder task, so it will not be limited by the storage space on the side of the Bluetooth peripheral , will not affect the running speed of the Bluetooth peripheral; and the storage space on the side of the electronic device is large, without affecting the running speed, it can still store data in multiple modes, so as to realize the diversity of prompts.
在一些实施例中,电子设备可以是手机、平板电脑、桌面型、膝上型、笔记本电脑、超级移动个人计算机(Ultra-mobile Personal Computer,UMPC)、手持计算机、上网本、个人数字助理(Personal Digital Assistant,PDA)、可穿戴电子设备、智能手表等设备,本申请对上述电子设备的具体形式不做特殊限制。在本实施例中,电子设备的结构可以如图2A所示,图2A为本申请实施例提供的一种电子设备的结构示意图。In some embodiments, the electronic device may be a cell phone, tablet computer, desktop, laptop, notebook computer, Ultra-mobile Personal Computer (UMPC), handheld computer, netbook, personal digital assistant (Personal Digital Assistant) Assistant, PDA), wearable electronic devices, smart watches and other devices, this application does not make special restrictions on the specific forms of the above electronic devices. In this embodiment, the structure of the electronic device may be as shown in FIG. 2A , and FIG. 2A is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
如图2A所示,电子设备可以包括处理器110,天线1,无线通信模块120,显示屏130,内部存储器140,触摸传感器150,按键160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,马达180等。As shown in Figure 2A, the electronic device may include a
可以理解的是,本实施例示意的结构并不构成对电子设备的具体限定。在另一些实施例中,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It should be understood that the structure shown in this embodiment does not constitute a specific limitation on the electronic device. In other embodiments, the electronic device may include more or fewer components than shown, or combine certain components, or separate certain components, or arrange different components. The illustrated components can be realized in hardware, software or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processingunit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。例如,在本申请中,可以获取针对与蓝牙外设的查找操作,基于查找操作,与带查找的蓝牙外设建立SCO链路,从而实现后续数据的实时双向传输。The
其中,控制器可以是电子设备的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。Wherein, the controller may be the nerve center and command center of the electronic equipment. The controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in the
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuitsound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purposeinput/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments,
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器150,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器150,使处理器110与触摸传感器150通过I2C总线接口通信,实现电子设备的触摸功能。The I2C interface is a bidirectional synchronous serial bus, including a serial data line (serial data line, SDA) and a serial clock line (derail clock line, SCL). In some embodiments,
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块120传递音频信号,实现通过蓝牙耳机接听电话的功能。The I2S interface can be used for audio communication. In some embodiments,
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块120可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块120传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。The PCM interface can also be used for audio communication, sampling, quantizing and encoding the analog signal. In some embodiments, the
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块120。例如:处理器110通过UART接口与无线通信模块120中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块120传递音频信号,实现通过蓝牙耳机播放音乐的功能。The UART interface is a universal serial data bus used for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is generally used to connect the
MIPI接口可以被用于连接处理器110与显示屏130等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serialinterface,DSI)等。在一些实施例中,处理器110和显示屏130通过DSI接口通信,实现电子设备的显示功能。The MIPI interface can be used to connect peripheral devices such as the
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏130,无线通信模块120,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the
电子设备的无线通信功能可以通过天线1,无线通信模块120,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device can be realized by the antenna 1, the
天线1用于发射和接收电磁波信号。电子设备中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。Antenna 1 is used for transmitting and receiving electromagnetic wave signals. Each antenna in an electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
无线通信模块120可以提供应用在电子设备上的包括无线局域网(wirelesslocal area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块120可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块120经由天线1接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块120还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线1转为电磁波辐射出去。The
在一些实施例中,天线1和无线通信模块120耦合,使得电子设备可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(globalsystem for mobile communications,GSM),通用分组无线服务(general packet radioservice,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-divisioncode division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC ,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(globalpositioning system ,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite basedaugmentation systems,SBAS)。In some embodiments, the antenna 1 is coupled with the
电子设备通过GPU,显示屏130,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏130和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device realizes the display function through the GPU, the display screen 130 , and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 130 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
显示屏130用于显示图像,视频等。显示屏130包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emittingdiode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrixorganic light emitting diode的,AMOLED),柔性发光二极管(flex light-emittingdiode,FLED),Miniled,MicroLed,Micro-oled,量子点发光二极管(quantum dot lightemitting diodes,QLED)等。在一些实施例中,电子设备可以包括1个或N个显示屏130,N为大于1的正整数。The display screen 130 is used to display images, videos and the like. The display screen 130 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-matrixorganic light-emitting diode) AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oled, quantum dot light-emitting diodes (quantum dot light emitting diodes, QLED), etc. In some embodiments, the electronic device may include 1 or N display screens 130, where N is a positive integer greater than 1.
电子设备的显示屏130上可以显示一系列图形用户界面(graphical userinterface,GUI),这些GUI都是该电子设备的主屏幕。一般来说,电子设备的显示屏130的尺寸是固定的,只能在该电子设备的显示屏130中显示有限的控件。控件是一种GUI元素,它是一种软件组件,包含在应用程序中,控制着该应用程序处理的所有数据以及关于这些数据的交互操作,用户可以通过直接操作(direct manipulation)来与控件交互,从而对应用程序的有关信息进行读取或者编辑。一般而言,控件可以包括图标、按钮、菜单、选项卡、文本框、对话框、状态栏、导航栏、Widget、选择弹窗等可视的界面元素。A series of graphical user interfaces (graphical user interface, GUI) can be displayed on the display screen 130 of the electronic device, and these GUIs are the main screen of the electronic device. Generally, the size of the display screen 130 of the electronic device is fixed, and only limited controls can be displayed on the display screen 130 of the electronic device. A control is a GUI element, which is a software component contained in an application that controls all data processed by the application and the interaction of these data. Users can interact with the control through direct manipulation. , so as to read or edit the relevant information of the application. Generally speaking, controls can include visual interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, and selection pop-up windows.
内部存储器140可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器140的指令,从而执行电子设备的各种功能应用以及数据处理。例如,在本实施例中,处理器110可以通过执行存储在内部存储器140中的指令,实现与蓝牙外设建立双向定向连接链路,从而实现音频数据的双向传输。内部存储器140可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器140可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器140的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备的各种功能应用以及数据处理。
电子设备可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device can implement audio functions through the
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。The
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备可以通过扬声器170A收听音乐,或收听免提通话。Speaker 170A, also referred to as a "horn", is used to convert audio electrical signals into sound signals. The electronic device can listen to music through speaker 170A, or listen to hands-free calls.
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备可以设置至少一个麦克风170C。在另一些实施例中,电子设备可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。The microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can put his mouth close to the microphone 170C to make a sound, and input the sound signal to the microphone 170C. The electronic device may be provided with at least one microphone 170C. In other embodiments, the electronic device can be provided with two microphones 170C, which can also implement a noise reduction function in addition to collecting sound signals. In some other embodiments, the electronic device can also be equipped with three, four or more microphones 170C to realize sound signal collection, noise reduction, identify sound sources, and realize directional recording functions, etc.
触摸传感器150,也称“触控器件”。触摸传感器150可以设置于显示屏130,由触摸传感器150与显示屏130组成触摸屏,也称“触控屏”。触摸传感器150用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏130提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器150也可以设置于电子设备的表面,与显示屏130所处的位置不同。The
按键160包括开机键,音量键等。按键160可以是机械按键。也可以是触摸式按键。电子设备可以接收按键输入,产生与电子设备的用户设置以及功能控制有关的键信号输入。The keys 160 include a power key, a volume key and the like. The key 160 may be a mechanical key. It can also be a touch button. The electronic device can receive key input and generate key signal input related to user settings and function control of the electronic device.
马达180可以产生振动提示。马达180可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏130不同区域的触摸操作,马达180也可对应不同的振动反馈效果。例如:基于携带振动频率的数据,电子设备产生对应频率的振动。触摸振动反馈效果还可以支持自定义。The motor 180 can generate a vibrating alert. The motor 180 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations applied to different applications (such as taking pictures, playing audio, etc.) may correspond to different vibration feedback effects. The motor 180 may also correspond to different vibration feedback effects for touch operations acting on different areas of the display screen 130 . For example: based on the data carrying the vibration frequency, the electronic device generates vibration of the corresponding frequency. The touch vibration feedback effect can also support customization.
另外,在上述部件之上,运行有操作系统。例如苹果公司所开发的iOS操作系统,谷歌公司所开发的Android开源操作系统,微软公司所开发的Windows操作系统等。在该操作系统上可以安装运行应用程序。In addition, an operating system runs on top of the above components. For example, the iOS operating system developed by Apple, the Android open source operating system developed by Google, and the Windows operating system developed by Microsoft. Applications can be installed and run on this operating system.
电子设备的操作系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构的Android系统为例,示例性说明电子设备的软件结构。The operating system of the electronic device may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. In this embodiment of the present application, the Android system with layered architecture is taken as an example to illustrate the software structure of the electronic device.
图2B是本申请实施例的电子设备的软件结构框图。FIG. 2B is a block diagram of the software structure of the electronic device according to the embodiment of the present application.
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate through software interfaces. In some embodiments, the Android system is divided into four layers, which are respectively the application program layer, the application program framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer from top to bottom.
应用程序层可以包括一系列应用程序包。如图2B所示,应用程序包可以包括查找蓝牙外设,通话,蓝牙,音乐,视频,短信息等应用程序。The application layer can consist of a series of application packages. As shown in FIG. 2B, the application package may include application programs such as finding Bluetooth peripherals, calling, Bluetooth, music, video, and short message.
应用程序框架层为应用程序层的应用程序提供应用编程接口(applicationprogramming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。如图2B所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。The application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions. As shown in FIG. 2B, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, 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, capture the screen, etc.
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。Content providers are used to store and retrieve data and make it accessible to applications. Said data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebook, etc.
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. The view system can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.
电话管理器用于提供电子设备的通信功能。例如通话状态的管理(包括接通,挂断等)。The phone manager is used to provide communication functions of electronic devices. For example, the management of call status (including connected, hung up, etc.).
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提示等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。The notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and can automatically disappear after a short stay without user interaction. For example, the notification manager is used to notify download completion, message prompts, etc. The notification manager can also be a notification that appears on the top status bar of the system in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, prompting text information in the status bar, issuing a prompt sound, vibrating the electronic device, and flashing the indicator light, etc.
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。Android Runtime includes core library and 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 part is the function function that the java language needs to call, and the other part 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 program layer and the application program framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。A system library can include multiple function 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 the 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 various commonly used audio and video formats, as well as still image files, etc. 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, etc.
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 includes at least a display driver, a camera driver, an audio driver, and a sensor driver.
需要说明的是,本申请实施例虽然以Android系统为例进行说明,但是其基本原理同样适用于基于iOS、Windows等操作系统的电子设备。It should be noted that although the embodiment of the present application uses the Android system as an example for illustration, its basic principles are also applicable to electronic devices based on operating systems such as iOS and Windows.
下面结合具体的实施例对本申请实施例提供的一种查找蓝牙外设方法进行说明。下面这几个实施例可以相互结合,对于想用或相似的概念或过程可能在某些实施例不再赘述。A method for finding Bluetooth peripherals provided by the embodiments of the present application will be described below in conjunction with specific embodiments. The following several embodiments may be combined with each other, and the necessary or similar concepts or processes may not be repeated in some embodiments.
实施例一:Embodiment one:
下面结合图3-图6,详细介绍本申请实施例介绍的一种提示方法。A prompting method introduced in the embodiment of the present application will be described in detail below with reference to FIGS. 3-6 .
如图3所示的本申请实施例提供的一种提示方法的应用场景示意图,该场景包括:电子设备100、蓝牙外设200以及不透明材质杯状物体300,电子设备100与蓝牙外设200处于蓝牙连接状态,也可以说是电子设备100与蓝牙外设200建立ACL链路,并且保持ACL链路处于连接状态。蓝牙外设200被放置在不透明材质杯状物体300内,没有办法显而易见地被用户察觉蓝牙外设200当前所处的位置。其中电子设备100以手机为例,蓝牙外设200以智能手表为例。As shown in FIG. 3 , a schematic diagram of an application scenario of a prompt method provided by an embodiment of the present application, the scenario includes: an
需要说明的是,仅仅以图3所述的一种提示方式的使用场景为例进行说明,在实际场景中,蓝牙外设也可以暴露在用户的视野范围内,但是用户并没有注意到蓝牙外设的位置,所以无法找到蓝牙设备,在本申请中不做具体限定。It should be noted that only the use scenario of a prompt method described in Figure 3 is used as an example for illustration. In actual scenarios, the Bluetooth peripheral can also be exposed within the user's field of vision, but the user does not notice that the Bluetooth peripheral The location set, so the Bluetooth device cannot be found, which is not specifically limited in this application.
在如图3所示的一种提示方法的使用场景下,用户在电子设备100端进行针对该蓝牙外设的查找操作,电子设备100预设的查找应用/服务调用蓝牙模块,建立与蓝牙外设200之间的SCO通道,电子设备100配置自身的收声、出声调整,进入透传模式,在透传模式下,电子设备100采集得到第一实时音频数据,将所采集到的第一实时音频数据发送给蓝牙外设200,蓝牙外设200对接收到的第一实时音频数据进行播放,从而提示蓝牙外设200的位置;在电子设备100采集第一实时音频数据的同时,蓝牙外设200也采集得到第二实时音频数据,将第二实时音频数据通过SCO链路发送给电子设备100,电子设备100播放该第二实时音频数据,从而提示蓝牙外设200的位置。具体步骤结合图4做具体说明,该方法包括:In the use scenario of a prompt method as shown in FIG. 3 , the user performs a search operation for the Bluetooth peripheral on the
S401、用户进行查找操作。S401. The user performs a search operation.
其中,查找操作是用于启动电子设备100查找蓝牙外设200的操作。Wherein, the search operation is an operation for starting the
为了方便理解,下面结合图5A-图5B所示的电子设备100的界面图对用户进行查找操作进行详细说明。For the convenience of understanding, the search operation performed by the user will be described in detail below in conjunction with the interface diagram of the
如图5A所示的电子设备100的桌面界面图,用户为电子设备100解锁后,电子设备100可以向用户呈现桌面界面500,该桌面界面500包括多种应用程序的图标,例如,电话图标、联系人图标、互联网图标、短信图标、查找蓝牙外设应用的图标510等。用户可以对应用的图标触发操作,例如点击、长按、滑动等。电子设备接收到用户触发的操作后,启动相应的应用。用户点击电子设备100的桌面界面500上的查找蓝牙外设应用的图标510,则进入查找蓝牙外设应用界面520,查找蓝牙外设应用界面520包括开始查找图标521、结束查找图标522等。用户点击电子设备100的查找蓝牙外设应用界面520上的开始查找图标521,则会启动电子设备100查找蓝牙外设200的任务。用户点击开始查找图标510为查找操作。其中,查找蓝牙外设应用是对预先设置的用于进行查找蓝牙外设的应用的统称,在本申请实施例中不做具体限定。As shown in FIG. 5A , the desktop interface diagram of the
需要说明的是,查找操作可以是点击开始查找的图标,也可以是双击蓝牙设置的图标,只要是预设的用于启动查找蓝牙外设任务的操作即可,在本申请实施例中不做具体限定。It should be noted that the search operation can be clicking the icon to start searching, or double-clicking the icon of Bluetooth settings, as long as it is a preset operation for starting the task of searching for Bluetooth peripherals, it is not done in the embodiment of this application. Specific limits.
S402、电子设备100响应于查找操作,电子设备100与蓝牙外设200建立SCO链路。S402. The
其中,面向连接的同步传输链路是蓝牙协议中定义的传输链路。SCO链路支持实时双向传输数据,所以电子设备100可以通过SCO链路向蓝牙外设200实时传输数据,与此同时,蓝牙外设200也可以通过SCO链路向电子设备100实时传输数据。Wherein, the connection-oriented synchronous transmission link is a transmission link defined in the Bluetooth protocol. The SCO link supports real-time two-way data transmission, so the
具体的,面向连接的同步传输链路(SCO链路)包括基本的SCO链路和扩展的面向连接的同步链路(eSCO链路)。Specifically, a connection-oriented synchronous transmission link (SCO link) includes a basic SCO link and an extended connection-oriented synchronous link (eSCO link).
为了方便理解,下面详细介绍一下电子设备100与蓝牙外设200建立SCO链路的过程。For the convenience of understanding, the process of establishing the SCO link between the
电子设备100向蓝牙外设200发送建立SCO链路的请求;蓝牙外设200接收到电子设备100发送的建立SCO链路的请求,向电子设备100返回响应信息;电子设备100和蓝牙外设200完成SCO链路的建立。The
S403、电子设备100对配置本身的收声和出声的状态。S403. The
具体的,电子设备100配置后的本身的收声状态为:电子设备100通过麦克风采集得到的音频数据,通过同步定向连接链路直接发送给蓝牙外设200。电子设备配置后的本身的出声状态为电子设备100通过喇叭直接播放蓝牙外设200发送的音频数据,其中蓝牙外设200通过麦克风采集得到音频数据,通过同步定向连接链路直接发送给电子设备100。Specifically, the sound receiving state of the
具体的,配置电子设备100的收声和出声的状态,使得电子设备处于语音透传模式。Specifically, the
具体的,在语音透传模式下,电子设备100获取预先规定的音频数据(例如:预先设置的音乐、当前所处环境的音频等),电子设备100将获取的音频数据发送至蓝牙外设200,蓝牙外设200直接播放电子设备100发送的音频数据;蓝牙外设200通过麦克风采集蓝牙外设200周围的音频数据,并发送给电子设备100,电子设备100直接播放蓝牙外设200发送的音频数据。Specifically, in the voice transparent transmission mode, the
为了方便理解,下面结合图6对步骤403进行举例说明。For the convenience of understanding, step 403 will be illustrated below with reference to FIG. 6 .
图6为本申请实施例提供的一种手机与蓝牙耳机处于蓝牙连接状态的场景示意图。其中手机10与蓝牙耳机30处于蓝牙连接状态,一般情况下,手机10的麦克风不对周围环境的音频数据进行采集,第一手机10的喇叭也不会播放云端/其他设备发送音频数据。例如:手机10和蓝牙耳机30实现录音功能。需要蓝牙耳机30通过蓝牙耳机30的麦克风对周围环境的音频数据进行采集,蓝牙耳机30将采集到的音频数据发送给手机10,手机10将该音频数据进行存储(可以存储在云端服务器中,也可以存储在手机10本身的存储空间),手机10不会接收到音频数据就播放该音频数据,若手机10对该音频数据进行播放,从存储空间/云端服务器中获取该音频数据,然后将该音频数据传输到蓝牙耳机30,蓝牙耳机30通过喇叭播放该音频数据。FIG. 6 is a schematic diagram of a scenario in which a mobile phone and a Bluetooth headset are in a Bluetooth connection state according to an embodiment of the present application. Wherein the
在手机10与蓝牙耳机30建立了SCO链路后,手机10对本身的收声和出声的状态进行了配置,配置后的收声和出声的状态为:蓝牙耳机30通过麦克风采集到的音频数据发送给手机10,手机10接收到该音频数据后,手机10直接通过喇叭播放该音频数据;手机10通过麦克风采集到的音频数据,直接发送给蓝牙耳机30,蓝牙耳机30通过喇叭/扬声器播放该音频数据。After the
S404、电子设备100通过麦克风采集得到第一实时音频数据。S404. The
通过步骤403对于电子设备100的收音状态的配置,电子设备100可以通过麦克风进行收声处理,也就是可以通过电子设备100本身的麦克风对周围环境的实时音频数据进行采集,从而得到第一实时音频数据。Through step 403 for the configuration of the sound collection state of the
S405、电子设备100通过SCO链路,将采集得到的第一实时音频数据发送给蓝牙外设200。S405. The
具体的,在语音透传模式下,电子设备100通过SCO链路(eSCO链路)将获得的第一实时音频数据传输给蓝牙外设200。Specifically, in the voice transparent transmission mode, the
S406、蓝牙外设200播放该第一实时音频数据。S406. The Bluetooth peripheral 200 plays the first real-time audio data.
具体的,当蓝牙外设200接收到电子设备100发送的第一实时音频数据时,蓝牙外设200直接通过喇叭(扬声器)播放该音频数据,以提示用户蓝牙外设200当前所在的位置。Specifically, when the Bluetooth peripheral 200 receives the first real-time audio data sent by the
用户可以根据蓝牙外设200播放的第一实时音频数据,提示用户蓝牙外设200当前所在的位置,进一步实现查找蓝牙外设200的目的。电子设备100通过SCO链路,直接将所获得的第一实时音频数据发送给蓝牙外设200,蓝牙外设200直接播放该音频数据。According to the first real-time audio data played by the Bluetooth peripheral 200 , the user can be reminded of the current location of the Bluetooth peripheral 200 , so as to further realize the purpose of searching the Bluetooth peripheral 200 . The
进一步,不需要在蓝牙外设200中存储预设的音频数据,即可实现蓝牙外设200播放第一实时音频数据,以提示蓝牙外设200当前位置,避免了当前已有方法中在蓝牙外设内存储预设的音频数据,占据蓝牙外设的内存,进而影响蓝牙外设的运行速度。Further, without storing preset audio data in the Bluetooth peripheral 200, the Bluetooth peripheral 200 can play the first real-time audio data to prompt the current location of the Bluetooth peripheral 200. The preset audio data is stored in the device, occupying the memory of the Bluetooth peripheral, and then affecting the running speed of the Bluetooth peripheral.
S407、蓝牙外设200通过麦克风采集得到第二实时音频数据。S407. The Bluetooth peripheral 200 collects the second real-time audio data through the microphone.
蓝牙外设200在与电子设备100处于蓝牙连接状态,在处理特定的业务/实现特定的功能时,蓝牙外设200本身就可以采集周围环境的音频数据,从而得到第二实时音频数据,例如:电子设备A与电子设备B在进行语音通话,蓝牙耳机C与电子设备A处于蓝牙连接状态,蓝牙耳机C通过麦克风采集周围环境音以及用户的语音等第二实时音频数据,将音频数据传输给电子设备A,以便于电子设备A通过蓝牙耳机C实现与电子设备B的语音通话。When the Bluetooth peripheral 200 is in the Bluetooth connection state with the
具体的,电子设备100与蓝牙外设200处于蓝牙连接状态,当进行查找蓝牙外设的业务时,蓝牙外设200可以直接通过麦克风采集得到第二音频数据。Specifically, the
S408、蓝牙外设200通过SCO链路,将第二实时音频数据发送给电子设备100。S408. The Bluetooth peripheral 200 sends the second real-time audio data to the
具体的,在语音透传模式下,蓝牙外设200通过SCO链路(eSCO)链路将第二实时音频数据传输给电子设备100。Specifically, in the voice transparent transmission mode, the Bluetooth peripheral 200 transmits the second real-time audio data to the
需要说明的是,电子设备100通过麦克风采集得到第一实时音频数据,并通过SCO链路将电子设备100采集得到的第一实时音频数据发送给蓝牙外设200,和蓝牙外设200通过麦克风采集得到第二实时音频数据,并通过SCO链路将蓝牙外设200采集得到的第二实时音频数据发送给电子设备,可以同时进行,没有特定的先后顺序,相关步骤的标号只是为了方便实施例的描述,并不对顺序做具体限定。It should be noted that the
S409、电子设备100播放蓝牙外设200发送的第二实时音频数据。S409. The
具体的,在语音透传模式下,电子设备100接收到蓝牙外设200第二实时音频数据时,电子设备100直接播放第二实时音频数据。Specifically, in the voice transparent transmission mode, when the
用户可以根据蓝牙外设200通过麦克风采集周围环境,从而得到与周围环境有关的第二实时音频数据,提示用户蓝牙外设200所处的位置,进一步辅助确认蓝牙外设200当前所处的位置。例如:当蓝牙耳机被用户不小心放到平时所休息的床上,并且被被子盖住,此时在进行查找蓝牙外设任务时,用户也会进行一些查找动作(比如:走路、拿起障碍物、放下障碍物等),也会产生对应的声音,蓝牙耳机可以采集到对应的第二实时音频数据发送给电子设备,电子设备立即播放该第二实时音频数据,可以根据第二实时音频数据的特性,辅助提示蓝牙耳机的位置。进一步,提高了查找蓝牙外设的效率以及准确性。The user can collect the surrounding environment through the microphone according to the Bluetooth peripheral 200, so as to obtain the second real-time audio data related to the surrounding environment, remind the user of the location of the Bluetooth peripheral 200, and further assist in confirming the current location of the Bluetooth peripheral 200. For example: when the Bluetooth headset is accidentally placed on the bed where the user usually rests and is covered by a quilt, the user will also perform some search actions (such as walking, picking up obstacles, etc.) when performing the task of searching for Bluetooth peripherals , put down obstacles, etc.), will also produce corresponding sound, the Bluetooth headset can collect the corresponding second real-time audio data and send it to the electronic device, and the electronic device will immediately play the second real-time audio data, and can according to the second real-time audio data Features, assisting in prompting the location of the Bluetooth headset. Further, the efficiency and accuracy of finding the Bluetooth peripheral are improved.
需要说明的是,在本申请实施例中,当电子设备100接收到蓝牙外设200通过SCO链路传输的第二实时音频数据后,直接播放该第二实时音频数据,除此之外还可以,基于用户针对电子设备100是否允许播放该实时音频数据的操作,确定电子设备100是否通过扬声器/听筒等播放该第二实时音频数据,本申请不做具体限定。It should be noted that, in the embodiment of the present application, when the
进一步,本申请实施例提供的一种提示方法中的音频数据的传输都是通过SCO链路进行传输的。一方面,SCO链路主要传输对于时间要求比较严的音频数据,所以可以实现音频数据的实时传输,基本没有延迟,保证了蓝牙外设能够及时播放电子设备发送的第一实时音频数据,以及蓝牙外设所采集的第二实时音频数据,可以及时发送给电子设备,以提高提示蓝牙外设所处的位置的准确性,提高了查找蓝牙外设的速度和准确性。另一方面,在进行电子设备将所采集的音频数据传输给蓝牙外设的同时,蓝牙外设也可以将其所采集的第二实时音频数据传输给蓝牙外设。实现了双向音频数据的同时获取和传输,减少了获取用于提示的音频数据的时间以及音频数据的传输时间,从而减少了查找蓝牙外设所消耗的时间,提高了查找蓝牙外设的效率。Further, the transmission of the audio data in the prompt method provided in the embodiment of the present application is all transmitted through the SCO link. On the one hand, the SCO link mainly transmits audio data with strict time requirements, so the real-time transmission of audio data can be realized without delay, which ensures that the Bluetooth peripheral can play the first real-time audio data sent by the electronic device in time, and Bluetooth The second real-time audio data collected by the peripheral device can be sent to the electronic device in time to improve the accuracy of prompting the location of the Bluetooth peripheral device and improve the speed and accuracy of finding the Bluetooth peripheral device. On the other hand, while the electronic device transmits the collected audio data to the Bluetooth peripheral, the Bluetooth peripheral can also transmit the second real-time audio data collected to the Bluetooth peripheral. The simultaneous acquisition and transmission of two-way audio data is realized, and the time for acquiring audio data for prompting and the transmission time of audio data are reduced, thereby reducing the time consumed for searching for Bluetooth peripherals and improving the efficiency of searching for Bluetooth peripherals.
S410、用户进行结束查找操作。S410, the user performs an end search operation.
具体的,结束查找操作时用于结束查找蓝牙外设200的操作。Specifically, when the search operation is ended, it is used to end the operation of searching for the Bluetooth peripheral 200 .
为了方便理解,下面结合图5B所示的电子设备100的查找蓝牙应用界面图对用户进行结束查找操作进行详细说明。For the convenience of understanding, the user's end search operation will be described in detail below in conjunction with the search bluetooth application interface diagram of the
如图5B所示的电子设备100的查找蓝牙应用界面图,查找蓝牙应用界面520包括开始查找图标521、结束查找图标522、查找模式图标523等。用户点击电子设备100的查找蓝牙应用界面520上的开始查找图标522,则会结束电子设备100查找蓝牙外设200的任务。As shown in FIG. 5B , the search Bluetooth application interface diagram of the
需要说明的,结束查找操作可以是点击电子设备100的查找蓝牙界面所显示的结束查找的图标,也可以是点击蓝牙外设200的界面所显示的结束查找图像,只要是预设的用于结束查找蓝牙外设任务的操作即可,在本申请实施例中不做具体限定。It should be noted that the end of the search operation can be clicking the end search icon displayed on the search Bluetooth interface of the
S411、响应于结束查找操作,电子设备100与蓝牙外设200断开SCO链路。S411. In response to ending the search operation, the
进一步,在断开同步定向连接链路后,电子设备100的收声和出声的状态恢复成初始状态,也可以称为离开语音透传模式,以便于后续实现其他功能,例如:通过蓝牙耳机与其他电子设备进行语音通话。Further, after disconnecting the synchronous directional connection link, the
本申请实施例提供了一种提示方法,该方法包括:电子设备响应于查找操作,电子设备与蓝牙外设之间SCO链路,并且配置本身的收声和出声的状态,使电子设备处于语音透传模式,电子设备通过麦克风采集得到第一实时音频数据,并将第一实时音频数据通过SCO链路发送给蓝牙外设,蓝牙外设立刻播放该第一实时音频数据,与此同时,蓝牙外设也通过麦克风采集得到第二实时音频数据,并通过SCO链路发送给电子设备,电子设备立即播放第二实时音频数据。SCO链路是蓝牙协议中定义的基础链路,只要是电子设备与蓝牙外设处于蓝牙连接状态,即可实现SCO链路的建立,从而通过SCO链路实现提示蓝牙外设位置的任务,进一步实现查找蓝牙外设的任务。该方法能够适用于不同品牌之间的电子设备和蓝牙外设,提高了与第三方的兼容性和适配性,即该方法可以适用于所有存在蓝牙功能的之间,不需要保证电子设备和蓝牙外设存在用于提示的私有AT指令/私有指令。The embodiment of the present application provides a prompting method, the method includes: the electronic device responds to the search operation, the SCO link between the electronic device and the Bluetooth peripheral, and configures its own sound receiving and sounding states, so that the electronic device is in the Voice transparent transmission mode, the electronic device collects the first real-time audio data through the microphone, and sends the first real-time audio data to the Bluetooth peripheral through the SCO link, and the Bluetooth peripheral immediately plays the first real-time audio data, and at the same time, The Bluetooth peripheral also collects the second real-time audio data through the microphone, and sends it to the electronic device through the SCO link, and the electronic device immediately plays the second real-time audio data. The SCO link is the basic link defined in the Bluetooth protocol. As long as the electronic device and the Bluetooth peripheral are in the Bluetooth connection state, the establishment of the SCO link can be realized, so that the task of prompting the location of the Bluetooth peripheral can be realized through the SCO link, and further Implement the task of finding Bluetooth peripherals. This method can be applied to electronic devices and Bluetooth peripherals of different brands, which improves the compatibility and adaptability with third parties, that is, this method can be applied to all devices with Bluetooth functions, and there is no need to ensure that electronic devices and Bluetooth peripherals have private AT commands/private commands for prompting.
进一步,SCO链路主要用于传输对于时间要求较高的数据,所以电子设备向蓝牙外设传输的音频数据的传输速度较快,基本没有延迟,保证了蓝牙外设的及时播放音频数据,以提示蓝牙外设当前所处的位置,有助于提高查找蓝牙外设的准确性;Furthermore, the SCO link is mainly used to transmit data with high time requirements, so the transmission speed of the audio data transmitted from the electronic device to the Bluetooth peripheral is relatively fast, and there is basically no delay, which ensures that the Bluetooth peripheral can play audio data in time. Prompt the current location of the Bluetooth peripheral, which helps to improve the accuracy of finding the Bluetooth peripheral;
进一步,SCO链路实现音频数据在电子设备与蓝牙外设之间的同时双向传输,既增加了提示蓝牙外设位置的准确性,又减少了获取用于提示的音频数据的时间以及音频数据的传输时间,从而减少了查找蓝牙外设所消耗的时间,提高了查找蓝牙外设的效率。Further, the SCO link realizes simultaneous two-way transmission of audio data between the electronic device and the Bluetooth peripheral, which not only increases the accuracy of prompting the location of the Bluetooth peripheral, but also reduces the time for obtaining audio data for prompting and the time spent on audio data. Transmission time, thereby reducing the time consumed in searching for Bluetooth peripherals, and improving the efficiency of searching for Bluetooth peripherals.
进一步,在本申请实施例提供的一种提示方法的实现中,蓝牙外设不需要做额外的特殊动作,只需要完成对应的常规交互即可,例如:和电子设备建立SCO链路,在实现其他特定功能(例如:蓝牙耳机播放音乐)时,蓝牙外设和电子设备也需要建立SCO链路。Furthermore, in the implementation of a prompt method provided by the embodiment of the present application, the Bluetooth peripheral device does not need to perform additional special actions, but only needs to complete the corresponding conventional interaction, for example: establish an SCO link with the electronic device, and implement For other specific functions (for example: Bluetooth headsets to play music), Bluetooth peripherals and electronic devices also need to establish SCO links.
实施例二:Embodiment two:
下面结合图7-图9,详细介绍一下本申请实施例提供的又一种提示方法。其中,电子设备100以手机为例,蓝牙外设200以智能手表为例进行说明。需要说明的是,在本申请实施例中蓝牙外设200的组成至少包括:处理器、无线通信模块、麦克风、扬声器、显示屏、闪光灯以及马达等。Next, with reference to FIGS. 7-9 , another prompt method provided by the embodiment of the present application will be introduced in detail. Wherein, the
S701、用户进行特定模式的查找操作。S701. The user performs a search operation of a specific pattern.
具体的,电子设备100与蓝牙外设200之间存在多种提示模式,以便于适用于在各种场景下查找蓝牙外设200,例如:实时语音提示模式、提示音频提示模式、振动控制提示模式、界面显示提示模式、闪光灯提示模式等。Specifically, there are multiple prompt modes between the
其中,实时语音提示模式为电子设备100控制蓝牙外设200播放实时的用户语音,从而提示用户蓝牙外设200当前所处的位置。In the real-time voice prompt mode, the
其中,提示音频提示模式为电子设备100控制蓝牙外设200播放电子设备100预先设置并存储在本身的查找提示音,从而提示用户蓝牙外设200当前所处的位置。Among them, the prompt audio prompt mode is that the
其中,振动控制提示模式为电子设备100控制蓝牙外设200以特定的频率进行振动,从而提示用户蓝牙外设200当前所处的位置。Wherein, the vibration control prompt mode is that the
其中,界面显示提示模式为电子设备100控制蓝牙外设200的界面显示,从而提示用户蓝牙外设200当前所处的位置。例如:控制蓝牙外设200的界面亮度突然增高、控制蓝牙外设200的界面显示用户定义的文字等。Wherein, the interface display prompt mode is that the
其中,闪光灯提示模式为电子设备100控制蓝牙外设200的闪光灯,从而提示用户蓝牙外设200的当前所处的位置。例如:控制蓝牙外设200的闪光灯以较强的亮度维持常亮、控制蓝牙外设200的闪光灯闪烁等。Wherein, in the flash light prompt mode, the
需要说明的,提示模式存在多种,除了本申请实施例中举例说明的五种,还可以存在其他提示模式,本申请实施例不做具体限定。It should be noted that there are multiple prompting modes. In addition to the five types illustrated in the embodiment of the present application, there may also be other prompting modes, which are not specifically limited in the embodiment of the present application.
为了方便理解,下面结合图8所述的电子设备100的又一中查找蓝牙外设应用的界面图,举例说明一下特定模式的查找操作。For the convenience of understanding, the search operation in a specific mode will be illustrated below with reference to another interface diagram of the search Bluetooth peripheral application of the
用户为电子设备100解锁后,电子设备100可以向用户呈现桌面界面,该桌面界面包括多种应用程序的图标,例如,电话图标、联系人图标、互联网图标、短信图标、查找蓝牙应用图标等。用户可以对应用的图标触发操作,例如点击、长按、滑动等。电子设备接收到用户触发的操作后,启动相应的应用。用户点击电子设备100的桌面界面上的查找蓝牙应用图标,则进入如图8所示的又一查找蓝牙外设应用界面800,查找蓝牙应用界面800包括提示模式的开始查找图标(包括:实时语音提示模式的开始查找图标810、提示音频提示模式的开始查找图标820、振动控制提示模式的开始查找图标830、界面显示提示模式的开始查找图标840、闪光灯提示模式的开始查找图标850)、结束查找图标860等。用户点击电子设备100的查找蓝牙外设应用界面800上的提示模式的开始查找图标,则会启动电子设备100通过特定的提示模式查找蓝牙外设200的任务。以提示模式为提示音频提示模式为例,用户点击开始提示音频提示模式的开始查找图标820为提示音频提示模式的查找操作。After the user unlocks the
需要说明的是,特定模式的查找操作可以是点击特定模式对应的开始查找的图标,也可以是以预设动作按击特定的按钮,在本申请实施例中不做具体限定。It should be noted that the search operation of a specific mode may be clicking the icon corresponding to the specific mode to start searching, or pressing a specific button with a preset action, which is not specifically limited in this embodiment of the present application.
S702、电子设备100响应于特定模式的查找操作,电子设备100与蓝牙外设200建立SCO链路。S702 , the
S703、电子设备100配置第一提示数据获取通道和出声状态。S703. The
具体的,当特定模式为实时语音提示模式时,则配置电子设备100的第一提示数据获取通道为:电子设备100通过麦克风采集音频数据,从而得到第一实时音频数据,并通过SCO链路直接发送给蓝牙外设200。电子设备配置后的本身的出声状态为电子设备100通过喇叭播放接收到的音频数据。Specifically, when the specific mode is the real-time voice prompt mode, the first prompt data acquisition channel of the
具体的,当特定模式为提示音频提示模式时,则配置电子设备100的第一提示数据获取通道为:电子设备100从自身的存储空间中获取预先存储的提示音频数据,通过SCO链路将提示音频数据发送给蓝牙外设200。电子设备配置后的本身的出声状态为电子设备100通过喇叭播放接收到的音频数据。Specifically, when the specific mode is the prompt audio prompt mode, the first prompt data acquisition channel of the
具体的,当特定模式为振动控制提示模式时则配置电子设备100的第一提示数据获取通道为:电子设备100的麦克风不采集周围环境的音频数据,电子设备100获取振动控制信息,振动控制信息携带预设振动频率,并通过SCO链路将振动控制信息发送给蓝牙外设200。电子设备配置后的本身的出声状态为电子设备100通过喇叭播放接收到的音频数据。Specifically, when the specific mode is the vibration control prompt mode, configure the first prompt data acquisition channel of the
具体的,当特定模式为界面显示提示模式,则配置电子设备100的第一提示数据获取通道为:电子设备100的麦克风不采集周围环境的音频数据,电子设备100获取界面控制数据,通过SCO链路将界面控制数据发送给蓝牙外设200。电子设备配置后的本身的出声状态为电子设备100通过喇叭播放接收到的音频数据。Specifically, when the specific mode is the interface display prompt mode, the first prompt data acquisition channel of the
具体的,当特定模式为闪光灯提示模式,则配置电子设备100的获取第一提示数据的方法为:电子设备100的麦克风不采集周围环境的音频数据,电子设备100获取灯光控制信息,通过SCO链路将灯光控制数据发送给蓝牙外设200。电子设备配置后的本身的出声状态为电子设备100通过喇叭播放接收到的音频数据。Specifically, when the specific mode is the flash notification mode, the method for configuring the
S704、电子设备100基于特定模式对应的第一数据获取通道,获取第一提示数据。S704. The
具体的,当特定模式为实时语音提示模式时,电子设备100获取的第一提示数据为通过麦克风采集获得的第一实时音频数据。Specifically, when the specific mode is the real-time voice prompt mode, the first prompt data acquired by the
具体的,当特定模式为提示音频提示模式时,电子设备100获取的第一提示数据为预先存储在电子设备100侧的提示音频数据。Specifically, when the specific mode is the prompt audio prompt mode, the first prompt data acquired by the
具体的,当特定模式为振动控制提示模式时,电子设备100获取的第一提示数据为包含预设振动频率的振动控制数据。Specifically, when the specific mode is the vibration control prompt mode, the first prompt data acquired by the
具体的,当特定模式为界面显示提示模式时,电子设备100获取的第一提示数据为界面控制数据。Specifically, when the specific mode is the interface display prompt mode, the first prompt data acquired by the
具体的,当特定模式为闪光灯提示模式时,电子设备100获取的第一提示数据为灯光控制数据。Specifically, when the specific mode is the flash light prompt mode, the first prompt data acquired by the
S705、电子设备100通过SCO链路,将获得的对应的第一提示数据发送给蓝牙外设200。S705. The
S706、蓝牙外设200基于接收的第一提示数据,执行对应的动作。S706. The Bluetooth peripheral 200 performs a corresponding action based on the received first prompt data.
具体的,当特定模式为实时语音提示模式时,蓝牙外设200接收到电子设备100获取的第一实时音频数据后,蓝牙外设200立刻通过扬声器播放该第一实时音频数据,从而提示用户蓝牙外设的位置。Specifically, when the specific mode is the real-time voice prompt mode, after the Bluetooth
具体的,当特定模式为提示音频提示模式时,蓝牙外设200接收到电子设备100获取的提示音频数据后,蓝牙外设200立刻通过扬声器播放该提示音频数据,从而提示用户蓝牙外设的位置。Specifically, when the specific mode is the prompt audio prompt mode, after the Bluetooth peripheral 200 receives the prompt audio data obtained by the
具体的,当特定模式为振动控制提示模式时,蓝牙外设200接收到电子设备100获取包含预设振动频率的振动控制数据后,蓝牙外设200控制自身的马达产生预设振动频率的振动,从而提示用户蓝牙外设的位置。Specifically, when the specific mode is the vibration control prompt mode, after the Bluetooth peripheral 200 receives the vibration control data obtained by the
具体的,当特定模式为界面显示提示模式时,蓝牙外设200接收到电子设备100获取的界面控制数据后,蓝牙外设200根据界面控制数据控制自身的显示屏的界面显示,从而提示用户蓝牙外设的位置。Specifically, when the specific mode is the interface display prompt mode, after the Bluetooth
具体的,当特定模式为闪光灯提示模式时,蓝牙外设200接收到电子设备100获取的灯光控制数据后,蓝牙外设200根据灯光控制数据控制自身的闪光灯,使得闪光灯当前所处的状态与接收到的灯光控制数据相对应。例如:灯光控制数据为使闪光灯以特定频率闪烁,则蓝牙外设200控制自身的闪光灯以特定频率闪烁。Specifically, when the specific mode is the flash notification mode, after the Bluetooth peripheral 200 receives the light control data acquired by the
存在多种提示模式,能够更好的适用于多种场景,例如:用户正在开会/需要保持相对安静的场景下,用户可以选择振动控制提示模式,让蓝牙外设以特定频率振动,不需要播放音频数据,避免由于播放音频数据,从而影响会议/安静场景。There are a variety of prompt modes, which can be better applied to various scenarios. For example, in the scene where the user is in a meeting or needs to keep relatively quiet, the user can choose the vibration control prompt mode to make the Bluetooth peripheral vibrate at a specific frequency without playing Audio data, to avoid affecting meeting/quiet scenes due to playing audio data.
S707、蓝牙外设200通过麦克风采集得到第二实时音频数据。S707. The Bluetooth peripheral 200 collects the second real-time audio data through the microphone.
S708、蓝牙外设200通过SCO链路,将第二实时音频数据发送给电子设备100。S708. The Bluetooth peripheral 200 sends the second real-time audio data to the
S709、电子设备100播放蓝牙外设200发送的第二实时音频数据。S709. The
需要说明的是,在本申请实施例中,当电子设备100接收到蓝牙外设200通过SCO链路传输的第二实时音频数据后,直接播放该实时音频数据,除此之外还可以,基于用户针对电子设备100是否允许播放该实时音频数据的操作,确定电子设备100是否通过扬声器/听筒等播放该实时音频数据,本申请不做具体限定。It should be noted that, in the embodiment of the present application, when the
为了方便理解,下面结合图9所示的电子设备100的又一种查找蓝牙外设应用的界面示意图,详细介绍一下基于用户针对电子设备100是否允许播放该实时音频数据的操作,确定电子设备100是否通过扬声器/听筒等播放该第二实时音频数据。For the convenience of understanding, the following is a schematic diagram of another interface for searching the Bluetooth peripheral application of the
当电子设备100接收到蓝牙外设200通过SCO链路发送的实时音频数据,电子设备100当前显示的查找蓝牙外设应用界面800中,会跳出一个选择弹窗910,选择弹窗910中包括允许播放的图标911和禁止播放的图标912。用户点击允许播放图标911,电子设备100则播放该实时音频数据;用户点击禁止播放图标912,电子设备100则不播放该实时音频数据。When the
S710、用户进行结束查找操作。S710, the user performs an end search operation.
S711、响应于结束查找操作,电子设备100与蓝牙外设200断开SCO链路。S711. In response to ending the search operation, the
进一步,在电子设备100与蓝牙外设200实现特定提示模式的提示方法过程中,用户可以进行更换提示模式的操作,电子设备100会响应于该更换提示模式的操作,重新配置自身获取第一提示数据的方式以及出声状态,从而以更换后的提示模式实现提示蓝牙外设位置的任务。Further, during the process of the
本申请实施例提供的一种提示方法,该方法包括:响应于特定模式的查找操作,电子设备与蓝牙外设建立SCO链路,电子设备配置本身获取第一提示数据的方式和出声状态为与特定模式对应的状态,电子设备根据对应的方式获取对应的第一提示数据,并将该第一提示数据通过SCO链路发送给蓝牙外设,蓝牙外设基于接收的第一提示数据,执行对应的动作;与此同时,蓝牙外设向电子设备发送第二实时音频数据,电子设备播放第二实时音频数据。SCO链路是蓝牙协议下的基础连接链路,通过SCO链路传输数据,所以该方法能够适用于不同品牌之间的电子设备和蓝牙外设,提高了与第三方的兼容性和适配性。A prompting method provided by an embodiment of the present application, the method includes: in response to a search operation in a specific mode, the electronic device establishes a SCO link with the Bluetooth peripheral, and the electronic device configures itself to obtain the first prompting data and the sounding state as follows: In the state corresponding to the specific mode, the electronic device obtains the corresponding first prompt data according to the corresponding method, and sends the first prompt data to the Bluetooth peripheral device through the SCO link, and the Bluetooth peripheral device executes based on the received first prompt data. Corresponding actions; at the same time, the Bluetooth peripheral sends the second real-time audio data to the electronic device, and the electronic device plays the second real-time audio data. The SCO link is the basic connection link under the Bluetooth protocol, which transmits data through the SCO link, so this method can be applied to electronic devices and Bluetooth peripherals of different brands, improving compatibility and adaptability with third parties .
进一步,存在多种提示模式,即对应多种类型的第一提示数据,可以适用于特定场景下的提示作用,从而满足用户各个场景的需求。进一步,预先存储的提示音频数据、振动控制数据等是通过SCO链路发送给蓝牙外设的,所以蓝牙外设内部不需要存储提示音频数据、振动控制数据等,即可实现提示任务,使得提示方式丰富,并且不会占用蓝牙外设有限的内存,从而影响蓝牙外设的运行速度。Further, there are multiple prompting modes, that is, corresponding to multiple types of first prompting data, which can be applied to the prompting function in specific scenarios, so as to meet the needs of users in various scenarios. Further, the pre-stored prompt audio data, vibration control data, etc. are sent to the Bluetooth peripheral through the SCO link, so the Bluetooth peripheral does not need to store prompt audio data, vibration control data, etc., and the prompt task can be realized, so that the prompt The method is rich, and will not occupy the limited memory of the Bluetooth peripheral, thus affecting the running speed of the Bluetooth peripheral.
进一步,可以响应于更换提示模式操作,对提示模式进行更换,即当用户所处场景变更后,可以在过程中直接切换提示模式,增加了查找蓝牙外设方法的灵活性。Further, the prompt mode can be changed in response to the operation of changing the prompt mode, that is, when the user's scene changes, the prompt mode can be directly switched during the process, which increases the flexibility of the method for finding Bluetooth peripherals.
实施例三:Embodiment three:
下面结合图10,详细介绍本申请实施例介绍的一种提示方法。其中,电子设备100以手机为例,蓝牙外设200以智能手表为例进行说明。其中电子设备100与蓝牙外设200处于蓝牙连接状态。A prompting method introduced in the embodiment of the present application will be described in detail below with reference to FIG. 10 . Wherein, the
S1001、用户进行蓝牙外设200的查找操作。S1001. The user performs a search operation for the Bluetooth peripheral 200.
S1002、电子设备100基于查找操作,与蓝牙外设200建立SCO链路。S1002. The
S1003、电子设备100通过SCO链路向蓝牙外设200发送第一提示数据。S1003. The
其中,第一提示数据是电子设备100通过自动配置后的第一提示数据获取通道获得的。Wherein, the first prompt data is obtained by the
S1004、蓝牙外设200根据第一提示数据,提示用户蓝牙外设200的位置。S1004. The Bluetooth peripheral 200 prompts the user for the location of the Bluetooth peripheral 200 according to the first prompt data.
具体的,当第一提示数据是第一实时音频数据时,蓝牙外设200播放该第一实时音频数据,根据音频数据播放的声音,提示用户蓝牙外设200的位置。Specifically, when the first prompt data is the first real-time audio data, the Bluetooth peripheral 200 plays the first real-time audio data, and prompts the user the location of the Bluetooth peripheral 200 according to the sound played by the audio data.
具体的,当第一提示数据是预先存储的提示音频数据时,蓝牙外设200播放该提示音频数据,根据音频数据播放的声音,提示用户蓝牙外设200的位置。Specifically, when the first prompt data is pre-stored prompt audio data, the Bluetooth peripheral 200 plays the prompt audio data, and prompts the user the location of the Bluetooth peripheral 200 according to the sound played by the audio data.
具体的,当第一提示数据是携带预设振动频率的振动控制数据时,蓝牙外设200根据振动控制数据,控制蓝牙外设200的马达产生预设振动频率的振动,根据产生的振动提示用户蓝牙外设200的位置。Specifically, when the first prompt data is vibration control data carrying a preset vibration frequency, the Bluetooth
具体的,当第一提示数据是界面控制数据时,蓝牙外设200根据所述界面控制数据,控制蓝牙外设200的显示屏的界面显示,以提示用户蓝牙外设200的位置。Specifically, when the first prompt data is interface control data, the Bluetooth peripheral 200 controls the interface display of the display screen of the Bluetooth peripheral 200 according to the interface control data, so as to remind the user of the location of the Bluetooth peripheral 200 .
具体的,当第一提示数据是灯光控制数据时,蓝牙外设200根据该灯光控制数据,控制蓝牙外设200的闪光灯,从而提示用户蓝牙外设200的位置。Specifically, when the first prompt data is light control data, the Bluetooth peripheral 200 controls the flash light of the Bluetooth peripheral 200 according to the light control data, thereby prompting the user of the location of the Bluetooth peripheral 200 .
S1005、蓝牙外设200通过SCO链路向电子设备发送第二提示数据。S1005. The Bluetooth peripheral 200 sends the second prompt data to the electronic device through the SCO link.
第二提示数据是蓝牙外设200向电子设备100发送的,用于电子设备100提示用户蓝牙外设200所在位置的数据。The second prompt data is sent by the Bluetooth peripheral 200 to the
在本申请实施例中,第二提示数据以蓝牙外设200通过麦克风采集周围环境得到的第二实时音频数据为例。In the embodiment of the present application, the second prompt data is taken as an example of the second real-time audio data obtained by the Bluetooth peripheral 200 collecting the surrounding environment through a microphone.
需要说明的是,在本申请实施例中第二提示数据是蓝牙外设200通过麦克风采集得到的周围环境的实时音频数据,除此之外,第二提示数据还可以是蓝牙外设200通过摄像头拍摄周围环境的图像/视频,本申请不做具体限定。It should be noted that in the embodiment of the present application, the second prompt data is the real-time audio data of the surrounding environment collected by the Bluetooth peripheral 200 through the microphone. In addition, the second prompt data can also be the Taking images/videos of the surrounding environment is not specifically limited in this application.
S1006、电子设备100根据蓝牙外设200发送的第二提示数据,提示用户蓝牙外设200的位置。S1006. The
第二提示数据以蓝牙外设200通过麦克风采集周围环境得到的第二实时音频数据为例时,电子设备100播放该第二实时音频数据,以提示用户蓝牙外设200的位置。For the second prompt data, when the second real-time audio data collected by the Bluetooth peripheral 200 through the microphone is taken as an example, the
需要说明的是,除了播放第二实时音频数据之外,当第二提示数据是蓝牙外设200通过摄像头拍摄周围环境的图像/视频时,电子设备100还可以通过显示屏显示蓝牙外设200拍摄获得的图像/视频,以提示用户蓝牙外设200的位置,本申请不做具体限定。It should be noted that, in addition to playing the second real-time audio data, when the second prompt data is the image/video of the surrounding environment taken by the Bluetooth peripheral 200 through the camera, the
S1007、用户进行结束查找操作。S1007. The user performs an end search operation.
其中,结束查找操作可以是在电子设备100侧进行的,也可以是在蓝牙外设200侧进行的。Wherein, the end of the search operation may be performed on the side of the
S1008、电子设备100和蓝牙外设200断开SCO链路。S1008, the
需要说明的是,电子设备100向蓝牙外设200发送第一提示数据和蓝牙外设200向电子设备100发送第二提示数据,是同时发送,相关步骤的标号只是为了方便实施例的描述,并不对顺序做具体限定。It should be noted that the
本申请实施例提供了一种提示方法,该方法包括:用户进行蓝牙外设200的查找操作,电子设备100基于查找操作,与蓝牙外设200建立SCO链路,电子设备100通过SCO链路向蓝牙外设200发送第一提示数据,蓝牙外设200根据第一提示数据,提示用户蓝牙外设200的位置,与此同时,蓝牙外设200通过SCO链路向电子设备发送第二提示数据,电子设备100根据蓝牙外设200发送的第二提示数据,提示用户蓝牙外设200的位置,用户进行结束查找操作,电子设备100和蓝牙外设200断开SCO链路。SCO链路是蓝牙协议中定义的基础链路,只要是电子设备与蓝牙外设处于蓝牙连接状态,即可实现SCO链路的建立,所以本申请实施例中通过SCO链路实现提示蓝牙外设位置的任务,从而实现查找蓝牙外设的任务。该方法能够适用于不同品牌之间的电子设备和蓝牙外设,提高了与第三方的兼容性和适配性,即该方法可以适用于所有存在蓝牙功能的之间,不需要保证电子设备和蓝牙外设存在用于提示的私有AT指令/私有指令。The embodiment of the present application provides a prompting method, the method includes: the user performs a search operation of the Bluetooth peripheral 200, the
进一步,SCO链路可以实现数据的双向传输,在电子设备向蓝牙外设发送第一提示数据的同时,电子设备也接收到蓝牙外设发送的第二提示数据。可以通过第二提示数据辅助提示蓝牙外设的位置,从而提高了查找蓝牙外设的准确性。Furthermore, the SCO link can realize two-way transmission of data. When the electronic device sends the first prompt data to the Bluetooth peripheral, the electronic device also receives the second prompt data sent by the Bluetooth peripheral. The location of the bluetooth peripheral can be assisted by the second prompt data, thereby improving the accuracy of finding the bluetooth peripheral.
本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质中包括指令,当上述指令在电子设备上运行时,使得该电子设备执行图4、图7和图10的相关方法步骤,以实现上述实施例中的方法。The embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium includes instructions, and when the above-mentioned instructions are run on the electronic device, the electronic device is made to execute the related operations shown in Figure 4, Figure 7 and Figure 10. Method steps to implement the methods in the above embodiments.
本申请实施例还提供了一种包含指令的计算机程序产品,当该计算机程序产品在电子设备上运行时,使得该电子设备执行如图4、图7和图10中的相关方法步骤,以实现上述实施例中的方法。The embodiment of the present application also provides a computer program product containing instructions. When the computer program product is run on an electronic device, the electronic device is made to execute the relevant method steps as shown in FIG. 4, FIG. 7 and FIG. 10, so as to realize The method in the above examples.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above is only a specific implementation of the application, but the protection scope of the application is not limited thereto, and any changes or replacements within the technical scope disclosed in the application should be covered within the protection scope of the application . Therefore, the protection scope of the present application should be determined by the protection scope of the claims.
Claims (20)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310050589.5A CN115942253B (en) | 2023-02-01 | 2023-02-01 | A prompting method and related device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310050589.5A CN115942253B (en) | 2023-02-01 | 2023-02-01 | A prompting method and related device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN115942253A true CN115942253A (en) | 2023-04-07 |
| CN115942253B CN115942253B (en) | 2023-08-04 |
Family
ID=86654509
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202310050589.5A Active CN115942253B (en) | 2023-02-01 | 2023-02-01 | A prompting method and related device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN115942253B (en) |
Citations (13)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20060199534A1 (en) * | 2005-03-04 | 2006-09-07 | Broadcom Corporation | Location system for bluetooth enabled devices |
| CN104010384A (en) * | 2013-02-27 | 2014-08-27 | 腾讯科技(深圳)有限公司 | Device searching method and apparatus |
| CN107306312A (en) * | 2016-04-25 | 2017-10-31 | 中兴通讯股份有限公司 | A kind of method and terminal for finding terminal |
| US20180199138A1 (en) * | 2017-01-09 | 2018-07-12 | Apple Inc. | Locating wireless devices |
| CN108337306A (en) * | 2018-01-31 | 2018-07-27 | 广东欧珀移动通信有限公司 | Equipment searching method, device, system, terminal and storage medium |
| CN207835738U (en) * | 2018-02-06 | 2018-09-07 | 北京纽曼腾飞科技有限公司 | A kind of bluetooth headset of the two-way loss prevention function of band |
| CN108877181A (en) * | 2018-07-18 | 2018-11-23 | 深圳市茁壮网络股份有限公司 | Seeking for remote controller method, remote controler and electronic equipment |
| CN111132101A (en) * | 2019-11-22 | 2020-05-08 | 华为技术有限公司 | Positioning interaction method and device |
| CN111225366A (en) * | 2019-12-27 | 2020-06-02 | 宇龙计算机通信科技(深圳)有限公司 | Equipment searching method and device, storage medium and terminal |
| CN112583973A (en) * | 2020-12-17 | 2021-03-30 | 广东思派康电子科技有限公司 | Method for preventing communication between Bluetooth earphone and Bluetooth terminal from entering narrow band |
| CN113329381A (en) * | 2021-04-28 | 2021-08-31 | 荣耀终端有限公司 | Method for establishing Bluetooth connection and electronic equipment |
| CN113766482A (en) * | 2021-09-15 | 2021-12-07 | 荣耀终端有限公司 | Method for searching Bluetooth device, electronic device and storage medium |
| CN115273431A (en) * | 2022-09-26 | 2022-11-01 | 荣耀终端有限公司 | Device retrieving method and device, storage medium and electronic device |
-
2023
- 2023-02-01 CN CN202310050589.5A patent/CN115942253B/en active Active
Patent Citations (14)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20060199534A1 (en) * | 2005-03-04 | 2006-09-07 | Broadcom Corporation | Location system for bluetooth enabled devices |
| CN104010384A (en) * | 2013-02-27 | 2014-08-27 | 腾讯科技(深圳)有限公司 | Device searching method and apparatus |
| CN107306312A (en) * | 2016-04-25 | 2017-10-31 | 中兴通讯股份有限公司 | A kind of method and terminal for finding terminal |
| US20180199138A1 (en) * | 2017-01-09 | 2018-07-12 | Apple Inc. | Locating wireless devices |
| CN108337306A (en) * | 2018-01-31 | 2018-07-27 | 广东欧珀移动通信有限公司 | Equipment searching method, device, system, terminal and storage medium |
| CN207835738U (en) * | 2018-02-06 | 2018-09-07 | 北京纽曼腾飞科技有限公司 | A kind of bluetooth headset of the two-way loss prevention function of band |
| CN108877181A (en) * | 2018-07-18 | 2018-11-23 | 深圳市茁壮网络股份有限公司 | Seeking for remote controller method, remote controler and electronic equipment |
| CN111132101A (en) * | 2019-11-22 | 2020-05-08 | 华为技术有限公司 | Positioning interaction method and device |
| WO2021098442A1 (en) * | 2019-11-22 | 2021-05-27 | 荣耀终端有限公司 | Positioning interaction method and apparatus |
| CN111225366A (en) * | 2019-12-27 | 2020-06-02 | 宇龙计算机通信科技(深圳)有限公司 | Equipment searching method and device, storage medium and terminal |
| CN112583973A (en) * | 2020-12-17 | 2021-03-30 | 广东思派康电子科技有限公司 | Method for preventing communication between Bluetooth earphone and Bluetooth terminal from entering narrow band |
| CN113329381A (en) * | 2021-04-28 | 2021-08-31 | 荣耀终端有限公司 | Method for establishing Bluetooth connection and electronic equipment |
| CN113766482A (en) * | 2021-09-15 | 2021-12-07 | 荣耀终端有限公司 | Method for searching Bluetooth device, electronic device and storage medium |
| CN115273431A (en) * | 2022-09-26 | 2022-11-01 | 荣耀终端有限公司 | Device retrieving method and device, storage medium and electronic device |
Non-Patent Citations (2)
| Title |
|---|
| 杜庆伟 等: "《无线通信中的移动计算》" * |
| 马欣;: "基于蓝牙技术耳机的软件设计方案的研究", 武汉船舶职业技术学院学报, no. 06 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN115942253B (en) | 2023-08-04 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP7473101B2 (en) | Application display method and electronic device | |
| CN111724775B (en) | A voice interaction method and electronic device | |
| CN111602379B (en) | Voice communication method, electronic equipment and system | |
| JP7268275B2 (en) | Method and electronic device for presenting video on electronic device when there is an incoming call | |
| WO2020119492A1 (en) | Message processing method and related apparatus | |
| CN114079892A (en) | Bluetooth communication method, wearable device and system | |
| JP2023510259A (en) | Method and mobile terminal for reducing power consumption of mobile terminal | |
| CN113225423B (en) | Contact person recommendation method and electronic device | |
| WO2022143883A1 (en) | Photographing method and system, and electronic device | |
| CN115657897A (en) | Cross-device desktop management method, first electronic device and second electronic device | |
| WO2020006711A1 (en) | Message playing method and terminal | |
| CN115705315A (en) | Method for managing files, electronic device, and computer-readable storage medium | |
| CN110740210B (en) | Message notification method and electronic device | |
| CN112543447A (en) | Device discovery method based on address list, audio and video communication method and electronic device | |
| CN113676902A (en) | A system, method and electronic device for providing wireless Internet access | |
| CN110602686A (en) | Method for using remote SIM module and electronic equipment | |
| CN112118062A (en) | Multi-terminal multimedia data communication method and system | |
| CN116137639A (en) | Method and electronic device for cross-device audio data transmission | |
| CN115914983A (en) | Data interaction method, electronic device and computer-readable storage medium | |
| CN115509651A (en) | A method of screen sharing and related equipment | |
| WO2023071540A1 (en) | Recording synchronization method based on distributed call, and electronic device and readable storage medium | |
| CN114422710B (en) | Video recording control method for electronic equipment, electronic equipment and readable medium | |
| WO2023160491A1 (en) | Communication method, electronic device, network device and system | |
| CN116709476A (en) | Method, device, electronic equipment and storage medium for waking up and keeping equipment alive | |
| CN116264600A (en) | Incoming call reminder method, electronic device and computer-readable storage medium |
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 | ||
| CP03 | Change of name, title or address |
Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040 Patentee after: Honor Terminal Co.,Ltd. Country or region after: China Address before: 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong Patentee before: Honor Device Co.,Ltd. Country or region before: China |
|
| CP03 | Change of name, title or address |