Wireless audio data transmission method and device, storage medium and electronic equipment

By using hierarchical coding and dynamic retransmission counts to connect isochronous group links, the instability problem caused by changes in the communication environment in BLE wireless audio technology is solved, and adaptive high-quality wireless audio data transmission is achieved.

CN120998212APending Publication Date: 2025-11-21WUXI ZGMICRO ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511234705.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2025-08-13
Filing Date
2025-08-29
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

In BLE wireless audio technology, fixed coding rates and link parameters are difficult to adapt to rapidly changing wireless communication environments, resulting in unstable communication performance and wireless audio data transmission, and low communication quality.

Method used

A hierarchical encoder is used to encode audio data frames hierarchically, and a connection isochronous group link with dynamic retransmission count is constructed. The encoding rate and retransmission count are dynamically switched according to the channel quality to achieve adaptive transmission.

Benefits of technology

It improves the stability and reliability of wireless audio data transmission, enhances communication quality, and adapts to changes in different wireless communication environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120998212A_ABST
    Figure CN120998212A_ABST
Patent Text Reader

Abstract

The invention relates to a wireless audio data transmission method and device, a storage medium and electronic equipment, and the method comprises the steps: carrying out the coding of the same audio data frame according to a preset first coding rate and a preset second coding rate, and obtaining a first coding rate data stream and a second coding rate data stream, wherein the first coding rate is higher than the second coding rate; one or more data packets of a first type are sent, after the time for sending the data packets of the first type reaches a preset first refresh timeout value, the mode is switched to the mode for sending one or more data packets of a second type, the data packets of the first type carry audio data in the data stream of the first coding rate, and the data packets of the second type carry audio data in the data stream of the second coding rate; the data packet of the second type carries the audio data in the data stream of the second coding rate. The communication quality can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of audio transmission, and in particular to a wireless audio data transmission method and device, a storage medium and an electronic device, and claims priority to the prior application with the application number 202511135221.4 and the invention name "wireless audio data transmission method, device, storage medium and electronic device", and the priority date 2025-08-13. BACKGROUND

[0002] Wireless audio technology has been widely loved by users. Among them, the Bluetooth Low Energy (BLE) wireless audio technology based on the Connected Isochronous Stream (CIS) link to build the Connected Isochronous Group (CIG) and the Low Complexity Communication Codec (LC3) has lower power consumption and cost and higher wireless audio quality. At the same time, the new generation of BLE specification supports BLE Higher Data Throughput (HDT), which can provide higher transmission rates at the physical layer (PHY), such as 4Mbps, 6Mbps and 7.5Mbps, so that the BLE Audio technology can provide higher bandwidth Wireless High Resolution Audio (WHRA), also known as wireless audio, which can effectively improve the user experience.

[0003] However, in the application scenario of BLE wireless audio technology, since the transmission distance, the fading of wireless signals and the interference in the wireless communication environment are constantly changing, in the related technology, when performing wireless audio data transmission, based on the fixed coding rate and fixed link parameters of CIG, in the scene where the communication quality of the wireless communication environment is poor or constantly changing, it is difficult to adapt to the rapidly changing wireless communication environment, which can easily lead to unstable communication performance and wireless audio data transmission, and low communication quality. SUMMARY

[0004] Therefore, the present application provides a wireless audio data transmission method, device, storage medium and electronic device.

[0005] Specifically, the present application is realized by the following technical solutions:

[0006] According to the first aspect of the present application, an audio data transmission method is provided, and the audio data transmission method comprises:

[0007] encoding the same audio data frame to obtain a first encoding rate data stream and a second encoding rate data stream according to a first encoding rate and a second encoding rate respectively, wherein the first encoding rate is higher than the second encoding rate;

[0008] sending one or more data packets of a first type, and switching to sending one or more data packets of a second type after a first preset refresh timeout value is reached at a time of sending one data packet of the first type, wherein the data packets of the first type carry audio data in the first encoding rate data stream, and the data packets of the second type carry audio data in the second encoding rate data stream.

[0009] Optionally, the method further comprises:

[0010] discarding part or all of the data packet of the second type when a second preset refresh timeout value is reached at a time of sending one data packet of the second type, wherein the second refresh timeout value is greater than the first refresh timeout value.

[0011] Optionally, the second refresh timeout value is an integer multiple of the first refresh timeout value.

[0012] Optionally, the method further comprises:

[0013] switching back to sending the data packets of the first type after the sent data packet of the second type is successfully received.

[0014] Optionally, a maximum payload length of the data packets of the first type is the same as a maximum payload length of the data packets of the second type,

[0015] the data packets of the first type carry one or more service data units of the first encoding rate data stream,

[0016] the data packets of the second type carry one or more service data units of the second encoding rate data stream,

[0017] one service data unit in the first encoding rate data stream and one service data unit in the second encoding rate data stream correspond to the same audio data frame, and a data service unit of the first encoding rate data stream is greater than a data service unit of the second encoding rate data stream,

[0018] a number of service data units of the first encoding rate data stream carried by the data packets of the first type is less than a number of service data units of the second encoding rate data stream carried by the data packets of the second type,

[0019] a type flag bit is included in a packet header of the data packet, and the type flag bit is capable of representing whether the current data packet is the data packet of the first type or the data packet of the second type.

[0020] Optionally,

[0021] The data packet comprises a Bluetooth low energy specification connection isochronous stream protocol data unit, a type flag bit is set in a packet header of the data packet, and the type flag bit comprises:

[0022] The reserved field of the packet header of the Bluetooth low energy specification connection isochronous stream protocol data unit is acquired.

[0023] The bit at a preset position in the reserved field of the packet header of the connection isochronous stream protocol data unit is set as a type flag position value.

[0024] Optionally,

[0025] The second type of data packet sent after a time of sending one data packet of the first type reaches a preset first refresh timeout value carries at least one service data unit of a second coding rate data stream corresponding to service data units of a first coding rate data stream carried by the first type of data packet sent beyond the timeout,

[0026] The service data unit of the second coding rate data stream and the service data unit of the first coding rate data stream corresponding to each other correspond to the same audio data frame.

[0027] Optionally,

[0028] According to a preset channel detection period, the channel quality of a transmission channel used for audio data transmission is acquired,

[0029] When the channel quality is poor, the second type of data packet is continuously sent,

[0030] When the channel quality is good, the step of sending one or more data packets of the first type is performed.

[0031] Optionally, the time of sending one data packet of the first type reaches a preset first refresh timeout value, and the time of sending one data packet of the first type comprises:

[0032] The first refresh timeout value is an integer multiple of an equal time interval, a plurality of sub-events are set in each equal time interval, and one data packet of the first type is successively sent in each sub-event of an equal time interval corresponding to the integer multiple of the equal time interval, and none of the sub-events is successfully sent.

[0033] Optionally, the method further comprises:

[0034] One data packet of the first type is successfully sent within the preset first refresh timeout value;

[0035] determining an equal time interval in which the first type of data packet is successfully sent, if the equal time interval still has a secondary event not executed, sending another first type of data packet in the secondary event not executed, if the equal time interval does not have a secondary event not executed, sending another first type of data packet in the next equal time interval.

[0036] Optionally, after the sent second type of data packet is successfully received, the first type of data packet is sent again, comprising:

[0037] determining an equal time interval corresponding to the second type of data packet successfully sent, if the equal time interval still has a secondary event not executed, sending a first type of data packet in the secondary event not executed, if the equal time interval does not have a secondary event not executed, sending a first type of data packet in the next equal time interval.

[0038] Optionally, when the channel quality is poor, the second type of data packet is continuously sent, comprising:

[0039] sending a second type of data packet in the first equal time interval in the channel detection period;

[0040] after the time of sending the second type of data packet reaches a preset second refresh timeout value, discarding the second type of data packet.

[0041] Optionally,

[0042] The method further comprises:

[0043] obtaining a reserved field in control data of a link layer connection isochronous flow request protocol data unit of the Bluetooth low energy specification;

[0044] setting a bit value at a preset position in the reserved field to a value representing support for a connection isochronous group link based on a dynamic number of retransmissions;

[0045] initiating a communication link establishment request carrying the bit value at the preset position in the reserved field to a peer end, so that the peer end establishes the connection isochronous group link based on the dynamic number of retransmissions according to a preset negotiation and the communication link establishment request, and sends the one or more first type of data packets based on the connection isochronous group link.

[0046] The audio data transmission method in the technical solution encodes the same audio data frame according to the first encoding rate and the second encoding rate respectively to obtain a first encoding rate data stream and a second encoding rate data stream, wherein the first encoding rate is higher than the second encoding rate; one or more data packets of a first type are sent, and after the time of sending one data packet of the first type reaches a pre-set first refresh timeout value, one or more data packets of a second type are sent, wherein the data packet of the first type carries audio data in the first encoding rate data stream, and the data packet of the second type carries audio data in the second encoding rate data stream. In this way, the same audio data frame is encoded in parallel using the first encoding rate and the second encoding rate, so that the encoding rate used for data transmission can be adaptively selected in a wireless communication environment that is in a constantly changing scenario, and after the timeout of sending the data packet of the first type encoded using the first encoding rate, the data packet of the second type encoded using the second encoding rate is sent, so as to adapt to the changing communication environment, guarantee the stability of wireless audio data transmission, improve the reliability of wireless audio data transmission, and further improve the communication quality.

