[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN115412835A - Audio sharing method, device, terminal, audio equipment and storage medium - Google Patents

Audio sharing method, device, terminal, audio equipment and storage medium Download PDF

Info

Publication number
CN115412835A
CN115412835A CN202110585224.3A CN202110585224A CN115412835A CN 115412835 A CN115412835 A CN 115412835A CN 202110585224 A CN202110585224 A CN 202110585224A CN 115412835 A CN115412835 A CN 115412835A
Authority
CN
China
Prior art keywords
audio
terminal
target
target audio
sharing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110585224.3A
Other languages
Chinese (zh)
Inventor
张坤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202110585224.3A priority Critical patent/CN115412835A/en
Priority to PCT/CN2022/089205 priority patent/WO2022247561A1/en
Publication of CN115412835A publication Critical patent/CN115412835A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本申请实施例公开了一种音频共享方法、装置、终端、音频设备及存储介质,属于音频分享技术领域。该方法包括:第一终端通过第一无线通讯组件识别位于目标范围内的目标音频设备;通过第二无线通讯组件与目标音频设备建立数据通讯连接,向目标音频设备发送音频共享请求,音频共享请求用于请求共享目标音频设备中播放的目标音频,且目标音频是第二终端通过目标音频设备播放的;接收目标音频对应的目标音频信息,目标音频信息是在接收到对音频共享请求的确认共享操作后向第一终端发送的。使得在音频共享场景中,既可以由终端将目标音频分享至音频设备,也可以由音频设备将目标音频分享至终端,从而实现音频分享的双向诉求。

Figure 202110585224

The embodiment of the present application discloses an audio sharing method, device, terminal, audio equipment and storage medium, belonging to the technical field of audio sharing. The method includes: the first terminal identifies the target audio device within the target range through the first wireless communication component; establishes a data communication connection with the target audio device through the second wireless communication component, and sends an audio sharing request to the target audio device, the audio sharing request It is used to request to share the target audio played in the target audio device, and the target audio is played by the second terminal through the target audio device; receive the target audio information corresponding to the target audio, and the target audio information is shared after receiving the confirmation of the audio sharing request Sent to the first terminal after the operation. In the audio sharing scenario, the terminal can share the target audio to the audio device, and the audio device can share the target audio to the terminal, so as to realize the two-way appeal of audio sharing.

Figure 202110585224

Description

音频共享方法、装置、终端、音频设备及存储介质Audio sharing method, device, terminal, audio equipment and storage medium

技术领域technical field

本申请实施例涉及音频分享技术领域,特别涉及一种音频共享方法、装置、终端、音频设备及存储介质。The embodiments of the present application relate to the technical field of audio sharing, and in particular to an audio sharing method, device, terminal, audio equipment, and storage medium.

背景技术Background technique

随着终端的发展,终端具有的功能也越来越丰富,比如,大多数终端均具备音频播放功能。With the development of the terminal, the functions of the terminal are becoming more and more abundant. For example, most terminals have an audio playback function.

相关技术中,用户可以直接通过终端播放音频,也可以为终端连接外界设备进行音频播放,比如,通过为终端与无线耳机建立蓝牙连接后,可以通过无线耳机播放终端上的音频。In related technologies, the user can play audio directly through the terminal, or connect the terminal to an external device for audio playback. For example, after establishing a Bluetooth connection between the terminal and a wireless headset, the audio on the terminal can be played through the wireless headset.

显然,相关技术中仅支持单向音频播放,即仅支持将终端音频传输至耳机播放,并不支持将耳机音频传输至其他终端播放。Apparently, the related art only supports one-way audio playback, that is, it only supports transmitting terminal audio to earphones for playback, and does not support transmitting earphone audio to other terminals for playback.

发明内容Contents of the invention

本申请实施例提供了一种音频共享方法、装置、终端、音频设备及存储介质。所述技术方案如下:Embodiments of the present application provide an audio sharing method, device, terminal, audio equipment, and storage medium. Described technical scheme is as follows:

一方面,本申请实施例提供了一种音频共享方法,所述方法应用于第一终端,所述第一终端设置有第一无线通讯组件和第二无线通讯组件,所述方法包括:On the one hand, an embodiment of the present application provides an audio sharing method, the method is applied to a first terminal, and the first terminal is provided with a first wireless communication component and a second wireless communication component, and the method includes:

通过所述第一无线通讯组件识别位于目标范围内的目标音频设备;identifying a target audio device within the target range via the first wireless communication component;

通过第二无线通讯组件与所述目标音频设备建立数据通讯连接,向所述目标音频设备发送音频共享请求,所述音频共享请求用于请求共享所述目标音频设备中播放的目标音频,所述目标音频是第二终端通过所述目标音频设备播放的;Establish a data communication connection with the target audio device through the second wireless communication component, and send an audio sharing request to the target audio device, the audio sharing request is used to request to share the target audio played in the target audio device, the The target audio is played by the second terminal through the target audio device;

接收所述目标音频对应的目标音频信息,所述目标音频信息是在接收到对所述音频共享请求的确认共享操作后向所述第一终端发送的。receiving target audio information corresponding to the target audio, where the target audio information is sent to the first terminal after receiving a confirmation sharing operation on the audio sharing request.

另一方面,本申请实施例提供了一种音频共享方法,所述方法应用于音频设备,所述音频设备设置有第一无线通讯组件和第二无线通讯组件,所述方法包括:On the other hand, an embodiment of the present application provides an audio sharing method, the method is applied to an audio device, and the audio device is provided with a first wireless communication component and a second wireless communication component, and the method includes:

通过所述第一无线通讯组件向第一终端发送定位信号,所述第一终端用于根据所述定位信号识别所述音频设备是否位于目标范围内;sending a positioning signal to the first terminal through the first wireless communication component, and the first terminal is used to identify whether the audio device is located within the target range according to the positioning signal;

响应于通过所述第二无线通讯组件接收到所述第一终端发送的数据通讯连接请求,与所述第一终端建立数据通讯连接,接收所述第一终端发送的音频共享请求,所述数据通讯连接请求是所述第一终端在识别到所述音频设备位于所述目标范围内,且需要请求共享所述音频设备中播放的目标音频时发送的;In response to receiving the data communication connection request sent by the first terminal through the second wireless communication component, establishing a data communication connection with the first terminal, and receiving the audio sharing request sent by the first terminal, the data The communication connection request is sent when the first terminal recognizes that the audio device is within the target range and needs to request to share the target audio played in the audio device;

响应于所述音频设备中播放有所述目标音频,且接收到对所述音频共享请求的确认共享操作,向所述第一终端发送所述目标音频对应的目标音频信息,所述目标音频是第二终端通过所述音频设备播放的。In response to the audio device playing the target audio and receiving a confirmation share operation on the audio sharing request, sending target audio information corresponding to the target audio to the first terminal, the target audio is played by the second terminal through the audio device.

另一方面,本申请实施例提供了一种音频共享装置,所述装置应用于第一终端,所述第一终端设置有第一无线通讯组件和第二无线通讯组件,所述装置包括:On the other hand, an embodiment of the present application provides an audio sharing device, the device is applied to a first terminal, the first terminal is provided with a first wireless communication component and a second wireless communication component, and the device includes:

识别模块,用于通过所述第一无线通讯组件识别位于目标范围内的目标音频设备;An identification module, configured to identify a target audio device within the target range through the first wireless communication component;

第一发送模块,用于通过所述第二无线通讯组件与所述目标音频设备建立数据通讯连接,向所述目标音频设备发送音频共享请求,所述音频共享请求用于请求共享所述目标音频设备中播放的目标音频,所述目标音频是第二终端通过所述目标音频设备播放的;A first sending module, configured to establish a data communication connection with the target audio device through the second wireless communication component, and send an audio sharing request to the target audio device, and the audio sharing request is used to request to share the target audio The target audio played in the device, the target audio is played by the second terminal through the target audio device;

第一接收模块,用于接收所述目标音频对应的目标音频信息,所述目标音频信息是在接收到对所述音频共享请求的确认共享操作后向所述第一终端发送的。The first receiving module is configured to receive target audio information corresponding to the target audio, and the target audio information is sent to the first terminal after receiving a confirmation sharing operation of the audio sharing request.

另一方面,本申请实施例提供了一种音频共享装置,所述装置应用于音频设备,所述音频设备设置有第一无线通讯组件和第二无线通讯组件,所述装置包括:On the other hand, an embodiment of the present application provides an audio sharing device, the device is applied to an audio device, the audio device is provided with a first wireless communication component and a second wireless communication component, and the device includes:

第二发送模块,用于通过所述第一无线通讯组件向第一终端发送定位信号,所述第一终端用于根据所述定位信号识别所述音频设备是否位于目标范围内;The second sending module is configured to send a positioning signal to the first terminal through the first wireless communication component, and the first terminal is used to identify whether the audio device is located within a target range according to the positioning signal;

第二接收模块,用于响应于通过所述第二无线通讯组件接收到所述第一终端发送的数据通讯连接请求,与所述第一终端建立数据通讯连接,接收所述第一终端发送的音频共享请求,所述数据通讯连接请求是所述第一终端在识别到所述音频设备位于所述目标范围内,且需要请求共享所述音频设备中播放的目标音频时发送的;The second receiving module is configured to establish a data communication connection with the first terminal in response to receiving the data communication connection request sent by the first terminal through the second wireless communication component, and receive the data communication connection request sent by the first terminal. An audio sharing request, the data communication connection request is sent by the first terminal when it recognizes that the audio device is within the target range and needs to request to share the target audio played in the audio device;

第三发送模块,用于响应于所述音频设备中播放有所述目标音频,且接收到对所述音频共享请求的确认共享操作,向所述第一终端发送所述目标音频对应的目标音频信息,所述目标音频是第二终端通过所述音频设备播放的。A third sending module, configured to send the target audio corresponding to the target audio to the first terminal in response to the target audio being played in the audio device and receiving a confirmation sharing operation on the audio sharing request Information, the target audio is played by the second terminal through the audio device.

另一方面,本申请实施例提供了一种终端,所述终端包括处理器和存储器,所述存储器中存储有至少一段程序,所述至少一段程序由所述处理器加载并执行以实现如上述方面所述的音频共享方法。On the other hand, an embodiment of the present application provides a terminal, the terminal includes a processor and a memory, at least one program is stored in the memory, and the at least one program is loaded and executed by the processor to implement the above-mentioned The audio sharing method described in the aspect.

另一方面,本申请实施例提供了一种音频设备,所述音频设备包括处理器和存储器,所述存储器中存储有至少一段程序,所述至少一段程序由所述处理器加载并执行以实现如上述方面所述的音频共享方法。On the other hand, an embodiment of the present application provides an audio device, the audio device includes a processor and a memory, at least one program is stored in the memory, and the at least one program is loaded and executed by the processor to realize The audio sharing method as described in the above aspect.

另一方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有至少一段程序,所述至少一段程序由处理器加载并执行以实现如上述方面所述的音频共享方法。On the other hand, an embodiment of the present application provides a computer-readable storage medium, where at least one program is stored in the computer-readable storage medium, and the at least one program is loaded and executed by a processor to implement the above-mentioned audio sharing method.

另一方面,本申请实施例提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。终端的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该终端执行上述方面的各种可选实现方式中提供的音频共享方法。On the other hand, an embodiment of the present application provides a computer program product or computer program, where the computer program product or computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the terminal reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the terminal executes the audio sharing method provided in various optional implementation manners of the foregoing aspects.

本申请实施例提供的技术方案的有益效果至少包括:The beneficial effects of the technical solutions provided by the embodiments of the present application at least include:

本申请实施例中,音频设备通过第一无线通讯组件广播定位信号,使得终端可以通过第一无线通讯组件接收该定位信号,进而根据该定位信号实时确定音频设备的位置信息,从而精确识别出位于目标范围内的目标音频设备,以便与该目标音频设备建立数据通讯连接,从而唤醒音频设备的反向共享,使得在音频共享场景中,既可以由终端将目标音频分享至音频设备,也可以由音频设备将目标音频分享至终端,从而实现音频分享的双向诉求。此外,通过将识别目标音频是否位于目标范围内作为共享音频的判断前提,更符合用户靠近即可分享的行为习惯,同时可以提高确定音频反向共享时机的精确度。In the embodiment of the present application, the audio device broadcasts a positioning signal through the first wireless communication component, so that the terminal can receive the positioning signal through the first wireless communication component, and then determine the location information of the audio device in real time according to the positioning signal, so as to accurately identify the location The target audio device within the target range, so as to establish a data communication connection with the target audio device, thereby waking up the reverse sharing of the audio device, so that in the audio sharing scenario, the target audio can be shared by the terminal to the audio device, or by The audio device shares the target audio to the terminal, so as to realize the two-way appeal of audio sharing. In addition, by taking the identification of whether the target audio is within the target range as the premise of sharing audio, it is more in line with the user's behavior habit of sharing when approaching, and at the same time, the accuracy of determining the timing of audio reverse sharing can be improved.

附图说明Description of drawings

图1示出了本申请一个示例性实施例的实施环境的示意图;FIG. 1 shows a schematic diagram of an implementation environment of an exemplary embodiment of the present application;

图2示出了本申请一个示例性实施例提供的音频共享方法的流程图;FIG. 2 shows a flowchart of an audio sharing method provided by an exemplary embodiment of the present application;

图3示出了本申请另一个示例性实施例提供的音频共享方法的流程图;FIG. 3 shows a flowchart of an audio sharing method provided by another exemplary embodiment of the present application;

图4示出了本申请一个示例性实施例示出的音频共享过程的界面示意图;FIG. 4 shows a schematic interface diagram of an audio sharing process shown in an exemplary embodiment of the present application;

图5示出了本申请另一个示例性实施例提供的音频共享方法的流程图;FIG. 5 shows a flowchart of an audio sharing method provided by another exemplary embodiment of the present application;

图6示出了本申请一个示例性实施例示出的共享提示界面的示意图;Fig. 6 shows a schematic diagram of a sharing prompt interface shown in an exemplary embodiment of the present application;

图7示出了本申请另一个示例性实施例示出的共享提示界面的示意图;Fig. 7 shows a schematic diagram of a sharing prompt interface shown in another exemplary embodiment of the present application;

图8示出了本申请另一个示例性实施例提供的音频共享方法的流程图;FIG. 8 shows a flowchart of an audio sharing method provided by another exemplary embodiment of the present application;

图9示出了本申请一个示例性实施例示出的完整音频共享方法的流程图;FIG. 9 shows a flowchart of a complete audio sharing method shown in an exemplary embodiment of the present application;

图10示出了本申请一个实施例提供的音频共享装置的结构框图;FIG. 10 shows a structural block diagram of an audio sharing device provided by an embodiment of the present application;

图11示出了本申请另一个实施例提供的音频共享装置的结构框图;Fig. 11 shows a structural block diagram of an audio sharing device provided by another embodiment of the present application;

图12示出了本申请一个示例性实施例提供的终端设备的结构方框图;Fig. 12 shows a structural block diagram of a terminal device provided by an exemplary embodiment of the present application;

图13示出了本申请一个示例性实施例提供的音频设备的结构方框图。Fig. 13 shows a structural block diagram of an audio device provided by an exemplary embodiment of the present application.

具体实施方式Detailed ways

为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。In order to make the purpose, technical solution and advantages of the present application clearer, the implementation manners of the present application will be further described in detail below in conjunction with the accompanying drawings.

在本文中提及的“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。The "plurality" mentioned herein means two or more. "And/or" describes the association relationship of associated objects, indicating that there may be three types of relationships, for example, A and/or B may indicate: A exists alone, A and B exist simultaneously, and B exists independently. The character "/" generally indicates that the contextual objects are an "or" relationship.

图1示出了本申请一个示例性实施例的实施环境的示意图,该实施环境中包括第一终端110、音频设备120和第二终端130。FIG. 1 shows a schematic diagram of an implementation environment of an exemplary embodiment of the present application, and the implementation environment includes a first terminal 110 , an audio device 120 and a second terminal 130 .

第一终端110是安装和运行有音频播放应用程序的终端,其可以是智能手机、平板电脑、智能手表、智能音箱等便携式电子设备。本实施例中,第一终端110设置有第一无线通讯组件和第二无线通讯组件,其中,第一无线通讯组件用于精准定位,示意性的,第一无线通讯组件可以是UWB组件、蓝牙组件,或其他可以实现室内精准定位的无线通讯组件;第二无线通讯组件用于与其他终端设备或音频设备建立数据通讯连接,示意性的,第二无线通讯组件可以是蓝牙组件、近场通讯(Near Field Communication,NFC)组件、WiFi组件、红外组件等。以第一无线通讯组件是UWB组件,第二无线通讯组件是蓝牙组件为例,第一终端110可以通过该UWB组件识别位于目标范围内的音频设备;可选的,当第一终端110识别到音频设备120位于目标范围内时,可以与音频设备120建立蓝牙连接,并向音频设备120发送音频共享请求,以便请求共享音频设备120中播放的目标音频。The first terminal 110 is a terminal with an audio playback application installed and running, and it may be a portable electronic device such as a smart phone, a tablet computer, a smart watch, or a smart speaker. In this embodiment, the first terminal 110 is provided with a first wireless communication component and a second wireless communication component, wherein the first wireless communication component is used for precise positioning. Schematically, the first wireless communication component may be a UWB component, a Bluetooth components, or other wireless communication components that can achieve precise indoor positioning; the second wireless communication component is used to establish a data communication connection with other terminal equipment or audio equipment. Schematically, the second wireless communication component can be a Bluetooth component, a near field communication (Near Field Communication, NFC) components, WiFi components, infrared components, etc. Taking the first wireless communication component as a UWB component and the second wireless communication component as a Bluetooth component as an example, the first terminal 110 can identify an audio device within the target range through the UWB component; optionally, when the first terminal 110 recognizes When the audio device 120 is within the target range, a Bluetooth connection can be established with the audio device 120 and an audio sharing request is sent to the audio device 120 , so as to request to share the target audio played in the audio device 120 .

音频设备120是具有音频播放功能的设备,其可以是蓝牙耳机、智能音箱等设备。本实施例中,音频设备120中设置有第一无线通讯组件和第二无线通讯组件,其中,第一无线通讯组件用于精准定位,示意性的,第一无线通讯组件可以是UWB组件、蓝牙组件,或其他可以实现精准定位的无线通讯组件;第二无线通讯组件用于与其他终端设备建立数据通讯连接,示意性的,第二无线通讯组件可以是蓝牙组件、NFC组件、WiFi组件、红外组件等。以第一无线通讯组件是UWB组件,第二无线通讯组件是蓝牙组件为例,音频设备120通过UWB组件广播定位信号,使得第一终端110可以基于该定位信号识别该音频设备120是否位于目标范围内;可选的,当第一终端110识别音频设备120位于目标范围内时,可以通过第二无线通讯组件与第一终端110建立数据通讯连接,进而在需要满足第一终端110的音频共享请求时,向第一终端反馈目标音频信息;可选的,音频设备120可以与至少两个终端建立蓝牙连接,比如,音频设备120在与第二终端130建立有蓝牙连接的基础上,还可以与第一终端110建立蓝牙连接;以音频设备120是无线耳机为例,无线耳机具备一拖二的功能,即可以同时与两个终端建立蓝牙连接。可选的,音频设备120可以接收第一终端110发送的音频共享请求,并基于该音频共享请求向第一终端110反馈目标音频信息。The audio device 120 is a device with an audio playback function, which may be a Bluetooth earphone, a smart speaker, and the like. In this embodiment, the audio device 120 is provided with a first wireless communication component and a second wireless communication component, wherein the first wireless communication component is used for precise positioning. Schematically, the first wireless communication component may be a UWB component, a Bluetooth components, or other wireless communication components that can achieve precise positioning; the second wireless communication component is used to establish a data communication connection with other terminal devices. Schematically, the second wireless communication component can be a Bluetooth component, an NFC component, a WiFi component, an infrared components etc. Taking the first wireless communication component as a UWB component and the second wireless communication component as a Bluetooth component as an example, the audio device 120 broadcasts a positioning signal through the UWB component, so that the first terminal 110 can identify whether the audio device 120 is located in the target range based on the positioning signal Optionally, when the first terminal 110 recognizes that the audio device 120 is within the target range, it can establish a data communication connection with the first terminal 110 through the second wireless communication component, and then satisfy the audio sharing request of the first terminal 110 , feedback the target audio information to the first terminal; optionally, the audio device 120 can establish a Bluetooth connection with at least two terminals, for example, the audio device 120 can also establish a Bluetooth connection with the second terminal 130 on the basis of The first terminal 110 establishes a Bluetooth connection; taking the audio device 120 as a wireless earphone as an example, the wireless earphone has a one-to-two function, that is, it can establish a Bluetooth connection with two terminals at the same time. Optionally, the audio device 120 may receive the audio sharing request sent by the first terminal 110, and feed back target audio information to the first terminal 110 based on the audio sharing request.

第二终端130是安装和运行有音频播放应用程序的终端,其可以是智能手机、平板电脑、智能手表、智能音箱等便携式电子设备。本实施例中,第二终端130与音频设备120建立有蓝牙连接,第二终端130中运行有目标音频对应的音频播放进程,且目标音频通过音频设备120播放;可选的,第二终端130可以接收来自音频设备120发送的音频共享请求,并将目标音频信息通过音频设备120反馈至第一终端110。The second terminal 130 is a terminal with an audio playback application installed and running, and it may be a portable electronic device such as a smart phone, a tablet computer, a smart watch, or a smart speaker. In this embodiment, the second terminal 130 establishes a Bluetooth connection with the audio device 120, and the second terminal 130 runs an audio playback process corresponding to the target audio, and the target audio is played through the audio device 120; optionally, the second terminal 130 An audio sharing request sent from the audio device 120 may be received, and target audio information may be fed back to the first terminal 110 through the audio device 120 .

在其他可能的实施方式中,当第一终端110与音频设备120建立蓝牙连接后,第二终端130可以通过音频设备120向第一终端110发送蓝牙地址(第二终端130对应的蓝牙地址),以便第一终端110可以基于该蓝牙地址向第二终端130发送蓝牙连接请求,从而与第二终端130建立蓝牙连接,使得后续可以由第二终端130直接将目标音频信息发送至第一终端110。In other possible implementation manners, after the first terminal 110 establishes a Bluetooth connection with the audio device 120, the second terminal 130 may send a Bluetooth address (the Bluetooth address corresponding to the second terminal 130) to the first terminal 110 through the audio device 120, So that the first terminal 110 can send a Bluetooth connection request to the second terminal 130 based on the Bluetooth address, thereby establishing a Bluetooth connection with the second terminal 130 , so that the second terminal 130 can directly send target audio information to the first terminal 110 subsequently.

请参考图2,其示出了本申请一个示例性实施例提供的音频共享方法的流程图,本申请实施例以该方法应用于图1所示的实施环境为例进行说明,该方法包括:Please refer to FIG. 2, which shows a flow chart of an audio sharing method provided by an exemplary embodiment of the present application. The embodiment of the present application takes the application of the method in the implementation environment shown in FIG. 1 as an example, and the method includes:

步骤201,目标音频设备通过第一无线通讯组件向第一终端发送定位信号。Step 201, the target audio device sends a positioning signal to the first terminal through the first wireless communication component.

其中,第一无线通讯组件可以是UWB组件,也可以是蓝牙组件,或其他可以实现精准定位的组件,示意性的,本实施例以音频设备中设置有UWB组件为例,当音频设备中设置有UWB组件时,使得可以通过UWB组件定位技术确定出音频设备对应的位置信息,其中,超宽带(Ultra Wide Band,UWB)技术是一种无线载波通信技术,它不采用正弦载波,而是利用纳秒级的非正弦波窄脉冲传输数据,因此其所占的频谱范围很宽,且数据传输速率可以达到几百兆比特每秒以上。在该应用场景中,UWB技术具有系统复杂度低,发射信号功率谱密度低,对信道衰落不敏感,截获能力低,定位精度高等优点,尤其适用于室内等密集多径场所的高速无线接入,因此,为音频设备设置UWB组件实现对音频设备的定位,可以以较低的功耗实现室内等密集多径场所的高精度定位。Wherein, the first wireless communication component may be a UWB component, a Bluetooth component, or other components that can achieve precise positioning. Schematically, this embodiment takes an audio device with a UWB component as an example. When there is a UWB component, the position information corresponding to the audio device can be determined through the UWB component positioning technology. Among them, the ultra-wideband (Ultra Wide Band, UWB) technology is a wireless carrier communication technology. It does not use a sinusoidal carrier, but uses The nanosecond-level non-sine wave narrow pulse transmits data, so it occupies a wide spectrum range, and the data transmission rate can reach hundreds of megabits per second. In this application scenario, UWB technology has the advantages of low system complexity, low power spectral density of transmitted signals, insensitivity to channel fading, low interception capability, and high positioning accuracy. It is especially suitable for high-speed wireless access in dense multipath places such as indoors. , Therefore, setting UWB components for audio equipment to realize positioning of audio equipment can realize high-precision positioning in dense multipath places such as indoors with low power consumption.

可选的,第一无线通讯组件可以设置在音频设备内部,即音频设备内部设置有第一无线通讯组件,使得可以通过第一无线通讯组件实现音频设备的定位。Optionally, the first wireless communication component can be arranged inside the audio device, that is, the first wireless communication component is arranged inside the audio device, so that the positioning of the audio device can be realized through the first wireless communication component.

可选的,第一无线通讯组件也可以独立于音频设备设置,第一无线通讯组件与音频设备可分离,也就是说,当音频设备安装或佩戴有第一无线通讯组件时,可以通过第一无线通讯组件实现音频设备定位,当音频设备未携带第一无线通讯组件时,音频设备无法实现音频设备定位;在该应用场景下,第一无线通讯组件可以封装为音频设备的设备配件,比如,第一无线通讯组件可以是设备挂饰、标签等设备配件。Optionally, the first wireless communication component can also be set independently of the audio device, and the first wireless communication component can be separated from the audio device, that is to say, when the audio device is installed or worn with the first wireless communication component, it can The wireless communication component realizes the positioning of the audio device. When the audio device does not carry the first wireless communication component, the audio device cannot realize the positioning of the audio device; in this application scenario, the first wireless communication component can be packaged as a device accessory of the audio device, for example, The first wireless communication component may be equipment accessories such as equipment ornaments and labels.

可选的,若第一无线通讯组件独立于音频设备设置,在通过第一无线通讯组件实现定位之前,音频设备需要与第一无线通讯组件建立数据通讯连接,示意性的,该数据通讯连接可以是蓝牙连接、WiFi连接、红外连接等。Optionally, if the first wireless communication component is set independently of the audio device, the audio device needs to establish a data communication connection with the first wireless communication component before realizing positioning through the first wireless communication component. Schematically, the data communication connection can be It is Bluetooth connection, WiFi connection, infrared connection, etc.

本实施例中所需要实现的应用场景为:当用户手持终端靠近音频设备时,可以唤醒音频设备的反向音频共享功能,即终端可以与音频设备建立数据通讯连接,进而获取到音频设备中正在播放的目标音频。而为了实现当用户手持终端靠近音频设备后即可以进行后续音频反向共享操作,终端就需要能够实时获取到音频设备的位置信息,以便终端根据自身位置和音频设备的位置信息,确定终端与音频设备之间的距离,从而在距离满足距离条件时,执行后续向音频设备请求共享音频的步骤。The application scenario that needs to be implemented in this embodiment is: when the user holds the terminal close to the audio device, the reverse audio sharing function of the audio device can be awakened, that is, the terminal can establish a data communication connection with the audio device, and then obtain the audio data that is currently in the audio device. The target audio to play. In order to realize the subsequent audio reverse sharing operation when the user's handheld terminal is close to the audio device, the terminal needs to be able to obtain the location information of the audio device in real time, so that the terminal can determine the connection between the terminal and the audio device based on its own location and the location information of the audio device. The distance between the devices, so that when the distance satisfies the distance condition, the subsequent step of requesting the audio device to share audio is performed.

在一种可能的实施方式中,由于音频设备中设置有第一无线通讯组件,而第一无线通讯组件具备定位功能,即可以利用该第一无线通讯组件与附近的定位基站,实时定位出音频设备对应的位置信息,进而音频设备可以通过第一无线通讯组件广播位置信息,也即将位置信息添加至第一无线通讯组件广播的定位信号中,进而使得其他终端可以基于自身设置的第一无线通讯组件接收到该定位信号,从而获取到音频设备对应的位置信息,进而实时计算音频设备与终端之间的距离。In a possible implementation manner, since the audio device is provided with a first wireless communication component, and the first wireless communication component has a positioning function, the audio frequency can be located in real time by using the first wireless communication component and a nearby positioning base station. The location information corresponding to the device, and then the audio device can broadcast the location information through the first wireless communication component, that is, add the location information to the positioning signal broadcast by the first wireless communication component, so that other terminals can use the first wireless communication set by themselves The component receives the positioning signal, thereby obtaining the location information corresponding to the audio device, and then calculating the distance between the audio device and the terminal in real time.

示意性的,若第一无线通讯组件为UWB组件时,设置有UWB组件的音频设备实时广播UWB信号,该UWB信号中携带有音频设备的位置信息和设备信息,以便其他终端通过该UWB信号感知与音频设备之间的距离关系,从而基于该距离关系确定音频设备是否位于目标范围内,进而在确定音频设备位于目标范围内时执行后续的音频反向共享步骤。Schematically, if the first wireless communication component is a UWB component, the audio device equipped with the UWB component broadcasts a UWB signal in real time, and the UWB signal carries the location information and device information of the audio device, so that other terminals can perceive it through the UWB signal. The distance relationship between the audio device and the audio device, so as to determine whether the audio device is within the target range based on the distance relationship, and then perform the subsequent audio reverse sharing step when it is determined that the audio device is within the target range.

可选的,由于只有当音频设备正在播放音频时,才具有反向共享音频的意义,为了尽可能的降低第一无线通讯组件的功耗或降低音频设备的功耗,当音频设备处于使用状态时,或播放有音频时,通过第一无线通讯组件实时广播定位信号。Optionally, since only when the audio device is playing audio, it has the meaning of reverse sharing audio, in order to reduce the power consumption of the first wireless communication component or the power consumption of the audio device as much as possible, when the audio device is in use , or when audio is played, the positioning signal is broadcast in real time through the first wireless communication component.

步骤202,第一终端通过第一无线通讯组件识别位于目标范围内的目标音频设备。Step 202, the first terminal identifies the target audio device within the target range through the first wireless communication component.

为了使得第一终端可以识别到周围音频设备的位置,对应的,第一终端中也需要设置有第一无线通讯组件,以便第一终端可以通过第一无线通讯组件接收到周围音频设备广播的定位信号,进而基于该定位信号确定出音频设备的位置信息。其中,该第一无线通讯组件可以是UWB组件,也可以是蓝牙组件,或其他可以实现精准定位的通讯组件。In order to enable the first terminal to recognize the location of the surrounding audio equipment, correspondingly, the first terminal also needs to be equipped with a first wireless communication component, so that the first terminal can receive the location broadcast by the surrounding audio equipment through the first wireless communication component signal, and then determine the location information of the audio device based on the positioning signal. Wherein, the first wireless communication component may be a UWB component, a Bluetooth component, or other communication components capable of precise positioning.

需要说明的是,本实施例中终端与音频设备之间需要通过广播和接收定位信号,实现终端识别音频设备是否位于目标范围内,因此,终端与音频设备之间需要设置相同的第一无线通讯组件,即若终端中设置的第一无线通讯组件是UWB组件,则音频设备中设置的第一无线通讯组件也应该是UWB组件。It should be noted that in this embodiment, the terminal and the audio device need to broadcast and receive positioning signals to realize whether the terminal recognizes whether the audio device is within the target range. Therefore, the same first wireless communication device needs to be set between the terminal and the audio device. components, that is, if the first wireless communication component set in the terminal is a UWB component, then the first wireless communication component set in the audio device should also be a UWB component.

在一种可能的实施方式中,当第一终端中设置有第一无线通讯组件时,可以通过第一无线通讯组件接收周围音频设备广播的定位信号,并从该定位信号中获取到音频设备的位置信息,从而基于该位置信息和第一终端的自身位置信息,实时计算出第一终端与音频设备之间的距离,进而确定音频设备是否位于第一终端周围的目标范围内,并将位于目标范围内的音频设备确定为目标音频设备。In a possible implementation manner, when the first terminal is provided with the first wireless communication component, the positioning signal broadcast by the surrounding audio equipment can be received through the first wireless communication component, and the location of the audio equipment can be obtained from the positioning signal. location information, so that based on the location information and the first terminal's own location information, the distance between the first terminal and the audio device is calculated in real time, and then it is determined whether the audio device is within the target range around the first terminal and will be located at the target The audio device within range is determined as the target audio device.

示意性的,对于获取第一终端对应终端位置信息的方式,与获取音频设备对应位置信息的方式类似,也是通过第一无线通讯组件和周围的定位基站实现的,比如,若第一无线通讯组件是UWB组件,则可以基于UWB定位原理获取到第一终端的位置信息。Schematically, the method of obtaining the location information of the terminal corresponding to the first terminal is similar to the method of obtaining the location information corresponding to the audio device, and it is also realized through the first wireless communication component and the surrounding positioning base stations. For example, if the first wireless communication component is a UWB component, the location information of the first terminal can be obtained based on the UWB positioning principle.

可选的,由于UWB组件在室内定位上的优势:低功耗精准定位,当第一终端和音频设备通过设置UWB组件,实现第一终端识别位于目标范围内的目标音频设备的过程,可以以较低的功耗实现室内等密集多径场所的高精度定位。Optionally, due to the advantages of the UWB component in indoor positioning: low power consumption and precise positioning, when the first terminal and the audio device set the UWB component to realize the process of the first terminal identifying the target audio device within the target range, it can be Low power consumption enables high-precision positioning in dense multipath places such as indoors.

可选的,第一无线通讯组件可以设置在终端内部,即终端内部设置第一无线通讯组件,使得可以通过第一无线通讯组件实现终端定位,以及识别位于目标范围内的音频设备。Optionally, the first wireless communication component can be set inside the terminal, that is, the first wireless communication component is set inside the terminal, so that terminal positioning can be realized through the first wireless communication component, and audio devices located within the target range can be identified.

可选的,第一无线通讯组件也可以独立于终端设置,第一无线通讯组件与终端可分离,也就是说,当终端安装或佩戴有第一无线通讯组件时,可以通过第一无线通讯组件实现终端定位,以及识别目标范围内的目标音频设备,当终端未携带UWB组件时,终端无法实现定位操作,也就无法通过第一无线通讯组件识别音频设备的位置;在该应用场景下,第一无线通讯组件可以封装为终端配件,比如,第一无线通讯组件可以是终端后盖手机壳、终端保护套、手机挂饰、标签等终端配件。Optionally, the first wireless communication component can also be set independently of the terminal, and the first wireless communication component can be separated from the terminal, that is, when the terminal is installed or worn with the first wireless communication component, the first wireless communication component can Realize terminal positioning and identify the target audio device within the target range. When the terminal does not carry the UWB component, the terminal cannot perform the positioning operation, and it cannot identify the position of the audio device through the first wireless communication component; in this application scenario, the second A wireless communication component can be packaged as a terminal accessory. For example, the first wireless communication component can be a terminal accessory such as a terminal back cover, a mobile phone case, a terminal protective cover, a mobile phone pendant, and a label.

可选的,若第一无线通讯组件独立于终端设置,在通过第一无线通讯组件实现定位之前,终端需要与第一无线通讯组件建立数据通讯连接,以便终端可以获取到第一无线通讯组件接收到的定位信号,从而实时计算终端与音频设备之间的距离。Optionally, if the first wireless communication component is set independently from the terminal, the terminal needs to establish a data communication connection with the first wireless communication component before realizing positioning through the first wireless communication component, so that the terminal can obtain the information received by the first wireless communication component. The received positioning signal is used to calculate the distance between the terminal and the audio device in real time.

在一种可能的实施方式中,以第一无线通讯组件是UWB组件为例,设置有UWB组件的第一终端可以接收其他音频设备通过UWB组件广播的UWB信号,并根据该UWB信号确定音频设备的位置信息,进而基于该位置信息和第一终端的终端位置信息,确定音频设备与第一终端之间的距离,从而将距离指示位于目标范围内的音频设备确定为目标音频设备,该目标音频设备即后续需要执行反向音频共享的音频设备。In a possible implementation, taking the first wireless communication component as an example of a UWB component, the first terminal equipped with the UWB component can receive UWB signals broadcast by other audio devices through the UWB component, and determine the audio device according to the UWB signal. location information of the first terminal, and then based on the location information and the terminal location information of the first terminal, determine the distance between the audio device and the first terminal, so that the audio device whose distance indication is within the target range is determined as the target audio device, and the target audio The device is the audio device that needs to perform reverse audio sharing later.

其中,目标范围可以是以第一终端为圆心,预设距离为半径的球形立体区域,即目标范围指示距离第一终端为预设距离的范围;或目标范围也可以是以第一终端为圆心,预设距离为半径的扇形区域;本实施例对目标范围的具体形状不构成限定。示意性的,预设距离可以是20cm,即当第一终端识别到音频设备与第一终端之间的距离达到20cm时,将该音频设备确定为目标音频设备。Wherein, the target range can be a spherical three-dimensional area with the first terminal as the center and the preset distance as the radius, that is, the target range indicates the range of the preset distance from the first terminal; or the target range can also be the first terminal as the center , the preset distance is a fan-shaped area with a radius; this embodiment does not limit the specific shape of the target range. Schematically, the preset distance may be 20 cm, that is, when the first terminal recognizes that the distance between the audio device and the first terminal reaches 20 cm, the audio device is determined as the target audio device.

可选的,第一终端识别出的位于目标范围内的目标音频设备可以是一个,也可以是两个或两个以上,本实施例对识别出的目标音频设备的数量不构成限定。Optionally, the number of target audio devices within the target range identified by the first terminal may be one, or two or more, and this embodiment does not limit the number of identified target audio devices.

步骤203,第一终端通过第二无线通讯组件与目标音频设备建立数据通讯连接,向目标音频设备发送音频共享请求。Step 203, the first terminal establishes a data communication connection with the target audio device through the second wireless communication component, and sends an audio sharing request to the target audio device.

由于本实施例的应用场景是终端方主动去获取音频设备中音频,为了音频设备中所播放音频的安全性,需要由音频设备方确认是否允许向终端方共享音频,因此,在一种可能的实施方式中,当第一终端识别出目标音频设备位于目标范围内,且需要请求目标音频设备共享正在播放的目标音频时,需要先向目标音频设备发送音频共享请求,以便后续音频设备方可以手动确认是否需要同意该音频共享请求。Since the application scenario of this embodiment is that the terminal side actively acquires the audio in the audio device, for the safety of the audio played in the audio device, the audio device needs to confirm whether it is allowed to share the audio with the terminal side. Therefore, in a possible In an embodiment, when the first terminal recognizes that the target audio device is within the target range and needs to request the target audio device to share the target audio being played, it needs to first send an audio sharing request to the target audio device, so that the subsequent audio device can manually Confirm whether to agree to the audio sharing request.

可选的,由于后续第一终端需要与目标音频设备进行多次信息交互和信息传递,为了保证信息传递的稳定性,在一种可能的实施方式中,第一终端在识别到目标音频位于目标范围时,可以先与目标音频建立数据通讯连接,并在数据通讯连接建立后,向目标音频设备发送音频共享请求。Optionally, since the subsequent first terminal needs to perform multiple information interactions and information transmissions with the target audio device, in order to ensure the stability of information transmission, in a possible implementation, the first terminal recognizes that the target audio is located in the target audio device. When in range, a data communication connection can be established with the target audio first, and after the data communication connection is established, an audio sharing request can be sent to the target audio device.

为了避免定位操作对终端与目标音频设备之间数据传输的影响,将终端定位功能和数据通讯功能分开执行,即第一终端中设置有第二无线通讯组件,使得第一终端可以通过第二无线通讯组件与目标音频设备建立数据通讯连接。其中,该第二无线通讯组件可以是蓝牙组件、WiFi组件、红外组件等,对应第一终端可以与目标音频设备建立蓝牙连接、WiFi连接或红外连接。In order to avoid the impact of the positioning operation on the data transmission between the terminal and the target audio device, the terminal positioning function and the data communication function are performed separately, that is, the first terminal is equipped with a second wireless communication component, so that the first terminal can pass through the second wireless The communication component establishes a data communication connection with the target audio device. Wherein, the second wireless communication component may be a Bluetooth component, a WiFi component, an infrared component, etc., corresponding to which the first terminal may establish a Bluetooth connection, a WiFi connection or an infrared connection with the target audio device.

步骤204,响应于通过第二无线通讯组件接收到第一终端发送的数据通讯连接请求,目标音频设备与第一终端建立数据通讯连接,接收第一终端发送的音频共享请求。Step 204, in response to receiving the data communication connection request sent by the first terminal through the second wireless communication component, the target audio device establishes a data communication connection with the first terminal, and receives the audio sharing request sent by the first terminal.

在一种可能的实施方式中,当第一终端在识别到目标音频设备位于目标范围内,且需要请求共享目标音频设备中播放的目标音频时,可以向目标音频设备发送数据通讯连接请求,请求目标音频设备与第一终端建立数据通讯连接,对应的,当目标音频设备接收到第一终端发送的数据通讯连接请求后,若同意该数据通讯连接请求,则目标音频设备与第一终端建立数据通讯连接,后续第一终端可以通过第二无线通讯组件向目标音频设备发送音频共享请求,对应的,目标音频设备可以通过第二无线通讯组件接收第一终端发送的音频共享请求。In a possible implementation manner, when the first terminal recognizes that the target audio device is within the target range and needs to request to share the target audio played in the target audio device, it may send a data communication connection request to the target audio device, requesting The target audio device establishes a data communication connection with the first terminal. Correspondingly, when the target audio device receives the data communication connection request sent by the first terminal, if it agrees to the data communication connection request, the target audio device establishes a data communication connection with the first terminal. communication connection, the first terminal can subsequently send an audio sharing request to the target audio device through the second wireless communication component, and correspondingly, the target audio device can receive the audio sharing request sent by the first terminal through the second wireless communication component.

可选的,若目标音频设备在接收到数据通讯连接请求后,未同意,对应的,第一终端与目标音频设备也就无法建立数据通讯连接,进而无法执行后续的音频反向共享操作。Optionally, if the target audio device does not agree after receiving the data communication connection request, correspondingly, the first terminal and the target audio device cannot establish a data communication connection, and thus cannot perform subsequent audio reverse sharing operations.

示意性的,以第二无线通讯组件是蓝牙组件为例,当第一终端识别到目标音频设备位于目标范围内时,表示用户有意向获取音频设备中播放的目标音频,对应的,可以向目标音频设备发送蓝牙连接请求,请求目标音频设备与第一终端建立蓝牙连接,对应的,目标音频设备接收到该蓝牙连接请求后,若同意该蓝牙连接请求,则与第一终端建立蓝牙连接,并接收第一终端发送的音频共享请求。Schematically, taking the second wireless communication component as an example of a Bluetooth component, when the first terminal recognizes that the target audio device is within the target range, it means that the user intends to acquire the target audio played in the audio device, and correspondingly, the target audio device can be sent to the target The audio device sends a Bluetooth connection request, requesting the target audio device to establish a Bluetooth connection with the first terminal. Correspondingly, after the target audio device receives the Bluetooth connection request, if it agrees to the Bluetooth connection request, it establishes a Bluetooth connection with the first terminal, and An audio sharing request sent by the first terminal is received.

步骤205,响应于目标音频设备中播放有目标音频,且接收到对音频共享请求的确认共享操作,目标音频设备向第一终端发送目标音频对应的目标音频信息。Step 205: In response to the target audio being played in the target audio device and receiving a confirmation sharing operation of the audio sharing request, the target audio device sends target audio information corresponding to the target audio to the first terminal.

本实施例的应用场景为,用户手持终端靠近音频设备以请求音频设备共享正在播放的目标音频,在该应用场景下,用户或第一终端无法预先确定目标音频设备中是否播放有音频,因此,在一种可能的实施方式中,当目标音频设备接收到音频共享请求后,首先需要确定音频设备中是否播放有目标音频,并在确定播放有目标音频的情况下,执行后续的反向音频共享操作,反之,若目标音频设备中并未播放音频,也就无需执行后续的音频共享操作。The application scenario of this embodiment is that the user holds the terminal close to the audio device to request the audio device to share the target audio being played. In this application scenario, the user or the first terminal cannot predetermine whether the target audio device has audio. Therefore, In a possible implementation, when the target audio device receives the audio sharing request, it first needs to determine whether the target audio is played in the audio device, and if it is determined that the target audio is played, perform subsequent reverse audio sharing On the contrary, if no audio is played in the target audio device, there is no need to perform subsequent audio sharing operations.

其中,目标音频是第二终端通过目标音频设备播放的。该目标音频可以是音乐、有声小说、录音、音乐片段等,也可以是视频等带声音的多媒体内容;本实施例对目标音频不构成限定。Wherein, the target audio is played by the second terminal through the target audio device. The target audio may be music, audio novels, recordings, music clips, etc., or multimedia content with sound such as video; this embodiment does not limit the target audio.

当目标音频设备中播放有目标音频时,为了避免泄露用户隐私,在一种可能的实施方式中,需要由音频设备方或与音频设备相连第二终端方手动确认是否同意将目标音频共享至第一终端,也就是说,当目标音频设备中播放有目标音频,且接收到对音频共享请求的确认共享操作后,才会向第一终端发送目标音频对应的目标音频信息,以实现将目标音频设备中播放的目标音频共享给第一终端的目的。When the target audio is played in the target audio device, in order to avoid leaking user privacy, in a possible implementation, the audio device or the second terminal connected to the audio device needs to manually confirm whether to agree to share the target audio to the second terminal. A terminal, that is to say, when the target audio device is playing the target audio, and after receiving the confirmation share operation of the audio sharing request, it will send the target audio information corresponding to the target audio to the first terminal, so as to realize the target audio The target audio played in the device is shared with the first terminal.

示意性的,确认共享操作可以是对目标音频设备的预设手势操作,比如,对目标音频设备的双击操作,也可以是对目标音频设备上实体按键的按压操作。Schematically, the confirmation sharing operation may be a preset gesture operation on the target audio device, for example, a double-tap operation on the target audio device, or a pressing operation on a physical button on the target audio device.

可选的,由于目标音频设备中播放的目标音频由第二终端提供,即目标音频设备与第二终端建立有数据通讯连接,对应的,也可以通过在第二终端上进行确认操作,实现对音频共享请求的确认共享操作。Optionally, since the target audio played in the target audio device is provided by the second terminal, that is, the target audio device has established a data communication connection with the second terminal, correspondingly, the confirmation operation can also be performed on the second terminal to realize the Acknowledgment share operation for audio share request.

可选的,若目标音频设备未接收到对音频共享请求的确认共享操作,或接收到对音频共享请求的拒绝共享操作,目标音频设备也就无法向第一终端共享目标音频信息。Optionally, if the target audio device does not receive the sharing operation of confirming the audio sharing request, or receives the rejecting sharing operation of the audio sharing request, the target audio device cannot share the target audio information with the first terminal.

考虑到音频设备传输实际音频数据需要功耗较大,在一种可能的实施方式中,目标音频设备可以仅将目标音频对应的目标音频信息发送至第一终端,以便第一终端根据该目标音频信息查找到对应的目标音频进行音频播放。示意性的,该目标音频信息可以是目标音频的音频名称。Considering that an audio device needs to consume a lot of power to transmit actual audio data, in a possible implementation, the target audio device may only send target audio information corresponding to the target audio to the first terminal, so that the first terminal The information finds the corresponding target audio for audio playback. Schematically, the target audio information may be an audio name of the target audio.

步骤206,第一终端接收目标音频对应的目标音频信息。Step 206, the first terminal receives target audio information corresponding to the target audio.

在一种可能的实施方式中,当第一终端向目标音频设备发送音频共享请求后,可以处于等待音频共享的状态;当音频设备接收到对音频共享请求的确认共享操作后,可以由音频设备将目标音频信息发送给第一终端,对应的,第一终端接收目标音频设备发送的目标音频信息。In a possible implementation manner, after the first terminal sends an audio sharing request to the target audio device, it may be in a state of waiting for audio sharing; when the audio device receives a confirmation sharing operation for the audio sharing request, the audio device may The target audio information is sent to the first terminal, and correspondingly, the first terminal receives the target audio information sent by the target audio device.

可选的,当第一终端获取到反馈的目标音频信息后,可以立即打开音频播放程序,基于该目标音频信息播放目标音频。Optionally, after the first terminal acquires the fed back target audio information, it can immediately open the audio playing program, and play the target audio based on the target audio information.

可选的,若第一终端无法直接播放目标音频,比如,第一终端正在播放其他音视频内容,或当前环境不允许第一终端外放音频,则第一终端可以暂时将目标音频添加至音频播放队列中,以便后续由用户手动确定何时播放该目标音频。Optionally, if the first terminal cannot directly play the target audio, for example, the first terminal is playing other audio and video content, or the current environment does not allow the first terminal to play the audio, then the first terminal can temporarily add the target audio to the audio Play queue, so that the user can manually determine when to play the target audio later.

可选的,由于第一终端与目标音频设备建立有数据通讯连接,且目标音频设备与第二终端建立有数据通讯连接,即实现了第一终端至第二终端的信息通路,对应的,第一终端可以通过该信息通路获取到第二终端的数据通讯地址,进而与第二终端建立数据通讯连接,对应的,可以接收由第二终端直接发送给第一终端的目标音频信息。Optionally, since the first terminal has established a data communication connection with the target audio device, and the target audio device has established a data communication connection with the second terminal, that is, the information path from the first terminal to the second terminal has been realized. Correspondingly, the first terminal A terminal can obtain the data communication address of the second terminal through the information path, and then establish a data communication connection with the second terminal, correspondingly, it can receive the target audio information directly sent by the second terminal to the first terminal.

对应的,目标音频信息是在接收到对音频共享请求的确认共享操作后向第一终端发送的。目标音频信息可以由目标音频设备发送的,也可以是由第二终端发送的。Correspondingly, the target audio information is sent to the first terminal after receiving the confirmation sharing operation of the audio sharing request. The target audio information may be sent by the target audio device, or may be sent by the second terminal.

可选的,在该等待音频共享的状态下,第一终端可以随时取消对目标音频的音频共享请求。Optionally, in the state of waiting for audio sharing, the first terminal may cancel the audio sharing request for the target audio at any time.

综上所述,本申请实施例中,音频设备通过第一无线通讯组件广播定位信号,使得终端可以通过设置的第一无线通讯组件接收该定位信号,进而根据该定位信号实时确定音频设备的位置信息,从而精确识别出位于目标范围内的目标音频设备,以便与该目标音频设备建立数据通讯连接,从而唤醒音频设备的反向共享,使得在音频共享场景中,既可以由终端将目标音频分享至音频设备,也可以由音频设备将目标音频分享至终端,从而实现音频分享的双向诉求。此外,通过将识别目标音频是否位于目标范围内作为共享音频的判断前提,更符合用户靠近即可分享的行为习惯,同时可以提高确定音频反向共享时机的精确度。To sum up, in the embodiment of the present application, the audio device broadcasts a positioning signal through the first wireless communication component, so that the terminal can receive the positioning signal through the set first wireless communication component, and then determine the position of the audio device in real time according to the positioning signal Information, so as to accurately identify the target audio device within the target range, so as to establish a data communication connection with the target audio device, thereby waking up the reverse sharing of the audio device, so that in the audio sharing scenario, the target audio can be shared by the terminal To the audio device, the audio device can also share the target audio to the terminal, so as to realize the two-way request of audio sharing. In addition, by taking the identification of whether the target audio is within the target range as the premise of sharing audio, it is more in line with the user's behavior habit of sharing when approaching, and at the same time, the accuracy of determining the timing of audio reverse sharing can be improved.

请参考图3,其示出了本申请另一个示例性实施例提供的音频共享方法的流程图,本申请实施例以该方法应用于图1所示的实施环境为例进行说明,该方法包括:Please refer to FIG. 3 , which shows a flowchart of an audio sharing method provided by another exemplary embodiment of the present application. The embodiment of the present application takes the application of the method in the implementation environment shown in FIG. 1 as an example for illustration. The method includes :

步骤301,目标音频设备通过第一无线通讯组件向第一终端发送定位信号。Step 301, the target audio device sends a positioning signal to the first terminal through the first wireless communication component.

为了使得第一终端可以基于定位信号识别目标音频设备的位置信息和设备信息,在一种可能的实施方式中,需要将目标音频设备对应的设备标识和当前位置信息添加至定位信号中,以便实现将当前位置信息和设备标识传输至第一终端。In order to enable the first terminal to identify the location information and device information of the target audio device based on the positioning signal, in a possible implementation manner, it is necessary to add the device identification and current location information corresponding to the target audio device to the positioning signal, so as to realize Transmitting the current location information and the device identification to the first terminal.

在一个示例性的例子中,音频设备发送定位信号的过程可以包括以下步骤:In an exemplary example, the process for the audio device to send the positioning signal may include the following steps:

一、获取音频设备对应的设备标识和当前位置信息。1. Obtain the device identification and current location information corresponding to the audio device.

示意性的,设备标识可以是音频设备对应的设备名称、设备机器码等唯一标识音频设备的信息;当前位置信息可以是音频设备所在的空间位置坐标,该当前位置信息由UWB定位基站对音频设备定位得到。测量音频设备的当前位置信息可以采用UWB定位原理中的飞行时间测距法(Time of Flight,ToF)、到达时间差测距法(Time Difference ofArrival,TDoA)等。Schematically, the device identifier can be information that uniquely identifies the audio device such as the device name corresponding to the audio device, the device machine code, etc.; the current location information can be the spatial position coordinates where the audio device is located, and the current location information is determined by the UWB positioning base station for the audio device get positioned. To measure the current location information of the audio device, Time of Flight (ToF) and Time Difference of Arrival (TDoA) in the UWB positioning principle can be used.

二、将设备标识和当前位置信息添加在UWB信号中。2. Add the device identification and current location information to the UWB signal.

本实施例以第一无线通讯组件是UWB组件,第二无线通讯组件是蓝牙组件为例进行音频共享过程的示例性说明。In this embodiment, the audio sharing process is exemplified by taking the first wireless communication component as a UWB component and the second wireless communication component as a Bluetooth component as an example.

当第一无线通讯组件是UWB组件时,UWB组件广播的定位信号是UWB信号,对应的,当音频设备获取到设备标识和当前位置信息后,为了使得第一终端可以通过UWB信号识别到音频设备所在位置,以及根据设备标识识别需要与哪一个音频设备建立蓝牙连接,在一种可能的实施方式中,音频设备将设备标识和当前位置信息添加在UWB信号中。When the first wireless communication component is a UWB component, the positioning signal broadcast by the UWB component is a UWB signal. Correspondingly, after the audio device obtains the device identification and current location information, in order to enable the first terminal to identify the audio device through the UWB signal location, and identify which audio device needs to establish a Bluetooth connection with the device identifier. In a possible implementation manner, the audio device adds the device identifier and current location information to the UWB signal.

三、通过UWB组件向第一终端发送UWB信号。3. Send the UWB signal to the first terminal through the UWB component.

对应的,目标音频设备通过UWB组件向第一终端发送包含当前位置信息和设备标识的UWB信号,以便第一终端基于当前位置信息识别音频设备是否位于目标范围内,基于设备标识确定音频设备广播的目标蓝牙信号,并基于目标蓝牙信号中包含的第一蓝牙地址与音频设备建立蓝牙连接。Correspondingly, the target audio device sends a UWB signal containing current location information and device identification to the first terminal through the UWB component, so that the first terminal can identify whether the audio device is within the target range based on the current location information, and determine the audio device broadcast based on the device identification. The target Bluetooth signal, and establish a Bluetooth connection with the audio device based on the first Bluetooth address contained in the target Bluetooth signal.

步骤302,响应于识别到位于目标范围内的目标音频设备,第一终端显示共享请求界面,共享请求界面中显示有目标音频设备对应的目标共享控件。Step 302, in response to identifying a target audio device within the target range, the first terminal displays a sharing request interface, where a target sharing control corresponding to the target audio device is displayed.

为了提醒用户识别到位于目标范围内的目标音频设备,在一种可能的实施方式中,当终端识别到位于目标范围内的目标音频设备后,可以在第一终端的当前用户界面中显示共享请求界面,该共享请求界面中显示有目标音频设备对应的目标共享控件,以提醒用户识别到目标音频设备,以及是否需要请求共享目标音频设备中的目标音频。In order to remind the user to recognize the target audio device within the target range, in a possible implementation manner, after the terminal recognizes the target audio device within the target range, the sharing request may be displayed on the current user interface of the first terminal In the sharing request interface, a target sharing control corresponding to the target audio device is displayed to remind the user to identify the target audio device and whether to request to share the target audio in the target audio device.

可选的,该共享请求界面中还可以显示目标音频设备对应的设备图标,比如,若目标音频设备为无线蓝牙耳机,可以在共享请求界面中显示耳机图标,以提醒用户所识别到的目标音频设备的设备种类。Optionally, the device icon corresponding to the target audio device can also be displayed in the sharing request interface. For example, if the target audio device is a wireless Bluetooth headset, the headset icon can be displayed in the sharing request interface to remind the user of the identified target audio device. The device kind of the device.

可选的,由于第一终端接收到目标音频设备发送的目标UWB信号中还包括有目标音频设备的设备标识,对应的,也可以将设备标识显示在共享请求界面中,以便用户确定所识别到的目标音频设备。Optionally, since the target UWB signal sent by the target audio device received by the first terminal also includes the device identifier of the target audio device, correspondingly, the device identifier may also be displayed on the sharing request interface, so that the user can determine the identified target audio device.

如图4所示,其示出了本申请一个示例性实施例示出的音频共享过程的界面示意图。当第一终端410靠近音频设备420达到临界值X时(表示第一终端410识别音频设备420位于目标范围内),第一终端410对应的共享请求界面411中显示有音频设备420对应的设备标识412和目标共享控件413。As shown in FIG. 4 , it shows a schematic interface of an audio sharing process shown in an exemplary embodiment of the present application. When the first terminal 410 approaches the audio device 420 and reaches the critical value X (indicating that the first terminal 410 recognizes that the audio device 420 is within the target range), the sharing request interface 411 corresponding to the first terminal 410 displays the device identification corresponding to the audio device 420 412 and object share control 413 .

步骤303,响应于对共享请求界面中目标共享控件的触发操作,第一终端通过第二无线通讯组件与目标音频设备建立数据通讯连接,向目标音频设备发送音频共享请求。Step 303, in response to triggering the target sharing control in the sharing request interface, the first terminal establishes a data communication connection with the target audio device through the second wireless communication component, and sends an audio sharing request to the target audio device.

可能出现第一终端识别到多个目标音频设备,为了使得第一终端可以明确需要与哪一个目标音频设备建立蓝牙连接,在一种可能的实施方式中,若用户需要与目标音频设备建立蓝牙连接,以共享目标音频设备中的目标音频,可以点击共享请求界面中目标音频设备中的目标共享控件,以便终端在接收到对目标共享控件的触发操作时,可以与目标共享控件所对应的目标音频设备建立数据通讯连接,并在数据通讯连接建立之后向目标音频设备发送音频共享请求。It may happen that the first terminal recognizes multiple target audio devices. In order to enable the first terminal to specify which target audio device needs to establish a Bluetooth connection, in a possible implementation, if the user needs to establish a Bluetooth connection with the target audio device , to share the target audio in the target audio device, you can click the target sharing control in the target audio device in the sharing request interface, so that when the terminal receives the trigger operation on the target sharing control, it can share the target audio corresponding to the target sharing control The device establishes a data communication connection, and sends an audio sharing request to the target audio device after the data communication connection is established.

在一个示例性的例子中,若第二无线通讯组件是蓝牙组件,对应的,第一终端与目标音频设备建立蓝牙连接的过程可以包括以下步骤:In an illustrative example, if the second wireless communication component is a Bluetooth component, correspondingly, the process of establishing a Bluetooth connection between the first terminal and the target audio device may include the following steps:

一、响应于对共享请求界面中目标共享控件的触发操作,基于目标音频设备发送的目标UWB信号,确定目标音频设备对应的目标设备标识。1. In response to a trigger operation on the target sharing control in the sharing request interface, based on the target UWB signal sent by the target audio device, determine the target device identifier corresponding to the target audio device.

当第一终端与目标音频设备建立蓝牙连接的过程中,首先需要获取到目标音频设备对应的蓝牙地址,而音频设备的蓝牙地址包含在音频设备广播的蓝牙信号中,为了获取到目标音频设备对应的蓝牙地址,在一种可能的实施方式中,可以基于目标音频设备对应的目标设备标识区分不同音频设备广播的蓝牙信号,进而基于确定出的目标蓝牙信号获取到蓝牙地址。When the first terminal establishes a Bluetooth connection with the target audio device, it first needs to obtain the Bluetooth address corresponding to the target audio device, and the Bluetooth address of the audio device is included in the Bluetooth signal broadcast by the audio device. In order to obtain the corresponding In a possible implementation manner, Bluetooth signals broadcast by different audio devices may be distinguished based on the target device identifier corresponding to the target audio device, and then the Bluetooth address may be obtained based on the determined target Bluetooth signal.

由于音频设备在广播UWB信号时,即在UWB信号中添加有音频设备对应的设备标识,因此,当终端确定出需要与目标音频设备建立蓝牙连接时,可以首先获取到目标音频设备对应的目标UWB信号,进而从该目标UWB信号中确定出目标音频设备对应的目标设备标识。When an audio device broadcasts a UWB signal, the device identifier corresponding to the audio device is added to the UWB signal. Therefore, when the terminal determines that it needs to establish a Bluetooth connection with the target audio device, it can first obtain the target UWB corresponding to the target audio device. signal, and then determine the target device identifier corresponding to the target audio device from the target UWB signal.

如图4所示,当用户需要请求共享音频设备420中播放的目标音频时,可以点击目标共享控件413,对应的,第一终端410在接收到对目标共享控件413的触发操作后,可以与目标音频设备420建立蓝牙连接,并向目标音频设备420发送音频共享请求。可选的,当用户点击目标共享控件413后,共享请求界面411可以切换为共享等待界面414,该共享等待界面414中可以显示有取消控件415,当用户点击取消控件415时,对应第一终端410可以取消请求目标音频设备420共享目标音频。As shown in FIG. 4, when the user needs to request to share the target audio played in the audio device 420, he can click the target sharing control 413. Correspondingly, after receiving the trigger operation on the target sharing control 413, the first terminal 410 can communicate with the The target audio device 420 establishes a Bluetooth connection, and sends an audio sharing request to the target audio device 420 . Optionally, after the user clicks the target sharing control 413, the sharing request interface 411 can be switched to a sharing waiting interface 414, and a cancel control 415 can be displayed in the sharing waiting interface 414. When the user clicks the cancel control 415, the corresponding first terminal 410 can cancel the request to the target audio device 420 to share the target audio.

二、基于目标设备标识,从接收到的至少一个蓝牙信号中确定出目标音频设备广播的目标蓝牙信号。2. Determine the target Bluetooth signal broadcast by the target audio device from at least one received Bluetooth signal based on the target device identifier.

当第一终端的蓝牙功能开启后,可以接收到周围各个蓝牙设备广播的蓝牙信号,为了从中确定出目标音频设备广播的目标蓝牙信号,以便与目标音频设备建立蓝牙连接,在一种可能的实施方式中,可以基于目标音频设备的目标设备标识,从接收到的至少一个蓝牙信号中确定出与该目标设备标识匹配的目标蓝牙信号,该目标蓝牙信号即目标音频设备广播的蓝牙信号。When the bluetooth function of the first terminal is turned on, it can receive the bluetooth signals broadcast by the surrounding bluetooth devices, in order to determine the target bluetooth signal broadcast by the target audio device so as to establish a bluetooth connection with the target audio device, in a possible implementation In the manner, based on the target device identifier of the target audio device, a target Bluetooth signal matching the target device identifier can be determined from at least one received Bluetooth signal, and the target Bluetooth signal is a Bluetooth signal broadcast by the target audio device.

三、根据目标蓝牙信号,确定目标音频设备对应的第一蓝牙地址。3. Determine the first Bluetooth address corresponding to the target audio device according to the target Bluetooth signal.

其中,目标蓝牙信号中包含有目标音频设备对应的第一蓝牙地址,当终端确定出目标音频设备对应的目标蓝牙信号后,即可以从目标蓝牙信号中获取到目标音频设备对应的第一蓝牙地址,进而基于该第一蓝牙地址向目标音频设备发送蓝牙连接请求。Wherein, the target Bluetooth signal contains the first Bluetooth address corresponding to the target audio device. When the terminal determines the target Bluetooth signal corresponding to the target audio device, it can obtain the first Bluetooth address corresponding to the target audio device from the target Bluetooth signal. , and then send a Bluetooth connection request to the target audio device based on the first Bluetooth address.

四、基于第一蓝牙地址与目标音频设备建立蓝牙连接,通过蓝牙组件向目标音频设备发送音频共享请求。4. Establish a Bluetooth connection with the target audio device based on the first Bluetooth address, and send an audio sharing request to the target audio device through the Bluetooth component.

当第一终端获取到目标音频设备对应的第一蓝牙地址后,可以基于该第一蓝牙地址向目标音频设备发送蓝牙连接请求,以便在目标音频设备同意该蓝牙连接请求后,与目标音频设备建立蓝牙连接;并在建立蓝牙连接后通过蓝牙组件向目标音频设备发送音频共享请求。After the first terminal obtains the first Bluetooth address corresponding to the target audio device, it can send a Bluetooth connection request to the target audio device based on the first Bluetooth address, so that after the target audio device agrees to the Bluetooth connection request, it can establish a Bluetooth connection with the target audio device. Bluetooth connection; and send an audio sharing request to the target audio device through the Bluetooth component after the Bluetooth connection is established.

步骤304,响应于通过第二无线通讯组件接收到第一终端发送的数据通讯连接请求,目标音频设备与第一终端建立数据通讯连接,接收第一终端发送的音频共享请求。Step 304, in response to receiving the data communication connection request sent by the first terminal through the second wireless communication component, the target audio device establishes a data communication connection with the first terminal, and receives the audio sharing request sent by the first terminal.

步骤304的实施方式可以参考步骤204,本实施例在此不做赘述。For the implementation manner of step 304, reference may be made to step 204, and details are not described in this embodiment here.

示意性的,若第二无线通讯组件是蓝牙组件,当第一终端需要请求共享目标音频设备中播放的目标音频时,向目标音频设备发送蓝牙连接请求,对应的目标音频设备通过蓝牙组件接收到第一终端发送的蓝牙连接请求,并在同意该蓝牙连接请求后,与第一终端建立蓝牙连接;使得第一终端可以通过蓝牙连接通道向目标音频设备发送音频共享请求,对应目标音频设备接收到第一终端发送的音频共享请求。Schematically, if the second wireless communication component is a Bluetooth component, when the first terminal needs to request to share the target audio played in the target audio device, it sends a Bluetooth connection request to the target audio device, and the corresponding target audio device receives it through the Bluetooth component. The Bluetooth connection request sent by the first terminal, and after agreeing to the Bluetooth connection request, establishes a Bluetooth connection with the first terminal; so that the first terminal can send an audio sharing request to the target audio device through the Bluetooth connection channel, and the corresponding target audio device receives An audio sharing request sent by the first terminal.

步骤305,响应于目标音频设备中播放有目标音频,且接收到对目标音频设备的预设手势操作,目标音频设备向第二终端发送音频信息获取请求,第二终端用于在接收到音频信息获取请求后向目标音频设备发送目标音频信息。Step 305, in response to the target audio device playing the target audio and receiving a preset gesture operation on the target audio device, the target audio device sends an audio information acquisition request to the second terminal, and the second terminal is configured to receive the audio information After obtaining the request, send the target audio information to the target audio device.

其中,预设手势操作可以是对目标音频设备的手势双击操作,或手势单击操作,或对目标实体按键的按压操作,或对目标虚拟按键的按压操作,本实施例对预设手势操作不构成限定。Wherein, the preset gesture operation may be a gesture double-click operation on the target audio device, or a gesture single-click operation, or a press operation on the target physical button, or a press operation on the target virtual button. constituting a limit.

由于目标音频是第二终端通过目标音频设备播放的,存在目标音频设备仅具备音频播放功能,不具备查找音频信息的功能,在一种可能的实施方式中,当接收到对目标音频设备的预设手势操作时,可以向第二终端发送音频信息获取请求,对应的,第二终端在接收到该信息获取请求时,将查找到的目标音频信息反馈给目标音频设备,进而目标音频设备可以将该目标音频信息反馈给第一终端。Since the target audio is played by the second terminal through the target audio device, and the target audio device only has the function of playing audio and does not have the function of searching for audio information, in a possible implementation manner, when receiving the target audio device During gesture operation, an audio information acquisition request can be sent to the second terminal. Correspondingly, when the second terminal receives the information acquisition request, it will feed back the found target audio information to the target audio device, and then the target audio device can send the audio information to the target audio device. The target audio information is fed back to the first terminal.

可选的,为了避免用户误触目标音频设备而导致隐私信息的泄露,在一种可能的实施方式中,当第二终端接收到目标音频设备发送的音频信息获取请求时,可以在第二终端对应的终端界面上显示提示信息,以提示用户是否需要将目标音频信息共享至第一终端;对应的,若第二终端接收到对该提示信息的确认操作,第二终端将该目标音频信息反馈至目标音频设备,进而目标音频设备可以将该目标音频信息共享至第一终端;反之,若第二终端接收到对该提示信息的关闭或取消操作,第二终端停止反馈该目标音频信息。Optionally, in order to avoid leakage of private information caused by the user accidentally touching the target audio device, in a possible implementation manner, when the second terminal receives the audio information acquisition request sent by the target audio device, the second terminal may A prompt message is displayed on the corresponding terminal interface to prompt the user whether the target audio information needs to be shared with the first terminal; correspondingly, if the second terminal receives a confirmation operation on the prompt message, the second terminal will feed back the target audio information to the target audio device, and then the target audio device can share the target audio information to the first terminal; on the contrary, if the second terminal receives the close or cancel operation of the prompt information, the second terminal stops feeding back the target audio information.

可选的,在音频共享场景中,存在用户可能仅需要共享目标音频的当前播放部分,为了避免第一终端需要重新开始播放目标音频,在一种可能的实施方式中,可以在目标音频信息中添加目标音频的当前播放进度,使得第一终端在接收到目标音频信息后,可以从当前播放进度处播放目标音频。Optionally, in an audio sharing scenario, the user may only need to share the currently playing part of the target audio. In order to prevent the first terminal from having to restart playing the target audio, in a possible implementation manner, the target audio information may include The current playback progress of the target audio is added, so that the first terminal can play the target audio from the current playback progress after receiving the target audio information.

步骤306,响应于接收到第二终端发送的目标音频信息,目标音频设备将目标音频信息发送至第一终端。Step 306, in response to receiving the target audio information sent by the second terminal, the target audio device sends the target audio information to the first terminal.

当目标音频设备接收到第二终端反馈的目标音频信息后,可以将该目标音频信息再转发至第一终端,以实现目标音频的共享操作。After receiving the target audio information fed back by the second terminal, the target audio device may forward the target audio information to the first terminal, so as to realize the target audio sharing operation.

步骤307,第一终端接收目标音频设备发送的目标音频信息。Step 307, the first terminal receives the target audio information sent by the target audio device.

在一种可能的实施方式中,当接收到目标音频设备发送的目标音频信息,若目标音频信息中包含目标音频的音频名称,可以调用音频播放应用程序,并基于该音频名称查找到对应的目标音频,进而展示该目标音频对应的音频播放界面。In a possible implementation, when the target audio information sent by the target audio device is received, if the target audio information contains the audio name of the target audio, the audio playback application can be invoked, and the corresponding target can be found based on the audio name. audio, and then display the audio playback interface corresponding to the target audio.

可选的,若目标音频信息中包含目标音频的当前播放进度,第一终端可以根据当前播放进度执行对目标音频的音频播放操作,即第一终端将目标音频对应的音频播放进度调整为目标音频信息中所指示的当前播放进度,从而实现第一终端和目标音频设备中目标音频的同步播放。Optionally, if the target audio information includes the current playback progress of the target audio, the first terminal may perform an audio playback operation on the target audio according to the current playback progress, that is, the first terminal adjusts the audio playback progress corresponding to the target audio to the target audio The current playback progress indicated in the information, so as to realize the synchronous playback of the target audio in the first terminal and the target audio device.

可选的,由于第一终端中运行有用于音频播放的应用程序,当第一终端接收到目标音频设备发送的目标音频信息时,可以直接打开该应用程序,基于音频名称搜索并播放目标音频,也就是说,该应用场景下,第一终端可以在接收到目标音频对应的目标音频信息后,直接根据目标音频信息播放目标音频。Optionally, since the first terminal runs an application for audio playback, when the first terminal receives the target audio information sent by the target audio device, it can directly open the application, search for and play the target audio based on the audio name, That is to say, in this application scenario, after receiving the target audio information corresponding to the target audio, the first terminal can directly play the target audio according to the target audio information.

在其他可能的实施方式中,可能存在某些情况,使得第一终端无法直接播放目标音频,比如,第一终端本身正在执行其他任务进程,或用户仅想通过第一终端了解到该音频设备中正在播放的音频,而无需立即播放该目标音频;或第一终端所处的环境不适合直接外放该目标音频,对于这类情况,当第一终端接收到该目标音频信息后,可以打开音频播放类应用程序,将目标音频添加至音频播放队列中,由用户判断是否需要播放该目标音频。In other possible implementation manners, there may be some circumstances that make it impossible for the first terminal to directly play the target audio, for example, the first terminal itself is performing other task processes, or the user only wants to know the audio frequency of the audio device through the first terminal. It is not necessary to play the target audio immediately; or the environment where the first terminal is located is not suitable for directly playing the target audio. In this case, when the first terminal receives the target audio information, it can turn on the audio The playback application adds the target audio to the audio playback queue, and the user decides whether to play the target audio.

如图4所示,当第一终端410接收到目标音频设备420发送的目标音频信息后,后台直接调用目标音频对应的音频播放应用程序,查找该目标音频,前端界面由共享等待界面414切换为音频播放界面416,该音频播放界面416中可以显示与目标音频对应的音频配图、音频名称、音频来源、播放控件、取消播放控件等。As shown in Figure 4, after the first terminal 410 receives the target audio information sent by the target audio device 420, the background directly invokes the audio playback application program corresponding to the target audio to search for the target audio, and the front-end interface is switched from the sharing waiting interface 414 to An audio playback interface 416, which can display an audio map corresponding to the target audio, audio name, audio source, playback controls, cancel playback controls, and the like.

本实施例中,音频设备通过在UWB信号中携带设备标识和位置信息,使得第一终端可以基于位置信息识别音频设备是否位于目标范围内,并基于该设备标识与音频设备建立蓝牙连接;此外,可以通过对音频设备的预设手势操作,实现对音频共享请求的确认共享操作,可以提高音频共享的便利性;另外,通过在目标音频信息中携带目标音频对应的当前播放进程,可以实现目标音频在目标音频设备和第一终端中的同步播放。In this embodiment, the audio device carries the device identifier and location information in the UWB signal, so that the first terminal can identify whether the audio device is within the target range based on the location information, and establish a Bluetooth connection with the audio device based on the device identifier; in addition, The confirmation and sharing operation of the audio sharing request can be realized through the preset gesture operation on the audio device, which can improve the convenience of audio sharing; in addition, by carrying the current playback process corresponding to the target audio in the target audio information, the target audio can be realized. Synchronized playback in the target audio device and the first terminal.

为了进一步提高音频共享的准确性,以避免终端信息的泄露,即避免其他用户通过上述共享操作未经用户允许获取到到用户音频设备中播放的音频内容,在其他可能的实施方式中,目标音频设备在接收到音频共享请求后,需要向控制目标音频设备播放目标音频的第二终端发送该音频共享请求,以便及时告知用户,并提醒用户是否需要向第一终端共享该目标音频。In order to further improve the accuracy of audio sharing and avoid the disclosure of terminal information, that is, to prevent other users from obtaining the audio content played on the user's audio device through the above sharing operation without the user's permission, in other possible implementations, the target audio After receiving the audio sharing request, the device needs to send the audio sharing request to the second terminal that controls the target audio device to play the target audio, so as to notify the user in time and remind the user whether the target audio needs to be shared with the first terminal.

在一个示例性的例子中,在图3的基础上,如图5所示,步骤305和步骤306可以被替换为步骤501和步骤502。In an exemplary example, on the basis of FIG. 3 , as shown in FIG. 5 , step 305 and step 306 may be replaced by step 501 and step 502 .

步骤501,响应于音频设备中播放有目标音频,目标音频设备向第二终端发送音频共享请求,第二终端用于基于音频共享请求显示共享提示界面。Step 501, in response to the target audio being played in the audio device, the target audio device sends an audio sharing request to the second terminal, and the second terminal is configured to display a sharing prompt interface based on the audio sharing request.

本实施例中,该音频共享请求中可以包含第一终端对应的终端设备标识,以便提醒用户该音频共享请求的来源方。示意性的,该终端设备标识可以是终端名称,或终端机器码,或其他唯一标识第一终端的标识。In this embodiment, the audio sharing request may include a terminal device identifier corresponding to the first terminal, so as to remind the user of the source of the audio sharing request. Schematically, the terminal device identifier may be a terminal name, or a terminal machine code, or another identifier that uniquely identifies the first terminal.

为了进一步提高音频共享的安全性和准确性,在一种可能的实施方式中,当目标音频设备中播放有目标音频时,首先将音频共享请求发送至第二终端,以便第二终端在接收到该音频共享请求时,可以显示共享提示界面,通过该共享提示界面提示用户是否需要将目标音频共享至第一终端。In order to further improve the security and accuracy of audio sharing, in a possible implementation manner, when the target audio device is playing target audio, the audio sharing request is first sent to the second terminal, so that the second terminal receives the When the audio sharing is requested, a sharing prompt interface may be displayed, through which the user is prompted whether to share the target audio to the first terminal.

示意性的,该共享提示界面中可以显示第一终端对应的设备名称。Schematically, the device name corresponding to the first terminal may be displayed on the sharing prompt interface.

如图6所示,当第二终端610接收到第一终端通过目标音频设备发送的音频共享请求后,显示共享提示界面611,该共享提示界面611中显示有第一终端对应的设备名称612、共享控件614和取消共享控件613。As shown in FIG. 6, when the second terminal 610 receives the audio sharing request sent by the first terminal through the target audio device, it displays a sharing prompt interface 611, and the sharing prompt interface 611 displays a device name 612 corresponding to the first terminal, Share control 614 and unshare control 613 .

可选的,由于目标音频是第二终端通过目标音频设备播放的,对应的,第二终端中显示有目标音频的音频播放界面,当第二终端接收到目标音频设备对应的音频共享请求后,可以直接在音频播放界面上显示共享提示信息,该共享提示信息包括第一终端对应的终端名称、共享控件和取消共享控件。Optionally, since the target audio is played by the second terminal through the target audio device, correspondingly, the second terminal displays an audio playback interface for the target audio, and when the second terminal receives the audio sharing request corresponding to the target audio device, Sharing prompt information may be directly displayed on the audio playback interface, where the sharing prompt information includes a terminal name corresponding to the first terminal, a sharing control, and a sharing cancellation control.

如图7所示,当第二终端710通过目标音频设备播放目标音频时(未接收到音频共享请求),第二终端710中显示有音频播放界面711,该音频播放界面711中显示有目标音频对应的播放控件;当第二终端710接收到第一终端通过目标音频设备发送的音频共享请求后,在音频播放界面711上显示第一终端对应的设备名称、共享控件712和取消共享控件713。As shown in Figure 7, when the second terminal 710 plays the target audio through the target audio device (the audio sharing request is not received), an audio playback interface 711 is displayed in the second terminal 710, and the target audio is displayed in the audio playback interface 711. Corresponding playback control: After the second terminal 710 receives the audio sharing request sent by the first terminal through the target audio device, it displays the device name, sharing control 712 and cancel sharing control 713 corresponding to the first terminal on the audio playback interface 711 .

步骤502,目标音频设备接收第二终端发送的确认共享请求,并基于确认共享请求向第一终端发送目标音频信息。Step 502, the target audio device receives the confirmation sharing request sent by the second terminal, and sends target audio information to the first terminal based on the confirmation sharing request.

其中,确认共享请求是第二终端在接收到对共享提示界面的确认操作后向音频设备发送的,且确认共享请求中包含目标音频信息。示意性的,在一种可能的实施方式中,若持有第二终端的用户同意将目标音频共享至第一终端,可以点击共享提示界面中的确认共享控件,对应的,第二终端接收到对该确认共享控件的触发操作,向目标音频设备发送确认共享请求,且该确认共享请求中添加有目标音频信息;对应的,当目标音频设备在接收到该确认共享请求后,可以将目标音频信息发送至第一终端,实现目标音频的共享过程。Wherein, the confirmation sharing request is sent by the second terminal to the audio device after receiving the confirmation operation on the sharing prompt interface, and the confirmation sharing request includes target audio information. Schematically, in a possible implementation manner, if the user holding the second terminal agrees to share the target audio with the first terminal, he can click the confirmation sharing control in the sharing prompt interface, and correspondingly, the second terminal receives The trigger operation of the confirmation sharing control sends a confirmation sharing request to the target audio device, and the confirmation sharing request is added with target audio information; correspondingly, when the target audio device receives the confirmation sharing request, it can send the target audio The information is sent to the first terminal to realize the sharing process of the target audio.

如图6所示,若用户需要将目标音频共享至第一终端,可以点击共享提示界面611中的共享控件614;若用户拒绝将目标音频共享至第一终端,可以点击共享提示界面611中的取消共享控件613。As shown in Figure 6, if the user needs to share the target audio to the first terminal, he can click the sharing control 614 in the sharing prompt interface 611; if the user refuses to share the target audio to the first terminal, he can click on the sharing control in the sharing prompt interface 611 Unshare control 613 .

本实施例中,通过在控制目标音频设备对应的第二终端中显示共享提示界面,以便提示用户是否需要将目标音频共享中第一终端,通过用户在共享提示界面中的操作,确定向第一终端共享目标音频的时机,可以避免误操作而引起用户隐私信息的泄露,进一步提高音频共享过程中的安全性。In this embodiment, by displaying a sharing prompt interface in the second terminal corresponding to the control target audio device, so as to prompt the user whether the target audio needs to be shared with the first terminal, through the user's operation in the sharing prompt interface, it is determined to share with the first terminal. The timing when the terminal shares the target audio can avoid leakage of user privacy information caused by misoperation, and further improve the security in the audio sharing process.

本实施例中,在目标音频设备与第二终端建立有蓝牙连接的基础上,第一终端在音频共享过程中也会与目标音频设备建立有蓝牙连接,从而建立了由第二终端到目标音频设备再到第一终端之间的信息通路,该信息通路除了可以传递目标音频信息之外,还可以传递其他信息,比如,第二终端对应的蓝牙地址,当第一终端获取到第二终端对应的蓝牙地址之后,即可以与第二终端建立蓝牙连接,进而使得后续第一终端可以直接接收第二终端反馈的目标音频信息,而无需经过目标音频设备,从而进一步节省信令开支,并降低目标音频设备的功耗。In this embodiment, on the basis of establishing a Bluetooth connection between the target audio device and the second terminal, the first terminal will also establish a Bluetooth connection with the target audio device during the audio sharing process, thereby establishing a connection between the second terminal and the target audio device. The information path between the device and the first terminal. In addition to transmitting the target audio information, the information path can also transmit other information, such as the Bluetooth address corresponding to the second terminal. When the first terminal obtains the corresponding After the Bluetooth address of the user, a Bluetooth connection can be established with the second terminal, so that the subsequent first terminal can directly receive the target audio information fed back by the second terminal without going through the target audio device, thereby further saving signaling expenses and reducing target audio information. Power consumption of audio equipment.

请参考图8,其示出了本申请另一个示例性实施例提供的音频共享方法的流程图,本申请实施例以该方法应用于图1所示的实施环境为例进行说明,该方法包括:Please refer to FIG. 8, which shows a flow chart of an audio sharing method provided by another exemplary embodiment of the present application. The embodiment of the present application takes the application of the method in the implementation environment shown in FIG. 1 as an example for illustration. The method includes :

步骤801,目标音频设备通过第一无线通讯组件向第一终端发送定位信号。Step 801, the target audio device sends a positioning signal to the first terminal through the first wireless communication component.

步骤802,第一终端通过第一无线通讯组件识别位于目标范围内的目标音频设备。Step 802, the first terminal identifies the target audio device within the target range through the first wireless communication component.

步骤803,第一终端通过第二无线通讯组件与目标音频设备建立数据通讯连接,向目标音频设备发送音频共享请求。Step 803, the first terminal establishes a data communication connection with the target audio device through the second wireless communication component, and sends an audio sharing request to the target audio device.

步骤804,响应于通过第二无线通讯组件接收到第一终端发送的数据通讯连接请求,目标音频设备与第一终端建立数据通讯连接,接收第一终端发送的音频共享请求。Step 804, in response to receiving the data communication connection request sent by the first terminal through the second wireless communication component, the target audio device establishes a data communication connection with the first terminal, and receives the audio sharing request sent by the first terminal.

步骤805,响应于音频设备中播放有目标音频,目标音频设备向第二终端发送音频共享请求,第二终端用于基于音频共享请求显示共享提示界面。Step 805, in response to the target audio being played in the audio device, the target audio device sends an audio sharing request to the second terminal, and the second terminal is configured to display a sharing prompt interface based on the audio sharing request.

步骤801至步骤805的实施方式可以参考上文实施例,本实施例在此不做赘述。For implementation manners of step 801 to step 805, reference may be made to the foregoing embodiments, and details are not described in this embodiment here.

步骤806,目标音频设备接收第二终端发送的第二蓝牙地址,第二蓝牙地址是第二终端在接收到对共享提示界面的确认操作后向音频设备发送的。Step 806, the target audio device receives the second Bluetooth address sent by the second terminal, and the second Bluetooth address is sent to the audio device by the second terminal after receiving the confirmation operation on the sharing prompt interface.

本实施例以第二无线通讯组件是蓝牙组件为例,当第一终端与目标音频设备建立蓝牙连接之后,在目标音频设备本身与第二终端建立蓝牙连接的基础上,即形成了第一终端-目标音频设备-第二终端之间的数据传输通道,对应的,为了避免由目标音频设备间接将目标音频信息传输至第一终端,对目标音频设备的数据传输能力要求更高,在一种可能的实施方式中,可以由目标音频设备将第二终端对应的第二蓝牙地址发给第一终端,使得第一终端可以根据该第二蓝牙地址与第二终端建立蓝牙连接,进而通过第一终端和第二终端之间的蓝牙连接通道传输目标音频信息。In this embodiment, the second wireless communication component is a Bluetooth component as an example. After the first terminal establishes a Bluetooth connection with the target audio device, the first terminal is formed on the basis that the target audio device itself establishes a Bluetooth connection with the second terminal. - The data transmission channel between the target audio device and the second terminal. Correspondingly, in order to prevent the target audio device from indirectly transmitting the target audio information to the first terminal, the data transmission capability of the target audio device is required to be higher. In one In a possible implementation, the target audio device can send the second Bluetooth address corresponding to the second terminal to the first terminal, so that the first terminal can establish a Bluetooth connection with the second terminal according to the second Bluetooth address, and then pass the first The Bluetooth connection channel between the terminal and the second terminal transmits target audio information.

本实施例中,当用户点击共享提示界面中的共享控件后,表示用户需要将目标音频共享至第一终端,为了避免目标音频信息需要经过目标音频设备进行间接传递,在一种可能的实施方式中,第二终端在接收到对共享提示界面的确认操作后,可以首先通过目标音频设备向第一终端发送第二蓝牙地址,使得第一终端在接收到该第二蓝牙地址后,可以与第一终端建立蓝牙连接,进而通过第一终端与第二终端之间的蓝牙连接通道传递目标音频信息。In this embodiment, when the user clicks the sharing control in the sharing prompt interface, it indicates that the user needs to share the target audio to the first terminal. In order to avoid the indirect transmission of the target audio information through the target audio device, in a possible implementation manner In this method, after the second terminal receives the confirmation operation on the sharing prompt interface, it can first send the second Bluetooth address to the first terminal through the target audio device, so that the first terminal can communicate with the first terminal after receiving the second Bluetooth address. A terminal establishes a Bluetooth connection, and then transmits target audio information through the Bluetooth connection channel between the first terminal and the second terminal.

步骤807,目标音频设备向第一终端发送第二蓝牙地址。Step 807, the target audio device sends the second Bluetooth address to the first terminal.

当目标音频设备接收到第二终端发送的第二蓝牙地址后,可以将该第二蓝牙地址发送至第一终端。After receiving the second Bluetooth address sent by the second terminal, the target audio device may send the second Bluetooth address to the first terminal.

步骤808,第一终端接收目标音频设备发送的第二终端对应的第二蓝牙地址。Step 808, the first terminal receives the second Bluetooth address corresponding to the second terminal sent by the target audio device.

对应第一终端通过蓝牙连接通道(目标音频设备与第一终端之间的蓝牙连接通道)接收目标音频设备发送的第二蓝牙地址。Correspondingly, the first terminal receives the second Bluetooth address sent by the target audio device through the Bluetooth connection channel (the Bluetooth connection channel between the target audio device and the first terminal).

步骤809,基于第二蓝牙地址,与第二终端建立蓝牙连接。Step 809: Establish a Bluetooth connection with the second terminal based on the second Bluetooth address.

当第一终端接收到第二蓝牙地址后,可以基于该第二蓝牙地址向第二终端发送蓝牙连接请求,对应第二终端接收该蓝牙连接请求,并在同意后与第一终端建立蓝牙连接。After the first terminal receives the second Bluetooth address, it can send a Bluetooth connection request to the second terminal based on the second Bluetooth address, and the corresponding second terminal receives the Bluetooth connection request and establishes a Bluetooth connection with the first terminal after agreeing.

可选的,当第二终端确定与第一终端建立蓝牙连接后,可以直接通过蓝牙连接通道(第一终端与第二终端之间的蓝牙连接通道)向第一终端发送目标音频对应的目标音频信息,Optionally, after the second terminal determines to establish a Bluetooth connection with the first terminal, it can directly send the target audio corresponding to the target audio to the first terminal through the Bluetooth connection channel (the Bluetooth connection channel between the first terminal and the second terminal) information,

步骤810,响应于第一终端与第二终端建立有数据通讯连接,第一终端接收第二终端发送的目标音频信息。Step 810, in response to establishing a data communication connection between the first terminal and the second terminal, the first terminal receives the target audio information sent by the second terminal.

本实施例以第一终端与第二终端建立的数据通讯连接是蓝牙连接为例,当第一终端与第二终端建立蓝牙连接后,可以通过蓝牙连接通道接收第二终端发送的目标音频信息,无需通过目标音频设备传递目标音频信息,可以降低目标音频设备的功耗。In this embodiment, the data communication connection established between the first terminal and the second terminal is a Bluetooth connection as an example. After the first terminal establishes a Bluetooth connection with the second terminal, the target audio information sent by the second terminal can be received through the Bluetooth connection channel. The power consumption of the target audio device can be reduced by eliminating the need to pass target audio information through the target audio device.

可选的,第一终端与第二终端之间建立的数据通讯连接还可以是红外连接、WiFi连接,或其他通讯连接方式。Optionally, the data communication connection established between the first terminal and the second terminal may also be an infrared connection, a WiFi connection, or other communication connection methods.

本实施例中,通过目标音频设备传递第二终端对应的第二蓝牙地址,使得第一终端可以与第二终端建立蓝牙连接,进而通过第一终端和第二终端之间的蓝牙连接通道传传输目标音频信息,使得无需经过目标音频设备间接传输目标音频信息,可以减少目标音频信息传输过程中的信令开支,进而降低目标音频设备的功耗。In this embodiment, the second Bluetooth address corresponding to the second terminal is transmitted through the target audio device, so that the first terminal can establish a Bluetooth connection with the second terminal, and then transmit the data through the Bluetooth connection channel between the first terminal and the second terminal. The target audio information eliminates the need for indirect transmission of the target audio information through the target audio device, which can reduce the signaling overhead during the transmission of the target audio information, thereby reducing the power consumption of the target audio device.

请参考图9,其示出了本申请一个示例性实施例示出的完整音频共享方法的流程图,本实施例中,以目标音频设备是无线耳机为例进行示例性说明,该方法包括:Please refer to FIG. 9, which shows a flow chart of a complete audio sharing method shown in an exemplary embodiment of the present application. In this embodiment, the target audio device is a wireless headset as an example for illustration. The method includes:

步骤901,第一终端识别到X范围内出现无线耳机。Step 901, the first terminal recognizes that a wireless earphone appears within the X range.

其中,第一终端通过UWB组件识别X范围内是否存在无线耳机。Wherein, the first terminal identifies whether there is a wireless headset within the X range through the UWB component.

步骤902,第一终端中显示“查看正在收听”提示。Step 902, the first terminal displays a prompt of "checking is listening".

其中,查看正在收听提示相当于上文实施例中目标共享控件。Wherein, viewing the listening prompt is equivalent to the target sharing control in the above embodiment.

步骤903,第一终端接收到“对查看正在收听”提示的点击操作,向无线耳机发送音频共享请求。In step 903, the first terminal receives a click operation of the prompt "viewing and listening", and sends an audio sharing request to the wireless earphone.

步骤904,无线耳机接收到音频共享请求,并向第二终端发送音频共享请求。Step 904, the wireless headset receives the audio sharing request, and sends the audio sharing request to the second terminal.

步骤905,当无线耳机接收到第二终端反馈的确认共享请求后,向第一终端发送目标音频信息。Step 905, after the wireless earphone receives the confirmation sharing request fed back by the second terminal, send the target audio information to the first terminal.

步骤906,第一终端等待共享。Step 906, the first terminal waits for sharing.

步骤907,第一终端根据目标音频信息展示共享音频。Step 907, the first terminal presents the shared audio according to the target audio information.

需要说明的是,上述各个实施例中,以目标音频设备为执行主体的步骤可以单独实现成为音频设备侧的音频共享方法,以第一终端为执行主体的步骤可以单独实现成为第一终端侧的音频共享方法,本实施例在此不再赘述。It should be noted that, in each of the above embodiments, the steps with the target audio device as the execution subject can be independently implemented as an audio sharing method on the audio device side, and the steps with the first terminal as the execution subject can be independently implemented as an audio sharing method on the first terminal side. The audio sharing method will not be described in detail here in this embodiment.

下述为本申请装置实施例,可以用于执行本申请方法实施例。对于本申请装置实施例中未披露的细节,请参照本申请方法实施例。The following are device embodiments of the present application, which can be used to implement the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.

请参考图10,其示出了本申请一个实施例提供的音频共享装置的结构框图。该装置具有实现上述方法实施例中由第一终端侧执行的功能。如图10所示,该装置可以包括:Please refer to FIG. 10 , which shows a structural block diagram of an audio sharing device provided by an embodiment of the present application. The apparatus is capable of realizing the functions performed by the first terminal side in the foregoing method embodiments. As shown in Figure 10, the device may include:

识别模块1001,用于通过所述第一无线通讯组件识别位于目标范围内的目标音频设备;An identification module 1001, configured to identify a target audio device within the target range through the first wireless communication component;

第一发送模块1002,用于通过所述第二无线通讯组件与所述目标音频设备建立数据通讯连接,向所述目标音频设备发送音频共享请求,所述音频共享请求用于请求共享所述目标音频设备中播放的目标音频,所述目标音频是第二终端通过所述目标音频设备播放的;The first sending module 1002 is configured to establish a data communication connection with the target audio device through the second wireless communication component, and send an audio sharing request to the target audio device, and the audio sharing request is used to request to share the target The target audio played in the audio device, the target audio is played by the second terminal through the target audio device;

第一接收模块1003,用于接收所述目标音频对应的目标音频信息,所述目标音频信息是在接收到对所述音频共享请求的确认共享操作后向所述第一终端发送的。The first receiving module 1003 is configured to receive target audio information corresponding to the target audio, and the target audio information is sent to the first terminal after receiving a confirmation sharing operation of the audio sharing request.

可选的,所述识别模块1001,包括:Optionally, the identification module 1001 includes:

显示单元,用于响应于识别到位于所述目标范围内的所述目标音频设备,显示共享请求界面,所述共享请求界面中显示有所述目标音频设备对应的目标共享控件;A display unit, configured to display a sharing request interface in response to identifying the target audio device within the target range, where a target sharing control corresponding to the target audio device is displayed in the sharing request interface;

所述第一发送模块1002,包括:The first sending module 1002 includes:

第一发送单元,用于响应于对所述共享请求界面中所述目标共享控件的触发操作,通过所述第二无线通讯组件与所述目标音频设备建立数据通讯连接,向所述目标音频设备发送所述音频共享请求。A first sending unit, configured to, in response to a trigger operation on the target sharing control in the sharing request interface, establish a data communication connection with the target audio device through the second wireless communication component, and send a data communication connection to the target audio device. Send the audio sharing request.

可选的,所述第一无线通讯组件是UWB组件,所述第二无线通讯组件是蓝牙组件;Optionally, the first wireless communication component is a UWB component, and the second wireless communication component is a Bluetooth component;

所述第一发送单元,还用于:The first sending unit is also used for:

响应于对所述共享请求界面中所述目标共享控件的触发操作,基于所述目标音频设备发送的目标UWB信号,确定所述目标音频设备对应的目标设备标识;In response to a trigger operation on the target sharing control in the sharing request interface, based on the target UWB signal sent by the target audio device, determine the target device identifier corresponding to the target audio device;

基于所述目标设备标识,从接收到的至少一个蓝牙信号中确定出所述目标音频设备广播的目标蓝牙信号;determining a target Bluetooth signal broadcast by the target audio device from at least one received Bluetooth signal based on the target device identifier;

根据所述目标蓝牙信号,确定所述目标音频设备对应的第一蓝牙地址;Determine a first Bluetooth address corresponding to the target audio device according to the target Bluetooth signal;

基于所述第一蓝牙地址与所述目标音频设备建立蓝牙连接,通过所述蓝牙组件向所述目标音频设备发送所述音频共享请求。Establishing a Bluetooth connection with the target audio device based on the first Bluetooth address, and sending the audio sharing request to the target audio device through the Bluetooth component.

可选的,所述第一接收模块1003,包括:Optionally, the first receiving module 1003 includes:

第一接收单元,用于接收所述目标音频设备发送的所述目标音频信息,所述目标音频信息是所述第二终端向所述目标音频设备发送的;A first receiving unit, configured to receive the target audio information sent by the target audio device, where the target audio information is sent by the second terminal to the target audio device;

或;or;

第二接收单元,用于响应于所述第一终端与所述第二终端建立有数据通讯连接,接收所述第二终端发送的所述目标音频信息。A second receiving unit, configured to receive the target audio information sent by the second terminal in response to establishing a data communication connection between the first terminal and the second terminal.

可选的,所述第一终端与所述第二终端建立有蓝牙连接;Optionally, the first terminal establishes a Bluetooth connection with the second terminal;

所述装置还包括:The device also includes:

第二接收模块,用于接收所述目标音频设备发送的所述第二终端对应的第二蓝牙地址,所述第二蓝牙地址是所述第二终端在接收到对所述音频共享请求的确认共享操作后向所述目标音频设备发送的;The second receiving module is configured to receive the second bluetooth address corresponding to the second terminal sent by the target audio device, the second bluetooth address is when the second terminal receives an acknowledgment of the audio sharing request sent to the target audio device after the sharing operation;

连接建立模块,用于基于所述第二蓝牙地址,与所述第二终端建立蓝牙连接。A connection establishing module, configured to establish a Bluetooth connection with the second terminal based on the second Bluetooth address.

可选的,所述装置还包括:Optionally, the device also includes:

确定模块,用于基于所述目标音频信息确定所述目标音频的当前播放进度;A determining module, configured to determine the current playback progress of the target audio based on the target audio information;

执行模块,用于基于所述当前播放进度执行对所述目标音频的音频播放操作。An execution module, configured to execute an audio playback operation on the target audio based on the current playback progress.

可选的,所述装置还包括:Optionally, the device also includes:

播放模块,用于根据所述目标音频信息播放所述目标音频;A playback module, configured to play the target audio according to the target audio information;

或,or,

添加模块,用于根据所述目标音频信息,将所述目标音频添加至音频播放队列中。The adding module is configured to add the target audio to the audio playing queue according to the target audio information.

综上所述,本申请实施例中,音频设备通过第一无线通讯组件广播定位信号,使得终端可以通过第一无线通讯组件接收该定位信号,进而根据该定位信号实时确定音频设备的位置信息,从而精确识别出位于目标范围内的目标音频设备,以便与该目标音频设备建立蓝牙连接,从而唤醒音频设备的反向共享,使得在音频共享场景中,既可以由终端将目标音频分享至音频设备,也可以由音频设备将目标音频分享至终端,从而实现音频分享的双向诉求。此外,通过将识别目标音频是否位于目标范围内作为共享音频的判断前提,更符合用户靠近即可分享的行为习惯,同时可以提高确定音频反向共享时机的精确度。To sum up, in the embodiment of the present application, the audio device broadcasts a positioning signal through the first wireless communication component, so that the terminal can receive the positioning signal through the first wireless communication component, and then determine the location information of the audio device in real time according to the positioning signal, In this way, the target audio device located within the target range can be accurately identified, so as to establish a Bluetooth connection with the target audio device, thereby waking up the reverse sharing of the audio device, so that in the audio sharing scenario, the terminal can share the target audio to the audio device , and the audio device can also share the target audio to the terminal, so as to realize the two-way request of audio sharing. In addition, by taking the identification of whether the target audio is within the target range as the premise of sharing audio, it is more in line with the user's behavior habit of sharing when approaching, and at the same time, the accuracy of determining the timing of audio reverse sharing can be improved.

请参考图11,其示出了本申请另一个实施例提供的音频共享装置的结构框图。该装置具有实现上述方法实施例中由音频设备侧执行的功能。如图11所示,该装置可以包括:Please refer to FIG. 11 , which shows a structural block diagram of an audio sharing device provided by another embodiment of the present application. The apparatus is capable of implementing the functions performed by the audio device side in the above method embodiments. As shown in Figure 11, the device may include:

第二发送模块1101,用于通过所述第一无线通讯组件向第一终端发送定位信号,所述第一终端用于根据所述定位信号识别所述音频设备是否位于目标范围内;The second sending module 1101 is configured to send a positioning signal to a first terminal through the first wireless communication component, and the first terminal is used to identify whether the audio device is located within a target range according to the positioning signal;

第二接收模块1102,用于响应于通过第二无线通讯组件接收到所述第一终端发送的数据通讯连接请求,与所述第一终端建立数据通讯连接,接收所述第一终端发送的音频共享请求,所述数据通讯连接请求是所述第一终端在识别到所述音频设备位于所述目标范围内,且需要请求共享所述音频设备中播放的目标音频时发送的;The second receiving module 1102 is configured to establish a data communication connection with the first terminal in response to receiving the data communication connection request sent by the first terminal through the second wireless communication component, and receive the audio sent by the first terminal A sharing request, the data communication connection request is sent by the first terminal when it recognizes that the audio device is within the target range and needs to request to share the target audio played in the audio device;

第三发送模块1103,用于响应于所述音频设备中播放有所述目标音频,且接收到对所述音频共享请求的确认共享操作,向所述第一终端发送所述目标音频对应的目标音频信息,所述目标音频是第二终端通过所述音频设备播放的。The third sending module 1103 is configured to send the target corresponding to the target audio to the first terminal in response to the audio device playing the target audio and receiving a confirmation sharing operation on the audio sharing request Audio information, the target audio is played by the second terminal through the audio device.

可选的,所述第三发送模块1103,包括:Optionally, the third sending module 1103 includes:

第二发送单元,用于响应于所述音频设备中播放有所述目标音频,且接收到对所述音频设备的预设手势操作,向所述第二终端发送音频信息获取请求,所述第二终端用于在接收到所述音频信息获取请求后向所述音频设备发送目标音频信息;The second sending unit is configured to send an audio information acquisition request to the second terminal in response to the audio device playing the target audio and receiving a preset gesture operation on the audio device, the first The second terminal is configured to send target audio information to the audio device after receiving the audio information acquisition request;

第三发送单元,用于响应于接收到所述第二终端发送的所述目标音频信息,将所述目标音频信息发送至所述第一终端。A third sending unit, configured to send the target audio information to the first terminal in response to receiving the target audio information sent by the second terminal.

可选的,所述第三发送模块1103,包括:Optionally, the third sending module 1103 includes:

第四发送单元,用于响应于所述音频设备中播放有所述目标音频,向所述第二终端发送所述音频共享请求,所述第二终端用于基于所述音频共享请求显示共享提示界面;A fourth sending unit, configured to send the audio sharing request to the second terminal in response to the target audio being played in the audio device, and the second terminal is configured to display a sharing prompt based on the audio sharing request interface;

第五发送单元,用于接收所述第二终端发送的确认共享请求,并基于所述确认共享请求向所述第一终端发送所述目标音频信息,所述确认共享请求中包含所述目标音频信息,且所述确认共享请求是所述第二终端在接收到对所述共享提示界面的确认操作后向所述音频设备发送的。A fifth sending unit, configured to receive the confirmation sharing request sent by the second terminal, and send the target audio information to the first terminal based on the confirmation sharing request, and the confirmation sharing request includes the target audio information, and the confirmation sharing request is sent by the second terminal to the audio device after receiving a confirmation operation on the sharing prompt interface.

可选的,所述装置还包括:Optionally, the device also includes:

第三接收模块,用于接收所述第二终端发送的第二蓝牙地址,所述第二蓝牙地址是所述第二终端在接收到对所述共享提示界面的确认操作后向所述音频设备发送的;The third receiving module is configured to receive the second Bluetooth address sent by the second terminal, and the second Bluetooth address is sent to the audio device by the second terminal after receiving the confirmation operation on the sharing prompt interface sent;

第四发送模块,用于向所述第一终端发送所述第二蓝牙地址,所述第一终端用于根据所述第二蓝牙地址与所述第二终端建立蓝牙连接,并在建立蓝牙连接后接收所述第一终端发送的所述目标音频信息。A fourth sending module, configured to send the second Bluetooth address to the first terminal, the first terminal is used to establish a Bluetooth connection with the second terminal according to the second Bluetooth address, and establish a Bluetooth connection Then receive the target audio information sent by the first terminal.

可选的,所述第一无线通讯组件是UWB组件,所述第二无线通讯组件是蓝牙组件;Optionally, the first wireless communication component is a UWB component, and the second wireless communication component is a Bluetooth component;

所述第二发送模块1101,包括:The second sending module 1101 includes:

获取单元,用于获取所述音频设备对应的设备标识和当前位置信息;an acquisition unit, configured to acquire the device identification and current location information corresponding to the audio device;

添加单元,用于将所述设备标识和所述当前位置信息添加在UWB信号中;an adding unit, configured to add the device identifier and the current location information to the UWB signal;

第六发送单元,用于通过所述UWB组件向所述第一终端发送所述UWB信号,所述第一终端用于基于所述当前位置信息识别所述音频设备是否位于所述目标范围内,基于所述设备标识确定所述音频设备广播的目标蓝牙信号,并基于所述目标蓝牙信号中包含的第一蓝牙地址与所述音频设备建立蓝牙连接。a sixth sending unit, configured to send the UWB signal to the first terminal through the UWB component, and the first terminal is configured to identify whether the audio device is within the target range based on the current location information, Determine a target Bluetooth signal broadcast by the audio device based on the device identifier, and establish a Bluetooth connection with the audio device based on a first Bluetooth address included in the target Bluetooth signal.

可选的,所述目标音频信息中包含有所述目标音频对应的当前播放进度,所述第一终端用于根据所述当前播放进度执行对所述目标音频的音频播放操作。Optionally, the target audio information includes a current playback progress corresponding to the target audio, and the first terminal is configured to perform an audio playback operation on the target audio according to the current playback progress.

综上所述,本申请实施例中,音频设备通过第一无线通讯组件广播定位信号,使得终端可以通过设置的第一无线通讯组件接收该定位信号,进而根据该定位信号实时确定音频设备的位置信息,从而精确识别出位于目标范围内的目标音频设备,以便与该目标音频设备建立蓝牙连接,从而唤醒音频设备的反向共享,使得在音频共享场景中,既可以由终端将目标音频分享至音频设备,也可以由音频设备将目标音频分享至终端,从而实现音频分享的双向诉求。此外,通过将识别目标音频是否位于目标范围内作为共享音频的判断前提,更符合用户靠近即可分享的行为习惯,同时可以提高确定音频反向共享时机的精确度。To sum up, in the embodiment of the present application, the audio device broadcasts a positioning signal through the first wireless communication component, so that the terminal can receive the positioning signal through the set first wireless communication component, and then determine the position of the audio device in real time according to the positioning signal Information, so as to accurately identify the target audio device within the target range, so as to establish a Bluetooth connection with the target audio device, thereby waking up the reverse sharing of the audio device, so that in the audio sharing scenario, the terminal can share the target audio to the The audio device can also share the target audio to the terminal by the audio device, so as to realize the two-way request of audio sharing. In addition, by taking the identification of whether the target audio is within the target range as the premise of sharing audio, it is more in line with the user's behavior habit of sharing when approaching, and at the same time, the accuracy of determining the timing of audio reverse sharing can be improved.

需要说明的是:上述实施例提供的装置在实现其功能时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的装置与方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that: when the device provided by the above-mentioned embodiment realizes its function, the division of the above-mentioned functional modules is used as an example for illustration. The internal structure of the system is divided into different functional modules to complete all or part of the functions described above. In addition, the device and the method embodiment provided by the above embodiment belong to the same idea, and the specific implementation process thereof is detailed in the method embodiment, and will not be repeated here.

在一种可能的应用场景中,第一无线通讯组件可以封装为终端的内部天线组件,该第一无线通讯组件通过内部电路板与终端设备电性相连,则对应的终端设备可以通过该第一无线通讯组件接收音频设备广播的定位信号。In a possible application scenario, the first wireless communication component can be packaged as an internal antenna component of the terminal, and the first wireless communication component is electrically connected to the terminal device through an internal circuit board, and the corresponding terminal device can pass through the first The wireless communication component receives the positioning signal broadcast by the audio device.

请参考图12,其示出了本申请一个示例性实施例提供的终端设备1200的结构方框图。本申请中的终端设备1200可以包括一个或多个如下部件:处理器1210、存储器1220、第一无线通讯组件1230和第二无线通讯组件1240,其中,处理器1210分别与存储器1220、第一无线通讯组件1230以及第二无线通讯组件1240电性相连。Please refer to FIG. 12 , which shows a structural block diagram of a terminal device 1200 provided by an exemplary embodiment of the present application. The terminal device 1200 in this application may include one or more of the following components: a processor 1210, a memory 1220, a first wireless communication component 1230, and a second wireless communication component 1240, wherein the processor 1210 communicates with the memory 1220, the first wireless The communication component 1230 and the second wireless communication component 1240 are electrically connected.

处理器1210可以包括一个或者多个处理核心。处理器1210利用各种接口和线路连接整个终端设备1200内的各个部分,通过运行或执行存储在存储器1220内的指令、程序、代码集或指令集,以及调用存储在存储器1220内的数据,执行终端设备1200的各种功能和处理数据。可选地,处理器1210可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器1210可集成CPU、图像处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责触摸显示屏所需要显示的内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器1210中,单独通过一块通信芯片进行实现。Processor 1210 may include one or more processing cores. The processor 1210 uses various interfaces and lines to connect various parts of the entire terminal device 1200, and executes or executes instructions, programs, code sets or instruction sets stored in the memory 1220, and calls data stored in the memory 1220 to execute Various functions and processing data of the terminal device 1200. Optionally, the processor 1210 may use at least one of Digital Signal Processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable Logic Array, PLA). implemented in the form of hardware. The processor 1210 may integrate one or a combination of a CPU, a graphics processor (Graphics Processing Unit, GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs, etc.; the GPU is used for rendering and drawing the content that needs to be displayed on the touch screen; the modem is used for processing wireless communication. It can be understood that the above modem may also not be integrated into the processor 1210, but implemented by a communication chip alone.

存储器1220可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory,ROM)。可选地,该存储器1220包括非瞬时性计算机可读介质(non-transitory computer-readable storage medium)。存储器1220可用于存储指令、程序、代码、代码集或指令集。存储器1220可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于实现至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现上述各个方法实施例的指令等,该操作系统可以是安卓(Android)系统(包括基于Android系统深度开发的系统)、苹果公司开发的IOS系统(包括基于IOS系统深度开发的系统)或其它系统。存储数据区还可以存储终端设备1200在使用中所创建的数据(比如电话本、音视频数据、聊天记录数据)等。The memory 1220 may include a random access memory (Random Access Memory, RAM), and may also include a read-only memory (Read-Only Memory, ROM). Optionally, the memory 1220 includes a non-transitory computer-readable storage medium. The memory 1220 may be used to store instructions, programs, codes, sets of codes or sets of instructions. The memory 1220 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system and instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.) , the instruction etc. that are used to realize above-mentioned each method embodiment, this operating system can be Andrews (Android) system (comprising the system based on the depth development of Android system), the IOS system developed by Apple Inc. (comprising the system based on the depth development of IOS system) or other systems. The storage data area can also store data created by the terminal device 1200 during use (such as phonebook, audio and video data, chat record data) and the like.

