WO2022247561A1 - 音频共享方法、装置、终端、音频设备及存储介质 - Google Patents

音频共享方法、装置、终端、音频设备及存储介质 Download PDF

Info

Publication number
WO2022247561A1
WO2022247561A1 PCT/CN2022/089205 CN2022089205W WO2022247561A1 WO 2022247561 A1 WO2022247561 A1 WO 2022247561A1 CN 2022089205 W CN2022089205 W CN 2022089205W WO 2022247561 A1 WO2022247561 A1 WO 2022247561A1
Authority
WO
WIPO (PCT)
Prior art keywords
audio
terminal
target
target audio
audio device
Prior art date
Application number
PCT/CN2022/089205
Other languages
English (en)
French (fr)
Inventor
张坤
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2022247561A1 publication Critical patent/WO2022247561A1/zh

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

Definitions

  • 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.
  • the user can play audio directly through the terminal, or connect the terminal to an external device for audio playback.
  • the audio on the terminal can be played through the wireless headset.
  • 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.
  • Embodiments of the present application provide an audio sharing method, device, terminal, audio equipment, and storage medium. Described technical scheme is as follows:
  • 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:
  • 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:
  • the second wireless communication component When the second wireless communication component receives the data communication connection request sent by the first terminal, establish a data communication connection with the first terminal, receive the audio sharing request sent by the first terminal, and 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;
  • the target audio When the target audio is played in the audio device, and when a confirmation sharing operation is received for the audio sharing request, the target audio information corresponding to the target audio is sent to the first terminal, and the target The audio is played by the second terminal through the audio device.
  • 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 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 sharing of the target audio device
  • the target audio played, the target audio is played by the second terminal through the target audio device
  • the 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.
  • 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:
  • a sending module 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;
  • the receiving module is configured to establish a data communication connection with the first terminal after receiving the data communication connection request sent by the first terminal through the second wireless communication component, and receive the audio sharing request sent by the first terminal , 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;
  • the sending module is further configured to send the target audio corresponding to the first terminal to the first terminal when the target audio is played in the audio device and a confirmation sharing operation of the audio sharing request is received. target audio information, where the target audio is played by the second terminal through the audio device.
  • 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.
  • 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 aspects.
  • 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.
  • an embodiment of the present application provides a computer program product, where the computer program product includes computer instructions, and the computer instructions are stored in a computer-readable storage medium.
  • the processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the audio sharing method provided in various optional implementation manners of the above aspect.
  • FIG. 1 shows a schematic diagram of an implementation environment of an exemplary embodiment of the present application
  • FIG. 2 shows a flowchart of an audio sharing method provided by an exemplary embodiment of the present application
  • FIG. 3 shows a flowchart of an audio sharing method provided by another exemplary embodiment of the present application
  • FIG. 4 shows a schematic interface diagram of an audio sharing process shown in an exemplary embodiment of the present application
  • FIG. 5 shows a flowchart of an audio sharing method provided by another exemplary embodiment of the present application.
  • Fig. 6 shows a schematic diagram of a sharing prompt interface shown in an exemplary embodiment of the present application
  • Fig. 7 shows a schematic diagram of a sharing prompt interface shown in another exemplary embodiment of the present application.
  • FIG. 8 shows a flowchart of an audio sharing method provided by another exemplary embodiment of the present application.
  • FIG. 9 shows a flowchart of a complete audio sharing method shown in an exemplary embodiment of the present application.
  • FIG. 10 shows a structural block diagram of an audio sharing device provided by an embodiment of the present application.
  • Fig. 11 shows a structural block diagram of an audio sharing device provided by another embodiment of the present application.
  • Fig. 12 shows a structural block diagram of a terminal device provided by an exemplary embodiment of the present application.
  • Fig. 13 shows a structural block diagram of an audio device provided by an exemplary embodiment of the present application.
  • 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.
  • 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 .
  • the first terminal 110 is a terminal running an audio playback application program, which may be a portable electronic device such as a smart phone, a tablet computer, a smart watch, or a smart speaker.
  • 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.
  • 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.
  • the second wireless communication component can be a Bluetooth component, a near field communication (Near Field Communication, NFC) components, WiFi components, infrared components, etc.
  • NFC Near Field Communication
  • 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 .
  • the audio device 120 is a device with an audio playback function, which may be a Bluetooth earphone, a smart speaker, and the like.
  • 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.
  • 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.
  • the second wireless communication component can be a Bluetooth component, an NFC component, a WiFi component, an infrared components etc.
  • 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
  • the first terminal 110 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;
  • 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.
  • the audio device 120 may receive the audio sharing request sent
  • the second terminal 130 is a terminal running an audio playback application program, which may be a portable electronic device such as a smart phone, a tablet computer, a smart watch, and a smart speaker.
  • 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 .
  • 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.
  • a Bluetooth address the Bluetooth address corresponding to the second terminal 130
  • FIG. 2 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:
  • Step 201 the target audio device sends a positioning signal to the first terminal through the first wireless communication component.
  • the first wireless communication component may be a UWB component, a Bluetooth component, or other components that can achieve precise positioning.
  • this embodiment takes an audio device with a UWB component as an example.
  • the location information corresponding to the audio device can be determined through the UWB component positioning technology.
  • the 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • the terminal 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.
  • 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.
  • 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.
  • the audio device 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.
  • Step 202 the first terminal identifies the target audio device within the target range through the first wireless communication component.
  • the first terminal 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.
  • the first wireless communication component may be a UWB component, a Bluetooth component, or other communication components capable of precise positioning.
  • the terminal and the audio device need to broadcast and receive positioning signals to realize the purpose of the terminal identifying whether the audio device is within the target range. Therefore, the terminal and the audio device need to set the same first
  • the wireless communication component for example, 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, so that the audio device can be positioned interactively through the UWB 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.
  • 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.
  • 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.
  • the UWB component in indoor positioning 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.
  • the first terminal can also be based on the UWB ranging principle , to determine the distance between the first terminal and the audio device, and then determine whether the audio device is within the target range of the first terminal.
  • the specific UWB ranging principles that can be used include: signal arrival difference ranging (Phase-Difference-of-Arrival) , PDOA), Single Sided Two Way Ranging (Single Sided Two Way Ranging, SS-TWR), Double Side Two Way Ranging (Double Side Two Way Ranging, DS-TWR), PDOA+TWR, etc., this embodiment is specific to the first terminal
  • the UWB ranging principle used does not constitute a limitation.
  • the process of determining the distance between the audio device and the first terminal can be as follows: the first terminal sends a ranging request signal to the audio device through the UWB component, and the audio device receives the ranging request After receiving the signal, the ranging response signal is fed back to the first terminal, and the corresponding terminal determines the distance between the first terminal and the audio device based on the received ranging response signal.
  • the first terminal uses the UWB ranging principle to identify the audio device within the target range, when the audio device broadcasts the UWB signal (positioning signal) through the UWB component, it does not need to add location information to the UWB signal, only needs to add The device ID of the audio device is sufficient.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • the terminal party actively obtains the audio played in the audio device, for the safety of the audio played in the audio device, it is necessary for the audio device side to confirm whether it is allowed to share the audio with the terminal party. Therefore, in a In a possible implementation manner, 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 You can manually confirm whether to agree to the audio sharing request.
  • a data communication connection can be established with the target audio device first, and an audio sharing request can be sent to the target audio device after the data communication connection is established.
  • 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, so as to realize subsequent data transmission through the data communication connection.
  • 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.
  • Step 204 when 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.
  • the first terminal when it 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 to The audio device establishes a data communication connection with the first terminal.
  • 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 data communication with the first terminal. connection, and subsequently the first terminal can 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.
  • 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.
  • the target audio device 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.
  • 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.
  • Step 205 When the target audio device is playing the target audio and receives a confirmation share 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.
  • the user or the first terminal cannot predetermine whether the target audio device has audio. Therefore,
  • the target audio device receives the audio sharing request, it first needs to determine whether the target audio is played in the target audio device, and if it is determined that the target audio is played, perform subsequent reverse audio Conversely, if no audio is played in the target audio device, there is no need to perform subsequent audio sharing operations.
  • 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.
  • 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 first terminal, that is to say, when the target audio device plays the target audio and receives 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 The target audio played in the audio device is shared with the first terminal.
  • 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.
  • the confirmation operation can also be performed on the second terminal to realize the Acknowledgment share operation for audio share request.
  • the target audio device cannot share the target audio information with the first terminal.
  • 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.
  • the target audio information may be an audio name of the target audio.
  • Step 206 the first terminal receives target audio information corresponding to the target audio.
  • the first terminal 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.
  • the first terminal 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.
  • 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.
  • the first terminal 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.
  • 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.
  • 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.
  • the first terminal may cancel the audio sharing request for the target audio at any time.
  • the target audio information may be the audio name of the target audio, or the audio data stream corresponding to the target audio; optionally, when the target audio information is an audio name, the target audio information may also include the target audio The current playback progress in the audio device.
  • 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
  • the audio device can also share the target audio to the terminal, so as to realize the two-way request of audio sharing.
  • 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.
  • identifying a target audio device within the target range through the first wireless communication component includes:
  • a sharing request interface is displayed, and a target sharing control corresponding to the target audio device is displayed in the sharing request interface;
  • a data communication connection is established with the target audio device through the second wireless communication component, and an audio sharing request is sent to the target audio device.
  • the first wireless communication component is a UWB component
  • the second wireless communication component is a Bluetooth component
  • a data communication connection is established with the target audio device through the second wireless communication component, and an audio sharing request is sent to the target audio device, including:
  • a Bluetooth connection is established with the target audio device based on the first Bluetooth address, and an audio sharing request is sent to the target audio device through the Bluetooth component.
  • receive target audio information corresponding to the target audio including:
  • the target audio information sent by the second terminal is received.
  • the first terminal establishes a Bluetooth connection with the second terminal
  • the method further includes:
  • the second Bluetooth address is sent by the second terminal to the target audio device after receiving the confirmation sharing operation of the audio sharing request;
  • the method further includes:
  • the method further includes:
  • the target audio information corresponding to the target audio is sent to the first terminal, including:
  • an audio information acquisition request is sent to the second terminal, and the second terminal is used to send the audio information to the audio device after receiving the audio information acquisition request.
  • the target audio information sent by the second terminal is received, the target audio information is sent to the first terminal.
  • the target audio information corresponding to the target audio is sent to the first terminal, including:
  • an audio sharing request is sent to the second terminal, and the second terminal is used to display a sharing prompt interface based on the audio sharing request;
  • the method further includes:
  • the second bluetooth address is sent by the second terminal to the audio device after receiving the confirmation operation on the sharing prompt interface;
  • the first terminal is used to establish a Bluetooth connection with the second terminal according to the second Bluetooth address, and receive the target audio information sent by the first terminal after the Bluetooth connection is established.
  • the first wireless communication component is a UWB component
  • the second wireless communication component is a Bluetooth component
  • Sending a positioning signal to the first terminal through the first wireless communication component includes:
  • a Bluetooth address establishes a Bluetooth connection with the audio device.
  • the target audio information includes a current playback progress corresponding to the target audio
  • the first terminal is configured to perform an audio playback operation on the target audio according to the current playback progress.
  • the target sharing control will be displayed in the current user interface of the first terminal, so that the user can determine whether to perform subsequent audio sharing operations.
  • FIG. 3 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 :
  • Step 301 the target audio device sends a positioning signal to the first terminal through the first wireless communication component.
  • the first terminal 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.
  • the process for the audio device to send the positioning signal may include the following steps:
  • 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.
  • the time of flight ranging method Time of Flight, ToF
  • TDoA Time Difference of Arrival
  • 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.
  • the positioning signal broadcast by the UWB component is a UWB signal.
  • 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.
  • the audio device adds the device identifier and current location information to the UWB signal.
  • 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.
  • Step 302 when the target audio device located within the target range is identified, the first terminal displays a sharing request interface, where a target sharing control corresponding to the target audio device is displayed.
  • 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.
  • the sharing request interface may be displayed in the form of a floating window, so as to not affect the current user interface displayed by the first terminal while displaying the sharing request interface .
  • the device icon corresponding to the target audio device can also be displayed in the sharing request interface.
  • 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 can be displayed in the sharing request interface to remind the user of the identified target audio device.
  • the device identifier may also be displayed on the sharing request interface, so that the user can determine the identified target audio device.
  • FIG. 4 it shows a schematic interface of an audio sharing process shown in an exemplary embodiment of the present application.
  • the first terminal 410 displays a sharing request interface 411, wherein the sharing request interface 411 displays audio The device identifier 412 and target sharing control 413 corresponding to the device 420 .
  • 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.
  • 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 connect with the target audio device To establish a Bluetooth connection 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 a trigger operation on the target sharing control, it can correspond to the target sharing control
  • the target audio device establishes a data communication connection, and sends an audio sharing request to the target audio device after the data communication connection is established.
  • the process of establishing a Bluetooth connection between the first terminal and the target audio device may include the following steps:
  • the first terminal 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, based on the target device identifier corresponding to the target audio device, the Bluetooth signals broadcast by different audio devices can be distinguished, and then the Bluetooth address can be obtained based on the determined target Bluetooth 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.
  • the target sharing control 413 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.
  • 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 .
  • 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.
  • the cancel control 415 the corresponding first terminal 410 can cancel the request to the target audio device 420 to share the target audio.
  • the bluetooth function of the first terminal 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.
  • the target Bluetooth signal contains the first Bluetooth address corresponding to the target audio device.
  • 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.
  • the first terminal 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.
  • Step 304 when 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.
  • step 304 For the implementation manner of step 304, reference may be made to step 204, and details are not described in this embodiment here.
  • the second wireless communication component is a Bluetooth component
  • the first terminal 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.
  • Step 305 When the target audio device is playing target audio and a preset gesture operation on the target audio device is received, the target audio device sends an audio information acquisition request to the second terminal, and the second terminal is configured to receive After the audio information acquisition request, the target audio information is sent to the target audio device.
  • 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.
  • 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 obtaining audio information
  • an audio information acquisition request can be sent to the second terminal.
  • 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.
  • the second terminal when the second terminal receives the audio information acquisition request sent by the target audio device, it may A prompt message is displayed on the terminal interface corresponding to the terminal 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 share the target audio information Feedback 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.
  • the user may only need to share the currently playing part of the target audio.
  • 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.
  • Step 306 in the case of receiving the target audio information sent by the second terminal, the target audio device sends the target audio information to the first terminal.
  • the target audio device may forward the target audio information to the first terminal, so as to realize the target audio sharing operation.
  • Step 307 the first terminal receives the target audio information sent by the target audio device.
  • the audio playback application 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.
  • 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 by the information, so as to realize the synchronous playback of the target audio in the first terminal and the target audio device.
  • the first terminal runs an application for audio playback
  • the first terminal 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.
  • the first terminal 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.
  • 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.
  • 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.
  • the target audio 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 inform the user in time and remind the user whether to send The first terminal shares the target audio.
  • step 305 and step 306 may be replaced by step 501 and step 502 .
  • Step 501 when the target audio is played in the audio device, the target audio device sends an audio sharing request to the second terminal, and the second terminal is used to display a sharing prompt interface based on the audio sharing request.
  • 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.
  • the terminal device identifier may be a terminal name, or a terminal machine code, or another identifier that uniquely identifies the first terminal.
  • the audio sharing request is first sent to the second terminal, so that the second terminal receives the
  • a sharing prompt interface may be displayed, through which the user is prompted whether to share the target audio to the first terminal.
  • the device name corresponding to the first terminal may be displayed on the sharing prompt interface.
  • the second terminal 610 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 .
  • 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.
  • an audio playback interface 711 is displayed in the second terminal 710, and the target audio is displayed in the audio playback interface 711.
  • 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.
  • 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.
  • the confirmation sharing request includes target audio information.
  • 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, after receiving the confirmation sharing request, the target audio device can send the target audio information Send to the first terminal to realize the sharing process of the target audio.
  • the timing of sharing the target audio can avoid the risk of user privacy information leakage caused by misoperation, and further improve the security in the audio sharing process.
  • the first terminal 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 can also transmit other information, such as the Bluetooth address corresponding to the second terminal.
  • 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.
  • FIG. 8 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 :
  • Step 801 the target audio device sends a positioning signal to the first terminal through the first wireless communication component.
  • Step 802 the first terminal identifies the target audio device within the target range through the first wireless communication component.
  • 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.
  • Step 804 when 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.
  • Step 805 when the target audio is played in the audio device, the target audio device sends an audio sharing request to the second terminal, and the second terminal is used to display a sharing prompt interface based on the audio sharing request.
  • step 801 to step 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.
  • 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.
  • the second wireless communication component is a Bluetooth component as an example.
  • the first terminal 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.
  • 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.
  • the second terminal 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.
  • the second terminal 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.
  • Step 807 the target audio device sends the second Bluetooth address to the first terminal.
  • the target audio device may send the second Bluetooth address to the first terminal.
  • Step 808 the first terminal receives the second Bluetooth address corresponding to the second terminal sent by the target audio device.
  • 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).
  • Step 809 Establish a Bluetooth connection with the second terminal based on the second Bluetooth address.
  • the first terminal 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.
  • the second terminal 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.
  • the Bluetooth connection channel the Bluetooth connection channel between the first terminal and the second terminal
  • the second terminal can also directly send the audio data stream corresponding to the target audio to the first terminal, that is, the target audio information can also be an audio data stream;
  • the way of audio data stream can realize the synchronous playback of the target audio in the first terminal and the target audio device without transmitting information such as audio playback progress; and without the need for the target audio device to forward the audio data stream, it can realize synchronous playback At the same time, reduce the device power consumption of the target audio device.
  • Step 810 in the case of 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.
  • the data communication connection established between the first terminal and the second terminal is a Bluetooth connection as an example.
  • 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.
  • 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.
  • 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 target address through the Bluetooth connection channel between the first terminal and the second terminal.
  • Audio information so that the target audio information does not need to be transmitted indirectly through the target audio device, and the signaling expenditure in the process of transmitting the target audio information can be reduced, thereby reducing the power consumption of the target audio device.
  • FIG. 9 shows a flow chart of a complete audio sharing method shown in an exemplary embodiment of the present application.
  • the target audio device is a wireless headset as an example for illustration.
  • the method includes:
  • Step 901 the first terminal recognizes that a wireless earphone appears within the X range.
  • the first terminal identifies whether there is a wireless headset within the X range through the UWB component.
  • Step 902 the first terminal displays a prompt of "checking is listening”.
  • a sharing request interface is displayed on the first terminal, so as to remind the user whether to check the audio played in the wireless headset, wherein the prompt of checking the listening is equivalent to the above embodiment Target shared controls.
  • step 903 the first terminal receives the click operation of the prompt of "viewing and listening", and sends an audio sharing request to the wireless earphone.
  • Step 904 the wireless headset receives the audio sharing request, and sends the audio sharing request to the second terminal.
  • 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.
  • Step 906 the first terminal waits for sharing.
  • the first terminal After receiving the click operation on the "viewing and listening” prompt, the first terminal is in a state of waiting for sharing.
  • Step 907 the first terminal presents the shared audio according to the target audio information.
  • 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.
  • FIG. 10 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.
  • the device may include:
  • An identification module 1001 configured to identify a target audio device within the target range through the first wireless communication component
  • a sending module 1002 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 device
  • the target audio played in , the target audio is played by the second terminal through the target audio device;
  • the 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 on the audio sharing request.
  • the identification module 1001 is also used for:
  • the sending module 1002 is also used for:
  • a data communication connection is established with the target audio device through the second wireless communication component, and the audio sharing request is sent to the target audio device.
  • the first wireless communication component is a UWB component
  • the second wireless communication component is a Bluetooth component
  • the sending module 1002 is also used for:
  • the receiving module 1003 is also used for:
  • the first terminal When the first terminal establishes a data communication connection with the second terminal, receiving the target audio information sent by the second terminal.
  • the first terminal establishes a Bluetooth connection with the second terminal
  • the device also includes:
  • the receiving module is further configured to receive the second Bluetooth address corresponding to the second terminal sent by the target audio device, and the second Bluetooth address is when the second terminal receives the audio sharing request. sent to the target audio device after confirming the sharing operation;
  • a connection establishing module configured to establish a Bluetooth connection with the second terminal based on the second Bluetooth address.
  • 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.
  • the device also includes:
  • a playback module configured to play the target audio according to the target audio information
  • the adding module is configured to add the target audio to the audio playing queue according to the target audio information.
  • 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,
  • 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.
  • 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.
  • FIG. 11 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.
  • the device may include:
  • a sending module 1101 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 within a target range according to the positioning signal;
  • the receiving module 1102 is configured to establish a data communication connection with the first terminal and receive the audio sent by the first terminal when the data communication connection request sent by the first terminal is received through the second wireless communication component.
  • 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;
  • the sending module 1101 is further configured to send the target audio to the first terminal when the target audio is played in the audio device and a confirmation sharing operation of the audio sharing request is received Corresponding target audio information, the target audio is played by the second terminal through the audio device.
  • the sending module 1101 is also used for:
  • an audio information acquisition request is sent to the second terminal, and the second terminal is used to Sending target audio information to the audio device after receiving the audio information acquisition request;
  • the target audio information sent by the second terminal is received, the target audio information is sent to the first terminal.
  • the sending module 1101 is also used for:
  • the audio device When the audio device is playing the target audio, sending the audio sharing request to the second terminal, where the second terminal is configured to display a sharing prompt interface based on the audio sharing request;
  • the second terminal Receives a confirmation sharing request sent by the second terminal, and send the target audio information to the first terminal based on the confirmation sharing request, the confirmation sharing request includes the target audio information, and the confirmation sharing request
  • the request is sent by the second terminal to the audio device after receiving a confirmation operation on the sharing prompt interface.
  • the device also includes:
  • the receiving module 1102 is further configured to receive a second Bluetooth address sent by the second terminal, and the second Bluetooth address is sent to the second terminal after receiving the confirmation operation on the sharing prompt interface. sent by audio equipment;
  • the sending module 1101 is further 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 receiving the target audio information sent by the first terminal after the Bluetooth connection.
  • the first wireless communication component is a UWB component
  • the second wireless communication component is a Bluetooth component
  • the sending module 1101 is further configured to:
  • the first terminal is used to identify whether the audio device is located within the target range based on the current location information, and determine the audio device based on the device identifier.
  • the target Bluetooth signal broadcast by the audio device, and establish a Bluetooth connection with the audio device based on the first Bluetooth address contained in the target Bluetooth signal.
  • the target audio information includes a current playback progress corresponding to the target audio
  • the first terminal is configured to perform an audio playback operation on the target audio according to the current playback progress.
  • 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.
  • 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.
  • 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.
  • FIG. 12 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.
  • 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.
  • the processor 1210 may adopt 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 Processing Unit (GPU), a modem, and the like.
  • 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.
  • 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).
  • 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.
  • 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.
  • 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.
  • 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.
  • the second wireless communication component 1240 can be a bluetooth components, NFC components, WiFi components, infrared components, etc.
  • 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.
  • 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.
  • 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.
  • the terminal device 1200 also includes components such as a radio frequency circuit, a camera component, a sensor (not including 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.
  • FIG. 13 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 .
  • the memory 1301 may include random access memory (Random Access Memory, RAM), and may also include read-only memory (Read-Only Memory, ROM).
  • 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.
  • 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.
  • the processor 1302 may be implemented in at least one hardware form among 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.
  • 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.
  • 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.
  • the second wireless communication component 1304 can be a Bluetooth component, NFC components, WiFi components, infrared components, etc.
  • 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 .
  • a computer program product 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 aspect.
  • the functions described in the embodiments of the present application may be implemented by hardware, software, firmware or any combination thereof.
  • 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.

Landscapes

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

Abstract

一种音频共享方法、装置、终端、音频设备及存储介质,属于音频分享技术领域。该方法包括:第一终端通过第一无线通讯组件识别位于目标范围内的目标音频设备(202);通过第二无线通讯组件与目标音频设备建立数据通讯连接,向目标音频设备发送音频共享请求(203);接收目标音频对应的目标音频信息(206)。该音频共享方法可以实现将音频设备中的目标音频分享至终端的效果。

Description

音频共享方法、装置、终端、音频设备及存储介质
本申请要求于2021年05月27日提交的申请号为202110585224.3、发明名称为“音频共享方法、装置、终端、音频设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及音频分享技术领域,特别涉及一种音频共享方法、装置、终端、音频设备及存储介质。
背景技术
随着终端的发展,终端具有的功能也越来越丰富,比如,大多数终端均具备音频播放功能。
相关技术中,用户可以直接通过终端播放音频,也可以为终端连接外接设备进行音频播放,比如,通过为终端与无线耳机建立蓝牙连接后,可以通过无线耳机播放终端上的音频。
显然,相关技术中仅支持单向音频播放,即仅支持将终端音频传输至耳机播放,并不支持将耳机音频传输至其他终端播放。
发明内容
本申请实施例提供了一种音频共享方法、装置、终端、音频设备及存储介质。所述技术方案如下:
一方面,本申请实施例提供了一种音频共享方法,所述方法应用于第一终端,所述第一终端设置有第一无线通讯组件和第二无线通讯组件,所述方法包括:
通过所述第一无线通讯组件识别位于目标范围内的目标音频设备;
通过第二无线通讯组件与所述目标音频设备建立数据通讯连接,向所述目标音频设备发送音频共享请求,所述音频共享请求用于请求共享所述目标音频设备中播放的目标音频,所述目标音频是第二终端通过所述目标音频设备播放的;
接收所述目标音频对应的目标音频信息,所述目标音频信息是在接收到对所述音频共享请求的确认共享操作后向所述第一终端发送的。
另一方面,本申请实施例提供了一种音频共享方法,所述方法应用于音频设备,所述音频设备设置有第一无线通讯组件和第二无线通讯组件,所述方法包括:
通过所述第一无线通讯组件向第一终端发送定位信号,所述第一终端用于根据所述定位信号识别所述音频设备是否位于目标范围内;
在通过所述第二无线通讯组件接收到所述第一终端发送的数据通讯连接请求的情况下,与所述第一终端建立数据通讯连接,接收所述第一终端发送的音频共享请求,所述数据通讯连接请求是所述第一终端在识别到所述音频设备位于所述目标范围内,且需要请求共享所述音频设备中播放的目标音频时发送的;
在所述音频设备中播放有所述目标音频,且接收到对所述音频共享请求的确认共享操作的情况下,向所述第一终端发送所述目标音频对应的目标音频信息,所述目标音频是第二终端通过所述音频设备播放的。
另一方面,本申请实施例提供了一种音频共享装置,所述装置应用于第一终端,所述第一终端设置有第一无线通讯组件和第二无线通讯组件,所述装置包括:
识别模块,用于通过所述第一无线通讯组件识别位于目标范围内的目标音频设备;
发送模块,用于通过所述第二无线通讯组件与所述目标音频设备建立数据通讯连接,向所述目标音频设备发送音频共享请求,所述音频共享请求用于请求共享所述目标音频设备中播放的目标音频,所述目标音频是第二终端通过所述目标音频设备播放的;
接收模块,用于接收所述目标音频对应的目标音频信息,所述目标音频信息是在接收到对所述音频共享请求的确认共享操作后向所述第一终端发送的。
另一方面,本申请实施例提供了一种音频共享装置,所述装置应用于音频设备,所述音频设备设置有第一无线通讯组件和第二无线通讯组件,所述装置包括:
发送模块,用于通过所述第一无线通讯组件向第一终端发送定位信号,所述第一终端用于根据所述定位信号识别所述音频设备是否位于目标范围内;
接收模块,用于在通过所述第二无线通讯组件接收到所述第一终端发送的数据通讯连接请求,与所述第一终端建立数据通讯连接,接收所述第一终端发送的音频共享请求,所述数据通讯连接请求是所述第一 终端在识别到所述音频设备位于所述目标范围内,且需要请求共享所述音频设备中播放的目标音频时发送的;
所述发送模块,还用于在所述音频设备中播放有所述目标音频,且接收到对所述音频共享请求的确认共享操作的情况下,向所述第一终端发送所述目标音频对应的目标音频信息,所述目标音频是第二终端通过所述音频设备播放的。
另一方面,本申请实施例提供了一种终端,所述终端包括处理器和存储器,所述存储器中存储有至少一段程序,所述至少一段程序由所述处理器加载并执行以实现如上述方面所述的音频共享方法。
另一方面,本申请实施例提供了一种音频设备,所述音频设备包括处理器和存储器,所述存储器中存储有至少一段程序,所述至少一段程序由所述处理器加载并执行以实现如上述方面所述的音频共享方法。
另一方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有至少一段程序,所述至少一段程序由处理器加载并执行以实现如上述方面所述的音频共享方法。
另一方面,本申请实施例提供了一种计算机程序产品,该计算机程序产品包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述方面的各种可选实现方式中提供的音频共享方法。
附图说明
图1示出了本申请一个示例性实施例的实施环境的示意图;
图2示出了本申请一个示例性实施例提供的音频共享方法的流程图;
图3示出了本申请另一个示例性实施例提供的音频共享方法的流程图;
图4示出了本申请一个示例性实施例示出的音频共享过程的界面示意图;
图5示出了本申请另一个示例性实施例提供的音频共享方法的流程图;
图6示出了本申请一个示例性实施例示出的共享提示界面的示意图;
图7示出了本申请另一个示例性实施例示出的共享提示界面的示意图;
图8示出了本申请另一个示例性实施例提供的音频共享方法的流程图;
图9示出了本申请一个示例性实施例示出的完整音频共享方法的流程图;
图10示出了本申请一个实施例提供的音频共享装置的结构框图;
图11示出了本申请另一个实施例提供的音频共享装置的结构框图;
图12示出了本申请一个示例性实施例提供的终端设备的结构方框图;
图13示出了本申请一个示例性实施例提供的音频设备的结构方框图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。
在本文中提及的“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。
图1示出了本申请一个示例性实施例的实施环境的示意图,该实施环境中包括第一终端110、音频设备120和第二终端130。
第一终端110是运行有音频播放应用程序的终端,其可以是智能手机、平板电脑、智能手表、智能音箱等便携式电子设备。本实施例中,第一终端110设置有第一无线通讯组件和第二无线通讯组件,其中,第一无线通讯组件用于精准定位,示意性的,第一无线通讯组件可以是UWB组件、蓝牙组件,或其他可以实现室内精准定位的无线通讯组件;第二无线通讯组件用于与其他终端设备或音频设备建立数据通讯连接,示意性的,第二无线通讯组件可以是蓝牙组件、近场通讯(Near Field Communication,NFC)组件、WiFi组件、红外组件等。以第一无线通讯组件是UWB组件,第二无线通讯组件是蓝牙组件为例,第一终端110可以通过该UWB组件识别位于目标范围内的音频设备;可选的,当第一终端110识别到音频设备120位于目标范围内时,可以与音频设备120建立蓝牙连接,并向音频设备120发送音频共享请求,以便请求共享音频设备120中播放的目标音频。
音频设备120是具有音频播放功能的设备,其可以是蓝牙耳机、智能音箱等设备。本实施例中,音频设备120中设置有第一无线通讯组件和第二无线通讯组件,其中,第一无线通讯组件用于精准定位,示意性的,第一无线通讯组件可以是UWB组件、蓝牙组件,或其他可以实现精准定位的无线通讯组件;第二无线通讯组件用于与其他终端设备建立数据通讯连接,示意性的,第二无线通讯组件可以是蓝牙组件、NFC 组件、WiFi组件、红外组件等。以第一无线通讯组件是UWB组件,第二无线通讯组件是蓝牙组件为例,音频设备120通过UWB组件广播定位信号,使得第一终端110可以基于该定位信号识别该音频设备120是否位于目标范围内;可选的,当第一终端110识别音频设备120位于目标范围内时,可以通过第二无线通讯组件与第一终端110建立数据通讯连接,进而在需要满足第一终端110的音频共享请求时,向第一终端反馈目标音频信息;可选的,音频设备120可以与至少两个终端建立蓝牙连接,比如,音频设备120在与第二终端130建立有蓝牙连接的基础上,还可以与第一终端110建立蓝牙连接;以音频设备120是无线耳机为例,无线耳机具备一拖二的功能,即可以同时与两个终端建立蓝牙连接。可选的,音频设备120可以接收第一终端110发送的音频共享请求,并基于该音频共享请求向第一终端110反馈目标音频信息。
第二终端130是运行有音频播放应用程序的终端,其可以是智能手机、平板电脑、智能手表、智能音箱等便携式电子设备。本实施例中,第二终端130与音频设备120建立有蓝牙连接,第二终端130中运行有目标音频对应的音频播放进程,且目标音频通过音频设备120播放;可选的,第二终端130可以接收来自音频设备120发送的音频共享请求,并将目标音频信息通过音频设备120反馈至第一终端110。
在其他可能的实施方式中,当第一终端110与音频设备120建立蓝牙连接后,第二终端130可以通过音频设备120向第一终端110发送蓝牙地址(第二终端130对应的蓝牙地址),以便第一终端110可以基于该蓝牙地址向第二终端130发送蓝牙连接请求,从而与第二终端130建立蓝牙连接,使得后续可以由第二终端130直接将目标音频信息发送至第一终端110。
请参考图2,其示出了本申请一个示例性实施例提供的音频共享方法的流程图,本申请实施例以该方法应用于图1所示的实施环境为例进行说明,该方法包括:
步骤201,目标音频设备通过第一无线通讯组件向第一终端发送定位信号。
其中,第一无线通讯组件可以是UWB组件,也可以是蓝牙组件,或其他可以实现精准定位的组件,示意性的,本实施例以音频设备中设置有UWB组件为例,当音频设备中设置有UWB组件时,使得可以通过UWB组件定位技术确定出音频设备对应的位置信息,其中,超宽带(Ultra Wide Band,UWB)技术是一种无线载波通信技术,它不采用正弦载波,而是利用纳秒级的非正弦波窄脉冲传输数据,因此其所占的频谱范围很宽,且数据传输速率可以达到几百兆比特每秒以上。在该应用场景中,UWB技术具有系统复杂度低,发射信号功率谱密度低,对信道衰落不敏感,截获能力低,定位精度高等优点,尤其适用于室内等密集多径场所的高速无线接入,因此,为音频设备设置UWB组件实现对音频设备的定位,可以以较低的功耗实现室内等密集多径场所的高精度定位。
可选的,第一无线通讯组件可以设置在音频设备内部,即音频设备内部设置有第一无线通讯组件,使得可以通过第一无线通讯组件实现音频设备的定位。
可选的,第一无线通讯组件也可以独立于音频设备设置,第一无线通讯组件与音频设备可分离,也就是说,当音频设备安装或佩戴有第一无线通讯组件时,可以通过第一无线通讯组件实现音频设备定位,当音频设备未携带第一无线通讯组件时,音频设备无法实现音频设备定位;在该应用场景下,第一无线通讯组件可以封装为音频设备的设备配件,比如,第一无线通讯组件可以是设备挂饰、标签等设备配件。
可选的,若第一无线通讯组件独立于音频设备设置,在通过第一无线通讯组件实现定位之前,音频设备需要与第一无线通讯组件建立数据通讯连接,示意性的,该数据通讯连接可以是蓝牙连接、WiFi连接、红外连接等。
本实施例中所需要实现的应用场景为:当用户手持终端靠近音频设备时,可以唤醒音频设备的反向音频共享功能,即终端可以与音频设备建立数据通讯连接,进而获取到音频设备中正在播放的目标音频。而为了实现当用户手持终端靠近音频设备后即可以进行后续音频反向共享操作,终端就需要能够实时获取到音频设备的位置信息,以便终端根据自身位置和音频设备的位置信息,确定终端与音频设备之间的距离,从而在距离满足距离条件时,执行后续向音频设备请求共享音频的步骤。
在一种可能的实施方式中,由于音频设备中设置有第一无线通讯组件,而第一无线通讯组件具备定位功能,即可以利用该第一无线通讯组件与附近的定位基站,实时定位出音频设备对应的位置信息,进而音频设备可以通过第一无线通讯组件广播位置信息,也即将位置信息添加至第一无线通讯组件广播的定位信号中,进而使得其他终端可以基于自身设置的第一无线通讯组件接收到该定位信号,从而获取到音频设备对应的位置信息,进而实时计算音频设备与终端之间的距离。
示意性的,若第一无线通讯组件为UWB组件时,设置有UWB组件的音频设备实时广播UWB信号,该UWB信号中携带有音频设备的位置信息和设备信息,以便其他终端通过该UWB信号感知与音频设备之间的距离关系,从而基于该距离关系确定音频设备是否位于目标范围内,进而在确定音频设备位于目标范围内时执行后续的音频反向共享步骤。
可选的,由于只有当音频设备正在播放音频时,才具有反向共享音频的意义,为了尽可能的降低第一 无线通讯组件的功耗或降低音频设备的功耗,当音频设备处于使用状态时,或播放有音频时,通过第一无线通讯组件实时广播定位信号。
步骤202,第一终端通过第一无线通讯组件识别位于目标范围内的目标音频设备。
为了使得第一终端可以识别到周围音频设备的位置,对应的,第一终端中也需要设置有第一无线通讯组件,以便第一终端可以通过第一无线通讯组件接收到周围音频设备广播的定位信号,进而基于该定位信号确定出音频设备的位置信息。其中,该第一无线通讯组件可以是UWB组件,也可以是蓝牙组件,或其他可以实现精准定位的通讯组件。
需要说明的是,本实施例中终端与音频设备之间需要通过广播和接收定位信号,实现终端识别音频设备是否位于目标范围内的目的,因此,终端与音频设备之间需要设置相同的第一无线通讯组件,比如,若终端中设置的第一无线通讯组件是UWB组件,则音频设备中设置的第一无线通讯组件也应该是UWB组件,使得可以通过UWB组件交互对音频设备进行定位。
在一种可能的实施方式中,当第一终端中设置有第一无线通讯组件时,可以通过第一无线通讯组件接收周围音频设备广播的定位信号,并从该定位信号中获取到音频设备的位置信息,从而基于该位置信息和第一终端的自身位置信息,实时计算出第一终端与音频设备之间的距离,进而确定音频设备是否位于第一终端周围的目标范围内,并将位于目标范围内的音频设备确定为目标音频设备。
示意性的,对于获取第一终端对应终端位置信息的方式,与获取音频设备对应位置信息的方式类似,也是通过第一无线通讯组件和周围的定位基站实现的,比如,若第一无线通讯组件是UWB组件,则可以基于UWB定位原理获取到第一终端的位置信息。
可选的,由于UWB组件在室内定位上的优势:低功耗精准定位,当第一终端和音频设备通过设置UWB组件,实现第一终端识别位于目标范围内的目标音频设备的过程,可以以较低的功耗实现室内等密集多径场所的高精度定位。
可选的,在其他可能的实施方式中,对于第一终端识别位于目标范围内的音频设备的方式,若第一无线通信组件为UWB组件的情况下,第一终端也可以基于UWB测距原理,确定第一终端与音频设备之间的距离,进而判断音频设备是否位于第一终端的目标范围内,具体可以采用的UWB测距原理包括:信号到达差测距(Phase-Difference-of-Arrival,PDOA)、单边双向测距(Single Sided Two Way Ranging,SS-TWR)、双边双向测距(Double Side Two Way Ranging,DS-TWR)、PDOA+TWR等,本实施例对第一终端具体使用的UWB测距原理不构成限定。
以UWB测距原理为SS-TWR为例,确定音频设备距离第一终端之间的距离过程可以为:第一终端通过UWB组件向音频设备发送测距请求信号,音频设备在接收到测距请求信号后,向第一终端反馈测距响应信号,对应终端基于接收到的测距响应信号,确定第一终端与音频设备之间的距离。
可选的,若第一终端采用UWB测距原理识别位于目标范围内的音频设备,则音频设备在通过UWB组件广播UWB信号(定位信号)时,无需在UWB信号中添加位置信息,仅需要添加音频设备的设备标识即可。
可选的,第一无线通讯组件可以设置在终端内部,即终端内部设置第一无线通讯组件,使得可以通过第一无线通讯组件实现终端定位,以及识别位于目标范围内的音频设备。
可选的,第一无线通讯组件也可以独立于终端设置,第一无线通讯组件与终端可分离,也就是说,当终端安装或佩戴有第一无线通讯组件时,可以通过第一无线通讯组件实现终端定位,以及识别目标范围内的目标音频设备,当终端未携带UWB组件时,终端无法实现定位操作,也就无法通过第一无线通讯组件识别音频设备的位置;在该应用场景下,第一无线通讯组件可以封装为终端配件,比如,第一无线通讯组件可以是终端后盖手机壳、终端保护套、手机挂饰、标签等终端配件。
可选的,若第一无线通讯组件独立于终端设置,在通过第一无线通讯组件实现定位之前,终端需要与第一无线通讯组件建立数据通讯连接,以便终端可以获取到第一无线通讯组件接收到的定位信号,从而实时计算终端与音频设备之间的距离。
在一种可能的实施方式中,以第一无线通讯组件是UWB组件为例,设置有UWB组件的第一终端可以接收其他音频设备通过UWB组件广播的UWB信号,并根据该UWB信号确定音频设备的位置信息,进而基于该位置信息和第一终端的终端位置信息,确定音频设备与第一终端之间的距离,从而将距离指示位于目标范围内的音频设备确定为目标音频设备,该目标音频设备即后续需要执行反向音频共享的音频设备。
其中,目标范围可以是以第一终端为圆心,预设距离为半径的球形立体区域,即目标范围指示距离第一终端为预设距离的范围;或目标范围也可以是以第一终端为圆心,预设距离为半径的扇形区域;本实施例对目标范围的具体形状不构成限定。示意性的,预设距离可以是20cm,即当第一终端识别到音频设备与第一终端之间的距离达到20cm时,将该音频设备确定为目标音频设备。
可选的,第一终端识别出的位于目标范围内的目标音频设备可以是一个,也可以是两个或两个以上,本实施例对识别出的目标音频设备的数量不构成限定。
步骤203,第一终端通过第二无线通讯组件与目标音频设备建立数据通讯连接,向目标音频设备发送音频共享请求。
由于本实施例的应用场景是终端方主动去获取音频设备中播放的音频,为了音频设备中所播放音频的安全性,需要由音频设备方确认是否允许向终端方共享音频,因此,在一种可能的实施方式中,当第一终端识别出目标音频设备位于目标范围内,且需要请求目标音频设备共享正在播放的目标音频时,需要先向目标音频设备发送音频共享请求,以便后续音频设备方可以手动确认是否同意该音频共享请求。
可选的,由于后续第一终端需要与目标音频设备进行多次信息交互和信息传递,为了保证信息传递的稳定性,在一种可能的实施方式中,第一终端在识别到目标音频设备位于目标范围时,可以先与目标音频设备建立数据通讯连接,并在数据通讯连接建立后,向目标音频设备发送音频共享请求。
为了避免定位操作对终端与目标音频设备之间数据传输的影响,将终端定位功能和数据通讯功能分开执行,即第一终端中设置有第二无线通讯组件,使得第一终端可以通过第二无线通讯组件与目标音频设备建立数据通讯连接,以便通过该数据通信连接实现后续数据传输。其中,该第二无线通讯组件可以是蓝牙组件、WiFi组件、红外组件等,对应第一终端可以与目标音频设备建立蓝牙连接、WiFi连接或红外连接。
步骤204,在通过第二无线通讯组件接收到第一终端发送的数据通讯连接请求的情况下,目标音频设备与第一终端建立数据通讯连接,接收第一终端发送的音频共享请求。
在一种可能的实施方式中,当第一终端识别到目标音频设备位于目标范围内,且需要请求共享目标音频设备中播放的目标音频时,可以向目标音频设备发送数据通讯连接请求,请求目标音频设备与第一终端建立数据通讯连接,对应的,当目标音频设备接收到第一终端发送的数据通讯连接请求后,若同意该数据通讯连接请求,则目标音频设备与第一终端建立数据通讯连接,后续第一终端可以通过第二无线通讯组件向目标音频设备发送音频共享请求,对应的,目标音频设备可以通过第二无线通讯组件接收第一终端发送的音频共享请求。
可选的,若目标音频设备在接收到数据通讯连接请求后,未同意,对应的,第一终端与目标音频设备也就无法建立数据通讯连接,进而无法执行后续的音频反向共享操作。
示意性的,以第二无线通讯组件是蓝牙组件为例,当第一终端识别到目标音频设备位于目标范围内时,表示用户有意向获取音频设备中播放的目标音频,对应的,可以向目标音频设备发送蓝牙连接请求,请求目标音频设备与第一终端建立蓝牙连接,对应的,目标音频设备接收到该蓝牙连接请求后,若同意该蓝牙连接请求,则与第一终端建立蓝牙连接,并接收第一终端发送的音频共享请求。
步骤205,在目标音频设备中播放有目标音频,且接收到对音频共享请求的确认共享操作的情况下,目标音频设备向第一终端发送目标音频对应的目标音频信息。
本实施例的应用场景为,用户手持终端靠近音频设备以请求音频设备共享正在播放的目标音频,在该应用场景下,用户或第一终端无法预先确定目标音频设备中是否播放有音频,因此,在一种可能的实施方式中,当目标音频设备接收到音频共享请求后,首先需要确定目标音频设备中是否播放有目标音频,并在确定播放有目标音频的情况下,执行后续的反向音频共享操作,反之,若目标音频设备中并未播放音频,也就无需执行后续的音频共享操作。
其中,目标音频是第二终端通过目标音频设备播放的。该目标音频可以是音乐、有声小说、录音、音乐片段等,也可以是视频等带声音的多媒体内容;本实施例对目标音频不构成限定。
当目标音频设备中播放有目标音频时,为了避免泄露用户隐私,在一种可能的实施方式中,需要由音频设备方或与音频设备相连的第二终端方手动确认是否同意将目标音频共享至第一终端,也就是说,当目标音频设备中播放有目标音频,且接收到对音频共享请求的确认共享操作后,才会向第一终端发送目标音频对应的目标音频信息,以实现将目标音频设备中播放的目标音频共享给第一终端的目的。
示意性的,确认共享操作可以是对目标音频设备的预设手势操作,比如,对目标音频设备的双击操作,也可以是对目标音频设备上实体按键的按压操作。
可选的,由于目标音频设备中播放的目标音频由第二终端提供,即目标音频设备与第二终端建立有数据通讯连接,对应的,也可以通过在第二终端上进行确认操作,实现对音频共享请求的确认共享操作。
可选的,若目标音频设备未接收到对音频共享请求的确认共享操作,或接收到对音频共享请求的拒绝共享操作,目标音频设备也就无法向第一终端共享目标音频信息。
考虑到音频设备传输实际音频数据需要功耗较大,在一种可能的实施方式中,目标音频设备可以仅将目标音频对应的目标音频信息发送至第一终端,以便第一终端根据该目标音频信息查找到对应的目标音频进行音频播放。示意性的,该目标音频信息可以是目标音频的音频名称。
步骤206,第一终端接收目标音频对应的目标音频信息。
在一种可能的实施方式中,当第一终端向目标音频设备发送音频共享请求后,可以处于等待音频共享的状态;当音频设备接收到对音频共享请求的确认共享操作后,可以由音频设备将目标音频信息发送给第一终端,对应的,第一终端接收目标音频设备发送的目标音频信息。
可选的,当第一终端获取到反馈的目标音频信息后,可以立即打开音频播放程序,基于该目标音频信息播放目标音频。
可选的,若第一终端无法直接播放目标音频,比如,第一终端正在播放其他音视频内容,或当前环境不允许第一终端外放音频,则第一终端可以暂时将目标音频添加至音频播放队列中,以便后续由用户手动确定何时播放该目标音频。
可选的,由于第一终端与目标音频设备建立有数据通讯连接,且目标音频设备与第二终端建立有数据通讯连接,即实现了第一终端至第二终端的信息通路,对应的,第一终端可以通过该信息通路获取到第二终端的数据通讯地址,进而与第二终端建立数据通讯连接,对应的,可以接收由第二终端直接发送给第一终端的目标音频信息。
对应的,目标音频信息是在接收到对音频共享请求的确认共享操作后向第一终端发送的。目标音频信息可以由目标音频设备发送的,也可以是由第二终端发送的。
可选的,在该等待音频共享的状态下,第一终端可以随时取消对目标音频的音频共享请求。
可选的,目标音频信息可以是目标音频的音频名称,也可以是目标音频对应的音频数据流;可选的,当目标音频信息为音频名称的情况下,目标音频信息中还可以包括目标音频在音频设备中的当前播放进度。
综上所述,本申请实施例中,音频设备通过第一无线通讯组件广播定位信号,使得终端可以通过设置的第一无线通讯组件接收该定位信号,进而根据该定位信号实时确定音频设备的位置信息,从而精确识别出位于目标范围内的目标音频设备,以便与该目标音频设备建立数据通讯连接,从而唤醒音频设备的反向共享,使得在音频共享场景中,既可以由终端将目标音频分享至音频设备,也可以由音频设备将目标音频分享至终端,从而实现音频分享的双向诉求。此外,通过将识别目标音频是否位于目标范围内作为共享音频的判断前提,更符合用户靠近即可分享的行为习惯,同时可以提高确定音频反向共享时机的精确度。
可选的,通过第一无线通讯组件识别位于目标范围内的目标音频设备,包括:
在识别到位于目标范围内的目标音频设备的情况下,显示共享请求界面,共享请求界面中显示有目标音频设备对应的目标共享控件;
通过第二无线通讯组件与目标音频设备建立数据通讯连接,向目标音频设备发送音频共享请求,包括:
响应于对共享请求界面中目标共享控件的触发操作,通过第二无线通讯组件与目标音频设备建立数据通讯连接,向目标音频设备发送音频共享请求。
可选的,第一无线通讯组件是UWB组件,第二无线通讯组件是蓝牙组件;
响应于对共享请求界面中目标共享控件的触发操作,通过第二无线通讯组件与目标音频设备建立数据通讯连接,向目标音频设备发送音频共享请求,包括:
响应于对共享请求界面中目标共享控件的触发操作,基于目标音频设备发送的目标UWB信号,确定目标音频设备对应的目标设备标识;
基于目标设备标识,从接收到的至少一个蓝牙信号中确定出目标音频设备广播的目标蓝牙信号;
根据目标蓝牙信号,确定目标音频设备对应的第一蓝牙地址;
基于第一蓝牙地址与目标音频设备建立蓝牙连接,通过蓝牙组件向目标音频设备发送音频共享请求。
可选的,接收目标音频对应的目标音频信息,包括:
接收目标音频设备发送的目标音频信息,目标音频信息是第二终端向目标音频设备发送的;
或;
在第一终端与第二终端建立有数据通讯连接的情况下,接收第二终端发送的目标音频信息。
可选的,第一终端与第二终端建立有蓝牙连接;
在第一终端与第二终端建立有数据通讯连接的情况下,接收第二终端发送的目标音频信息之前,方法还包括:
接收目标音频设备发送的第二终端对应的第二蓝牙地址,第二蓝牙地址是第二终端在接收到对音频共享请求的确认共享操作后向目标音频设备发送的;
基于第二蓝牙地址,与第二终端建立蓝牙连接。
可选的,接收目标音频对应的目标音频信息之后,方法还包括:
基于目标音频信息确定目标音频的当前播放进度;
基于当前播放进度执行对目标音频的音频播放操作。
可选的,接收目标音频对应的目标音频信息之后,方法还包括:
根据目标音频信息播放目标音频;
或,
根据目标音频信息,将目标音频添加至音频播放队列中。
可选的,在音频设备中播放有目标音频,且接收到对音频共享请求的确认共享操作的情况下,向第一终端发送目标音频对应的目标音频信息,包括:
在音频设备中播放有目标音频,且接收到对音频设备的预设手势操作的情况下,向第二终端发送音频信息获取请求,第二终端用于在接收到音频信息获取请求后向音频设备发送目标音频信息;
在接收到第二终端发送的目标音频信息的情况下,将目标音频信息发送至第一终端。
可选的,在音频设备中播放有目标音频,且接收到对音频共享请求的确认共享操作的情况下,向第一终端发送目标音频对应的目标音频信息,包括:
在音频设备中播放有目标音频的情况下,向第二终端发送音频共享请求,第二终端用于基于音频共享请求显示共享提示界面;
接收第二终端发送的确认共享请求,并基于确认共享请求向第一终端发送目标音频信息,确认共享请求中包含目标音频信息,确认共享请求是第二终端在接收到对共享提示界面的确认操作后向音频设备发送的。
可选的,在音频设备中播放有目标音频的情况下,向第二终端发送音频共享请求之后,方法还包括:
接收第二终端发送的第二蓝牙地址,第二蓝牙地址是第二终端在接收到对共享提示界面的确认操作后向音频设备发送的;
向第一终端发送第二蓝牙地址,第一终端用于根据第二蓝牙地址与第二终端建立蓝牙连接,并在建立蓝牙连接后接收第一终端发送的目标音频信息。
可选的,第一无线通讯组件是UWB组件,第二无线通讯组件是蓝牙组件;
通过第一无线通讯组件向第一终端发送定位信号,包括:
获取音频设备对应的设备标识和当前位置信息;
将设备标识和当前位置信息添加在UWB信号中;
通过UWB组件向第一终端发送UWB信号,第一终端用于基于当前位置信息识别音频设备是否位于目标范围内,基于设备标识确定音频设备广播的目标蓝牙信号,并基于目标蓝牙信号中包含的第一蓝牙地址与音频设备建立蓝牙连接。
可选的,目标音频信息中包含有目标音频对应的当前播放进度,第一终端用于根据当前播放进度执行对目标音频的音频播放操作。
为了避免第一终端在靠近目标音频设备时直接执行后续音频分享操作,而影响第一终端原本的音频播放进程或其他正在进行的任务进程,在一种可能的实施方式中,当第一终端识别到位于目标范围内的目标音频设备时,会在第一终端的当前用户界面中显示目标共享控件,以便由用户确定是否需要执行后续音频共享操作。
请参考图3,其示出了本申请另一个示例性实施例提供的音频共享方法的流程图,本申请实施例以该方法应用于图1所示的实施环境为例进行说明,该方法包括:
步骤301,目标音频设备通过第一无线通讯组件向第一终端发送定位信号。
为了使得第一终端可以基于定位信号识别目标音频设备的位置信息和设备信息,在一种可能的实施方式中,需要将目标音频设备对应的设备标识和当前位置信息添加至定位信号中,以便实现将当前位置信息和设备标识传输至第一终端。
在一个示例性的例子中,音频设备发送定位信号的过程可以包括以下步骤:
一、获取音频设备对应的设备标识和当前位置信息。
示意性的,设备标识可以是音频设备对应的设备名称、设备机器码等唯一标识音频设备的信息;当前位置信息可以是音频设备所在的空间位置坐标,该当前位置信息由UWB定位基站对音频设备定位得到。测量音频设备的当前位置信息可以采用UWB定位原理中的飞行时间测距法(Time of Flight,ToF)、到达时间差测距法(Time Difference of Arrival,TDoA)等。
二、将设备标识和当前位置信息添加在UWB信号中。
本实施例以第一无线通讯组件是UWB组件,第二无线通讯组件是蓝牙组件为例进行音频共享过程的示例性说明。
当第一无线通讯组件是UWB组件时,UWB组件广播的定位信号是UWB信号,对应的,当音频设备获取到设备标识和当前位置信息后,为了使得第一终端可以通过UWB信号识别到音频设备所在位置,以 及根据设备标识识别需要与哪一个音频设备建立蓝牙连接,在一种可能的实施方式中,音频设备将设备标识和当前位置信息添加在UWB信号中。
三、通过UWB组件向第一终端发送UWB信号。
对应的,目标音频设备通过UWB组件向第一终端发送包含当前位置信息和设备标识的UWB信号,以便第一终端基于当前位置信息识别音频设备是否位于目标范围内,基于设备标识确定音频设备广播的目标蓝牙信号,并基于目标蓝牙信号中包含的第一蓝牙地址与音频设备建立蓝牙连接。
步骤302,在识别到位于目标范围内的目标音频设备的情况下,第一终端显示共享请求界面,共享请求界面中显示有目标音频设备对应的目标共享控件。
为了提醒用户识别到位于目标范围内的目标音频设备,在一种可能的实施方式中,当终端识别到位于目标范围内的目标音频设备后,可以在第一终端的当前用户界面中显示共享请求界面,该共享请求界面中显示有目标音频设备对应的目标共享控件,以提醒用户识别到目标音频设备,以及是否需要请求共享目标音频设备中的目标音频。
可选的,为了避免显示共享请求界面对第一终端正在显示的用户界面的影响,可以以浮窗形式显示共享请求界面,以便在显示共享请求界面的同时不影响第一终端显示的当前用户界面。
可选的,该共享请求界面中还可以显示目标音频设备对应的设备图标,比如,若目标音频设备为无线蓝牙耳机,可以在共享请求界面中显示耳机图标,以提醒用户所识别到的目标音频设备的设备种类。
可选的,由于第一终端接收到目标音频设备发送的目标UWB信号中还包括有目标音频设备的设备标识,对应的,也可以将设备标识显示在共享请求界面中,以便用户确定所识别到的目标音频设备。
如图4所示,其示出了本申请一个示例性实施例示出的音频共享过程的界面示意图。当第一终端410靠近音频设备420达到临界值X时(表示第一终端410识别音频设备420位于目标范围内),第一终端410显示共享请求界面411,其中,共享请求界面411中显示有音频设备420对应的设备标识412和目标共享控件413。
步骤303,响应于对共享请求界面中目标共享控件的触发操作,第一终端通过第二无线通讯组件与目标音频设备建立数据通讯连接,向目标音频设备发送音频共享请求。
可能出现第一终端识别到多个目标音频设备的情况,则为了使得第一终端可以明确需要与哪一个目标音频设备建立蓝牙连接,在一种可能的实施方式中,若用户需要与目标音频设备建立蓝牙连接,以共享目标音频设备中的目标音频,可以点击共享请求界面中目标音频设备中的目标共享控件,以便终端在接收到对目标共享控件的触发操作时,可以与目标共享控件所对应的目标音频设备建立数据通讯连接,并在数据通讯连接建立之后向目标音频设备发送音频共享请求。
在一个示例性的例子中,若第二无线通讯组件是蓝牙组件,对应的,第一终端与目标音频设备建立蓝牙连接的过程可以包括以下步骤:
一、响应于对共享请求界面中目标共享控件的触发操作,基于目标音频设备发送的目标UWB信号,确定目标音频设备对应的目标设备标识。
当第一终端与目标音频设备建立蓝牙连接的过程中,首先需要获取到目标音频设备对应的蓝牙地址,而音频设备的蓝牙地址包含在音频设备广播的蓝牙信号中,为了获取到目标音频设备对应的蓝牙地址,在一种可能的实施方式中,可以基于目标音频设备对应的目标设备标识,区分不同音频设备广播的蓝牙信号,进而基于确定出的目标蓝牙信号获取到蓝牙地址。
由于音频设备在广播UWB信号时,即在UWB信号中添加有音频设备对应的设备标识,因此,当终端确定出需要与目标音频设备建立蓝牙连接时,可以首先获取到目标音频设备对应的目标UWB信号,进而从该目标UWB信号中确定出目标音频设备对应的目标设备标识。
如图4所示,当用户需要请求共享音频设备420中播放的目标音频时,可以点击目标共享控件413,对应的,第一终端410在接收到对目标共享控件413的触发操作后,可以与目标音频设备420建立蓝牙连接,并向目标音频设备420发送音频共享请求。可选的,当用户点击目标共享控件413后,共享请求界面411可以切换为共享等待界面414,该共享等待界面414中可以显示有取消控件415,当用户点击取消控件415时,对应第一终端410可以取消请求目标音频设备420共享目标音频。
二、基于目标设备标识,从接收到的至少一个蓝牙信号中确定出目标音频设备广播的目标蓝牙信号。
当第一终端的蓝牙功能开启后,可以接收到周围各个蓝牙设备广播的蓝牙信号,为了从中确定出目标音频设备广播的目标蓝牙信号,以便与目标音频设备建立蓝牙连接,在一种可能的实施方式中,可以基于目标音频设备的目标设备标识,从接收到的至少一个蓝牙信号中确定出与该目标设备标识匹配的目标蓝牙信号,该目标蓝牙信号即目标音频设备广播的蓝牙信号。
三、根据目标蓝牙信号,确定目标音频设备对应的第一蓝牙地址。
其中,目标蓝牙信号中包含有目标音频设备对应的第一蓝牙地址,当终端确定出目标音频设备对应的 目标蓝牙信号后,即可以从目标蓝牙信号中获取到目标音频设备对应的第一蓝牙地址,进而基于该第一蓝牙地址向目标音频设备发送蓝牙连接请求。
四、基于第一蓝牙地址与目标音频设备建立蓝牙连接,通过蓝牙组件向目标音频设备发送音频共享请求。
当第一终端获取到目标音频设备对应的第一蓝牙地址后,可以基于该第一蓝牙地址向目标音频设备发送蓝牙连接请求,以便在目标音频设备同意该蓝牙连接请求后,与目标音频设备建立蓝牙连接;并在建立蓝牙连接后通过蓝牙组件向目标音频设备发送音频共享请求。
步骤304,在通过第二无线通讯组件接收到第一终端发送的数据通讯连接请求的情况下,目标音频设备与第一终端建立数据通讯连接,接收第一终端发送的音频共享请求。
步骤304的实施方式可以参考步骤204,本实施例在此不做赘述。
示意性的,若第二无线通讯组件是蓝牙组件,当第一终端需要请求共享目标音频设备中播放的目标音频时,向目标音频设备发送蓝牙连接请求,对应的目标音频设备通过蓝牙组件接收到第一终端发送的蓝牙连接请求,并在同意该蓝牙连接请求后,与第一终端建立蓝牙连接;使得第一终端可以通过蓝牙连接通道向目标音频设备发送音频共享请求,对应目标音频设备接收到第一终端发送的音频共享请求。
步骤305,在目标音频设备中播放有目标音频,且接收到对目标音频设备的预设手势操作的情况下,目标音频设备向第二终端发送音频信息获取请求,第二终端用于在接收到音频信息获取请求后向目标音频设备发送目标音频信息。
其中,预设手势操作可以是对目标音频设备的手势双击操作,或手势单击操作,或对目标实体按键的按压操作,或对目标虚拟按键的按压操作,本实施例对预设手势操作不构成限定。
由于目标音频是第二终端通过目标音频设备播放的,存在目标音频设备仅具备音频播放功能,不具备获取音频信息的功能,在一种可能的实施方式中,当接收到对目标音频设备的预设手势操作时,可以向第二终端发送音频信息获取请求,对应的,第二终端在接收到该信息获取请求时,将查找到的目标音频信息反馈给目标音频设备,进而目标音频设备可以将该目标音频信息反馈给第一终端。
可选的,为了避免用户误触目标音频设备,而导致隐私信息的泄露,在一种可能的实施方式中,当第二终端接收到目标音频设备发送的音频信息获取请求时,可以在第二终端对应的终端界面上显示提示信息,以提示用户是否需要将目标音频信息共享至第一终端;对应的,若第二终端接收到对该提示信息的确认操作,第二终端将该目标音频信息反馈至目标音频设备,进而目标音频设备可以将该目标音频信息共享至第一终端;反之,若第二终端接收到对该提示信息的关闭或取消操作,第二终端停止反馈该目标音频信息。
可选的,在音频共享场景中,存在用户可能仅需要共享目标音频的当前播放部分,为了避免第一终端需要重新开始播放目标音频,在一种可能的实施方式中,可以在目标音频信息中添加目标音频的当前播放进度,使得第一终端在接收到目标音频信息后,可以从当前播放进度处播放目标音频。
步骤306,在接收到第二终端发送的目标音频信息的情况下,目标音频设备将目标音频信息发送至第一终端。
当目标音频设备接收到第二终端反馈的目标音频信息后,可以将该目标音频信息转发至第一终端,以实现目标音频的共享操作。
步骤307,第一终端接收目标音频设备发送的目标音频信息。
在一种可能的实施方式中,当接收到目标音频设备发送的目标音频信息,若目标音频信息中包含目标音频的音频名称,可以调用音频播放应用程序,并基于该音频名称查找到对应的目标音频,进而展示该目标音频对应的音频播放界面。
可选的,若目标音频信息中包含目标音频的当前播放进度,第一终端可以根据当前播放进度执行对目标音频的音频播放操作,即第一终端将目标音频对应的音频播放进度调整为目标音频信息所指示的当前播放进度,从而实现第一终端和目标音频设备中目标音频的同步播放。
可选的,由于第一终端中运行有用于音频播放的应用程序,当第一终端接收到目标音频设备发送的目标音频信息时,可以直接打开该应用程序,基于音频名称搜索并播放目标音频,也就是说,该应用场景下,第一终端可以在接收到目标音频对应的目标音频信息后,直接根据目标音频信息播放目标音频。
在其他可能的实施方式中,可能存在某些情况,使得第一终端无法直接播放目标音频,比如,第一终端本身正在执行其他任务进程,或用户仅想通过第一终端了解到该音频设备中正在播放的音频,而无需立即播放该目标音频;或第一终端所处的环境不适合直接外放该目标音频,对于这类情况,当第一终端接收到该目标音频信息后,可以打开音频播放类应用程序,将目标音频添加至音频播放队列中,由用户判断是否需要播放该目标音频。
如图4所示,当第一终端410接收到目标音频设备420发送的目标音频信息后,后台直接调用目标音 频对应的音频播放应用程序,查找该目标音频,前端界面由共享等待界面414切换为音频播放界面416,该音频播放界面416中可以显示与目标音频对应的音频配图、音频名称、音频来源、播放控件、取消播放控件等。
本实施例中,音频设备通过在UWB信号中携带设备标识和位置信息,使得第一终端可以基于位置信息识别音频设备是否位于目标范围内,并基于该设备标识与音频设备建立蓝牙连接;此外,可以通过对音频设备的预设手势操作,实现对音频共享请求的确认共享操作,可以提高音频共享的便利性;另外,通过在目标音频信息中携带目标音频对应的当前播放进程,可以实现目标音频在目标音频设备和第一终端中的同步播放。
为了进一步提高音频共享的准确性,以避免终端信息的泄露,即避免其他用户通过上述共享操作,在未经用户允许的情况下,获取到第二终端持有用户对应音频设备中播放的音频内容,在其他可能的实施方式中,目标音频设备在接收到音频共享请求后,需要向控制目标音频设备播放目标音频的第二终端发送该音频共享请求,以便及时告知用户,并提醒用户是否需要向第一终端共享该目标音频。
在一个示例性的例子中,在图3的基础上,如图5所示,步骤305和步骤306可以被替换为步骤501和步骤502。
步骤501,在音频设备中播放有目标音频的情况下,目标音频设备向第二终端发送音频共享请求,第二终端用于基于音频共享请求显示共享提示界面。
本实施例中,该音频共享请求中可以包含第一终端对应的终端设备标识,以便提醒用户该音频共享请求的来源方。示意性的,该终端设备标识可以是终端名称,或终端机器码,或其他唯一标识第一终端的标识。
为了进一步提高音频共享的安全性和准确性,在一种可能的实施方式中,当目标音频设备中播放有目标音频时,首先将音频共享请求发送至第二终端,以便第二终端在接收到该音频共享请求时,可以显示共享提示界面,通过该共享提示界面提示用户是否需要将目标音频共享至第一终端。
示意性的,该共享提示界面中可以显示第一终端对应的设备名称。
如图6所示,当第二终端610接收到第一终端通过目标音频设备发送的音频共享请求后,显示共享提示界面611,该共享提示界面611中显示有第一终端对应的设备名称612、共享控件614和取消共享控件613。
可选的,由于目标音频是第二终端通过目标音频设备播放的,对应的,第二终端中显示有目标音频的音频播放界面,当第二终端接收到目标音频设备对应的音频共享请求后,可以直接在音频播放界面上显示共享提示信息,该共享提示信息包括第一终端对应的终端名称、共享控件和取消共享控件。
如图7所示,当第二终端710通过目标音频设备播放目标音频时(未接收到音频共享请求),第二终端710中显示有音频播放界面711,该音频播放界面711中显示有目标音频对应的播放控件;当第二终端710接收到第一终端通过目标音频设备发送的音频共享请求后,在音频播放界面711上显示第一终端对应的设备名称、共享控件712和取消共享控件713。
步骤502,目标音频设备接收第二终端发送的确认共享请求,并基于确认共享请求向第一终端发送目标音频信息。
其中,确认共享请求是第二终端在接收到对共享提示界面的确认操作后向音频设备发送的,且确认共享请求中包含目标音频信息。示意性的,在一种可能的实施方式中,若持有第二终端的用户同意将目标音频共享至第一终端,可以点击共享提示界面中的确认共享控件,对应的,第二终端接收到对该确认共享控件的触发操作,向目标音频设备发送确认共享请求,且该确认共享请求中添加有目标音频信息;对应的,目标音频设备在接收到该确认共享请求后,可以将目标音频信息发送至第一终端,实现目标音频的共享过程。
如图6所示,若用户需要将目标音频共享至第一终端,可以点击共享提示界面611中的共享控件614;若用户拒绝将目标音频共享至第一终端,可以点击共享提示界面611中的取消共享控件613。
本实施例中,通过在控制目标音频设备的第二终端中显示共享提示界面,以便提示用户是否需要将目标音频共享中第一终端,通过用户在共享提示界面中的操作,确定向第一终端共享目标音频的时机,可以避免误操作而引起用户隐私信息泄露的风险,进一步提高音频共享过程中的安全性。
本实施例中,在目标音频设备与第二终端建立有蓝牙连接的基础上,第一终端在音频共享过程中也会与目标音频设备建立有蓝牙连接,从而建立了由第二终端到目标音频设备再到第一终端之间的信息通路,该信息通路除了可以传递目标音频信息之外,还可以传递其他信息,比如,第二终端对应的蓝牙地址,当第一终端获取到第二终端对应的蓝牙地址之后,即可以与第二终端建立蓝牙连接,进而使得后续第一终端 可以直接接收第二终端反馈的目标音频信息,而无需经过目标音频设备,从而进一步节省信令开支,并降低目标音频设备的功耗。
请参考图8,其示出了本申请另一个示例性实施例提供的音频共享方法的流程图,本申请实施例以该方法应用于图1所示的实施环境为例进行说明,该方法包括:
步骤801,目标音频设备通过第一无线通讯组件向第一终端发送定位信号。
步骤802,第一终端通过第一无线通讯组件识别位于目标范围内的目标音频设备。
步骤803,第一终端通过第二无线通讯组件与目标音频设备建立数据通讯连接,向目标音频设备发送音频共享请求。
步骤804,在通过第二无线通讯组件接收到第一终端发送的数据通讯连接请求的情况下,目标音频设备与第一终端建立数据通讯连接,接收第一终端发送的音频共享请求。
步骤805,在音频设备中播放有目标音频的情况下,目标音频设备向第二终端发送音频共享请求,第二终端用于基于音频共享请求显示共享提示界面。
步骤801至步骤805的实施方式可以参考上文实施例,本实施例在此不做赘述。
步骤806,目标音频设备接收第二终端发送的第二蓝牙地址,第二蓝牙地址是第二终端在接收到对共享提示界面的确认操作后向音频设备发送的。
本实施例以第二无线通讯组件是蓝牙组件为例,当第一终端与目标音频设备建立蓝牙连接之后,在目标音频设备本身与第二终端建立蓝牙连接的基础上,即形成了第一终端-目标音频设备-第二终端之间的数据传输通道,对应的,为了避免由目标音频设备间接将目标音频信息传输至第一终端,对目标音频设备的数据传输能力要求较高,在一种可能的实施方式中,可以由目标音频设备将第二终端对应的第二蓝牙地址发给第一终端,使得第一终端可以根据该第二蓝牙地址与第二终端建立蓝牙连接,进而通过第一终端和第二终端之间的蓝牙连接通道传输目标音频信息。
本实施例中,当用户点击共享提示界面中的共享控件后,表示用户需要将目标音频共享至第一终端,为了避免目标音频信息需要经过目标音频设备进行间接传递,在一种可能的实施方式中,第二终端在接收到对共享提示界面的确认操作后,可以首先通过目标音频设备向第一终端发送第二蓝牙地址,使得第一终端在接收到该第二蓝牙地址后,可以与第一终端建立蓝牙连接,进而通过第一终端与第二终端之间的蓝牙连接通道传递目标音频信息。
步骤807,目标音频设备向第一终端发送第二蓝牙地址。
当目标音频设备接收到第二终端发送的第二蓝牙地址后,可以将该第二蓝牙地址发送至第一终端。
步骤808,第一终端接收目标音频设备发送的第二终端对应的第二蓝牙地址。
对应第一终端通过蓝牙连接通道(目标音频设备与第一终端之间的蓝牙连接通道)接收目标音频设备发送的第二蓝牙地址。
步骤809,基于第二蓝牙地址,与第二终端建立蓝牙连接。
当第一终端接收到第二蓝牙地址后,可以基于该第二蓝牙地址向第二终端发送蓝牙连接请求,对应第二终端接收该蓝牙连接请求,并在同意后与第一终端建立蓝牙连接。
可选的,当第二终端确定与第一终端建立蓝牙连接后,可以直接通过蓝牙连接通道(第一终端与第二终端之间的蓝牙连接通道)向第一终端发送目标音频对应的目标音频信息。
可选的,当第一终端与第二终端建立蓝牙连接后,第二终端也可以直接向第一终端发送目标音频对应的音频数据流,也即目标音频信息还可以为音频数据流;通过传输音频数据流的方式,可以在无需传输音频播放进度等信息的情况下,实现第一终端和目标音频设备中目标音频的同步播放;且无需目标音频设备转发音频数据流,可以在实现同步播放的同时,降低目标音频设备的设备功耗。
步骤810,在第一终端与第二终端建立有数据通讯连接的情况下,第一终端接收第二终端发送的目标音频信息。
本实施例以第一终端与第二终端建立的数据通讯连接是蓝牙连接为例,当第一终端与第二终端建立蓝牙连接后,可以通过蓝牙连接通道接收第二终端发送的目标音频信息,无需通过目标音频设备传递目标音频信息,可以降低目标音频设备的功耗。
可选的,第一终端与第二终端之间建立的数据通讯连接还可以是红外连接、WiFi连接,或其他通讯连接方式。
本实施例中,通过目标音频设备传递第二终端对应的第二蓝牙地址,使得第一终端可以与第二终端建立蓝牙连接,进而通过第一终端和第二终端之间的蓝牙连接通道传输目标音频信息,使得无需经过目标音频设备间接传输目标音频信息,可以减少目标音频信息传输过程中的信令开支,进而降低目标音频设备的功耗。
请参考图9,其示出了本申请一个示例性实施例示出的完整音频共享方法的流程图,本实施例中,以目标音频设备是无线耳机为例进行示例性说明,该方法包括:
步骤901,第一终端识别到X范围内出现无线耳机。
其中,第一终端通过UWB组件识别X范围内是否存在无线耳机。
步骤902,第一终端中显示“查看正在收听”提示。
当第一终端识别到X范围内存在无线耳机,在第一终端中显示共享请求界面,以便提醒用户是否需要查看无线耳机中播放的音频,其中,查看正在收听提示相当于上文实施例中的目标共享控件。
步骤903,第一终端接收到“对查看正在收听”提示的点击操作,向无线耳机发送音频共享请求。
步骤904,无线耳机接收到音频共享请求,并向第二终端发送音频共享请求。
步骤905,当无线耳机接收到第二终端反馈的确认共享请求后,向第一终端发送目标音频信息。
步骤906,第一终端等待共享。
当接收到对“查看正在收听”提示的点击操作后,第一终端处于等待共享状态。
步骤907,第一终端根据目标音频信息展示共享音频。
需要说明的是,上述各个实施例中,以目标音频设备为执行主体的步骤可以单独实现成为音频设备侧的音频共享方法,以第一终端为执行主体的步骤可以单独实现成为第一终端侧的音频共享方法,本实施例在此不再赘述。
下述为本申请装置实施例,可以用于执行本申请方法实施例。对于本申请装置实施例中未披露的细节,请参照本申请方法实施例。
请参考图10,其示出了本申请一个实施例提供的音频共享装置的结构框图。该装置具有实现上述方法实施例中由第一终端侧执行的功能。如图10所示,该装置可以包括:
识别模块1001,用于通过所述第一无线通讯组件识别位于目标范围内的目标音频设备;
发送模块1002,用于通过所述第二无线通讯组件与所述目标音频设备建立数据通讯连接,向所述目标音频设备发送音频共享请求,所述音频共享请求用于请求共享所述目标音频设备中播放的目标音频,所述目标音频是第二终端通过所述目标音频设备播放的;
接收模块1003,用于接收所述目标音频对应的目标音频信息,所述目标音频信息是在接收到对所述音频共享请求的确认共享操作后向所述第一终端发送的。
可选的,所述识别模块1001,还用于:
在识别到位于所述目标范围内的所述目标音频设备的情况下,显示共享请求界面,所述共享请求界面中显示有所述目标音频设备对应的目标共享控件;
所述发送模块1002,还用于:
响应于对所述共享请求界面中所述目标共享控件的触发操作,通过所述第二无线通讯组件与所述目标音频设备建立数据通讯连接,向所述目标音频设备发送所述音频共享请求。
可选的,所述第一无线通讯组件是UWB组件,所述第二无线通讯组件是蓝牙组件;
所述发送模块1002,还用于:
响应于对所述共享请求界面中所述目标共享控件的触发操作,基于所述目标音频设备发送的目标UWB信号,确定所述目标音频设备对应的目标设备标识;
基于所述目标设备标识,从接收到的至少一个蓝牙信号中确定出所述目标音频设备广播的目标蓝牙信号;
根据所述目标蓝牙信号,确定所述目标音频设备对应的第一蓝牙地址;
基于所述第一蓝牙地址与所述目标音频设备建立蓝牙连接,通过所述蓝牙组件向所述目标音频设备发送所述音频共享请求。
可选的,所述接收模块1003,还用于:
接收所述目标音频设备发送的所述目标音频信息,所述目标音频信息是所述第二终端向所述目标音频设备发送的;
或;
在所述第一终端与所述第二终端建立有数据通讯连接的情况下,接收所述第二终端发送的所述目标音频信息。
可选的,所述第一终端与所述第二终端建立有蓝牙连接;
所述装置还包括:
所述接收模块,还用于接收所述目标音频设备发送的所述第二终端对应的第二蓝牙地址,所述第二蓝 牙地址是所述第二终端在接收到对所述音频共享请求的确认共享操作后向所述目标音频设备发送的;
连接建立模块,用于基于所述第二蓝牙地址,与所述第二终端建立蓝牙连接。
可选的,所述装置还包括:
确定模块,用于基于所述目标音频信息确定所述目标音频的当前播放进度;
执行模块,用于基于所述当前播放进度执行对所述目标音频的音频播放操作。
可选的,所述装置还包括:
播放模块,用于根据所述目标音频信息播放所述目标音频;
或,
添加模块,用于根据所述目标音频信息,将所述目标音频添加至音频播放队列中。
综上所述,本申请实施例中,音频设备通过第一无线通讯组件广播定位信号,使得终端可以通过第一无线通讯组件接收该定位信号,进而根据该定位信号实时确定音频设备的位置信息,从而精确识别出位于目标范围内的目标音频设备,以便与该目标音频设备建立蓝牙连接,从而唤醒音频设备的反向共享,使得在音频共享场景中,既可以由终端将目标音频分享至音频设备,也可以由音频设备将目标音频分享至终端,从而实现音频分享的双向诉求。此外,通过将识别目标音频是否位于目标范围内作为共享音频的判断前提,更符合用户靠近即可分享的行为习惯,同时可以提高确定音频反向共享时机的精确度。
请参考图11,其示出了本申请另一个实施例提供的音频共享装置的结构框图。该装置具有实现上述方法实施例中由音频设备侧执行的功能。如图11所示,该装置可以包括:
发送模块1101,用于通过所述第一无线通讯组件向第一终端发送定位信号,所述第一终端用于根据所述定位信号识别所述音频设备是否位于目标范围内;
接收模块1102,用于在通过第二无线通讯组件接收到所述第一终端发送的数据通讯连接请求的情况下,与所述第一终端建立数据通讯连接,接收所述第一终端发送的音频共享请求,所述数据通讯连接请求是所述第一终端在识别到所述音频设备位于所述目标范围内,且需要请求共享所述音频设备中播放的目标音频时发送的;
所述发送模块1101,还用于在所述音频设备中播放有所述目标音频,且接收到对所述音频共享请求的确认共享操作的情况下,向所述第一终端发送所述目标音频对应的目标音频信息,所述目标音频是第二终端通过所述音频设备播放的。
可选的,所述发送模块1101,还用于:
在所述音频设备中播放有所述目标音频,且接收到对所述音频设备的预设手势操作的情况下,向所述第二终端发送音频信息获取请求,所述第二终端用于在接收到所述音频信息获取请求后向所述音频设备发送目标音频信息;
在接收到所述第二终端发送的所述目标音频信息的情况下,将所述目标音频信息发送至所述第一终端。
可选的,所述发送模块1101,还用于:
在所述音频设备中播放有所述目标音频的情况下,向所述第二终端发送所述音频共享请求,所述第二终端用于基于所述音频共享请求显示共享提示界面;
接收所述第二终端发送的确认共享请求,并基于所述确认共享请求向所述第一终端发送所述目标音频信息,所述确认共享请求中包含所述目标音频信息,且所述确认共享请求是所述第二终端在接收到对所述共享提示界面的确认操作后向所述音频设备发送的。
可选的,所述装置还包括:
所述接收模块1102,还用于接收所述第二终端发送的第二蓝牙地址,所述第二蓝牙地址是所述第二终端在接收到对所述共享提示界面的确认操作后向所述音频设备发送的;
所述发送模块1101,还用于向所述第一终端发送所述第二蓝牙地址,所述第一终端用于根据所述第二蓝牙地址与所述第二终端建立蓝牙连接,并在建立蓝牙连接后接收所述第一终端发送的所述目标音频信息。
可选的,所述第一无线通讯组件是UWB组件,所述第二无线通讯组件是蓝牙组件;
所述发送模块1101,还用于:
获取所述音频设备对应的设备标识和当前位置信息;
将所述设备标识和所述当前位置信息添加在UWB信号中;
通过所述UWB组件向所述第一终端发送所述UWB信号,所述第一终端用于基于所述当前位置信息识别所述音频设备是否位于所述目标范围内,基于所述设备标识确定所述音频设备广播的目标蓝牙信号,并基于所述目标蓝牙信号中包含的第一蓝牙地址与所述音频设备建立蓝牙连接。
可选的,所述目标音频信息中包含有所述目标音频对应的当前播放进度,所述第一终端用于根据所述当前播放进度执行对所述目标音频的音频播放操作。
综上所述,本申请实施例中,音频设备通过第一无线通讯组件广播定位信号,使得终端可以通过设置的第一无线通讯组件接收该定位信号,进而根据该定位信号实时确定音频设备的位置信息,从而精确识别出位于目标范围内的目标音频设备,以便与该目标音频设备建立蓝牙连接,从而唤醒音频设备的反向共享,使得在音频共享场景中,既可以由终端将目标音频分享至音频设备,也可以由音频设备将目标音频分享至终端,从而实现音频分享的双向诉求。此外,通过将识别目标音频是否位于目标范围内作为共享音频的判断前提,更符合用户靠近即可分享的行为习惯,同时可以提高确定音频反向共享时机的精确度。
需要说明的是:上述实施例提供的装置在实现其功能时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的装置与方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
在一种可能的应用场景中,第一无线通讯组件可以封装为终端的内部天线组件,该第一无线通讯组件通过内部电路板与终端设备电性相连,则对应的终端设备可以通过该第一无线通讯组件接收音频设备广播的定位信号。
请参考图12,其示出了本申请一个示例性实施例提供的终端设备1200的结构方框图。本申请中的终端设备1200可以包括一个或多个如下部件:处理器1210、存储器1220、第一无线通讯组件1230和第二无线通讯组件1240,其中,处理器1210分别与存储器1220、第一无线通讯组件1230以及第二无线通讯组件1240电性相连。
处理器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中,单独通过一块通信芯片进行实现。
存储器1220可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory,ROM)。可选地,该存储器1220包括非瞬时性计算机可读介质(non-transitory computer-readable storage medium)。存储器1220可用于存储指令、程序、代码、代码集或指令集。存储器1220可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于实现至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现上述各个方法实施例的指令等,该操作系统可以是安卓(Android)系统(包括基于Android系统深度开发的系统)、苹果公司开发的IOS系统(包括基于IOS系统深度开发的系统)或其它系统。存储数据区还可以存储终端设备1200在使用中所创建的数据(比如电话本、音视频数据、聊天记录数据)等。
本实施例中,终端1200还包括有第一无线通讯组件1230和第二无线通讯组件1240;其中,第一无线通讯组件1230用于精准定位,示意性的,第一无线通讯组件1230可以是UWB组件、蓝牙组件,或其他可以实现室内精准定位的无线通讯组件;第二无线通讯组件1240用于与其他终端设备或音频设备建立数据通讯连接,示意性的,第二无线通讯组件1240可以是蓝牙组件、NFC组件、WiFi组件、红外组件等。
本申请实施例中,存储器1220中存储有至少一条指令,该至少一条指令用于被处理器1210执行以执行如上述实施例中所示的音频共享方法。
可选的,终端设备1200还可以包括触摸显示屏,其可以为电容式触摸显示屏,该电容式触摸显示屏用于接收用户使用手指、触摸笔等任何适合的物体在其上或附近的触摸操作,以及显示各个应用程序的用户界面。触摸显示屏通常设置在终端设备1200的前面板。触摸显示屏可被设计成为全面屏、曲面屏或异型屏。触摸显示屏还可被设计成为全面屏与曲面屏的结合,异型屏与曲面屏的结合,本申请实施例对此不加以限定。
除此之外,本领域技术人员可以理解,上述附图所示出的终端设备1200的结构并不构成对终端设备1200的限定,终端可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。比如,终端设备1200中还包括射频电路、拍摄组件、传感器(不包括温度传感器)、音频电路、无线保真(Wireless  Fidelity,WiFi)组件、电源、蓝牙组件等部件,在此不再赘述。
请参考图13,其示出了本申请一个示例性实施例提供的音频设备1300的结构方框图。本申请中的音频设备1300可以包括一个或多个如下部件:存储器1301、处理器1302、第一无线通讯组件1303以及第二无线通讯组件1304。
存储器1301可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory,ROM)。可选地,该存储器1301包括非瞬时性计算机可读介质(non-transitory computer-readable storage medium)。存储器1301可用于存储指令、程序、代码、代码集或指令集。存储器1301可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现至少一个功能的指令(比如播放功能)、用于实现上述各个方法实施例的指令等。
处理器1302利用各种接口和线路连接整个音频设备1300内的各个部分,通过运行或执行存储在存储器1301内的指令、程序、代码集或指令集,以及调用存储在存储器1301内的数据,执行音频设备1300的各种功能和处理数据。可选的,处理器1302可以采用DSP、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器1302可集成调制解调器。其中,调制解调器用于处理无线通信。
可选的,音频设备1300还可以包括有第一无线通讯组件1303和第二无线通讯组件1304,其中,第一无线通讯组件1303用于精准定位,示意性的,第一无线通讯组件1303可以是UWB组件、蓝牙组件,或其他可以实现精准定位的无线通讯组件;第二无线通讯组件1304用于与其他终端设备建立数据通讯连接,示意性的,第二无线通讯组件1304可以是蓝牙组件、NFC组件、WiFi组件、红外组件等。
本实施例中,音频设备1300还包括有扬声器,通过该扬声器播放目标音频。
本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质存储有至少一条指令,所述至少一条指令由处理器加载并执行以实现如上各个实施例所述的音频共享方法。
根据本申请的一个方面,提供了一种计算机程序产品,该计算机程序产品包括计算机指令,该计算机指令存储在计算机可读存储介质中。音频设备或终端设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得音频设备或终端设备执行上述方面的各种可选实现方式中提供的音频共享方法。
本领域技术人员应该可以意识到,在上述一个或多个示例中,本申请实施例所描述的功能可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些功能存储在计算机可读存储介质中或者作为计算机可读存储介质上的一个或多个指令或代码进行传输。计算机可读存储介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是通用或专用计算机能够存取的任何可用介质。
以上所述仅为本申请的可选实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (21)

  1. 一种音频共享方法,所述方法应用于第一终端,所述第一终端设置有第一无线通讯组件和第二无线通讯组件,所述方法包括:
    通过所述第一无线通讯组件识别位于目标范围内的目标音频设备;
    通过所述第二无线通讯组件与所述目标音频设备建立数据通讯连接,向所述目标音频设备发送音频共享请求,所述音频共享请求用于请求共享所述目标音频设备中播放的目标音频,所述目标音频是第二终端通过所述目标音频设备播放的;
    接收所述目标音频对应的目标音频信息,所述目标音频信息是在接收到对所述音频共享请求的确认共享操作后向所述第一终端发送的。
  2. 根据权利要求1所述的方法,其中,所述通过所述第一无线通讯组件识别位于目标范围内的目标音频设备,包括:
    在识别到位于所述目标范围内的所述目标音频设备的情况下,显示共享请求界面,所述共享请求界面中显示有所述目标音频设备对应的目标共享控件;
    所述通过所述第二无线通讯组件与所述目标音频设备建立数据通讯连接,向所述目标音频设备发送音频共享请求,包括:
    响应于对所述共享请求界面中所述目标共享控件的触发操作,通过所述第二无线通讯组件与所述目标音频设备建立数据通讯连接,向所述目标音频设备发送所述音频共享请求。
  3. 根据权利要求2所述的方法,其中,所述第一无线通讯组件是UWB组件,所述第二无线通讯组件是蓝牙组件;
    所述响应于对所述共享请求界面中所述目标共享控件的触发操作,通过所述第二无线通讯组件与所述目标音频设备建立数据通讯连接,向所述目标音频设备发送所述音频共享请求,包括:
    响应于对所述共享请求界面中所述目标共享控件的触发操作,基于所述目标音频设备发送的目标UWB信号,确定所述目标音频设备对应的目标设备标识;
    基于所述目标设备标识,从接收到的至少一个蓝牙信号中确定出所述目标音频设备广播的目标蓝牙信号;
    根据所述目标蓝牙信号,确定所述目标音频设备对应的第一蓝牙地址;
    基于所述第一蓝牙地址与所述目标音频设备建立蓝牙连接,通过所述蓝牙组件向所述目标音频设备发送所述音频共享请求。
  4. 根据权利要求1至3任一所述的方法,其中,所述接收所述目标音频对应的目标音频信息,包括:
    接收所述目标音频设备发送的所述目标音频信息,所述目标音频信息是所述第二终端向所述目标音频设备发送的;
    或;
    在所述第一终端与所述第二终端建立有数据通讯连接的情况下,接收所述第二终端发送的所述目标音频信息。
  5. 根据权利要求4所述的方法,其中,所述第一终端与所述第二终端建立有蓝牙连接;
    所述在所述第一终端与所述第二终端建立有数据通讯连接的情况下,接收所述第二终端发送的所述目标音频信息之前,所述方法还包括:
    接收所述目标音频设备发送的所述第二终端对应的第二蓝牙地址,所述第二蓝牙地址是所述第二终端在接收到对所述音频共享请求的确认共享操作后向所述目标音频设备发送的;
    基于所述第二蓝牙地址,与所述第二终端建立蓝牙连接。
  6. 根据权利要求1至3任一所述的方法,其中,所述接收所述目标音频对应的目标音频信息之后,所述方法还包括:
    基于所述目标音频信息确定所述目标音频的当前播放进度;
    基于所述当前播放进度执行对所述目标音频的音频播放操作。
  7. 根据权利要求1至3任一所述的方法,其中,所述接收所述目标音频对应的目标音频信息之后,所 述方法还包括:
    根据所述目标音频信息播放所述目标音频;
    或,
    根据所述目标音频信息,将所述目标音频添加至音频播放队列中。
  8. 一种音频共享方法,所述方法应用于音频设备,所述音频设备设置有第一无线通讯组件和第二无线通讯组件,所述方法包括:
    通过所述第一无线通讯组件向第一终端发送定位信号,所述第一终端用于根据所述定位信号识别所述音频设备是否位于目标范围内;
    在通过所述第二无线通讯组件接收到所述第一终端发送的数据通讯连接请求的情况下,与所述第一终端建立数据通讯连接,接收所述第一终端发送的音频共享请求,所述数据通讯连接请求是所述第一终端在识别到所述音频设备位于所述目标范围内,且需要请求共享所述音频设备中播放的目标音频时发送的;
    在所述音频设备中播放有所述目标音频,且接收到对所述音频共享请求的确认共享操作的情况下,向所述第一终端发送所述目标音频对应的目标音频信息,所述目标音频是第二终端通过所述音频设备播放的。
  9. 根据权利要求8所述的方法,其中,所述在所述音频设备中播放有所述目标音频,且接收到对所述音频共享请求的确认共享操作的情况下,向所述第一终端发送所述目标音频对应的目标音频信息,包括:
    在所述音频设备中播放有所述目标音频,且接收到对所述音频设备的预设手势操作的情况下,向所述第二终端发送音频信息获取请求,所述第二终端用于在接收到所述音频信息获取请求后向所述音频设备发送目标音频信息;
    在接收到所述第二终端发送的所述目标音频信息的情况下,将所述目标音频信息发送至所述第一终端。
  10. 根据权利要求8所述的方法,其中,所述在所述音频设备中播放有所述目标音频,且接收到对所述音频共享请求的确认共享操作的情况下,向所述第一终端发送所述目标音频对应的目标音频信息,包括:
    在所述音频设备中播放有所述目标音频的情况下,向所述第二终端发送所述音频共享请求,所述第二终端用于基于所述音频共享请求显示共享提示界面;
    接收所述第二终端发送的确认共享请求,并基于所述确认共享请求向所述第一终端发送所述目标音频信息,所述确认共享请求中包含所述目标音频信息,所述确认共享请求是所述第二终端在接收到对所述共享提示界面的确认操作后向所述音频设备发送的。
  11. 根据权利要求10所述的方法,其中,所述在所述音频设备中播放有所述目标音频的情况下,向所述第二终端发送所述音频共享请求之后,所述方法还包括:
    接收所述第二终端发送的第二蓝牙地址,所述第二蓝牙地址是所述第二终端在接收到对所述共享提示界面的确认操作后向所述音频设备发送的;
    向所述第一终端发送所述第二蓝牙地址,所述第一终端用于根据所述第二蓝牙地址与所述第二终端建立蓝牙连接,并在建立蓝牙连接后接收所述第一终端发送的所述目标音频信息。
  12. 根据权利要求8至11任一所述的方法,其中,所述第一无线通讯组件是UWB组件,所述第二无线通讯组件是蓝牙组件;
    所述通过所述第一无线通讯组件向第一终端发送定位信号,包括:
    获取所述音频设备对应的设备标识和当前位置信息;
    将所述设备标识和所述当前位置信息添加在UWB信号中;
    通过所述UWB组件向所述第一终端发送所述UWB信号,所述第一终端用于基于所述当前位置信息识别所述音频设备是否位于所述目标范围内,基于所述设备标识确定所述音频设备广播的目标蓝牙信号,并基于所述目标蓝牙信号中包含的第一蓝牙地址与所述音频设备建立蓝牙连接。
  13. 根据权利要求8至11任一所述的方法,其中,所述目标音频信息中包含有所述目标音频对应的当前播放进度,所述第一终端用于根据所述当前播放进度执行对所述目标音频的音频播放操作。
  14. 一种音频共享装置,所述装置应用于第一终端,所述第一终端设置有第一无线通讯组件和第二无线通讯组件,所述装置包括:
    识别模块,用于通过所述第一无线通讯组件识别位于目标范围内的目标音频设备;
    发送模块,用于通过所述第二无线通讯组件与所述目标音频设备建立数据通讯连接,向所述目标音频设备发送音频共享请求,所述音频共享请求用于请求共享所述目标音频设备中播放的目标音频,所述目标音频是第二终端通过所述目标音频设备播放的;
    接收模块,用于接收所述目标音频对应的目标音频信息,所述目标音频信息是在接收到对所述音频共享请求的确认共享操作后向所述第一终端发送的。
  15. 一种音频共享装置,所述装置应用于音频设备,所述音频设备设置有第一无线通讯组件和第二无线通讯组件,所述装置包括:
    发送模块,用于通过所述第一无线通讯组件向第一终端发送定位信号,所述第一终端用于根据所述定位信号识别所述音频设备是否位于目标范围内;
    接收模块,用于在通过所述第二无线通讯组件接收到所述第一终端发送的数据通讯连接请求的情况下,与所述第一终端建立数据通讯连接,接收所述第一终端发送的音频共享请求,所述数据通讯连接请求是所述第一终端在识别到所述音频设备位于所述目标范围内,且需要请求共享所述音频设备中播放的目标音频时发送的;
    所述发送模块,还用于在所述音频设备中播放有所述目标音频,且接收到对所述音频共享请求的确认共享操作的情况下,向所述第一终端发送所述目标音频对应的目标音频信息,所述目标音频是第二终端通过所述音频设备播放的。
  16. 根据权利要求15所述的装置,其中,所述发送模块,还用于:
    在所述音频设备中播放有所述目标音频,且接收到对所述音频设备的预设手势操作的情况下,向所述第二终端发送音频信息获取请求,所述第二终端用于在接收到所述音频信息获取请求后向所述音频设备发送目标音频信息;
    在接收到所述第二终端发送的所述目标音频信息的情况下,将所述目标音频信息发送至所述第一终端。
  17. 根据权利要求16所述的装置,其中,所述发送模块,还用于:
    在所述音频设备中播放有所述目标音频的情况下,向所述第二终端发送所述音频共享请求,所述第二终端用于基于所述音频共享请求显示共享提示界面;
    接收所述第二终端发送的确认共享请求,并基于所述确认共享请求向所述第一终端发送所述目标音频信息,所述确认共享请求中包含所述目标音频信息,所述确认共享请求是所述第二终端在接收到对所述共享提示界面的确认操作后向所述音频设备发送的。
  18. 一种终端,所述终端包括处理器和存储器,所述存储器中存储有至少一段程序,所述至少一段程序由所述处理器加载并执行以实现如权利要求1至7任一所述的音频共享方法。
  19. 一种音频设备,所述音频设备包括处理器和存储器,所述存储器中存储有至少一段程序,所述至少一段程序由所述处理器加载并执行以实现如权利要求8至13任一所述的音频共享方法。
  20. 一种计算机可读存储介质,所述计算机可读存储介质中存储有至少一段程序,所述至少一段程序由处理器加载并执行以实现如权利要求1至7任一所述的音频共享方法,或,权利要求8至13任一所述的音频共享方法。
  21. 一种计算机程序产品,所述计算机程序产品包括计算机指令,所述计算机指令存储在计算机可读存储介质中,处理器从所述计算机可读存储介质读取并执行所述计算机指令,以实现如权利要求1至7任一所述的音频共享方法,或,权利要求8至13任一所述的音频共享方法。