[0047] According to a second aspect of the present application, an audio data decoding method is provided, comprising:

[0048] receiving a data packet, parsing the data packet, and determining whether the data packet is a data packet of a first type carrying audio data in a first encoding rate data stream or a data packet of a second type carrying audio data in a second encoding rate data stream;

[0049] decoding the data packet of the first type according to the first encoding rate to obtain a first audio data frame, and decoding the data packet of the second type according to the second encoding rate to obtain a second audio data frame;

[0050] outputting audio sample data based on the first audio data frame and the second audio data frame.

[0051] Optionally, the outputting of the audio sample data based on the first audio data frame and the second audio data frame comprises:

[0052] if it is determined that there is a packet loss of the first audio data frame within a pre-set channel detection period, performing packet loss concealment processing on the first audio data frame based on the first audio data frame and the second audio data frame to obtain first audio data;

[0053] if it is determined that there is a packet loss of the second audio data frame within a pre-set channel detection period, performing packet loss concealment processing based on the second audio data frame to obtain second audio data;

[0054] performing data merging based on the first audio data and the second audio data to output audio sample data.

[0055] According to a third aspect of the present application, there is provided a wireless audio data transmission apparatus, the wireless audio data transmission apparatus comprising:

[0056] an encoding module configured to encode the same audio data frame according to a first encoding rate and a second encoding rate respectively to obtain a first encoding rate data stream and a second encoding rate data stream, wherein the first encoding rate is higher than the second encoding rate;

[0057] a data sending module configured to send one or more data packets of a first type, and switch to send one or more data packets of a second type after a time of sending one data packet of the first type reaches a pre-set first refresh timeout value, wherein the data packets of the first type carry audio data in the first encoding rate data stream, and the data packets of the second type carry audio data in the second encoding rate data stream.

[0058] According to a fourth aspect of the present application, there is provided a wireless audio data decoding apparatus, the wireless audio data transmission apparatus comprising:

[0059] a data receiving module configured to receive a data packet, and parse the data packet to determine whether the data packet is a data packet of a first type carrying audio data in a first encoding rate data stream, or a data packet of a second type carrying audio data in a second encoding rate data stream;

[0060] a decoding module configured to decode the data packet of the first type according to the first encoding rate to obtain a first audio data frame, and decode the data packet of the second type according to the second encoding rate to obtain a second audio data frame;

[0061] a data output module configured to output audio sample data based on the first audio data frame and the second audio data frame.

[0062] According to a fifth aspect of the present application, there is provided a storage medium having stored thereon a computer program, which, when executed by a processor, implements the steps of the audio data transmission method in any possible implementation of the first aspect.

[0063] According to a sixth aspect of the present application, there is provided an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the audio data transmission method in any possible implementation of the first aspect when executing the computer program. BRIEF DESCRIPTION OF DRAWINGS

[0064] The accompanying drawings, which are incorporated herein and form part of the specification, illustrate embodiments consistent with the present application and, together with the description, further serve to explain the principles of the application.

[0065] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or related description. Obviously, for those of ordinary skill in the art, other drawings can be obtained based on these drawings without any creative effort.

[0066] Figure 1 A flowchart of a wireless audio data transmission method provided by the embodiment of the present application is shown in the figure.

[0067] Figure 2 A flowchart of a wireless audio data transmission method provided by the embodiment of the present application is shown in the figure.

[0068] Figure 3 A flowchart of a wireless audio data transmission method provided by the embodiment of the present application is shown in the figure.

[0069] Figure 4 A flowchart of a wireless audio data decoding method provided by the embodiment of the present application is shown in the figure.

[0070] Figure 5 A structural diagram of a wireless audio data transmission device provided by the embodiment of the present application is shown in the figure.

[0071] Figure 6 A structural diagram of an encoding module provided by the embodiment of the present application is shown in the figure.

[0072] Figure 7 A structural diagram of a wireless audio data decoding device provided by the embodiment of the present application is shown in the figure.

[0073] Figure 8 A structural diagram of a decoding module provided by the embodiment of the present application is shown in the figure.

[0074] Figure 9 A structural diagram of a wireless audio data transmission system provided by the embodiment of the present application is shown in the figure.

[0075] Figure 10 A structural diagram of an electronic device provided by the embodiment of the present application is shown in the figure. DETAILED DESCRIPTION

[0076] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the following will combine the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without any creative effort fall within the protection scope of the present application.

[0077] In the related art, the wireless audio data transmission method based on the fixed coding rate and the fixed link parameter of CIG, due to the wireless communication environment in the constantly changing scene, the wireless audio data transmission of the fixed coding rate and the fixed link parameter is difficult to adapt to the constantly changing communication environment, which is easy to cause the instability of the communication performance and the wireless audio data transmission, and the communication quality is not high.

[0078] In the embodiment, in the wireless communication environment, a WHRA data adaptive transmission (AT) method is provided, which realizes the dynamic coding rate by adopting a hierarchical codec to hierarchically encode the wireless audio data, and realizes the adaptive transmission of the wireless audio data combined with the channel quality by adopting a dynamic retransmission-number connected isochronous stream (DR-CIS) link. Wherein, the multiple DR-CIS links constitute a dynamic retransmission-number connected isochronous group (DR-CIG) link, so that when the channel quality is good, the wireless audio data with high coding rate or the wireless audio data with high coding rate and the wireless audio data with low coding rate are transmitted to obtain better audio performance, and when the channel quality is poor, only the wireless audio data with low coding rate is transmitted to increase the retransmission number, so as to obtain reliable and smooth audio performance, improve the communication performance and the stability of the wireless audio data transmission, and further improve the reliability of the wireless audio data transmission.

[0079] Referring to Figure 1 The embodiment of the present application provides a wireless audio data transmission method, which can include the following steps S101 and S102:

[0080] S101, the same audio data frame is encoded according to the first coding rate and the second coding rate to obtain the first coding rate data stream and the second coding rate data stream, wherein the first coding rate is higher than the second coding rate;

[0081] In the embodiment, the same audio sample frame is encoded in parallel to obtain first encoding rate data and second encoding rate data corresponding to the audio sample frame respectively. For the same audio sample frame, the first encoding rate data and the second encoding rate data have a corresponding relationship. Taking an example of the first encoding rate being twice the second encoding rate, the size of the first encoding rate data is twice the size of the second encoding rate data for the same audio sample frame. In this way, by using two encoding rates to encode the same audio sample frame in parallel, different wireless channel communication environments can be adapted.

[0082] In the embodiment, as an optional embodiment, the first encoding rate LC3 encoder and the second encoding rate LC3 encoder are used for encoding, and the encoded audio data is packaged into service data units (SDUs). The audio sample intervals corresponding to the two SDUs are the same, that is, the audio data packaged into the service data units by the two encoders corresponds to the same audio sample frame. As an optional embodiment, the SDU packaged by the audio data encoded by the first encoding rate LC3 encoder is referred to as a high service data unit (SDU H), and the SDU packaged by the audio data encoded by the second encoding rate LC3 encoder is referred to as a low service data unit (SDU L). The size of the SDU L is smaller than that of the SDU H. As an optional embodiment, the size of the SDU H is twice that of the SDU L.

[0083] In the embodiment, as an optional embodiment, before the same audio sample frame is encoded, the method further includes:

[0084] The sampled wireless audio samples are grouped to obtain audio sample frames.

[0085] In the embodiment, as an optional embodiment, the sampled wireless audio samples are divided according to a preset division interval, for example, 10 ms. Each divided wireless audio sample corresponds to an audio sample frame.

[0086] In the embodiment, before the wireless audio data transmission is performed, a communication link between the two parties of the wireless audio data transmission needs to be constructed in advance. Therefore, as an optional embodiment, before the sampled wireless audio samples are grouped, the method further includes:

[0087] The reserved field in the control data of the link layer connection isochronous stream request protocol data unit of the Bluetooth low energy specification is obtained.

[0088] The bit value of a preset position in the reserved field is set to a value representing support for a connection isochronous group link based on a dynamic number of retransmissions.

[0089] initiating a communication link establishment request carrying a preset bit value in a reserved field to a peer end, so that the peer end establishes the dynamic retransmission number based connection isochronous group link according to the pre-negotiation and the communication link establishment request.

[0090] In the embodiment, in order to construct the dynamic retransmission number based connection isochronous group link, one bit in the reserved field (RFU, Reserved for Future Use) in the control data (CtrData) of the BLE specification link layer connection isochronous flow request (LL_CIS_REQ) protocol data unit (PDU, Protocol Data Unit) is defined as DR-CIG_En. As an optional embodiment, if DR-CIG_En is set to 1, it indicates that the request initiator supports DR-CIG, and if it is set to 0, it indicates that the request initiator does not support DR-CIG.

