WO2024055738A1 - 音频数据的共享方法、装置、电子设备以及存储介质 - Google Patents

音频数据的共享方法、装置、电子设备以及存储介质 Download PDF

Info

Publication number
WO2024055738A1
WO2024055738A1 PCT/CN2023/107261 CN2023107261W WO2024055738A1 WO 2024055738 A1 WO2024055738 A1 WO 2024055738A1 CN 2023107261 W CN2023107261 W CN 2023107261W WO 2024055738 A1 WO2024055738 A1 WO 2024055738A1
Authority
WO
WIPO (PCT)
Prior art keywords
bluetooth
electronic device
bluetooth devices
identification information
audio data
Prior art date
Application number
PCT/CN2023/107261
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 WO2024055738A1 publication Critical patent/WO2024055738A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/06Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services
    • H04W4/08User group management
    • 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
    • H04W56/00Synchronisation arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Definitions

  • the present application relates to the technical field of electronic equipment, and more specifically, to an audio data sharing method, device, electronic equipment, and storage medium.
  • this application proposes an audio data sharing method, device, electronic device and storage medium to solve the above problems.
  • embodiments of the present application provide a method for sharing audio data, which is applied to an electronic device.
  • the electronic device establishes a low-power Bluetooth connection with at least two Bluetooth devices, wherein the at least two Bluetooth devices do not belong to the same device group, the method includes: in response to the audio sharing instruction, when the electronic device sets the at least two Bluetooth devices to belong to the same device group; when the electronic device plays audio data, respectively Send the audio data to the at least two Bluetooth devices.
  • embodiments of the present application provide an audio data sharing device, which is applied to an electronic device.
  • the electronic device establishes a low-power Bluetooth connection with at least two Bluetooth devices, wherein the at least two Bluetooth devices do not belong to the same device group, the device includes: a device group setting module, configured to set the at least two Bluetooth devices on the electronic device to belong to the same device group in response to the audio sharing instruction; an audio data sharing module, configured to When the electronic device plays audio data, the audio data is sent to the at least two Bluetooth devices respectively.
  • embodiments of the present application provide an electronic device, including a memory and a processor.
  • the memory is coupled to the processor, and the memory stores instructions that are executed when the instructions are executed by the processor.
  • the processor executes the above method.
  • embodiments of the present application provide a computer-readable storage medium, the computer-readable storage medium stores program code, and the program code can be called by a processor to execute the above method.
  • Figure 1 shows a schematic diagram of an application environment that can be used for the audio data sharing method provided by the embodiment of the present application
  • FIG. 2 shows a schematic flowchart of an audio data sharing method provided by an embodiment of the present application
  • FIG. 3 shows a schematic flowchart of an audio data sharing method provided by an embodiment of the present application
  • FIG. 4 shows a schematic flowchart of an audio data sharing method provided by an embodiment of the present application
  • FIG. 5 shows a schematic flowchart of step S310 of the audio data sharing method provided in Figure 4 of the present application
  • Figure 6 shows a schematic flowchart of an audio data sharing method provided by an embodiment of the present application
  • Figure 7 shows a schematic flowchart of an audio data sharing method provided by an embodiment of the present application.
  • Figure 8 shows a module block diagram of an audio data sharing device provided by an embodiment of the present application.
  • Figure 9 shows a block diagram of an electronic device used to perform an audio data sharing method according to an embodiment of the present application.
  • Figure 10 shows a storage unit used to save or carry the program code that implements the audio data sharing method according to the embodiment of the present application.
  • Bluetooth Low Energy Audio BLE Audio
  • Bluetooth device When a Bluetooth device listens to audio data, an electronic device can often only send audio data to one Bluetooth device (such as a pair of Bluetooth device), cannot send audio data to multiple Bluetooth devices at the same time, but there are often scenarios in life or work where users using this Bluetooth device want to share the audio data in the electronic device they are listening to with other users. This requires providing corresponding technology to conveniently and reliably share audio data in electronic devices with other users.
  • BLE Audio provides the Coordinated Set Identification Profile (CSIP) protocol, which allows devices belonging to the same combination to achieve coordination and synchronization when interacting with external devices.
  • This protocol mainly explains how external devices identify multiple independent devices in a combination as the same combination. For multiple devices belonging to the same combination, if you want to use them with external devices at the same time, each device needs to establish an independent LE-Audio connection with the external device. At the same time, you can obtain the combination identification information of each device. , for example, combine the identification resolution value (Set Identity Resolving Key, SIRK) for judgment, and form a combination of devices with the same SIRK value. That is, for Bluetooth devices with the same SIRK value, the electronic device will regard these Bluetooth devices as a device group (Group), and then when it continues to output audio, it will conduct audio transmission with all devices in a device group at the same time.
  • SIRK Set Identity Resolving Key
  • the inventor found through research that in order to realize that multiple Bluetooth devices can share the audio data transmitted by the electronic device, the SIRK values of the multiple Bluetooth devices need to be burned to the same SIRK value during factory settings.
  • this method will cause other surrounding Bluetooth devices to be mistakenly connected by the electronic device.
  • the electronic device when an electronic device chooses to connect to a Bluetooth device, the electronic device first establishes a LE-Audio connection with the Bluetooth device and obtains the SIRK value of the Bluetooth device. At this time, the Bluetooth device can work normally with the electronic device. After receiving the prand field in the RSI value carried in the broadcast information of another Bluetooth device, the electronic device calculates whether the hash is consistent with the hash field of the RSI value in the broadcast. If it is the same, it automatically establishes a LE-Audio connection with the other Bluetooth device. .
  • the RSI value in the broadcast information includes a hash value and a prand field, and the prand field includes a random part and a fixed part (ie, the trailing 1 and 0).
  • the hash value can be calculated from the SIRK and prand fields.
  • the electronic device calculates a hash value based on the SIRK of the connected Bluetooth device and the prand field in the RSI value carried in the broadcast message of the other Bluetooth device, and then compares the calculated hash value with the broadcast message of the other Bluetooth device. Compare the hash field of the RSI value to determine whether the two are consistent.
  • the inventor discovered after long-term research and proposed the audio data sharing method, device, electronic device and storage medium provided by the embodiments of the present application.
  • audio data sharing is required, at least two Bluetooth devices Setting them to belong to the same device group can realize the sharing function of audio data, thereby improving user experience and enhancing product competitiveness.
  • the specific audio data sharing method will be described in detail in subsequent embodiments.
  • FIG. 1 shows a schematic diagram of an application environment that can be used for the audio data sharing method provided by the embodiment of the present application.
  • the electronic device 100 may include a smart phone, a tablet, a laptop, a personal computer, an audio-visual device, a wearable electronic device and other sound source devices, which are not limited here.
  • the first Bluetooth device 200 may include a Bluetooth speaker, a Bluetooth headset, etc.
  • the second Bluetooth device 300 may include an audio playback device such as a Bluetooth speaker, a Bluetooth headset, etc. And when the first Bluetooth device 200 is a Bluetooth headset, the Bluetooth headset may include one Bluetooth headset or a pair of Bluetooth headsets. When the second Bluetooth device 300 is a Bluetooth headset, the Bluetooth headset may include one Bluetooth headset. , it can also include a pair of Bluetooth headsets, which are not limited here.
  • a BLE connection can be established between the electronic device 100 and the first Bluetooth device 200. Based on this, information exchange can be performed between the electronic device 100 and the first Bluetooth device 200; the electronic device 100 and the second Bluetooth device 300 A BLE connection can be established between them, and based on this, information can be exchanged between the electronic device 100 and the second Bluetooth device 300 .
  • the first Bluetooth device 200/the second Bluetooth headset 300 is a Bluetooth device that supports LE Audio
  • the electronic device 100 is an electronic device that supports LE Audio.
  • the first Bluetooth device 200/second Bluetooth headset 300 supports the server role (unicast server) of LE Audio
  • the electronic device 100 supports the client role (unicast client) of LE Audio.
  • unicast client is one of the LE Audio BAP roles. It is mainly used to receive the broadcast of the discovered unicast server and establish a connection with the unicast server.
  • unicast server is another one of the LE Audio BAP roles. It is mainly used to transmit broadcasts and Establish a connection with the unicast client.
  • FIG. 2 shows a schematic flowchart of an audio data sharing method provided by an embodiment of the present application.
  • This method is used to set at least two Bluetooth devices to belong to the same device group when audio data sharing is required, so that the audio data sharing function can be realized, thereby improving user experience and enhancing product competitiveness.
  • the audio data sharing method is applied to the audio data sharing device 400 shown in FIG. 8 and the electronic device 100 configured with the audio data sharing device 400 ( FIG. 9 ).
  • the following will take an electronic device as an example to illustrate the specific process of this embodiment.
  • the electronic devices applied in this embodiment may include smart phones, tablet computers, wearable electronic devices, etc., which are not limited here.
  • the process shown in Figure 2 will be described in detail below.
  • the electronic device establishes a low-power Bluetooth connection with at least two Bluetooth devices, and the at least two Bluetooth devices do not belong to the same device group.
  • the audio data sharing method may specifically include the following steps:
  • Step S110 In response to the audio sharing instruction, the electronic device sets the at least two Bluetooth devices to belong to the same device segment. Group.
  • a BLE connection can be established between the electronic device and at least two Bluetooth devices, and the at least two Bluetooth devices do not belong to the same device group.
  • the at least two Bluetooth devices may be Bluetooth devices of the same type, for example, the at least two Bluetooth devices are both Bluetooth headsets; or the at least two Bluetooth devices may be different types of Bluetooth devices, for example, the at least two Bluetooth devices Bluetooth devices can include Bluetooth headsets and smart speakers.
  • the Bluetooth headset can be placed in the headphone box.
  • the electronic BLE connection between device and Bluetooth headset As another method, the Bluetooth headset can be placed in the headset box.
  • a BLE connection between the electronic device and the Bluetooth headset can be established.
  • the Bluetooth headset can be placed in the headphone box.
  • the Bluetooth device can transmit a low-power audio broadcast
  • the electronic device can receive the low-power audio broadcast transmitted by the Bluetooth device to obtain the Bluetooth address and other information of the Bluetooth device from the low-power audio broadcast.
  • a BLE connection with the Bluetooth device is established based on the Bluetooth address and other information of the Bluetooth device.
  • the Bluetooth headset can be placed in the headphone box.
  • a low-power audio broadcast can be transmitted.
  • the electronic device receives the low-power audio broadcast, it can respond to the Low Power Audio Broadcasting establishes a BLE connection with Bluetooth headsets.
  • the Bluetooth headset can be placed in the headphone box.
  • a low-power audio broadcast can be transmitted.
  • a BLE connection with the Bluetooth headset may be established in response to the low power audio broadcast.
  • the Bluetooth headset can be placed in the headphone box.
  • the Bluetooth headset When it is detected that the Bluetooth headset is taken out of the headphone box, it can be detected whether the Bluetooth headset is in a wearing state. When it is detected that the Bluetooth device is in a wearing state, then A low-power audio broadcast can be transmitted. When the electronic device receives the low-power audio broadcast, the electronic device can establish a BLE connection with the Bluetooth headset in response to the low-power audio broadcast.
  • the first Bluetooth headset and the second Bluetooth headset transmit LE-Audio broadcasts, and the user turns on the electronic device's After the Bluetooth Low Energy LE scan, the LE-Audio broadcast transmitted by the first Bluetooth headset is scanned, and the user clicks to link the first Bluetooth headset, then an LE connection is established between the electronic device and the first Bluetooth headset, and the electronic device connects to the first Bluetooth headset.
  • a service query establish a LE-Audio connection with the first Bluetooth headset according to the service query result
  • the electronic device obtains the SIRK value from the first Bluetooth headset
  • the electronic device scans the LE-Audio broadcast transmitted by the second Bluetooth device.
  • the SIRK value of one Bluetooth headset and the prand field of the RSI value in the LE-Audio broadcast transmitted by the second Bluetooth headset calculate a hash value.
  • the electronic device determines and calculates the hash value and the hash field in the LE-Audio broadcast transmitted by the second Bluetooth headset.
  • the electronic device establishes a LE connection with the second Bluetooth headset, the electronic device initiates a service query to the second Bluetooth headset, and establishes a LE-Audio connection with the second Bluetooth headset based on the service query result. Based on this, if the first Bluetooth headset corresponds to the left ear and the second Bluetooth headset corresponds to the right ear, the first Bluetooth headset can receive left channel audio data and the second Bluetooth headset can receive right channel audio data.
  • the electronic device when it is determined that the electronic device has established a BLE connection with at least two Bluetooth devices, it can detect whether the audio sharing instruction is received. If it is determined that the audio sharing instruction is received, it can respond to the audio sharing instruction.
  • the instruction is to set the at least two Bluetooth devices to belong to the same device group in the electronic device, that is, to set the at least two Bluetooth devices from not belonging to the same device group to belonging to the same device group locally in the electronic device. Based on this, at least two Bluetooth devices are set locally on the electronic device to belong to the same device group, while the actual device groups of the at least two Bluetooth devices remain unchanged, that is, for at least two Bluetooth devices, their actual device groupings are not changed. Belong to the same device group.
  • the electronic device can detect whether the target voice information is received. If it is determined that the target voice information is received, it can be determined that the audio sharing instruction is received; the electronic device can detect whether the target touch operation is received. If it is determined that the target touch operation is received, it can be determined that the audio sharing instruction is received, which is not limited here.
  • the target touch operation may include a touch operation acting on a virtual control of the electronic device, a touch operation acting on a physical button of the electronic device, etc., which are not limited here.
  • the touch operations acting on virtual controls may include: click operations, pressing operations, sliding operations, etc.
  • the touch operations acting on physical buttons may include: clicking operations, pressing operations, etc., which will not be discussed here. limited.
  • At least two Bluetooth devices are set to belong to the same device group, wherein the audio data of the electronic device received by the at least two Bluetooth devices belonging to the same device group can be synchronized.
  • the combination identification information of at least two Bluetooth devices recorded in the electronic device can be set to the same combination identification information, thereby setting the at least two Bluetooth devices to belong to the same device group.
  • the combination identification information may include a combination identification analysis value SIRK.
  • the feature identification information of at least two Bluetooth devices recorded in the electronic device can be set to the same combined identification information, thereby setting the at least two Bluetooth devices to belong to the same device group.
  • the feature identification information may include identification information used to uniquely identify the Bluetooth device, such as an identification code.
  • Step S120 When the electronic device plays audio data, send the audio data to the at least two Bluetooth devices respectively.
  • the electronic device when the electronic device sets at least two Bluetooth devices to belong to the same device group, it can detect whether the electronic device plays audio data, wherein, when it is detected that the electronic device plays audio data , the audio data can be sent to the at least two Bluetooth devices respectively.
  • audio data sharing on the electronic device side can be realized without relying on customized design on the Bluetooth device side, which can improve the audio data sharing experience.
  • the audio data played by the electronic device may include music audio data, video audio data, game audio data, etc., which is not limited here.
  • the audio data when it is detected that the electronic device plays audio data, can be sent to the at least two Bluetooth devices separately and synchronously.
  • a connected synchronous stream (Connected Isochronous Stream, CIS) between the electronic device and at least two Bluetooth devices can be established, based on the electronic device and the at least two Bluetooth devices.
  • the audio data sharing method provided by an embodiment of the present application the audio data sharing method, device, electronic device and storage medium provided by the embodiment of the present application are applied to electronic devices that establish low-level communication with at least two Bluetooth devices. Power consumption Bluetooth connection, and the at least two Bluetooth devices do not belong to the same device group.
  • the audio sharing instruction when the electronic device sets at least two Bluetooth devices to belong to the same device group, and when the electronic device plays audio data, the audio data is sent to the at least two Bluetooth devices respectively, so that the audio data is sent to the at least two Bluetooth devices as needed.
  • setting at least two Bluetooth devices to belong to the same device group can realize the sharing function of audio data, thereby improving user experience and enhancing product competitiveness.
  • FIG. 3 shows a schematic flowchart of an audio data sharing method provided by an embodiment of the present application. This method is applied to the above-mentioned electronic device, which has established low-power Bluetooth connections with at least two Bluetooth devices, and the at least two Bluetooth devices do not belong to the same device group.
  • the process shown in Figure 3 will be described in detail below.
  • the audio data sharing method may specifically include the following steps:
  • Step S210 In response to the audio sharing instruction, the electronic device sets the at least two Bluetooth devices to belong to the same device group.
  • step S210 For the specific description of step S210, please refer to step S110, which will not be described again here.
  • Step S220 When the electronic device plays the audio data, establish a connection synchronization stream with the at least two Bluetooth devices respectively.
  • connection synchronization streams with at least two Bluetooth devices can be established respectively.
  • the electronic device may respectively initiate a synchronization stream connection request to the at least two Bluetooth devices, and the at least two Bluetooth devices A connection synchronization flow with the electronic device may be established in response to the synchronization flow connection request.
  • the electronic device A first synchronization stream connection request can be initiated to the first Bluetooth device.
  • the first Bluetooth device can respond to the first synchronization stream connection request and establish a connection synchronization stream with the electronic device.
  • the electronic device can send a synchronization stream to the second Bluetooth device.
  • the second Bluetooth device Initiating a second synchronization stream connection request, the second Bluetooth device can respond to the second synchronization stream connection request and establish a connection synchronization stream with the electronic device.
  • the Bluetooth headset pair may include a first Bluetooth headset and a second Bluetooth headset.
  • the electronic device can initiate a first synchronization stream connection request to the first Bluetooth headset, and the first Bluetooth headset can respond to the first synchronization stream connection request and establish a connection synchronization stream with the electronic device.
  • the electronic device can initiate a second synchronization stream connection request to the second Bluetooth headset, and the second Bluetooth headset can respond to the second synchronization stream connection request and establish a connection synchronization stream with the electronic device.
  • the electronic device can send a second synchronization stream connection request to the second Bluetooth headset.
  • the second Bluetooth device initiates a third synchronization stream connection request, and the third Bluetooth device can respond to the third synchronization stream connection request to establish a connection synchronization stream with the electronic device.
  • Step S230 Send the audio data to the at least two Bluetooth devices based on the connection synchronization stream with the at least two Bluetooth devices.
  • the audio when the connection synchronization flow between the electronic device and at least two Bluetooth devices is successfully established, the audio can be transferred to the audio device based on the connection synchronization flow between the electronic device and at least two Bluetooth devices. Data is sent to the at least two Bluetooth devices.
  • the connection synchronization flow between the electronic device and at least two Bluetooth devices may be based on the connection synchronization flow, Send the audio data to the corresponding Bluetooth device.
  • the electronic device takes at least two Bluetooth devices including a first Bluetooth device and a second Bluetooth device as an example, the electronic device establishes a first connection synchronization flow with the first Bluetooth device, and the electronic device establishes a second connection synchronization flow with the second Bluetooth device. , then the electronic device can synchronize based on the first connection The stream sends the audio data to the first Bluetooth device, and at the same time, the stream sends the audio data to the second Bluetooth device based on the second connection synchronization.
  • Step S240 In response to the control instruction sent by the first target Bluetooth device based on the connection synchronization flow, control the electronic device, and/or send the control instruction to all but one of the at least two Bluetooth devices.
  • the electronic device can send information to the at least two Bluetooth devices based on the connection synchronization stream.
  • the at least two Bluetooth devices can also send information based on the connection synchronization stream. Connect the sync stream to send information to the electronic device.
  • any Bluetooth device among the at least two Bluetooth devices can send control instructions to the electronic device based on the connection synchronization flow between it and the electronic device.
  • the Bluetooth device that sends control instructions to the electronic device among the at least two Bluetooth devices can be determined as the first target Bluetooth device, and then the first target Bluetooth device can synchronize the flow based on the connection between it and the electronic device, Send a control instruction to the electronic device.
  • the electronic device can respond to the control instruction, perform an operation corresponding to the control instruction, and/or send the control instruction to the at least two Bluetooth devices.
  • Bluetooth devices other than the first target Bluetooth device in the device to achieve synchronization of at least two Bluetooth devices.
  • control instruction may include a music control instruction
  • the electronic device may respond to the music control instruction to control the playing, pausing, ending of the music, etc., which is not limited here.
  • control instruction may include a call control instruction
  • the electronic device may respond to the call control instruction to control answering, hanging up, etc. of the call, which is not limited here.
  • control instruction may include a status instruction of the Bluetooth device.
  • the electronic device may respond to the status instruction of the Bluetooth device and update the status information of the Bluetooth device, for example, the remaining power of the Bluetooth device, the connection status of the Bluetooth device, etc. , no limitation is made here.
  • control instruction may include a volume control instruction
  • the electronic device may respond to the volume control instruction by forwarding the volume control instruction to a Bluetooth device other than the first target Bluetooth device among the at least two Bluetooth devices, to Achieve volume synchronization of at least two Bluetooth devices.
  • An audio data sharing method in response to an audio sharing instruction, when the electronic device sets at least two Bluetooth devices to belong to the same device group, and when the electronic device plays audio data, establishes a separate communication with at least two Bluetooth devices.
  • a connection synchronization stream between two Bluetooth devices sending audio data to at least two Bluetooth devices based on a connection synchronization stream with at least two Bluetooth devices, in response to a control instruction sent by the first target Bluetooth device based on the connection synchronization stream , control the electronic device, and/or send the control instruction to a Bluetooth device other than the first target Bluetooth device among the at least two Bluetooth devices, wherein the first target Bluetooth device is at least two Bluetooth devices. Any Bluetooth device among the Bluetooth devices.
  • this embodiment also establishes a connection synchronization flow between the electronic device and at least two Bluetooth devices, which can improve the user experience and enhance product competitiveness.
  • FIG. 4 shows a schematic flowchart of an audio data sharing method provided by an embodiment of the present application. This method is applied to the above-mentioned electronic device.
  • the electronic device has established low-power Bluetooth connections with at least two Bluetooth devices.
  • the at least two Bluetooth devices do not belong to the same device group.
  • the process shown in Figure 4 will be elaborated below.
  • the audio data sharing method may specifically include the following steps:
  • Step S310 In response to the audio sharing instruction, set the combined identification information of the at least two Bluetooth devices to the same combined identification information, wherein the combined identification information is used to indicate the device grouping of the Bluetooth device, and the The combined identification information is recorded in the electronic device.
  • the electronic device can obtain the combination identification information of the Bluetooth device in advance and record the obtained combination identification information of the Bluetooth device locally.
  • the combination identification information of the Bluetooth device can be used to indicate the device grouping of the Bluetooth device. That is, Bluetooth devices with the same combination identification information can be considered as Bluetooth devices belonging to the same device group; Bluetooth devices with different combination identification information can be considered as Bluetooth devices that do not belong to the same device group.
  • the combination identification information includes the combination identification resolution value SIRK.
  • the electronic device when it receives an audio sharing instruction, it can respond to the audio sharing instruction by setting the locally recorded combination identification information of the at least two Bluetooth devices to the same combination identification information, thereby Implements setting at least two Bluetooth devices to belong to the same device group.
  • the combination identification information of at least two Bluetooth devices is set as the target combination identification information, for example, the combination identification information of at least two Bluetooth devices is set as the target SIRK.
  • the combination identification information of at least two Bluetooth devices when the combination identification information of at least two Bluetooth devices is set to the same combination identification information, the combination identification information of the at least two Bluetooth devices can be saved as the same combination identification information, that is, in When the combination identification information of at least two Bluetooth devices is set to the same combination identification information, the electronic device will save the same combination identification information locally and will not set it to the at least two Bluetooth devices. There is no need to change the Bluetooth device.
  • the advanced design improves the applicability of audio sharing.
  • FIG. 5 shows a schematic flowchart of step S310 of the audio data sharing method provided in FIG. 4 of the present application.
  • the process shown in Figure 5 will be described in detail below.
  • the method may specifically include the following steps:
  • Step S311 In response to the audio sharing instruction, obtain initial combination identification information of the at least two Bluetooth devices respectively.
  • Bluetooth devices when they are factory-set, they will generally burn the corresponding combination identification information, and the combination identification information burned by different Bluetooth devices The information is different.
  • the Bluetooth device is a pair of Bluetooth headsets, the combined identification information of the two Bluetooth headsets in the pair of Bluetooth headsets is burned to be consistent. For example, assuming that at least two Bluetooth devices include a first Bluetooth device and a second Bluetooth device, the SIRK value of the first Bluetooth device when it leaves the factory can be burned as SIRK1, and the SIRK value of the second Bluetooth device when it leaves the factory can be burned. Recorded as SIRK2.
  • the combination identification information burned in the factory setting of the Bluetooth device can be used as the initial combination identification information of the Bluetooth device. Then the initial combination identification information of the first Bluetooth device can be SIRK1, and the initial combination identification information of the second Bluetooth device can be SIRK1.
  • the initial combined identification information may be SIRK2.
  • the initial combination identification information of the at least two Bluetooth devices can be obtained respectively. That is, when an audio sharing instruction is received, the combination identification information set when the at least two Bluetooth devices are set up in the field can be obtained respectively as the initial combination identification information of the at least two Bluetooth devices.
  • the SIRK1 of the first Bluetooth device can be obtained as the initial combination identification information of the first Bluetooth device
  • the SIRK2 of the second Bluetooth device can be obtained as the initial combination identification information of the second Bluetooth device.
  • the initial combination identification information of the at least two Bluetooth devices can be obtained based on the BLE connection between the electronic device and the at least two Bluetooth devices.
  • service queries can be initiated to at least two Bluetooth devices based on the BLE connections between the electronic device and at least two Bluetooth devices, and the service queries can be obtained respectively based on the service query results.
  • Initial combined identification information of at least two Bluetooth devices For example, the combined identification information of the first Bluetooth device can be obtained based on the BLE connection with the first Bluetooth device, and the combined identification information of the second Bluetooth device can be obtained based on the BLE connection with the second Bluetooth device. .
  • the combined identification information of the at least two Bluetooth devices can be obtained locally from the electronic device. Then, before responding to the audio sharing instruction and respectively obtaining the initial combination identification information of the at least two Bluetooth devices, it may also include: based on the BLE connection between the electronic device and the at least two Bluetooth devices, respectively obtaining the initial combination identification information of the at least two Bluetooth devices.
  • the combined identification information stores the combined identification information of the at least two Bluetooth devices locally in the electronic device. Based on this, when an audio sharing instruction is subsequently received, the combined identification information of the at least two Bluetooth devices can be directly obtained locally from the electronic device.
  • Step S312 Update the combination identification information of the at least two Bluetooth devices from their respective initial combination identification information to the same combination identification information.
  • the combination identification information of the at least two Bluetooth devices when the combination identification information of the at least two Bluetooth devices is obtained, the combination identification information of the at least two Bluetooth devices can be updated from their respective initial combination identification information to the same combination identification information.
  • the same combination identification information may be the same as a certain initial combination identification information, or may be different from all initial combination identification information, which is not limited here.
  • At least two Bluetooth devices include a first Bluetooth device and a second Bluetooth device
  • the initial combination identification information of the first Bluetooth device is SIRK1
  • the initial combination identification information of the second Bluetooth device is SIRK2.
  • the combination identification information of the first Bluetooth device can be updated from SIRK1 to SIRK3
  • the combination identification information of the second Bluetooth device can be updated from SIRK2 to SIRK3
  • the combination identification information of the first Bluetooth device can be kept as SIRK1
  • the combination identification information of the second Bluetooth device can be updated from SIRK2 to SIRK1
  • the combination identification information of the first Bluetooth device can be updated.
  • the information is updated from SIRK1 to SIRK2, and the combined identification information of the second Bluetooth device is maintained as SIRK2.
  • the method further includes: in response to the audio stop sharing instruction, changing the combination identification information of the at least two Bluetooth devices.
  • the combination identification information is restored from the target combination identification information to the respective initial combination identification information.
  • At least two Bluetooth devices include a first Bluetooth device and a second Bluetooth device
  • the initial combination identification information of the first Bluetooth device is SIRK1
  • the initial combination identification information of the second Bluetooth device is SIRK2.
  • the combination identification information of the first Bluetooth device can be restored from SIRK3 to SIRK1
  • the combination identification information of the second Bluetooth device can be restored from SIRK3 to SIRK2.
  • the combination identification information of the first Bluetooth device can be kept as SIRK1, and the combination identification information of the second Bluetooth device can be restored from SIRK1 to SIRK2; if the same combination identification information is SIRK2, then the combination identification information of the second Bluetooth device can be restored from SIRK1 to SIRK2.
  • the combination identification information of the first Bluetooth device is restored from SIRK2 to SIRK1, and the combination identification information of the second Bluetooth device is maintained as SIRK2.
  • responding to the audio stop sharing instruction may include: the electronic device receives instruction information indicating to stop audio sharing.
  • the received instruction information for instructing to stop audio sharing may include voice information for instructing to stop audio sharing, a touch operation for instructing to stop audio sharing, etc., which is not limited here.
  • responding to the audio stop sharing instruction may include: the electronic device stops playing the audio data.
  • the electronic device stopping playing audio data may include the electronic device pausing playing audio data, the electronic device ending playing audio data, etc., which is not limited here.
  • responding to the audio stop sharing instruction may include: the electronic device disconnects BLE connections with at least two Bluetooth devices.
  • responding to the audio stop sharing instruction may include: the electronic device disconnects from the at least two Bluetooth devices. synchronous flow.
  • Step S320 When the electronic device plays audio data, send the audio data to the at least two Bluetooth devices respectively.
  • step S320 For the specific description of step S320, please refer to step S120, which will not be described again here.
  • An audio data sharing method in response to an audio sharing instruction, sets the combined identification information of at least two Bluetooth devices to the same combined identification information, where the combined identification information is used to indicate the device grouping of the Bluetooth devices, The combined identification information is recorded in the electronic device.
  • the electronic device plays audio data, the audio data is sent to the at least two Bluetooth devices respectively.
  • this embodiment also sets at least two Bluetooth devices to belong to the same device combination by setting the combination identification information of at least two Bluetooth devices to the same combination identification information. , to improve the accuracy of settings for the same device combination.
  • FIG. 6 shows a schematic flowchart of an audio data sharing method provided by an embodiment of the present application. This method is applied to the above-mentioned electronic device.
  • the electronic device has established low-power Bluetooth connections with at least two Bluetooth devices.
  • the at least two Bluetooth devices do not belong to the same device group.
  • the process shown in Figure 6 will be elaborated below.
  • the audio data sharing method may specifically include the following steps:
  • Step S410 In response to the audio sharing instruction, output prompt information, where the prompt information is used to prompt to select a Bluetooth device for audio sharing from the at least two Bluetooth devices.
  • prompt information for selecting a Bluetooth device for audio sharing from at least two Bluetooth devices may be output in response to the audio sharing instruction.
  • the prompt information may include voice prompt information, text prompt information, vibration prompt information, etc., which is not limited here.
  • the device numbers of the at least two Bluetooth devices can be obtained.
  • the two Bluetooth devices can be determined as target Bluetooth devices; when the number of devices is greater than two, prompt information can be output.
  • Step S420 In response to the device selection instruction, determine at least two second target Bluetooth devices from the at least two Bluetooth devices.
  • the prompt information when prompt information is output, it can be detected whether a device selection instruction triggered based on the prompt information is received.
  • a device selection instruction triggered based on the prompt information is received.
  • the prompt information may be used to indicate that the first Bluetooth device, the second Bluetooth device, the third Bluetooth device, and Select at least two Bluetooth devices among the fourth Bluetooth devices. If the device selection instruction indicates selecting the second Bluetooth device and the fourth Bluetooth device, the second Bluetooth device and the fourth Bluetooth device may be determined as the second target Bluetooth device.
  • a device selection instruction triggered based on the prompt information it can be detected whether a device selection instruction triggered based on the prompt information is received. Wherein, if it is determined that the first abandonment of device selection instruction triggered based on the prompt information is received, audio sharing may be stopped, that is, audio data may be stopped from being sent to at least two Bluetooth devices respectively.
  • the second abandon device selection instruction triggered based on the prompt information it can be detected whether a device selection instruction triggered based on the prompt information is received. Wherein, if it is determined that the second abandon device selection instruction triggered based on the prompt information is received, at least two second target Bluetooth devices may be randomly determined from the at least two Bluetooth devices.
  • prompt information when prompt information is output, it can be detected whether a device selection instruction triggered based on the prompt information is received. Wherein, if it is determined that no user-triggered selection instruction is received within the preset time, audio sharing may be stopped, that is, audio data may be stopped from being sent to at least two Bluetooth devices respectively.
  • Step S430 The electronic device sets the at least two second target Bluetooth devices to belong to the same device group.
  • the at least two target Bluetooth devices when at least two target Bluetooth devices are determined, the at least two target Bluetooth devices can be set on the electronic device to belong to the same device group.
  • Step S440 When the electronic device plays audio data, send the audio data to the at least two Bluetooth devices respectively.
  • step S440 please refer to step S120, which will not be described again here.
  • An audio data sharing method outputs prompt information in response to an audio sharing instruction, where the prompt information is used to prompt the selection of a Bluetooth device for audio sharing from at least two Bluetooth devices.
  • the device selection Instruction to determine at least two second target Bluetooth devices from at least two Bluetooth devices, when the electronic device sets the at least two second target Bluetooth devices to belong to the same device group, and when the electronic device plays audio data, respectively Audio data is sent to at least two Bluetooth devices.
  • this embodiment also allows the user to select the Bluetooth device that needs to share audio. equipment to enhance the user experience.
  • FIG. 7 is a schematic flowchart of an audio data sharing method provided by an embodiment of the present application.
  • the method is applied to the above-mentioned electronic device.
  • the electronic device has established low-power Bluetooth connections with at least two Bluetooth devices.
  • the at least two Bluetooth devices do not belong to the same device group.
  • the electronic device is provided with a target switch.
  • the target switch is used for To control the opening or closing of the audio sharing function, the process shown in Figure 7 will be described in detail below.
  • the audio data sharing method may specifically include the following steps:
  • Step S510 In response to the touch operation on the target switch, turn on the audio sharing function, and set the at least two Bluetooth devices on the electronic device to belong to the same device group.
  • the electronic device may be provided with a target switch, and the target switch is used to control turning on or off the audio sharing function. That is, the user can control the opening or closing of the audio sharing function by touching the target switch. For example, the user can touch the target switch to set the target switch to the first state. At this time, the audio sharing function is turned on. The target switch can be touched to set the target switch to the second state. At this time, the audio sharing function is turned off.
  • the target switch can be presented as a virtual control.
  • the electronic device can detect a touch operation on the target switch. If a touch operation on the target switch is detected, it indicates that the user desires to turn on the audio sharing function, then the electronic device can detect the touch operation on the target switch. In response to a touch operation on the target switch, the audio sharing function is turned on, and at least two Bluetooth devices are set on the electronic device to belong to the same device group.
  • Step S520 When the electronic device plays audio data, send the audio data to the at least two Bluetooth devices respectively.
  • step S520 please refer to step S120, which will not be described again here.
  • An audio data sharing method provided by an embodiment of the present application enables the audio sharing function in response to a touch operation on a target switch, and sets at least two Bluetooth devices on the electronic device to belong to the same device group, and plays the audio data on the electronic device.
  • the audio data is sent to at least two Bluetooth devices respectively.
  • this embodiment also controls the opening or closing of the audio sharing function through a target switch, which can improve the user experience.
  • FIG. 8 shows a module block diagram of an audio data sharing device provided by an embodiment of the present application.
  • the audio data sharing device 400 is applied to the above-mentioned electronic device.
  • the electronic device has established low-power Bluetooth connections with at least two Bluetooth devices, and the at least two Bluetooth devices do not belong to the same device group. This will be described below with reference to Figure 8
  • the audio data sharing device 400 includes: a device grouping setting module 410 and an audio data sharing module 420, wherein:
  • the device group setting module 410 is configured to set the at least two Bluetooth devices on the electronic device to belong to the same device group in response to the audio sharing instruction.
  • the device group setting module 410 includes: a first device group setting sub-module, wherein:
  • a first device group setting submodule configured to respond to the audio sharing instruction and set the combined identification information of the at least two Bluetooth devices to the same combined identification information, wherein the combined identification information is used to indicate that the Bluetooth device Device grouping of devices, the combined identification information is recorded in the electronic device.
  • the first device group setting sub-module includes: a first initial combination identification information acquisition unit and a device group setting unit, wherein:
  • the first initial combination identification information acquisition unit is configured to obtain the initial combination identification information of the at least two Bluetooth devices in response to the audio sharing instruction.
  • a device group setting unit is configured to respectively update the combination identification information of the at least two Bluetooth devices from their respective initial combination identification information to the same combination identification information.
  • the first device group setting sub-module also includes: a combined identification information recovery unit, wherein:
  • a combination identification information recovery unit configured to restore the combination identification information of the at least two Bluetooth devices from the target combination identification information to their respective initial combination identification information in response to the audio stop sharing instruction.
  • the combined identification information recovery unit includes: a first stop determination subunit, a second stop determination unit, a third stop determination unit and a fourth stop determination unit, wherein:
  • the first stop determination subunit is used for the electronic device to receive instruction information indicating to stop audio sharing.
  • the second stop determination subunit is used for the electronic device to stop playing the audio data.
  • the third stop determination subunit is used for the electronic device to disconnect low-power Bluetooth connections with the at least two Bluetooth devices.
  • the fourth stop determination subunit is used for the electronic device to disconnect the connection synchronization flow between the at least two Bluetooth version devices.
  • the device group setting module 410 includes: a prompt information output sub-module, a target Bluetooth device determination sub-module and a second device group setting sub-module, wherein:
  • Prompt information output submodule configured to output prompt information in response to the audio sharing instruction, wherein the prompt information is used to prompt to select a Bluetooth device for audio sharing from the at least two Bluetooth devices.
  • the target Bluetooth device determination submodule is configured to determine at least two second target Bluetooth devices from the at least two Bluetooth devices in response to the device selection instruction.
  • the second device group setting submodule is used to set the at least two second target Bluetooth devices to belong to the same group on the electronic device.
  • a device group is used to set the at least two second target Bluetooth devices to belong to the same group on the electronic device.
  • the electronic device is provided with a target switch, and the target switch is used to control the opening or closing of the audio sharing function.
  • the device group setting module 410 also includes: a third device group setting submodule, wherein:
  • a third device group setting submodule is configured to enable the audio sharing function in response to a touch operation on the target switch, and set the at least two Bluetooth devices to belong to the same device group.
  • the audio data sharing module 420 is configured to send the audio data to the at least two Bluetooth devices respectively when the electronic device plays audio data.
  • the audio data sharing module 420 includes: a connection synchronization stream establishment sub-module and an audio data sending sub-module, wherein:
  • a connection synchronization stream establishment submodule is configured to establish a connection synchronization stream with the at least two Bluetooth devices when the electronic device plays the audio data.
  • the audio data sending submodule is configured to send the audio data to the at least two Bluetooth devices based on the connection synchronization stream with the at least two Bluetooth devices.
  • the audio data sharing module 420 includes: a control instruction response sub-module, wherein:
  • a control instruction response submodule configured to control the electronic device in response to a control instruction sent by the first target Bluetooth device based on the connection synchronization stream, and/or send the control instruction to the at least two Bluetooth devices other than the first target Bluetooth device among the Bluetooth devices, wherein the first target Bluetooth device is any Bluetooth device among the at least two Bluetooth devices.
  • the coupling between modules may be electrical, mechanical or other forms of coupling.
  • each functional module in each embodiment of the present application can be integrated into one processing module, or each module can exist physically alone, or two or more modules can be integrated into one module.
  • the above integrated modules can be implemented in the form of hardware or software function modules.
  • FIG. 9 shows a structural block diagram of an electronic device 100 provided by an embodiment of the present application.
  • the electronic device 100 may be a smart phone, a tablet computer, an e-book, or other electronic device capable of running applications.
  • the electronic device 100 in this application may include one or more of the following components: a processor 110, a memory 120, and one or more application programs, wherein one or more application programs may be stored in the memory 120 and configured to be Or multiple processors 110 execute, and one or more programs are configured to execute the method as described in the foregoing method embodiments.
  • the processor 110 may include one or more processing cores.
  • the processor 110 uses various interfaces and lines to connect various parts of the entire electronic device 100, and executes by running or executing instructions, programs, code sets or instruction sets stored in the memory 120, and calling data stored in the memory 120.
  • Various functions and processing data of the electronic device 100 may use at least one of digital signal processing (Digital Signal Processing, DSP), field-programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA).
  • DSP Digital Signal Processing
  • FPGA field-programmable gate array
  • PLA programmable logic array
  • the processor 110 may integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processor (Graphics Processing Unit, GPU), a modem, etc.
  • CPU Central Processing Unit
  • GPU Graphics Processing Unit
  • modem etc.
  • the CPU mainly handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content to be displayed; and the modem is used to handle wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 110 and may be implemented solely through a communication chip.
  • the memory 120 may include random access memory (RAM) or read-only memory (Read-Only Memory). Memory 120 may be used to store instructions, programs, codes, sets of codes, or sets of instructions.
  • the memory 120 may include a program storage area and a data storage area, where 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.) , instructions for implementing each of the following method embodiments, etc.
  • the storage data area can also store data created during use of the electronic device 100 (such as phone book, audio and video data, chat record data), etc.
  • FIG. 10 shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application.
  • Program code is stored in the computer-readable medium 500, and the program code can be called by the processor to execute the method described in the above method embodiment.
  • Computer-readable storage medium 500 may be electronic memory such as flash memory, EEPROM (electrically erasable programmable read-only memory), EPROM, hard disk, or ROM.
  • the computer-readable storage medium 500 includes non-transitory computer-readable storage medium.
  • the computer-readable storage medium 500 has storage space for the program code 510 that performs any method steps in the above-mentioned methods. These program codes can be read from or written into one or more computer program products.
  • Program code 510 may, for example, be compressed in a suitable form.
  • the audio data sharing method, device, electronic device and storage medium provided by the embodiments of the present application are applied to an electronic device that establishes a low-power Bluetooth connection with at least two Bluetooth devices, and the at least two Bluetooth devices Bluetooth devices do not belong to the same A device group.
  • the audio sharing instruction when the electronic device sets at least two Bluetooth devices to belong to the same device group, and when the electronic device plays audio data, the audio data is sent to the at least two Bluetooth devices respectively, so that the audio data is sent to the at least two Bluetooth devices as needed.
  • setting at least two Bluetooth devices to belong to the same device group can realize the sharing function of audio data, thereby improving user experience and enhancing product competitiveness.

