Audio data sharing method and device, terminal equipment and computer program product

By negotiating and determining the negotiation results of target roles in audio data sharing and forming a target topology structure, the problem of insufficient flexibility in audio data sharing in the existing technology is solved, diversified audio data sharing is achieved, and user experience is improved.

CN120050634APending Publication Date: 2025-05-27GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510130755.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-05
Publication Date
2025-05-27

AI Technical Summary

Technical Problem

In the prior art, audio data sharing methods are not flexible enough, and the types of topological structures between devices are limited, which cannot meet the user's audio data sharing needs in different scenarios.

Method used

By negotiating and determining the target role negotiation results between the first terminal device and the second terminal device, a target topology structure is formed, and flexible sharing of audio data is achieved. The method includes sending audio data to the second terminal device and/or receiving audio data from the second terminal device, and adjusting the number of connected second terminal devices according to different data sharing methods.

Benefits of technology

It improves the flexibility of audio data sharing, can achieve diversified audio data sharing under different network topology, meets users' needs in different scenarios, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120050634A_ABST
    Figure CN120050634A_ABST
Patent Text Reader

Abstract

The invention provides an audio data sharing method and device, terminal equipment and a computer program product, which are applied to first terminal equipment and realize high-flexibility audio data sharing. The method comprises the steps of negotiating with each piece of second terminal equipment to determine a target role negotiation result corresponding to a target data sharing mode under the condition that Bluetooth connection with at least one piece of second terminal equipment is established, the target role negotiation result comprises a master device role for sending the audio data to the second terminal device and / or a slave device role for receiving the audio data from the second terminal device; the numbers of the second terminal devices connected with different data sharing modes are different; and forming a target topological structure with at least one second terminal device based on the target role negotiation result, and sharing audio data with each second terminal device through the target topological structure.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technologies, and in particular, to an audio data sharing method and apparatus, a terminal device, and a computer program product. Background Art

[0002] Bluetooth is widely distributed in current electronic devices. For example, a mobile phone can be used as a source device to share audio data with receiving devices (Sink devices) that support the function of receiving audio data, such as Bluetooth headsets and Bluetooth speakers.

[0003] However, in the above audio data sharing method, the number of devices that can establish a connection is limited, and the direction of audio data sharing between devices is relatively single, resulting in the inability to form more diverse topological structures for audio data sharing between devices. Therefore, there is an urgent need for a highly flexible audio data sharing method to enrich the types of topological structures and meet the audio data sharing needs of users in different scenarios, thereby improving the user experience. Summary of the Invention

[0004] This application provides an audio data sharing method and apparatus, a terminal device, and a computer program product, which achieve highly flexible audio data sharing.

[0005] In a first aspect, an audio data sharing method is provided, which is applied to a first terminal device. The method includes: when establishing a Bluetooth connection with at least one second terminal device, negotiating with each second terminal device to determine a target role negotiation result corresponding to a target data sharing method, where the target role negotiation result includes a master device role for sending audio data to the second terminal device and / or a slave device role for receiving audio data from the second terminal device; different data sharing methods are connected to different numbers of second terminal devices; based on the target role negotiation result, forming a target topological structure with at least one second terminal device, and sharing audio data with each second terminal device through the target topological structure.

[0006] In this application, when the first terminal device can establish a Bluetooth connection with at least one second terminal device, it negotiates with each second terminal device to determine the target role negotiation result corresponding to the target data sharing method, and based on this target role negotiation result, forms a target topology structure with at least one second terminal device, and shares audio data with each second terminal device through the target topology structure. Among them, the number of second terminal devices connected by the above different data sharing methods is different, and the target role negotiation result includes the master device role for sending audio data to the second terminal device and / or the slave device role for receiving audio data from the second terminal device. In other words, the first terminal device can be connected to at least one second terminal device and act as the source device and / or receiving device of the connected second terminal device through role negotiation, so as to send audio data to the connected second terminal device and / or receive audio data from the connected second terminal device under different network topologies, effectively improving the flexibility of audio data sharing.

[0007] In a second aspect, an audio data sharing device is provided, including: a role negotiation module and a data sharing module. Among them, the role negotiation module is used to negotiate with each second terminal device to determine the target role negotiation result corresponding to the target data sharing method when a Bluetooth connection is established with at least one second terminal device. The target role negotiation result includes the master device role for sending audio data to the second terminal device and / or the slave device role for receiving audio data from the second terminal device; the number of second terminal devices connected by different data sharing methods is different; the data sharing module is used to form a target topology structure with at least one second terminal device based on the target role negotiation result, and share audio data with each second terminal device through the target topology structure.

[0008] In a third aspect, a terminal device is provided, including a processor, which is coupled to a memory and can be used to execute instructions in the memory to implement the method in any possible implementation manner in the first aspect above. Optionally, the terminal device further includes a memory. Optionally, the terminal device further includes a communication interface, and the processor is coupled to the communication interface.

[0009] In a fourth aspect, a processor is provided, including: an input circuit, an output circuit, and a processing circuit. The processing circuit is used to receive a signal through the input circuit and transmit a signal through the output circuit, so that the processor executes the method in any possible implementation manner in the first aspect above.

[0010] In the specific implementation process, the above-mentioned processor can be a chip, the input circuit can be an input pin, the output circuit can be an output pin, and the processing circuit can be transistors, gate circuits, flip-flops, and various logic circuits, etc. The input signal received by the input circuit can be received and input by, for example but not limited to, a receiver. The signal output by the output circuit can be output to, for example but not limited to, a transmitter and transmitted by the transmitter. Moreover, the input circuit and the output circuit can be the same circuit, which serves as the input circuit and the output circuit at different times respectively. The embodiments of the present application do not limit the specific implementation manners of the processor and various circuits.

[0011] In a fifth aspect, a processing device is provided, including a processor and a memory. The processor is configured to read instructions stored in the memory, and can receive signals through a receiver and transmit signals through a transmitter to execute the method in any possible implementation manner of the first aspect above.

[0012] Optionally, there is one or more processors, and one or more memories.

[0013] Optionally, the memory can be integrated with the processor, or the memory is separately arranged from the processor.

[0014] In the specific implementation process, the memory can be a non-transitory memory, such as a read only memory (ROM). It can be integrated with the processor on the same chip, or can be separately arranged on different chips. The embodiments of the present application do not limit the type of the memory and the setting manner of the memory and the processor.

[0015] It should be understood that relevant data interaction processes, such as sending indication information, can be a process of outputting indication information from the processor, and receiving capability information can be a process of the processor receiving input capability information. Specifically, the data processed and output can be output to the transmitter, and the input data received by the processor can come from the receiver. Among them, the transmitter and the receiver can be collectively referred to as a transceiver.

[0016] The processing device in the above fifth aspect can be a chip. The processor can be implemented by hardware or by software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc.; when implemented by software, the processor can be a general-purpose processor, which is implemented by reading software code stored in the memory. The memory can be integrated in the processor or can be located outside the processor and exist independently.

[0017] In a sixth aspect, there is provided a computer program product, which includes a computer program (which may also be referred to as code or instructions). When the computer program is run, it causes a computer to execute the method in any one of the possible implementation manners of the first aspect described above.

[0018] In a seventh aspect, there is provided a computer-readable storage medium storing a computer program (which may also be referred to as code or instructions). When it runs on a computer, it causes the computer to execute the method in any one of the possible implementation manners of the first aspect described above. Description of the Drawings

[0019] Figure 1 is a schematic diagram of the topology structure provided by an embodiment of the present application;

[0020] Figure 2 is a schematic diagram of the system architecture of the terminal device provided by an embodiment of the present application;