[0091] S102, send one or more data packets of a first type, and switch to send one or more data packets of a second type after a time of sending a data packet of the first type reaches a pre-set first refresh timeout value, wherein the data packet of the first type carries audio data in a first encoding rate data stream, and the data packet of the second type carries audio data in a second encoding rate data stream.

[0092] In the embodiment, as an optional embodiment, one of the sent one or more data packets of the second type can be a data packet of the second type corresponding to the first type data packet that has not been sent out after the time of sending the first type data packet reaches the pre-set first refresh timeout value. As another optional embodiment, the sent one or more data packets of the second type can also not include the data packet of the second type corresponding to the first type data packet that has not been sent out, but the subsequent data packet of the second type after the first type data packet that has not been sent out, and the embodiment does not limit this.

[0093] In the embodiment, as an optional embodiment, the maximum payload length of the data packet of the first type is the same as the maximum payload length of the data packet of the second type,

[0094] The data packet of the first type carries one or more service data units of the first encoding rate data stream,

[0095] The data packet of the second type carries one or more service data units of the second encoding rate data stream,

[0096] The service data unit in the first coding rate data stream and the service data unit in the second coding rate data stream correspond to the same audio data frame, and the data service unit of the first coding rate data stream is greater than the data service unit of the second coding rate data stream,

[0097] The number of service data units of the first coding rate data stream carried by the data packet of the first type is less than the number of service data units of the second coding rate data stream carried by the data packet of the second type,

[0098] The type flag bit is included in the packet header of the data packet, and the type flag bit can represent whether the current data packet is the data packet of the first type or the data packet of the second type.

[0099] In the embodiment, the first type of data packet and the second type of data packet are sent by using the constructed DR-CIG link. As an optional embodiment, the data packet includes one or more DR-CIS protocol data units (PDU). The first type of data packet is a DR-CIS PDU carrying SDU_H, and the second type of data packet is a DR-CIS PDU carrying SDU_L. Since the maximum payload length of the DR-CIS PDU carrying SDU_H is the same as the maximum payload length of the DR-CIS PDU carrying SDU_L. Therefore, the number of SDU_L carried by the second type of data packet is greater than the number of SDU_H carried by the first type of data packet. As described above, if the size of SDU_H is twice the size of SDU_L, the number of SDU_L carried by the second type of data packet is twice the number of SDU_H carried by the first type of data packet. When data is sent, if the sending time of the DR-CIS PDU carrying SDU_H reaches the first flush timeout (FT) value (FT_H) and then times out, the corresponding DR-CIS PDU carrying SDU_L is switched to, the DR-CIS PDU carrying SDU_L is sent at the next sending time, and if the sending time of the DR-CIS PDU carrying SDU_L reaches the second flush timeout value (FT_L) and then times out, the data is discarded. In this way, by using the double FT value and the variable coding rate, the number of high-definition audio data retransmissions can be effectively increased, and dynamic retransmission can be realized.

[0100] In the embodiment, as an optional embodiment, the type flag in the packet header of the data packet is defined by the reserved field of the packet header of the data packet. For example, by obtaining the reserved field of the packet header of the isochronous stream protocol data unit of the Bluetooth low energy specification, setting the bit at the preset position in the reserved field of the packet header of the isochronous stream protocol data unit as the type flag, the type flag is used for low coding rate indication (LCRI, Low Coding Rate Indication). If the type flag is set as 0, it indicates that the current data packet is a first type data packet, i.e., a high coding rate data packet (high coding isochronous stream protocol data unit); if the type flag is set as 1, it indicates that the current data packet is a second type data packet, i.e., a low coding rate data packet.

[0101] In the embodiment, as an optional embodiment, after switching to send one or more data packets of the second type, the method further comprises:

[0102] When the time of sending one data packet of the second type reaches a preset second refresh timeout value, discarding part or all of the data packet of the second type, the second refresh timeout value is greater than the first refresh timeout value.

[0103] In the embodiment, the first refresh timeout value is set according to actual needs. As an optional embodiment, the first refresh timeout value can be set as an ISO interval number, for example, it can be set as 1 ISO interval, then after unsuccessfully sending a data packet of the first type within one ISO interval, according to the corresponding relationship, a data packet of the second type corresponding to the unsuccessfully sent data packet of the first type is obtained to send the data packet of the second type in the next ISO interval; for another example, if the first refresh timeout value is set as 2 ISO intervals, after unsuccessfully sending a data packet of the first type within the first ISO interval, the data packet of the first type is continuously sent in the second ISO interval, if the data packet of the first type is still unsuccessfully sent in the second ISO interval, according to the corresponding relationship, a data packet of the second type corresponding to the data packet of the first type is obtained and sent in the third ISO interval.

[0104] In the embodiment, the second refresh timeout value is greater than the first refresh timeout value. As an optional embodiment, the second refresh timeout value is an integer multiple of the first refresh timeout value. As an optional embodiment, the second refresh timeout value is counted from the beginning of sending a data packet of the first type.

[0105] In the embodiment, as an optional embodiment, the first refresh timeout value is an integer multiple of an ISO interval, and each ISO interval can also be provided with multiple sub-events, therefore, the time of sending one data packet of the first type reaches a preset first refresh timeout value comprises:

[0106] The first type of data packet is sent in each event of the equal time interval corresponding to the integer multiple of the equal time interval, and none of the sending is successful.

[0107] In this embodiment, the event is an event for representing dynamic retransmission. As an optional embodiment, if the number of events is set to 4 and the integer multiple of the equal time interval is set to 1, the first type of data packet can be sent for a maximum of 4 times in the 4 events of the first equal time interval. If the sending is not successful for 4 times, it is indicated that the first type of data packet is not successfully sent in the first equal time interval. As another optional embodiment, if the number of events is set to 4 and the integer multiple of the equal time interval is set to 2, the first type of data packet can be sent for a maximum of 4 times (1 time of sending and 3 times of retransmission) in the 4 events of the first equal time interval. If the sending is not successful for 4 times, retransmission is entered in the 4 events of the second equal time interval. If the retransmission in the 4 events of the second equal time interval is not successful, it is indicated that the first type of data packet is not successfully sent.

[0108] In this embodiment, for the case that the equal time interval is provided with multiple events, the successful sending in the first refresh timeout value includes multiple cases. Therefore, the method further includes:

[0109] The first type of data packet is successfully sent in the first refresh timeout value.

[0110] It is judged that the equal time interval in which the first type of data packet is successfully sent. If the equal time interval has an unexecuted event, another data packet of the first type is sent in the unexecuted event. If the equal time interval does not have an unexecuted event, another data packet of the first type is sent in the next equal time interval.

[0111] In this embodiment, if the first type of data packet is not successfully sent in the last event of the equal time interval, another data packet of the first type is sent in the next event corresponding to the successfully sent event of the equal time interval.

[0112] As another optional embodiment in this embodiment, after the switching to send the second type of data packet or multiple data packets, the method further includes:

[0113] After the sent second type of data packet is successfully received, the switching is re-performed to send the first type of data packet.

[0114] In this embodiment, the equal time interval includes multiple events. As an optional embodiment, after the sent second type of data packet is successfully received, the switching is re-performed to send the first type of data packet, which includes:

[0115] determining the equal time interval corresponding to the second type of data packet which is successfully sent, if the equal time interval still has unexecuted sub-events, sending the first type of data packet in the unexecuted sub-events, if the equal time interval does not have unexecuted sub-events, sending the first type of data packet in the next equal time interval. The first type of data packet sent is the next data packet corresponding to the second type of data packet which is successfully sent.

[0116] In the embodiment, taking the second refresh timeout value as 2 equal time intervals and the first refresh timeout value as 1 equal time interval as an example, if the first type of data packet cannot be successfully sent in each sub-event of the first equal time interval, the second type of data packet corresponding to the first type of data packet is sent in each sub-event of the second equal time interval in turn until the second type of data packet is successfully sent.

[0117] After the second type of data packet is successfully sent, if the second equal time interval still has unexecuted sub-events, other first type of data packet is sent in the unexecuted sub-events, if the second equal time interval does not have unexecuted sub-events, other first type of data packet is sent in the third equal time interval.

[0118] If the second type of data packet corresponding to the first type of data packet cannot be successfully sent in each sub-event of the second equal time interval, the second type of data packet is discarded. The second refresh timeout value includes the first equal time interval and the second equal time interval, and the first refresh timeout value includes the first equal time interval. For example, when judging whether the sending time of the DR-CIS PDU (i.e. the second type of data packet) carrying SDU_L reaches the second refresh timeout value (FT_L), the starting time of the sending time of the DR-CIS PDU carrying SDU_L is from the starting time point of the sending of the DR-CIS PDU carrying SDU_H (i.e. the first type of data packet closest to the current second type of data packet) before.

