Data transmission method and apparatus, storage medium, and electronic device

By adopting a synchronous transmission mode in Bluetooth audio transmission and negotiating and determining synchronous transmission parameters, the problem of Bluetooth audio data transmission latency is solved, resulting in more efficient data transmission and a better audio playback experience.

CN116074795BActive Publication Date: 2026-04-10BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING XIAOMI MOBILE SOFTWARE CO LTD
Filing Date
2021-11-02
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Bluetooth audio data transmission suffers from latency issues, which negatively impacts user experience, especially in low-latency applications such as gaming.

Method used

The synchronous transmission mode is adopted to negotiate and determine the synchronous transmission parameters of the physical Bluetooth link, and the target data is sent through the physical Bluetooth link according to the synchronous transmission parameters.

Benefits of technology

Reduce interference between data, improve data transmission efficiency, reduce data latency, and enhance the audio playback experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116074795B_ABST
    Figure CN116074795B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a data transmission method, device, storage medium and electronic equipment. The method comprises: determining a synchronization transmission parameter of a physical Bluetooth link according to target data to be transmitted; transmitting a synchronization parameter indication message to a second Bluetooth device, the synchronization parameter indication message being used to indicate the synchronization transmission parameter determined by the first Bluetooth device; in response to receiving a synchronization parameter response message, transmitting the target data to the second Bluetooth device through the physical Bluetooth link according to the synchronization transmission parameter; wherein the synchronization parameter response message is a response message transmitted by the second Bluetooth device according to the received synchronization parameter indication message. In this way, the target data can be transmitted according to the synchronization transmission parameter in the synchronization mode, which can reduce the interference between data relative to the asynchronous mode, thereby improving the data transmission efficiency and reducing the data delay time.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the field of communication, and in particular, to a data transmission method and device, a storage medium and an electronic device. BACKGROUND

[0002] Bluetooth technology is a global specification for open wireless data and voice communication, based on low-cost short-range wireless connectivity, which can achieve convenient, flexible, secure, low-cost and low-power data communication and voice communication between devices. With the rise of applications such as wearable devices, Bluetooth headsets, Bluetooth speakers and other Bluetooth peripherals, Bluetooth technology has been more widely used. User demand for Bluetooth peripherals in the audio field mainly focuses on sound quality, noise reduction, low-latency transmission, etc. In related technologies, due to the limitations of Bluetooth wireless transmission and Bluetooth audio codec hardware paths, there is a significant delay process when sending audio data from the source end to the headset receiving end, usually varying from a few hundred milliseconds, which can be clearly perceived in gaming scenarios, and will affect the user's audio playback experience. SUMMARY

[0003] To overcome the above problems in the related art, the present disclosure provides a data transmission method, device, storage medium and electronic device.

[0004] According to a first aspect of an embodiment of the present disclosure, a data transmission method is provided, applied to a first Bluetooth device, the method comprising:

[0005] determining a synchronization transmission parameter of a physical Bluetooth link according to target data to be sent; the physical Bluetooth link is a communication link for transmitting data between the first Bluetooth device and a second Bluetooth device through Bluetooth;

[0006] sending a synchronization parameter indication message to the second Bluetooth device, the synchronization parameter indication message being used to indicate the synchronization transmission parameter determined by the first Bluetooth device;

[0007] in response to receiving a synchronization parameter response message, sending the target data to the second Bluetooth device through the physical Bluetooth link according to the synchronization transmission parameter; wherein the synchronization parameter response message is a response message sent by the second Bluetooth device according to the received synchronization parameter indication message.

[0008] Optionally, the determining a synchronization transmission parameter of a physical Bluetooth link according to target data to be sent comprises:

[0009] obtaining a data type of the target data;

[0010] determine the candidate transmission parameter corresponding to the data type according to a preset type parameter correspondence relationship, wherein the preset type parameter correspondence relationship comprises a correspondence relationship between the data type and the candidate transmission parameter;

[0011] use the candidate transmission parameter as the synchronization transmission parameter of the physical Bluetooth link.

[0012] Optionally, the target data is target audio data, and the method further comprises:

[0013] obtain target audio parameters through audio parameter negotiation with the second Bluetooth device, wherein the target audio parameters comprise a target sampling rate and / or a target codec format;

[0014] encode media audio data to be played according to the target audio parameters to obtain the target audio data.

[0015] Optionally, before determining the synchronization transmission parameter of the physical Bluetooth link according to the target data to be sent, the method further comprises:

[0016] obtain an ongoing target audio service;

[0017] determine whether the target audio service is a preset synchronization audio service;

[0018] determining the synchronization transmission parameter of the physical Bluetooth link according to the target data to be sent comprises:

[0019] determining the synchronization transmission parameter of the physical Bluetooth link according to the target data to be sent in a case where the target audio service is the preset synchronization audio service.

[0020] Optionally, the obtaining the target audio parameters through the audio parameter negotiation with the second Bluetooth device comprises:

[0021] sending an audio parameter negotiation request message to the second Bluetooth device through the physical Bluetooth link, wherein the audio parameter negotiation request message comprises first audio parameters supported by the first Bluetooth device;

[0022] receiving an audio parameter negotiation response message sent by the second Bluetooth device in response to receiving the audio parameter negotiation request message, wherein the audio parameter negotiation response message comprises second audio parameters supported by the second Bluetooth device;

[0023] determining target audio parameters according to the first audio parameters and the second audio parameters.

[0024] Optionally, before the sending the synchronization parameter indication message to the second Bluetooth device, the method further comprises:

[0025] establishing a Bluetooth asynchronous transmission link with the second Bluetooth device;

[0026] The sending of the synchronization parameter indication message to the second Bluetooth device comprises:

[0027] The sending of the synchronization parameter indication message to the second Bluetooth device comprises:

[0028] According to a second aspect of the embodiments of the present disclosure, a Bluetooth audio transmission method is provided, applied to a second Bluetooth device, and the method comprises:

[0029] receiving a synchronization parameter indication message sent by a first Bluetooth device, the synchronization parameter indication message being used to indicate synchronization transmission parameters of a physical Bluetooth link determined by the first Bluetooth device;

[0030] In response to the receiving of the synchronization parameter indication message, a synchronization parameter response message is sent to the first Bluetooth device, wherein the synchronization parameter response message is used to instruct the first Bluetooth device to send target data to the second Bluetooth device through the physical Bluetooth link according to the synchronization transmission parameters;

[0031] According to the synchronization transmission parameters, target data sent by the first Bluetooth device is received.

[0032] Optionally, the target data is target audio data, and the method further comprises:

[0033] Through audio parameter negotiation with the first Bluetooth device, target audio parameters are obtained.

[0034] According to the target audio parameters, the target audio data is decoded to obtain media audio data to be played.

[0035] Optionally, the obtaining of the target audio parameters through the audio parameter negotiation with the first Bluetooth device comprises:

[0036] An audio parameter negotiation request message sent by the first Bluetooth device is received through the physical Bluetooth link, wherein the audio parameter negotiation request message comprises first audio parameters supported by the first Bluetooth device.

[0037] In response to the receiving of the audio parameter negotiation request message, an audio parameter negotiation response message is sent to the first Bluetooth device, wherein the audio parameter negotiation response message comprises second audio parameters supported by the second Bluetooth device, so that the first Bluetooth device determines target audio parameters according to the first audio parameters and the second audio parameters.

[0038] Optionally, before the receiving the synchronization parameter indication message sent by the first Bluetooth device, the method further includes:

[0039] establishing a Bluetooth asynchronous transmission link with the first Bluetooth device;

[0040] the receiving the synchronization parameter indication message sent by the first Bluetooth device includes:

[0041] receiving the synchronization parameter indication message sent by the first Bluetooth device through the established Bluetooth asynchronous transmission link.

[0042] According to a third aspect of the embodiments of the present disclosure, a data transmission apparatus is provided, applied to a first Bluetooth device, and the apparatus includes:

[0043] a parameter determination module configured to determine a synchronization transmission parameter of a physical Bluetooth link according to target data to be transmitted; the physical Bluetooth link is a communication link through which the first Bluetooth device and a second Bluetooth device transmit data by Bluetooth;

[0044] a first message sending module configured to send a synchronization parameter indication message to the second Bluetooth device, the synchronization parameter indication message being used to indicate the synchronization transmission parameter determined by the first Bluetooth device;

[0045] a target data sending module configured to, in response to receiving a synchronization parameter response message, send the target data to the second Bluetooth device through the physical Bluetooth link according to the synchronization transmission parameter; the synchronization parameter response message is a response message sent by the second Bluetooth device according to the received synchronization parameter indication message.

[0046] Optionally, the parameter determination module is configured to:

[0047] obtain a data type of the target data;

[0048] determine a candidate transmission parameter corresponding to the data type according to a preset type-parameter correspondence; the preset type-parameter correspondence includes a correspondence between the data type and the candidate transmission parameter;

[0049] determine the candidate transmission parameter as the synchronization transmission parameter of the physical Bluetooth link.

[0050] Optionally, the target data is target audio data, and the apparatus further includes:

[0051] a first audio parameter obtaining module configured to obtain target audio parameters by performing audio parameter negotiation with the second Bluetooth device, wherein the target audio parameters include a target sampling rate and / or a target codec format;

[0052] an audio encoding module configured to encode, according to the target audio parameter, the media audio data to be played, to obtain the target audio data.

[0053] Optionally, the first audio parameter obtaining module is configured to:

[0054] send an audio parameter negotiation request message to a second Bluetooth device through a physical Bluetooth link, wherein the audio parameter negotiation request message comprises first audio parameters supported by the first Bluetooth device;

[0055] receive an audio parameter negotiation response message sent by the second Bluetooth device in response to receiving the audio parameter negotiation request message, wherein the audio parameter negotiation response message comprises second audio parameters supported by the second Bluetooth device;

[0056] determine target audio parameters according to the first audio parameters and the second audio parameters.

[0057] Optionally, the parameter determining module is configured to:

[0058] obtain a data type of the target data;

[0059] determine candidate transmission parameters corresponding to the data type according to a preset type-parameter correspondence relationship, wherein the preset type-parameter correspondence relationship comprises a correspondence relationship between the data type and the candidate transmission parameters;

[0060] use the candidate transmission parameters as the synchronization transmission parameters of the physical Bluetooth link.

[0061] Optionally, the apparatus further comprises:

[0062] an audio service determining module configured to obtain a target audio service being processed, and determine whether the target audio service is a preset synchronization audio service;

[0063] the parameter determining module is configured to, in a case where it is determined that the target audio service is the preset synchronization audio service, determine synchronization transmission parameters of a physical Bluetooth link according to target data to be sent.

[0064] Optionally, the apparatus further comprises:

[0065] a first asynchronous link establishing module configured to establish a Bluetooth asynchronous transmission link with a second Bluetooth device;

[0066] the first message sending module is configured to send a synchronization parameter indication message to the second Bluetooth device through the established Bluetooth asynchronous transmission link.

[0067] According to a fourth aspect of the embodiments of the present disclosure, a data transmission apparatus is provided, applied to a second Bluetooth device, and the apparatus comprises:

[0068] a first message receiving module configured to receive a synchronization parameter indication message sent by a first Bluetooth device, wherein the synchronization parameter indication message comprises synchronization transmission parameters of a physical Bluetooth link;

[0069] a second message sending module configured to send a synchronization parameter response message to the first Bluetooth device in response to receiving the synchronization parameter indication message, wherein the synchronization parameter response message is used to instruct the first Bluetooth device to send target data to the second Bluetooth device through the physical Bluetooth link according to the synchronization transmission parameters;

[0070] a target data receiving module configured to periodically receive target data sent by the first Bluetooth device according to the synchronization transmission parameters.

[0071] Optionally, the target data is target audio data, and the apparatus further comprises:

[0072] a second audio parameter obtaining module configured to obtain target audio parameters by performing audio parameter negotiation with the first Bluetooth device;

[0073] an audio decoding module configured to decode the target audio data according to the target audio parameters to obtain media audio data to be played.

[0074] Optionally, the second audio parameter obtaining module is configured to:

[0075] receive an audio parameter negotiation request message sent by the first Bluetooth device through the physical Bluetooth link, wherein the audio parameter negotiation request message comprises first audio parameters supported by the first Bluetooth device;

[0076] send an audio parameter negotiation response message to the first Bluetooth device in response to receiving the audio parameter negotiation request message, wherein the audio parameter negotiation response message comprises second audio parameters supported by the second Bluetooth device, so that the first Bluetooth device determines target audio parameters according to the first audio parameters and the second audio parameters.

[0077] Optionally, the apparatus further comprises:

[0078] a second asynchronous link establishing module configured to establish a Bluetooth asynchronous transmission link with the first Bluetooth device;

[0079] the first message receiving module is configured to receive the synchronization parameter indication message sent by the first Bluetooth device through the established Bluetooth asynchronous transmission link.

[0080] According to a fifth aspect of embodiments of the present disclosure, an electronic device is provided, comprising:

[0081] a processor;

[0082] a memory for storing processor-executable instructions;

[0083] The processor is configured to perform the steps of the data transmission method provided in the first aspect of the present disclosure.

[0084] According to a sixth aspect of embodiments of the present disclosure, an electronic device is provided, comprising:

[0085] a processor;

[0086] a memory for storing processor-executable instructions;

[0087] The processor is configured to perform the steps of the data transmission method provided in the second aspect of the present disclosure.

[0088] According to a seventh aspect of embodiments of the present disclosure, a computer-readable storage medium is provided, having stored thereon computer program instructions, which, when executed by a processor, implement the steps of the data transmission method provided in the first aspect of the present disclosure.

[0089] According to an eighth aspect of embodiments of the present disclosure, a computer-readable storage medium is provided, having stored thereon computer program instructions, which, when executed by a processor, implement the steps of the data transmission method provided in the second aspect of the present disclosure.

[0090] The technical solutions provided by the embodiments of the present disclosure can include the following beneficial effects: according to the target data to be transmitted, determining the synchronization transmission parameter of the physical Bluetooth link; sending a synchronization parameter indication message to the second Bluetooth device, the synchronization parameter indication message including the synchronization transmission parameter; in response to receiving a synchronization parameter response message, transmitting the target data to the second Bluetooth device through the physical Bluetooth link according to the synchronization transmission parameter; wherein the synchronization parameter response message is a response message sent by the second Bluetooth device according to the received synchronization parameter indication message. In this way, the target data can be transmitted according to the synchronization transmission parameter in the synchronization mode, which can reduce the interference between data compared with the asynchronous mode, thereby improving the data transmission efficiency and reducing the data delay time.

[0091] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and are not limiting to the present disclosure. BRIEF DESCRIPTION OF DRAWINGS

[0092] The accompanying drawings, which are incorporated herein and constitute part of this specification, illustrate implementations of the present disclosure and, together with the description, explain the principles of the present disclosure.

[0093] Figure 1 is a flowchart of a data transmission system according to an example embodiment.

[0094] Figure 2 is a flowchart of a data transmission method according to an example embodiment.

[0095] Figure 3 is a flowchart of another data transmission method according to an example embodiment.

[0096] Figure 4 is a flowchart of a further data transmission method according to an example embodiment.

[0097] Figure 5 is a block diagram of a data transmission apparatus according to an example embodiment.

[0098] Figure 6 is a block diagram of a second data transmission apparatus according to an example embodiment.

[0099] Figure 7 is a block diagram of a third data transmission apparatus according to an example embodiment.

[0100] Figure 8 is a block diagram of a fourth data transmission apparatus according to an example embodiment.

[0101] Figure 9 is a block diagram of a fifth data transmission apparatus according to an example embodiment.

[0102] Figure 10 is a block diagram of a sixth data transmission apparatus according to an example embodiment.

[0103] Figure 11 is a block diagram of a seventh data transmission apparatus according to an example embodiment.

[0104] Figure 12 is a block diagram of an electronic device according to an example embodiment. DETAILED DESCRIPTION

[0105] The exemplary embodiments will be described in detail herein with reference to the attached drawings. The following description is made with reference to the accompanying drawings in which like reference numerals refer to like elements throughout the several figures. The following description of exemplary embodiments is not representative of all possible embodiments consistent with the present disclosure. Rather, it is merely intended to describe some embodiments consistent with some aspects of the present disclosure as detailed in the appended claims.

[0106] Firstly, the application scenario of the present disclosure is described. The present disclosure can be applied to a Bluetooth communication scenario, especially a scenario of audio data transmission of a physical Bluetooth link. In the related art, after two Bluetooth devices establish a physical Bluetooth link, the Bluetooth A2DP (Advanced Audio Distribute Profile) and the classic Bluetooth asynchronous transmission link can be used for audio data transmission. However, when the audio data transmission is performed in this way, since the asynchronous mode is adopted, the Bluetooth devices can randomly use a time slot to send data, which can cause mutual interference, resulting in data transmission error and the need for multiple retransmissions, and further resulting in obvious delay of data transmission. In the low-latency application scenario such as game, the delay has a greater impact on the user's audio playback experience.

[0107] To solve the above problem, the present disclosure provides a data transmission method, device, storage medium and electronic device, which adopts a synchronous transmission mode, negotiates and determines the synchronous transmission parameters of the physical Bluetooth link, and sends the target data to be transmitted to the second Bluetooth device through the physical Bluetooth link according to the synchronous transmission parameters. In this way, by adopting the synchronous transmission mode for the transmission of the target data, compared with the asynchronous transmission mode in the related art, the interference between data can be reduced, thereby improving the data transmission efficiency and reducing the data delay time.

[0108] The present disclosure will be described in detail below in conjunction with specific embodiments.

[0109] Figure 1is a block diagram of a data transmission system provided by an embodiment of the present disclosure, in which the audio transmission system includes a first Bluetooth device 101 and a second Bluetooth device 102, and the first Bluetooth device 101 and the second Bluetooth device 102 are connected through a physical Bluetooth link. For example, the first Bluetooth device 101 can be a terminal with a Bluetooth module, which can be a smartphone, a tablet computer, a smart watch, a smart bracelet, a PDA (Personal Digital Assistant), a CPE (Customer Premise Equipment), or other electronic devices; the second Bluetooth device 102 can be a Bluetooth headset, a Bluetooth speaker, a Bluetooth wearable device, etc., which are not limited by the present disclosure. The present disclosure can be applied to scenarios of transmitting data through Bluetooth, such as transmitting audio, transmitting video, transmitting pictures, transmitting files, etc., which can all apply the technical solutions of the present disclosure. Taking the transmission of audio as an example, when playing target audio, the first Bluetooth device can transmit relevant audio data to the second Bluetooth device 102 through the physical Bluetooth link, and the second Bluetooth device 102 plays the audio.

[0110] Figure 2 is a flowchart of a data transmission method provided by an embodiment of the present disclosure, as shown in the figure, the execution subject of the method can be a first Bluetooth device, and the method can include: Figure 2

[0111] S201, determining the synchronization transmission parameter of the physical Bluetooth link according to the target data to be sent.

[0112] The physical Bluetooth link is a communication link through which the first Bluetooth device and the second Bluetooth device transmit data through Bluetooth. The target data can be of various types, for example, it can be target audio data obtained by encoding media audio data; it can also be target video data obtained by encoding media video data; of course, it can also be target picture data or target file data, etc.

[0113] For example, the synchronization transmission parameter of the physical Bluetooth link can be determined according to the target data, for example: if the target data is target audio data, a preset audio synchronization transmission parameter is used as the synchronization transmission parameter of the physical Bluetooth link; if the target data is target video data, a preset video synchronization transmission parameter is used as the synchronization transmission parameter of the physical Bluetooth link. The preset video synchronization transmission parameter and the preset audio synchronization transmission parameter can be the same or different.

[0114] S202, sending a synchronization parameter indication message to the second Bluetooth device.

[0115] ​The synchronization parameter indication message is used to indicate the synchronization transmission parameter determined by the first Bluetooth device. For example, the synchronization transmission parameter can be included in the synchronization parameter indication message; or the same synchronization parameter encoding and the corresponding relationship between the synchronization parameter encoding and the synchronization transmission parameter are included in the synchronization parameter indication message, so that the second Bluetooth device can determine the synchronization transmission parameter according to the synchronization parameter encoding.

[0116] Optionally, the synchronization parameter indication message can be used to instruct the second Bluetooth device to receive target data according to the synchronization transmission parameter. In this way, after receiving the synchronization parameter indication message, the second Bluetooth device can send a synchronization parameter response message if a preset synchronization condition is met. The preset synchronization condition can include that the second Bluetooth device supports the synchronization transmission parameter, and the number of Bluetooth synchronization transmission links established by the second Bluetooth device with Bluetooth devices other than the first Bluetooth device is less than or equal to a preset maximum synchronization number, which can be any positive integer greater than 0. For example, in order to improve data transmission reliability and reduce the energy consumption of the Bluetooth device, the preset maximum synchronization number can be 1. That is, the same Bluetooth device can only establish one Bluetooth synchronization transmission link with another Bluetooth device according to the synchronization transmission parameter, and data transmission is performed through the Bluetooth synchronization transmission link.

[0117] Conversely, if the second Bluetooth device meets the preset synchronization condition, the second Bluetooth device can send a synchronization parameter rejection message or not send any synchronization-related message. In this way, the first Bluetooth device can stop establishing a Bluetooth synchronization transmission link and use an asynchronous mode for data transmission if the first Bluetooth device receives a synchronization parameter rejection message or does not receive any synchronization-related message within a preset timeout period.

[0118] S203, in response to receiving the synchronization parameter response message, sending the target data to the second Bluetooth device through the physical Bluetooth link according to the synchronization transmission parameter.

[0119] The synchronization parameter response message is a response message sent by the second Bluetooth device according to the received synchronization parameter indication message.

[0120] It should be noted that the synchronization transmission parameter can include a Bluetooth synchronization period and a target synchronization time slot. For example, each Bluetooth synchronization period can include a total of M Bluetooth synchronization time slots, and N Bluetooth synchronization time slots in the M Bluetooth synchronization time slots can be used as target synchronization time slots, where N can be a positive integer less than or equal to M. The target synchronization time slot can be used as a dedicated data transmission time slot of the physical Bluetooth link. In this way, the first Bluetooth device can periodically transmit target data in the target synchronization time slot according to the Bluetooth synchronization period, and the second Bluetooth device can also periodically receive the target data in the target synchronization time slot according to the Bluetooth synchronization period, so that the mutual interference problem caused by the asynchronous mode transmission in the related art can be avoided, the data transmission message can be improved, and the data transmission delay of the physical Bluetooth link can be reduced.

[0121] According to the above method, the synchronization transmission parameter of the physical Bluetooth link is determined according to the target data to be transmitted, the synchronization parameter indication message is sent to the second Bluetooth device, the synchronization parameter indication message includes the synchronization transmission parameter, and the target data is transmitted to the second Bluetooth device through the physical Bluetooth link according to the synchronization transmission parameter in response to receiving the synchronization parameter response message. The synchronization parameter response message is a response message sent by the second Bluetooth device according to the received synchronization parameter indication message. In this way, the target data can be transmitted in a synchronous mode according to the synchronization transmission parameter, which can reduce the interference between data compared with the asynchronous mode, thereby improving the data transmission efficiency and reducing the data delay time.

[0122] Figure 3 is a flowchart of another data transmission method provided by the embodiment of the disclosure, as shown in Figure 3 The execution subject of the method can be the second Bluetooth device, and the method can include the following steps.

[0123] S301, receiving a synchronization parameter indication message sent by a first Bluetooth device.

[0124] The synchronization parameter indication message includes a synchronization transmission parameter of a physical Bluetooth link.

[0125] S302, in response to receiving the synchronization parameter indication message, sending a synchronization parameter response message to the first Bluetooth device.

[0126] For example, the synchronization parameter indication message can be used to instruct the second Bluetooth device to receive target data according to the synchronization transmission parameter. After receiving the synchronization parameter indication message, the second Bluetooth device can send the synchronization parameter response message after being ready to receive the target data. The synchronization parameter response message is used to instruct the first Bluetooth device to transmit the target data to the second Bluetooth device through the physical Bluetooth link according to the synchronization transmission parameter.

[0127] S303, periodically receive the target data sent by the first Bluetooth device according to the synchronization transmission parameter.

[0128] It should also be noted that the synchronization transmission parameter can include a Bluetooth synchronization period and a target synchronization time slot, for example: each Bluetooth synchronization period can include a total of M Bluetooth synchronization time slots, and N Bluetooth synchronization time slots in the M Bluetooth synchronization time slots are taken as target synchronization time slots, where N can be a positive integer less than or equal to M. The target synchronization time slot can be used as a dedicated data transmission time slot of the physical Bluetooth link. In this way, in the case where the first Bluetooth device periodically transmits target data in the target synchronization time slot according to the Bluetooth synchronization period, the second Bluetooth device can also periodically receive the target data in the target synchronization time slot according to the Bluetooth synchronization period, thereby avoiding the mutual interference problem caused by the asynchronous mode transmission in the related art, improving the data transmission efficiency, and reducing the data transmission delay of the physical Bluetooth link.

[0129] By using the above method, the synchronization parameter indication message sent by the first Bluetooth device is received; the synchronization parameter indication message includes the synchronization transmission parameter of the physical Bluetooth link; in response to receiving the synchronization parameter indication message, a synchronization parameter response message is sent to the first Bluetooth device; and the target data sent by the first Bluetooth device is periodically received according to the synchronization transmission parameter. In this way, the target data can be received according to the synchronization transmission parameter in a synchronous mode, which improves the data transmission efficiency and thus reduces the data delay time.

[0130] Figure 4 is a flowchart of another data transmission method provided by the embodiments of the present disclosure, as shown in Figure 4 Taking the target data as audio data as an example, the method can include:

[0131] S401, the first Bluetooth device and the second Bluetooth device negotiate to establish a Bluetooth asynchronous transmission link. For example, after pairing, the first Bluetooth device and the second Bluetooth device can first establish an ALC (Asynchronous Connectionless) link, on which audio data (for example, high-quality A2DP audio data such as monaural or stereo) and Bluetooth control data (for example, a synchronization parameter indication message or a synchronization parameter response message) can be transmitted.

[0132] S402, the first Bluetooth device determines the synchronization transmission parameter of the physical Bluetooth link according to the target data to be sent.

[0133] In this step, the first Bluetooth device can be an audio sender. The first Bluetooth device can determine the synchronization transmission parameter of the physical Bluetooth link according to the data type of the target data to be sent. For example, the first Bluetooth device can obtain the data type of the target data; determine the candidate transmission parameter corresponding to the data type according to a preset type-parameter correspondence; wherein the preset type-parameter correspondence includes the correspondence between the data type and the candidate transmission parameter; and use the candidate transmission parameter as the synchronization transmission parameter of the physical Bluetooth link.

[0134] For example, the data type of the target data can include audio, video, picture or file, wherein the audio can include game audio, instant messaging audio, music audio and other audio (such as webpage audio, etc.). The synchronization transmission parameter can also include a Bluetooth synchronization period and a target synchronization time slot. The synchronization transmission parameters corresponding to different data types can be the same or different.

[0135] In addition, the preset type-parameter correspondence can not include all data types, for example, it can not include the data types of pictures or files. For the data types not included in the preset type-parameter correspondence, the data type can represent a lower requirement for latency, and the synchronization transmission parameter can not be used, and the asynchronous link can be continued to be used for data transmission. For the data types included in the preset type-parameter correspondence, the synchronization transmission parameter of the physical Bluetooth link can be determined, and the low-latency mode can be started, and the Bluetooth synchronization transmission link can be established.

[0136] In addition, it should be noted that the above data type can be determined according to the APP (application) running on the first Bluetooth device. For example, if the APP running on the first Bluetooth device is a game, the data type can be game audio; and if the APP running on the first Bluetooth device is a music playing software, the data can be music audio.

[0137] Optionally, before the step S402, the first Bluetooth device can also obtain the target audio service being performed, and determine whether the target audio service is a preset synchronization audio service. In the case where the target audio service is determined to be a preset synchronization audio service, the first Bluetooth device can determine the synchronization transmission parameter of the physical Bluetooth link according to the target data to be sent.

[0138] The preset synchronization audio service can be a target service with low-latency audio transmission requirement, such as game audio or live audio, etc. For example, in the case where the first Bluetooth device is running a game or a video player, it can be determined that the low-latency audio transmission requirement is needed, the synchronization transmission parameter of the physical Bluetooth link can be determined, and the low-latency mode can be started, and the Bluetooth synchronization transmission link can be established.

[0139] S403, the first Bluetooth device sends a synchronization parameter indication message to the second Bluetooth device through the established Bluetooth asynchronous transmission link.

[0140] The synchronization parameter indication message includes the above-mentioned synchronization transmission parameter.

[0141] S404, the second Bluetooth device receives the synchronization parameter indication message sent by the first Bluetooth device through the established Bluetooth asynchronous transmission link, and sends a synchronization parameter response message to the first Bluetooth device according to the synchronization parameter indication message.

[0142] S405, the first Bluetooth device establishes a Bluetooth synchronous transmission link with the second Bluetooth device in response to receiving the synchronization parameter response message.

[0143] It should be noted that the Bluetooth link can include a physical link and a logical transmission link, wherein the physical Bluetooth link is used to represent the physical connection between devices, and the Bluetooth logical transmission link is a layer above the physical Bluetooth link. There can be multiple Bluetooth logical transmission links on the same physical Bluetooth link, and the Bluetooth logical transmission link can be divided into a Bluetooth synchronous transmission link and a Bluetooth asynchronous transmission link. Among them, the Bluetooth synchronous transmission link adopts a synchronous transmission mode for transmission of target data, which can reduce interference between data and improve data transmission efficiency and reduce data delay time compared with the Bluetooth asynchronous transmission link. Therefore, the Bluetooth synchronous transmission link can be used to transmit target data with high latency requirements, and the Bluetooth asynchronous transmission link can be used to transmit related control messages or data with low latency requirements.

[0144] In this step, the Bluetooth synchronous transmission link can be established based on the physical Bluetooth link according to the above-mentioned synchronization transmission parameter. For example, the Bluetooth synchronous transmission link established by the above-mentioned method can be SCO (Synchronous Connection Oriented, Synchronous Directional Link) or eSCO (Extended Synchronous Connection Oriented, Enhanced Synchronous Directional Link).

[0145] In this way, the first Bluetooth device and the second Bluetooth device establish a Bluetooth synchronous transmission link based on SCO or eSCO through the above-mentioned steps, which can reduce the data transmission delay.

[0146] S406, the first Bluetooth device and the second Bluetooth device perform audio parameter negotiation to obtain target audio parameters.

[0147] Among them, the target audio parameter can include a target sampling rate and / or a target codec format.

[0148] The target codec format can include SBC (Subband Coding), AAC (Advanced Audio Coding), LHDC (Low-Latency Hi-Definition Audio Codec), LDAC, aptX, or aptX Adaptive.

[0149] The target sampling rate can represent how many samples of an analog signal are taken per unit of time. The higher the sampling rate, the more realistic and natural the waveform of the audio. For example, the target sampling rate can be 16KHz, 32KHz, 44.1KHz, 48KHz, or 96KHz.

[0150] For example, the audio parameter negotiation can be performed by the following steps:

[0151] First, the first Bluetooth device sends an audio parameter negotiation request message to the second Bluetooth device through a physical Bluetooth link.

[0152] The audio parameter negotiation request message includes the first audio parameter supported by the first Bluetooth device.

[0153] The audio parameter negotiation request message can be sent through a Bluetooth asynchronous transmission link or a Bluetooth synchronous transmission link.

[0154] In the case of sending the audio parameter negotiation request message through the Bluetooth asynchronous transmission link, the S406 step can be executed before S405 or S404, and the present disclosure does not limit the execution order between the steps.

[0155] Second, the second Bluetooth device sends an audio parameter negotiation response message to the first Bluetooth device in response to receiving the audio parameter negotiation request message.

[0156] The audio parameter negotiation response message includes the second audio parameter supported by the second Bluetooth device. The second audio parameter can be all audio parameters supported by the second Bluetooth device, or can be a parameter obtained by the second Bluetooth device from the intersection of the first audio parameter and the audio parameters supported by the second Bluetooth device.

[0157] Third, the first Bluetooth device receives the audio parameter negotiation response message, obtains the second audio parameter, and determines the target audio parameter according to the first audio parameter and the second audio parameter, and sends the target audio parameter to the second Bluetooth device.

[0158] In this step, the candidate audio parameter supported by both the first Bluetooth device and the second Bluetooth device can be determined first, and then the target audio parameter is determined according to the candidate audio parameter.

[0159] The manner of determining the candidate audio parameter supported by both the first Bluetooth device and the second Bluetooth device can include any one of the following two manners:

[0160] Manner one, the second audio parameter can be taken as the candidate audio parameter. It should be noted that this manner is applicable to the case that the second audio parameter sent by the second Bluetooth device is a parameter obtained according to the intersection of the first audio parameter and the audio parameter supported by the second Bluetooth device.

[0161] Manner two, the intersection of the first audio parameter and the second audio parameter can be taken as the candidate audio parameter. In this way, whether the second audio parameter sent by the second Bluetooth device is all the audio parameters supported by the second Bluetooth device or a parameter obtained according to the intersection of the first audio parameter and the audio parameter supported by the second Bluetooth device, the candidate audio parameter is an audio parameter supported by both the first Bluetooth device and the second Bluetooth device.

[0162] In this way, the candidate audio parameter with the best sound quality in the candidate audio parameters is taken as the target audio parameter, for example, the candidate audio parameter with the highest sampling rate is taken as the target audio parameter, and the target audio parameter is sent to the second Bluetooth device.

[0163] Finally, the second Bluetooth device receives and obtains the target audio parameter.

[0164] In this way, through the above steps, the first Bluetooth device and the second Bluetooth device can obtain the target audio parameter, and use the target audio parameter to perform transmission of audio data.

[0165] For example, the target codec format in the target audio parameter determined by this manner can include AAC, LHDC or aptX Adaptive, and the target sampling rate in the target audio parameter determined by this manner can be 32 KHz or 48 KHz.

[0166] In another embodiment of the present disclosure, the first Bluetooth device and the second Bluetooth device can use a custom AT Command (Attention Command, device instruction set) command to perform synchronous transmission parameter negotiation and audio parameter negotiation, and the AT Command can be transmitted based on the existing Bluetooth asynchronous link ACL and HFP protocol; the first Bluetooth device can first send a synchronous transmission parameter to the second Bluetooth device through an AT Command command to establish eSCO ultra-low delay link information; and then the first Bluetooth device sends a target audio parameter used for negotiation to the second Bluetooth device through an AT Command command.

[0167] S407, the first Bluetooth device encodes the media audio data to be played according to the target audio parameter, and obtains the target audio data.

[0168] S408, the first Bluetooth device sends the target audio data to the second Bluetooth device through the physical Bluetooth link according to the synchronization transmission parameter.

[0169] For example, the target audio data can be first encapsulated according to the packet format specified in the SCO or eSCO protocol; then, the encapsulated target audio data is sent to the second Bluetooth device on the target synchronization time slot according to the synchronization transmission parameter and the fixed Bluetooth synchronization period.

[0170] S409, the second Bluetooth device receives the target audio data through the physical Bluetooth link, and decodes the target audio data according to the target audio parameter to obtain the media audio data to be played.

[0171] In this way, by using the Bluetooth synchronization transmission link for data transmission, the audio delay can be reduced, and the audio playback experience can be improved. Moreover, by using the target audio parameter with higher sound quality negotiated, the sound quality can be avoided or reduced, and the audio playback experience can be further improved.

[0172] Figure 5 is a block diagram of a data transmission device 500 according to an example embodiment. The device 500 can be applied to a first Bluetooth device, as shown in Figure 5 The device 500 can include:

[0173] A parameter determination module 501 is configured to determine a synchronization transmission parameter of a physical Bluetooth link according to target data to be sent; the physical Bluetooth link is a communication link for transmitting data between the first Bluetooth device and a second Bluetooth device through Bluetooth.

[0174] A first message sending module 502 is configured to send a synchronization parameter indication message to the second Bluetooth device, the synchronization parameter indication message including the synchronization transmission parameter.

[0175] A target data sending module 503 is configured to send the target data to the second Bluetooth device through the physical Bluetooth link according to the synchronization transmission parameter in response to receiving a synchronization parameter response message; the synchronization parameter response message is a response message sent by the second Bluetooth device according to the received synchronization parameter indication message.

[0176] Figure 6 is a block diagram of a second data transmission device according to an example embodiment, as shown in Figure 6 The device further includes:

[0177] The first audio parameter obtaining module 601 is configured to obtain target audio parameters by performing audio parameter negotiation with the second Bluetooth device, wherein the target audio parameters comprise a target sampling rate and / or a target codec format.

[0178] The audio encoding module 602 is configured to encode the media audio data to be played according to the target audio parameters, to obtain the target audio data.

[0179] Optionally, the first audio parameter obtaining module 601 is configured to:

[0180] send an audio parameter negotiation request message to the second Bluetooth device through the physical Bluetooth link, wherein the audio parameter negotiation request message comprises first audio parameters supported by the first Bluetooth device;

[0181] receive an audio parameter negotiation response message sent by the second Bluetooth device in response to receiving the audio parameter negotiation request message, wherein the audio parameter negotiation response message comprises second audio parameters supported by the second Bluetooth device;

[0182] determine target audio parameters according to the first audio parameters and the second audio parameters.

[0183] Optionally, the parameter determining module 501 is configured to:

[0184] obtain a data type of the target data;

[0185] determine a candidate transmission parameter corresponding to the data type according to a preset type-parameter correspondence, wherein the preset type-parameter correspondence comprises a correspondence between the data type and the candidate transmission parameter;

[0186] use the candidate transmission parameter as the synchronization transmission parameter of the physical Bluetooth link.

[0187] Figure 7 is a block diagram of a third data transmission apparatus according to an example embodiment, as shown in Figure 7 The apparatus further comprises:

[0188] The first asynchronous link establishing module 701 is configured to establish a Bluetooth asynchronous transmission link with the second Bluetooth device;

[0189] The first message sending module 502 is configured to send a synchronization parameter indication message to the second Bluetooth device through the established Bluetooth asynchronous transmission link.

[0190] Figure 8 is a block diagram of a fourth data transmission apparatus according to an example embodiment, as shown in Figure 8 The apparatus further comprises:

[0191] The audio service determination module 709 is configured to acquire a target audio service being in progress, and determine whether the target audio service is a preset synchronous audio service.

[0192] The parameter determination module 501 is configured to, in a case where it is determined that the target audio service is the preset synchronous audio service, determine a synchronous transmission parameter of a physical Bluetooth link according to target data to be sent.

[0193] Figure 9 Fig. 8 is a block diagram of a fifth data transmission apparatus 800 according to an example embodiment, which can be applied to a second Bluetooth device. As shown in Fig. 8, the apparatus 800 can include: Figure 9

[0194] The first receiving module 801 is configured to receive a synchronous parameter indication message sent by a first Bluetooth device, the synchronous parameter indication message including a synchronous transmission parameter of a physical Bluetooth link.

[0195] The second message sending module 802 is configured to, in response to receiving the synchronous parameter indication message, send a synchronous parameter response message to the first Bluetooth device, where the synchronous parameter response message is used to instruct the first Bluetooth device to send target data to the second Bluetooth device through the physical Bluetooth link according to the synchronous transmission parameter.

[0196] The target data receiving module 803 is configured to periodically receive target data sent by the first Bluetooth device according to the synchronous transmission parameter.

[0197] Figure 10 Fig. 9 is a block diagram of a sixth data transmission apparatus according to an example embodiment. As shown in Fig. 9, the apparatus further includes: Figure 10

[0198] The second audio parameter acquisition module 901 is configured to acquire target audio parameters by performing audio parameter negotiation with the first Bluetooth device.

[0199] The audio decoding module 902 is configured to decode the target audio data according to the target audio parameters to obtain media audio data to be played.

[0200] Optionally, the second audio parameter acquisition module 901 is configured to:

[0201] receive an audio parameter negotiation request message sent by the first Bluetooth device through the physical Bluetooth link, where the audio parameter negotiation request message includes first audio parameters supported by the first Bluetooth device.

[0202] ​​In response to receiving the audio parameter negotiation request message, an audio parameter negotiation response message is sent to the first Bluetooth device; wherein the audio parameter negotiation response message comprises a second audio parameter supported by the second Bluetooth device; so that the first Bluetooth device determines a target audio parameter according to the first audio parameter and the second audio parameter.

[0203] Figure 11 is a block diagram of a seventh data transmission apparatus according to an exemplary embodiment, as shown in Figure 11 , the apparatus further includes:

[0204] The second asynchronous link establishment module 1001 is configured to establish a Bluetooth asynchronous transmission link with the first Bluetooth device.

[0205] The first message receiving module 801 is configured to receive a synchronization parameter indication message sent by the first Bluetooth device through the established Bluetooth asynchronous transmission link.

[0206] As to the apparatus in the above-described embodiments, the specific manners in which various modules perform operations have been described in detail in the embodiments of the method, and thus will not be described here in detail.

[0207] In summary, by using the apparatus in the above-described embodiments of the present disclosure, the synchronization transmission parameter of the physical Bluetooth link is determined according to the target data to be sent; a synchronization parameter indication message is sent to the second Bluetooth device, the synchronization parameter indication message comprising the synchronization transmission parameter; in response to receiving a synchronization parameter response message, the target data is sent to the second Bluetooth device through the physical Bluetooth link according to the synchronization transmission parameter; wherein the synchronization parameter response message is a response message sent by the second Bluetooth device according to the received synchronization parameter indication message. In this way, the target data can be sent in a synchronization mode according to the synchronization transmission parameter, improving the data transmission efficiency, so as to reduce the data delay time.

[0208] Figure 12 is a block diagram of an electronic device 1100 according to an exemplary embodiment. For example, the electronic device 1100 can be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, a router, etc.

[0209] Referring to Figure 12 , the electronic device 1100 can include one or more of the following components: a processing component 1102, a memory 1104, a power component 1106, a multimedia component 1108, an audio component 1110, an input / output (I / O) interface 1112, a sensor component 1114, and a communication component 1116.

[0210] The processing component 1102 generally controls the overall operations of the electronic device 1100, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 1102 can include one or more processors 1120 to execute instructions to complete all or a part of steps of the above methods. In addition, the processing component 1102 can include one or more modules to facilitate the interaction between the processing component 1102 and other components. For example, the processing component 1102 can include a multimedia module to facilitate the interaction between the multimedia component 1108 and the processing component 1102.

[0211] The memory 1104 is configured to store various types of data to support operations of the electronic device 1100. Examples of these data include instructions for any application or method operating on the electronic device 1100, contact data, phonebook data, messages, pictures, videos, and the like. The memory 1104 can be realized by any type of volatile or nonvolatile storage devices or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.

[0212] The power component 1106 provides power to various components of the electronic device 1100. The power component 1106 can include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 1100.

[0213] The multimedia component 1108 includes a screen providing an output interface between the electronic device 1100 and a user. In some embodiments, the screen can include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes the touch panel, the screen can be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense a touch, a slide, and a gesture on the touch panel. The touch sensor can not only sense a boundary of a touching or a sliding action, but also detect duration and pressure related to the touching or sliding action. In some embodiments, the multimedia component 1108 includes a front camera and / or a rear camera. The front camera and / or the rear camera can receive external multimedia data when the electronic device 1100 is in an operation mode, such as a photographing mode or a video mode. Each of the front camera and the rear camera can be a fixed optical lens system or have a focal length and optical zoom capability.

[0214] The audio component 1110 is configured to output and / or input audio signals. For example, the audio component 1110 includes a microphone (MIC) that is configured to receive an external audio signal when the electronic device 1100 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 1104 or transmitted via the communication component 1116. In some embodiments, the audio component 1110 also includes a speaker for outputting audio signals.

[0215] The I / O interface 1112 provides an interface between the processing component 1102 and peripheral interface modules, which can be a keypad, a click wheel, buttons, and the like. The buttons can include, but are not limited to, a home button, a volume button, a start button, and a lock button.

[0216] The sensor component 1114 includes one or more sensors for providing various state assessments for the electronic device 1100. For example, the sensor component 1114 can detect an open / closed state of the electronic device 1100, relative positioning of components, such as a display and a keypad of the electronic device 1100, a change in position of the electronic device 1100 or a component of the electronic device 1100, presence or absence of user contact with the electronic device 1100, an orientation or acceleration / deceleration of the electronic device 1100, and a temperature change of the electronic device 1100. The sensor component 1114 can include a proximity sensor configured to detect presence of a nearby object without any physical touch. The sensor component 1114 can further include a light sensor, such as a CMOS or CCD image sensor, for use in an imaging application. In some embodiments, the sensor component 1114 can further include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0217] The communication component 1116 is configured to facilitate wired or wireless communication between the electronic device 1100 and other devices. The electronic device 1100 can access a wireless network based on a communication standard, such as Wi-Fi, 2G, 3G, 4G, 5G, NB-IOT, eMTC, or other 6G, etc., or a combination thereof. In an example embodiment, the communication component 1116 receives broadcast signals or broadcast-related information from an external broadcasting management system via a broadcast channel. In an example embodiment, the communication component 1116 further includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra-WideBand (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0218] In an exemplary embodiment, the electronic device 1100 can be implemented with one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, micro-controllers, microprocessors, or other electronic elements for performing the above-described data transmission method.

[0219] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions, such as the memory 1104 including instructions, is also provided, which can be executed by the processor 1120 of the electronic device 1100 to accomplish the above-described data transmission method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disc, and an optical data storage device, etc.

[0220] In another exemplary embodiment, a computer program product including a computer program capable of being executed by a programmable apparatus is also provided, which has a code portion for executing the above-described data transmission method when executed by the programmable apparatus.

[0221] Other embodiments of the present disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the present disclosure. This application is intended to cover any variations, uses, or adaptations of the present disclosure following the general principles thereof and including such departures from the present disclosure that come within known use or custom in the art. The specification and examples are to be regarded as illustrative only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0222] It should be understood that the present disclosure is not limited to the precise structures herein described and illustrated above, and that various modifications and changes in form and detail can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the claims which follow.

Claims

1. A data transmission method, characterized by, The method applied to a first Bluetooth device comprises: determining synchronization transmission parameters of a physical Bluetooth link according to target data to be transmitted; the physical Bluetooth link is a communication link for transmitting data between the first Bluetooth device and a second Bluetooth device through Bluetooth, and the synchronization transmission parameters comprise a Bluetooth synchronization period and a target synchronization time slot in the Bluetooth synchronization period; sending a synchronization parameter indication message to the second Bluetooth device, the synchronization parameter indication message being used to indicate the synchronization transmission parameters determined by the first Bluetooth device; in response to receiving a synchronization parameter response message, transmitting the target data to the second Bluetooth device through the physical Bluetooth link according to the synchronization transmission parameters; wherein the synchronization parameter response message is a response message sent by the second Bluetooth device in the case that the synchronization parameter indication message received satisfies a preset synchronization condition, and the preset synchronization condition comprises that the second Bluetooth device supports the synchronization transmission parameters, and the number of Bluetooth synchronization transmission links established by the second Bluetooth device with Bluetooth devices other than the first Bluetooth device is less than or equal to a preset maximum synchronization number.

2. The method of claim 1, wherein, The method further comprises: obtaining a data type of the target data; determining candidate transmission parameters corresponding to the data type according to a preset type-parameter correspondence; wherein the preset type-parameter correspondence comprises a correspondence between the data type and the candidate transmission parameters; taking the candidate transmission parameters as the synchronization transmission parameters of the physical Bluetooth link.

3. The method of claim 1, wherein, The target data is target audio data, and the method further comprises: obtaining target audio parameters through audio parameter negotiation with the second Bluetooth device, wherein the target audio parameters comprise a target sampling rate and / or a target codec format; encoding media audio data to be played to obtain the target audio data according to the target audio parameters.

4. The method of claim 1, wherein, Before determining the synchronization transmission parameters of the physical Bluetooth link according to the target data to be transmitted, the method further comprises: obtaining a target audio service being performed; determining whether the target audio service is a preset synchronization audio service; The method further comprises: in the case that the target audio service is determined to be the preset synchronization audio service, determining the synchronization transmission parameters of the physical Bluetooth link according to the target data to be transmitted.

5. The method according to any one of claims 1 to 4, characterized in that, Before sending the synchronization parameter indication message to the second Bluetooth device, the method further comprises: establishing a Bluetooth asynchronous transmission link with the second Bluetooth device; The method further comprises: sending the synchronization parameter indication message to the second Bluetooth device through the established Bluetooth asynchronous transmission link.

6. A data transmission method, characterized by, The method applied to a second Bluetooth device comprises: receive a synchronization parameter indication message sent by a first Bluetooth device, the synchronization parameter indication message being used to indicate synchronization transmission parameters of a physical Bluetooth link determined by the first Bluetooth device, the synchronization transmission parameters including a Bluetooth synchronization period and a target synchronization time slot in the Bluetooth synchronization period; in response to the synchronization parameter indication message satisfying a preset synchronization condition, send a synchronization parameter response message to the first Bluetooth device, wherein the synchronization parameter response message is used to instruct the first Bluetooth device to send target data to the second Bluetooth device through the physical Bluetooth link according to the synchronization transmission parameters, and the preset synchronization condition includes that the second Bluetooth device supports the synchronization transmission parameters and the number of Bluetooth synchronization transmission links established by the second Bluetooth device with Bluetooth devices other than the first Bluetooth device is less than or equal to a preset maximum synchronization number; receive target data sent by the first Bluetooth device according to the synchronization transmission parameters.

7. The method of claim 6, wherein, The target data is target audio data, and the method further includes: obtain target audio parameters through audio parameter negotiation with the first Bluetooth device; decode the target audio data according to the target audio parameters to obtain media audio data to be played.

8. The method of claim 7, wherein, The target audio parameters are obtained through audio parameter negotiation with the first Bluetooth device, and the method further includes: receive an audio parameter negotiation request message sent by the first Bluetooth device through a physical Bluetooth link, wherein the audio parameter negotiation request message includes first audio parameters supported by the first Bluetooth device; in response to receiving the audio parameter negotiation request message, send an audio parameter negotiation response message to the first Bluetooth device, wherein the audio parameter negotiation response message includes second audio parameters supported by the second Bluetooth device; so that the first Bluetooth device determines target audio parameters according to the first audio parameters and the second audio parameters.

9. The method according to any one of claims 6 to 8, characterized in that, Before the synchronization parameter indication message sent by the first Bluetooth device is received, the method further includes: establish a Bluetooth asynchronous transmission link with the first Bluetooth device; The synchronization parameter indication message sent by the first Bluetooth device is received, and the method further includes: receive the synchronization parameter indication message sent by the first Bluetooth device through the established Bluetooth asynchronous transmission link.

10. A data transmission apparatus, characterized by comprising: The device is applied to a first Bluetooth device, and includes: a parameter determination module configured to determine synchronization transmission parameters of a physical Bluetooth link according to target data to be sent, the physical Bluetooth link being a communication link through which the first Bluetooth device and a second Bluetooth device transmit data by Bluetooth, and the synchronization transmission parameters including a Bluetooth synchronization period and a target synchronization time slot in the Bluetooth synchronization period; a first message sending module configured to send a synchronization parameter indication message to the second Bluetooth device, the synchronization parameter indication message being used to indicate the synchronization transmission parameters determined by the first Bluetooth device; The target data sending module is configured to, in response to receiving the synchronization parameter response message, send the target data to the second Bluetooth device through the physical Bluetooth link according to the synchronization transmission parameter; wherein the synchronization parameter response message is a response message sent by the second Bluetooth device in a case where the received synchronization parameter indication message meets a preset synchronization condition, and the preset synchronization condition includes that the second Bluetooth device supports the synchronization transmission parameter, and a number of Bluetooth synchronization transmission links established by the second Bluetooth device with Bluetooth devices other than the first Bluetooth device is less than or equal to a preset maximum synchronization number.

11. A data transmission apparatus, characterized by comprising: The device is applied to a second Bluetooth device, and the device includes: The first message receiving module is configured to receive a synchronization parameter indication message sent by a first Bluetooth device, the synchronization parameter indication message being used to indicate a synchronization transmission parameter of a physical Bluetooth link determined by the first Bluetooth device, and the synchronization transmission parameter including a Bluetooth synchronization period and a target synchronization time slot in the Bluetooth synchronization period. The second message sending module is configured to, in response to the synchronization parameter indication message meeting a preset synchronization condition, send a synchronization parameter response message to the first Bluetooth device; wherein the synchronization parameter response message is used to instruct the first Bluetooth device to send target data to the second Bluetooth device through the physical Bluetooth link according to the synchronization transmission parameter, and the preset synchronization condition includes that the second Bluetooth device supports the synchronization transmission parameter, and a number of Bluetooth synchronization transmission links established by the second Bluetooth device with Bluetooth devices other than the first Bluetooth device is less than or equal to a preset maximum synchronization number. The target data receiving module is configured to receive the target data sent by the first Bluetooth device according to the synchronization transmission parameter.

12. An electronic device, comprising: The device includes: A memory having a computer program stored thereon; A processor configured to execute the computer program in the memory to implement the steps of the method of any one of claims 1 to 5, or to implement the steps of the method of any one of claims 6 to 9.

13. A computer readable storage medium having stored thereon a computer program, characterized in that The program, when executed by a processing device, implements the steps of the method of any one of claims 1 to 5, or the program, when executed by a processor, implements the steps of the method of any one of claims 6 to 9.

Citation Information

Patent Citations

  • Audio data synchronization method and device

    CN113228701A

  • Method and system to configure audio processing paths for voice recognition

    US20080300025A1