本实施例中,终端1200还包括有第一无线通讯组件1230和第二无线通讯组件1240;其中,第一无线通讯组件1230用于精准定位,示意性的,第一无线通讯组件1230可以是UWB组件、蓝牙组件,或其他可以实现室内精准定位的无线通讯组件;第二无线通讯组件1240用于与其他终端设备或音频设备建立数据通讯连接,示意性的,第二无线通讯组件1240可以是蓝牙组件、NFC组件、WiFi组件、红外组件等。In this embodiment, the terminal 1200 also includes a first wireless communication component 1230 and a second wireless communication component 1240; wherein, the first wireless communication component 1230 is used for precise positioning. Schematically, the first wireless communication component 1230 may be a UWB components, bluetooth components, or other wireless communication components that can achieve precise indoor positioning; the second wireless communication component 1240 is used to establish a data communication connection with other terminal equipment or audio equipment. Schematically, the second wireless communication component 1240 can be a bluetooth components, NFC components, WiFi components, infrared components, etc.

本申请实施例中,存储器1220中存储有至少一条指令,该至少一条指令用于被处理器1210执行以执行如上述实施例中所示的音频共享方法。In this embodiment of the present application, at least one instruction is stored in the memory 1220, and the at least one instruction is used to be executed by the processor 1210 to execute the audio sharing method as shown in the above-mentioned embodiments.

可选的,终端设备1200还可以包括触摸显示屏,其可以为电容式触摸显示屏,该电容式触摸显示屏用于接收用户使用手指、触摸笔等任何适合的物体在其上或附近的触摸操作,以及显示各个应用程序的用户界面。触摸显示屏通常设置在终端设备1200的前面板。触摸显示屏可被设计成为全面屏、曲面屏或异型屏。触摸显示屏还可被设计成为全面屏与曲面屏的结合,异型屏与曲面屏的结合,本申请实施例对此不加以限定。Optionally, the terminal device 1200 may also include a touch display screen, which may be a capacitive touch display screen, and the capacitive touch screen screen is used to receive a user's touch on or near it using any suitable object such as a finger or a touch pen. operation, and display the user interface of each application. The touch screen is usually set on the front panel of the terminal device 1200 . Touch screens can be designed as full screens, curved screens or special-shaped screens. The touch display screen can also be designed as a combination of a full screen and a curved screen, or a combination of a special-shaped screen and a curved screen, which is not limited in this embodiment of the present application.

除此之外,本领域技术人员可以理解,上述附图所示出的终端设备1200的结构并不构成对终端设备1200的限定,终端可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。比如,终端设备1200中还包括射频电路、拍摄组件、传感器(不包括温度传感器)、音频电路、无线保真(Wireless Fidelity,WiFi)组件、电源、蓝牙组件等部件,在此不再赘述。In addition, those skilled in the art can understand that the structure of the terminal device 1200 shown in the above drawings does not constitute a limitation on the terminal device 1200, and the terminal may include more or less components than those shown in the figure, or combine certain components, or a different arrangement of components. For example, the terminal device 1200 also includes components such as a radio frequency circuit, a camera component, a sensor (excluding a temperature sensor), an audio circuit, a wireless fidelity (Wireless Fidelity, WiFi) component, a power supply, and a Bluetooth component, which will not be repeated here.

请参考图13,其示出了本申请一个示例性实施例提供的音频设备1300的结构方框图。本申请中的音频设备1300可以包括一个或多个如下部件:存储器1301、处理器1302、第一无线通讯组件1303以及第二无线通讯组件1304。Please refer to FIG. 13 , which shows a structural block diagram of an audio device 1300 provided by an exemplary embodiment of the present application. The audio device 1300 in this application may include one or more of the following components: a memory 1301 , a processor 1302 , a first wireless communication component 1303 and a second wireless communication component 1304 .

存储器1301可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory,ROM)。可选地,该存储器1301包括非瞬时性计算机可读介质(non-transitory computer-readable storage medium)。存储器1301可用于存储指令、程序、代码、代码集或指令集。存储器1301可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现至少一个功能的指令(比如播放功能)、用于实现上述各个方法实施例的指令等。The memory 1301 may include a random access memory (Random Access Memory, RAM), and may also include a read-only memory (Read-Only Memory, ROM). Optionally, the memory 1301 includes a non-transitory computer-readable storage medium (non-transitory computer-readable storage medium). The memory 1301 may be used to store instructions, programs, codes, sets of codes or sets of instructions. The memory 1301 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing at least one function (such as a playback function), instructions for implementing the above-mentioned various method embodiments, and the like.

处理器1302利用各种接口和线路连接整个音频设备1300内的各个部分,通过运行或执行存储在存储器1301内的指令、程序、代码集或指令集,以及调用存储在存储器1301内的数据,执行音频设备1300的各种功能和处理数据。可选的,处理器1302可以采用DSP、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(ProgrammableLogic Array,PLA)中的至少一种硬件形式来实现。处理器1302可集成调制解调器。其中,调制解调器用于处理无线通信。The processor 1302 uses various interfaces and lines to connect various parts of the entire audio device 1300, and executes or executes instructions, programs, code sets or instruction sets stored in the memory 1301, and calls data stored in the memory 1301 to execute Various functions of the audio device 1300 and process data. Optionally, the processor 1302 may be implemented in at least one hardware form of DSP, Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable Logic Array, PLA). Processor 1302 may integrate a modem. Among them, the modem is used to handle wireless communication.

可选的,音频设备1300还可以包括有第一无线通讯组件1303和第二无线通讯组件1304,其中,第一无线通讯组件1303用于精准定位,示意性的,第一无线通讯组件1303可以是UWB组件、蓝牙组件,或其他可以实现精准定位的无线通讯组件;第二无线通讯组件1304用于与其他终端设备建立数据通讯连接,示意性的,第二无线通讯组件1304可以是蓝牙组件、NFC组件、WiFi组件、红外组件等。Optionally, the audio device 1300 may also include a first wireless communication component 1303 and a second wireless communication component 1304, wherein the first wireless communication component 1303 is used for precise positioning. Schematically, the first wireless communication component 1303 may be UWB components, Bluetooth components, or other wireless communication components that can achieve precise positioning; the second wireless communication component 1304 is used to establish a data communication connection with other terminal devices. Schematically, the second wireless communication component 1304 can be a Bluetooth component, NFC components, WiFi components, infrared components, etc.