[0119] In the embodiment, if the second type of data packet cannot be successfully sent within the second refresh timeout value, the second type of data packet is discarded to avoid occupying too many transmission resources.

[0120] In the embodiment, the second type of data packet is a DR-CIS PDU carrying SDU L, and taking a DR-CIS PDU carrying two SDU Ls as an example, discarding the second type of data packet means discarding the first SDU L in the DR-CIS PDU, and the second SDU L is not discarded, but placed in the next equal time interval and packaged with the next SDU L to form a new DR-CIS PDU for transmission. The DR-CIG link uses a double refresh timeout value for data transmission, wherein the double refresh timeout values are FT H and FT L, respectively, corresponding to the first refresh timeout value and the second refresh timeout value.

[0121] In the embodiment, taking the first refresh timeout value as an equal time interval and the equal time interval including multiple secondary events as an example, the flow of transmitting the first type of data packet is as follows:

[0122] In the first event of the equal time interval, one or more data packets of the first type are transmitted.

[0123] It is determined whether the data packet of the first type is successfully transmitted.

[0124] It is determined whether the equal time interval has a second event that has not been executed.

[0125] In the case that the data packet of the first type is successfully transmitted, if it is determined that the equal time interval has a second event that has not been executed, other data packets of the first type are transmitted in the second event; if it is determined that the equal time interval does not have a second event that has not been executed, the data transmission of the equal time interval is ended, and the step of transmitting one or more data packets of the first type in the next equal time interval is returned to be executed.

[0126] In the case that the data packet of the first type is not successfully transmitted, if it is determined that the equal time interval has a second event that has not been executed, the data packet of the first type that is not successfully transmitted is transmitted in the second event, and the step of determining whether the data packet of the first type is successfully transmitted is returned to be executed; if it is determined that the equal time interval does not have a second event that has not been executed, the data transmission of the equal time interval is ended, and the step of switching to transmitting one or more data packets of the second type in the next equal time interval is executed.

[0127] In the embodiment, the first type of data packet is set with the first refresh timeout value, which is used to represent an integer multiple of the equal time interval available for transmitting the first type of data packet, so that after the first type of data packet is not successfully transmitted in the integer multiple of the equal time interval, the currently transmitted first type of data packet is switched to the second type of data packet corresponding to the first type of data packet. In this way, the first refresh timeout value is used to limit the integer multiple of the equal time interval occupied by the transmission of the first type of data packet, so as to avoid that the same data packet of the first type occupies too many transmission resources.

[0128] In the embodiment, when the channel quality is good, the first type of data packet can not be successfully transmitted due to the change of the wireless communication environment. By switching to transmit the corresponding second type of data packet, the change of the wireless communication environment can be adapted. After the second type of data packet is successfully received, the link is switched back to transmit the first type of data packet to fully utilize the good channel quality and improve the stability of the wireless audio data transmission, thereby improving the communication quality.

[0129] In the embodiment, as described above, the maximum payload length of the first type of data packet is the same as that of the second type of data packet. Therefore, as an optional embodiment, at least one of the service data units of the second encoding rate data stream carried by the second type of data packet transmitted after the time of transmitting one data packet of the first type reaches the pre-set first refresh timeout value corresponds to the service data unit of the first encoding rate data stream carried by the first type of data packet transmitted beyond the timeout,

[0130] The service data unit of the second encoding rate data stream and the service data unit of the first encoding rate data stream corresponding to each other correspond to the same audio data frame.

[0131] In the embodiment, as an optional embodiment, one or more data packets of the first type are transmitted periodically with the channel detection period. Therefore, the method further comprises:

[0132] According to the pre-set channel detection period, the channel quality of the transmission channel used for audio data transmission is acquired,

[0133] When the channel quality is poor, the second type of data packet is continuously transmitted,

[0134] When the channel quality is good, the step of transmitting one or more data packets of the first type is performed.

[0135] In the embodiment, as an optional embodiment, the channel quality can be characterized by real-time measurement of the packet loss probability, including but not limited to the data packet loss rate. The smaller the real-time measurement of the packet loss probability, the better the channel quality. As another optional embodiment, the channel quality can also be characterized by the signal strength to interference plus noise ratio (SINR, Signal to Interference plus Noise Ratio). The lower the SINR, the lower the channel quality.

[0136] In the embodiment, when the channel quality is good, for example, the SINR is higher than the first threshold or the data packet loss rate is lower than the second threshold (for example, 5%), one or more data packets of the first type are sent, after the time for sending one data packet of the first type reaches the preset first refresh timeout value, switching to send one or more data packets of the second type for improving the performance of packet loss concealment (PLC), and after one data packet of the second type is successfully sent, switching back to send one or more data packets of the first type. As an optional embodiment, the channel detection period includes a plurality of equal time intervals, the first refresh timeout value includes one or more equal time intervals, one or more data packets of the first type are sent, after the time for sending one data packet of the first type reaches the preset first refresh timeout value, switching to send one or more data packets of the second type, including:

[0137] A01, in the first equal time interval in the channel detection period, sending one or more data packets of the first type;

[0138] A02, if one data packet of the first type is not successfully sent, determining that the time for sending the data packet of the first type reaches the preset first refresh timeout value, and obtaining the data packet of the second type corresponding to the data packet of the first type according to the corresponding relationship;

[0139] A03, in the next equal time interval, sending the corresponding data packet of the second type;

[0140] A04, after the corresponding data packet of the second type is successfully sent, sending the unsent data packet of the first type until the equal time interval included in the channel detection period is run out.

[0141] In the embodiment, as an optional embodiment, when the channel quality is poor, for example, the single data packet loss rate is not lower than the second threshold 5% or the SINR is not higher than the first threshold, switching to continuously send data packets of the second type.

[0142] In the embodiment, as an optional embodiment, when the channel quality is poor, continuously sending data packets of the second type, including:

[0143] In the first equal time interval in the channel detection period, sending a data packet of the second type;

[0144] After the time for sending the data packet of the second type reaches the preset second refresh timeout value, discarding the data packet of the second type.

[0145] In the embodiment, when the channel quality is poor, the second type of data packet corresponding to the first type of data packet which fails to be successfully transmitted is obtained based on the corresponding relationship, or the second type of data packet corresponding to the data packet after the last successfully transmitted first type of data packet is obtained when there is no first type of data packet which fails to be successfully transmitted.

[0146] Two embodiments are taken below to specifically describe the wireless audio data transmission method.

[0147] Figure 2 A flowchart of the wireless audio data transmission method when the channel quality is good is provided in the embodiment. As shown in FIG. 1, the first refresh timeout value is FT_H, the number of sub-events (NSE) contained in the channel detection period is NSE, the DR-CIS PDU carrying the SDU_H is SDU_H, the DR-CIS PDU carrying the SDU_L is SDU_L, and the flowchart comprises the following steps: Figure 2

[0148] A11, a data packet carrying the SDU_H is transmitted, and it is determined whether there is the SDU_H whose transmission time exceeds the FT_H, if not, step A12 is executed, and if yes, step A21 is executed;

[0149] A12, the load of the DR-CIS PDU is updated by using the SDU_H to obtain a data packet carrying a new SDU_H;

[0150] A13, the data packet carrying the new SDU_H is transmitted;

[0151] A14, it is determined whether the transmission is correct, if yes, step A15 is executed, and if not, step A16 is executed;

[0152] A15, it is determined whether there is the SDU_H which has not been transmitted and the number of transmissions is less than the NSE, if yes, step A12 is executed, and if not, step A17 is executed;

[0153] A16, it is determined whether the number of transmissions is equal to the NSE, if not, step A13 is executed, and if yes, step A17 is executed;

[0154] A17, the transmission of the data packet in the time interval is ended;

[0155] A21, the load of the DR-CIS PDU is updated by using the SDU_L to obtain a data packet carrying the SDU_L;

[0156] A22, the data packet carrying the SDU_L is transmitted;

[0157] A23, it is determined whether the transmission is correct, if yes, step A24 is executed, and if not, step A25 is executed;​

[0158] A24, determining whether there is an unsent SDU_H and the number of transmission is less than NSE, if yes, executing step A12, if no, executing step A17;

[0159] A25, determining whether the number of transmission is equal to NSE, if no, executing step A22, if yes, executing step A17.

[0160] In this embodiment, if the transmission time of the SDU_H does not exceed FT_H, the DR-CIS PDU is updated with the SDU_H to form a new DR-CIS PDU with the load of SDU_H, and the new DR-CIS PDU with the load of SDU_H is transmitted. Then, it is determined whether the DR-CIS PDU with the load of SDU_H is correctly transmitted:

[0161] If it is correctly transmitted, it is determined whether there is a new (unsent) SDU_H and the number of transmission is less than NSE in the current equal time interval, i.e. there is a new SDU_H and remaining number of transmission in the current equal time interval, the DR-CIS PDU is updated with the new SDU_H to form a new DR-CIS PDU with the load of SDU_H, and the new DR-CIS PDU with the load of SDU_H is continuously transmitted, otherwise (there is no new SDU_H in the current equal time interval, and / or, there is no remaining number of transmission), the transmission in the equal time interval is ended.

[0162] If it is not correctly received, it is determined whether the number of transmission is less than NSE in the current equal time interval, if yes, the SDU_H is retransmitted, otherwise, the transmission in the equal time interval is ended.

[0163] In this embodiment, if the channel detection period includes a plurality of equal time intervals, after the transmission in the equal time interval is ended, the LCRI of the packet header of the data packet to be transmitted in the next equal time interval is set to 0, indicating that the transmission of the SDU_H is continued.

[0164] In this embodiment, if the transmission time of the SDU_H exceeds FT_H, the DR-CIS PDU is updated with the SDU_L to form a new DR-CIS PDU with the load of SDU_L, and the new DR-CIS PDU with the load of SDU_L is transmitted. Then, it is determined whether the DR-CIS PDU with the load of SDU_L is correctly transmitted:

[0165] If it is correctly transmitted, it is determined whether there is a new SDU_H and the number of transmission is less than NSE in the current equal time interval, if yes, the DR-CIS PDU is updated with the new SDU_H to form a new DR-CIS PDU with the load of SDU_H, and the new DR-CIS PDU with the load of SDU_H is continuously transmitted according to the flow of the SDU_H. Otherwise, the transmission in the equal time interval is ended.

[0166] If not received correctly, it is judged whether the sending times in the current equal time interval is less than NSE, if yes, the SDU_L is resent, otherwise, the sending in the equal time interval is ended, the LCRI of the packet header of the DR-CIS PDU carrying the SDU_L is set to 1, indicating that the sending of the SDU_L is continued.

[0167] Figure 3 The wireless audio data transmission flowchart when the channel quality is poor is provided for the embodiment of the present application. As shown in the figure, the number of sub-events is NSE, the DR-CIS PDU carrying the SDU_L is SDU_L, the flowchart comprises: Figure 3

[0168] A31, sending the DR-CIS PDU when the channel quality is poor;

[0169] A32, updating the load of the DR-CIS PDU with the SDU_L to form a data packet carrying a new SDU_L;

[0170] A33, sending the data packet carrying the SDU_L;

[0171] A34, judging whether it is sent correctly, if yes, step A35 is executed, if not, step A36 is executed;

[0172] A35, judging whether there is a new SDU_L and the sending times is less than NSE, if yes, step A32 is executed, if not, step A37 is executed;

[0173] A36, judging whether the sending times is equal to NSE, if not, step A33 is executed, if yes, step A37 is executed;

[0174] A37, ending the sending in the equal time interval.

[0175] In the embodiment, after the data packet carrying the SDU_L is sent, it is judged whether it is sent correctly:

[0176] If it is sent correctly, it is judged whether there is a new SDU_L and the sending times is less than NSE in the current equal time interval, if yes, the load of the DR-CIS PDU is updated with the new SDU_L and the sending is continued, otherwise, the sending in the equal time interval is ended.

[0177] If not received correctly, it is judged whether the sending times in the current equal time interval is less than NSE, if yes, the data packet carrying the SDU_L is resent, otherwise, the sending in the equal time interval is ended, and the LCRI of the packet header of the data packet to be sent in the next equal time interval is set to 1.

[0178] Figure 4 ​A flowchart of a wireless audio data decoding method provided by an embodiment of the present application is shown in FIG. 1. As shown in FIG. 1, the flowchart includes the following steps. Figure 4

[0179] S401, receiving a data packet, parsing the data packet, and determining whether the data packet is a first type of data packet carrying audio data in a first encoding rate data stream or a second type of data packet carrying audio data in a second encoding rate data stream;

[0180] In this embodiment, as an optional embodiment, the data packet is a DR-CIS PDU. When the DR-CIS PDU is received, the DR-CIS PDU is parsed to obtain the LCRI value of the packet header. If the LCRI is 0, it indicates that the payload is a DR-CIS PDU carrying SDU_H, i.e., the first type of data packet. If the LCRI is 1, it indicates that the payload is a DR-CIS PDU carrying SDU_L, i.e., the second type of data packet.

[0181] S402, decoding the first type of data packet according to the first encoding rate to obtain a first audio data frame, and decoding the second type of data packet according to the second encoding rate to obtain a second audio data frame;

[0182] In this embodiment, if the continuously received data packet carrying the DR-CIS PDU carrying SDU_H also contains the DR-CIS PDU carrying SDU_L, decoding is performed at the high encoding rate LC3 (the first encoding rate).

[0183] S403, outputting audio sample data based on the first audio data frame and the second audio data frame.

[0184] In this embodiment, as an optional embodiment, the outputting of the audio sample data based on the first audio data frame and the second audio data frame includes the following steps.

[0185] If it is determined that there is a packet loss of the first audio data frame within a pre-set channel detection period, performing packet loss concealment processing on the first audio data frame based on the first audio data frame and the second audio data frame to obtain first audio data;

[0186] If it is determined that there is a packet loss of the second audio data frame within a pre-set channel detection period, performing packet loss concealment processing based on the second audio data frame to obtain second audio data;

[0187] ​The data merging is performed based on the first audio data and the second audio data, and audio sample data is output. Specifically, one of the obtained first audio data and the second audio data is selected at the same time, and the audio sample data to be output is obtained based on the selected audio data. For example, at one time, the first audio data is obtained, and the audio sample data is output based on the first audio data; at another time, the second audio data is obtained, and the audio sample data is output based on the second audio data.

[0188] In this embodiment, as an optional embodiment, the packet loss concealment processing includes but is not limited to: insertion processing, time domain correction processing, waveform replacement processing based on pitch detection, and the insertion processing includes but is not limited to: silence processing, white noise processing, and packet replacement processing.

[0189] Figure 5 A structure diagram of a wireless audio data transmission device provided in the embodiment of the application is shown in FIG. 1. Figure 5 As shown in the figure, the wireless audio data transmission device includes:

[0190] The encoding module 501 is configured to encode the same audio data frame according to a first encoding rate and a second encoding rate to obtain a first encoding rate data stream and a second encoding rate data stream, wherein the first encoding rate is higher than the second encoding rate.

[0191] The data sending module 502 is configured to send one or more data packets of a first type, and switch to send one or more data packets of a second type after a time of sending one data packet of the first type reaches a first preset refresh timeout value, wherein the data packet of the first type carries audio data in the first encoding rate data stream, and the data packet of the second type carries audio data in the second encoding rate data stream.

[0192] In this embodiment, as an optional embodiment, the data sending module 502 is further configured to discard part or all of the data packet of the second type when a time of sending one data packet of the second type reaches a second preset refresh timeout value, and the second refresh timeout value is greater than the first refresh timeout value.

[0193] Figure 6 A structure diagram of an encoding module provided in the embodiment of the application is shown in FIG. 2. Figure 6 As shown in the figure, the encoding module includes a framing unit 601, a first encoding unit 602, and a second encoding unit 603, wherein the encoding rate of the first encoding unit 602 is a first encoding rate, and the encoding rate of the second encoding unit 603 is a second encoding rate.

[0194] The framing unit 601 is configured to receive the audio data sampled, frame the audio data to obtain audio data frames, and output the audio data frames to the first encoding unit 602 and the second encoding unit 603 respectively.

[0195] In this embodiment, as an optional embodiment, the lengths of the audio data frames obtained after framing are equal.

[0196] The first encoding unit 602 is configured to perform low complexity communication compression encoding on the input audio data frames at a first encoding rate, obtain a first encoding rate data stream, and output the first encoding rate data stream.

[0197] The second encoding unit 603 is configured to perform low complexity communication compression encoding on the input audio data frames at a second encoding rate, obtain a second encoding rate data stream, and output the second encoding rate data stream.

[0198] In this embodiment, as an optional embodiment, the first encoding unit includes, but is not limited to, a high encoding rate LC3 encoding unit or other high encoding rate encoding units, and the second encoding unit includes, but is not limited to, a low encoding rate LC3 decoding unit or other high encoding rate audio encoding units.

[0199] Figure 7 A structure diagram of a wireless audio data decoding device according to an embodiment of the present application is shown in FIG. 7. Figure 7 As shown in FIG. 7, the wireless audio data decoding device includes:

[0200] The data receiving module 701 is configured to receive a data packet, analyze the data packet, and determine whether the data packet is a first type of data packet carrying audio data in a first encoding rate data stream or a second type of data packet carrying audio data in a second encoding rate data stream.

[0201] The decoding module 702 is configured to decode the first type of data packet according to the first encoding rate to obtain a first audio data frame, and decode the second type of data packet according to the second encoding rate to obtain a second output audio data frame.

[0202] The data output module 703 is configured to output audio sampling data based on the first audio data frame and the second audio data frame.

[0203] In this embodiment, as an optional embodiment, the data output module 703 includes:

[0204] The first packet loss concealment processing unit (not shown in the figure) is configured to, if it is determined that there is a packet loss of the first audio data frame within a pre-set channel detection period, perform packet loss concealment processing on the first audio data frame based on the first audio data frame and the second audio data frame to obtain first audio data.

[0205] a second packet loss concealment processing unit configured to, if it is determined that there is packet loss of the second audio data frame within a preset channel detection period, perform packet loss concealment processing based on the second audio data frame to obtain second audio data;

[0206] an output unit configured to perform data merging based on the first audio data and the second audio data and output audio sample data.

[0207] Figure 8 A decoding module structure diagram is provided for an embodiment of the present application. As shown in the diagram, the decoding module structure includes a first decoding unit 801, a second decoding unit 802, a first packet loss concealment unit 803, and a second packet loss concealment unit 804. Figure 8

[0208] The first decoding unit 801 decodes the received first type of data packet to obtain high decoding audio data frames and outputs the high decoding audio data frames to the first packet loss concealment unit 803.

[0209] The second decoding unit 802 decodes the received second type of data packet to obtain low decoding audio data frames and outputs the low decoding audio data frames to the first packet loss concealment unit 803 and the second packet loss concealment unit 804, respectively.

[0210] The first packet loss concealment unit 803 performs packet loss concealment processing on the lost data packet based on the input high decoding audio data frames and the low decoding audio data frames input from the second decoding unit and outputs first audio data frames.

[0211] The second packet loss concealment unit 804 performs packet loss concealment processing on the lost data packet based on the input low decoding audio data frames and outputs second audio data frames.

[0212] In this embodiment, as an optional embodiment, the first decoding unit includes, but is not limited to, a high coding rate LC3 decoder or other high coding rate audio decoder, and the second decoding unit includes, but is not limited to, a low coding rate LC3 decoder or other low coding rate audio decoder.

[0213] In this embodiment, the first type of data packet is transmitted to a high decoding rate LC3 decoder of a first coding rate for decoding processing, and it is determined whether there is packet loss. If there is packet loss, PLC processing is performed by the first packet loss concealment unit to eliminate the impact of high-definition audio data loss. The second type of data packet is input to a low decoding rate LC3 decoder of a second coding rate for decoding processing, and if there is packet loss, packet loss concealment processing is performed by the second packet loss concealment unit to eliminate the impact of audio data loss. Then, audio sample data is output.

[0214] ​In the embodiment, the first packet loss concealment unit uses the second type of data packet as auxiliary data to perform the packet loss concealment processing of the first type of data packet, and the second packet loss concealment unit performs the packet loss concealment processing without auxiliary data.

[0215] In the embodiment, as an optional embodiment, the packet loss concealment processing includes but is not limited to: insertion processing, time domain correction processing, waveform replacement processing based on pitch detection, and the insertion processing includes but is not limited to: silence processing, white noise processing, and packet replacement processing.

[0216] Figure 9 A structural schematic diagram of a wireless audio data transmission system provided by the embodiment is shown in the figure. Figure 9 As shown in the figure, it includes a WUA (Wireless Unicast Audio) sound source device 901 and a WUA terminal device 902, wherein,

[0217] The WUA sound source device 901 includes but is not limited to: a smart phone, a smart sound box, a personal computer, a smart television, etc., and the WUA terminal device includes but is not limited to: a wireless earphone, a wireless sound box.

[0218] In the embodiment, the WUA sound source device and the WUA terminal device use a DR-CIG (Dynamic Retransmission Count-based Isochronous Group) link for high-definition wireless audio data transmission, wherein the DR-CIG link includes multiple DR-CIG streams based on dynamic retransmission count, and the DR-CIG stream uses a hierarchical codec for hierarchical coding of dynamic coding rate.

[0219] In the embodiment, as an optional embodiment, the WUA sound source device 901 is a central device of the DR-CIG link, and the WUA terminal device 902 is a peripheral device of the DR-CIG link. The WUA sound source device 901 is a wireless audio data transmission device including an encoder, the WUA terminal device 902 is a wireless audio data decoding device including a decoder, and the encoder and the decoder constitute a hierarchical codec.

[0220] In the embodiment, the WUA sound source device sends a DR-CIS PDU carrying an SDU_H or an SDU_L through the DR-CIG link based on dynamic retransmission count.

[0221] In this embodiment, in order to support DR-CIG link transmission, the reserved field (RFU, Reserved for Future Use) in the control data (CtrData) of the link layer connection isochronous flow request (LL_CIS_REQ) protocol data unit of the BLE specification is extended: one bit in the reserved field is defined as DR-CIG_En, wherein if DR-CIG_En is set to 1, it indicates that the WUA terminal device or the WUA sound source device supports DR-CIG, and set to 0 indicates that it does not support DR-CIG.

[0222] In this embodiment, the WUA sound source device sets DR-CIG_En to 1 in the CtrData of the LL_CIS_REQ PDU to establish a DR-CIG link with the WUA terminal device.

[0223] The following specific embodiments are described.

[0224] This embodiment takes a wireless two-channel high-resolution audio (WTC-HRA, Wireless Two-Channel High Resolution Audio) sound box system as an example, wherein the WUA sound source device is a smart phone, and the WUA terminal device is a wireless sound box.

[0225] The WUA sound source device divides each channel of the two-channel high-definition digital audio signal with a sampling rate of 96 kHz and a quantization bit of 24 into a frame every 10 ms, the single-channel encoding rate of the first encoding rate LC3 encoding unit is 457.6 kbps, the single-channel encoding rate of the second encoding rate LC3 encoding unit is 228.8 kbps, the size of SDU_H is 572 bytes, and the size of SDU_L is 286 bytes.

[0226] In this embodiment, the DR-CIG link is composed of two DR-CIS links, one DR-CIS link (denoted as DR-CIS0) transmits left-channel audio, and the other DR-CIS link (denoted as DR-CIS1) transmits right-channel audio. The WUA sound source device transmits the DR-CIS PDU using the 6Mbps rate of BLE HDT PHY, the load size is 572 bytes, contains one SDU_H or two SDU_L, and occupies air time for 853us. The WUA terminal device replies to the confirmation information of the DR-CIS NULL PDU using BLE2M PHY, and occupies air time for 44us. The time of inter frame space (T_IFS) is equal to 80us, and the time of minimum slot space (T_MSS) is equal to 123us.

[0227] In this embodiment, the two DR-CIS links adopt interleaving mode, and the interval between sub-events is 2.2 ms. The equal time interval of the DR-CIG link is 10 ms, the NSE is 4, the burst number (BN) is 1, FT_H is equal to 1, and FT_L is equal to 2.

[0228] With the above link parameters, when the wireless channel quality is good, each SDU_H can be retransmitted at most 3 times (4 times in total), and even if retransmission fails 3 times, the corresponding SDU_L can still be transmitted (retransmitted) 4 times, that is, the same audio data corresponding to SDU_H and SDU_L can be retransmitted at most 7 times. When the wireless channel quality is poor, each SDU_L can be retransmitted at most 7 times.

[0229] The following takes the DR-CIS 0 link (the case of the DR-CIS 1 link is similar) as an example to illustrate the sending process of the DR-CIG center device (WUA audio source device) when the channel quality is good as follows:

[0230] Suppose that in the ISO Interval with sequence number n, only the SDU_H with sequence number n needs to be sent, that is, the SDU_H with sequence number n-1 has been successfully sent in the ISO Interval with sequence number n-1, and therefore, the DR-CIS PDU load with sequence number n only contains the SDU_H with sequence number n.

[0231] The DR-CIG center device sends the SDU_H (DR-CIS PDU) with sequence number n in the first sub-event (Sub-Interval), and if it is correctly received by the WUA terminal device, the sending in the ISO Interval with sequence number n is ended.

[0232] Next, in the ISO Interval with sequence number n+1, only the SDU_H with sequence number n+1 needs to be sent, and therefore, the DR-CIS PDU load with sequence number n+1 only includes the SDU_H with sequence number n+1. If the DR-CIG center device sends the DR-CIS PDU with sequence number n+1 in the next 4 Sub-Intervals, and it is not correctly received by the WUA terminal device, at this time, the sending times are equal to the NSE, and the sending in the ISO Interval with sequence number n+1 is ended.

[0233] Next, in the ISO Interval with sequence number n+2, there is a timeout of the SDU_H with sequence number n+1, therefore, the payload of the DR-CIS PDU with sequence number n+2 contains the SDU_L with sequence number n+1 and the SDU_L with sequence number n+2. If the DR-CIG center device sends the DR-CIS PDU with sequence number n+2 (the SDU_L with sequence number n+1 and the SDU_L with sequence number n+2) in the first two Sub-Intervals, none of them is correctly received by the WUA terminal device, but the DR-CIS PDU with sequence number n+2 sent in the third Sub-Interval is correctly received by the terminal device. Therefore, there are still remaining Sub-Intervals, and the payload of the DR-CIS PDU with sequence number n+2 sent in the fourth Sub-Interval only contains the SDU_H with sequence number n+2 (the SDU_H corresponding to the SDU_L with sequence number n+2), assuming that the DR-CIS PDU with sequence number n+2 sent in the fourth Sub-Interval is also correctly received by the terminal device.