Landscapes

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

Abstract

本申请公开了一种音频数据的共享方法、装置、电子设备以及存储介质,涉及电子设备技术领域。该方法应用于电子设备,该电子设备与至少两个蓝牙设备建立有低功耗蓝牙连接,其中,该至少两个蓝牙设备不属于同一设备分组,该方法包括:响应于音频共享指令,在电子设备将至少两个蓝牙设备设置为属于同一设备分组,在电子设备播放音频数据的情况下,分别将音频数据发送至该至少两个蓝牙设备。本申请通过在需要进行音频数据共享时,将至少两个蓝牙设备设置为属于同一设备分组,可以实现音频数据的共享功能,进而提升用户体验,增强产品竞争力。

Description

音频数据的共享方法、装置、电子设备以及存储介质
相关申请的交叉引用
本申请要求于2022年09月16日提交的申请号为CN202211130094.5的中国申请的优先权,其在此出于所有目的通过引用将其全部内容并入本文。
技术领域
本申请涉及电子设备技术领域,更具体地,涉及一种音频数据的共享方法、装置、电子设备以及存储介质。
背景技术
随着科学技术的发展,电子设备的使用越来越广泛,功能越来越多,已经成为人们日常生活中的必备之一。目前,电子设备可以通过蓝牙设备播放其输出的音频数据。
发明内容
鉴于上述问题,本申请提出了一种音频数据的共享方法、装置、电子设备以及存储介质,以解决上述问题。
第一方面,本申请实施例提供了一种音频数据的共享方法,应用于电子设备,所述电子设备与至少两个蓝牙设备建立有低功耗蓝牙连接,其中,所述至少两个蓝牙设备不属于同一设备分组,所述方法包括:响应于音频共享指令,在所述电子设备将所述至少两个蓝牙设备设置为属于同一设备分组;在所述电子设备播放音频数据的情况下,分别将所述音频数据发送至所述至少两个蓝牙设备。
第二方面,本申请实施例提供了一种音频数据的共享装置,应用于电子设备,所述电子设备与至少两个蓝牙设备建立有低功耗蓝牙连接,其中,所述至少两个蓝牙设备不属于同一设备分组,所述装置包括:设备分组设置模块,用于响应于音频共享指令,在所述电子设备将所述至少两个蓝牙设备设置为属于同一设备分组;音频数据共享模块,用于在所述电子设备播放音频数据的情况下,分别将所述音频数据发送至所述至少两个蓝牙设备。
第三方面,本申请实施例提供了一种电子设备,包括存储器和处理器,所述存储器耦接到所述处理器,所述存储器存储指令,当所述指令由所述处理器执行时所述处理器执行上述方法。
第四方面,本申请实施例提供了一种计算机可读取存储介质,所述计算机可读取存储介质中存储有程序代码,所述程序代码可被处理器调用执行上述方法。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。
图1示出了可用于本申请实施例提供的音频数据的共享方法的应用环境示意图;
图2示出了本申请一实施例提供的音频数据的共享方法的流程示意图;
图3示出了本申请一实施例提供的音频数据的共享方法的流程示意图;
图4示出了本申请一实施例提供的音频数据的共享方法的流程示意图;
图5示出了本申请的图4提供的音频数据的共享方法的步骤S310的流程示意图;
图6示出了本申请一实施例提供的音频数据的共享方法的流程示意图;
图7示出了本申请一实施例提供的音频数据的共享方法的流程示意图;
图8示出了本申请一实施例提供的音频数据的共享装置的模块框图;
图9示出了本申请实施例用于执行根据本申请实施例的音频数据的共享方法的电子设备的框图;
图10示出了本申请实施例的用于保存或者携带实现根据本申请实施例的音频数据的共享方法的程序代码的存储单元。
具体实施方式
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。
随着人们生活内容的丰富,用户拥有的电子设备的数量也越来越多,蓝牙设备如蓝牙音响、蓝牙耳机(如真无线蓝牙耳机(True Wireless Stereo,TWS))的技术也跟着快速进步。同时,随着蓝牙技术的发展,蓝牙低功耗音频(Bluetooth Low Energy Audio,BLE Audio)技术将给人们带来更低功耗、更低成本、更高质量、以及更低延迟的无线音频服务。
在蓝牙设备收听音频数据时,一个电子设备往往只能将音频数据发送给一个蓝牙设备(如一对 蓝牙设备),不能同时将音频数据发送给多个蓝牙设备,但是在生活中或者工作中经常有一些场景,使用该蓝牙设备的用户希望将正在收听的电子设备中的音频数据与其他用户分享,这就需要提供对应的技术将电子设备中的音频数据与其他用户进行方便而可靠的分享。
BLE Audio提供了协调集识别配置文件(Coordinated Set Identification Profile,CSIP)协议,可以让属于同一个组合中的设备在与外部设备交互时,达成协调同步的目的。该协议中主要说明了外部设备如何将一个组合中的多个独立的设备识别为同一个组合。针对属于同一个组合中的多个设备,要想同时与外部设备一起使用的话,每一个设备都需要跟外部设备建立独立的LE-Audio连接,同时可以根据获取到的每个设备的组合标识信息,比如,组合标识解析值(Set Identity Resolving Key,SIRK)进行判断,将具有相同SIRK值的设备组成一个组合。即拥有相同SIRK值的蓝牙设备,电子设备会将这些蓝牙设备认为是一个设备分组(Group),然后持续输出音频时会同时与一个设备分组里面所有设备分别进行音频传输。
其中,发明人经过研究发现,如果为了实现多个蓝牙设备可以共享电子设备传输的音频数据,则需要在出厂设置时将多个蓝牙设备的SIRK值烧录为相同的SIRK值。但是,这种方式会导致周围其他蓝牙设备都会被电子设备误连上。具体而言,当电子设备选择连接一个蓝牙设备时,电子设备先与该蓝牙设备建立LE-Audio连接且获取该蓝牙设备的SIRK值,此时,该蓝牙设备便可以正常与电子设备工作了,电子设备在收到另一蓝牙设备的广播信息携带的RSI值里面的prand字段,计算出hash是否与广播里的RSI值的hash字段一致,如果相同则自动与另一蓝牙设备建立LE-Audio连接。
其中,广播信息中的RSI值包含hash值和prand字段,prand字段包含随机部分和固定部分(即结尾的1和0)。hash值可以由SIRK和prand字段计算得到。电子设备根据连接的蓝牙设备的SIRK,与另一蓝牙设备的的广播消息携带的RSI值中的prand字段,计算出一个hash值,然后将计算得到的hash值与另一蓝牙设备的广播消息中的RSI值的hash字段比对,确定两者是否一致。其中,计算方式可以如下公式所示:RSI generation:hash=sih(SIRK,prand),RSI=hash||prand。
针对上述问题,发明人经过长期的研究发现,并提出了本申请实施例提供的音频数据的共享方法、装置、电子设备以及存储介质,通过在需要进行音频数据共享时,将至少两个蓝牙设备设置为属于同一设备分组,可以实现音频数据的共享功能,进而提升用户体验,增强产品竞争力。其中,具体的音频数据的共享方法在后续的实施例中进行详细的说明。
下面将针对可用于本申请实施例提供的音频数据的共享方法的应用环境进行说明。
请参阅图1,图1示出了可用于本申请实施例提供的音频数据的共享方法的应用环境示意图。如图1所示,其包括电子设备100、第一蓝牙设备200以及第二蓝牙设备300,当然,还可以包括第三蓝牙设备、第四蓝牙设备等,在此不做限定。其中,电子设备100可以包括智能手机、平板电脑、笔记本电脑、个人电脑、影音视听设备、穿戴式电子设备等音源设备,在此不做限定,第一蓝牙设备200可以包括蓝牙音响、蓝牙耳机等音频播放设备,第二蓝牙设备300可以包括蓝牙音响、蓝牙耳机等音频播放设备。且在第一蓝牙设备200为蓝牙耳机时,该蓝牙耳机可以包括一只蓝牙耳机,也可以包括一对蓝牙耳机,在第二蓝牙设备300为蓝牙耳机时,该蓝牙耳机可以包括一只蓝牙耳机,也可以包括一对蓝牙耳机,在此不做限定。作为一种方式,电子设备100和第一蓝牙设备200之间可以建立有BLE连接,基于此,电子设备100和第一蓝牙设备200之间可以进行信息交互;电子设备100和第二蓝牙设备300之间可以建立有BLE连接,基于此,电子设备100和第二蓝牙设备300之间可以进行信息交互。
其中,第一蓝牙设备200/第二蓝牙耳机300为支持LE Audio的蓝牙设备,电子设备100为支持LE Audio的电子设备。作为一种方式,第一蓝牙设备200/第二蓝牙耳机300支持LE Audio的服务端角色(unicast server),电子设备100支持LE Audio的客户端角色(unicast client)。其中,unicast client为LE Audio BAP角色中的一种,主要用于接收发现unicast server的广播和建立与unicast server的连接,unicast server为LE Audio BAP角色中的另一种,主要用于发射广播和建立与unicast client的连接。
请参阅图2,图2示出了本申请一实施例提供的音频数据的共享方法的流程示意图。该方法用于通过在需要进行音频数据共享时,将至少两个蓝牙设备设置为属于同一设备分组,可以实现音频数据的共享功能,进而提升用户体验,增强产品竞争力。在具体的实施例中,该音频数据的共享方法应用于如图8所示的音频数据的共享装置400以及配置有音频数据的共享装置400的电子设备100(图9)。下面将以电子设备为例,说明本实施例的具体流程,当然,可以理解的,本实施例所应用的电子设备可以包括智能手机、平板电脑、穿戴式电子设备等,在此不做限定。下面将针对图2所示的流程进行详细的阐述,在本实施例中,该电子设备与至少两个蓝牙设备建立有低功耗蓝牙连接,且该至少两个蓝牙设备不属于同一设备分组,所述音频数据的共享方法具体可以包括以下步骤:
步骤S110:响应于音频共享指令,在所述电子设备将所述至少两个蓝牙设备设置为属于同一设备分 组。
在本实施例中,电子设备与至少两个蓝牙设备之间可以建立有BLE连接,且该至少两个蓝牙设备不属于同一设备分组。其中,该至少两个蓝牙设备可以为相同类型的蓝牙设备,例如,该至少两个蓝牙设备均为蓝牙耳机;或者,该至少两个蓝牙设备可以为不同类型的蓝牙设备,例如,该至少两个蓝牙设备可以包括蓝牙耳机和智能音响。
作为一种方式,针对至少两个蓝牙设备中的每个蓝牙设备,以蓝牙设备为蓝牙耳机为例,蓝牙耳机可以放置于耳机盒中,当检测到耳机盒开盖时,则可以建立该电子设备与蓝牙耳机之间的BLE连接。作为又一种方式,蓝牙耳机可以放置于耳机盒中,当检测到蓝牙耳机从耳机盒中取出时,则可以建立该电子设备与蓝牙耳机之间的BLE连接。作为再一种方式,蓝牙耳机可以放置于耳机盒中,当检测到蓝牙耳机从耳机盒中取出时,则可以检测该蓝牙耳机是否处于佩戴状态,当检测到该蓝牙耳机处于佩戴状态时,则可以建立该电子设备与蓝牙耳机之间的BLE连接。
在本实施例中,蓝牙设备可以发射低功耗音频广播,电子设备可以接收到该蓝牙设备发射的低功耗音频广播,以从低功耗音频广播中获取该蓝牙设备的蓝牙地址等信息,之后,基于该蓝牙设备的蓝牙地址等信息建立与该蓝牙设备BLE连接。
作为一种方式,蓝牙耳机可以放置于耳机盒中,当检测到耳机盒开盖时,则可以发射低功耗音频广播,电子设备在接收到该低功耗音频广播时,则可以响应于该低功耗音频广播建立与蓝牙耳机之间的BLE连接。作为又一种方式,蓝牙耳机可以放置于耳机盒中,当检测到蓝牙耳机从耳机盒中取出时,则可以发射低功耗音频广播,电子设备在接收到该低功耗音频广播时,则可以响应于该低功耗音频广播建立与蓝牙耳机之间的BLE连接。作为再一种方式,蓝牙耳机可以放置于耳机盒中,当检测到蓝牙耳机从耳机盒中取出时,则可以检测该蓝牙耳机是否处于佩戴状态,当检测到该蓝牙设备处于佩戴状态时,则可以发射低功耗音频广播,电子设备在接收到该低功耗音频广播时,则可以响应于该低功耗音频广播建立与蓝牙耳机之间的BLE连接。
在一些实施方式中,针对一对蓝牙耳机中的两只蓝牙耳机(例如第一蓝牙耳机和第二蓝牙耳机),第一蓝牙耳机和第二蓝牙耳机发射LE-Audio广播,用户打开电子设备的蓝牙低功耗LE扫描后,扫描到第一蓝牙耳机发射的LE-Audio广播,用户点击链接第一蓝牙耳机,则电子设备与第一蓝牙耳机之间建立LE连接,电子设备向第一蓝牙耳机发起服务查询,根据该服务查询结果与第一蓝牙耳机建立LE-Audio连接,电子设备向第一蓝牙耳机获取SIRK值,电子设备扫描到第二蓝牙设备发射的LE-Audio广播,电子设备根据第一蓝牙耳机的SIRK值以及第二蓝牙耳机发射的LE-Audio广播中的RSI值的prand字段计算hash值,电子设备判断计算出hash值与第二蓝牙耳机发射的LE-Audio广播中的hash字段是否一致,若一致,则电子设备与第二蓝牙耳机建立LE连接,电子设备向第二蓝牙耳机发起服务查询,根据该服务查询结果与第二蓝牙耳机建立LE-Audio连接。基于此,若第一蓝牙耳机对应左耳,且第二蓝牙耳机对应右耳,则第一蓝牙耳机可以接收左声道音频数据,第二蓝牙耳机可以接收右声道音频数据。
在本实施例中,在确定该电子设备与至少两个蓝牙设备建立有BLE连接的情况下,则可以检测是否接收到音频共享指令,若确定接收到音频共享指令,则可以响应于该音频共享指令,在电子设备将该至少两个蓝牙设备设置为属于同一设备分组,即在电子设备的本地,将至少两个蓝牙设备从不属于同一设备分组,设置为属于同一设备分组。基于此,在电子设备的本地将至少两个蓝牙设备设置为属于同一设备分组,而保持该至少两个蓝牙设备端实际的设备分组不变,即对至少两个蓝牙设备而言,其实际不属于同一设备分组。
在一些实施方式中,电子设备可以检测是否接收到目标语音信息,在确定接收到目标语音信息的情况下,则可以确定接收到音频共享指令;电子设备可以检测是否接收到目标触控操作,在确定接收到目标触控操作的情况下,则可以确定接收到音频共享指令,在此不做限定。其中,目标触控操作可以包括作用于电子设备的虚拟控件上的触控操作、作用于电子设备的实体按键上的触控操作等,在此不做限定。作为一种方式,作用于虚拟控件上的触控操作可以包括:点击操作、按压操作、滑动操作等,作用于实体按键上的触控操作可以包括:点击操作、按压操作等,在此不做限定。
在一些实施方式中,将至少两个蓝牙设备设置为属于同一设备分组,其中,属于同一设备分组中的至少两个蓝牙设备接收到的电子设备的音频数据可以实现同步。
作为一种可实施的方式,可以将记录在电子设备的至少两个蓝牙设备的组合标识信息设置为同一组合标识信息的方式,实现将至少两个蓝牙设备设置为属于同一设备分组。其中,该组合标识信息可以包括组合标识解析值SIRK。
作为又一种可实施的方式,可以将记录在电子设备的至少两个蓝牙设备的特征标识信息设置为同一组合标识信息的方式,实现将至少两个蓝牙设备设置为属于同一设备分组。其中,该特征标识信息可以包括用于唯一标识该蓝牙设备的标识信息,如标识码。
步骤S120:在所述电子设备播放音频数据的情况下,分别将所述音频数据发送至所述至少两个蓝牙设备。
在本实施例中,在电子设备将至少两个蓝牙设备设置为属于同一设备分组的情况下,则可以检测该电子设备是否播放音频数据,其中,在检测到该电子设备播放音频数据的情况下,则可以分别将该音频数据发送至该至少两个蓝牙设备。从而可以不需要依赖蓝牙设备端进行定制化设计,便可以实现电子设备侧的音频数据的共享,可以提升音频数据的共享体验。
在一些实施方式中,电子设备播放的音频数据可以包括音乐类音频数据、视频类音频数据、游戏类音频数据等,在此不做限定。
在一些实施方式中,在检测到该电子设备播放音频数据的情况下,可以分别且同步的将该音频数据发送至该至少两个蓝牙设备。
作为一种方式,在电子设备播放音频数据的情况下,则可以分别建立该电子设备与至少两个蓝牙设备之间的连接同步流(Connected Isochronous Stream,CIS),基于电子设备与该至少两个蓝牙设备之间的连接同步流,将音频数据发送至该至少两个蓝牙设备。
本申请一实施例提供的音频数据的共享方法,本申请实施例提供的音频数据的共享方法、装置、电子设备以及存储介质,应用于电子设备,该电子设备与至少两个蓝牙设备建立有低功耗蓝牙连接,且该至少两个蓝牙设备不属于同一设备分组。响应于音频共享指令,在电子设备将至少两个蓝牙设备设置为属于同一设备分组,在电子设备播放音频数据的情况下,分别将音频数据发送至该至少两个蓝牙设备,从而通过在需要进行音频数据共享时,将至少两个蓝牙设备设置为属于同一设备分组,可以实现音频数据的共享功能,进而提升用户体验,增强产品竞争力。
请参阅图3,图3示出了本申请一实施例提供的音频数据的共享方法的流程示意图。该方法应用于上述电子设备,该电子设备与至少两个蓝牙设备建立有低功耗蓝牙连接,且该至少两个蓝牙设备不属于同一设备分组,下面将针对图3所示的流程进行详细的阐述,所述音频数据的共享方法具体可以包括以下步骤:
步骤S210:响应于音频共享指令,在所述电子设备将所述至少两个蓝牙设备设置为属于同一设备分组。
其中,步骤S210的具体描述请参阅步骤S110,在此不再赘述。
步骤S220:在所述电子设备播放所述音频数据的情况下,分别建立与所述至少两个蓝牙设备之间的连接同步流。
在本实施例中,在将至少两个蓝牙设备设置为属于同一设备分组且电子设备播放音频数据的情况下,则可以分别建立与至少两个蓝牙设备之间的连接同步流。
在一些实施方式中,在将至少两个蓝牙设备设置为属于同一设备分组且电子设备播放音频数据的情况下,电子设备可以分别向至少两个蓝牙设备发起同步流连接请求,至少两个蓝牙设备可以响应于该同步流连接请求,建立与该电子设备的连接同步流。
其中,以至少两个蓝牙设备包括第一蓝牙设备和第二蓝牙设备为例,在将第一蓝牙设备和第二蓝牙设备设置为属于同一设备分组且电子设备播放音频数据的情况下,电子设备可以向第一蓝牙设备发起第一同步流连接请求,该第一蓝牙设备可以响应于该第一同步流连接请求,建立与该电子设备的连接同步流,同时,电子设备可以向第二蓝牙设备发起第二同步流连接请求,该第二蓝牙设备可以响应于该第二同步流连接请求,建立与该电子设备的连接同步流。
其中,以第一蓝牙设备为蓝牙耳机对为例,该蓝牙耳机对可以包括第一蓝牙耳机和第二蓝牙耳机,在将第一蓝牙设备和第二蓝牙设备设置为属于同一设备分组且电子设备播放音频数据的情况下,电子设备可以向第一蓝牙耳机发起第一同步流连接请求,该第一蓝牙耳机可以响应于该第一同步流连接请求,建立与该电子设备的连接同步流,同时,电子设备可以向第二蓝牙耳机发起第二同步流连接请求,该第二蓝牙耳机可以响应于该第二同步流连接请求,建立与该电子设备的连接同步流,同时,电子设备可以向第二蓝牙设备发起第三同步流连接请求,该第三蓝牙设备可以响应于该第三同步流连接请求,建立与该电子设备的连接同步流。
步骤S230:基于与所述至少两个蓝牙设备之间的连接同步流,将所述音频数据发送至所述至少两个蓝牙设备。
在本实施例中,在成功建立该电子设备与至少两个蓝牙设备之间的连接同步流的情况下,则可以基于该电子设备与至少两个蓝牙设备之间的连接同步流,将该音频数据发送至该至少两个蓝牙设备。
在一些实施方式中,在成功建立该电子设备与至少两个蓝牙设备之间的连接同步流的情况下,则可以基于该电子设备与至少两个蓝牙设备中的各蓝牙设备的连接同步流,将该音频数据发送至对应的蓝牙设备。其中,以至少两个蓝牙设备包括第一蓝牙设备和第二蓝牙设备为例,电子设备与第一蓝牙设备建立有第一连接同步流,电子设备与第二蓝牙设备建立有第二连接同步流,则电子设备可以基于该第一连接同步 流将音频数据发送至该第一蓝牙设备,同时,基于该第二连接同步流将音频数据发送至该第二蓝牙设备。
步骤S240:响应于第一目标蓝牙设备基于所述连接同步流发送的控制指令,对所述电子设备进行控制,和/或,将所述控制指令发送至所述至少两个蓝牙设备中除所述第一目标蓝牙设备外的蓝牙设备,其中,所述第一目标蓝牙设备为所述至少两个蓝牙设备中的任一蓝牙设备。
其中,由于电子设备至少两个蓝牙设备建立有连接同步流,那么,该电子设备可以基于该连接同步流发送信息至该至少两个蓝牙设备,相应地,该至少两个蓝牙设备也可以基于该连接同步流发送信息至该电子设备。
在一些实施方式中,该至少两个蓝牙设备中的任一蓝牙设备,均可以基于其与电子设备之间的连接同步流,向电子设备发送控制指令。于本实施例中,可以将至少两个蓝牙设备中向电子设备发送控制指令的蓝牙设备确定为第一目标蓝牙设备,则第一目标蓝牙设备可以基于其与电子设备之间的连接同步流,向电子设备发送控制指令,相应地,电子设备可以在接收到该控制指令时,响应于该控制指令,执行对该控制指令对应的操作,和/或,将控制指令发送至该至少两个蓝牙设备中除第一目标蓝牙设备外的蓝牙设备,以实现至少两个蓝牙设备的同步。
作为一种方式,该控制指令可以包括音乐控制指令,电子设备可以响应于该音乐控制指令,控制音乐的播放、暂停、结束等,在此不做限定。
作为又一种方式,该控制指令可以包括通话控制指令,电子设备可以响应于该通话控制指令,控制通话的接听、挂断等,在此不做限定。
作为再一种方式,该控制指令可以包括蓝牙设备的状态指令,电子设备可以响应于该蓝牙设备的状态指令,更新蓝牙设备的状态信息,例如,蓝牙设备的剩余电量、蓝牙设备的连接状态等,在此不做限定。
作为另一种方式,该控制指令可以包括音量控制指令,电子设备可以响应于该音量控制指令,将该音量控制指令转发至至少两个蓝牙设备中除第一目标蓝牙设备外的蓝牙设备,以实现至少两个蓝牙设备的音量同步。
本申请一实施例提供的音频数据的共享方法,响应于音频共享指令,在电子设备将至少两个蓝牙设备设置为属于同一设备分组,在电子设备播放音频数据的情况下,分别建立与至少两个蓝牙设备之间的连接同步流,基于与至少两个蓝牙设备之间的连接同步流,将音频数据发送至至少两个蓝牙设备,响应于第一目标蓝牙设备基于连接同步流发送的控制指令,对电子设备进行控制,和/或,将所述控制指令发送至所述至少两个蓝牙设备中除所述第一目标蓝牙设备外的蓝牙设备,其中,该第一目标蓝牙设备为至少两个蓝牙设备中的任一蓝牙设备。相较于图2所示的音频数据的共享方法,本实施例还建立电子设备与至少两个蓝牙设备之间的连接同步流,可以提升用户的使用体验,增强产品竞争力。
请参阅图4,图4示出了本申请一实施例提供的音频数据的共享方法的流程示意图。该方法应用于上述电子设备,该电子设备与至少两个蓝牙设备建立有低功耗蓝牙连接,该至少两个蓝牙设备不属于同一设备分组,下面将针对图4所示的流程进行详细的阐述,所述音频数据的共享方法具体可以包括以下步骤:
步骤S310:响应于所述音频共享指令,将所述至少两个蓝牙设备的组合标识信息设置为同一组合标识信息,其中,所述组合标识信息用于指示所述蓝牙设备的设备分组,所述组合标识信息记录在所述电子设备。
其中,电子设备可以预先获取蓝牙设备的组合标识信息,并将所获取的蓝牙设备的组合标识信息记录在本地,该蓝牙设备的组合标识信息可以用于指示该蓝牙设备的设备分组。即,组合标识信息相同的蓝牙设备,可以认为是属于同一设备分组的蓝牙设备;组合标识信息不同的蓝牙设备,可以认为是不属于同一设备分组的蓝牙设备。作为一种方式,该组合标识信息包括组合标识解析值SIRK。
在本实施例中,电子设备在接收到音频共享指令的情况下,则可以响应于该音频共享指令,将其本地记录的该至少两个蓝牙设备的组合标识信息设置为同一组合标识信息,从而实现将至少两个蓝牙设备设置为属于同一设备组合。例如,假设将至少两个蓝牙设备的组合标识信息均设置为目标组合标识信息,如将至少两个蓝牙设备的组合标识信息均设置为目标SIRK。
在本实施例中,在将至少两个蓝牙设备的组合标识信息设置为同一组合标识信息的情况下,则可以将该至少两个蓝牙设备的组合标识信息保存为同一组合标识信息,即,在将至少两个蓝牙设备的组合标识信息设置为同一组合标识信息的情况下,电子设备会自己在本地保存该同一组合标识信息,而不会设置给该至少两个蓝牙设备,可以不用改变蓝牙设备端的设计,提升音频共享的适用性。
请参阅图5,图5示出了本申请的图4提供的音频数据的共享方法的步骤S310的流程示意图。下面将针对图5所示的流程进行详细的阐述,所述方法具体可以包括以下步骤:
步骤S311:响应于所述音频共享指令,分别获取所述至少两个蓝牙设备的初始组合标识信息。
其中,蓝牙设备在出厂设置时,一般会烧录对应的组合标识信息,且不同的蓝牙设备所烧录的组合标 识信息不同。其中,若蓝牙设备为一对蓝牙耳机,则该一对蓝牙耳机中的两只蓝牙耳机的组合标识信息烧录为一致。例如,假设至少两个蓝牙设备包括第一蓝牙设备和第二蓝牙设备,则该第一蓝牙设备在出厂时的SIRK值可以烧录为SIRK1,该第二蓝牙设备在出厂时的SIRK值可以烧录为SIRK2。
作为一种方式,可以将蓝牙设备在出厂设置时烧录的组合标识信息作为该蓝牙设备的初始组合标识信息,则该第一蓝牙设备的初始组合标识信息可以为SIRK1,该第二蓝牙设备的初始组合标识信息可以为SIRK2。
在本实施例中,在接收到音频共享指令的情况下,则可以分别获取该至少两个蓝牙设备的初始组合标识信息。即,在接收到音频共享指令的情况下,则可以分别获取该至少两个蓝牙设备在出场设置时所设置的组合标识信息,作为该至少两个蓝牙设备的初始组合标识信息。例如,可以获取该第一蓝牙设备的SIRK1作为该第一蓝牙设备的初始组合标识信息,获取该第二蓝牙设备的SIRK2作为该第二蓝牙设备的初始组合标识信息。
作为一种可实施的方式,在接收到音频共享指令的情况下,则可以基于电子设备与至少两个蓝牙设备之间的BLE连接,分别获取该至少两个蓝牙设备的初始组合标识信息。其中,在接收到音频共享指令的情况下,则可以基于该电子设备与至少两个蓝牙设备之间的BLE连接,分别向至少两个蓝牙设备发起服务查询,根据该服务查询结果,分别获取该至少两个蓝牙设备的初始组合标识信息。例如,可以基于与该第一蓝牙设备之间的BLE连接,获取该第一蓝牙设备的组合标识信息,基于与该第二蓝牙设备之间的BLE连接,获取该第二蓝牙设备的组合标识信息。
作为又一种可实施的方式,在接收到音频共享指令的情况下,则可以从电子设备的本地获取该至少两个蓝牙设备的组合标识信息。那么,在响应于音频共享指令,分别获取至少两个蓝牙设备的初始组合标识信息之前,还可以包括:基于电子设备与至少两个蓝牙设备的BLE连接,分别获取该至少两个蓝牙设备的初始组合标识信息,在电子设备的本地保存该至少两个蓝牙设备的组合标识信息。基于此,后续在接收到音频共享指令的情况下,则可以直接从电子设备本地获取该至少两个蓝牙设备的组合标识信息。
步骤S312:分别将所述至少两个蓝牙设备的组合标识信息从各自的初始组合标识信息更新为所述同一组合标识信息。
在本实施例中,在获取到该至少两个蓝牙设备的组合标识信息的情况下,则可以分别将该至少两个蓝牙设备的组合标识信息从各自的初始组合标识信息更新为同一组合标识信息。其中,该同一组合标识信息可以与某个初始组合标识信息相同,也可以与所有初始组合标识信息不同,在此不做限定。
在一些实施方式中,假设至少两个蓝牙设备包括第一蓝牙设备和第二蓝牙设备,且第一蓝牙设备的初始组合标识信息为SIRK1,第二蓝牙设备的初始组合标识信息为SIRK2。基于此,若同一组合标识信息为SIRK3,则可以将第一蓝牙设备的组合标识信息从SIRK1更新为SIRK3,并将第二蓝牙设备的组合标识信息从SIRK2更新为SIRK3;若同一组合标识信息为SIRK1,则可以保持第一蓝牙设备的组合标识信息为SIRK1,并将第二蓝牙设备的组合标识信息从SIRK2更新为SIRK1;若同一组合标识信息为SIRK2,则可以将第一蓝牙设备的组合标识信息从SIRK1更新为SIRK2,且保持第二蓝牙设备的组合标识信息为SIRK2。
在一些实施方式中,在分别将至少两个蓝牙设备的组合标识信息从各自的初始组合标识信息更新为同一组合标识信息之后,还包括:响应于音频停止共享指令,将至少两个蓝牙设备的组合标识信息从目标组合标识信息恢复为各自的初始组合标识信息。作为一种方式,在将至少两个蓝牙设备的组合标识信息从目标组合标识信息恢复为各自的初始组合标识信息的情况下,则可以在电子设备的本地保存该至少两个蓝牙设备各自对应的初始组合标识信息。
在一些实施方式中,假设至少两个蓝牙设备包括第一蓝牙设备和第二蓝牙设备,且第一蓝牙设备的初始组合标识信息为SIRK1,第二蓝牙设备的初始组合标识信息为SIRK2。基于此,若同一组合标识信息为SIRK3,则可以响应于音频停止共享指令,将第一蓝牙设备的组合标识信息从SIRK3恢复为SIRK1,并将第二蓝牙设备的组合标识信息从SIRK3恢复为SIRK2;若同一组合标识信息为SIRK1,则可以保持第一蓝牙设备的组合标识信息为SIRK1,并将第二蓝牙设备的组合标识信息从SIRK1恢复为SIRK2;若同一组合标识信息为SIRK2,则可以将第一蓝牙设备的组合标识信息从SIRK2恢复为SIRK1,且保持第二蓝牙设备的组合标识信息为SIRK2。
作为一种方式,响应于音频停止共享指令可以包括:电子设备接收到用于指示停止进行音频共享的指令信息。其中,接收到的用于指示停止进行音频共享的指令信息可以包括用于指示停止进行音频共享的语音信息、用于指示停止进行音频共享的触控操作等,在此不做限定。
作为又一种方式,响应于音频停止共享指令可以包括:电子设备停止播放音频数据。其中,电子设备停止播放音频数据可以包括电子设备暂停播放音频数据、电子设备结束播放音频数据等,在此不做限定。
作为再一种方式,响应于音频停止共享指令可以包括:电子设备断开与至少两个蓝牙设备之间的BLE连接。
作为另一种方式,响应于音频停止共享指令可以包括:电子设备断开与至少两个蓝牙设备之间的连接 同步流。
步骤S320:在所述电子设备播放音频数据的情况下,分别将所述音频数据发送至所述至少两个蓝牙设备。
其中,步骤S320的具体描述请参阅步骤S120,在此不再赘述。
本申请一实施例提供的音频数据的共享方法,响应于音频共享指令,将至少两个蓝牙设备的组合标识信息设置为同一组合标识信息,其中,组合标识信息用于指示蓝牙设备的设备分组,该组合标识信息记录在电子设备,在电子设备播放音频数据的情况下,分别将音频数据发送至该至少两个蓝牙设备。相较于图2所示的音频数据的共享方法,本实施例还通过将至少两个蓝牙设备的组合标识信息设置为同一组合标识信息的方式,将至少两个蓝牙设备设置为属于同一设备组合,提升所设置的同一设备组合的准确性。
请参阅图6,图6示出了本申请一实施例提供的音频数据的共享方法的流程示意图。该方法应用于上述电子设备,该电子设备与至少两个蓝牙设备建立有低功耗蓝牙连接,该至少两个蓝牙设备不属于同一设备分组,下面将针对图6所示的流程进行详细的阐述,所述音频数据的共享方法具体可以包括以下步骤:
步骤S410:响应于所述音频共享指令,输出提示信息,其中,所述提示信息用于提示从所述至少两个蓝牙设备中选择进行音频共享的蓝牙设备。
在本实施例中,在接收到音频共享指令的情况下,则可以响应于该音频共享指令,输出用于提示从至少两个蓝牙设备中选择进行音频共享的蓝牙设备的提示信息。
在一些实施方式中,该提示信息可以包括语音提示信息、文本提示信息、振动提示信息等,在此不做限定。
作为一种可实施的方式,在接收到音频共享指令的情况下,则可以获取该至少两个蓝牙设备的设备数量。其中,在该设备数量为两个时,则可以将该两个蓝牙设备确定为目标蓝牙设备;在该设备数量大于两个时,则可以输出提示信息。
步骤S420:响应于设备选择指令,从所述至少两个蓝牙设备中确定至少两个第二目标蓝牙设备。
在本实施例中,在输出提示信息的情况下,则可以检测是否接收到基于该提示信息触发的设备选择指令。其中,若确定接收到该设备选择指令,则可以响应于该设备选择指令,从至少两个蓝牙设备中确定至少两个第二目标蓝牙设备。假设至少两个蓝牙设备包括第一蓝牙设备、第二蓝牙设备、第三蓝牙设备以及第四蓝牙设备,该提示信息可以用于指示从第一蓝牙设备、第二蓝牙设备、第三蓝牙设备以及第四蓝牙设备中选择至少两个蓝牙设备,其中,若设备选择指令指示选择第二蓝牙设备和第四蓝牙设备,则可以将第二蓝牙设备和第四蓝牙设备确定为第二目标蓝牙设备。
作为一种方式,在输出提示信息的情况下,则可以检测是否接收到基于该提示信息触发的设备选择指令。其中,若确定接收到基于该提示信息触发的第一放弃设备选择指令,则可以停止进行音频共享,即,停止将音频数据分别发送至至少两个蓝牙设备。
作为又一种方式,在输出提示信息的情况下,则可以检测是否接收到基于该提示信息触发的设备选择指令。其中,若确定接收到基于该提示信息触发的第二放弃设备选择指令,则可以从至少两个蓝牙设备中随机确定至少两个第二目标蓝牙设备。
作为再一种方式,在输出提示信息的情况下,则可以检测是否接收到基于该提示信息触发的设备选择指令。其中,若在预设时间内确定未接收到用户触发的选择指令,则可以停止进行音频共享,即,停止将音频数据分别发送至至少两个蓝牙设备。
作为另一种方式,在输出提示信息的情况下,则可以检测是否接收到基于该提示信息触发的设备选择指令。其中,若在预设时间内确定未接收到用户触发的选择指令,则可以从至少两个蓝牙设备中随机确定至少两个第二目标蓝牙设备。
步骤S430:在所述电子设备将所述至少两个第二目标蓝牙设备设置为属于所述同一设备分组。
在本实施例中,在确定至少两个目标蓝牙设备的情况下,则可以在电子设备将该至少两个目标蓝牙设备设置为属于同一设备分组。
步骤S440:在所述电子设备播放音频数据的情况下,分别将所述音频数据发送至所述至少两个蓝牙设备。
其中,步骤S440的具体描述请参阅步骤S120,在此不再赘述。
本申请一实施例提供的音频数据的共享方法,响应于音频共享指令,输出提示信息,其中,该提示信息用于提示从至少两个蓝牙设备中选择进行音频共享的蓝牙设备,响应于设备选择指令,从至少两个蓝牙设备中确定至少两个第二目标蓝牙设备,在电子设备将至少两个第二目标蓝牙设备设置为属于同一设备分组,在电子设备播放音频数据的情况下,分别将音频数据发送至至少两个蓝牙设备。相较于图2所示的音频数据的共享方法,本实施例还通过用户选择需要进行音频共享的蓝牙 设备,从而提升用户的使用体验。
请参阅图7,图7示出了本申请一实施例提供的音频数据的共享方法的流程示意图。该方法应用于上述电子设备,该电子设备与至少两个蓝牙设备建立有低功耗蓝牙连接,该至少两个蓝牙设备不属于同一设备分组,该电子设备设置有目标开关,该目标开关用于控制音频共享功能的开启或关闭,下面将针对图7所示的流程进行详细的阐述,所述音频数据的共享方法具体可以包括以下步骤:
步骤S510:响应作用于所述目标开关上的触控操作,开启所述音频共享功能,并在所述电子设备将所述至少两个蓝牙设备设置为属于同一设备分组。
在本实施例中,电子设备可以设置有目标开关,该目标开关用于控制音频共享功能的开启或者关闭。也即,用户可以通过触控该目标开关的方式,控制音频共享功能的开启或者关闭,例如,用户可以触控目标开关将目标开关设置为第一状态,此时,该音频共享功能被开启,可以触控目标开关将目标开关设置为第二状态,此时,该音频共享功能被关闭。作为一种方式,该目标开关可以以虚拟控件的形式呈现。
在一些实施方式中,电子设备可以对作用于目标开关上的触控操作进行检测,其中,在检测到作用于目标开关上的触控操作的情况下,表征用户期望开启音频共享功能,则可以响应于作用于该目标开关上的触控操作,开启音频共享功能,并在电子设备将至少两个蓝牙设备设置为属于同一设备分组。
步骤S520:在所述电子设备播放音频数据的情况下,分别将所述音频数据发送至所述至少两个蓝牙设备。
其中,步骤S520的具体描述请参阅步骤S120,在此不再赘述。
本申请一实施例提供的音频数据的共享方法,响应作用于目标开关上的触控操作,开启音频共享功能,并在电子设备将至少两个蓝牙设备设置为属于同一设备分组,在电子设备播放音频数据的情况下,分别将音频数据发送至至少两个蓝牙设备。相较于图2所示的音频数据的共享方法,本实施例还通过目标开关控制音频共享功能的打开或关闭,可以提升用户的使用体验。
请参阅图8,图8示出了本申请一实施例提供的音频数据的共享装置的模块框图。该音频数据的共享装置400应用于上述电子设备,该电子设备与至少两个蓝牙设备建立有低功耗蓝牙连接,且该至少两个蓝牙设备不属于同一设备分组,下面将针对图8所述的框图进行阐述,所述音频数据的共享装置400包括:设备分组设置模块410和音频数据共享模块420,其中:
设备分组设置模块410,用于响应于音频共享指令,在所述电子设备将所述至少两个蓝牙设备设置为属于同一设备分组。
进一步地,所述设备分组设置模块410包括:第一设备分组设置子模块,其中:
第一设备分组设置子模块,用于响应于所述音频共享指令,将所述至少两个蓝牙设备的组合标识信息设置为同一组合标识信息,其中,所述组合标识信息用于指示所述蓝牙设备的设备分组,所述组合标识信息记录在所述电子设备。
进一步地,所述第一设备分组设置子模块包括:第一初始组合标识信息获取单元和设备分组设置单元,其中:
第一初始组合标识信息获取单元,用于响应于所述音频共享指令,分别获取所述至少两个蓝牙设备的初始组合标识信息。
设备分组设置单元,用于分别将所述至少两个蓝牙设备的组合标识信息从各自的初始组合标识信息更新为所述同一组合标识信息。
进一步地,所述第一设备分组设置子模块还包括:组合标识信息恢复单元,其中:
组合标识信息恢复单元,用于响应于音频停止共享指令,将所述至少两个蓝牙设备的组合标识信息从所述目标组合标识信息恢复为各自的初始组合标识信息。
进一步地,所述组合标识信息恢复单元包括:第一停止确定子单元、第二停止确定单元、第三停止确定单元以及第四停止确定单元,其中:
第一停止确定子单元,用于所述电子设备接收到用于指示停止进行音频共享的指令信息。
第二停止确定子单元,用于所述电子设备停止播放所述音频数据。
第三停止确定子单元,用于所述电子设备断开与所述至少两个蓝牙设备之间的低功耗蓝牙连接。
第四停止确定子单元,用于所述电子设备断开与所述至少两个蓝牙版设备之间的连接同步流。
进一步地,所述设备分组设置模块410包括:提示信息输出子模块、目标蓝牙设备确定子模块以及第二设备分组设置子模块,其中:
提示信息输出子模块,用于响应于所述音频共享指令,输出提示信息,其中,所述提示信息用于提示从所述至少两个蓝牙设备中选择进行音频共享的蓝牙设备。
目标蓝牙设备确定子模块,用于响应于设备选择指令,从所述至少两个蓝牙设备中确定至少两个第二目标蓝牙设备。
第二设备分组设置子模块,用于在所述电子设备将所述至少两个第二目标蓝牙设备设置为属于所述同 一设备分组。
进一步地,所述电子设备设置有目标开关,所述目标开关用于控制音频共享功能的开启或关闭,所述设备分组设置模块410还包括:第三设备分组设置子模块,其中:
第三设备分组设置子模块,用于响应作用于所述目标开关上的触控操作,开启所述音频共享功能,并将所述至少两个蓝牙设备设置为属于同一设备分组。
音频数据共享模块420,用于在所述电子设备播放音频数据的情况下,分别将所述音频数据发送至所述至少两个蓝牙设备。
进一步地,所述音频数据共享模块420包括:连接同步流建立子模块和音频数据发送子模块,其中:
连接同步流建立子模块,用于在所述电子设备播放所述音频数据的情况下,分别建立与所述至少两个蓝牙设备之间的连接同步流。
音频数据发送子模块,用于基于与所述至少两个蓝牙设备之间的连接同步流,将所述音频数据发送至所述至少两个蓝牙设备。
进一步地,所述音频数据共享模块420包括:控制指令响应子模块,其中:
控制指令响应子模块,用于响应于第一目标蓝牙设备基于所述连接同步流发送的控制指令,对所述电子设备进行控制,和/或,将所述控制指令发送至所述至少两个蓝牙设备中除所述第一目标蓝牙设备外的蓝牙设备,其中,所述第一目标蓝牙设备为所述至少两个蓝牙设备中的任一蓝牙设备。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述装置和模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,模块相互之间的耦合可以是电性,机械或其它形式的耦合。
另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
请参阅图9,其示出了本申请实施例提供的一种电子设备100的结构框图。该电子设备100可以是智能手机、平板电脑、电子书等能够运行应用程序的电子设备。本申请中的电子设备100可以包括一个或多个如下部件:处理器110、存储器120以及一个或多个应用程序,其中一个或多个应用程序可以被存储在存储器120中并被配置为由一个或多个处理器110执行,一个或多个程序配置用于执行如前述方法实施例所描述的方法。
其中,处理器110可以包括一个或者多个处理核。处理器110利用各种接口和线路连接整个电子设备100内的各个部分,通过运行或执行存储在存储器120内的指令、程序、代码集或指令集,以及调用存储在存储器120内的数据,执行电子设备100的各种功能和处理数据。可选地,处理器110可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器110可集成中央处理器(Central Processing Unit,CPU)、图形处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责待显示内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器110中,单独通过一块通信芯片进行实现。
存储器120可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory)。存储器120可用于存储指令、程序、代码、代码集或指令集。存储器120可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于实现至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等。存储数据区还可以存储电子设备100在使用中所创建的数据(比如电话本、音视频数据、聊天记录数据)等。
请参阅图10,其示出了本申请实施例提供的一种计算机可读存储介质的结构框图。该计算机可读介质500中存储有程序代码,所述程序代码可被处理器调用执行上述方法实施例中所描述的方法。
计算机可读存储介质500可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。可选地,计算机可读存储介质500包括非易失性计算机可读介质(non-transitory computer-readable storage medium)。计算机可读存储介质500具有执行上述方法中的任何方法步骤的程序代码510的存储空间。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。程序代码510可以例如以适当形式进行压缩。
综上所述,本申请实施例提供的音频数据的共享方法、装置、电子设备以及存储介质,应用于电子设备,该电子设备与至少两个蓝牙设备建立有低功耗蓝牙连接,该至少两个蓝牙设备不属于同 一设备分组。响应于音频共享指令,在电子设备将至少两个蓝牙设备设置为属于同一设备分组,在电子设备播放音频数据的情况下,分别将音频数据发送至该至少两个蓝牙设备,从而通过在需要进行音频数据共享时,将至少两个蓝牙设备设置为属于同一设备分组,可以实现音频数据的共享功能,进而提升用户体验,增强产品竞争力。
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不驱使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。

Claims (20)

  1. 一种音频数据的共享方法,其特征在于,应用于电子设备,所述电子设备与至少两个蓝牙设备建立有低功耗蓝牙连接,其中,所述至少两个蓝牙设备不属于同一设备分组,所述方法包括:
    响应于音频共享指令,在所述电子设备将所述至少两个蓝牙设备设置为属于同一设备分组;
    在所述电子设备播放音频数据的情况下,分别将所述音频数据发送至所述至少两个蓝牙设备。
  2. 根据权利要求1所述的方法,其特征在于,所述在所述电子设备播放音频数据的情况下,分别将所述音频数据发送至所述至少两个蓝牙设备,包括:
    在所述电子设备播放所述音频数据的情况下,分别建立与所述至少两个蓝牙设备之间的连接同步流;
    基于与所述至少两个蓝牙设备之间的连接同步流,将所述音频数据发送至所述至少两个蓝牙设备。
  3. 根据权利要求2所述的方法,其特征在于,在所述电子设备播放所述音频数据的情况下,分别建立与所述至少两个蓝牙设备之间的连接同步流之后,还包括:
    响应于第一目标蓝牙设备基于所述连接同步流发送的控制指令,对所述电子设备进行控制,和/或,将所述控制指令发送至所述至少两个蓝牙设备中除所述第一目标蓝牙设备外的蓝牙设备,其中,所述第一目标蓝牙设备为所述至少两个蓝牙设备中的任一蓝牙设备。
  4. 根据权利要求1所述的方法,其特征在于,所述响应于音频共享指令,在所述电子设备将所述至少两个蓝牙设备设置为属于同一设备分组,包括:
    响应于所述音频共享指令,将所述至少两个蓝牙设备的组合标识信息设置为同一组合标识信息,其中,所述组合标识信息用于指示所述蓝牙设备的设备分组,所述组合标识信息记录在所述电子设备。
  5. 根据权利要求4所述的方法,其特征在于,所述响应于所述音频共享指令,将所述至少两个蓝牙设备的组合标识信息设置为同一组合标识信息,包括:
    响应于所述音频共享指令,分别获取所述至少两个蓝牙设备的初始组合标识信息;
    分别将所述至少两个蓝牙设备的组合标识信息从各自的初始组合标识信息更新为所述同一组合标识信息。
  6. 根据权利要求5所述的方法,其特征在于,在所述响应于所述音频共享指令,分别获取所述至少两个蓝牙设备的初始组合标识信息之前,还包括:
    基于所述低功耗蓝牙连接,分别获取所述至少两个蓝牙设备的初始组合标识信息;
    在所述电子设备的本地保存所述至少两个蓝牙设备的初始组合标识信息。
  7. 根据权利要求5所述的方法,其特征在于,在所述分别将所述至少两个蓝牙设备的组合标识信息从各自的初始组合标识信息更新为所述同一组合标识信息之后,还包括:
    响应于音频停止共享指令,将所述至少两个蓝牙设备的组合标识信息从所述同一组合标识信息恢复为各自的初始组合标识信息。
  8. 根据权利要求7所述的方法,其特征在于,所述响应于音频停止共享指令,包括:
    所述电子设备接收到用于指示停止进行音频共享的指令信息;或者
    所述电子设备停止播放所述音频数据;或者
    所述电子设备断开与所述至少两个蓝牙设备之间的低功耗蓝牙连接;或者
    所述电子设备断开与所述至少两个蓝牙设备之间的连接同步流。
  9. 根据权利要求4-8任一项所述的方法,其特征在于,所述组合标识信息包括组合标识解析值SIRK。
  10. 根据权利要求1-8任一项所述的方法,其特征在于,所述响应于音频共享指令,在所述电子设备将所述至少两个蓝牙设备设置为属于同一设备分组,包括:
    响应于所述音频共享指令,输出提示信息,其中,所述提示信息用于提示从所述至少两个蓝牙设备中选择进行音频共享的蓝牙设备;
    响应于设备选择指令,从所述至少两个蓝牙设备中确定至少两个第二目标蓝牙设备;
    在所述电子设备将所述至少两个第二目标蓝牙设备设置为属于所述同一设备分组。
  11. 根据权利要求10所述的方法,其特征在于,所述方法还包括:
    若确定接收到基于所述提示信息触发的第一放弃设备选择指令,则停止分别将所述音频数据发送至所述至少两个蓝牙设备;或者
    若确定在预设时长内未接收到基于所述提示信息触发的选择指令,则停止分别将所述音频数据发送至所述至少两个蓝牙设备。
  12. 根据权利要求10所述的方法,其特征在于,所述方法还包括:
    若确定接收到基于所述提示信息触发的第一放弃设备选择指令,则从至少两个蓝牙设备中随机确定至少两个第二目标蓝牙设备;或者
    若确定在预设时长内未接收到基于所述提示信息触发的选择指令,则从至少两个蓝牙设备中随机确定至少两个第二目标蓝牙设备。
  13. 根据权利要求1-8任一项所述的方法,其特征在于,所述电子设备设置有目标开关,所述目标开关用于控制音频共享功能的开启或关闭,所述响应于音频共享指令,在所述电子设备将所述至少两个蓝牙设备设置为属于同一设备分组,包括:
    响应作用于所述目标开关上的触控操作,开启所述音频共享功能,并在所述电子设备将所述至少两个蓝牙设备设置为属于同一设备分组。
  14. 根据权利要求1-8任一项所述的方法,其特征在于,所述蓝牙设备放置于耳机盒中,所述方法还包括:
    当检测到所述耳机盒开盖的情况下,建立所述电子设备与所述蓝牙设备的低功耗蓝牙连接。
  15. 根据权利要求14所述的方法,其特征在于,所述当检测到所述耳机盒开盖的情况下,建立所述电子设备与所述蓝牙设备的低功耗蓝牙连接,包括:
    当检测到所述耳机盒开盖且所述蓝牙设备从所述耳机盒中取出的情况下,建立所述电子设备与所述蓝牙设备的低功耗蓝牙连接。
  16. 根据权利要求15所述的方法,其特征在于,所述当检测到所述耳机盒开盖且所述蓝牙设备从所述耳机盒中取出的情况下,建立所述电子设备与所述蓝牙设备的低功耗蓝牙连接,包括:
    当检测到所述耳机盒开盖且所述蓝牙设备从所述耳机盒中取出的情况下,检测所述蓝牙设备是否处于佩戴状态;
    当检测到所述蓝牙设备处于佩戴状态的情况下,建立所述电子设备与所述蓝牙设备的低功耗蓝牙连接。
  17. 根据权利要求1-8任一项所述的方法,其特征在于,所述方法还包括:
    接收所述蓝牙设备发射的低功耗音频广播,并从所述低功耗音频广播中获取所述蓝牙设备的蓝牙地址;
    基于所述蓝牙地址,建立所述电子设备与所述蓝牙设备的低功耗蓝牙连接。
  18. 一种音频数据的共享装置,其特征在于,应用于电子设备,所述电子设备与至少两个蓝牙设备建立有低功耗蓝牙连接,其中,所述至少两个蓝牙设备不属于同一设备分组,所述装置包括:
    设备分组设置模块,用于响应于音频共享指令,在所述电子设备将所述至少两个蓝牙设备设置为属于同一设备分组;
    音频数据共享模块,用于在所述电子设备播放音频数据的情况下,分别将所述音频数据发送至所述至少两个蓝牙设备。
  19. 一种电子设备,其特征在于,包括存储器和处理器,所述存储器耦接到所述处理器,所述存储器存储指令,当所述指令由所述处理器执行时所述处理器执行如权利要求1-17任一项所述的方法。
  20. 一种计算机可读取存储介质,其特征在于,所述计算机可读取存储介质中存储有程序代码,所述程序代码可被处理器调用执行如权利要求1-17任一项所述的方法。
PCT/CN2023/107261 2022-09-16 2023-07-13 音频数据的共享方法、装置、电子设备以及存储介质 WO2024055738A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211130094.5 2022-09-16
CN202211130094.5A CN115665671A (zh) 2022-09-16 2022-09-16 音频数据的共享方法、装置、电子设备以及存储介质

Publications (1)

Publication Number Publication Date
WO2024055738A1 true WO2024055738A1 (zh) 2024-03-21

Family

ID=84983558

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/107261 WO2024055738A1 (zh) 2022-09-16 2023-07-13 音频数据的共享方法、装置、电子设备以及存储介质

Country Status (2)

Country Link
CN (1) CN115665671A (zh)
WO (1) WO2024055738A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115665671A (zh) * 2022-09-16 2023-01-31 Oppo广东移动通信有限公司 音频数据的共享方法、装置、电子设备以及存储介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110191450A (zh) * 2019-04-02 2019-08-30 华为技术有限公司 业务连接建立方法、蓝牙主设备、芯片及蓝牙系统
CN111132111A (zh) * 2019-12-26 2020-05-08 歌尔股份有限公司 一种基于ble的音频共享方法、系统及计算机可读存储介质
CN113825125A (zh) * 2021-09-15 2021-12-21 国芯科技(广州)有限公司 一种多组无线蓝牙耳机的音频共享方法
CN114125363A (zh) * 2021-11-19 2022-03-01 深圳奥尼电子股份有限公司 一种具有无线麦克风蓝牙传输的音视频会议系统的控制方法
CN114786139A (zh) * 2022-02-28 2022-07-22 Oppo广东移动通信有限公司 连接建立方法、装置、设备、存储介质及程序产品
CN115002734A (zh) * 2022-04-29 2022-09-02 恒玄科技(上海)股份有限公司 一种音频分享方法、装置、系统及可读存储介质
CN115665671A (zh) * 2022-09-16 2023-01-31 Oppo广东移动通信有限公司 音频数据的共享方法、装置、电子设备以及存储介质

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110191450A (zh) * 2019-04-02 2019-08-30 华为技术有限公司 业务连接建立方法、蓝牙主设备、芯片及蓝牙系统
US20220201453A1 (en) * 2019-04-02 2022-06-23 Huawei Technologies Co., Ltd. Service connection establishment method, bluetooth master device, chip, and bluetooth system
CN111132111A (zh) * 2019-12-26 2020-05-08 歌尔股份有限公司 一种基于ble的音频共享方法、系统及计算机可读存储介质
CN113825125A (zh) * 2021-09-15 2021-12-21 国芯科技(广州)有限公司 一种多组无线蓝牙耳机的音频共享方法
CN114125363A (zh) * 2021-11-19 2022-03-01 深圳奥尼电子股份有限公司 一种具有无线麦克风蓝牙传输的音视频会议系统的控制方法
CN114786139A (zh) * 2022-02-28 2022-07-22 Oppo广东移动通信有限公司 连接建立方法、装置、设备、存储介质及程序产品
CN115002734A (zh) * 2022-04-29 2022-09-02 恒玄科技(上海)股份有限公司 一种音频分享方法、装置、系统及可读存储介质
CN115665671A (zh) * 2022-09-16 2023-01-31 Oppo广东移动通信有限公司 音频数据的共享方法、装置、电子设备以及存储介质

Also Published As

Publication number Publication date
CN115665671A (zh) 2023-01-31

Similar Documents

Publication Publication Date Title
WO2017028396A1 (zh) 多媒体播放设备的连接方法、主设备、控制终端及系统
WO2018032455A1 (zh) 一种蓝牙通信的方法及终端
WO2017035968A1 (zh) 一种多播放设备的音频播放方法及装置
WO2020063066A1 (zh) 数据传输方法、装置、电子设备及存储介质
WO2024055738A1 (zh) 音频数据的共享方法、装置、电子设备以及存储介质
WO2024016948A1 (zh) 信息更新方法及装置、音频共享方法及系统、电子设备
CN109379490B (zh) 音频播放方法、装置、电子设备及计算机可读介质
CN113766477A (zh) 设备连接方法、装置、电子设备及计算机可读介质
WO2023087793A1 (zh) 音频业务处理方法、装置、电子设备及存储介质
JP6248188B2 (ja) ネットワーク化した再生デバイスの動作モード間での移行
WO2020124920A1 (zh) 一种语音交互的方法及蓝牙设备
JP2017041755A (ja) オーディオシステム、オーディオ機器およびオーディオ機器設定方法
WO2023036178A1 (zh) 蓝牙连接方法、装置、耳机设备及计算机可读存储介质
CN111049709B (zh) 一种基于蓝牙的互联音箱控制方法、设备及存储介质
WO2023061127A1 (zh) 通信方法、装置、耳机组及计算机可读介质
WO2024119947A1 (zh) 蓝牙通信方法、装置、电子设备及计算机可读介质
WO2024066694A1 (zh) 音频设备的连接方法、装置、存储介质及设备
WO2024041189A1 (zh) 一种无线音频/视频装置和无线通信方法
WO2023103732A1 (zh) 耳机设备的状态控制方法、装置、耳机设备及存储介质
CN114885261A (zh) 耳机组件、无线音频播放系统及其通信方法
CN105828132B (zh) 音视频播放系统中的播放组的控制方法和音视频播放系统
CN114363876A (zh) 连接建立方法、装置、设备、存储介质及程序产品
WO2024045877A1 (zh) 设备的连接方法、装置、电子设备以及存储介质
WO2024060750A1 (zh) 蓝牙切换方法和装置、蓝牙连接方法和装置及电子设备
WO2023246017A1 (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: 23864474

Country of ref document: EP

Kind code of ref document: A1