PCT/CN2022/089205 2021-05-27 2022-04-26 音频共享方法、装置、终端、音频设备及存储介质 WO2022247561A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110585224.3A CN115412835A (zh) 2021-05-27 2021-05-27 音频共享方法、装置、终端、音频设备及存储介质
CN202110585224.3 2021-05-27

Publications (1)

Publication Number Publication Date
WO2022247561A1 true WO2022247561A1 (zh) 2022-12-01

Family

ID=84155755

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/089205 WO2022247561A1 (zh) 2021-05-27 2022-04-26 音频共享方法、装置、终端、音频设备及存储介质

Country Status (2)

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

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103391118A (zh) * 2013-07-23 2013-11-13 广东欧珀移动通信有限公司 一种蓝牙耳机及利用该蓝牙耳机共享音频的方法
CN103825635A (zh) * 2014-03-11 2014-05-28 宁波翼动通讯科技有限公司 一种利用蓝牙耳机共享音频的方法
CN105072146A (zh) * 2015-06-30 2015-11-18 广东欧珀移动通信有限公司 一种音乐信息的共享方法及装置
CN105208511A (zh) * 2015-08-28 2015-12-30 深圳市冠旭电子有限公司 基于智能蓝牙耳机的音乐共享方法、系统及智能蓝牙耳机
CN107409265A (zh) * 2014-12-23 2017-11-28 T·德格雷伊 音频共享方法和系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103391118A (zh) * 2013-07-23 2013-11-13 广东欧珀移动通信有限公司 一种蓝牙耳机及利用该蓝牙耳机共享音频的方法
CN103825635A (zh) * 2014-03-11 2014-05-28 宁波翼动通讯科技有限公司 一种利用蓝牙耳机共享音频的方法
CN107409265A (zh) * 2014-12-23 2017-11-28 T·德格雷伊 音频共享方法和系统
CN105072146A (zh) * 2015-06-30 2015-11-18 广东欧珀移动通信有限公司 一种音乐信息的共享方法及装置
CN105208511A (zh) * 2015-08-28 2015-12-30 深圳市冠旭电子有限公司 基于智能蓝牙耳机的音乐共享方法、系统及智能蓝牙耳机