[0234] In the ISO Interval with sequence number n+3, only the SDU_H with sequence number n+3 needs to be sent, therefore, the payload of the DR-CIS PDU with sequence number n+3 only contains the SDU_H with sequence number n+3. If the DR-CIG center device sends the DR-CIS PDU with sequence number n+3 in the first Sub-Interval, it is correctly received by the terminal device, therefore, the sending in the ISO Interval with sequence number n+3 is ended.

[0235] In this embodiment, the SDU_H with sequence number n+1 is not correctly received after being retransmitted for three times, the SDU_L with sequence number n+1 is correctly received, the SDU_H with sequence number n, the SDU_H with sequence number n+2 and the SDU_H with sequence number n+3 are all correctly received. Therefore, the WUA terminal device uses the first decoding unit to perform the packet loss concealment processing to eliminate the influence of the loss of the audio data of the SDU_H with sequence number n+1. For example, the first packet loss concealment unit can use the audio data of the SDU_L with sequence number n+1 as auxiliary data to improve the performance of the packet loss concealment.

[0236] In this embodiment, as another optional embodiment, for the DR-CIS 1 link (the case of the DR-CIS 0 link is similar), taking the transmission process when the DR-CIG central device is in the case of poor communication channel as an example, assuming that the SDU_H with sequence number m-1 times out, in the ISO Interval with sequence number m, the sending of the SDU_H with the first encoding rate is switched to the sending of the SDU_L with the second encoding rate, therefore, in the ISO Interval with sequence number m, the SDU_L with sequence number m-1 and the SDU_L with sequence number m need to be sent, so the DR-CIS PDU with sequence number m contains the SDU_L with sequence number m-1 and the SDU_L with sequence number m. Assuming that the DR-CIG central device sends the DR-CIS PDU with sequence number m for 4 consecutive Sub-Intervals, none of which are correctly received by the terminal device, therefore, the number of transmissions is equal to NSE, the sending in the ISO Interval with sequence number m-1 is ended, and the SDU_L with sequence number m-1 times out and is discarded.

[0237] Next, in the ISO Interval with sequence number m+1, the SDU_L with sequence number m and the SDU_L with sequence number m+1 need to be sent, therefore, the DR-CIS PDU with sequence number m+1 contains the SDU_L with sequence number m and the SDU_L with sequence number m+1. Assuming that the DR-CIG central device sends the DR-CIS PDU with sequence number m+1 for 4 consecutive Sub-Intervals, none of which are correctly received, therefore, the number of transmissions is equal to NSE, the sending in the ISO Interval with sequence number m+1 is ended, and the SDU_L with sequence number m times out and is discarded.

[0238] Then, in the ISO Interval with sequence number m+2, the SDU_L with sequence number m+1 and the SDU_L with sequence number m+2 need to be sent, therefore, the DR-CIS PDU with sequence number m+2 contains the SDU_L with sequence number m+1 and the SDU_L with sequence number m+2. Assuming that the DR-CIG central device sends the DR-CIS PDU with sequence number m+2 for 3 consecutive Sub-Intervals, none of which are correctly received, but in the fourth Sub-Interval, the DR-CIS PDU with sequence number m+2 is correctly received, thereby ending the sending in the ISO Interval with sequence number m+2.

[0239] In the ISO Interval with sequence number m+3, only the SDU_L with sequence number m+3 needs to be sent, therefore, the DR-CIS PDU with sequence number m+3 only contains the SDU_L with sequence number m+3. As an optional embodiment, the two SDU_L with sequence number m+3 can also be repeated. The DR-CIG center device sends the DR-CIS PDU with sequence number m+3 in the first Sub-Interval, which is correctly received by the terminal device, therefore, the sending in the ISO Interval with sequence number m+3 is ended.

[0240] In the embodiment, the SDU_H and SDU_L with sequence number m-1 are not correctly received, the SDU_L with sequence number m is not correctly received after 7 times of retransmission, therefore, the terminal device uses the second packet loss concealment unit to perform packet loss concealment to eliminate the influence of audio data loss. The SDU_L with sequence number m+1 is correctly received after 7 times of retransmission, the SDU_L with sequence number m+2 is correctly received after 3 times of retransmission, and the SDU_L with sequence number m+3 is correctly received after 1 time of sending. Compared with the sending of SDU_H, the sending of SDU_L can increase the number of retransmissions to improve the reliability of wireless audio data transmission when the channel quality is characterized as poor.

[0241] In the embodiment, when sending wireless audio data, when the packet loss rate is lower than the first threshold set in advance, the first type of data packet is mainly sent, and the second type of data packet is sent at intervals for packet loss compensation. When the packet loss rate is not lower than the first threshold, the second type of data packet is sent. In this way, by using the adaptive transmission method of WHRA, in a wireless communication environment with a short distance, small fading and small interference, high-performance WHRA transmission can be supported, in a wireless communication environment with a long distance, large fading and large interference, without channel quality feedback or link parameter update request, the coding rate and the number of retransmissions are adaptively and dynamically adjusted, so that reliable and smooth wireless high-definition audio data transmission is maintained, and the ability of wireless high-definition audio data to adapt to rapid changes in the wireless communication environment during transmission is improved.

[0242] Based on the same inventive concept, the embodiment of the present application also provides a storage medium having a computer program stored thereon, and the program is executed by a processor to implement the steps of the audio data transmission method in any possible implementation manner described above.

[0243] Optionally, the storage medium can be a non-transitory computer readable storage medium, 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 disk, and an optical data storage device, etc.

[0244] Based on the same inventive concept, refer to Figure 10The embodiment of the present application also provides an electronic device, which comprises a memory 101 (for example, a non-volatile memory), a processor 102, and a computer program stored in the memory 101 and capable of running on the processor 102, wherein the processor 102 implements the steps of the audio data transmission method in any possible implementation manner described above when executing the program, and can be equivalent to the audio data transmission apparatus as described above. Of course, the processor can also be used to process other data or perform calculations. The electronic device can be a PC, a server, a terminal, or the like.

[0245] As shown in Figure 10 The electronic device can generally comprise a memory 103, a network interface 104, and an internal bus 105. In addition to these components, other hardware can also be included, which will not be described herein.

[0246] It should be noted that the audio data transmission apparatus described above can be implemented by software, and as a logically meaningful apparatus, it is formed by reading the computer program instructions stored in the non-volatile memory into the memory 103 and running by the processor 102 of the electronic device in which it is located.

[0247] Embodiments of the subject matter and the functional operations described in this specification can be implemented in digital electronic circuitry, in tangibly-embodied computer software or firmware, in computer hardware, including the structures disclosed in this specification and their structural equivalents, or in combinations of one or more of them. Embodiments of the subject matter described in this specification can be implemented as one or more computer programs, i.e., one or more modules of computer program instructions encoded on a tangible non-transitory program carrier to be executed by, or to control the operation of, data processing apparatus. Alternatively or additionally, the program instructions can be encoded on an artificially generated propagated signal, e.g., a machine-generated electrical, optical, or electromagnetic signal that is generated to encode information for transmission to suitable receiver apparatus for execution by a data processing apparatus. The computer storage medium can be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or a combination of one or more of them.

[0248] The processes and logic flows described in this specification can be performed by one or more programmable computers executing one or more computer programs to perform actions by operating on input data and generating output. The processes and logic flows can also be performed by special purpose logic circuitry, e.g., an FPGA (field programmable gate array) or an ASIC (application-specific integrated circuit), and the apparatus can also be implemented as special purpose logic circuitry.

[0249] Computers suitable for the execution of a computer program include, by way of example, general and / or special purpose microprocessors, or any other kind of central processing unit. Generally, a central processing unit will receive instructions and data from a read-only memory and / or a random access memory. The essential elements of a computer are a central processing unit for performing or executing instructions and one or more memory devices for storing instructions and data. Generally, a computer will also include, or be operatively coupled to receive data from or transfer data to, or both, one or more mass storage devices for storing data, e.g., magnetic, magneto-optical disks, or optical disks. However, a computer need not have such devices. Moreover, a computer can be embedded in another device, e.g., a mobile telephone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a Global Positioning System (GPS) receiver, or a portable storage device (e.g., a universal serial bus (USB) flash drive), to name just a few.

[0250] Computer readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media and memory devices, including by way of example semiconductor memory devices, e.g., EPROM, EEPROM, and flash memory devices; magnetic disks, e.g., internal hard disks or removable disks; magneto-optical disks; and CD-ROM and DVD-ROM disks. The processor and the memory can be supplemented by, or incorporated in, special purpose logic circuitry.

