Audio sharing method and device
During the audio sharing process, the shared playback device is added to the first device group of the audio source device and a connection-based synchronous data stream is established, the problem that the shared playback device cannot operate the audio source device is solved, and the audio sharing effect and user experience are improved.
Patent Information
- Application Number
- CN202210754281.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-28
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2042-06-28
AI Technical Summary
During the audio sharing process, the shared playback device can only passively receive broadcast audio data and cannot operate the audio source device, affecting the effect of audio sharing.
The first set of identity resolution keys are shared by the audio source device, and the shared audio device updates the group identity resolution keys of the shared playback device, so that it joins the first device group, and establishes a connection-based synchronous data stream, so that the shared playback device obtains the operational capability of the audio source device.
It improves the effect and versatility of audio sharing, reduces latency, and obtains better sound quality, improving user experience.
Smart Images

Figure CN115001682B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of communication technology, and in particular to an audio sharing method and device. Background Art
[0002] With the rapid development of audio technology, users have more and more requirements for the functions of audio equipment. In order to facilitate multiple users to listen to audio at the same time, audio equipment that supports audio sharing technology has emerged.
[0003] In the related art, based on the broadcast stream sharing mechanism, the audio data of the audio source device is shared through the broadcast isochronous data stream (BroadcastIsochronous Stream, referred to as BIS). Specifically, the shared audio device scans the broadcast source and synchronizes to the broadcast source. If the broadcast source is encrypted, it is necessary to obtain the broadcast code (Broadcast code) shared by the audio source (mobile phone) device, and then forward the broadcast code to the shared playback device (headphones), so as to receive the audio data broadcast by the audio source device. However, since BIS is a connectionless broadcast isochronous data stream, when the audio source device shares audio through broadcasting, the shared playback device can only passively receive the broadcast audio data, but cannot operate the audio source device, and cannot perform uplink communication, thereby affecting the effect of audio sharing. Summary of the invention
[0004] The embodiments of the present application provide an audio sharing method and apparatus, which are used to enable a shared playback device to obtain the ability to operate an audio source device during the audio sharing process, thereby improving the effect of audio sharing.
[0005] On the one hand, an embodiment of the present application provides an audio sharing method, which is applied to an audio source device, comprising:
[0006] Sharing a first group identity resolution key corresponding to the first device group to a shared audio device, and triggering the shared audio device to set a group identity resolution key of at least one shared playback device in the second device group to the first group identity resolution key;
[0007] For each shared playback device, obtaining a broadcast data packet broadcasted by the shared playback device;
[0008] If the broadcast data packet carries a resolvable group identity identifier generated based on the first group identity resolution key, adding the shared playback device to the first device group and establishing a connection with the shared playback device;
[0009] A connection-based synchronous data stream is created for the shared playback device, and the target audio data to be shared is sent to the shared playback device through the synchronous data stream.
[0010] In an embodiment of the present application, the audio source device shares the first group identity resolution key corresponding to the first device group with the shared audio device, and the shared audio device sets the group identity resolution key of each shared playback device to the first group identity resolution key, so that each shared playback device joins the first device group based on the first group identity resolution key, and establishes a connection-based synchronous data stream with the audio source device, so that the shared playback device obtains the ability to control the audio source device and the ability to send data to the audio source device, thereby improving the effect and versatility of audio sharing. Secondly, compared with broadcast stream sharing, when using a connection-based synchronous data stream for audio data sharing, the delay can be effectively reduced, and good sound quality can be obtained, thereby effectively improving the user experience.
[0011] On the one hand, an embodiment of the present application provides an audio sharing method, which is applied to a shared audio device, including:
[0012] Obtain a first group of identity resolution keys corresponding to a first device group shared by the audio source device;
[0013] The group identity resolution key of at least one shared playback device in the second device group is set to the first group identity resolution key, and each shared playback device is triggered to broadcast a broadcast data packet carrying a resolvable group identity identifier, so that the audio source device obtains the broadcast data packet broadcast by the shared playback device, and when it is determined that the broadcast data packet carries the resolvable group identity identifier, the shared playback device is added to the first device group and a connection is established with the shared playback device; a connection-based synchronous data stream is created for the shared playback device, and the target audio data to be shared is sent to the shared playback device through the synchronous data stream, and the resolvable group identity identifier is generated based on the first group identity resolution key.
[0014] On the one hand, an embodiment of the present application provides an audio sharing method, which is applied to each shared playback device in the second device group, including:
[0015] Receiving a setting instruction carrying a first group identity resolution key sent by a shared audio device, setting the group identity resolution key to the first group identity resolution key, and disconnecting the connection with the shared audio device, wherein the first group identity resolution key is shared by the audio source device to the shared audio device, and the first group identity resolution key corresponds to the first device group;
[0016] generating a resolvable group identity identifier based on the first group identity resolution key, and broadcasting a broadcast data packet carrying the resolvable group identity identifier;
[0017] Receive target audio data shared by the audio source device via a connection-based synchronous data stream, wherein the connection-based synchronous data stream is created after the audio source device adds the shared playback device to the first device group and establishes a connection with the shared playback device, wherein when the audio source device receives the broadcast data packet and determines that the broadcast data packet carries the resolvable group identity identifier, the shared playback device is added to the first device group.
[0018] On the one hand, an embodiment of the present application provides an audio sharing device, applied to an audio source device, comprising:
[0019] A sharing module, configured to share a first group identity resolution key corresponding to the first device group with a shared audio device, and trigger the shared audio device to set the group identity resolution key of at least one shared playback device in the second device group to the first group identity resolution key;
[0020] A first acquisition module, configured to acquire, for each shared playback device, a broadcast data packet broadcasted by the shared playback device;
[0021] a processing module, configured to add the shared playback device to the first device group and establish a connection with the shared playback device if the broadcast data packet carries a resolvable group identity identifier generated based on the first group identity resolution key;
[0022] The sending module is used to create a connection-based synchronous data stream for the shared playback device, and send the target audio data to be shared to the shared playback device through the synchronous data stream.
[0023] Optionally, the first device group includes at least one original playback device connected to the audio source device, and the first group of identity resolution keys is obtained from a broadcast data packet broadcast by the first original playback device when the audio source device establishes a connection with the first original playback device.
[0024] Optionally, the shared audio device corresponds to a second device group, and the second device group corresponds to a second group identity resolution key;
[0025] The sharing module is specifically used for:
[0026] The shared audio device is triggered to update the group identity resolution key of at least one shared playback device from the second group identity resolution key to the first group identity resolution key.
[0027] Optionally, the processing module is further used for:
[0028] If the broadcast data packet carries a resolvable group identity identifier generated based on the first group identity resolution key, the shared playback device is added to the first device group, and before establishing a connection with the shared playback device, the broadcast data packet is parsed to obtain a group identity identifier to be verified, wherein the group identity identifier to be verified includes a random number and a hash value to be verified;
[0029] generating a target hash value based on the random number and the first set of identity resolution keys;
[0030] If the hash value to be verified is consistent with the target hash value, it is determined that the group identity identifier to be verified is a resolvable group identity identifier generated based on the first group identity resolution key.
[0031] Optionally, the sharing module is further used for:
[0032] Determining a range of operation sequences to be shared in the first device group based on the number of the at least one shared playback device;
[0033] The operation sequence range is shared with the shared audio device, and the shared audio device is triggered, and the operation sequence attribute of each shared playback device is set to a corresponding target operation sequence in the first device group based on the operation sequence range.
[0034] Optionally, the processing module is further used for:
[0035] Creating a connection-based synchronous data stream, and after sending the target audio data to be shared to the shared playback device through the synchronous data stream, disconnecting the synchronous data stream between the shared playback device and the shared playback device;
[0036] The sending module is also used for:
[0037] Send a recovery instruction to the shared playback device, wherein the recovery instruction is used to instruct the shared playback device to restore the group identity resolution key setting to the second group identity resolution key, and restore the operation sequence attribute to the original operation sequence in the second device group.
[0038] The processing module is also used for:
[0039] After receiving the update completion notification fed back by the shared playback device, the connection with the shared playback device is disconnected.
[0040] On the one hand, an embodiment of the present application provides an audio sharing device, which is applied to a shared audio device, including:
[0041] A second acquisition module, used to acquire a first group of identity resolution keys corresponding to a first device group shared by the audio source device;
[0042] A first setting module is used to set the group identity resolution key of at least one shared playback device in the second device group to the first group identity resolution key, and trigger each shared playback device to broadcast a broadcast data packet carrying a resolvable group identity identifier, so that the audio source device obtains the broadcast data packet broadcast by the shared playback device, and when it is determined that the broadcast data packet carries the resolvable group identity identifier, the shared playback device is added to the first device group and a connection is established with the shared playback device; a connection-based synchronous data stream is created for the shared playback device, and the target audio data to be shared is sent to the shared playback device through the synchronous data stream, and the resolvable group identity identifier is generated based on the first group identity resolution key.
[0043] On the one hand, an embodiment of the present application provides an audio sharing device, which is applied to each shared playback device in the second device group, including:
[0044] A second setting module is configured to receive a setting instruction carrying a first group identity resolution key sent by a shared audio device, set the group identity resolution key to the first group identity resolution key, and disconnect the connection with the shared audio device, wherein the first group identity resolution key is shared by the audio source device to the shared audio device, and the first group identity resolution key corresponds to the first device group;
[0045] a broadcast module, configured to generate a resolvable group identity identifier based on the first group identity resolution key, and broadcast a broadcast data packet carrying the resolvable group identity identifier;
[0046] A receiving module is used to receive target audio data shared by the audio source device via a connection-based synchronous data stream, wherein the connection-based synchronous data stream is created after the audio source device adds the shared playback device to the first device group and establishes a connection with the shared playback device, wherein when the audio source device receives the broadcast data packet and determines that the broadcast data packet carries the resolvable group identity identifier, the shared playback device is added to the first device group.
[0047] Optionally, the broadcast module is specifically used for:
[0048] Generate a hash value to be verified based on the random number and the first group of identity resolution keys;
[0049] The random number and the hash value to be verified are encapsulated into the resolvable group identity identifier.
[0050] Optionally, the setting instruction further includes a target operation sequence of the shared playback device in the first device group, and the target operation sequence is determined by the shared audio device based on the operation sequence range shared by the audio source device;
[0051] The second setting module is also used for:
[0052] After setting the group identity resolution key to the first group identity resolution key, the operation order attribute is set to the target operation order.
[0053] Optionally, the receiving module is further used for:
[0054] disconnecting the synchronous data flow between the audio source device and the audio source device;
[0055] Receive a recovery instruction sent by the audio source device, and based on the recovery instruction, restore the group identity resolution key to the second group identity resolution key corresponding to the second device group, and restore the operation sequence attributes of the shared playback device to the original operation sequence in the second device group.
[0056] On the one hand, an embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned image processing method when executing the program.
[0057] On the one hand, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program executable by a computer device. When the program is run on the computer device, the computer device executes the steps of the above-mentioned image processing method.
[0058] In an embodiment of the present application, the audio source device shares the first group identity resolution key corresponding to the first device group with the shared audio device, and the shared audio device sets the group identity resolution key of each shared playback device to the first group identity resolution key, so that each shared playback device joins the first device group based on the first group identity resolution key, and establishes a connection-based synchronous data stream with the audio source device, so that the shared playback device obtains the ability to control the audio source device and the ability to send data to the audio source device, thereby improving the effect and versatility of audio sharing. Secondly, compared with broadcast stream sharing, when using a connection-based synchronous data stream for audio data sharing, the delay can be effectively reduced, and good sound quality can be obtained, thereby effectively improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0060] Figure 1 A schematic diagram of a system architecture provided in an embodiment of the present application;
[0061] Figure 2 A flowchart of an audio sharing method provided in an embodiment of the present application;
[0062] Figure 3 A schematic diagram of the format of an RSI provided in an embodiment of the present application;
[0063] Figure 4 A schematic diagram of a process for restoring settings of a shared playback device provided in an embodiment of the present application;
[0064] Figure 5 A flowchart of an audio sharing method provided in an embodiment of the present application;
[0065] Figure 6 A schematic diagram of a process for restoring settings of a shared playback device provided in an embodiment of the present application;
[0066] Figure 7 A schematic diagram of the structure of an audio sharing device provided in an embodiment of the present application;
[0067] Figure 8 A schematic diagram of the structure of an audio sharing device provided in an embodiment of the present application;
[0068] Fig. 9 A schematic diagram of the structure of an audio sharing device provided in an embodiment of the present application;
[0069] Fig.10 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0070] In order to make the purpose, technical solution and beneficial effects of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0071] For ease of understanding, the terms involved in the embodiments of the present invention are explained below.
[0072] The design concept of the embodiments of the present application is introduced below.
[0073] BIS: Broadcast Isochronous Stream, a data stream synchronized by broadcast. The broadcast source broadcasts the data stream through broadcasting, and the receiver synchronizes the data stream by scanning the broadcast and synchronizing to the broadcast. It is a connectionless data synchronization method.
[0074] BIS Sharing: Broadcast stream sharing refers to a method in which one device transmits the broadcast data it has searched to another device based on a connection, so that the other device does not need to search for the broadcast again and can directly synchronize to the broadcast source. For example, mobile phone A and headset B are now connected, and broadcast source C is broadcasting. At this time, mobile phone A can search for broadcast source C and pass its broadcast parameters to headset B. Then, headset B can directly synchronize to the broadcast data of broadcast source C through the parameters and establish BIS. This method can prevent the headset from consuming a lot of power in searching for broadcasts, and it can also switch broadcast sources.
[0075] CIS: Connected Isochronous Stream, which is based on connection-based synchronous data stream. It establishes synchronous data stream based on the connection of devices, with lower latency, better sound quality and better controllability of the headset over the sound source.
[0076] CSIP: Coordinated Set Identification Profile. This profile is used to identify multiple devices as a device group (Group) rather than individual devices. For example, a pair of headphones normally contains two devices, the left ear and the right ear. Without CSIP, according to the Low Energy (LE) connection method, two devices with different addresses will be considered as two independent devices, while CSIP will identify them as a Group. Although this Group contains two devices, it is a whole for the user, and the user is only connected to a pair of headphones.
[0077] SIRK: Set Identity Resolving Key, used to generate and resolve a resolvable set identifier (RSI) carried in a broadcast. Devices with the same SIRK are considered as a whole, i.e., a Group.
[0078] RSI: A resolvable group identifier, which is a random number calculated by SIRK and carried in the RSI AD Type field in the broadcast data. RSI includes a PRAND part and a hash part, where the PRAND part is a random number and the hash part is a hash value calculated by SIRK and the random number.
[0079] Coordinated Set Size: The number of devices is a value exposed by the headset, which is used to inform the connected mobile phone of the number of devices in the Group where the headset is located. The value starts from 0x02 and cannot be 0 or 1.
[0080] Rank: A field indicating the order in which the mobile phone operates on each device in the group. It is set by the mobile phone. Each device in the group has a unique rank value ranging from 0x01 to Coordinated Set Size.
[0081] refer to Figure 1 , which is a system architecture diagram applicable to an embodiment of the present application, the system architecture at least includes an audio source device 101, at least one original playback device 102 connected to the audio source device 101, a shared audio device 103, and at least one shared playback device 104 connected to the shared audio device 103, wherein the number of shared audio devices 103 can be one or more; at least one original playback device 102 is located in the first device group, corresponding to the same first group identity resolution key; at least one shared playback device 104 is located in the second device group, corresponding to the same second group identity resolution key.
[0082] The audio source device 101 and the shared audio device 103 can be audio devices such as smart phones, tablet computers, laptops, smart home appliances, smart voice interaction devices, smart car devices, etc.; the original playback device 102 and the shared playback device 104 can be playback devices such as headphones and speakers.
[0083] During the audio sharing process, the audio source device 101 determines the operation sequence range to be shared in the first device group based on the number of at least one shared playback device 104. The audio source device 101 shares the first group identity resolution key and the operation sequence range with the shared audio device 103, and the shared audio device 103 updates the group identity resolution key of at least one shared playback device 104 from the second group identity resolution key to the first group identity resolution key. At the same time, based on the operation sequence range, the operation sequence attribute of each shared playback device 104 is set to the corresponding target operation sequence in the first device group. Then, the connection with at least one shared playback device 104 is disconnected.
[0084] For each shared playback device 104, the shared playback device 104 generates a resolvable group identity identifier based on the first group identity resolution key, and broadcasts a broadcast data packet carrying the resolvable group identity identifier. After the audio source device 101 scans and obtains the broadcast data packet and parses the broadcast data packet to obtain the resolvable group identity identifier, if it is determined that the resolvable group identity identifier is generated based on the first group identity resolution key, the shared playback device 104 is added to the first device group and a connection is established with the shared playback device 104. The audio source device 101 creates a connection-based synchronous data stream for the shared playback device 104, and sends the target audio data to be shared to the shared playback device 104 through the synchronous data stream.
[0085] based on Figure 1 The system architecture diagram shown in the figure, the present application embodiment provides a process of an audio sharing method, such as Figure 2 As shown, the process of the method is interactively executed by the audio source device, the shared audio device and the shared playback device, and includes the following steps:
[0086] Step S201: The audio source device shares a first group of identity resolution keys corresponding to a first device group with a shared audio device.
[0087] Specifically, the number of shared audio devices can be one or more. The first device group includes at least one original playback device connected to the audio source device, and the audio source device can establish a connection with the original playback device via Bluetooth. Before audio sharing, it is necessary to configure the number of devices in the first device group (Coordinated Set Size), the operation order of each device in the first device group (Rank), and the first group identity resolution key of each device.
[0088] For example, the audio source device is set to mobile phone A, and at least one original playback device is earphone 1 and earphone 2. At this time, the first device group corresponding to mobile phone A includes two original playback devices, that is, the number of devices in the first device group is set to 2, the operation order of earphone 1 in the first device group is set to 0x01, the operation order of earphone 2 in the first device group is set to 0x02, and the group identity resolution keys corresponding to earphone 1 and earphone 2 are both set to the first group identity resolution key.
[0089] In some embodiments, the first set of identity resolution keys is obtained from a broadcast data packet broadcast by the first original playback device when the audio source device establishes a connection with the first original playback device.
[0090] Specifically, before audio sharing, the audio source device establishes a connection with the first original playback device, and then reads the first set of identity resolution keys from the broadcast data packet broadcast by the first original playback device through GATT. In addition, the audio source device can also read the parameter "Coordinated Set Size" from the broadcast data packet to determine the number of devices that need to be connected in the first device group. If the number of devices is greater than 1, it means that there are other original playback devices in the first device group that need to be connected, so continue to search for related broadcast data packets.
[0091] Other original playback devices in the first device group use the first group identity resolution key to generate a resolvable group identity identifier (RSI), and carry the RSI in the broadcast data packet. When the audio source device searches for a broadcast data packet broadcast by another original playback device, the RSI in the broadcast data packet is parsed. When the RSI is generated based on the first group identity resolution key, the original playback device is determined to be a device in the first device group, and a connection is established with the playback device. When the RSI is not generated based on the first group identity resolution key, it is determined that the original playback device is not a device in the first device group, and then the search broadcast continues until the first device group is established (that is, the number of connected devices in the first device group is the number of devices read) or timeout.
[0092] In some embodiments, the first group of identity resolution keys may be shared by scanning a QR code, downloading from the cloud, etc. Taking scanning a QR code as an example, the audio source device generates a sharing QR code for a shared audio device, wherein the sharing QR code is at least associated with the first group of identity resolution keys. When the shared audio device scans the sharing QR code displayed by the audio source device, the first group of identity resolution keys may be obtained accordingly.
[0093] Step S202: The shared audio device sets the group identity resolution key of each shared playback device in the second device group as the first group identity resolution key.
[0094] Specifically, before audio sharing, each shared playback device in the second device group is connected to the shared audio device respectively, and the shared audio device can establish a connection with the shared playback device via Bluetooth. The shared audio device corresponds to the second device group, and the second device group corresponds to a second group identity resolution key. During the audio sharing process, after the shared audio device obtains the first group identity resolution key corresponding to the first device group, it sends a setting instruction carrying the first group identity resolution key to each shared playback device, and each shared playback device updates the group identity resolution key from the second group identity resolution key to the first group identity resolution key, wherein the number of shared playback devices can be one or more.
[0095] In some embodiments, in addition to sharing the first group of identity resolution keys with the shared audio devices, the audio source device also determines the operation sequence range to be shared in the first device group based on the number of shared playback devices in the second device group, and then shares the operation sequence range with the shared audio devices. The shared audio devices set the operation sequence attribute of each shared playback device to the corresponding target operation sequence in the first device group based on the operation sequence range.
[0096] Specifically, the operation sequence range may be shared by scanning a QR code, downloading from the cloud, etc. The first set of identity resolution keys and the operation sequence range may be shared with the shared audio device at the same time, or may be shared with the shared audio device at different time points.
[0097] Taking scanning a QR code as an example, the audio source device generates a sharing QR code for a shared audio device, wherein the sharing QR code is associated with the first set of identity resolution keys and the operation sequence range. When the shared audio device scans the sharing QR code displayed by the audio source device, the first set of identity resolution keys and the operation sequence range can be obtained accordingly.
[0098] It should be noted that in order to avoid operation conflicts between devices in the same device group, in the embodiment of the present application, the operation sequence range of the audio source device shared with different shared audio devices is different, and accordingly, the sharing QR codes generated for different shared audio devices are also different.
[0099] In some embodiments, before audio sharing, the operation sequence attribute of each shared playback device in the second device group is the original operation sequence in the second device group. During audio sharing, after the shared audio device obtains the operation sequence range shared by the audio source device, the operation sequence attribute of each shared playback device is updated from the original operation sequence to the corresponding target operation sequence in the first device group based on the operation sequence range.
[0100] Specifically, the target operation order of each shared playback device in the first device group is first determined based on the operation order range shared by the audio source device, and then a setting instruction carrying the corresponding target operation order is sent to each shared playback device, so that each shared playback device sets the operation order attribute to the corresponding target operation order. The target operation order indicates the operation priority of the shared playback device in the first device group. When two shared playback devices operate the audio source device at the same time, the audio source device responds preferentially to the operation instruction of the shared playback device with a smaller target operation order.
[0101] Since the first device group originally includes at least one original playback device, each original playback device corresponds to an operation sequence in the first device group. Therefore, each operation sequence in the shared operation sequence range is greater than the operation sequence corresponding to the original playback device, and thus the target operation sequence of each shared playback device is greater than the operation sequence corresponding to the original playback device. In addition, the operation sequence of each device in the first device group is different.
[0102] In some embodiments, the target operation sequence and the first group of identity resolution keys may be sent to the shared playback device via the same setting instruction, or may be sent to the shared playback device via different setting instructions.
[0103] In addition, when the shared audio device determines the target operation order of each shared playback device in the first device group based on the operation order range, it can select a value from the operation order range as the corresponding target operation order based on the master-slave relationship of each shared playback device. For example, if the operation order range is set to [3,4], the target operation order of the shared master playback device is set to 3, and the target operation order of the shared slave playback device is set to 4. When the shared master playback device and the shared slave playback device operate the audio source device at the same time, the audio source device responds to the operation instruction of the shared master playback device first.
[0104] The shared audio device can also randomly select values from the operation sequence range as the target operation sequence of each shared playback device. For example, if the operation sequence range is set to [3, 4], 3 is randomly selected from the operation sequence range as the target operation sequence of one shared playback device, and 4 is selected as the target operation sequence of another shared playback device. Of course, in the embodiments of the present application, other methods can also be used to determine the target operation sequence of each shared playback device, and this application does not make specific limitations on this.
[0105] The following describes the sharing process of the first set of identity resolution keys and the operation sequence range in conjunction with a specific implementation scenario. It is assumed that the first device group corresponding to mobile phone A includes two earphones, earphone 1 and earphone 2, which correspond to the first set of identity resolution keys. The second device group corresponding to mobile phone B includes two earphones, earphone 3 and earphone 4, which correspond to the second set of identity resolution keys.
[0106] When mobile phone A is used as an audio source device to share audio, it sets the number of devices to be shared to 2. At this time, the number of devices in the first device group is updated to 4. Since the operation sequence range [1,2] in the first device group has been occupied by earphones 1 and 2, the operation sequence range to be shared is set to [3,4]. Mobile phone A generates and displays a sharing QR code based on the first group of identity resolution keys and the operation sequence range to be shared. Mobile phone B scans the sharing QR code displayed by mobile phone A to obtain the first group of identity resolution keys and the operation sequence range to be shared. Then, the group identity resolution key of earphone 3 is updated from the second group of identity resolution keys to the first group of identity resolution keys, and the target operation sequence of earphone 3 in the first device group is set to 3; the group identity resolution key of earphone 4 is updated from the second group of identity resolution keys to the first group of identity resolution keys, and the target operation sequence of earphone 4 in the first device group is set to 4.
[0107] Step S203: The shared playback device generates a resolvable group identity identifier based on the first group identity resolution key, and broadcasts a broadcast data packet carrying the resolvable group identity identifier.
[0108] Specifically, after the group identity resolution key of the shared playback device is updated to the first group identity resolution key, and the operation sequence attribute setting of the shared playback device is updated to the target operation sequence, the shared playback device sends a feedback message to the shared audio device and disconnects from the shared audio device.
[0109] In some embodiments, the shared playback device generates a hash value to be verified based on the random number and the first group identity resolution key, and then encapsulates the random number and the hash value to be verified into a resolvable group identity identifier.
[0110] Specifically, a hash operation is performed on the random number and the first group identity resolution key to obtain a hash value to be verified. After the random number and the hash value to be verified are encapsulated into a resolvable group identity identifier, the resolvable group identity identifier is added to the RSI AD Type field in the broadcast data.
[0111] For example, the format of the RSI AD Type field is Figure 3 As shown, it includes a hash part and a PRAND part, wherein the hash part is the hash value to be verified, and the PRAND part includes a random number.
[0112] In an embodiment of the present application, the first group of identity resolution keys is encapsulated into RSI for dissemination to encrypt the first group of identity resolution keys, thereby effectively avoiding leakage of the first group of identity resolution keys and improving data security.
[0113] Step S204: the audio source device obtains the broadcast data packet broadcast by the shared playback device.
[0114] Specifically, after updating the number of devices in the first device group, the audio source device continues to start scanning to obtain broadcast data packets broadcast by the shared playback device.
[0115] Step S205: If the broadcast data packet carries a resolvable group identity identifier generated based on the first group identity resolution key, the audio source device adds the shared playback device to the first device group.
[0116] Step S206: the audio source device establishes a connection with the shared playback device.
[0117] Specifically, the audio source device can establish a connection with the shared playback device via Bluetooth.
[0118] In some embodiments, the audio source device parses the broadcast data packet to obtain a group identity identifier to be verified, wherein the group identity identifier to be verified includes a random number and a hash value to be verified. Then, based on the random number and the first group identity resolution key, a target hash value is generated. If the hash value to be verified is consistent with the target hash value, it is determined that the group identity identifier to be verified is a resolvable group identity identifier generated based on the first group identity resolution key.
[0119] Specifically, since the audio source device has established a connection with at least one original playback device before audio sharing, the audio source device has already known the first set of identity resolution keys. The audio source device parses the broadcast data packet to obtain the random number of the PRAND part in the RSI AD Type field and the hash value to be verified of the hash part. The audio source device performs a hash operation on the random number and the first set of identity resolution keys to obtain a target hash value, and then compares the hash value to be verified with the target hash value.
[0120] If the hash value to be verified is consistent with the target hash value, it means that the hash value to be verified is also generated based on the random number of the PRAND part and the first group of identity resolution keys, and then it can be determined that the broadcast data packet contains the first group of identity resolution keys.
[0121] If the hash value to be verified is inconsistent with the target hash value, it means that the hash value to be verified is not generated based on the random number of the PRAND part and the first group of identity resolution keys, and it can be determined that the first group of identity resolution keys is not included in the broadcast data packet.
[0122] When the broadcast data packet contains the first group of identity resolution keys, it means that the shared playback device is a new device in the first device group, so the shared playback device is added to the first device group and a connection with the shared playback device is established. At this time, for the audio source device, all the original audio playback devices in the first device group and all the newly added shared playback devices are a whole.
[0123] By parsing the RSI to determine whether the broadcast data packet contains the first group of identity resolution keys, direct exposure of the first group of identity resolution keys is avoided, thereby improving the security of identity resolution key transmission.
[0124] Step S207: the audio source device creates a connection-based synchronous data stream for the shared playback device.
[0125] Step S208: the audio source device sends the target audio data to be shared to the shared playback device through a synchronous data stream.
[0126] Specifically, after a connection-based synchronous data stream is established between the audio source device and the shared playback device, the shared playback device obtains the function of performing audio operations on the audio source device, where the audio operations include but are not limited to playing audio, pausing audio, switching audio, adjusting volume, etc. Moreover, users can also make calls through the shared playback device.
[0127] In an embodiment of the present application, the audio source device shares the first group identity resolution key corresponding to the first device group with the shared audio device, and the shared audio device sets the group identity resolution key of each shared playback device to the first group identity resolution key, so that each shared playback device joins the first device group based on the first group identity resolution key, and establishes a connection-based synchronous data stream with the audio source device, so that the shared playback device obtains the ability to control the audio source device and the ability to send data to the audio source device, thereby improving the effect and versatility of audio sharing. Secondly, compared with broadcast stream sharing, when using a connection-based synchronous data stream for audio data sharing, the delay can be effectively reduced, and good sound quality can be obtained, thereby effectively improving the user experience.
[0128] In some embodiments, after the sharing ends, the shared playback device will restore the original settings. The specific process is as follows: Figure 4 As shown, the following steps are included:
[0129] Step S401: the audio source device disconnects the synchronous data stream between the audio source device and the shared playback device.
[0130] Step S402: the audio source device sends a resume instruction to the shared playback device.
[0131] Specifically, when the audio source device shares audio data with multiple shared playback devices, when the sharing ends, the audio source device needs to disconnect the synchronous data stream with each shared playback device respectively and send a recovery instruction to each shared playback device.
[0132] Step S403: The shared playback device restores the group identity resolution key to the second group identity resolution key based on the restoration instruction, and restores the operation sequence attribute to the original operation sequence in the second device group.
[0133] Step S404: the shared playback device feeds back an update completion notification to the audio source device.
[0134] Step S405: the audio source device disconnects from the shared playback device.
[0135] Specifically, the audio source device also restores the parameter of the number of devices in the first device group to the number of devices before audio sharing.
[0136] Step S406: the shared playback device establishes a connection with the shared audio device.
[0137] Specifically, the shared playback device generates a hash value to be verified based on the second group identity resolution key and a random number. Then the random number and the hash value to be verified are encapsulated into a resolvable group identity identifier. The resolvable group identity identifier and the number of devices in the second device group are added to the broadcast data to obtain a broadcast data packet and broadcast the broadcast data packet externally.
[0138] When the shared audio device scans and obtains a broadcast data packet broadcast by a shared playback device, it establishes a connection with the shared playback device and reads the second set of identity resolution keys from the broadcast data packet through GATT. In addition, the shared audio device can also read the number of devices in the second device group from the broadcast data packet. If the number of devices is greater than 1, it means that there are other shared playback devices in the second device group that need to be connected, so continue to search for related broadcast data packets.
[0139] When the shared audio device searches for a broadcast data packet broadcast by another shared playback device, it obtains the group identity identifier to be verified from the broadcast data packet. Then, based on the random number in the group identity identifier to be verified and the second group identity resolution key that has been obtained, a target hash value is generated. When the hash value to be verified in the group identity identifier to be verified is consistent with the target hash value, it is determined that the group identity identifier to be verified is a resolvable group identity identifier generated based on the second group identity resolution key, that is, the broadcast data packet contains the second group identity resolution key, further determining that the shared playback device is a playback device in the second device, and establishing a connection with the shared playback device. When the second group identity resolution key is not contained in the broadcast data packet, it means that the shared playback device is not a playback device in the second device, and then the search broadcast continues until the second device is established or times out.
[0140] In an embodiment of the present application, after the sharing ends, each shared playback device restores its original settings, and each shared playback device reconnects with the shared audio device, thereby avoiding the audio sharing from affecting the original functions of the shared audio device and each shared playback device.
[0141] In order to better explain the embodiment of the present application, the process of an audio sharing method provided by the embodiment of the present application is introduced below in combination with a specific implementation scenario. Set the audio source device to mobile phone A, and the shared audio device to mobile phone B. The first device group corresponding to mobile phone A includes two original playback devices, namely earphone 1 and earphone 2. The number of devices in the first device group is 2. The operation order of earphone 1 in the first device group is 0x01, and the operation order of earphone 2 in the first device group is 0x02. Earphone 1 and earphone 2 correspond to the first group of identity resolution keys (also referred to as the first SIRK). The second device group corresponding to mobile phone B includes two shared playback devices, namely earphone 3 and earphone 4. The number of devices in the second device group is 2. The operation order of earphone 3 in the second device group is 0x01, and the operation order of earphone 4 in the second device group is 0x02. Earphone 3 and earphone 4 correspond to the second group of identity resolution keys (also referred to as the second SIRK). Since earphone 1 and earphone 2 perform the same steps in the process of the audio sharing method, and earphone 3 and earphone 4 perform the same steps in the process of the audio sharing method, the specific process of the audio sharing method is introduced below by taking mobile phone A, mobile phone B, earphone 1 and earphone 3 as examples. Figure 5 As shown, it includes the following steps:
[0142] Step S501 : mobile phone A establishes an ACL (Asynchronous Connectionless) connection with headset 1 .
[0143] Step S502 : mobile phone B establishes an ACL connection with headset 3 .
[0144] It should be noted that there is no particular order in which step S501 and step S502 are executed.
[0145] Step S503: Mobile phone A shares the first set of identity resolution keys and operation sequence range with mobile phone B.
[0146] Among them, mobile phone A sets the number of devices that need to be added to the first device group to 2, namely earphone 3 and earphone 4, then mobile phone A updates the number of devices of the first device to 4, and then sets the operation sequence range to be shared to [3,4]. Mobile phone A shares the first group of identity resolution keys and operation sequence range with mobile phone B in the form of a QR code.
[0147] Step S504: Mobile phone B determines that the target operation order rank of headset 3 in the first device group is 0x03 based on the operation order range.
[0148] Similarly, mobile phone B determines that the target operation order rank of headset 4 in the first device group is 0x04 based on the operation order range.
[0149] Step S505 , mobile phone B sends a setting instruction carrying the first set of identity resolution keys and the target operation order (rank=0x03) to headset 3 .
[0150] Similarly, mobile phone B sends a setting instruction carrying the first set of identity resolution keys and the target operation order (rank=0x04) to headset 4.
[0151] Step S506: the headset 3 updates the operation sequence to 0x03, and updates the group identity resolution key to the first group identity resolution key.
[0152] Likewise, headset 4 updates the operation sequence to 0x04 and the group identity resolution key to the first group identity resolution key.
[0153] Step S507: Headset 3 sends an update completion message to mobile phone B.
[0154] Similarly, earphone 4 sends an update completion message to mobile phone B.
[0155] Step S508 : Mobile phone B disconnects the ACL connection with headset 3 .
[0156] Likewise, mobile phone B disconnects the ACL connection with headset 4 .
[0157] Step S509: The headset 3 generates a hash value to be verified based on the random number and the first group of identity resolution keys.
[0158] Step S510: the earphone 3 encapsulates the random number and the hash value to be verified into RSI.
[0159] Step S511: the headset 3 adds the RSI to the broadcast data to obtain a broadcast data packet.
[0160] Step S512: mobile phone A obtains the broadcast data packet broadcast by headset 3.
[0161] Step S513: Mobile phone A obtains RSI from the broadcast data packet, and generates a target hash value based on the random number in the RSI and the first set of identity resolution keys.
[0162] Step S514: If the hash value to be verified is consistent with the target hash value, mobile phone A adds headset 3 to the first device group.
[0163] Step S515 : mobile phone A establishes an ACL connection with headset 3 .
[0164] Step S516: Mobile phone A and headset 3 establish a connection-based synchronous data stream.
[0165] Step S517: Mobile phone A sends the target audio data to earphone 3 via a connection-based synchronous data stream.
[0166] It should be noted that the headset 4 can also join the first device group using the same process from step S509 to step S519, and obtain the target audio data shared by the mobile phone A through a synchronous data stream based on the connection, which will not be repeated here.
[0167] Step S518: Mobile phone A and headset 1 establish a connection-based synchronous data stream (CIS).
[0168] Step S519: Mobile phone A sends the target audio data to earphone 1 via a connection-based synchronous data stream.
[0169] Similarly, mobile phone A establishes a connection-based synchronous data stream with earphone 2. Through the connection-based synchronous data stream, the target audio data is sent to earphone 2. In addition, step S516 and step S518 are executed in no particular order.
[0170] After introducing the process of audio sharing, the following describes the process of restoring relevant settings of mobile phone B and headset 3 after audio sharing ends. Figure 6 As shown, the following steps are included:
[0171] Step S601: Mobile phone A disconnects the connection-based synchronous data stream with headset 3.
[0172] In addition, mobile phone A restores the number of devices of the first device to 2.
[0173] Step S602: Mobile phone A sends a recovery instruction to headset 3.
[0174] Step S603: The headset 3 restores the group identity resolution key to the second group identity resolution key based on the restoration instruction, and restores the operation sequence to 0x01.
[0175] Step S604: the headset 3 sends an update completion notification to the mobile phone A.
[0176] Step S605 : Mobile phone A disconnects the ACL connection with headset 3 .
[0177] Step S606: The headset 3 generates a hash value to be verified based on the random number and the second group of identity resolution keys.
[0178] Step S606: the earphone 3 encapsulates the random number and the hash value to be verified into RSI.
[0179] Step S607: the headset 3 adds the RSI to the broadcast data to obtain a broadcast data packet.
[0180] Step S608 : mobile phone B obtains the broadcast data packet broadcast by headset 3 .
[0181] Step S609: Mobile phone B parses the broadcast data packet to obtain RSI.
[0182] Step S610: Mobile phone B generates a target hash value based on the random number in the RSI and the second set of identity resolution keys.
[0183] Step S611: If the hash value to be verified is consistent with the target hash value, mobile phone B establishes an ACL connection with headset 3.
[0184] It should be noted that the headset 4 can also use the same process from step S601 to step S611 to restore the original settings and re-establish the ACL connection with the mobile phone B, which will not be repeated here.
[0185] In an embodiment of the present application, the audio source device shares the first group identity resolution key corresponding to the first device group with the shared audio device, and the shared audio device sets the group identity resolution key of each shared playback device to the first group identity resolution key, so that each shared playback device joins the first device group based on the first group identity resolution key, and establishes a connection-based synchronous data stream with the audio source device, so that the shared playback device obtains the ability to control the audio source device and the ability to send data to the audio source device, thereby improving the effect and versatility of audio sharing. Secondly, compared with broadcast stream sharing, when using a connection-based synchronous data stream for audio data sharing, the delay can be effectively reduced, and good sound quality can be obtained, thereby effectively improving the user experience.
[0186] Based on the same technical concept, the present application embodiment provides a structural diagram of an audio sharing device, which is applied to an audio source device, such as Figure 7 As shown, the device 700 includes:
[0187] The sharing module 701 is used to share the first group identity resolution key corresponding to the first device group with the shared audio device, and trigger the shared audio device to set the group identity resolution key of at least one shared playback device in the second device group to the first group identity resolution key;
[0188] A first acquisition module 702 is used to acquire, for each shared playback device, a broadcast data packet broadcasted by the shared playback device;
[0189] The processing module 703 is configured to add the shared playback device to the first device group and establish a connection with the shared playback device if the broadcast data packet carries a resolvable group identity identifier generated based on the first group identity resolution key;
[0190] The sending module 704 is used to create a connection-based synchronous data stream for the shared playback device, and send the target audio data to be shared to the shared playback device through the synchronous data stream.
[0191] Optionally, the first device group includes at least one original playback device connected to the audio source device, and the first group of identity resolution keys is obtained from a broadcast data packet broadcast by the first original playback device when the audio source device establishes a connection with the first original playback device.
[0192] Optionally, the shared audio device corresponds to a second device group, and the second device group corresponds to a second group identity resolution key;
[0193] The sharing module 701 is specifically used for:
[0194] The shared audio device is triggered to update the group identity resolution key of at least one shared playback device from the second group identity resolution key to the first group identity resolution key.
[0195] Optionally, the processing module 703 is further used for:
[0196] If the broadcast data packet carries a resolvable group identity identifier generated based on the first group identity resolution key, the shared playback device is added to the first device group, and before establishing a connection with the shared playback device, the broadcast data packet is parsed to obtain a group identity identifier to be verified, wherein the group identity identifier to be verified includes a random number and a hash value to be verified;
[0197] generating a target hash value based on the random number and the first set of identity resolution keys;
[0198] If the hash value to be verified is consistent with the target hash value, it is determined that the group identity identifier to be verified is a resolvable group identity identifier generated based on the first group identity resolution key.
[0199] Optionally, the sharing module 701 is further used for:
[0200] Determining a range of operation sequences to be shared in the first device group based on the number of the at least one shared playback device;
[0201] The operation sequence range is shared with the shared audio device, and the shared audio device is triggered, and the operation sequence attribute of each shared playback device is set to a corresponding target operation sequence in the first device group based on the operation sequence range.
[0202] Optionally, the processing module 703 is further used for:
[0203] Creating a connection-based synchronous data stream, and after sending the target audio data to be shared to the shared playback device through the synchronous data stream, disconnecting the synchronous data stream between the shared playback device and the shared playback device;
[0204] The sending module 704 is also used for:
[0205] Send a recovery instruction to the shared playback device, wherein the recovery instruction is used to instruct the shared playback device to restore the group identity resolution key setting to the second group identity resolution key, and restore the operation sequence attribute to the original operation sequence in the second device group.
[0206] The processing module 703 is further used for:
[0207] After receiving the update completion notification fed back by the shared playback device, the connection with the shared playback device is disconnected.
[0208] In an embodiment of the present application, the audio source device shares the first group identity resolution key corresponding to the first device group with the shared audio device, and the shared audio device sets the group identity resolution key of each shared playback device to the first group identity resolution key, so that each shared playback device joins the first device group based on the first group identity resolution key, and establishes a connection-based synchronous data stream with the audio source device, so that the shared playback device obtains the ability to control the audio source device and the ability to send data to the audio source device, thereby improving the effect and versatility of audio sharing. Secondly, compared with broadcast stream sharing, when using a connection-based synchronous data stream for audio data sharing, the delay can be effectively reduced, and good sound quality can be obtained, thereby effectively improving the user experience.
[0209] Based on the same technical concept, the present application embodiment provides a structural diagram of an audio sharing device, which is applied to a shared audio device, such as Figure 8 As shown, the device 800 includes:
[0210] The second acquisition module 801 is used to acquire a first group of identity resolution keys corresponding to a first device group shared by an audio source device;
[0211] The first setting module 802 is used to set the group identity resolution key of at least one shared playback device in the second device group to the first group identity resolution key, and trigger each shared playback device to broadcast a broadcast data packet carrying a resolvable group identity identifier, so that the audio source device obtains the broadcast data packet broadcast by the shared playback device, and when it is determined that the broadcast data packet carries the resolvable group identity identifier, the shared playback device is added to the first device group and a connection is established with the shared playback device; a connection-based synchronous data stream is created for the shared playback device, and the target audio data to be shared is sent to the shared playback device through the synchronous data stream, and the resolvable group identity identifier is generated based on the first group identity resolution key.
[0212] In an embodiment of the present application, the audio source device shares the first group identity resolution key corresponding to the first device group with the shared audio device, and the shared audio device sets the group identity resolution key of each shared playback device to the first group identity resolution key, so that each shared playback device joins the first device group based on the first group identity resolution key, and establishes a connection-based synchronous data stream with the audio source device, so that the shared playback device obtains the ability to control the audio source device and the ability to send data to the audio source device, thereby improving the effect and versatility of audio sharing. Secondly, compared with broadcast stream sharing, when using a connection-based synchronous data stream for audio data sharing, the delay can be effectively reduced, and good sound quality can be obtained, thereby effectively improving the user experience.
[0213] Based on the same technical concept, the present application embodiment provides a structural diagram of an audio sharing device, which is applied to each shared playback device in the second device group, such as Fig. 9 As shown, the device 900 includes:
[0214] A second setting module 901 is configured to receive a setting instruction carrying a first group identity resolution key sent by a shared audio device, set the group identity resolution key to the first group identity resolution key, and disconnect the connection with the shared audio device, wherein the first group identity resolution key is shared by the audio source device to the shared audio device, and the first group identity resolution key corresponds to the first device group;
[0215] A broadcast module 902, configured to generate a resolvable group identity identifier based on the first group identity resolution key, and broadcast a broadcast data packet carrying the resolvable group identity identifier;
[0216] The receiving module 903 is used to receive the target audio data shared by the audio source device through a connection-based synchronous data stream, wherein the connection-based synchronous data stream is created after the audio source device adds the shared playback device to the first device group and establishes a connection with the shared playback device, wherein when the audio source device receives the broadcast data packet and determines that the broadcast data packet carries the resolvable group identity identifier, the shared playback device is added to the first device group.
[0217] Optionally, the broadcast module 902 is specifically configured to:
[0218] Generate a hash value to be verified based on the random number and the first group of identity resolution keys;
[0219] The random number and the hash value to be verified are encapsulated into the resolvable group identity identifier.
[0220] Optionally, the setting instruction further includes a target operation sequence of the shared playback device in the first device group, and the target operation sequence is determined by the shared audio device based on the operation sequence range shared by the audio source device;
[0221] The second setting module 901 is further used for:
[0222] After setting the group identity resolution key to the first group identity resolution key, the operation order attribute is set to the target operation order.
[0223] Optionally, the receiving module 903 is further used for:
[0224] disconnecting the synchronous data flow between the audio source device and the audio source device;
[0225] Receive a recovery instruction sent by the audio source device, and based on the recovery instruction, restore the group identity resolution key to the second group identity resolution key corresponding to the second device group, and restore the operation sequence attributes of the shared playback device to the original operation sequence in the second device group.
[0226] In an embodiment of the present application, the audio source device shares the first group identity resolution key corresponding to the first device group with the shared audio device, and the shared audio device sets the group identity resolution key of each shared playback device to the first group identity resolution key, so that each shared playback device joins the first device group based on the first group identity resolution key, and establishes a connection-based synchronous data stream with the audio source device, so that the shared playback device obtains the ability to control the audio source device and the ability to send data to the audio source device, thereby improving the effect and versatility of audio sharing. Secondly, compared with broadcast stream sharing, when using a connection-based synchronous data stream for audio data sharing, the delay can be effectively reduced, and good sound quality can be obtained, thereby effectively improving the user experience.
[0227] Based on the same technical concept, the embodiment of the present application provides a computer device, which can be an audio source device, a shared audio device, or a shared playback device. Fig.10 As shown, it includes at least one processor 1001 and a memory 1002 connected to the at least one processor. The specific connection medium between the processor 1001 and the memory 1002 is not limited in the embodiment of the present application. Fig.10 For example, the processor 1001 and the memory 1002 are connected via a bus. The bus can be divided into an address bus, a data bus, a control bus, etc.
[0228] In the embodiment of the present application, the memory 1002 stores instructions that can be executed by at least one processor 1001. The at least one processor 1001 can perform the steps of the above-mentioned audio sharing method by executing the instructions stored in the memory 1002.
[0229] Among them, the processor 1001 is the control center of the computer device, and various interfaces and lines can be used to connect various parts of the computer device, and audio sharing can be achieved by running or executing instructions stored in the memory 1002 and calling data stored in the memory 1002. Optionally, the processor 1001 may include one or more processing units, and the processor 1001 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 1001. In some embodiments, the processor 1001 and the memory 1002 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on separate chips.
[0230] Processor 1001 can be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit (ASIC), a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware processor to be executed, or can be executed by a combination of hardware and software modules in the processor.
[0231] Memory 1002, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs and modules. Memory 1002 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (Random Access Memory, RAM), static random access memory (Static Random Access Memory, SRAM), programmable read-only memory (Programmable Read Only Memory, PROM), read-only memory (Read Only Memory, ROM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), magnetic memory, disk, optical disk, etc. Memory 1002 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer device, but is not limited thereto. The memory 1002 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.
[0232] Based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program that can be executed by a computer device. When the program runs on the computer device, the computer device executes the steps of the above-mentioned audio sharing method.
[0233] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0234] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer device or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0235] These computer program instructions may also be stored in a computer readable memory capable of directing a computer device or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0236] These computer program instructions can also be loaded onto a computer device or other programmable data processing device so that a series of operation steps are executed on the computer device or other programmable device to produce a process implemented by the computer device, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0237] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0238] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. An audio sharing method, characterized in that: Applicable to audio source devices, including: Sharing a first group identity resolution key corresponding to the first device group to a shared audio device, and triggering the shared audio device to set a group identity resolution key of at least one shared playback device in the second device group to the first group identity resolution key; For each shared playback device, obtaining a broadcast data packet broadcasted by the shared playback device; If the broadcast data packet carries a resolvable group identity identifier generated based on the first group identity resolution key, adding the shared playback device to the first device group and establishing a connection with the shared playback device; A connection-based synchronous data stream is created for the shared playback device, and the target audio data to be shared is sent to the shared playback device through the synchronous data stream.
2. The method according to claim 1, characterized in that The first device group includes at least one original playback device connected to the audio source device, and the first group of identity resolution keys is obtained from a broadcast data packet broadcast by the first original playback device when the audio source device establishes a connection with the first original playback device.
3. The method according to claim 1, characterized in that The shared audio device corresponds to a second device group, and the second device group corresponds to a second group identity resolution key; The step of triggering the shared audio device to set the group identity resolution key of at least one shared playback device in the second device group as the first group identity resolution key includes: The shared audio device is triggered to update the group identity resolution key of at least one shared playback device from the second group identity resolution key to the first group identity resolution key.
4. The method according to claim 1, characterized in that If the broadcast data packet carries a resolvable group identity identifier generated based on the first group identity resolution key, before adding the shared playback device to the first device group and establishing a connection with the shared playback device, the method further includes: Parsing the broadcast data packet to obtain a group identity identifier to be verified, wherein the group identity identifier to be verified includes a random number and a hash value to be verified; generating a target hash value based on the random number and the first set of identity resolution keys; If the hash value to be verified is consistent with the target hash value, it is determined that the group identity identifier to be verified is a resolvable group identity identifier generated based on the first group identity resolution key.
5. The method according to claim 3, characterized in that Also includes: Determining a range of operation sequences to be shared in the first device group based on the number of the at least one shared playback device; The operation sequence range is shared with the shared audio device, and the shared audio device is triggered, and the operation sequence attribute of each shared playback device is set to a corresponding target operation sequence in the first device group based on the operation sequence range.
6. The method according to claim 5, characterized in that After creating a connection-based synchronous data stream and sending the target audio data to be shared to the shared playback device through the synchronous data stream, the method further includes: Disconnecting the synchronous data stream between the shared playback device; Sending a restoration instruction to the shared playback device, the restoration instruction is used to instruct the shared playback device to restore the group identity resolution key setting to the second group identity resolution key, and restore the operation sequence attribute to the original operation sequence in the second device group; After receiving the update completion notification fed back by the shared playback device, the connection with the shared playback device is disconnected.
7. An audio sharing method, characterized in that: Applicable to shared audio devices, including: Obtain a first group of identity resolution keys corresponding to a first device group shared by the audio source device; The group identity resolution key of at least one shared playback device in the second device group is set to the first group identity resolution key, and each shared playback device is triggered to broadcast a broadcast data packet carrying a resolvable group identity identifier, so that the audio source device obtains the broadcast data packet broadcast by the shared playback device, and when it is determined that the broadcast data packet carries the resolvable group identity identifier, the shared playback device is added to the first device group and a connection is established with the shared playback device; a connection-based synchronous data stream is created for the shared playback device, and the target audio data to be shared is sent to the shared playback device through the synchronous data stream, and the resolvable group identity identifier is generated based on the first group identity resolution key.
8. An audio sharing method, characterized in that: Applied to each shared playback device in the second device group, including: Receiving a setting instruction carrying a first group identity resolution key sent by a shared audio device, setting the group identity resolution key to the first group identity resolution key, and disconnecting the connection with the shared audio device, wherein the first group identity resolution key is shared by the audio source device to the shared audio device, and the first group identity resolution key corresponds to the first device group; generating a resolvable group identity identifier based on the first group identity resolution key, and broadcasting a broadcast data packet carrying the resolvable group identity identifier; Receive target audio data shared by the audio source device via a connection-based synchronous data stream, wherein the connection-based synchronous data stream is created after the audio source device adds the shared playback device to the first device group and establishes a connection with the shared playback device, wherein when the audio source device receives the broadcast data packet and determines that the broadcast data packet carries the resolvable group identity identifier, the shared playback device is added to the first device group.
9. The method according to claim 8, characterized in that The generating a resolvable group identity identifier based on the first group identity resolution key comprises: Generate a hash value to be verified based on the random number and the first group of identity resolution keys; The random number and the hash value to be verified are encapsulated into the resolvable group identity identifier.
10. The method according to claim 8, characterized in that The setting instruction also includes a target operation sequence of the shared playback device in the first device group, where the target operation sequence is determined by the shared audio device based on the operation sequence range shared by the audio source device; After the group identity resolution key is set as the first group identity resolution key, the method further includes: Set the Operation Order property to the target operation order.
11. The method according to claim 8, characterized in that After receiving the target audio data shared by the audio source device through the connection-based synchronous data stream, the method further includes: disconnecting the synchronous data flow between the audio source device and the audio source device; Receive a recovery instruction sent by the audio source device, and based on the recovery instruction, restore the group identity resolution key to the second group identity resolution key corresponding to the second device group, and restore the operation sequence attributes of the shared playback device to the original operation sequence in the second device group.
12. An audio sharing device, characterized in that: Applicable to audio source devices, including: A sharing module, configured to share a first group identity resolution key corresponding to the first device group with a shared audio device, and trigger the shared audio device to set the group identity resolution key of at least one shared playback device in the second device group to the first group identity resolution key; A first acquisition module, configured to acquire, for each shared playback device, a broadcast data packet broadcasted by the shared playback device; a processing module, configured to add the shared playback device to the first device group and establish a connection with the shared playback device if the broadcast data packet carries a resolvable group identity identifier generated based on the first group identity resolution key; The sending module is used to create a connection-based synchronous data stream for the shared playback device, and send the target audio data to be shared to the shared playback device through the synchronous data stream.
13. An audio sharing device, characterized in that: Applicable to shared audio devices, including: A second acquisition module, used to acquire a first group of identity resolution keys corresponding to a first device group shared by the audio source device; A first setting module is used to set the group identity resolution key of at least one shared playback device in the second device group to the first group identity resolution key, and trigger each shared playback device to broadcast a broadcast data packet carrying a resolvable group identity identifier, so that the audio source device obtains the broadcast data packet broadcast by the shared playback device, and when it is determined that the broadcast data packet carries the resolvable group identity identifier, the shared playback device is added to the first device group and a connection is established with the shared playback device; a connection-based synchronous data stream is created for the shared playback device, and the target audio data to be shared is sent to the shared playback device through the synchronous data stream, and the resolvable group identity identifier is generated based on the first group identity resolution key.
14. An audio sharing device, characterized in that: Applied to each shared playback device in the second device group, including: A second setting module is configured to receive a setting instruction carrying a first group identity resolution key sent by a shared audio device, set the group identity resolution key to the first group identity resolution key, and disconnect the connection with the shared audio device, wherein the first group identity resolution key is shared by the audio source device to the shared audio device, and the first group identity resolution key corresponds to the first device group; a broadcast module, configured to generate a resolvable group identity identifier based on the first group identity resolution key, and broadcast a broadcast data packet carrying the resolvable group identity identifier; A receiving module is used to receive target audio data shared by the audio source device via a connection-based synchronous data stream, wherein the connection-based synchronous data stream is created after the audio source device adds the shared playback device to the first device group and establishes a connection with the shared playback device, wherein when the audio source device receives the broadcast data packet and determines that the broadcast data packet carries the resolvable group identity identifier, the shared playback device is added to the first device group.
15. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of any one of the methods of claims 1 to 11 are implemented.
16. A computer-readable storage medium, characterized in that: It stores a computer program executable by a computer device. When the program is run on the computer device, the computer device executes the steps of any method described in claims 1 to 11.
Citation Information
Patent Citations
Bluetooth communication method and related device
CN112469012A
System is shared to music based on bluetooth
CN204616044U