本实施例中,音频设备1300还包括有扬声器,通过该扬声器播放目标音频。In this embodiment, the audio device 1300 further includes a speaker, and the target audio is played through the speaker.

本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质存储有至少一条指令,所述至少一条指令由处理器加载并执行以实现如上各个实施例所述的音频共享方法。The embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium stores at least one instruction, and the at least one instruction is loaded and executed by a processor to implement the audio sharing method described in each of the above embodiments .

根据本申请的一个方面,提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。音频设备或终端设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得音频设备或终端设备执行上述方面的各种可选实现方式中提供的音频共享方法。According to an aspect of the present application there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the audio device or the terminal device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the audio device or the terminal device executes the audio sharing method provided in various optional implementation manners of the above aspects.

本领域技术人员应该可以意识到,在上述一个或多个示例中,本申请实施例所描述的功能可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些功能存储在计算机可读存储介质中或者作为计算机可读存储介质上的一个或多个指令或代码进行传输。计算机可读存储介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是通用或专用计算机能够存取的任何可用介质。Those skilled in the art should be aware that, in the foregoing one or more examples, the functions described in the embodiments of the present application may be implemented by hardware, software, firmware or any combination thereof. When implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable storage medium. Computer-readable storage media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.

以上所述仅为本申请的可选实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above are only optional embodiments of the application, and are not intended to limit the application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the application shall be included in the protection of the application. within range.