[0251] While this specification contains many specifics, these should not be construed as limitations on the scope of any invention or of any claimed

[0252] Similarly, while operations are depicted in the drawings in a particular order, this should not be understood as requiring such order, nor that all illustrated operations be performed, to implement and / or make use of the present application. In certain circumstances, multitasking and parallel processing can be advantageous. Moreover, the separation of various system modules and components in the embodiments described above should not be understood as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products.

[0253] Thus, particular embodiments of the subject matter have been described. Other embodiments are within the scope of the following claims. In some cases, actions recited in the claims can be performed in a different order and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve the desired results. In certain implementations, multitasking and parallel processing can be advantageous.

[0254] It is noted that, in this document, the terms "first", "second", etc. are used merely as label, and are not necessarily intended to signify that a particular entity or action is in some way subordinate to another entity or action, or that one entity came before another entity, according to some other temporal, logical, or other ordering. Moreover, the terms "comprises", "comprising", or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.

[0255] The above description is that of current embodiments of the application. Various modifications and changes can be made thereto without departing from the spirit and scope of the application as set forth. The scope of the application is not to be limited to the embodi ments disclosed in this release and that the intent is that applications meeting all of the written claims are within the scope of the application.

Claims

1. A method of wireless audio data transmission, characterized by, The method comprises: encoding the same audio data frame according to a preset first encoding rate and a preset second encoding rate to obtain a first encoding rate data stream and a second encoding rate data stream, wherein the first encoding rate is higher than the second encoding rate; sending one or more data packets of a first type, and switching to sending one or more data packets of a second type after a preset first refresh timeout value is reached when sending one data packet of the first type, wherein the data packet of the first type carries audio data in the first encoding rate data stream, and the data packet of the second type carries audio data in the second encoding rate data stream.

2. The wireless audio data transmission method of claim 1, wherein, The method further comprises: discarding part or all of the data packet of the second type when a preset second refresh timeout value is reached when sending one data packet of the second type, wherein the second refresh timeout value is greater than the first refresh timeout value.

3. The wireless audio data transmission method of claim 2, wherein, The second refresh timeout value is an integer multiple of the first refresh timeout value.

4. The wireless audio data transmission method of claim 1, wherein, The method further comprises: switching back to sending the data packet of the first type after the sent data packet of the second type is successfully received.

5. The wireless audio data transmission method of claim 1, wherein, The maximum payload length of the data packet of the first type is the same as the maximum payload length of the data packet of the second type, the data packet of the first type carries one or more service data units in the first encoding rate data stream, the data packet of the second type carries one or more service data units in the second encoding rate data stream, one service data unit in the first encoding rate data stream and one service data unit in the second encoding rate data stream correspond to the same audio data frame, and the number of service data units in the first encoding rate data stream is greater than the number of service data units in the second encoding rate data stream, the number of service data units in the first encoding rate data stream carried by the data packet of the first type is less than the number of service data units in the second encoding rate data stream carried by the data packet of the second type, a type flag bit is included in the packet header of the data packet, and the type flag bit can represent whether the current data packet is the data packet of the first type or the data packet of the second type.

6. The audio data transmission method of claim 5, wherein, The data packet comprises a Bluetooth Low Energy specification connection isochronous stream protocol data unit, and the type flag bit is included in the packet header of the data packet. The method further comprises: obtaining a reserved field of the packet header of the Bluetooth Low Energy specification connection isochronous stream protocol data unit; setting a type flag bit value in the bit at a preset position in the reserved field of the packet header of the connection isochronous stream protocol data unit.

7. The wireless audio data transmission method according to claim 1, wherein at least one of the service data units in the second encoding rate data stream carried by the data packet of the second type sent after the preset first refresh timeout value is reached when sending one data packet of the first type corresponds to the service data unit in the first encoding rate data stream carried by the data packet of the first type sent at the timeout, the corresponding service data unit in the second encoding rate data stream and the corresponding service data unit in the first encoding rate data stream correspond to the same audio data frame.

8. The wireless audio data transmission method according to claim 1, wherein obtaining the channel quality of the transmission channel used for audio data transmission according to a preset channel detection period, continuously sending the second type of data packets when the channel quality is poor, when the channel quality is good, performing the step of sending the one or more data packets of the first type.

9. The wireless audio data transmission method of claim 1, wherein, the time of sending the one data packet of the first type reaches a preset first refresh timeout value, comprising: the first refresh timeout value is an integer multiple of equal time intervals, each equal time interval is provided with a plurality of sub-events, and each sub-event of the equal time interval corresponding to the integer multiple of the equal time interval is sequentially sent the one data packet of the first type, and none of the sub-events is successfully sent.

10. The wireless audio data transmission method of claim 9, wherein, It also includes: successfully sending the one data packet of the first type within the preset first refresh timeout value; judging the equal time interval in which the one data packet of the first type is successfully sent, and if the equal time interval still has a sub-event that is not executed, sending another data packet of the first type within the sub-event that is not executed; if the equal time interval does not have a sub-event that is not executed, sending another data packet of the first type in the next equal time interval.

11. The wireless audio data transmission method of claim 4, wherein, after the sent second type of data packet is successfully received, the sending of the first type of data packet is switched again, comprising: determining the equal time interval corresponding to the successfully sent second type of data packet, and if the equal time interval still has a sub-event that is not executed, sending the first type of data packet within the sub-event that is not executed; if the equal time interval does not have a sub-event that is not executed, sending the first type of data packet in the next equal time interval.

12. The wireless audio data transmission method of claim 8, wherein, continuously sending the second type of data packets when the channel quality is poor, comprising: sending the second type of data packet in the first equal time interval within the channel detection period; after the time of sending the second type of data packet reaches a preset second refresh timeout value, discarding the second type of data packet.

13. The wireless audio data transmission method of claim 1, wherein, The method further comprises: obtaining control data in a reserved field of a link layer connection isochronous flow request protocol data unit of a Bluetooth low energy specification; setting a bit value at a preset position in the reserved field to a value representing support for a connection isochronous group link based on a dynamic number of retransmissions; initiating a communication link establishment request carrying the bit value at the preset position in the reserved field to a peer end, so that the peer end establishes the connection isochronous group link based on the dynamic number of retransmissions according to a preset negotiation and the communication link establishment request, and sends the one or more data packets of the first type based on the connection isochronous group link.

14. A wireless audio data decoding method, characterized by, comprising: receiving the data packet sent by the wireless audio data transmission method according to claim 1, parsing the data packet, and determining whether the data packet is a first type of data packet carrying audio data in a first encoding rate data stream or a second type of data packet carrying audio data in a second encoding rate data stream; decoding the first type of data packet according to the first encoding rate to obtain a first audio data frame, and decoding the second type of data packet according to the second encoding rate to obtain a second audio data frame; outputting audio sample data based on the first audio data frame and the second audio data frame.

15. The audio data decoding method according to claim 14, wherein, The outputting of the audio sample data based on the first audio data frame and the second audio data frame, comprising: If it is determined that there is a packet loss of the first audio data frame within a preset channel detection period, the first audio data frame is subjected to a packet loss concealment process based on the first audio data frame and the second audio data frame, to obtain first audio data; If it is determined that there is a packet loss of the second audio data frame within a preset channel detection period, the second audio data frame is subjected to a packet loss concealment process, to obtain second audio data; The first audio data and the second audio data are subjected to data merging, and audio sampling data is output.

16. A wireless audio data transmission apparatus, characterized by comprising: The method comprises: The encoding module is configured to encode the same audio data frame at a first encoding rate and a second encoding rate respectively to obtain a first encoding rate data stream and a second encoding rate data stream, wherein the first encoding rate is higher than the second encoding rate; The data sending module is configured to send one or more data packets of a first type, and switch to sending one or more data packets of a second type after a time of sending one data packet of the first type reaches a preset first refresh timeout value, wherein the data packet of the first type carries audio data in the first encoding rate data stream, and the data packet of the second type carries audio data in the second encoding rate data stream.

17. A wireless audio data decoding apparatus, characterized by comprising: The method comprises: The data receiving module is configured to receive a data packet sent by the wireless audio data transmission device of claim 16, analyze the data packet, and determine whether the data packet is a data packet of a first type carrying audio data in the first encoding rate data stream or a data packet of a second type carrying audio data in the second encoding rate data stream; The decoding module is configured to decode the data packet of the first type according to the first encoding rate to obtain a first audio data frame, and decode the data packet of the second type according to the second encoding rate to obtain a second audio data frame; The data output module is configured to subject the first audio data frame and the second audio data frame to data merging, and output audio sampling data.

18. A storage medium, characterized by A program or instruction is stored on a storage medium, and the program or instruction is run by a processor to implement the steps of the wireless audio data transmission method of any one of claims 1 to 11, and / or implement the steps of the wireless audio data decoding method of claim 14 or 15.

19. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the program to implement the steps of the audio data transmission method of any one of claims 1 to 13, and / or implement the steps of the audio data decoding method of claim 14 or 15.