Also Published As

Publication number Publication date
CN115412835A (zh) 2022-11-29

Similar Documents

Publication Publication Date Title
CN110622123B (zh) 一种显示方法及装置
US11659620B2 (en) Data transmission method and device
US10834237B2 (en) Method, apparatus, and storage medium for controlling cooperation of multiple intelligent devices with social application platform
US20200004394A1 (en) Sticker presentation method and apparatus and computer-readable storage medium
CN109683847A (zh) 一种音量调节方法和终端
KR101901720B1 (ko) 더미 장치와의 연동 방법 및 그 전자 장치
US10951557B2 (en) Information interaction method and terminal
KR20140037586A (ko) 이동 단말기 및 그 제어방법
WO2018161962A1 (zh) 分享图像的方法、电子设备及系统
EP3627807B1 (en) Audio playing method and electronic device
EP4318199A1 (en) Method for interaction between electronic devices and electronic device
US10636228B2 (en) Method, device, and system for processing vehicle diagnosis and information
CN107220132B (zh) 一种文件创建信息的监听方法、设备及存储介质
WO2021104246A1 (zh) 网络连接方法和电子设备
WO2023284418A1 (zh) 定位方法、装置、电子设备以及计算机可读存储介质
EP3429176A1 (en) Scenario-based sound effect control method and electronic device
WO2024055494A1 (zh) 基于蓝牙耳机的通话方法、装置及存储介质
CN110072295B (zh) 双通道通信方法、装置、第一终端及介质
WO2022048453A1 (zh) 解锁方法及电子设备
WO2022247558A1 (zh) 音频共享方法、装置、终端、音频设备及存储介质
WO2021052333A1 (zh) 消息回复方法、装置及移动终端
CN112492529B (zh) 音频传输方法、移动终端及计算机可读存储介质
CN110427124B (zh) 一种投影装置、可穿戴设备及检测控制方法
KR102327665B1 (ko) 페이징 프레임의 위치 확정 방법, 장치 및 단말 기기
WO2022247561A1 (zh) 音频共享方法、装置、终端、音频设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22810294

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE