Audio data sharing method, device, electronic device and storage medium

By establishing a low-power Bluetooth connection between electronic devices and multiple Bluetooth devices and setting up the same device packet, the problem of audio data cannot be shared in the prior art is solved, audio data sharing between multiple devices is realized, and user experience and product competitiveness are improved.

CN115665671BActive Publication Date: 2025-08-26GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211130094.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-16
Publication Date
2025-08-26
Estimated Expiration
2042-09-16

AI Technical Summary

Technical Problem

Existing electronic devices can only send audio data to one Bluetooth device, but cannot send it to multiple Bluetooth devices at the same time, resulting in poor user experience and weak product competitiveness.

Method used

By establishing a low-power Bluetooth connection between the electronic device and at least two Bluetooth devices and in response to an audio sharing instruction, the devices are set to the same device grouping, thereby realizing the sharing of audio data. The specific method includes setting the combined identification information of the Bluetooth device to the same combined identification information, and sending the audio data separately when the device plays the audio data.

Benefits of technology

It realizes audio data sharing between multiple Bluetooth devices, improves user experience and product competitiveness, and does not need to rely on customized designs on Bluetooth devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115665671B_ABST
    Figure CN115665671B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, electronic device and storage medium for sharing audio data, and relates to the technical field of electronic devices. The method is applied to an electronic device, which 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, and the method comprises: in response to an audio sharing instruction, 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. The present application can realize the audio data sharing function by setting at least two Bluetooth devices to belong to the same device group when audio data sharing is required, thereby improving user experience and enhancing product competitiveness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of electronic devices, and more specifically, to a method, device, electronic device, and storage medium for sharing audio data. Background Art

[0002] With the development of science and technology, electronic devices are becoming increasingly popular and versatile, becoming essential to people's daily lives. Currently, electronic devices can play their audio data via Bluetooth devices. However, these devices can only output audio data to one Bluetooth device at a time, preventing audio data from being shared. This results in a poor user experience and weakens product competitiveness. Summary of the Invention

[0003] In view of the above problems, the present application proposes a method, device, electronic device and storage medium for sharing audio data to solve the above problems.

[0004] In a first aspect, an embodiment of the present application provides a method for sharing audio data, which is applied to an electronic device, wherein 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 an audio sharing instruction, setting the at least two Bluetooth devices to belong to the same device group in the electronic device; and when the electronic device plays audio data, sending the audio data to the at least two Bluetooth devices respectively.

[0005] In a second aspect, an embodiment of the present application provides an audio data sharing device, which is applied to an electronic device, wherein 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, and the device includes: a device group setting module, which is used to set the at least two Bluetooth devices to belong to the same device group in response to an audio sharing instruction in the electronic device; and an audio data sharing module, which is used to send the audio data to the at least two Bluetooth devices respectively when the electronic device plays audio data.

[0006] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory and a processor, wherein the memory is coupled to the processor, the memory stores instructions, and when the instructions are executed by the processor, the processor executes the above method.

[0007] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which program code is stored, and the program code can be called by a processor to execute the above method.

[0008] The audio data sharing method, device, electronic device, and storage medium provided in the embodiments of the present application are applied to an electronic device, which 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. In response to an audio sharing instruction, the electronic device sets the 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. Therefore, by setting the at least two Bluetooth devices to belong to the same device group when audio data sharing is required, the audio data sharing function can be realized, thereby improving user experience and enhancing product competitiveness. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0010] Figure 1 A schematic diagram showing an application environment that can be used for the audio data sharing method provided in an embodiment of the present application;

[0011] Figure 2 A schematic diagram illustrating a flow chart of a method for sharing audio data provided in an embodiment of the present application is shown;

[0012] Figure 3 A schematic diagram illustrating a flow chart of a method for sharing audio data provided in an embodiment of the present application is shown;

[0013] Figure 4 A schematic diagram illustrating a flow chart of a method for sharing audio data provided in an embodiment of the present application is shown;

[0014] Figure 5 Shows the application Figure 4 A flowchart of step S310 of the audio data sharing method is provided;

[0015] Figure 6 A schematic diagram illustrating a flow chart of a method for sharing audio data provided in an embodiment of the present application is shown;

[0016] Figure 7 A schematic diagram illustrating a flow chart of a method for sharing audio data provided in an embodiment of the present application is shown;

[0017] Figure 8 A module block diagram of an audio data sharing device provided by an embodiment of the present application is shown;

[0018] Figure 9A block diagram of an electronic device for executing the audio data sharing method according to an embodiment of the present application is shown;

[0019] Figure 10 A storage unit for storing or carrying program codes for implementing the audio data sharing method according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0020] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0021] As people's lives become more enriched, the number of electronic devices they own is also increasing. The technology of Bluetooth devices such as Bluetooth speakers and Bluetooth headsets (such as True Wireless Stereo (TWS)) is also rapidly advancing. At the same time, with the development of Bluetooth technology, Bluetooth Low Energy Audio (BLEAudio) technology will bring people lower power consumption, lower cost, higher quality, and lower latency wireless audio services.

[0022] 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 devices) and cannot send audio data to multiple Bluetooth devices at the same time. However, there are often scenarios in life or work where the user of the Bluetooth device wants to share the audio data in the electronic device being listened to with other users. This requires providing corresponding technologies to conveniently and reliably share the audio data in the electronic device with other users.

[0023] BLE Audio provides the Coordinated Set Identification Profile (CSIP) protocol, which allows devices belonging to the same group to achieve coordinated synchronization when interacting with external devices. This protocol mainly describes how external devices can identify multiple independent devices in a group as the same group. For multiple devices belonging to the same group, if they want to be used 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, based on the obtained combination identification information of each device, such as the Set Identity Resolving Key (SIRK), devices with the same SIRK value can be judged and grouped together. That is, Bluetooth devices with the same SIRK value will be considered by electronic devices as a device group (Group), and then when continuously outputting audio, audio will be transmitted simultaneously with all devices in a device group.

[0024] Among them, the inventor found through research that if multiple Bluetooth devices are to be able to share the audio data transmitted by the electronic device, it is necessary to burn the SIRK values ​​of multiple Bluetooth devices to the same SIRK value during factory settings. However, this method will cause other Bluetooth devices in the surrounding area to be mistakenly connected by the electronic device. Specifically, when an electronic device chooses to connect to a Bluetooth device, the electronic device first establishes an 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. When the electronic device receives the prand field in the RSI value carried in the broadcast information of another Bluetooth device, it calculates whether the hash is consistent with the hash field of the RSI value in the broadcast. If they are the same, it automatically establishes an LE-Audio connection with the other Bluetooth device.

[0025] The RSI value in the broadcast information includes a hash value and a prand field. The prand field contains a random part and a fixed part (i.e., the 1 and 0 at the end). 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 hash field of the RSI value in the broadcast message of the other Bluetooth device to determine whether the two are consistent. The calculation method can be shown in the following formula: RSI generation: hash = sih (SIRK, prand), RSI = hash || prand.

[0026] To address the above issues, the inventors, after extensive research, have discovered and proposed the audio data sharing method, device, electronic device, and storage medium provided in the embodiments of this application. By configuring at least two Bluetooth devices to belong to the same device group when audio data sharing is required, audio data sharing can be achieved, thereby improving user experience and enhancing product competitiveness. The specific audio data sharing method is described in detail in the subsequent embodiments.

[0027] The following describes the application environment of the audio data sharing method provided in the embodiments of the present application.

[0028] See also Figure 1 , Figure 1 Schematic diagram of the application environment of the audio data sharing method provided in the embodiment of the present application is shown. Figure 1 As shown, it includes an electronic device 100, a first Bluetooth device 200, and a second Bluetooth device 300. Of course, it may also include a third Bluetooth device, a fourth Bluetooth device, etc., which are not limited here. Among them, the electronic device 100 may include a smart phone, a tablet computer, a laptop computer, a personal computer, an audio-visual device, a wearable electronic device, and other audio source devices, which are not limited here. The first Bluetooth device 200 may include an audio playback device such as a Bluetooth speaker and a Bluetooth headset, and the second Bluetooth device 300 may include an audio playback device such as a Bluetooth speaker and a Bluetooth headset. And when the first Bluetooth device 200 is a Bluetooth headset, the Bluetooth headset may include a single Bluetooth headset or a pair of Bluetooth headsets. When the second Bluetooth device 300 is a Bluetooth headset, the Bluetooth headset may include a single Bluetooth headset or a pair of Bluetooth headsets, which are not limited here. As a way, a BLE connection can be established between the electronic device 100 and the first Bluetooth device 200, based on which information exchange can be carried out between the electronic device 100 and the first Bluetooth device 200; a BLE connection can be established between the electronic device 100 and the second Bluetooth device 300, based on which information exchange can be carried out between the electronic device 100 and the second Bluetooth device 300.

[0029] Among them, the first Bluetooth device 200 / the second Bluetooth headset 300 is a Bluetooth device that supports LE Audio, and the electronic device 100 is an electronic device that supports LE Audio. As a way, the first Bluetooth device 200 / the second Bluetooth headset 300 supports the server role (unicast server) of LE Audio, and the electronic device 100 supports the client role (unicast client) of LE Audio. Among them, the unicast client is one of the LE Audio BAP roles, which is mainly used to receive broadcasts of unicast servers and establish connections with unicast servers. The unicast server is another LE Audio BAP role, which is mainly used to transmit broadcasts and establish connections with unicast clients.

[0030] See also Figure 2 , Figure 2 The flowchart of the audio data sharing method provided by an embodiment of the present application is shown. The method is used to realize the audio data sharing function by setting at least two Bluetooth devices to belong to the same device group when audio data sharing is required, thereby improving user experience and enhancing product competitiveness. In a specific embodiment, the audio data sharing method is applied to Figure 8 The audio data sharing device 400 and the electronic device 100 equipped with the audio data sharing device 400 are shown. Figure 9 ). The following will take electronic devices as an example to illustrate the specific process of this embodiment. Of course, it can be understood that the electronic devices used in this embodiment can include smart phones, tablet computers, wearable electronic devices, etc., which are not limited here. Figure 2 The process shown is described in detail. In this embodiment, 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:

[0031] 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 group.

[0032] In this embodiment, 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 can be the same type of Bluetooth devices, for example, both of which are Bluetooth headsets; or the at least two Bluetooth devices can be different types of Bluetooth devices, for example, the at least two Bluetooth devices can include a Bluetooth headset and a smart speaker.

[0033] As one way, for each of the at least two Bluetooth devices, taking the Bluetooth device as a Bluetooth headset as an example, the Bluetooth headset can be placed in an earphone box, and when it is detected that the earphone box is opened, a BLE connection can be established between the electronic device and the Bluetooth headset. As another way, the Bluetooth headset can be placed in an earphone box, and when it is detected that the Bluetooth headset is taken out of the earphone box, a BLE connection can be established between the electronic device and the Bluetooth headset. As yet another way, the Bluetooth headset can be placed in an earphone box, and when it is detected that the Bluetooth headset is taken out of the earphone box, it can be detected whether the Bluetooth headset is in a wearing state, and when it is detected that the Bluetooth headset is in a wearing state, a BLE connection can be established between the electronic device and the Bluetooth headset.

[0034] In this embodiment, the Bluetooth device can transmit a low-power audio broadcast, and the electronic device can receive the low-power audio broadcast transmitted by the Bluetooth device to obtain information such as the Bluetooth address of the Bluetooth device from the low-power audio broadcast, and then establish a BLE connection with the Bluetooth device based on the Bluetooth address of the Bluetooth device and other information.

[0035] As one way, the Bluetooth headset can be placed in the headset box, and when it is detected that the headset box is opened, a low-power audio broadcast can be transmitted, and when the electronic device receives the low-power audio broadcast, it can establish a BLE connection with the Bluetooth headset in response to the low-power audio broadcast. As another way, the Bluetooth headset can be placed in the headset box, and when it is detected that the Bluetooth headset is taken out of the headset box, a low-power audio broadcast can be transmitted, and when the electronic device receives the low-power audio broadcast, it can establish a BLE connection with the Bluetooth headset in response to the low-power audio broadcast. As another way, the Bluetooth headset can be placed in the headset box, and when it is detected that the Bluetooth headset is taken out of the headset box, it can detect whether the Bluetooth headset is in a wearing state, and when it is detected that the Bluetooth device is in a wearing state, a low-power audio broadcast can be transmitted, and when the electronic device receives the low-power audio broadcast, it can establish a BLE connection with the Bluetooth headset in response to the low-power audio broadcast.

[0036] In some embodiments, for two Bluetooth headsets in a pair of Bluetooth headsets (for example, a first Bluetooth headset and a second Bluetooth headset), the first Bluetooth headset and the second Bluetooth headset transmit LE-Audio broadcasts. After the user turns on the Bluetooth low energy LE scan of the electronic device, the LE-Audio broadcast transmitted by the first Bluetooth headset is scanned. The user clicks the link to the first Bluetooth headset, and an LE connection is established between the electronic device and the first Bluetooth headset. The electronic device initiates a service query to the first Bluetooth headset, and establishes an LE-Audio connection with the first Bluetooth headset based on the service query result. The electronic device obtains a SIRK value from the first Bluetooth headset, and the electronic device scans the LE-Audio broadcast transmitted by the second Bluetooth device. The electronic device calculates a hash value based on the SIRK value of the first Bluetooth headset and the prand field of the RSI value in the LE-Audio broadcast transmitted by the second Bluetooth headset. The electronic device determines whether the calculated hash value is consistent with the hash field in the LE-Audio broadcast transmitted by the second Bluetooth headset. If they are consistent, the electronic device establishes an LE connection with the second Bluetooth headset, and the electronic device initiates a service query to the second Bluetooth headset, and establishes an 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.

[0037] In this embodiment, when it is determined that the electronic device has established a BLE connection with at least two Bluetooth devices, it can be detected whether an audio sharing instruction is received. If it is determined that the audio sharing instruction is received, the at least two Bluetooth devices can be set to belong to the same device group in response to the audio sharing instruction. That is, locally on the electronic device, at least two Bluetooth devices are set to belong to the same device group from not belonging to the same device group. Based on this, locally on the electronic device, at least two Bluetooth devices are set to belong to the same device group, while the actual device grouping of the at least two Bluetooth devices remains unchanged, that is, for at least two Bluetooth devices, they do not actually belong to the same device group.

[0038] In some embodiments, the electronic device can detect whether the target voice information is received, and 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, and 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. Among them, the target touch operation may include touch operations on virtual controls of the electronic device, touch operations on physical buttons of the electronic device, etc., which are not limited here. As a way, the touch operations on virtual controls may include: click operations, press operations, sliding operations, etc., and the touch operations on physical buttons may include: click operations, press operations, etc., which are not limited here.

[0039] In some implementations, at least two Bluetooth devices are configured to belong to the same device group, wherein audio data of the electronic device received by the at least two Bluetooth devices in the same device group can be synchronized.

[0040] As an implementable manner, the combined 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 as belonging to the same device group. The combined identification information may include a combined identification resolution value SIRK.

[0041] As another practicable approach, the characteristic identification information of at least two Bluetooth devices recorded in the electronic device may be set as the same combined identification information, thereby configuring the at least two Bluetooth devices to belong to the same device group. The characteristic identification information may include identification information for uniquely identifying the Bluetooth device, such as an identification code.

[0042] Step S120: When the electronic device plays audio data, the audio data is sent to the at least two Bluetooth devices respectively.

[0043] In this embodiment, when an electronic device has at least two Bluetooth devices assigned to the same device group, it can detect whether the electronic device is playing audio data. If the electronic device is detected to be playing audio data, the audio data can be sent to the at least two Bluetooth devices. This allows audio data to be shared on the electronic device side without relying on customized design on the Bluetooth device side, thereby improving the audio data sharing experience.

[0044] In some implementations, the audio data played by the electronic device may include music audio data, video audio data, game audio data, etc., which are not limited here.

[0045] In some implementations, when it is detected that the electronic device is playing audio data, the audio data may be sent to the at least two Bluetooth devices separately and synchronously.

[0046] As a method, when an electronic device plays audio data, a connected isochronous stream (CIS) can be established between the electronic device and at least two Bluetooth devices respectively, and the audio data can be sent to the at least two Bluetooth devices based on the connected isochronous stream between the electronic device and the at least two Bluetooth devices.

[0047] 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 an embodiment of the present application are applied to an electronic device, which 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. In response to an audio sharing instruction, 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 by setting at least two Bluetooth devices to belong to the same device group when audio data sharing is required, the audio data sharing function can be realized, thereby improving user experience and enhancing product competitiveness.

[0048] See also Figure 3 , Figure 3 The flowchart of the method for sharing audio data provided by an embodiment of the present application is shown. The method is applied to the above electronic device, which 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. Figure 3 The process shown in FIG. 1 is described in detail. The method for sharing audio data may specifically include the following steps:

[0049] 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.

[0050] The detailed description of step S210 can be found in step S110 and will not be repeated here.

[0051] Step S220: When the electronic device plays the audio data, a connection synchronization stream is established between the at least two Bluetooth devices respectively.

[0052] In this embodiment, when at least two Bluetooth devices are set to belong to the same device group and the electronic device plays audio data, connection synchronization flows may be established with the at least two Bluetooth devices respectively.

[0053] In some embodiments, when at least two Bluetooth devices are set to belong to the same device group and the electronic device plays audio data, the electronic device can respectively initiate a synchronous stream connection request to the at least two Bluetooth devices, and the at least two Bluetooth devices can respond to the synchronous stream connection request to establish a connection synchronous stream with the electronic device.

[0054] Among them, taking at least two Bluetooth devices including a first Bluetooth device and a second Bluetooth device as an example, when the first Bluetooth device and the second Bluetooth device are set to belong to the same device group and the electronic device plays audio data, the electronic device can initiate a first synchronization stream connection request to the first Bluetooth device, and the first Bluetooth device can respond to the first synchronization stream connection request to establish a connection synchronization stream with the electronic device. At the same time, the electronic device can initiate a second synchronization stream connection request to the second Bluetooth device, and the second Bluetooth device can respond to the second synchronization stream connection request to establish a connection synchronization stream with the electronic device.

[0055] Among them, taking the first Bluetooth device as a Bluetooth headset pair as an example, the Bluetooth headset pair may include a first Bluetooth headset and a second Bluetooth headset. When the first Bluetooth device and the second Bluetooth device are set to belong to the same device group and the electronic device plays audio data, 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 to establish a connection synchronization stream with the electronic device. At the same time, 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 to establish a connection synchronization stream with the electronic device. At the same time, the electronic device can initiate a third synchronization stream connection request to the second Bluetooth device, and the third Bluetooth device can respond to the third synchronization stream connection request to establish a connection synchronization stream with the electronic device.

[0056] Step S230: sending the audio data to the at least two Bluetooth devices based on the connection synchronization streams between the at least two Bluetooth devices.

[0057] In this embodiment, when the connection synchronization flow between the electronic device and at least two Bluetooth devices is successfully established, the audio data can be sent to the at least two Bluetooth devices based on the connection synchronization flow between the electronic device and the at least two Bluetooth devices.

[0058] In some embodiments, when a connection synchronization stream is successfully established between the electronic device and at least two Bluetooth devices, the audio data can be sent to the corresponding Bluetooth device based on the connection synchronization stream between the electronic device and each of the at least two Bluetooth devices. Taking the example of at least two Bluetooth devices including a first Bluetooth device and a second Bluetooth device, the electronic device establishes a first connection synchronization stream with the first Bluetooth device, and the electronic device establishes a second connection synchronization stream with the second Bluetooth device, the electronic device can send the audio data to the first Bluetooth device based on the first connection synchronization stream, and at the same time, send the audio data to the second Bluetooth device based on the second connection synchronization stream.

[0059] Step S240: In response to the 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 any Bluetooth device among the at least two Bluetooth devices.

[0060] Among them, since at least two Bluetooth devices of the electronic device have established a connection synchronization stream, the electronic device can send information to the at least two Bluetooth devices based on the connection synchronization stream, and accordingly, the at least two Bluetooth devices can also send information to the electronic device based on the connection synchronization stream.

[0061] In some embodiments, any of the at least two Bluetooth devices can send a control instruction to the electronic device based on a connection synchronization flow between the at least two Bluetooth devices and the electronic device. In this embodiment, the Bluetooth device that sends the control instruction to the electronic device among the at least two Bluetooth devices can be determined as a first target Bluetooth device. The first target Bluetooth device can then send the control instruction to the electronic device based on the connection synchronization flow between the at least two Bluetooth devices and the electronic device. Accordingly, upon receiving the control instruction, the electronic device can respond to the control instruction and perform an operation corresponding to the control instruction, and / or send the control instruction to a Bluetooth device other than the first target Bluetooth device among the at least two Bluetooth devices to achieve synchronization of the at least two Bluetooth devices.

[0062] As a method, the control instruction may include a music control instruction, and the electronic device may respond to the music control instruction to control the playing, pausing, ending, etc. of the music, which is not limited here.

[0063] As another way, the control instruction may include a call control instruction, and the electronic device may respond to the call control instruction to control answering, hanging up, etc. of the call, which is not limited here.

[0064] As another way, the control instruction may include a status instruction of the Bluetooth device, and the electronic device may update the status information of the Bluetooth device in response to the status instruction of the Bluetooth device, such as the remaining power of the Bluetooth device, the connection status of the Bluetooth device, etc., which is not limited here.

[0065] As another approach, the control instruction may include a volume control instruction. In response to the volume control instruction, the electronic device may forward 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 the at least two Bluetooth devices.

[0066] An embodiment of the present application provides an audio data sharing method, which responds to an audio sharing instruction, sets at least two Bluetooth devices to belong to the same device group in an electronic device, establishes connection synchronization streams with at least two Bluetooth devices respectively when the electronic device plays audio data, sends audio data to at least two Bluetooth devices based on the connection synchronization streams with at least two Bluetooth devices, controls the electronic device in response to a control instruction sent by the first target Bluetooth device based on the connection synchronization stream, and / or sends 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 any Bluetooth device among the at least two Bluetooth devices. Compared to Figure 2 The audio data sharing method shown in 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 the competitiveness of the product.

[0067] See also Figure 4 , Figure 4 The flow chart of the method for sharing audio data provided by an embodiment of the present application is shown. The method is applied to the above electronic device, which 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. Figure 4 The process shown in FIG. 1 is described in detail. The method for sharing audio data may specifically include the following steps:

[0068] Step S310: In response to the audio sharing instruction, the combination identification information of the at least two Bluetooth devices is set to the same combination identification information, wherein the combination identification information is used to indicate the device grouping of the Bluetooth devices, and the combination identification information is recorded in the electronic device.

[0069] The electronic device can pre-acquire the combined identification information of the Bluetooth device and locally record the acquired combined identification information of the Bluetooth device. The combined identification information of the Bluetooth device can be used to indicate the device group of the Bluetooth device. In other words, Bluetooth devices with the same combined identification information can be considered to belong to the same device group; Bluetooth devices with different combined identification information can be considered to belong to different device groups. As one approach, the combined identification information includes a combined identification resolution value (SIRK).

[0070] In this embodiment, when the electronic device receives the 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 setting the at least two Bluetooth devices as belonging to the same device combination. For example, assuming that the combination identification information of the at least two Bluetooth devices is set to the target combination identification information, such as setting the combination identification information of the at least two Bluetooth devices to the target SIRK.

[0071] In this embodiment, 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, 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 by itself, and will not set it to the at least two Bluetooth devices, so the applicability of audio sharing can be improved without changing the design of the Bluetooth device end.

[0072] See also Figure 5 , Figure 5 Shows the application Figure 4 The following is a flow chart of step S310 of the audio data sharing method provided. Figure 5 The process shown is described in detail, and the method may specifically include the following steps:

[0073] Step S311: in response to the audio sharing instruction, respectively obtain initial combination identification information of the at least two Bluetooth devices.

[0074] When a Bluetooth device is factory-set, corresponding combination identification information is generally burned into it, and different Bluetooth devices have different combination identification information burned into them. If the Bluetooth device is a pair of Bluetooth headphones, the combination identification information of the two Bluetooth headphones in the pair is burned to be the same. For example, assuming that the at least two Bluetooth devices include a first Bluetooth device and a second Bluetooth device, the SIRK value of the first Bluetooth device at the factory can be burned into SIRK1, and the SIRK value of the second Bluetooth device at the factory can be burned into SIRK2.

[0075] As a method, the combination identification information burned into the Bluetooth device during factory settings can be used as the initial combination identification information of the Bluetooth device. 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 SIRK2.

[0076] In this embodiment, when an audio sharing instruction is received, 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 by the at least two Bluetooth devices during factory settings can be obtained respectively as the initial combination identification information of the at least two Bluetooth devices. For example, SIRK1 of the first Bluetooth device can be obtained as the initial combination identification information of the first Bluetooth device, and SIRK2 of the second Bluetooth device can be obtained as the initial combination identification information of the second Bluetooth device.

[0077] As an implementable method, when an audio sharing instruction is received, the initial combination identification information of the at least two Bluetooth devices can be obtained respectively based on the BLE connection between the electronic device and the at least two Bluetooth devices. Specifically, when an audio sharing instruction is received, a service query can be initiated to the at least two Bluetooth devices respectively based on the BLE connection between the electronic device and the at least two Bluetooth devices, and the initial combination identification information of the at least two Bluetooth devices can be obtained respectively based on the service query result. For example, the combination identification information of the first Bluetooth device can be obtained based on the BLE connection between the first Bluetooth device, and the combination identification information of the second Bluetooth device can be obtained based on the BLE connection between the second Bluetooth device.

[0078] As another feasible method, when an audio sharing instruction is received, the combined identification information of the at least two Bluetooth devices can be obtained from the local of the electronic device. Then, before respectively obtaining the initial combined identification information of the at least two Bluetooth devices in response to the audio sharing instruction, it can also include: based on the BLE connection between the electronic device and the at least two Bluetooth devices, respectively obtaining the initial combined identification information of the at least two Bluetooth devices, and saving 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 from the local of the electronic device.

[0079] Step S312: updating the combination identification information of the at least two Bluetooth devices from their respective initial combination identification information to the same combination identification information.

[0080] In this embodiment, 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 can be the same as a certain initial combination identification information or different from all initial combination identification information, which is not limited here.

[0081] In some embodiments, it is assumed that at least two Bluetooth devices include a first Bluetooth device and a second Bluetooth device, and the initial combination identification information of the first Bluetooth device is SIRK1, and the initial combination identification information of the second Bluetooth device is SIRK2. Based on this, if the same combination identification information is SIRK3, the combination identification information of the first Bluetooth device can be updated from SIRK1 to SIRK3, and the combination identification information of the second Bluetooth device can be updated from SIRK2 to SIRK3; if the same combination identification information is SIRK1, the combination identification information of the first Bluetooth device can be maintained as SIRK1, and the combination identification information of the second Bluetooth device can be updated from SIRK2 to SIRK1; if the same combination identification information is SIRK2, the combination identification information of the first Bluetooth device can be updated from SIRK1 to SIRK2, and the combination identification information of the second Bluetooth device can be maintained as SIRK2.

[0082] In some embodiments, after updating the combined identification information of at least two Bluetooth devices from their respective initial combined identification information to the same combined identification information, the method further includes: restoring the combined identification information of the at least two Bluetooth devices from the target combined identification information to their respective initial combined identification information in response to an audio sharing stop instruction. As one approach, when restoring the combined identification information of the at least two Bluetooth devices from the target combined identification information to their respective initial combined identification information, the initial combined identification information corresponding to each of the at least two Bluetooth devices can be stored locally on the electronic device.

[0083] In some embodiments, it is assumed that at least two Bluetooth devices include a first Bluetooth device and a second Bluetooth device, and the initial combination identification information of the first Bluetooth device is SIRK1, and the initial combination identification information of the second Bluetooth device is SIRK2. Based on this, if the same combination identification information is SIRK3, then in response to the audio stop sharing instruction, the combination identification information of the first Bluetooth device can be restored from SIRK3 to SIRK1, and the combination identification information of the second Bluetooth device can be restored from SIRK3 to SIRK2; if the same combination identification information is SIRK1, the combination identification information of the first Bluetooth device can be maintained 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, the combination identification information of the first Bluetooth device can be restored from SIRK2 to SIRK1, and the combination identification information of the second Bluetooth device can be maintained as SIRK2.

[0084] As one embodiment, responding to the instruction to stop audio sharing may include: the electronic device receiving instruction information for instructing to stop audio sharing. The instruction information received 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 are not limited here.

[0085] As another embodiment, responding to the audio stop sharing instruction may include: the electronic device stops playing the audio data. Wherein, the electronic device stopping playing the audio data may include the electronic device pausing playing the audio data, the electronic device ending playing the audio data, etc., which are not limited here.

[0086] As another embodiment, responding to the instruction to stop sharing the audio may include: the electronic device disconnecting the BLE connection between the electronic device and the at least two Bluetooth devices.

[0087] As another approach, responding to the audio stop sharing instruction may include: the electronic device disconnecting the synchronous streams connected with at least two Bluetooth devices.

[0088] Step S320: When the electronic device plays audio data, the audio data is sent to the at least two Bluetooth devices respectively.

[0089] The detailed description of step S320 can be found in step S120 and will not be repeated here.

[0090] An embodiment of the present application provides an audio data sharing method, which responds to an audio sharing instruction, sets the combined identification information of 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 devices, and the combined identification information is recorded in the electronic device. When the electronic device plays audio data, the audio data is sent to the at least two Bluetooth devices respectively. Figure 2 The audio data sharing method shown in 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, thereby improving the accuracy of the set same device combination.

[0091] See also Figure 6 , Figure 6 The flow chart of the method for sharing audio data provided by an embodiment of the present application is shown. The method is applied to the above electronic device, which 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. Figure 6 The process shown in FIG. 1 is described in detail. The method for sharing audio data may specifically include the following steps:

[0092] Step S410: In response to the audio sharing instruction, output prompt information, wherein the prompt information is used to prompt the user to select a Bluetooth device for audio sharing from the at least two Bluetooth devices.

[0093] In this embodiment, when an audio sharing instruction is received, prompt information for prompting a user to select a Bluetooth device for audio sharing from at least two Bluetooth devices may be output in response to the audio sharing instruction.

[0094] In some implementations, the prompt information may include voice prompt information, text prompt information, vibration prompt information, etc., which is not limited here.

[0095] As an practicable approach, upon receiving an audio sharing instruction, the number of the at least two Bluetooth devices may be obtained. If the number of devices is two, the two Bluetooth devices may be identified as target Bluetooth devices; if the number of devices is greater than two, a prompt message may be output.

[0096] Step S420: In response to the device selection instruction, determine at least two second target Bluetooth devices from the at least two Bluetooth devices.

[0097] In this embodiment, when the prompt information is output, it is possible to detect whether a device selection instruction triggered by the prompt information is received. If it is determined that the device selection instruction is received, at least two second target Bluetooth devices can be determined from the at least two Bluetooth devices in response to the device selection instruction. Assuming that the at least two Bluetooth devices include a first Bluetooth device, a second Bluetooth device, a third Bluetooth device, and a fourth Bluetooth device, the prompt information can be used to instruct the selection of at least two Bluetooth devices from the first Bluetooth device, the second Bluetooth device, the third Bluetooth device, and the fourth Bluetooth device. If the device selection instruction instructs the selection of the second Bluetooth device and the fourth Bluetooth device, the second Bluetooth device and the fourth Bluetooth device can be determined as the second target Bluetooth devices.

[0098] As one approach, when the prompt message is output, it is possible to detect whether a device selection instruction triggered by the prompt message is received. If it is determined that a first instruction to abandon device selection is received, triggered by the prompt message, audio sharing can be stopped, that is, audio data can be stopped from being sent to the at least two Bluetooth devices.

[0099] As another approach, when the prompt message is output, it may be detected whether a device selection instruction triggered by the prompt message is received. If it is determined that a second abandon device selection instruction triggered by the prompt message is received, at least two second target Bluetooth devices may be randomly determined from the at least two Bluetooth devices.

[0100] As another approach, when the prompt information is output, it is possible to detect whether a device selection instruction triggered by the prompt information is received. If it is determined that no user-triggered selection instruction is received within a preset time, audio sharing can be stopped, that is, audio data can be stopped from being sent to the at least two Bluetooth devices.

[0101] As another approach, when the prompt information is output, it is possible to detect whether a device selection instruction triggered by the prompt information is received. If it is determined that no user-triggered selection instruction is received within a preset time, at least two second target Bluetooth devices can be randomly determined from the at least two Bluetooth devices.

[0102] Step S430: setting the at least two second target Bluetooth devices to belong to the same device group in the electronic device.

[0103] In this embodiment, when at least two target Bluetooth devices are determined, the at least two target Bluetooth devices may be set in the electronic device to belong to the same device group.

[0104] Step S440: When the electronic device plays audio data, the audio data is sent to the at least two Bluetooth devices respectively.

[0105] The detailed description of step S440 can be found in step S120 and will not be repeated here.

[0106] An embodiment of the present application provides an audio data sharing method, which outputs prompt information in response to an audio sharing instruction, wherein the prompt information is used to prompt the user to select a Bluetooth device for audio sharing from at least two Bluetooth devices, and in response to the device selection instruction, determines at least two second target Bluetooth devices from the at least two Bluetooth devices, and 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, sends the audio data to the at least two Bluetooth devices respectively. Compared to Figure 2 The audio data sharing method shown in the figure also allows the user to select the Bluetooth device that needs to share the audio, thereby improving the user experience.

[0107] See also Figure 7 , Figure 7 The flowchart of the audio data sharing method provided by an embodiment of the present application is shown. The method is applied to the above-mentioned electronic device, which 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 electronic device is provided with a target switch, which is used to control the opening or closing of the audio sharing function. Figure 7 The process shown in FIG. 1 is described in detail. The method for sharing audio data may specifically include the following steps:

[0108] Step S510: In response to a touch operation on the target switch, the audio sharing function is enabled, and the at least two Bluetooth devices are set on the electronic device to belong to the same device group.

[0109] In this embodiment, the electronic device may be provided with a target switch, which is used to control the opening or closing of 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 which point the audio sharing function is turned on, and can touch the target switch to set the target switch to the second state, at which point the audio sharing function is turned off. As a way, the target switch can be presented in the form of a virtual control.

[0110] In some embodiments, the electronic device can detect a touch operation applied to a target switch, wherein, when the touch operation applied to the target switch is detected, it indicates that the user desires to turn on the audio sharing function. In response to the touch operation applied to the target switch, the audio sharing function can be turned on, and at least two Bluetooth devices can be set to belong to the same device group on the electronic device.

[0111] Step S520: When the electronic device plays audio data, the audio data is sent to the at least two Bluetooth devices respectively.

[0112] The detailed description of step S520 can be found in step S120 and will not be repeated here.

[0113] An embodiment of the present application provides an audio data sharing method, which responds to a touch operation on a target switch, turns on the audio sharing function, and sets at least two Bluetooth devices to belong to the same device group on an electronic device. When the electronic device plays audio data, the audio data is sent to the at least two Bluetooth devices respectively. Figure 2 The audio data sharing method shown in the figure, this embodiment also controls the opening or closing of the audio sharing function through a target switch, which can improve the user experience.

[0114] See also Figure 8 , Figure 8 The module block diagram of the audio data sharing device provided by an embodiment of the present application is shown. The audio data sharing device 400 is applied to the above electronic device, which 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. Figure 8 As described in the block diagram, the audio data sharing device 400 includes: a device grouping setting module 410 and an audio data sharing module 420, wherein:

[0115] The device group setting module 410 is configured to, in response to an audio sharing instruction, set the at least two Bluetooth devices to belong to the same device group in the electronic device.

[0116] Furthermore, the device grouping setting module 410 includes: a first device grouping setting submodule, wherein:

[0117] The first device grouping setting submodule is used to set the combination identification information of the at least two Bluetooth devices to the same combination identification information in response to the audio sharing instruction, wherein the combination identification information is used to indicate the device grouping of the Bluetooth devices, and the combination identification information is recorded in the electronic device.

[0118] Furthermore, the first device grouping setting submodule includes: a first initial combination identification information acquisition unit and a device grouping setting unit, wherein:

[0119] The first initial combination identification information acquiring unit is configured to respectively acquire the initial combination identification information of the at least two Bluetooth devices in response to the audio sharing instruction.

[0120] The device grouping setting unit is configured to 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.

[0121] Furthermore, the first device grouping setting submodule further includes: a combination identification information recovery unit, wherein:

[0122] The combination identification information recovery unit is configured to recover 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 an audio sharing stop instruction.

[0123] Furthermore, 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:

[0124] The first stop determination subunit is configured to receive instruction information for instructing the electronic device to stop audio sharing.

[0125] The second stop determination subunit is configured to stop the electronic device from playing the audio data.

[0126] The third stop determination subunit is configured to disconnect the low-power Bluetooth connection between the electronic device and the at least two Bluetooth devices.

[0127] The fourth stop determination subunit is configured to cause the electronic device to disconnect the synchronization flow between the electronic device and the at least two Bluetooth devices.

[0128] Furthermore, the device group setting module 410 includes: a prompt information output submodule, a target Bluetooth device determination submodule and a second device group setting submodule, wherein:

[0129] The prompt information output submodule is used to output prompt information in response to the audio sharing instruction, wherein the prompt information is used to prompt the user to select a Bluetooth device for audio sharing from the at least two Bluetooth devices.

[0130] The target Bluetooth device determining 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.

[0131] The second device group setting submodule is configured to set the at least two second target Bluetooth devices to belong to the same device group in the electronic device.

[0132] Furthermore, 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 further includes: a third device group setting submodule, wherein:

[0133] The third device group setting submodule is configured to respond to a touch operation on the target switch, enable the audio sharing function, and set the at least two Bluetooth devices to belong to the same device group.

[0134] 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 the audio data.

[0135] Furthermore, the audio data sharing module 420 includes: a connection synchronization stream establishment submodule and an audio data sending submodule, wherein:

[0136] The connection synchronization stream establishing submodule is used to establish connection synchronization streams with the at least two Bluetooth devices respectively when the electronic device plays the audio data.

[0137] 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 between the at least two Bluetooth devices.

[0138] Furthermore, the audio data sharing module 420 includes a control instruction response submodule, wherein:

[0139] A control instruction response submodule is used to control the electronic device in response to the control instruction sent by the first target Bluetooth device based on the connection synchronization stream, 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 any Bluetooth device among the at least two Bluetooth devices.

[0140] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0141] In several embodiments provided in this application, the coupling between modules may be electrical, mechanical or other forms of coupling.

[0142] In addition, the functional modules in the various embodiments of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into a single module. The above-mentioned integrated modules may be implemented in the form of hardware or software functional modules.

[0143] See also Figure 9 , which shows a structural block diagram of an electronic device 100 provided in an embodiment of the present application. The electronic device 100 can be an electronic device capable of running applications, such as a smartphone, a tablet computer, an e-book, etc. The electronic device 100 in the present application may include one or more of the following components: a processor 110, a memory 120, and one or more applications, wherein the one or more applications may be stored in the memory 120 and configured to be executed by one or more processors 110, and the one or more programs are configured to execute the method described in the aforementioned method embodiment.

[0144] The processor 110 may include one or more processing cores. The processor 110 utilizes various interfaces and circuits to connect various components within the electronic device 100. It executes instructions, programs, code sets, or instruction sets stored in the memory 120, and accesses data stored in the memory 120 to perform various functions and process data within the electronic device 100. Optionally, the processor 110 may be implemented using at least one of the following hardware forms: a digital signal processing (DSP), a field-programmable gate array (FPGA), or a programmable logic array (PLA). The processor 110 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. The CPU primarily processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing displayed content; and the modem handles wireless communications. It is understood that the modem may not be integrated into the processor 110 and may be implemented separately via a communication chip.

[0145] The memory 120 may include a random access memory (RAM) or a read-only memory (ROM). The memory 120 may be used to store instructions, programs, codes, code sets, or instruction sets. The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc. The data storage area may also store data created by the electronic device 100 during use (such as a phone book, audio and video data, chat history data), etc.

[0146] See also Figure 10 , which shows a block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable medium 500 stores program code, which can be called by a processor to execute the method described in the above method embodiment.

[0147] The computer-readable storage medium 500 can be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read-Only Memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer-readable storage medium 500 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 500 has storage space for program code 510 for executing any of the method steps described above. These program codes can be read from or written to one or more computer program products. The program code 510 can be compressed, for example, in a suitable form.

[0148] In summary, the audio data sharing method, device, electronic device, and storage medium provided in the embodiments of the present application are applied to an electronic device, which 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. In response to an audio sharing instruction, 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. Therefore, by setting at least two Bluetooth devices to belong to the same device group when audio data sharing is required, the audio data sharing function can be realized, thereby improving user experience and enhancing product competitiveness.

[0149] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for sharing audio data, characterized in that: 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 comprising: In response to the audio sharing instruction, setting the combined identification information of the at least two Bluetooth devices to the same combined identification information, and saving the same combined identification information without changing the combined identification information of the at least two Bluetooth devices, wherein the combined identification information is used to indicate the device grouping of the Bluetooth devices, and the combined identification information is recorded in the electronic device; When the electronic device plays audio data, the audio data is sent to the at least two Bluetooth devices respectively.

2. The method according to claim 1, characterized in that When the electronic device plays audio data, sending the audio data to the at least two Bluetooth devices respectively includes: When the electronic device plays the audio data, establishing connection synchronization flows with the at least two Bluetooth devices respectively; The audio data is sent to the at least two Bluetooth devices based on the connection synchronization streams between the at least two Bluetooth devices.

3. The method according to claim 2, characterized in that When the electronic device plays the audio data, after establishing connection synchronization streams with the at least two Bluetooth devices respectively, the method further includes: In response to a control instruction sent by the first target Bluetooth device based on the connection synchronization stream, the electronic device is controlled, and / or the control instruction is sent 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 any Bluetooth device among the at least two Bluetooth devices.

4. The method according to claim 1, wherein The step of setting the combination identification information of the at least two Bluetooth devices to the same combination identification information in response to the audio sharing instruction includes: In response to the audio sharing instruction, respectively obtain initial combination identification information of the at least two Bluetooth devices; The combination identification information of the at least two Bluetooth devices is respectively updated from respective initial combination identification information to the same combination identification information.

5. The method according to claim 4, characterized in that After respectively updating the combined identification information of the at least two Bluetooth devices from their respective initial combined identification information to the same combined identification information, the method further includes: In response to the audio stop sharing instruction, the combined identification information of the at least two Bluetooth devices is restored from the same combined identification information to respective initial combined identification information.

6. The method according to claim 5, characterized in that The step of responding to the audio stop sharing instruction includes: The electronic device receives instruction information for instructing to stop audio sharing; or The electronic device stops playing the audio data; or The electronic device disconnects the low-power Bluetooth connection with the at least two Bluetooth devices; or The electronic device disconnects the synchronization streams connected with the at least two Bluetooth devices.

7. The method according to any one of claims 1 to 6, characterized in that The combination identification information includes a combination identification resolution value SIRK.

8. The method according to any one of claims 1 to 6, characterized in that The step of setting, in response to the audio sharing instruction, the electronic device to configure the at least two Bluetooth devices to belong to the same device group comprises: In response to the audio sharing instruction, outputting prompt information, wherein the prompt information is used to prompt the user to select a Bluetooth device for audio sharing from the at least two Bluetooth devices; In response to the device selection instruction, determining at least two second target Bluetooth devices from the at least two Bluetooth devices; The electronic device sets the at least two second target Bluetooth devices to belong to the same device group.

9. An audio data sharing device, characterized in that: 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 apparatus comprising: a device grouping setting module, configured to, in response to an audio sharing instruction, set the combined identification information of the at least two Bluetooth devices to the same combined identification information, and save the same combined identification information without changing the combined identification information of the at least two Bluetooth devices, wherein the combined identification information is used to indicate the device grouping of the Bluetooth devices, and the combined identification information is recorded in the electronic device; The audio data sharing module is used to send the audio data to the at least two Bluetooth devices respectively when the electronic device plays the audio data.

10. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory is coupled to the processor and stores instructions. When the instructions are executed by the processor, the processor performs the method according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program code, which can be called by a processor to execute the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Audio sharing method and device

    CN115001682A