Claims (18)

1. An audio sharing method is applied to a first terminal, the first terminal is provided with a first wireless communication component and a second wireless communication component, and the method comprises the following steps:
identifying, by the first wireless communication component, a target audio device located within a target range;
establishing data communication connection with the target audio equipment through the second wireless communication component, and sending an audio sharing request to the target audio equipment, wherein the audio sharing request is used for requesting to share target audio played in the target audio equipment, and the target audio is played by a second terminal through the target audio equipment;
and receiving target audio information corresponding to the target audio, wherein the target audio information is sent to the first terminal after receiving the sharing confirmation operation of the audio sharing request.
2. The method of claim 1, wherein identifying, by the first wireless communication component, a target audio device within a target range comprises:
responding to the target audio equipment which is identified to be located in the target range, and displaying a sharing request interface, wherein a target sharing control corresponding to the target audio equipment is displayed in the sharing request interface;
the establishing of the data communication connection with the target audio device through the second wireless communication component and the sending of the audio sharing request to the target audio device include:
responding to the triggering operation of the target sharing control in the sharing request interface, establishing data communication connection with the target audio equipment through the second wireless communication assembly, and sending the audio sharing request to the target audio equipment.
3. The method of claim 2, wherein the first wireless communication component is a UWB component and the second wireless communication component is a bluetooth component;
the sending the audio sharing request to the target audio device by establishing data communication connection with the target audio device through the second wireless communication component in response to the triggering operation of the target sharing control in the sharing request interface includes:
responding to the triggering operation of the target sharing control in the sharing request interface, and determining a target device identifier corresponding to the target audio device based on a target UWB signal sent by the target audio device;
determining a target Bluetooth signal broadcasted by the target audio device from the received at least one Bluetooth signal based on the target device identification;
determining a first Bluetooth address corresponding to the target audio equipment according to the target Bluetooth signal;
and establishing Bluetooth connection with the target audio equipment based on the first Bluetooth address, and sending the audio sharing request to the target audio equipment through the Bluetooth component.
4. The method according to any one of claims 1 to 3, wherein the receiving target audio information corresponding to the target audio comprises:
receiving the target audio information sent by the target audio equipment, wherein the target audio information is sent to the target audio equipment by the second terminal;
or;
and receiving the target audio information sent by the second terminal in response to the first terminal establishing data communication connection with the second terminal.
5. The method of claim 4, wherein the first terminal establishes a Bluetooth connection with the second terminal;
before the responding to that the first terminal establishes the data communication connection with the second terminal and receiving the target audio information sent by the second terminal, the method further includes:
receiving a second Bluetooth address corresponding to the second terminal and sent by the target audio equipment, wherein the second Bluetooth address is sent by the second terminal to the target audio equipment after receiving the sharing confirmation operation of the audio sharing request;
and establishing Bluetooth connection with the second terminal based on the second Bluetooth address.
6. The method according to any one of claims 1 to 3, wherein after receiving the target audio information corresponding to the target audio, the method further comprises:
determining the current playing progress of the target audio based on the target audio information;
and executing the audio playing operation of the target audio based on the current playing progress.
7. The method according to any one of claims 1 to 3, wherein after receiving the target audio information corresponding to the target audio, the method further comprises:
playing the target audio according to the target audio information;
or the like, or, alternatively,
and adding the target audio to an audio play queue according to the target audio information.
8. An audio sharing method is applied to an audio device, the audio device is provided with a first wireless communication component and a second wireless communication component, and the method comprises the following steps:
sending a positioning signal to a first terminal through the first wireless communication assembly, wherein the first terminal is used for identifying whether the audio equipment is located in a target range according to the positioning signal;
responding to a data communication connection request sent by the first terminal and received through the second wireless communication component, establishing data communication connection with the first terminal, and receiving an audio sharing request sent by the first terminal, wherein the data communication connection request is sent by the first terminal when the first terminal recognizes that the audio equipment is located in the target range and needs to request to share target audio played in the audio equipment;
and responding to the target audio played in the audio equipment and receiving a sharing confirmation operation of the audio sharing request, and sending target audio information corresponding to the target audio to the first terminal, wherein the target audio is played by the second terminal through the audio equipment.
9. The method according to claim 8, wherein the sending, to the first terminal, target audio information corresponding to the target audio in response to the audio device playing the target audio and receiving a confirmation sharing operation of the audio sharing request comprises:
responding to the target audio played in the audio equipment and receiving a preset gesture operation on the audio equipment, and sending an audio information acquisition request to the second terminal, wherein the second terminal is used for sending target audio information to the audio equipment after receiving the audio information acquisition request;
and responding to the received target audio information sent by the second terminal, and sending the target audio information to the first terminal.
10. The method according to claim 8, wherein the sending, to the first terminal, target audio information corresponding to the target audio in response to the audio device playing the target audio and receiving a confirmation sharing operation of the audio sharing request comprises:
responding to the target audio played in the audio equipment, and sending the audio sharing request to the second terminal, wherein the second terminal is used for displaying a sharing prompt interface based on the audio sharing request;
receiving a sharing confirmation request sent by the second terminal, and sending the target audio information to the first terminal based on the sharing confirmation request, wherein the sharing confirmation request comprises the target audio information, and the sharing confirmation request is sent to the audio equipment by the second terminal after receiving a confirmation operation on the sharing prompt interface.
11. The method of claim 10, wherein after sending the audio sharing request to the second terminal in response to the target audio being played in the audio device, the method further comprises:
receiving a second Bluetooth address sent by the second terminal, wherein the second Bluetooth address is sent to the audio device by the second terminal after receiving the confirmation operation of the sharing prompt interface;
and sending the second Bluetooth address to the first terminal, wherein the first terminal is used for establishing Bluetooth connection with the second terminal according to the second Bluetooth address and receiving the target audio information sent by the first terminal after establishing the Bluetooth connection.
12. The method of any of claims 8 to 11, wherein the first wireless communication module is a UWB module and the second wireless communication module is a bluetooth module;
the sending of the positioning signal to the first terminal through the first wireless communication component includes:
acquiring a device identifier and current position information corresponding to the audio device;
adding the device identification and the current location information in a UWB signal;
the first terminal is used for identifying whether the audio equipment is located in the target range or not based on the current position information, determining a target Bluetooth signal broadcasted by the audio equipment based on the equipment identification, and establishing Bluetooth connection with the audio equipment based on a first Bluetooth address contained in the target Bluetooth signal.
13. The method according to any one of claims 8 to 11, wherein the target audio information includes a current playing progress corresponding to the target audio, and the first terminal is configured to execute an audio playing operation on the target audio according to the current playing progress.
14. An audio sharing apparatus applied to a first terminal provided with a first wireless communication component and a second wireless communication component, the apparatus comprising:
an identification module for identifying a target audio device located within a target range via the first wireless communication component;
a first sending module, configured to establish a data communication connection with the target audio device through the second wireless communication component, and send an audio sharing request to the target audio device, where the audio sharing request is used to request to share a target audio played in the target audio device, and the target audio is played by a second terminal through the target audio device;
a first receiving module, configured to receive target audio information corresponding to the target audio, where the target audio information is sent to the first terminal after receiving a sharing confirmation operation of the audio sharing request.
15. An audio sharing apparatus, the apparatus being applied to an audio device provided with a first wireless communication component and a second wireless communication component, the apparatus comprising:
the second sending module is used for sending a positioning signal to a first terminal through the first wireless communication assembly, and the first terminal is used for identifying whether the audio equipment is located in a target range according to the positioning signal;
a second receiving module, configured to establish a data communication connection with the first terminal in response to receiving, by the second wireless communication component, a data communication connection request sent by the first terminal, and receive an audio sharing request sent by the first terminal, where the data communication connection request is sent by the first terminal when the first terminal recognizes that the audio device is located within the target range and needs to request to share a target audio played in the audio device;
and a third sending module, configured to send, in response to that the target audio is played in the audio device and a sharing confirmation operation of the audio sharing request is received, target audio information corresponding to the target audio to the first terminal, where the target audio is played by the second terminal through the audio device.
16. A terminal, characterized in that the terminal comprises a processor and a memory, wherein at least one program is stored in the memory, and the at least one program is loaded and executed by the processor to implement the audio sharing method according to any one of claims 1 to 7.
17. An audio device, characterized in that the audio device comprises a processor and a memory, wherein at least one program is stored in the memory, and the at least one program is loaded and executed by the processor to implement the audio sharing method according to any one of claims 8 to 13.
18. A computer-readable storage medium, in which at least one program is stored, the at least one program being loaded and executed by a processor to implement the audio sharing method according to any one of claims 1 to 7 or the audio sharing method according to any one of claims 8 to 13.
CN202110585224.3A 2021-05-27 2021-05-27 Audio sharing method, device, terminal, audio equipment and storage medium Pending CN115412835A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110585224.3A CN115412835A (en) 2021-05-27 2021-05-27 Audio sharing method, device, terminal, audio equipment and storage medium
PCT/CN2022/089205 WO2022247561A1 (en) 2021-05-27 2022-04-26 Audio sharing method and apparatus, terminal, audio device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110585224.3A CN115412835A (en) 2021-05-27 2021-05-27 Audio sharing method, device, terminal, audio equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115412835A true CN115412835A (en) 2022-11-29