[0021] Figure 3 is a schematic flowchart of a method for sharing audio data provided by an embodiment of the present application;

[0022] Figure 4 is a schematic diagram of the first specific example of the topology structure for sharing audio data provided by an embodiment of the present application;

[0023] Figure 5 is a schematic diagram of the second specific example of the second topology structure for sharing audio data provided by an embodiment of the present application;

[0024] Figure 6 is a schematic flowchart of the first specific example of the method for sharing audio data provided by an embodiment of the present application;

[0025] Figure 7 is a schematic diagram of the third specific example of the topology structure for sharing audio data provided by an embodiment of the present application;

[0026] Figure 8 is a schematic flowchart of the second specific example of the method for sharing audio data provided by an embodiment of the present application;

[0027] Figure 9 is a schematic diagram of the fourth specific example of the topology structure for sharing audio data provided by an embodiment of the present application;

[0028] Figure 10 is a schematic diagram of the fifth specific example of the topology structure for sharing audio data provided by an embodiment of the present application;

[0029] Figure 11 is a schematic diagram of the sixth specific example of the topology structure for sharing audio data provided by an embodiment of the present application;

[0030] Figure 12 It is a schematic flowchart of the third specific example of the audio data sharing method provided by the embodiments of the present application;

[0031] Figure 13 It is a schematic block diagram of an audio data sharing device provided by the embodiments of the present application;

[0032] Figure 14 It is a schematic block diagram of a terminal device provided by the embodiments of the present application. Detailed implementation manners

[0033] Next, the technical solutions in the present application will be described with reference to the accompanying drawings.

[0034] For the convenience of clearly describing the technical solutions of the embodiments of the present application, in the embodiments of the present application, terms such as "first" and "second" are used to distinguish the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the terms "first", "second", etc. do not limit the quantity and execution order, and the terms "first", "second", etc. do not necessarily limit to be different.

[0035] It should be noted that in the present application, words such as "exemplarily" or "for example" are used to represent examples, illustrations or explanations. Any embodiment or design solution described as "exemplarily" or "for example" in the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Exactly speaking, using words such as "exemplarily" or "for example" aims to present relevant concepts in a specific manner.

[0036] In addition, "at least one" means one or more, and "a plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after. "At least one (item) of the following" or its similar expressions refer to any combination of these items, including any combination of single item (item) or plural items (items). For example, at least one (item) of a, b, and c can represent: a, or b, or c, or a and b, or a and c, or b and c, or a, b, and c, where a, b, and c can be single or multiple.

[0037] In order to make the purpose and technical solutions of the present application clearer and more intuitive, next, the audio data sharing method and device, terminal device, and computer program product provided by the embodiments of the present application will be described in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0038] Figure 1 This is a schematic diagram of the topology structure 100 provided by the embodiment of the present application. As Figure 1 shown, the topology structure 100 includes a source device (Source device) 101 and a receiving device (Sink device) 102. The Source device 101 is a device in the above topology structure 100 that can generate or send audio data, so it can usually be used as the sending end of the audio data stream and is responsible for transmitting the audio data to the Sink device 102. Correspondingly, the Sink device 102 is a device in the above topology structure that can receive and process audio data, so it is usually used as the receiving end of the audio data stream and can be responsible for processing the audio data from the Source device 101. For example, the Source device 101 can compress the audio data through a codec and send it to the Sink device 102 through a Bluetooth connection. Correspondingly, the Sink device 102 can receive the audio data from the Source device 101 through a Bluetooth connection and play it after decoding.

[0039] However, the above audio data sharing method is not flexible. The Source device can usually only send audio data to a limited number of connected Sink devices, and the Sink device also only receives data from the Source device, resulting in the inability to implement more diverse topology structures. There is a problem that the types of topology structures are limited and cannot meet the audio data sharing needs of users in different scenarios, and the experience is not good.

[0040] The embodiment of the present application provides an audio data sharing method, device, terminal device, and computer program product. When the first terminal device can establish a Bluetooth connection with at least one second terminal device, it negotiates with each second terminal device to determine the target role negotiation result corresponding to the target data sharing method, and based on the target role negotiation result, forms a target topology structure with at least one second terminal device, and shares audio data with each second terminal device through the target topology structure. Among them, the number of second terminal devices connected by the above different data sharing methods is different, and the target role negotiation result includes the master device role of sending audio data to the second terminal device and / or the slave device role of receiving audio data from the second terminal device. In other words, the first terminal device can be connected to at least one second terminal device and act as the source device and / or receiving device of the connected second terminal device through role negotiation, so as to send audio data to the connected second terminal device and / or receive audio data from the connected second terminal device under different network topologies, effectively improving the flexibility of audio data sharing.

[0041] The terminal device involved in the embodiments of this application can be a mobile phone, a watch, a laptop computer, a palm computer, a mobile internet device (MID), a personal computer (PC), a wearable device, a virtual reality (VR) device, an augmented reality (AR) device, a wireless terminal in self-driving, a wireless terminal in a smart grid, a wireless terminal in transportation safety, a wireless terminal in a smart city, a wireless terminal in a smart home, a personal digital assistant (PDA), etc. The embodiments of this application do not limit this.

[0042] Exemplarily, Figure 2 FIG. is a schematic diagram of the system architecture of a terminal device provided by an embodiment of this application.

[0043] As Figure 2 shown, the terminal device includes a processor 210 and a transceiver 220.

[0044] Optionally, the terminal device may further include a memory 230. The processor 210, the transceiver 220, and the memory 230 can communicate with each other through an internal connection path to transfer data. The memory 230 is used to store a computer program, and the processor 210 is used to call and run the computer program from the memory 230. The above-mentioned processor 210 and the memory 230 can be integrated into a processing device, and more commonly, they are independent components. The processor 210 is used to execute the program code stored in the memory 230 to implement the above functions. Specifically, in implementation, the memory 230 may also be integrated in the processor 210, or independent of the processor 210.

[0045] In addition, in order to make the functions of the terminal device more complete, the terminal device may further include one or more of an input unit 260 and an audio circuit 280, etc.

[0046] Optionally, the above-mentioned terminal device may further include a power supply 250 for supplying power to various components or circuits in the terminal device.

[0047] It can be understood that Figure 2The operations and / or functions of the various modules in the terminal device shown are respectively for implementing the corresponding processes in the following method embodiments. For details, please refer to the descriptions in the following method embodiments. To avoid repetition, the detailed descriptions are appropriately omitted here.

[0048] It can be understood that Figure 2 The processor 210 in the terminal device shown may include one or more processing units. For example, the processor 210 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.

[0049] A memory may also be provided in the processor 210 for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. This memory can save the instructions or data that the processor 210 has just used or recycled. If the processor 210 needs to use the instruction or data again, it can directly call it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 210, and thus improves the efficiency of the system.

[0050] It can be understood that Figure 2The power supply 250 shown is used to supply power to the processor 210, the memory 230, the input unit 260, the transceiver 220, etc. The transceiver 220 can provide solutions for wireless communications applied to the terminal device, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc. The transceiver 220 can be one or more devices integrating at least one communication processing module. The memory 230 can be used to store computer-executable program codes, and the executable program codes include instructions. The memory 230 can include a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function, etc. The data storage area can store data created during the use of the terminal device, etc. In addition, the memory 230 can include high-speed random access memory, and can also include non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 210 executes various functional applications and data processing of the terminal device by running the instructions stored in the memory 230, and / or the instructions stored in the memory provided in the processor. The terminal device can implement audio functions through the audio circuit 280, and an application processor, etc. For example, music playback, recording, etc.

[0051] Figure 3 It is a schematic flowchart of an audio data sharing method 300 provided by an embodiment of the present application. The method 300 can be applicable to Figure 1 the topology structure 100 shown. In addition, the method 300 can also be applicable to other topology structures, which are not limited in the present application. As Figure 3 shown, the method 300 can include the following steps:

[0052] S301, when the first terminal device establishes a Bluetooth connection with at least one second terminal device, negotiate with each second terminal device to determine a target role negotiation result corresponding to the target data sharing method. The target role negotiation result includes the master device role for sending audio data to the second terminal device and / or the slave device role for receiving audio data from the second terminal device; the number of second terminal devices connected by different data sharing methods is different.

[0053] The master device here can be understood as the source device (Source device). Correspondingly, the slave device can be understood as the receiving device (Sink device).

[0054] It should be understood that the Source device refers to a device that can generate or send audio data, which usually serves as the sending end of the audio data stream and is responsible for transmitting the audio data to the Sink device. The Sink device refers to a device that can receive and process audio data, which usually serves as the receiving end of the audio data stream and can be responsible for processing the audio data from the Source device.

[0055] Exemplarily, the Source device can compress the audio data through a codec and send it to another device through a Bluetooth connection. Correspondingly, the Sink device can receive the audio data from the Source device through the Bluetooth connection and play it after decoding.

[0056] In some embodiments, the first terminal device can actively negotiate with each second terminal device to determine the target role negotiation result corresponding to the target data sharing method. For example, the first terminal device sends request information corresponding to the target data sharing method to each second terminal device, and determines the target role negotiation result when receiving the request response information sent by each second terminal device.

[0057] In a possible implementation manner, the first terminal device can respond to the role switching operation performed by the user, negotiate with each of the above-mentioned second terminal devices to determine the target role negotiation result corresponding to the target data sharing method, so as to realize the switching of different roles.

[0058] Exemplarily, when the first terminal device is currently the master device that can send audio data to the second terminal device, the first terminal device can respond to the role switching operation performed by the user, and negotiate with each of the above-mentioned second terminal devices to determine the target role negotiation result of being the slave device. Or, when the first terminal device is currently the slave device that can receive audio data from the second terminal device, the first terminal device can respond to the role switching operation performed by the user, and negotiate with each of the above-mentioned second terminal devices to determine the target role negotiation result of being the master device.

[0059] In another possible implementation manner, the first terminal device can also negotiate with each of the above-mentioned second terminal devices to determine the target role negotiation result corresponding to the target data sharing method when it determines that there is audio data to be shared and it is currently the slave device.

[0060] Exemplarily, when there is data to be shared in the first terminal device and the first terminal device is a slave device that can receive audio data from the second terminal device, the first terminal device may negotiate with each of the above-mentioned second terminal devices to determine a target role negotiation result of being the master device, so as to send the data to be shared to the second terminal device.

[0061] In some embodiments, the first terminal device may also passively negotiate with each second terminal device to determine a target role negotiation result corresponding to the target data sharing method. For example, when the first terminal device receives request information corresponding to the target data sharing method sent by each second terminal device, it may determine the target role negotiation result and send a request response message to each second terminal device, so that each second terminal device determines the target role negotiation result.

[0062] In a possible implementation manner, the second terminal device may also send the above-mentioned request information to the first terminal device in response to a role switching operation performed by the user, so as to negotiate with the first terminal device to determine the target role negotiation result.

[0063] Exemplarily, when the second terminal device is currently a master device that can send audio data to the first terminal device, the second terminal device may negotiate with the first terminal device to determine a target role negotiation result of being a slave device in response to a role switching operation performed by the user. Alternatively, when the second terminal device is currently a slave device that can receive audio data from the first terminal device, the second terminal device may negotiate with the first terminal device to determine a target role negotiation result of being the master device in response to a role switching operation performed by the user.

[0064] In another possible implementation manner, the second terminal device may also send the above-mentioned request information to the first terminal device when it determines that there is audio data to be shared and it is currently a slave device that receives audio data from the first terminal device, so as to negotiate with the first terminal device to determine the target role negotiation result.

[0065] Exemplarily, when there is data to be shared in the second terminal device and the second terminal device is a slave device that can receive audio data from the first terminal device, the second terminal device may negotiate with the first terminal device to determine a target role negotiation result of being the master device, so as to send the data to be shared to the first terminal device.

[0066] In some embodiments, the number of second terminal devices connected by different data sharing methods is different. In other words, different data sharing methods can be used to indicate that the first terminal device shares audio data with different numbers of second terminal devices.

[0067] In a possible scenario, the above-mentioned target data sharing method can be used to instruct a first terminal device to share audio data with a second terminal device.

[0068] Exemplarily, the target data sharing method can specifically instruct the first terminal device to send audio data to the second terminal device; or receive audio data sent by the second terminal device.

[0069] In another possible scenario, the above-mentioned target data sharing method can be used to instruct the first terminal device to share audio data with each of the multiple second terminal devices respectively.

[0070] Exemplarily, in the case of two second terminal devices, namely second terminal device A and second terminal device B, the target data sharing method can be specifically one of the following:

[0071] The target data sharing method instructs the first terminal device to send audio data to second terminal device A and second terminal device B respectively;

[0072] The target data sharing method instructs the first terminal device to receive audio data from second terminal device A and second terminal device B respectively;

[0073] The target data sharing method instructs the first terminal device to receive audio data from second terminal device A and send audio data to second terminal device B;

[0074] The target data sharing method instructs the first terminal device to send audio data to second terminal device A and receive audio data from second terminal device B.

[0075] S302. The first terminal device forms a target topology structure with at least one second terminal device based on the target role negotiation result, and shares audio data with each second terminal device through the target topology structure.

[0076] When the target data sharing method instructs the first terminal device to send audio data to the first second terminal device; or receive audio data sent by the second terminal device, the first terminal device can form Figure 4 the target topology structure shown, and share audio data with the second terminal device through the target topology structure.

[0077] Figure 4 is a schematic diagram of a topology structure for audio data sharing provided by an embodiment of the present application. As Figure 4As shown, the topology includes a first terminal device 401 and a second terminal device 402, and a connection is established between the first terminal device 401 and the second terminal device 402. When the target data sharing method is to send audio data to the second terminal device, the first terminal device 401 can send first audio data to the second terminal device 402 through the topology. Alternatively, when the target data sharing method is to receive audio data sent by the second terminal device, the first terminal device 401 can receive second audio data sent by the second terminal device 402 through the topology.

[0078] When the above target data sharing method indicates that the first terminal device shares audio data with the multiple second terminal devices, the first terminal device can form Figure 5 the shown target topology with the multiple second terminal devices, and share audio data with each of the multiple second terminal devices through the target topology.

[0079] Figure 5 It is a schematic diagram of a topology for audio data sharing provided by an embodiment of the present application. As Figure 5 shown, the topology includes a first terminal device 501 and multiple second terminal devices, such as second terminal device A 502 and second terminal device B 503, and connections are established between the first terminal device 501 and the second terminal device A 502 and the second terminal device B 503 respectively.

[0080] When the target data sharing method indicates that the first terminal device sends audio data to the second terminal device A and the second terminal device B respectively, the first terminal device 501 can send first audio data to the second terminal device A 502 and the second terminal device B 503 respectively through the Figure 5 shown topology.

[0081] When the target data sharing method indicates that the first terminal device receives audio data from the second terminal device A and the second terminal device B respectively, the first terminal device 501 can receive second audio data sent by the second terminal device A 502 and third audio data sent by the second terminal device B 503 respectively through the Figure 5 shown topology.

[0082] When the target data sharing method indicates that the first terminal device receives audio data from the second terminal device A and sends audio data to the second terminal device B, the first terminal device 501 can receive second audio data sent by the second terminal device A 502 through the Figure 5 shown topology and send first audio data to the second terminal device B 503.

[0083] When the target data sharing method instructs the first terminal device to send audio data to the second terminal device A and receive audio data from the second terminal device B, the first terminal device 501 can use the Figure 5 shown topology structure to send the first audio data to the second terminal device A502 and receive the third audio data sent by the second terminal device B 503.

[0084] In this application, when the first terminal device can establish a Bluetooth connection with at least one second terminal device, it negotiates with each second terminal device to determine the target role negotiation result corresponding to the target data sharing method, and based on this target role negotiation result, forms a target topology structure with at least one second terminal device, and shares audio data with each second terminal device through the target topology structure. Among them, the number of second terminal devices connected by the above different data sharing methods is different, and the target role negotiation result includes the master device role of sending audio data to the second terminal device and / or the slave device role of receiving audio data from the second terminal device. In other words, the first terminal device can be connected to at least one second terminal device and act as the source device and / or receiving device of the connected second terminal device through role negotiation, so as to send audio data to the connected second terminal device and / or receive audio data from the connected second terminal device under different network topologies, effectively improving the flexibility of audio data sharing.

[0085] In some embodiments, the first terminal device can determine the target data sharing method based on the number of second terminal devices corresponding to the received broadcast signal.

[0086] Figure 6 is a schematic flowchart of an audio data sharing method 600 provided by an embodiment of this application. As Figure 6 shown, the method 600 may include the following steps:

[0087] S601, the first terminal device receives broadcast signals of at least one second terminal device.

[0088] S602, the first terminal device determines the target data sharing method based on the number of second terminal devices corresponding to the received broadcast signal, and establishes a Bluetooth connection with the at least one second terminal device.

[0089] When receiving the broadcast signal of one second terminal device, the first terminal device can determine that the target data sharing method is the first data sharing method, and establish a Bluetooth connection with the one second terminal device. The first data sharing method is used to instruct the first terminal device to share audio data with the above one second terminal device.

[0090] In the case of receiving broadcast signals of multiple second terminal devices, the first terminal device may also determine that the target data sharing mode is the second data sharing mode, and establish connections with the multiple second terminal devices respectively. The second data sharing mode is used to instruct the first terminal device to share audio data with each of the multiple second terminal devices respectively.

[0091] S603. In the case of establishing a Bluetooth connection with the at least one second terminal device, the first terminal device negotiates with each second terminal device to determine a target role negotiation result corresponding to the target data sharing mode.

[0092] In the case where the target data sharing mode is the first data sharing mode, the first terminal device may negotiate with the one second terminal device to determine a first target role negotiation result corresponding to the first data sharing mode.

[0093] Exemplarily, the first target role negotiation result may be the master device for sending audio data to the one second terminal device, or the slave device for receiving audio data from the one second terminal device.

[0094] In the case where the target data sharing mode is the second data sharing mode, the first terminal device may negotiate with each second terminal device respectively to determine a second target role negotiation result corresponding to the second data sharing mode.

[0095] Exemplarily, in the case where the multiple second terminal devices include a second terminal device A and a second terminal device B, the second target role negotiation result may be one of the following cases:

[0096] The second target role negotiation result is the master device for sending audio data to the second terminal device A and the second terminal device B respectively;

[0097] The second target role negotiation result is the slave device for receiving audio data from the second terminal device A and the second terminal device B respectively;

[0098] The second target role negotiation result is the master device for sending audio data to the second terminal device A and the slave device for receiving audio data from the second terminal device B;

[0099] The second target role negotiation result is the slave device for receiving audio data from the second terminal device A and the master device for sending audio data to the second terminal device B.

[0100] S604. The first terminal device forms a target topology structure with the at least one second terminal device based on the target role negotiation result, and shares audio data with each second terminal device through the target topology structure.

[0101] When the target data sharing method is the first data sharing method, the first terminal device can negotiate with the one second terminal device to determine the first target role negotiation result corresponding to the first data sharing method, and based on the first target role negotiation result, form a Figure 4 topological structure as shown, and perform audio data sharing with the one second terminal device through this topological structure. For specific details, reference can be made to the description of the above embodiments. To avoid repetition, no further elaboration will be provided here.

[0102] When the target data sharing method is the second data sharing method, the first terminal device can negotiate with each of the multiple second terminal devices to determine the second target role negotiation result corresponding to the second data sharing method, and based on the second target role negotiation result, form a Figure 5 topological structure as shown, and perform audio data sharing with each of the multiple second terminal devices through this topological structure. For specific details, reference can be made to the description of the above embodiments. To avoid repetition, no further elaboration will be provided here.

[0103] It should be understood that Figure 5 the topological structure shown is only exemplary. In addition, the first terminal device can also form a new topological structure with more than two second terminal devices to achieve different audio data sharing effects based on this new topological structure.

[0104] Optionally, in the scenario where the first terminal device sends audio data to multiple second terminal devices, the audio data sent to each second terminal device can be the same.

[0105] Exemplarily, in the scenario where the first terminal device sends audio data to multiple second terminal devices, when the multiple second terminal devices receive the audio data from the first terminal device, they can respectively play the audio data of different channels corresponding to the first audio data to form a stereo sound field effect.

[0106] Optionally, in the scenario where the first terminal device sends audio data to multiple second terminal devices, the audio data sent to each second terminal device can also be different.

[0107] Exemplarily, in the scenario where the first terminal device sends audio data to multiple second terminal devices, the first terminal device can also send the audio data corresponding to different channel data to different second terminal devices respectively.

[0108] Figure 7 is a schematic diagram of a topological structure for audio data sharing provided by an embodiment of the present application. As Figure 7As shown, the topology includes a first terminal device 701, a second terminal device A 702, and a second terminal device B 703. The first terminal device 701 is respectively connected to the second terminal device A 702 and the second terminal device B 703. In the case of audio data sharing, the first terminal device 701 can respectively send the first channel data to the second terminal device A 702 and the second channel data to the second terminal device B 703 through the Figure 7 shown topology, so as to form a stereo sound field effect when the second terminal device A 702 and the second terminal device B 703 play the corresponding channel data.

[0109] When the first terminal device receives the broadcast signals of multiple second terminal devices, based on the location information of the multiple second terminal devices and the location information of the first terminal device, it determines that the target data sharing method is the third data sharing method, negotiates with each second terminal device to determine the third target role negotiation result corresponding to the third data sharing method, and forms Figure 7 the shown topology with the multiple second terminal devices, and shares different channel data with each second terminal device through this topology. The third data sharing method is used to indicate that the first terminal device shares different channel data with each of the multiple second terminal devices respectively, and the different channel data is determined based on the location information of each second terminal device and the location information of the first terminal device.

[0110] In a possible implementation manner, the first terminal device can obtain the location information of the multiple second terminal devices and the location information of the first terminal device through Ultra Wide band (UWB), and send different channel data to different second terminal devices based on the relationship between the location information of each second terminal device and the location information of the first terminal device.

[0111] In the embodiments of the present application, the first terminal device can determine the target data sharing method based on the number of second terminal devices corresponding to the received broadcast signal. In other words, it can flexibly determine the number of second terminal devices that can be connected to the first terminal device based on the number of second terminal devices corresponding to the broadcast signal, so as to determine different data sharing methods based on this number, negotiate with the second terminal devices corresponding to the number to determine the target role negotiation result, and form the corresponding topology with the second terminal devices corresponding to the number based on this target role negotiation result, and flexibly implement the audio data sharing effect with the second terminal devices corresponding to the number based on this topology.

[0112] In some embodiments, the first terminal device may also determine a target data sharing method based on the number of second terminal devices corresponding to the broadcast signal and the connection status information of the second terminal devices.

[0113] Figure 8 It is a schematic flowchart of an audio data sharing method 800 provided by an embodiment of the present application. As Figure 8 shown, the method 800 may include the following steps:

[0114] S801, the first terminal device receives broadcast signals of at least one second terminal device, and the broadcast signals include connection status information of the corresponding second terminal devices.

[0115] The connection status information may be used to indicate whether the corresponding second terminal device is currently connected to other Bluetooth devices.

[0116] S802, the first terminal device determines a target data sharing method based on the number of second terminal devices corresponding to the received broadcast signals and the connection status information, and establishes a Bluetooth connection with the at least one second terminal device.

[0117] When receiving the broadcast signal of one second terminal device, and the connection status information of the one second terminal device indicates that the first second terminal device is connected to other Bluetooth devices, the first terminal device may determine that the target data sharing method is the fourth data sharing method, and establish a Bluetooth connection with the one second terminal device. The fourth data sharing method is used to indicate that the first terminal device shares audio data with the one second terminal device and the above other Bluetooth devices.

[0118] When receiving the broadcast signals of multiple second terminal devices, and there is at least one connection status information indicating that the corresponding second terminal device is connected to other Bluetooth devices among the connection status information of the multiple second terminal devices, the first terminal device may determine that the target data sharing method is the fifth data sharing method. The fifth data sharing method is used to indicate that the first terminal device shares audio data with each of the multiple second terminal devices and other Bluetooth devices respectively.

[0119] S803, when a Bluetooth connection is established with the at least one second terminal device, the first terminal device negotiates with each second terminal device to determine a target role negotiation result corresponding to the target data sharing method.

[0120] When the target data sharing method is the fourth data sharing method, the first terminal device may negotiate with the one second terminal device to determine a fourth target role negotiation result corresponding to the fourth data sharing method.

[0121] The negotiation result of the fourth target role can be the master device or the slave device.

[0122] It should be understood that the master device here can be understood not only as the master device that sends audio data to the one second terminal device, but also as the master device that sends audio data to other Bluetooth devices through the one second terminal device. Correspondingly, the slave device here can be understood not only as the slave device that receives audio data from the one second terminal device, but also as the slave device that receives audio data from other Bluetooth devices through the one second terminal device.

[0123] When the target data sharing method is the fifth data sharing method, the first terminal device can negotiate with each second terminal device respectively to determine the negotiation result of the fifth target role corresponding to the fifth data sharing method.

[0124] The negotiation result of the fifth target role can be the master device and / or the slave device.

[0125] Exemplarily, when the multiple second terminal devices include the second terminal device A and the second terminal device B, and the second terminal device A is connected to the first Bluetooth device, and the second terminal device B is connected to the second Bluetooth device:

[0126] The master device here can be understood not only as the master device that sends audio data to the second terminal device A and / or the second terminal device B, but also as the master device that sends audio data to the first Bluetooth device and / or the second Bluetooth device through the second terminal device.

[0127] The slave device here can be understood not only as the slave device that receives audio data from the second terminal device A and / or the second terminal device B, but also as the slave device that receives audio data from the first Bluetooth device and / or the second Bluetooth device through the second terminal device.

[0128] S804. The first terminal device forms a target topology structure with the at least one second terminal device based on the negotiation result of the target role, and shares audio data with each second terminal device through the target topology structure.

[0129] When the target data sharing method is the fourth data sharing method, the first terminal device can negotiate with the one second terminal device to determine the negotiation result of the fourth target role corresponding to the fourth data sharing method, and based on the negotiation result of the fourth target role, form Figure 9 the topology structure shown, and share audio data with the one second terminal device and other Bluetooth devices through the topology structure.

[0130] Figure 9This is a schematic diagram of a topology structure for audio data sharing provided by an embodiment of the present application. As Figure 9 shown, the topology structure includes a first terminal device 901, a second terminal device 902, and other Bluetooth devices, such as a first Bluetooth device 903. The first terminal device 901 has a Bluetooth connection with the second terminal device 902, and the second terminal device 902 has a Bluetooth connection with the first Bluetooth device 903. The first terminal device 901 can send first audio data to the second terminal device 902 through this topology structure. Or, in the case where the target data sharing method is to receive audio data sent by the one second terminal device, the first terminal device 901 can receive second audio data sent by the second terminal device 902 through this topology structure. The other Bluetooth devices connected to the above-mentioned second terminal device may include at least one Bluetooth terminal device and / or non-Bluetooth terminal device, such as Bluetooth headsets, Bluetooth speakers, etc.

[0131] In some embodiments, the above-mentioned other Bluetooth devices (such as the first Bluetooth device 903) may include multiple Bluetooth terminal devices, so that the first terminal device 901 can achieve a long-distance audio data sharing effect through the topology structure formed by the second terminal device 902 and the multiple Bluetooth terminal devices.

[0132] In the case where the target data sharing method is the fifth data sharing method, the first terminal device can negotiate with each of the multiple second terminal devices to determine the fifth target role negotiation result corresponding to the fifth data sharing method, and based on the fifth target role negotiation result, form a Figure 10 shown topology structure with the above-mentioned multiple second terminal devices and other Bluetooth devices, and perform audio data sharing with each of the multiple second terminal devices and other Bluetooth devices through this topology structure.

[0133] Figure 10 This is a schematic diagram of a topology structure for audio data sharing provided by an embodiment of the present application. As Figure 10 shown, the topology structure includes a first terminal device 1001, a second terminal device A 1002, a second terminal device B 1003, a first Bluetooth device 1004, and a second Bluetooth device 1005. The first terminal device 1001 has Bluetooth connections with the second terminal device A 1002 and the second terminal device B 1003 respectively. The second terminal device A 1002 also has a Bluetooth connection with the first Bluetooth device 1004, and the second terminal device B 1003 also has a Bluetooth connection with the second Bluetooth device 1005.

[0134] It should be understood that the other Bluetooth devices connected to the second terminal device A and / or the second terminal device B may include at least one Bluetooth terminal device and / or one non-Bluetooth terminal device.

[0135] Combined with the above Figure 10 shown topological structure, when the first terminal device 1001 is the master device for sending audio data to the second terminal device A 1002 and / or the second terminal device B 1003, the first terminal device 1001 can send the first audio data to the second terminal device A 1002 and / or the second terminal device B 1003. When the first terminal device 1001 is also the master device for sending audio data to the first Bluetooth device 1004 and / or the second Bluetooth device 1005 through the second terminal device (the second terminal device A and / or the second terminal device B), the second terminal device A 1002 and / or the second terminal device B 1003 can also send the first audio data received from the first terminal device 1001 to the first Bluetooth device 1004 and / or the second Bluetooth device 1005.

[0136] Combined with the above Figure 10 shown topological structure, when the first terminal device 1001 is the slave device for receiving audio data from the second terminal device A 1002 and / or the second terminal device B 1003, the second terminal device A 1002 and / or the second terminal device B 1003 can send audio data (such as the second audio data and / or the third audio data) to the first terminal device 1001. When the above first Bluetooth device 1004 and / or the second Bluetooth device 1005 are Bluetooth terminal devices, the first terminal device 1001 can also be the slave device for receiving audio data from the first Bluetooth device 1004 and / or the second Bluetooth device 1005 through the second terminal device. In this case, the second terminal device can also send the audio data (such as the fourth audio data and / or the fifth audio data) received from the first Bluetooth device 1004 and / or the second Bluetooth device 1005 to the first terminal device 1001.

[0137] In some embodiments, when the above other Bluetooth devices include Bluetooth terminal devices, the Bluetooth terminal device can also be a device among the above multiple second terminal devices to form another topological structure, and different audio data sharing effects can be achieved through this topological structure.

[0138] Exemplarily, when the above multiple second terminal devices include the second terminal device A and the second terminal device B, the first Bluetooth device connected to the second terminal device A can be the second terminal device B, and the second Bluetooth device connected to the second terminal device B can also be the first terminal device A. In other words, the second terminal device A and the second terminal device B are connected to each other. For specific details, see Figure 11 .

[0139] Figure 11 is a schematic diagram of a topological structure for audio data sharing provided by an embodiment of the present application. AsFigure 11 As shown, this topology includes a first terminal device 1101, a second terminal device A 1102, and a second terminal device B 1103. The first terminal device 1101 has established Bluetooth connections with the second terminal device A 1102 and the second terminal device B 1103 respectively, and the second terminal device A 1102 has also established a Bluetooth connection with the second terminal device B 1103.

[0140] Combined with the above Figure 11 In the case where the first terminal device 1101 is the master device for sending audio data to the second terminal device A 1102 and / or the second terminal device B 1103, the first terminal device 1101 can send first audio data to the second terminal device A 1102 and / or the second terminal device B 1103. In the case where the first terminal device 1101 is also the master device for sending audio data to the second terminal device B 1103 through the second terminal device A 1102, the second terminal device A 1102 can also send the first audio data received from the first terminal device 1101 to the second terminal device B 1103. Or, in the case where the first terminal device 1101 is also the master device for sending audio data to the second terminal device A 1102 through the second terminal device B 1103, the second terminal device B 1103 can also send the first audio data received from the first terminal device 1101 to the second terminal device A 1102.

[0141] Combined with the above Figure 11 In the case where the first terminal device 1101 is the slave device for receiving audio data from the second terminal device A 1102 and / or the second terminal device B 1103, the second terminal device A 1102 and / or the second terminal device B 1103 can send audio data (such as second audio data and / or third audio data) to the first terminal device 1101. In the case where the first terminal device 1101 is also the slave device for receiving audio data from the second terminal device B 1103 through the second terminal device A 1102, the second terminal device A 1002 can also send the third audio data received from the second terminal device B 1103 to the first terminal device 1101. Or, in the case where the first terminal device 1101 is also the slave device for receiving audio data from the second terminal device A 1102 through the second terminal device B 1103, the second terminal device B 1103 can also send the second audio data received from the second terminal device A 1102 to the first terminal device 1101.

[0142] In an embodiment of the present application, the first terminal device may determine a target data sharing method based on the number of second terminal devices corresponding to the broadcast signal and the connection status information of the second terminal devices. In other words, on the basis of determining the number of second terminal devices that can establish a connection with the first terminal device based on the number of second terminal devices corresponding to the broadcast signal, the connection status of the second terminal devices corresponding to the number of devices with other Bluetooth devices can be further obtained, so as to determine different audio data sharing methods based on the second terminal devices corresponding to the number of devices and the other Bluetooth devices connected to the second terminal devices, and negotiate with the second terminal devices corresponding to the number of devices to determine the target role negotiation result. Based on the target role negotiation result, a corresponding topology structure is formed with the second terminal devices corresponding to the number of devices and other Bluetooth devices, and the audio data sharing effect with the second terminal devices corresponding to the number of devices and other Bluetooth devices is flexibly realized based on the topology structure.

[0143] In some embodiments, the path for sharing audio data in the above embodiments is independent of the path for negotiating and determining the target role negotiation result corresponding to the target data sharing method.

[0144] Taking the first terminal device actively initiating role negotiation with the second terminal device, where the first terminal device is mobile phone A and the second terminal device (i.e., the above-mentioned at least one second terminal device) is mobile phone B as an example, the audio data sharing provided by the present application will be described in detail below.

[0145] Figure 12 It is a schematic flowchart of an audio data sharing method 1200 provided by an embodiment of the present application. As Figure 12 shown, the method 1200 may include the following steps:

[0146] S1201, when a Bluetooth connection is established between mobile phone A and mobile phone B, mobile phone A sends request information corresponding to the target data sharing method to mobile phone B through the role negotiation path. Correspondingly, mobile phone B receives the above request information through the role negotiation path.

[0147] In a possible implementation manner, mobile phone A may respond to a role switching operation performed by the user, and negotiate with the above-mentioned mobile phone B to determine the target role negotiation result corresponding to the target data sharing method, so as to realize the switching of different roles.

[0148] Exemplarily, when mobile phone A is currently the master device that can send audio data to mobile phone B, mobile phone A can, in response to a role-switching operation performed by the user, send request information corresponding to the target data sharing method to mobile phone B through the role negotiation path, so as to switch from the master device role to the slave device role. Or, when mobile phone A is currently the slave device that can receive audio data from mobile phone B, mobile phone A can, in response to a role-switching operation performed by the user, send request information corresponding to the target data sharing method to mobile phone B through the role negotiation path, so as to switch from the slave device role to the master device role.

[0149] In another possible implementation, mobile phone A can also negotiate with the above-mentioned mobile phone B to determine the target role negotiation result corresponding to the target data sharing method when it determines that there is audio data to be shared and it is currently the slave device.

[0150] Exemplarily, when mobile phone A currently has audio data to be shared and is the slave device that can receive audio data from mobile phone B, mobile phone A can send request information corresponding to the target data sharing method to mobile phone B through the role negotiation path, so as to switch from the slave device role to the master device role and send the above-mentioned audio data to be shared to mobile phone B in the master device role.

[0151] S1202. Mobile phone B determines the target role negotiation result based on the request information. The target role negotiation result includes the master device role of sending audio data to mobile phone B and / or the slave device role of receiving audio data from mobile phone B.

[0152] When mobile phone B is currently in the slave device role of receiving audio data from itself, if mobile phone B receives the request information from mobile phone A, it determines the target role negotiation result. The target role negotiation result is that mobile phone A is the slave device role of receiving audio data from mobile phone B, that is, mobile phone B is the master device role of sending audio data to mobile phone A, and based on this target role negotiation result, it switches from the slave device role of receiving audio data from mobile phone A to the master device role of sending audio data to mobile phone A.

[0153] When mobile phone B is currently in the master device role of sending audio data to itself, if mobile phone B receives the request information from mobile phone A, it determines the target role negotiation result when it determines that there is no audio data to be shared currently. The target role negotiation result is that mobile phone A is the master device role of sending audio data to mobile phone B, that is, mobile phone B is the slave device role of receiving audio data from mobile phone A, and based on this target role negotiation result, it switches from the master device role of sending audio data to mobile phone A to the slave device role of receiving audio data from mobile phone A.

[0154] Optionally, when mobile phone B is currently in the master device role that can send audio data to mobile phone B, if mobile phone B receives a request message from mobile phone A, it can also determine the target role negotiation result when it is determined that there is shared audio data (pending shared audio data or currently shared audio data) and the service type of the shared audio data is a non-preset type. The target role negotiation result is that mobile phone A is the master device role for sending audio data to mobile phone B, that is, mobile phone B is the slave device role for receiving audio data from mobile phone A, and based on this target role negotiation result, it switches from the master device role of sending audio data to mobile phone A to the slave device role of receiving audio data from mobile phone A.

[0155] Optionally, the above request message from mobile phone A also includes the service type of the audio data to be shared by mobile phone A. When mobile phone B is currently in the master device role that can send audio data to mobile phone B, if mobile phone B receives a request message from mobile phone A, it can also determine the target role negotiation result when it is determined that there is shared audio data (pending shared audio data or currently shared audio data) and the priority of the service type of the shared audio data is lower than the service type of the audio data to be shared by mobile phone A. The target role negotiation result is that mobile phone A is the master device role for sending audio data to mobile phone B, that is, mobile phone B is the slave device role for receiving audio data from mobile phone A, and based on this target role negotiation result, it switches from the master device role of sending audio data to mobile phone A to the slave device role of receiving audio data from mobile phone A.

[0156] S1203. Mobile phone B sends a request response message to mobile phone A through the role negotiation channel. Correspondingly, mobile phone A receives the above request response message through the role negotiation channel.

[0157] When mobile phone B determines that the target role negotiation result is that mobile phone A is the slave device role for receiving audio data from mobile phone B, that is, mobile phone B is the master device role for sending audio data to mobile phone A, the request response message here may include this target role negotiation result, so that mobile phone A can determine this target role negotiation result through the request response message.

[0158] When mobile phone B determines that the target role negotiation result is that mobile phone A is the master device role for sending audio data to mobile phone B, that is, mobile phone B is the slave device role for receiving audio data from mobile phone A, the request response message here may also include this target role negotiation result, so that mobile phone A can determine this target role negotiation result through the request response message.

[0159] Optionally, the request response message here can also be used to instruct mobile phone A to switch roles, so that when mobile phone A receives the request response message, it can learn that mobile phone B agrees to the role switch and determine the target role negotiation result including the corresponding role.

[0160] S1204, Mobile phone A determines the target role negotiation result based on the request response information. The target role negotiation result includes the master device role for sending audio data to mobile phone B and / or the slave device role for mobile phone B to receive audio data.

[0161] S1205, Mobile phone A shares audio data with mobile phone B through the target topology structure formed with the above-mentioned mobile phone B based on the target role negotiation result.

[0162] When the target role negotiation result includes the slave device role for receiving audio data from mobile phone B, mobile phone B can send audio data to mobile phone A through the data sharing path. Correspondingly, mobile phone A can receive the audio data from mobile phone B through this data sharing path.

[0163] When the target role negotiation result includes the master device role for sending audio data to mobile phone B, mobile phone A can send audio data to mobile phone B through the data sharing path. Correspondingly, mobile phone B can receive the audio data from mobile phone A through this data sharing path.

[0164] In the embodiments of the present application, the first terminal device and the second terminal device can negotiate and determine the target role negotiation result through the role negotiation path, and based on this target role negotiation result, share audio data through the topology structure formed with the second terminal device. Among them, the role negotiation path and the data sharing path for sharing audio data are independent of each other, so that the above-mentioned first terminal device and / or the second terminal device can switch from the master device role of sending audio data to the opposite terminal device to the slave device role of receiving audio data from this terminal device based on this role negotiation path, or switch from the slave device role of receiving audio data from the opposite terminal device to the master device role of sending audio data to this terminal device.

[0165] It should be understood that the above-mentioned various embodiments can also be coupled to each other, and the present application does not limit this. And the magnitudes of the sequence numbers of the above processes do not mean the order of execution is prior or subsequent. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.

[0166] In the above text, in combination with Figures 1 to 12 , the audio data sharing method of the embodiments of the present application is described in detail. Next, in combination with Figure 13 and Figure 14 , the audio data sharing device of the embodiments of the present application will be described in detail.

[0167] Figure 13An audio data sharing device 1300 provided by an embodiment of the present application is shown, which is applied to a first terminal device. The audio data sharing device 1300 includes: a role negotiation module 1301 and a data sharing module 1302. Among them, the role negotiation module 1301 is used for: when a Bluetooth connection is established with at least one second terminal device, negotiating with each second terminal device to determine a target role negotiation result corresponding to a target data sharing method, and the target role negotiation result includes a master device role for sending audio data to the second terminal device and / or a slave device role for receiving audio data from the second terminal device; the number of second terminal devices connected by different data sharing methods is different; the data sharing module 1302 is used for: based on the target role negotiation result, forming a target topology structure with at least one second terminal device, and sharing audio data with each second terminal device through the target topology structure.

[0168] Optionally, the role negotiation module 1301 is used for: receiving a broadcast signal of the at least one second terminal device; determining the target data sharing method based on the number of devices of the second terminal device corresponding to the received broadcast signal, and establishing a Bluetooth connection with the at least one second terminal device.

[0169] Optionally, the role negotiation module 1301 is used for: when a broadcast signal of a second terminal device is received, determining that the target data sharing method is a first data sharing method, and the first data sharing method is used to indicate that the first terminal device shares audio data with the second terminal device.

[0170] Optionally, the role negotiation module 1301 is used for: when broadcast signals of multiple second terminal devices are received, determining that the target data sharing method is a second data sharing method, and the second data sharing method is used to indicate that the first terminal device shares audio data with each of the multiple second terminal devices respectively.

[0171] Optionally, the role negotiation module 1301 is used for: when broadcast signals of multiple second terminal devices are received, determining that the target data sharing method is a third data sharing method based on the location information of the multiple second terminal devices and the location information of the first terminal device, and the third data sharing method is used to indicate that the first terminal device shares different channel data with each of the multiple second terminal devices respectively, and the different channel data is determined based on the location information of each second terminal device and the location information of the first terminal device.

[0172] Optionally, the above broadcast signal further includes connection status information of the corresponding second terminal device, and the role negotiation module 1301 is configured to: determine the above target data sharing method based on the number of devices of the second terminal device corresponding to the above broadcast signal and the above connection status information.

[0173] Optionally, the role negotiation module 1301 is configured to: when receiving a broadcast signal of a second terminal device, and the connection status information of the second terminal device indicates that the second terminal device is connected to other Bluetooth devices, determine that the above target data sharing method is the fourth data sharing method, and the fourth data sharing method is used to instruct the first terminal device to share audio data with the second terminal device and the other Bluetooth devices; or, when receiving broadcast signals of multiple second terminal devices, and there is at least one connection status information indicating that the corresponding second terminal device is connected to other Bluetooth devices among the connection status information of the multiple second terminal devices, determine that the above target data sharing method is the fifth data sharing method, and the fifth data sharing method is used to instruct the first terminal device to share audio data with each of the multiple second terminal devices and the other Bluetooth devices respectively.

[0174] Optionally, the role negotiation module 1301 is configured to: send request information corresponding to the above target data sharing method to each of the above second terminal devices; and determine the target role negotiation result when receiving the request response information sent by each of the above second terminal devices.

[0175] Optionally, the path for sharing audio data is independent of the path for negotiating and determining the target role negotiation result corresponding to the target data sharing method.

[0176] It should be understood that the audio data sharing device 1300 here is embodied in the form of a functional module. The term "module" here may refer to an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a dedicated processor or a group of processors, etc.) for executing one or more software or firmware programs, and a memory, a combined logic circuit and / or other suitable components that support the described functions. In an alternative example, those skilled in the art can understand that the audio data sharing device 1300 may specifically be the first terminal device in the above embodiments, or, the functions of the first terminal device in the above embodiments may be integrated in the audio data sharing device 1300. The audio data sharing device 1300 may be used to execute each process and / or step corresponding to the first terminal device in the above method embodiments. To avoid repetition, it will not be elaborated here. The above audio data sharing device 1300 has the function of implementing the corresponding steps executed by the first terminal device in the above method; the above function may be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions. In the embodiments of the present application, Figure 13 the audio data sharing device 1300 in may also be a chip or a chip system, for example: a system on chip (SoC).