Family

ID=84155755

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110585224.3A Pending CN115412835A (en) 2021-05-27 2021-05-27 Audio sharing method, device, terminal, audio equipment and storage medium

Country Status (2)

Country Link
CN (1) CN115412835A (en)
WO (1) WO2022247561A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116915350A (en) * 2023-03-30 2023-10-20 海信视像科技股份有限公司 display screen

Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101277275A (en) * 2007-03-26 2008-10-01 国际商业机器公司 Method and system for delivering audio messages to listeners of audio player devices
CN101689876A (en) * 2007-07-13 2010-03-31 伯斯有限公司 Point-to-point ANTENN AUDIO transmission
US20120202424A1 (en) * 2011-02-07 2012-08-09 Samsung Electronics Co., Ltd. Apparatus and method for playing music
CN103391118A (en) * 2013-07-23 2013-11-13 广东欧珀移动通信有限公司 A bluetooth headset and a method for sharing audio using the bluetooth headset
CN104010226A (en) * 2014-06-17 2014-08-27 合一网络技术(北京)有限公司 Multi-terminal interactive playing method and system based on voice frequency
CN104539319A (en) * 2014-12-16 2015-04-22 惠州Tcl移动通信有限公司 Music sharing method and system based on Bluetooth headset
CN105072146A (en) * 2015-06-30 2015-11-18 广东欧珀移动通信有限公司 Music information sharing method and device
CN105185391A (en) * 2015-08-27 2015-12-23 三星电子(中国)研发中心 Method and device for multi-user sound box control
CN105208511A (en) * 2015-08-28 2015-12-30 深圳市冠旭电子有限公司 Intelligent Bluetooth earphone-based music sharing method, system and intelligent Bluetooth earphone
CN105810220A (en) * 2016-03-22 2016-07-27 广东欧珀移动通信有限公司 Control method, apparatus and system for music playback system
CN105847880A (en) * 2016-03-29 2016-08-10 乐视控股(北京)有限公司 Audio-video sharing method, server and terminal
WO2017016118A1 (en) * 2015-07-30 2017-02-02 广东欧珀移动通信有限公司 Bluetooth connection-based audio playback method and apparatus
CN106507184A (en) * 2016-10-21 2017-03-15 乐视控股(北京)有限公司 Media file shares terminal, receiving terminal, transmission method and electronic equipment
CN106550488A (en) * 2016-10-21 2017-03-29 乐视控股(北京)有限公司 The sharing method of multimedia file, the terminal for sharing file and electronic equipment
CN107409265A (en) * 2014-12-23 2017-11-28 T·德格雷伊 Audio sharing method and system
WO2020132818A1 (en) * 2018-12-24 2020-07-02 华为技术有限公司 Wireless short-distance audio sharing method and electronic device
CN111586662A (en) * 2020-05-22 2020-08-25 维沃移动通信有限公司 Sharing method and audio output device
CN112291708A (en) * 2020-11-27 2021-01-29 歌尔科技有限公司 Data transmission method, device, equipment and computer readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103825635B (en) * 2014-03-11 2016-04-06 宁波翼动通讯科技有限公司 A kind of method utilizing bluetooth earphone to share audio frequency

Patent Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101277275A (en) * 2007-03-26 2008-10-01 国际商业机器公司 Method and system for delivering audio messages to listeners of audio player devices
CN101689876A (en) * 2007-07-13 2010-03-31 伯斯有限公司 Point-to-point ANTENN AUDIO transmission
US20120202424A1 (en) * 2011-02-07 2012-08-09 Samsung Electronics Co., Ltd. Apparatus and method for playing music
CN103391118A (en) * 2013-07-23 2013-11-13 广东欧珀移动通信有限公司 A bluetooth headset and a method for sharing audio using the bluetooth headset
CN104010226A (en) * 2014-06-17 2014-08-27 合一网络技术(北京)有限公司 Multi-terminal interactive playing method and system based on voice frequency
CN104539319A (en) * 2014-12-16 2015-04-22 惠州Tcl移动通信有限公司 Music sharing method and system based on Bluetooth headset
CN107409265A (en) * 2014-12-23 2017-11-28 T·德格雷伊 Audio sharing method and system
CN105072146A (en) * 2015-06-30 2015-11-18 广东欧珀移动通信有限公司 Music information sharing method and device
WO2017016118A1 (en) * 2015-07-30 2017-02-02 广东欧珀移动通信有限公司 Bluetooth connection-based audio playback method and apparatus
US20170093510A1 (en) * 2015-07-30 2017-03-30 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Audio playing method and apparatus based on bluetooth connection
CN105185391A (en) * 2015-08-27 2015-12-23 三星电子(中国)研发中心 Method and device for multi-user sound box control
CN105208511A (en) * 2015-08-28 2015-12-30 深圳市冠旭电子有限公司 Intelligent Bluetooth earphone-based music sharing method, system and intelligent Bluetooth earphone
CN105810220A (en) * 2016-03-22 2016-07-27 广东欧珀移动通信有限公司 Control method, apparatus and system for music playback system
CN105847880A (en) * 2016-03-29 2016-08-10 乐视控股(北京)有限公司 Audio-video sharing method, server and terminal
CN106507184A (en) * 2016-10-21 2017-03-15 乐视控股(北京)有限公司 Media file shares terminal, receiving terminal, transmission method and electronic equipment
CN106550488A (en) * 2016-10-21 2017-03-29 乐视控股(北京)有限公司 The sharing method of multimedia file, the terminal for sharing file and electronic equipment
WO2020132818A1 (en) * 2018-12-24 2020-07-02 华为技术有限公司 Wireless short-distance audio sharing method and electronic device
CN111586662A (en) * 2020-05-22 2020-08-25 维沃移动通信有限公司 Sharing method and audio output device
CN112291708A (en) * 2020-11-27 2021-01-29 歌尔科技有限公司 Data transmission method, device, equipment and computer readable storage medium

Also Published As

Publication number Publication date
WO2022247561A1 (en) 2022-12-01

Similar Documents

Publication Publication Date Title
CN110622123B (en) Display method and device
US10834237B2 (en) Method, apparatus, and storage medium for controlling cooperation of multiple intelligent devices with social application platform
US11204684B2 (en) Sticker presentation method and apparatus and computer-readable storage medium
TWI442081B (en) Method and handheld communication apparatus for transfering task among multiple apparatuses
US10951557B2 (en) Information interaction method and terminal
WO2023284418A1 (en) Positioning method and apparatus, and electronic device and computer-readable storage medium
US11089539B2 (en) Data processing method, terminal, and base station
US11399088B2 (en) Method for establishing communication connection and related products
CN106445457A (en) Headphone sound channel switching method and device
WO2024055494A1 (en) Call method and apparatus based on bluetooth earphone, and storage medium
WO2022048453A1 (en) Unlocking method and electronic device
CN113805837A (en) Audio processing method, mobile terminal and storage medium
WO2021052333A1 (en) Message reply method, device, and mobile terminal
WO2022247561A1 (en) Audio sharing method and apparatus, terminal, audio device, and storage medium
CN110072295B (en) Dual-channel communication method, device, first terminal and medium
WO2022247558A1 (en) Audio sharing method and apparatus, terminal, audio device and storage medium
WO2019191996A1 (en) Data transmission method and device
CN109068317A (en) Communication means, communication processing apparatus and computer readable storage medium
KR102327665B1 (en) Method, apparatus and terminal device for determining the position of a paging frame
US10853412B2 (en) Scenario-based sound effect control method and electronic device
CN111083285A (en) Mobile terminal call positioning system and method
CN115696637A (en) Information acquisition method and device, bluetooth device, terminal device and storage medium
CN109068370A (en) Communication means, mobile terminal and computer readable storage medium
CN109121087A (en) Communication means, terminal and computer readable storage medium
CN109064208A (en) Advertisement sending method, playback method, terminal 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