[0177] Figure 14 FIG. shows the terminal device 1400 provided by the embodiments of the present application. The terminal device 1400 includes: a processor 1401, a memory 1402, a communication interface 1403, and a bus 1404. Among them, the memory 1402 is used to store instructions, and the processor 1401 is used to execute the instructions stored in the memory 1402. The processor 1401, the memory 1402, and the communication interface 1403 are communicatively connected to each other through the bus 1404.

[0178] Among them, the processor 1401 is used for: when a Bluetooth connection is established with at least one second terminal device, negotiating with each second terminal device to determine a target role negotiation result corresponding to a target data sharing method, the target role negotiation result including a master device role for sending audio data to the second terminal device and / or a slave device role for receiving audio data from the second terminal device; the number of second terminal devices connected by different data sharing methods is different; based on the above target role negotiation result, forming a target topology structure with at least one second terminal device, and sharing audio data with each second terminal device through the target topology structure.

[0179] It should be understood that the terminal device 1400 may specifically be the first terminal device in the foregoing embodiments, or the functions of the first terminal device in the foregoing embodiments may be integrated in the terminal device 1400. The terminal device 1400 may be used to execute the respective steps and / or processes corresponding to the first terminal device in the foregoing method embodiments. Optionally, the memory 1402 may include a read-only memory and a random access memory, and provide instructions and data to the processor 1401. A part of the memory 1402 may further include a non-volatile random access memory. For example, the memory 1402 may further store information about the device type. The processor 1401 may be used to execute the instructions stored in the memory, and when the processor executes the instructions, the processor 1401 may execute the respective steps and / or processes corresponding to the first terminal device in the foregoing method embodiments. It should be understood that in the embodiments of the present application, the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. In the implementation process, the respective steps of the foregoing method may be completed by the integrated logic circuit in the hardware of the processor or the instructions in the form of software. The steps of the method disclosed in combination with the embodiments of the present application may be directly embodied as being executed and completed by the hardware processor, or executed and completed by a combination of the hardware and software modules in the processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor executes the instructions in the memory and combines its hardware to complete the steps of the foregoing method. To avoid repetition, it will not be described in detail here. Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or by a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application. Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above may refer to the corresponding processes in the foregoing method embodiments, and will not be repeated here. In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other ways.For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the couplings, direct couplings, or communication connections shown or discussed between each other can be through some interfaces. The indirect couplings or communication connections of the devices or units can be in electrical, mechanical, or other forms. The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in each embodiment of the present application, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present application. The foregoing storage medium includes: USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs and other various media that can store program codes. The above is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application, and all of them should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. An audio data sharing method, characterized in that: Applied to a first terminal device, the method includes: When a Bluetooth connection is established with at least one second terminal device, determine a target role negotiation result corresponding to a target data sharing mode through negotiation with each of the second terminal devices, wherein the target role negotiation result includes a master device role for sending audio data to the second terminal device and / or a slave device role for receiving audio data from the second terminal device; different data sharing modes may lead to different numbers of connected second terminal devices; Based on the target role negotiation result, a target topology structure is formed with the at least one second terminal device, and audio data is shared with each of the second terminal devices through the target topology structure.

2. The method according to claim 1, characterized in that: In the case where a Bluetooth connection is established with at least one second terminal device, before negotiating with each of the second terminal devices to determine a target role negotiation result corresponding to the target data sharing mode, the method further includes: receiving a broadcast signal of the at least one second terminal device; Based on the number of second terminal devices corresponding to the received broadcast signal, the target data sharing method is determined, and a Bluetooth connection is established with at least one second terminal device.

3. The method according to claim 2, characterized in that The determining the target data sharing method based on the number of second terminal devices corresponding to the received broadcast signal includes: In case of receiving a broadcast signal from a second terminal device, the target data sharing mode is determined to be a first data sharing mode, where the first data sharing mode is used to instruct the first terminal device to share audio data with the second terminal device.

4. The method according to claim 2, characterized in that: The determining the target data sharing method based on the number of second terminal devices corresponding to the received broadcast signal includes: When broadcast signals from multiple second terminal devices are received, the target data sharing mode is determined to be a second data sharing mode, and the second data sharing mode is used to instruct the first terminal device to share audio data with each of the multiple second terminal devices respectively.

5. The method according to claim 2, characterized in that: The determining the target data sharing method based on the number of second terminal devices corresponding to the received broadcast signal includes: In case of receiving broadcast signals from multiple second terminal devices, based on the location information of the multiple second terminal devices and the location information of the first terminal device, the target data sharing mode is determined to be a third data sharing mode, and the third data sharing mode is used to instruct the first terminal device to share different channel data with each of the multiple second terminal devices, respectively, and the different channel data is determined based on the location information of each of the second terminal devices and the location information of the first terminal device.

6. The method according to claim 2, characterized in that The broadcast signal also includes connection status information of the corresponding second terminal device, and the determining of the target data sharing mode based on the number of second terminal devices corresponding to the received broadcast signal includes: The target data sharing method is determined based on the number of second terminal devices corresponding to the broadcast signal and the connection status information.

7. The method according to claim 6, characterized in that The determining the target data sharing method based on the number of second terminal devices corresponding to the broadcast signal and the connection status information includes: When a broadcast signal of a second terminal device is received and the connection status information of the second terminal device indicates that the second terminal device has established a connection with other Bluetooth devices, determining that the target data sharing mode is a fourth data sharing mode, and the fourth data sharing mode is used to instruct the first terminal device to share audio data with the second terminal device and the other Bluetooth devices; or When broadcast signals of multiple second terminal devices are received and there is at least one connection status information of the multiple second terminal devices indicating that the corresponding second terminal device is connected to other Bluetooth devices, the target data sharing mode is determined to be the fifth data sharing mode, and the fifth data sharing mode is used to instruct the first terminal device to share audio data with each second terminal device among the multiple second terminal devices and the other Bluetooth devices respectively.

8. The method according to claim 1, characterized in that The negotiating with each of the second terminal devices to determine a target role negotiation result corresponding to the target data sharing mode includes: Sending request information corresponding to the target data sharing mode to each of the second terminal devices; Upon receiving the request response information sent by each of the second terminal devices, the target role negotiation result is determined.

9. The method according to claim 1, characterized in that: The path for sharing audio data is independent of the path for negotiating and determining a target role negotiation result corresponding to the target data sharing method.

10. An audio data sharing device, characterized in that: include: a role negotiation module, configured to, when a Bluetooth connection is established with at least one second terminal device, negotiate with each of the second terminal devices to determine a target role negotiation result corresponding to a target data sharing mode, wherein the target role negotiation result includes a master device role for sending audio data to the second terminal device and / or a slave device role for receiving audio data from the second terminal device; Different data sharing methods can connect different numbers of second terminal devices; The data sharing module is used to form a target topology structure with the at least one second terminal device based on the target role negotiation result, and share audio data with each of the second terminal devices through the target topology structure.

11. A terminal device, characterized in that: The system comprises a processor and a memory, wherein the memory is used to store code instructions; the processor is used to run the code instructions to execute the method according to any one of claims 1 to 9.

12. A computer program product, comprising computer program code, characterized in that: When the computer program code is executed on a computer, the computer is caused to implement the method according to any one of claims 1 to 9.