WO2023246282A1 - Audio data transmission method and apparatus, electronic device, and audio playback equipment - Google Patents

Audio data transmission method and apparatus, electronic device, and audio playback equipment Download PDF

Info

Publication number
WO2023246282A1
WO2023246282A1 PCT/CN2023/090334 CN2023090334W WO2023246282A1 WO 2023246282 A1 WO2023246282 A1 WO 2023246282A1 CN 2023090334 W CN2023090334 W CN 2023090334W WO 2023246282 A1 WO2023246282 A1 WO 2023246282A1
Authority
WO
WIPO (PCT)
Prior art keywords
binary data
encoded packet
data group
packet
binary
Prior art date
Application number
PCT/CN2023/090334
Other languages
French (fr)
Chinese (zh)
Inventor
颜廷管
余庆华
杨建新
王泷
Original Assignee
哲库科技(上海)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 哲库科技(上海)有限公司 filed Critical 哲库科技(上海)有限公司
Publication of WO2023246282A1 publication Critical patent/WO2023246282A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/233Processing of audio elementary streams
    • H04N21/2335Processing of audio elementary streams involving reformatting operations of audio signals, e.g. by converting from one coding standard to another
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/439Processing of audio elementary streams
    • H04N21/4398Processing of audio elementary streams involving reformatting operations of audio signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication

Definitions

  • This application relates to the field of data transmission technology, and more specifically, to a method, device, electronic equipment and audio playback equipment for transmitting audio data.
  • the electronic device encodes the pulse code modulation (PCM) audio data and then transmits it to the audio playback device. Since wireless transmission is susceptible to interference, the data received by the playback device may have errors. If data transmission fails, the data needs to be retransmitted.
  • PCM pulse code modulation
  • Data retransmission in related technologies reduces transmission efficiency and is prone to large delays, resulting in a decrease in the user's audio experience and even lags and silence.
  • This application provides a method, device, electronic equipment and audio playback equipment for transmitting audio data. Various aspects involved in the embodiments of this application are introduced below.
  • a first aspect of the present application provides a method for transmitting audio data, including: splitting initial PCM audio data into at least a first binary data group and a second binary data group; The group and the second binary data group perform audio encoding respectively; respectively transmit the first encoding packet corresponding to the first binary data group and the second encoding packet corresponding to the second binary data group through the wireless channel; in response to determining The transmission of the first encoded packet fails, and the first encoded packet is retransmitted, wherein the first binary data group and the second binary data group respectively correspond to the first plurality of binary bits and the second batch of the initial PCM audio data. Batch one or more binary bits.
  • a method for receiving audio data including: receiving a first encoded packet through a wireless channel; in response to determining that the transmission of the first encoded packet fails, receiving a retransmitted first encoded packet; and performing processing on the first encoded packet.
  • audio decoding to obtain a first binary data set; generating PCM audio data based at least in part on the first binary data set; wherein the first binary data set corresponds to a first plurality of initial PCM audio data Binary bits.
  • a device for transmitting audio data including: a processor configured to: split the initial PCM audio data into at least a first binary data group and a second binary data group, and perform the processing on the first binary data group.
  • the binary data group and the second binary data group perform audio encoding respectively; and the transmitter is configured to: respectively transmit the first encoding packet and the second binary data corresponding to the first binary data group through the wireless channel.
  • the second encoded packet corresponding to the group; in response to determining that the transmission of the first encoded packet fails, retransmitting the first encoded packet; wherein the first binary data group corresponds to the first plurality of binary bits of the initial PCM audio data,
  • the second set of binary data corresponds to a second batch of one or more binary bits of the original PCM audio data.
  • a fourth aspect provides a device for receiving audio data, including: a receiver configured to: receive a first encoded packet through a wireless channel; in response to determining that transmission of the first encoded packet fails, receive a retransmitted first encoded packet; A processor configured to: perform audio decoding on the first encoded packet to obtain a first binary data group; generate PCM audio data based at least in part on the first binary data group; wherein, the first binary data group Corresponds to the first multiple bits of the initial PCM audio data.
  • a fifth aspect provides an electronic device, including the device described in the third aspect.
  • a sixth aspect provides an audio playback device, including the device described in the fourth aspect.
  • the embodiment of the present application can retransmit it at a smaller granularity, thereby reducing the amount of retransmitted data, improving transmission efficiency, and reducing transmission delay.
  • Figure 1 is a schematic flow chart of a Bluetooth audio transmission method in related technologies.
  • Figure 2 is a schematic flowchart of a method for transmitting audio data provided by an embodiment of the present application.
  • FIG. 3 is a schematic flowchart of a method for receiving audio data provided by another embodiment of the present application.
  • Figure 4 is an example diagram of splitting initial PCM audio data provided by the embodiment of the present application.
  • FIG. 5 is an example diagram of the encoding method of the first binary data group provided by the embodiment of the present application.
  • FIG. 6 is an example diagram of the encoding method of the second binary data group provided by the embodiment of the present application.
  • FIG. 7 is a schematic flowchart of a Bluetooth audio transmission method provided by an embodiment of the present application.
  • Figure 8 is a schematic structural diagram of a device for transmitting audio data provided by an embodiment of the present application.
  • Figure 9 is a schematic structural diagram of a device for receiving audio data provided by another embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • Figure 11 is a schematic structural diagram of an audio playback device provided by an embodiment of the present application.
  • wireless audio playback devices such as Bluetooth headsets
  • TWS wireless studio
  • TWS headset noise reduction technology using TWS noise reduction headsets in noisy scenes such as subways, buses or airports will provide a better experience than ordinary wired headsets.
  • the audio played by the wireless audio playback device is received through wireless transmission. That is to say, through wireless transmission, the electronic device as the sending end can transmit audio data to the audio playback device as the receiving end.
  • wireless transmission the electronic device as the sending end can transmit audio data to the audio playback device as the receiving end.
  • the electronic device transmits audio data to the audio playback device, and the audio playback device receives the audio data and plays it.
  • Electronic devices are, for example, mobile phones, tablet computers, etc.
  • Audio playback devices are, for example, Bluetooth headsets, Bluetooth speakers, etc.
  • step S110 starts with a lossless music data source.
  • the lossless audio source is, for example, a lossless audio compression coding (free lossless audio codec, FLAC) audio source.
  • the audio sources to be sent by electronic devices can also be lossy audio sources.
  • the lossy audio source is, for example, an MP3 audio source.
  • step S120 PCM decoding is performed on the sound source to obtain PCM audio data.
  • PCM decoding is to decode the audio source data into PCM audio data.
  • Bluetooth audio encoding is performed on the PCM audio data to obtain an encoded packet.
  • the Bluetooth audio codec may be lossless FLAC or Apple lossless audio codec (ALAC).
  • Lossless audio compression encoding audio sources can be collectively referred to as Lossless audio sources.
  • Bluetooth audio coding may be Sub-band coding (SBC) or Advanced Audio Coding (AAC).
  • Electronic devices encode Bluetooth audio in units of the sampling depth of PCM audio.
  • Sampling depth is also called quantization accuracy.
  • the sampling depth of PCM audio can be represented by the number of bits of PCM audio data. For example, when the PCM audio data is 24 bits, one encoding packet contains 24 bits of PCM audio data.
  • step S140 the Bluetooth sending module wirelessly transmits the encoded packet.
  • the sending module is also called the transmitting module.
  • the encoded packet reaches the audio playback device.
  • the Bluetooth receiving module receives the transmitted encoded packet.
  • step S160 the received Bluetooth audio encoded data is PCM decoded to obtain PCM audio data.
  • the number of bits of PCM audio data decoded by the audio playback device is the same as that of the electronic device.
  • step S170 the PCM audio data is converted into analog data through a digital to analog converter (DAC) and amplified through a power amplifier (PA).
  • DAC digital to analog converter
  • PA power amplifier
  • the signal to noise ratio is related to the sampling depth of the PCM audio data.
  • the SNR of an audio file with a 32-bit sampling depth can reach 192dB.
  • the SNR of 24-bit sampling depth can reach 144dB, and the SNR of 16-bit sampling depth can reach 96db.
  • the SNR is 48dB for 8-bit sampling depth and 24dB for 4-bit sampling depth.
  • the SNR specification of a better DAC is generally 110dB.
  • the theoretical SNR of 20-bit sampling depth is 120dB, so 20-bit PCM audio data can reach the SNR specification of the DAC.
  • step S180 the playback unit completes the playback of the analog audio signal.
  • the data received by the audio playback device may have errors. These effects may be interference from different frequency bands, interference from other wireless audio playback devices, or limitations of the radio frequency performance of the electronic device itself. Different frequency bands are, for example, the 2.4G frequency band of Wi-Fi.
  • Non-ideal transmission environments may be scenarios with a lot of interference such as subways and buses, or scenarios where electronic devices are in a mobile state.
  • Audio sources with high bandwidth requirements such as high-quality Lossless music.
  • Lossless music has higher Bluetooth bandwidth requirements than games, lossy music, etc.
  • the dual-channel bandwidth requirement of some lossless music sources reaches 10Mbps, such as 192kHz, 24-bit audio sources. Therefore, the user experience problem of lossless music in non-ideal environments is more obvious.
  • an embodiment of the present application proposes a method for transmitting audio data.
  • This method can be used for electronic
  • the PCM audio data of the device is converted and encoded and transmitted separately based on the converted data group to achieve high-efficiency and low-latency transmission.
  • the method for transmitting audio data provided by the embodiment of the present application will be described in detail below with reference to FIG. 2 and FIG. 3 .
  • FIG. 2 is a schematic flowchart of a method for transmitting audio data provided by an embodiment of the present application.
  • the method of Figure 2 can be performed by the sending end of PCM audio data.
  • the sending end may be, for example, an electronic device, such as a mobile phone, a tablet computer, a notebook, etc.
  • step S210 the initial PCM audio data is converted into a first binary data group and a second binary data group.
  • the initial PCM audio data is PCM decoded audio data. After PCM decoding, several frames of PCM audio data can be obtained. Thus, the initial PCM audio data may be one frame or multiple frames of PCM audio data. In addition, the initial PCM audio data may also be one of several PCM audio data in one frame of data, and one frame is, for example, 10 milliseconds. Thus, the initial PCM audio data may be one of several samples in one frame of audio data.
  • the number of bits of the initial PCM audio data can represent the sampling depth.
  • N-bit initial PCM audio data can represent a sampling depth of N.
  • N can have multiple values, such as 32, 24, 16, etc. The larger N is, the more detailed the recording of sound intensity is.
  • the initial PCM audio data may include N pieces of data from low bits to high bits.
  • N the initial PCM audio data can be 24 binary data arranged from the lowest bit to the highest bit.
  • the initial PCM audio data can be converted to N-bit data based on the principle of memory alignment.
  • the initial PCM audio data can be converted into multiple binary data groups based on the number of bits.
  • the plurality of binary data groups may include a first binary data group and a second binary data group.
  • the conversion of the initial PCM audio data can be split based on the number of bits, or it can be extracted based on the number of bits.
  • the initial PCM audio data is split into multiple binary data groups.
  • the initial PCM audio data is formed as N-bit binary data, which can be split, and the high-M bit data of the N-bit data is used to form the first binary data group.
  • the second binary data group can also be formed with the lower L-bit data among the N-bit data.
  • specific bits or combinations thereof in the initial PCM audio data may be extracted separately to form multiple binary data groups. For example, odd-numbered bits or even-numbered bits in the initial PCM audio data (N-bit binary data) are respectively extracted to form a first binary data group or a second binary data group respectively.
  • the first set of binary data may correspond to a first plurality of binary bits of the initial PCM audio data.
  • the second set of binary data may correspond to a second batch of one or more binary bits of the original PCM audio data.
  • the first binary data group may include consecutively distributed multiple binary bits. In other embodiments, the first binary data group may include a plurality of discretely distributed binary bits in the original PCM audio data. For example, the first binary data group may include odd or even bits in the original PCM audio data.
  • the second binary data group may include one binary bit in the initial PCM audio data, or a plurality of continuously distributed binary bits. In other embodiments, the second binary data group may include a plurality of discretely distributed binary bits in the original PCM audio data. For example, the second binary data group may include even or odd bits in the original PCM audio data.
  • the number of bits corresponding to the first binary data group and the second binary data group may be different.
  • the number of bits in the first binary data set may be greater than the number of bits in the second binary data set.
  • the first binary data group may correspond to the upper 24 bits of the initial PCM audio data
  • the second binary data group may correspond to the lower 8 bits of the initial PCM audio data.
  • the number of bits corresponding to the first binary data group may be smaller than the number of bits corresponding to the second binary data group.
  • the first binary data group may correspond to the upper 24 bits of the initial PCM audio data
  • the second binary data group may correspond to the lower 48 bits of the initial PCM audio data.
  • the number of bits corresponding to the first binary data group and the second binary data group may be the same.
  • the first binary data group may correspond to the upper 16 bits of the initial PCM audio data
  • the second binary data group may correspond to the lower 16 bits of the initial PCM audio data.
  • the first binary data group may correspond to the upper 8 bits of the initial PCM audio data
  • the second binary data group may correspond to the middle 8 bits or lower 8 bits of the initial PCM audio data.
  • the first binary data group may be the high-bit data split from the initial PCM audio data; the second binary data group may be the middle-bit data split from the initial PCM audio data or Low bit data.
  • step S220 perform audio encoding on the first binary data group and the second binary data group respectively to obtain corresponding first encoded packets and second encoded packets.
  • the audio encoding mentioned here can be lossless Bluetooth audio encoding (such as FLAC encoding) or lossy Bluetooth audio encoding (such as SBC, AAC encoding).
  • the first encoded packet and the second encoded packet may be separately encoded in a serial manner. In some embodiments, the first encoded packet and the second encoded packet may be encoded in a parallel manner.
  • the first encoded packet and the second encoded packet may also contain additional information.
  • the additional information may include, for example, identification information and/or verification information.
  • the identification information can be used to identify the position of the encoded packet in the code stream. In other words, the identification information can mark the time sequence of the encoded packets in the code stream. After the audio playback device groups packets based on this identification information, it can ensure that the order of the code streams is correct.
  • the first encoding packet and the second encoding packet mentioned above may contain the same identification information, and the audio playback device can find the encoding packet corresponding to the initial PCM audio data according to the identification information, and assemble the packets.
  • the identification information may be a time sequence code.
  • the time sequence code can time-mark the first encoded packet and the second encoded packet, so that the audio playback device can group the packets in time sequence.
  • the time sequence code may be a long integer variable ranging from 0 to 2 64 -1. When the variable of the time series code increases to 2 64 -1, the next value can be 0.
  • the sender can be identified by the time series value corresponding to each encoded packet. For example, if the time series value 100 is compiled into the time series bit corresponding to the encoding packet at that moment, the time series value corresponding to the next encoding packet will be 101.
  • the verification information can verify the audio data in the encoded packet so that the receiving end can determine the integrity of the encoded packet.
  • the verification information may be a check code. For example, you can perform XOR calculation on the next value starting from the first bit value of the encoded packet, and the obtained calculation result can be used as the check code.
  • step S230 the first encoded packet and the second encoded packet are respectively transmitted through the wireless channel.
  • the sending end can use the Bluetooth module to send the first encoding packet and the second encoding packet.
  • Dividing the initial PCM audio data into multiple binary data groups can be retransmitted at a smaller granularity, thereby reducing the amount of retransmitted data and transmission delay.
  • the method of Figure 2 can also comprise different steps, which are explained further below.
  • the method of FIG. 2 further includes step A: in response to determining that the transmission of the first encoded packet is successful and the transmission of the second encoded packet fails, retransmitting the second encoded packet. Retransmitting the second encoded packet can ensure lossless transmission.
  • the method of FIG. 2 further includes step B: in response to determining that the transmission of the first encoded packet is successful and the transmission of the second encoded packet fails, giving up transmitting the second encoded packet. Give up transmitting the second encoded packet, although a certain amount of audio will be lost. frequency data, but can improve transmission efficiency.
  • the method of FIG. 2 further includes step C: in response to determining that the transmission of the first encoded packet fails and the transmission of the second encoded packet is successful, retransmitting the first encoded packet. Retransmitting the first encoded packet can ensure lossless transmission.
  • the method of FIG. 2 further includes step D: in response to determining that the transmission of the first encoded packet fails and the transmission of the second encoded packet fails, retransmitting the first encoded packet and giving up transmission of the second encoded packet.
  • step D in response to determining that the transmission of the first encoded packet fails and the transmission of the second encoded packet fails, retransmitting the first encoded packet and giving up transmission of the second encoded packet.
  • the data amount of the lower 8 bits lost is 2 8 -1, and the total 24-bit data amount is 2 24 -1, the loss rate is 2 8 -1/2 24 -1 ⁇ 1/2 16 . Obviously, this loss rate is very low. At the same time, because only the first encoded packet is retransmitted, the transmission efficiency is improved.
  • steps A, B, C, and D can be executed in parallel or successively in different orders.
  • each step can be executed in combination or divided into multiple sub-steps.
  • steps C and D can be combined into the following two steps that are executed sequentially: in response to determining that the transmission of the first encoded packet fails, retransmitting the first encoded packet; and in response to determining that the transmission of the second encoded packet fails, giving up the transmission The second encoding package.
  • the sending end may determine to perform retransmission or abandonment of the second encoded packet based on the channel status of the wireless channel.
  • the channel status can be determined based on CSI or CQI information. For example, if the channel status is good (eg, the channel quality is greater than or equal to a preset threshold), retransmission of the second encoded packet may be performed. For another example, if the channel status is poor (for example, the channel quality is less than a preset threshold), retransmission of the second encoded packet may be given up.
  • FIG. 3 is a schematic flowchart of a method for transmitting audio data provided by another embodiment of the present application.
  • This method of transmitting audio data may also be called a method of receiving audio data.
  • the method in Figure 3 can be performed by the receiving end of PCM audio data.
  • the receiving end may be, for example, an audio playback device, such as a Bluetooth headset, a Bluetooth speaker, or a car Bluetooth playback device.
  • an audio playback device such as a Bluetooth headset, a Bluetooth speaker, or a car Bluetooth playback device.
  • step S310 a first encoded packet is received through a wireless channel.
  • step S320 perform audio decoding on the first encoded packet to obtain a first binary data group.
  • PCM audio data is generated based at least in part on the first binary data set.
  • the first binary data group may correspond to a first plurality of binary bits of the initial PCM audio data.
  • the PCM audio data generated here based at least in part on the first binary data group may be the same as the aforementioned initial PCM audio data, or may be different. This depends on whether the encoding packet used to generate PCM audio data contains all encoding packets corresponding to the initial PCM audio data.
  • the initial PCM audio data will be converted and encoded into a first encoded packet and a second encoded packet.
  • the transmission of the second coded packet may be given up, so the receiving end may only receive the first coded packet.
  • the receiving end can generate PCM audio data only through the data in the first encoded packet.
  • the generated PCM audio data includes a first binary data group (decoded from the first encoded packet), and the initial PCM audio data includes a first binary data group and a second binary data group. are not the same.
  • the initial PCM audio data will be converted and encoded into the first encoded packet and the second encoded packet, and the sender will not give up the first encoded packet and the second encoded packet when transmitting through the wireless channel, and the receiving end will
  • the second encoded packet may also be received through the wireless channel, and the second encoded packet may be audio decoded to obtain a second binary data group (wherein the second binary data group may correspond to a second portion of the initial PCM audio data). batch of one or more binary bits).
  • the receiving end generates PCM audio data based on the first binary data group (decoded from the first encoded packet) and the second binary data group (decoded from the second encoded packet). Therefore, it is different from the initial PCM audio data is the same.
  • the first coded packet and the second coded packet received by the receiving end may be coded packets obtained after initial transmission, or may be coded packets obtained after retransmission.
  • the receiving end may receive the retransmitted first encoded packet. If it is determined that the transmission of the second encoded packet fails, the receiving end may also receive the retransmitted second encoded packet.
  • the embodiments of the present application do not specifically limit this.
  • the method of receiving audio data may also include the step of the receiving end generating or sending a request to instruct the sending end to retransmit the encoded packet or the receiving end to give up the retransmission opportunity, specifically including the following situations.
  • Case 1 In response to determining that transmission of the first encoded packet fails, a request for retransmission of the first encoded packet is generated.
  • Case 2 In response to determining that the transmission of the first encoded packet is successful and the transmission of the second encoded packet fails, a request for retransmission of the second encoded packet is generated.
  • Case three In response to determining that the transmission of the first encoded packet is successful and the transmission of the second encoded packet fails, a request to give up and retransmit the second encoded packet is generated.
  • Case 4 In response to determining that the transmission of the first encoded packet fails and the transmission of the second encoded packet fails, a request for retransmission of the first encoded packet and the second encoded packet is generated.
  • Case 5 In response to determining that the transmission of the first encoded packet fails and the transmission of the second encoded packet fails, a request to retransmit the first encoded packet is generated and a request to retransmit the second encoded packet is given up.
  • the receiving end may also determine to receive the retransmitted second coded packet or to give up the retransmitted second coded packet based on the channel state of the wireless channel.
  • the method is similar to the previous one and will not be described again here.
  • the user can make a selection by touching the adjustment part or button of the headset.
  • the user's choice is usually based on the desire for a lossless audio experience or lower latency.
  • ,none Lossless audio experience may require lossless transmission, that is, retransmission is required when the second encoded packet fails to be transmitted.
  • the consideration of lower delay requires giving up retransmission when the transmission of the second encoded packet fails.
  • the headset of the audio receiving end generates a request to retransmit the second encoded packet or generates a request to give up the retransmission opportunity according to the user's selection.
  • the method of receiving audio data may further include: performing digital-to-analog conversion on the initial PCM audio data to obtain an analog audio signal; and playing the analog audio signal.
  • FIG. 4 is a schematic diagram of splitting the 24-bit initial PCM audio data 410 into a first binary data group of high-order 16 bits and a second binary data group of low-order 8 bits.
  • Bluetooth audio encoding FLAC encoding
  • first binary data group 420 and the second binary data group 430 respectively to obtain the first encoding as shown in Figure 5 packet 500, and the second encoded packet 600 as shown in Figure 6.
  • the first encoding packet 500 includes a high-16 FLAC packet 510 , a time sequence code 520 and a check code 530 .
  • the second encoding packet 600 includes the lower 8-bit FLAC packet 610, the time sequence code 620 and the check code 630.
  • the time sequence code 620 has the same value as the time sequence code 520.
  • the electronic device wirelessly transmits the first encoded packet 500 and the second encoded packet 600 through the sending module. After receiving the first encoded packet 500 and the second encoded packet 600, the audio playback device performs verification. If the verification is successful, the transmission is successful.
  • the audio playback device decompresses the received first encoded packet 500 and the second encoded packet 600 respectively to obtain the first binary data group and the second binary data group.
  • the audio playback device combines the first binary data group and the second binary data group in order of high bits and low bits to form initial PCM audio data.
  • Scenario 1 Both the first encoded packet and the second encoded packet are lost or the transmission fails.
  • case 1 if both the first encoded packet 500 and the second encoded packet 600 are retransmitted, the amount of retransmitted data is the same as the traditional solution (that is, the solution of directly retransmitting 24-bit data).
  • Scenario 3 The first encoded packet is transmitted successfully, but the second encoded packet is lost.
  • the audio transmission method proposed in the embodiment of this application can achieve the purpose of reducing the amount of data transmission and thereby reducing the delay while ensuring the user experience. In harsh transmission environments, latency can be significantly reduced and transmission efficiency improved.
  • the 24-bit initial PCM audio data may be split into three binary data groups of 16-bit+4-bit+4-bit.
  • the first binary data group mentioned above can be a binary data group with the upper 16 bits; the second binary data group can be a binary data group with the middle 4 bits or the lower 4 bits. Group of binary data.
  • three encoding packets can be obtained.
  • the SNR of the decoded PCM audio data has reached 120dB. In other words, the SNR of the decoded PCM audio data is greater than the SNR indicator of the DAC.
  • the embodiments of the present application reduce the number of audio data retransmissions and the amount of audio data retransmissions while ensuring the user experience as much as possible, thereby reducing the bandwidth requirements for audio data transmission. Furthermore, the probability of data errors is reduced, transmission efficiency is improved, and transmission delay is reduced.
  • Figure 7 is a schematic flowchart of a Bluetooth audio transmission method provided by an embodiment of the present application, completely describing the flow of the entire transmission process of the electronic device and the audio playback device.
  • step S730 and step S760 are the same as in Figure 1 and will not be repeated here.
  • step S730 Bluetooth audio split encoding is performed on the initial PCM audio data.
  • splitting and encoding methods you can refer to the method described above to obtain multiple encoding packages.
  • step S760 perform PCM decoding and grouping on multiple encoded packets.
  • the decoding and packaging method aims to obtain the initial PCM audio data of the electronic device.
  • the method of transmitting audio data may be performed by a communication chip on the mobile phone.
  • the method of receiving audio data can be performed by the communication chip on the earphone side.
  • Such communication chips fall within the protection scope of the present invention.
  • FIG. 8 is a schematic structural diagram of a device for transmitting audio data provided by an embodiment of the present application.
  • the device 800 shown in FIG. 8 includes a processor 810 and a transmitter 820.
  • the device 800 can be implemented as a communication chip on a mobile phone, the processor corresponds to the chip's application processor, and the transmitter corresponds to the chip's radio frequency module (and a possible Bluetooth controller).
  • the processor 810 may be configured to convert the initial PCM audio data into a first binary data group and a second binary data group, and perform processing on the first binary data group and the second binary data group respectively. Perform audio encoding to obtain the corresponding first encoding packet and second encoding packet.
  • the transmitter 820 may be configured to transmit the first encoded packet and the second encoded packet respectively through a wireless channel; wherein the first binary data group corresponds to a first plurality of binary data of the initial PCM audio data. bits, the second binary data group corresponding to a second batch of one or more binary bits of the initial PCM audio data.
  • the processor 810 may also be configured to: in response to determining that the transmission of the first encoded packet is successful and the transmission of the second encoded packet fails, use the transmitter to retransmit the second encoded packet.
  • the processor 810 may also be configured to: in response to determining that the transmission of the first encoded packet is successful and the transmission of the second encoded packet fails, give up transmitting the second encoded packet.
  • the processor 810 may also be configured to: in response to determining that the transmission of the first encoded packet fails and the transmission of the second encoded packet is successful, use the transmitter 820 to retransmit the first encoded packet.
  • the processor 810 may also be configured to: in response to determining that the transmission of the first encoded packet fails and the transmission of the second encoded packet fails, use the transmitter 820 to retransmit the first encoded packet and give up. Transmit the second encoded packet.
  • the processor 810 may also be configured to: determine to perform retransmission or abandonment of the second encoded packet based on the channel state of the wireless channel.
  • the processor 810 is configured to form the first binary data group with high M-bit data among the N-bit data of the initial PCM audio data.
  • the processor 810 is configured to form the second binary data group with lower L-bit data in the N-bit data of the initial PCM audio data.
  • the processor 810 is further configured to: make the first binary data group satisfy one or more of the following conditions: if N is greater than or equal to 24, configure the first binary data group The number of digits is greater than or equal to 16; If N is less than 24, configure the number of bits of the first binary data group to be greater than or equal to 8; and configure the number of bits of the first binary data group to be greater than or equal to the second binary The number of digits in the data group.
  • the processor 810 is further configured to configure corresponding identification information in the first encoding packet and the second encoding packet respectively, where the identification information is used to identify the position of the corresponding encoding packet in the code stream. .
  • FIG. 9 is a schematic structural diagram of a device for receiving audio data provided by another embodiment of the present application.
  • the device 900 shown in FIG. 9 includes a receiver 910 and a processor 920.
  • the device 900 may be implemented as a communication chip on the headset side, the processor corresponds to the processor of the chip, and the receiver corresponds to the radio frequency module (and possibly a Bluetooth controller) of the chip.
  • the receiver 910 is configured to receive the first encoded packet through the wireless channel.
  • the processor 920 is configured to perform audio decoding on the first encoded packet to obtain a first binary data group, and generate PCM audio data based at least in part on the first binary data group.
  • the first binary data group corresponds to the first plurality of binary bits of the initial PCM audio data.
  • the receiver 910 is also configured to receive the second encoded packet through the wireless channel; the processor 920 is further configured to perform audio decoding on the second encoded packet to obtain the second binary data group;
  • the second binary data group corresponds to a second batch of one or more binary bits of the initial PCM audio data.
  • the processor 920 is further configured to generate the PCM audio data based on the first binary data group and the second binary data group.
  • the processor 920 is further configured to generate a request to retransmit the first encoded packet in response to determining that the transmission of the first encoded packet fails.
  • the processor 920 is further configured to: in response to determining that the transmission of the first encoded packet is successful and the transmission of the second encoded packet fails, generate a request to retransmit the second encoded packet.
  • the processor 920 is further configured to: in response to determining that the transmission of the first encoded packet is successful and the transmission of the second encoded packet fails, generate a request to give up and retransmit the second encoded packet.
  • the processor 920 is further configured to: in response to determining that the transmission of the first encoding packet fails and the transmission of the second encoding packet fails, generate a request to retransmit the first encoding packet and the second encoding packet. package request.
  • the processor 920 is further configured to: in response to determining that the transmission of the first encoded packet fails and the transmission of the second encoded packet fails, generate an expectation to retransmit the first encoded packet and give up retransmitting the Request for second encoded packet.
  • the processor 920 is further configured to determine whether to receive the retransmitted second coded packet or to give up the retransmitted second coded packet based on the channel state of the wireless channel.
  • the processor 920 is further configured to: based on user selection, generate a request to retransmit the second encoded packet or Give up the request to retransmit the second encoded packet.
  • the processor 920 is further configured to configure corresponding identification information in the first encoding packet and the second encoding packet respectively, where the identification information is used to identify the position of the corresponding encoding packet in the code stream. .
  • FIG. 10 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • the electronic device 1000 of FIG. 10 may include the device 800 shown in FIG. 8 .
  • FIG. 11 is a schematic structural diagram of an audio playback device provided by an embodiment of the present application.
  • the audio playback device 1100 of FIG. 11 may include the device 900 shown in FIG. 9 .
  • the audio playback device 1100 further includes: a digital-to-analog converter for performing digital-to-analog conversion on the initial PCM audio data to obtain an analog audio signal; and a player for playing the analog audio signal.
  • a digital-to-analog converter for performing digital-to-analog conversion on the initial PCM audio data to obtain an analog audio signal
  • a player for playing the analog audio signal.
  • the audio playback device is a Bluetooth headset, a Bluetooth speaker, or a car Bluetooth playback device.
  • the processor can be a central processing unit (CPU), and the processor can also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits ( application specific integrated circuit (ASIC), off-the-shelf programmable gate array (field programmable gate array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • DSP digital signal processors
  • ASIC application specific integrated circuit
  • FPGA off-the-shelf programmable gate array
  • a general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
  • the size of the sequence numbers of the above-mentioned processes does not mean the order of execution.
  • the execution order of each process should be determined by its functions and internal logic, and should not be used in the embodiments of the present application.
  • the implementation process constitutes any limitation.
  • the disclosed systems, devices and methods can be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or can be integrated into another system, or some features can be ignored, or not implemented.
  • the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, indirect coupling or communication connection of devices or units, which may be in electrical, mechanical or other forms.
  • wireless channels may include channels configured on 3G, 4G, 5G, Wi-Fi, Bluetooth, or other forms of wireless Internet, through which audio data can be transmitted. transmission, and achieve the technical effects of each embodiment of this application.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application can be integrated into one processing unit, or each functional unit can be integrated into one processing unit.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another, e.g., the computer instructions may be transferred from a website, computer, server, or data center Transmission to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) means.
  • the readable storage medium can be any available media that can be read by a computer or a data storage device such as a server, data center, etc. that contains one or more available media integrated.
  • the available media can be magnetic media, (for example, floppy disk, hard disk, tape), optical media (such as digital video disc (DVD)) or semiconductor media (such as solid state disk (SSD)), etc.

Abstract

The present application provides an audio data transmission method and apparatus, an electronic device, and an audio playback device. The method comprises: splitting initial PCM audio data into at least a first binary data set and a second binary data set; separately performing audio encoding on the first binary data set and the second binary data set; separately transmitting a first encoded packet corresponding to the first binary data set and a second encoded packet corresponding to the second binary data set by means of a wireless channel; and in response to determining that the transmission of the first encoded packet has failed, retransmitting the first encoded packet; wherein the first binary data set and the second binary data set are a first plurality of binary bits and a second batch of one or more binary bits corresponding to the initial PCM audio data, respectively. By means of converting PCM audio data into a plurality of binary data sets, the amount of transmitted data can be reduced, the improvement of transmission efficiency is facilitated, and transmission delay is reduced.

Description

传输音频数据的方法、装置、电子设备及音频播放设备Methods, devices, electronic equipment and audio playback equipment for transmitting audio data
本申请要求于2022年6月22日提交中国专利局、申请号为202210713458.6、申请名称为“传输音频数据的方法、装置、电子设备及音频播放设备”的中国专利申请的优先权,以及于2022年11月7日提交中国专利局、申请号为202211385617.0、申请名称为“传输音频数据的方法、装置、电子设备及音频播放设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application requests the priority of the Chinese patent application submitted to the China Patent Office on June 22, 2022, with the application number 202210713458.6 and the application name "Method, device, electronic equipment and audio playback equipment for transmitting audio data", and in 2022 The priority of the Chinese patent application filed with the China Patent Office on November 7, 2020, with the application number 202211385617.0 and the application title "Method, device, electronic equipment and audio playback equipment for transmitting audio data", the entire content of which is incorporated herein by reference. Applying.
技术领域Technical field
本申请涉及数据传输技术领域,更为具体地,涉及一种传输音频数据的方法、装置、电子设备及音频播放设备This application relates to the field of data transmission technology, and more specifically, to a method, device, electronic equipment and audio playback equipment for transmitting audio data.
背景技术Background technique
随着无线音频播放设备的普及,消费者对设备播放质量的要求越来越高。在进行音频数据的无线传输时,电子设备对脉冲编码调制(pulse code modulation,PCM)音频数据进行编码,然后传输给音频播放设备。由于无线传输过程中容易受到干扰,播放设备接收到的数据可能有错误。如果数据传输失败,需要对该数据进行重传。With the popularity of wireless audio playback devices, consumers have increasingly higher requirements for device playback quality. When wirelessly transmitting audio data, the electronic device encodes the pulse code modulation (PCM) audio data and then transmits it to the audio playback device. Since wireless transmission is susceptible to interference, the data received by the playback device may have errors. If data transmission fails, the data needs to be retransmitted.
相关技术中的数据重传降低了传输效率,且容易发生较大的延迟,导致用户对音频的体验感下降,甚至发生卡顿和无声的情况。Data retransmission in related technologies reduces transmission efficiency and is prone to large delays, resulting in a decrease in the user's audio experience and even lags and silence.
发明内容Contents of the invention
本申请提供一种传输音频数据的方法、装置、电子设备及音频播放设备。下面对本申请实施例涉及的各个方面进行介绍。This application provides a method, device, electronic equipment and audio playback equipment for transmitting audio data. Various aspects involved in the embodiments of this application are introduced below.
本申请的第一方面,提供一种传输音频数据的方法,包括:将初始PCM音频数据拆分为至少第一二进制数据组和第二二进制数据组;对第一二进制数据组和第二二进制数据组分别进行音频编码;通过无线信道分别传输第一二进制数据组对应的第一编码包和第二二进制数据组对应的第二编码包;响应于确定第一编码包的传输失败,重传第一编码包,其中,第一二进制数据组和第二二进制数据组分别对应于初始PCM音频数据的第一批多个二进制位和第二批一个或多个二进制位。 A first aspect of the present application provides a method for transmitting audio data, including: splitting initial PCM audio data into at least a first binary data group and a second binary data group; The group and the second binary data group perform audio encoding respectively; respectively transmit the first encoding packet corresponding to the first binary data group and the second encoding packet corresponding to the second binary data group through the wireless channel; in response to determining The transmission of the first encoded packet fails, and the first encoded packet is retransmitted, wherein the first binary data group and the second binary data group respectively correspond to the first plurality of binary bits and the second batch of the initial PCM audio data. Batch one or more binary bits.
第二方面,提供一种接收音频数据的方法,包括:通过无线信道接收第一编码包;响应于确定第一编码包的传输失败,接收重传的第一编码包;对第一编码包进行音频解码,以得到第一二进制数据组;至少部分地基于第一二进制数据组生成PCM音频数据;其中,第一二进制数据组对应于初始PCM音频数据的第一批多个二进制位。In a second aspect, a method for receiving audio data is provided, including: receiving a first encoded packet through a wireless channel; in response to determining that the transmission of the first encoded packet fails, receiving a retransmitted first encoded packet; and performing processing on the first encoded packet. audio decoding to obtain a first binary data set; generating PCM audio data based at least in part on the first binary data set; wherein the first binary data set corresponds to a first plurality of initial PCM audio data Binary bits.
第三方面,提供一种传输音频数据的装置,包括:处理器,配置成:将初始PCM音频数据拆分为至少第一二进制数据组和第二二进制数据组,并对第一二进制数据组和第二二进制数据组分别进行音频编码;以及发射器,配置成:通过无线信道分别传输第一二进制数据组对应的第一编码包和第二二进制数据组对应的第二编码包;响应于确定第一编码包的传输失败,重传第一编码包;其中,第一二进制数据组对应于初始PCM音频数据的第一批多个二进制位,第二二进制数据组对应于初始PCM音频数据的第二批一个或多个二进制位。In a third aspect, a device for transmitting audio data is provided, including: a processor configured to: split the initial PCM audio data into at least a first binary data group and a second binary data group, and perform the processing on the first binary data group. The binary data group and the second binary data group perform audio encoding respectively; and the transmitter is configured to: respectively transmit the first encoding packet and the second binary data corresponding to the first binary data group through the wireless channel. The second encoded packet corresponding to the group; in response to determining that the transmission of the first encoded packet fails, retransmitting the first encoded packet; wherein the first binary data group corresponds to the first plurality of binary bits of the initial PCM audio data, The second set of binary data corresponds to a second batch of one or more binary bits of the original PCM audio data.
第四方面,提供一种接收音频数据的装置,包括:接收器,配置成:通过无线信道接收第一编码包;响应于确定第一编码包的传输失败,接收重传的第一编码包;处理器,配置成:对第一编码包进行音频解码,以得到第一二进制数据组;至少部分地基于第一二进制数据组生成PCM音频数据;其中,第一二进制数据组对应于初始PCM音频数据的第一批多个二进制位。A fourth aspect provides a device for receiving audio data, including: a receiver configured to: receive a first encoded packet through a wireless channel; in response to determining that transmission of the first encoded packet fails, receive a retransmitted first encoded packet; A processor configured to: perform audio decoding on the first encoded packet to obtain a first binary data group; generate PCM audio data based at least in part on the first binary data group; wherein, the first binary data group Corresponds to the first multiple bits of the initial PCM audio data.
第五方面,提供一种电子设备,包括如第三方面所述的装置。A fifth aspect provides an electronic device, including the device described in the third aspect.
第六方面,提供一种音频播放设备,包括如第四方面所述的装置。A sixth aspect provides an audio playback device, including the device described in the fourth aspect.
本申请实施例通过将初始PCM音频数据转换为多个二进制数据组,可以以更小的粒度进行重传,从而可以减少重传数据量、提高传输效率并降低传输时延。By converting the initial PCM audio data into multiple binary data groups, the embodiment of the present application can retransmit it at a smaller granularity, thereby reducing the amount of retransmitted data, improving transmission efficiency, and reducing transmission delay.
附图说明Description of the drawings
图1为相关技术中的蓝牙音频传输方法的流程示意图。Figure 1 is a schematic flow chart of a Bluetooth audio transmission method in related technologies.
图2为本申请一个实施例提供的传输音频数据的方法的流程示意图。Figure 2 is a schematic flowchart of a method for transmitting audio data provided by an embodiment of the present application.
图3为本申请另一实施例提供的接收音频数据的方法的流程示意图。FIG. 3 is a schematic flowchart of a method for receiving audio data provided by another embodiment of the present application.
图4为本申请实施例提供的对初始PCM音频数据进行拆分的示例图。Figure 4 is an example diagram of splitting initial PCM audio data provided by the embodiment of the present application.
图5为本申请实施例提供的第一二进制数据组的编码方式示例图。FIG. 5 is an example diagram of the encoding method of the first binary data group provided by the embodiment of the present application.
图6为本申请实施例提供的第二二进制数据组的编码方式示例图。FIG. 6 is an example diagram of the encoding method of the second binary data group provided by the embodiment of the present application.
图7为本申请实施例提供的蓝牙音频传输方法的流程示意图。Figure 7 is a schematic flowchart of a Bluetooth audio transmission method provided by an embodiment of the present application.
图8为本申请一个实施例提供的传输音频数据的装置的结构示意图。Figure 8 is a schematic structural diagram of a device for transmitting audio data provided by an embodiment of the present application.
图9为本申请另一实施例提供的接收音频数据的装置的结构示意图。 Figure 9 is a schematic structural diagram of a device for receiving audio data provided by another embodiment of the present application.
图10为本申请实施例提供的电子设备的结构示意图。FIG. 10 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
图11为本申请实施例提供的音频播放设备的结构示意图。Figure 11 is a schematic structural diagram of an audio playback device provided by an embodiment of the present application.
具体实施方式Detailed ways
为了便于理解本申请,在下文中基于示例性实施例并结合附图来更详细地描述本申请。在附图中使用相同或相似的附图标记来表示相同或相似的模块。应该理解的是,附图仅是示意性的,本申请的保护范围并不局限于此。In order to facilitate understanding of the present application, the present application is described in more detail below based on exemplary embodiments and in conjunction with the accompanying drawings. The same or similar reference numbers are used in the drawings to identify the same or similar modules. It should be understood that the accompanying drawings are only schematic, and the protection scope of the present application is not limited thereto.
随着技术的发展,无线音频播放设备(如蓝牙耳机)的应用越来越广。以真无线蓝牙耳机(true wireless studio,TWS)为例,在日常生活和工作中,消费者会使用TWS已非常普及和常见。例如,消费者经常使用TWS听音乐、打电话。又例如,随着TWS的延时相关性能的提高,其在游戏领域中也逐步取代了有线耳机。又例如,随着TWS耳机降噪技术的发展,在地铁、公交车或机场这些嘈杂场景下,使用TWS降噪耳机也比普通有线耳机有更好的体验。With the development of technology, wireless audio playback devices (such as Bluetooth headsets) are increasingly used. Take true wireless Bluetooth headsets (true wireless studio, TWS) as an example. In daily life and work, it has become very popular and common for consumers to use TWS. For example, consumers often use TWS to listen to music and make phone calls. For another example, as the delay-related performance of TWS improves, it has gradually replaced wired headsets in the gaming field. For another example, with the development of TWS headset noise reduction technology, using TWS noise reduction headsets in noisy scenes such as subways, buses or airports will provide a better experience than ordinary wired headsets.
与此同时,消费者对音频播放设备的播放质量也有越来越高的要求。例如,很多消费者希望通过无线音频播放设备收听高质量音乐,甚至无损(lossless)音乐。At the same time, consumers have increasingly higher requirements for the playback quality of audio playback equipment. For example, many consumers hope to listen to high-quality music, even lossless music, through wireless audio playback devices.
无线音频播放设备播放的音频是通过无线传输接收到的。也就是说,通过无线传输,电子设备作为发送端可以将音频数据传输给作为接收端的音频播放设备。下面结合图1,以蓝牙无线传输为例,对无线传输过程进行详细地描述。The audio played by the wireless audio playback device is received through wireless transmission. That is to say, through wireless transmission, the electronic device as the sending end can transmit audio data to the audio playback device as the receiving end. The following is a detailed description of the wireless transmission process in conjunction with Figure 1, taking Bluetooth wireless transmission as an example.
如图1所示,在无线传输过程中,电子设备向音频播放设备传输音频数据,音频播放设备接收该音频数据后进行播放。电子设备例如是手机、平板电脑等。音频播放设备例如是蓝牙耳机、蓝牙音响等。As shown in Figure 1, during the wireless transmission process, the electronic device transmits audio data to the audio playback device, and the audio playback device receives the audio data and plays it. Electronic devices are, for example, mobile phones, tablet computers, etc. Audio playback devices are, for example, Bluetooth headsets, Bluetooth speakers, etc.
参见图1,在电子设备侧,步骤S110以无损的音乐数据源开始。无损音源例如是无损音频压缩编码(free lossless audio codec,FLAC)音源。除无损音源之外,电子设备要发送的音源也可以是有损音源。有损音源例如是MP3音源。Referring to Figure 1, on the electronic device side, step S110 starts with a lossless music data source. The lossless audio source is, for example, a lossless audio compression coding (free lossless audio codec, FLAC) audio source. In addition to lossless audio sources, the audio sources to be sent by electronic devices can also be lossy audio sources. The lossy audio source is, for example, an MP3 audio source.
在步骤S120,对音源进行PCM解码,得到PCM音频数据。PCM解码是将音源数据解码成PCM音频数据。In step S120, PCM decoding is performed on the sound source to obtain PCM audio data. PCM decoding is to decode the audio source data into PCM audio data.
在步骤S130,对PCM音频数据进行蓝牙音频编码,得到编码包。在一些实施例中,蓝牙音频编码可以是无损的FLAC或苹果无损音频压缩编码(apple lossless audio codec,ALAC)。无损音频压缩编码的音源可以统称为Lossless音源。在另一些实施例中,蓝牙音频编码可以是子带编码(Sub-band coding,SBC)或高级音频编码(Advanced Audio Coding,AAC)。 In step S130, Bluetooth audio encoding is performed on the PCM audio data to obtain an encoded packet. In some embodiments, the Bluetooth audio codec may be lossless FLAC or Apple lossless audio codec (ALAC). Lossless audio compression encoding audio sources can be collectively referred to as Lossless audio sources. In other embodiments, Bluetooth audio coding may be Sub-band coding (SBC) or Advanced Audio Coding (AAC).
电子设备以PCM音频的采样深度为单位进行蓝牙音频编码。采样深度也称为量化精度。PCM音频的采样深度可以由PCM音频数据的位数来表示。例如,PCM音频数据为24位时,一个编码包中包含24位的PCM音频数据。Electronic devices encode Bluetooth audio in units of the sampling depth of PCM audio. Sampling depth is also called quantization accuracy. The sampling depth of PCM audio can be represented by the number of bits of PCM audio data. For example, when the PCM audio data is 24 bits, one encoding packet contains 24 bits of PCM audio data.
在步骤S140,蓝牙发送模块将编码包进行无线传输。发送模块也称为发射模块。通过蓝牙无线传输,编码包到达音频播放设备。In step S140, the Bluetooth sending module wirelessly transmits the encoded packet. The sending module is also called the transmitting module. Through Bluetooth wireless transmission, the encoded packet reaches the audio playback device.
在音频播放设备侧,步骤S150由蓝牙接收模块接收传输的编码包。On the side of the audio playback device, in step S150, the Bluetooth receiving module receives the transmitted encoded packet.
在步骤S160,将接收到的蓝牙音频编码数据进行PCM解码,得到PCM音频数据。音频播放设备解码后的PCM音频数据的位数与电子设备的相同。In step S160, the received Bluetooth audio encoded data is PCM decoded to obtain PCM audio data. The number of bits of PCM audio data decoded by the audio playback device is the same as that of the electronic device.
在步骤S170,将PCM音频数据经过数模转换器(digital to analog converter,DAC)转换为模拟数据,并通过功率放大器(power amplifier,PA)进行放大。In step S170, the PCM audio data is converted into analog data through a digital to analog converter (DAC) and amplified through a power amplifier (PA).
DAC对PCM音频数据进行数模转换时,信噪比(signal to noise ratio,SNR)与PCM音频数据的采样深度有关。采样深度越大,SNR越高。理论上,32位采样深度的音频文件的SNR可以达到192dB。24位采样深度的SNR可以达到144dB,16位采样深度的SNR可以达到96db。8位采样深度的SNR是48dB,4位采样深度的SNR是24dB。When the DAC performs digital-to-analog conversion of PCM audio data, the signal to noise ratio (SNR) is related to the sampling depth of the PCM audio data. The greater the sampling depth, the higher the SNR. In theory, the SNR of an audio file with a 32-bit sampling depth can reach 192dB. The SNR of 24-bit sampling depth can reach 144dB, and the SNR of 16-bit sampling depth can reach 96db. The SNR is 48dB for 8-bit sampling depth and 24dB for 4-bit sampling depth.
但是,较好的DAC的SNR指标一般是110dB。20位采样深度的理论SNR为120dB,因此20位的PCM音频数据就可以达到DAC的SNR指标。However, the SNR specification of a better DAC is generally 110dB. The theoretical SNR of 20-bit sampling depth is 120dB, so 20-bit PCM audio data can reach the SNR specification of the DAC.
在步骤S180,由播放单元完成模拟音频信号的播放。In step S180, the playback unit completes the playback of the analog audio signal.
在进行上述无线传输时,因为多种因素的影响,音频播放设备收到的数据可能有错误。这些影响可能是来自不同频段的干扰,也可能是来自其他无线音频播放设备的干扰,或者是电子设备本身的射频性能的限制。不同频段例如是Wi-Fi的2.4G频段。When performing the above wireless transmission, due to the influence of various factors, the data received by the audio playback device may have errors. These effects may be interference from different frequency bands, interference from other wireless audio playback devices, or limitations of the radio frequency performance of the electronic device itself. Different frequency bands are, for example, the 2.4G frequency band of Wi-Fi.
当数据传输有误时,需要对该数据进行重传。数据重传会降低传输的效率,并导致传输延迟。进一步地,延迟会使用户对无损音源的体验感下降,甚至还会发生卡顿和无声的情况。When there is an error in data transmission, the data needs to be retransmitted. Data retransmission will reduce the efficiency of transmission and cause transmission delays. Furthermore, delay will reduce the user's experience of lossless audio sources, and may even cause stuttering and silence.
在非理想的传输环境下,环境射频干扰等因素会进一步增加数据重传导致的延迟。非理想的传输环境可能是地铁、公交等干扰较多的场景,也可能是电子设备处于移动状态的场景。In non-ideal transmission environments, factors such as environmental radio frequency interference will further increase delays caused by data retransmission. Non-ideal transmission environments may be scenarios with a lot of interference such as subways and buses, or scenarios where electronic devices are in a mobile state.
对于带宽要求高的音源,重传导致的延迟会进一步降低用户的体验感。带宽要求高的音源例如高品质的Lossless无损音乐。无损音乐对蓝牙的带宽要求比游戏、有损音乐等都高。有的无损歌源双声道的带宽要求达到了10Mbps,例如192kHz、24位的音源。因此,无损音乐在非理想环境下的用户体验问题更为明显。For audio sources with high bandwidth requirements, the delay caused by retransmission will further reduce the user experience. Audio sources with high bandwidth requirements such as high-quality Lossless music. Lossless music has higher Bluetooth bandwidth requirements than games, lossy music, etc. The dual-channel bandwidth requirement of some lossless music sources reaches 10Mbps, such as 192kHz, 24-bit audio sources. Therefore, the user experience problem of lossless music in non-ideal environments is more obvious.
为了解决上述问题,本申请实施例提出了一种传输音频数据的方法。该方法可对电子 设备的PCM音频数据进行转换并基于转换后的数据组分别进行编码传输,以实现高效率低延迟的传输。下面结合图2和图3,对本申请实施例提供的传输音频数据的方法进行详细地描述。In order to solve the above problem, an embodiment of the present application proposes a method for transmitting audio data. This method can be used for electronic The PCM audio data of the device is converted and encoded and transmitted separately based on the converted data group to achieve high-efficiency and low-latency transmission. The method for transmitting audio data provided by the embodiment of the present application will be described in detail below with reference to FIG. 2 and FIG. 3 .
图2为本申请实施例提供的传输音频数据的方法的流程示意图。图2的方法可以由PCM音频数据的发送端执行。该发送端例如可以是电子设备,比如手机、平板电脑、笔记本等。FIG. 2 is a schematic flowchart of a method for transmitting audio data provided by an embodiment of the present application. The method of Figure 2 can be performed by the sending end of PCM audio data. The sending end may be, for example, an electronic device, such as a mobile phone, a tablet computer, a notebook, etc.
参见图2,在步骤S210,将初始PCM音频数据转换为第一二进制数据组和第二二进制数据组。Referring to FIG. 2, in step S210, the initial PCM audio data is converted into a first binary data group and a second binary data group.
初始PCM音频数据为PCM解码后的音频数据。PCM解码后可以得到若干帧的PCM音频数据。由此,初始PCM音频数据可以是一帧或多帧的PCM音频数据。此外,初始PCM音频数据也可以是一帧数据中若干PCM音频数据中的一个,一帧例如是10毫秒。由此,初始PCM音频数据可以是一帧音频数据中若干采样样本中的一个。The initial PCM audio data is PCM decoded audio data. After PCM decoding, several frames of PCM audio data can be obtained. Thus, the initial PCM audio data may be one frame or multiple frames of PCM audio data. In addition, the initial PCM audio data may also be one of several PCM audio data in one frame of data, and one frame is, for example, 10 milliseconds. Thus, the initial PCM audio data may be one of several samples in one frame of audio data.
初始PCM音频数据的位数可以表示采样深度。例如N位初始PCM音频数据可以表示其采样深度为N。N可以有多种取值,例如32、24、16等。N越大,代表对声音强度的记录就越精细。The number of bits of the initial PCM audio data can represent the sampling depth. For example, N-bit initial PCM audio data can represent a sampling depth of N. N can have multiple values, such as 32, 24, 16, etc. The larger N is, the more detailed the recording of sound intensity is.
初始PCM音频数据的位数用N表示时,该初始PCM音频数据可以包括从低位到高位的N个数据。例如,N为24时,初始PCM音频数据可以是24个从最低位到最高位排列的二进制数据。When the number of bits of the initial PCM audio data is represented by N, the initial PCM audio data may include N pieces of data from low bits to high bits. For example, when N is 24, the initial PCM audio data can be 24 binary data arranged from the lowest bit to the highest bit.
初始PCM音频数据可以基于内存对齐的原则,对N位数据进行转换。初始PCM音频数据可以基于位数转换为多个二进制数据组。该多个二进制数据组可以包括第一二进制数据组和第二二进制数据组。The initial PCM audio data can be converted to N-bit data based on the principle of memory alignment. The initial PCM audio data can be converted into multiple binary data groups based on the number of bits. The plurality of binary data groups may include a first binary data group and a second binary data group.
对初始PCM音频数据进行转换可以是基于位数进行拆分,也可以是基于位数进行提取。在一些实施例中,将初始PCM音频数据拆分为多个二进制数据组。例如,初始PCM音频数据形成为N位二进制数据,可对其进行拆分,以N位数据中的高M位数据形成第一二进制数据组。又如,还可以以N位数据中的低L位数据形成第二二进制数据组。在另一些实施例中,可分别提取初始PCM音频数据中的特定位或其组合,以形成多个二进制数据组。例如,分别提取初始PCM音频数据(N位二进制数据)中的奇数位或偶数位,以分别形成第一二进制数据组或第二二进制数据组。The conversion of the initial PCM audio data can be split based on the number of bits, or it can be extracted based on the number of bits. In some embodiments, the initial PCM audio data is split into multiple binary data groups. For example, the initial PCM audio data is formed as N-bit binary data, which can be split, and the high-M bit data of the N-bit data is used to form the first binary data group. For another example, the second binary data group can also be formed with the lower L-bit data among the N-bit data. In other embodiments, specific bits or combinations thereof in the initial PCM audio data may be extracted separately to form multiple binary data groups. For example, odd-numbered bits or even-numbered bits in the initial PCM audio data (N-bit binary data) are respectively extracted to form a first binary data group or a second binary data group respectively.
第一二进制数据组可以对应于初始PCM音频数据的第一批多个二进制位。第二二进制数据组可以对应于初始PCM音频数据的第二批一个或多个二进制位。The first set of binary data may correspond to a first plurality of binary bits of the initial PCM audio data. The second set of binary data may correspond to a second batch of one or more binary bits of the original PCM audio data.
在一些实施例中,第一二进制数据组可以包括初始PCM音频数据中的连续分布的多 个二进制位。在另一些实施例中,第一二进制数据组可以包括初始PCM音频数据中的离散分布的多个二进制位。例如,第一二进制数据组可以包括初始PCM音频数据中的奇数位或偶数位。In some embodiments, the first binary data group may include consecutively distributed multiple binary bits. In other embodiments, the first binary data group may include a plurality of discretely distributed binary bits in the original PCM audio data. For example, the first binary data group may include odd or even bits in the original PCM audio data.
在一些实施例中,第二二进制数据组可以包括初始PCM音频数据中的一个二进制位,或连续分布的多个二进制位。在另一些实施例中,第二二进制数据组可以包括初始PCM音频数据中的离散分布的多个二进制位。例如,第二二进制数据组可以包括初始PCM音频数据中的偶数位或奇数位。In some embodiments, the second binary data group may include one binary bit in the initial PCM audio data, or a plurality of continuously distributed binary bits. In other embodiments, the second binary data group may include a plurality of discretely distributed binary bits in the original PCM audio data. For example, the second binary data group may include even or odd bits in the original PCM audio data.
在一些实施例中,第一二进制数据组和第二二进制数据组对应的位数可以不同。In some embodiments, the number of bits corresponding to the first binary data group and the second binary data group may be different.
在一些实施例中,第一二进制数据组的位数可以大于第二二进制数据组的位数。例如,针对32位初始PCM音频数据,第一二进制数据组可以对应初始PCM音频数据的高24位,第二二进制数据组可以对应初始PCM音频数据的低8位。In some embodiments, the number of bits in the first binary data set may be greater than the number of bits in the second binary data set. For example, for 32-bit initial PCM audio data, the first binary data group may correspond to the upper 24 bits of the initial PCM audio data, and the second binary data group may correspond to the lower 8 bits of the initial PCM audio data.
在一些实施例中,第一二进制数据组对应的位数可以小于第二二进制数据组对应的位数。例如,针对64位初始PCM音频数据,第一二进制数据组可以对应初始PCM音频数据的高24位,第二二进制数据组可以对应初始PCM音频数据的低48位。In some embodiments, the number of bits corresponding to the first binary data group may be smaller than the number of bits corresponding to the second binary data group. For example, for 64-bit initial PCM audio data, the first binary data group may correspond to the upper 24 bits of the initial PCM audio data, and the second binary data group may correspond to the lower 48 bits of the initial PCM audio data.
在一些实施例中,第一二进制数据组和第二二进制数据组对应的位数可以相同。例如,针对32位初始PCM音频数据,第一二进制数据组可以对应初始PCM音频数据的高16位,第二二进制数据组可以对应初始PCM音频数据的低16位。又如,针对32位初始PCM音频数据,第一二进制数据组可以对应初始PCM音频数据的高8位,第二二进制数据组可以对应初始PCM音频数据的中8位或低8位。In some embodiments, the number of bits corresponding to the first binary data group and the second binary data group may be the same. For example, for 32-bit initial PCM audio data, the first binary data group may correspond to the upper 16 bits of the initial PCM audio data, and the second binary data group may correspond to the lower 16 bits of the initial PCM audio data. For another example, for 32-bit initial PCM audio data, the first binary data group may correspond to the upper 8 bits of the initial PCM audio data, and the second binary data group may correspond to the middle 8 bits or lower 8 bits of the initial PCM audio data. .
下面分别以32位和24位的初始PCM音频数据为例,给出初始PCM音频数据的几个具体的拆分示例。在下面的示例中,第一二进制数据组可以是从初始PCM音频数据中拆分出的高位数据;第二二进制数据组可以是初始PCM音频数据中拆分出的中位数据或低位数据。The following takes 32-bit and 24-bit initial PCM audio data as examples to give several specific splitting examples of the initial PCM audio data. In the following example, the first binary data group may be the high-bit data split from the initial PCM audio data; the second binary data group may be the middle-bit data split from the initial PCM audio data or Low bit data.
对于32位的初始PCM音频数据,可以有以下几种拆分类型:24位+8位、24位+4位+4位、16位+16位、16位+8位+8位、16位+8位+4位+4位、16位+4位+4位+4位+4位、8位+8位+8位等。For 32-bit initial PCM audio data, there are several splitting types: 24-bit+8-bit, 24-bit+4-bit+4-bit, 16-bit+16-bit, 16-bit+8-bit+8-bit, 16-bit +8 digits + 4 digits + 4 digits, 16 digits + 4 digits + 4 digits + 4 digits + 4 digits, 8 digits + 8 digits + 8 digits, etc.
对于24位的初始PCM音频数据,可以有以下几种拆分类型:16位+8位、16位+4位+4位。For 24-bit initial PCM audio data, there are several splitting types: 16-bit + 8-bit, 16-bit + 4-bit + 4-bit.
在步骤S220,对第一二进制数据组和第二二进制数据组分别进行音频编码,得到对应的第一编码包和第二编码包。In step S220, perform audio encoding on the first binary data group and the second binary data group respectively to obtain corresponding first encoded packets and second encoded packets.
这里提到的音频编码可以是无损的蓝牙音频编码(如FLAC编码),也可以是有损的 蓝牙音频编码(如SBC、AAC编码)。The audio encoding mentioned here can be lossless Bluetooth audio encoding (such as FLAC encoding) or lossy Bluetooth audio encoding (such as SBC, AAC encoding).
在一些实施例中,第一编码包和第二编码包可以按串行的方式进行分别编码。在一些实施例中,第一编码包和第二编码包可以按并行方式进行编码。In some embodiments, the first encoded packet and the second encoded packet may be separately encoded in a serial manner. In some embodiments, the first encoded packet and the second encoded packet may be encoded in a parallel manner.
除了音频数据之外,第一编码包和第二编码包还可以包含附加信息。该附加信息例如可以包括例如标识信息和/或校验信息。In addition to audio data, the first encoded packet and the second encoded packet may also contain additional information. The additional information may include, for example, identification information and/or verification information.
标识信息可用于标识编码包在码流中的位置。也就是说,标识信息可以对编码包在码流中的时间先后进行标记。音频播放设备根据该标识信息进行组包后,可以保证码流的顺序正确。前文提到的第一编码包和第二编码包可以包含相同的标识信息,音频播放设备可以根据标识信息找到初始PCM音频数据对应的编码包,并进行组包。The identification information can be used to identify the position of the encoded packet in the code stream. In other words, the identification information can mark the time sequence of the encoded packets in the code stream. After the audio playback device groups packets based on this identification information, it can ensure that the order of the code streams is correct. The first encoding packet and the second encoding packet mentioned above may contain the same identification information, and the audio playback device can find the encoding packet corresponding to the initial PCM audio data according to the identification information, and assemble the packets.
在一些实施例中,标识信息可以是时间序列码。时间序列码可以对第一编码包和第二编码包进行时间标记,以便音频播放设备按时间序列进行组包。在一些实施例中,时间序列码可以是一个0到264-1的长整形的变量。当时间序列码的变量增加到264-1时,下一个值可以为0。发送端可以按每个编码包对应的时间序列值进行标识。例如将时间序列值100编入该时刻对应编码包的时间序列位,下一个编码包对应的时间序列值就是101。In some embodiments, the identification information may be a time sequence code. The time sequence code can time-mark the first encoded packet and the second encoded packet, so that the audio playback device can group the packets in time sequence. In some embodiments, the time sequence code may be a long integer variable ranging from 0 to 2 64 -1. When the variable of the time series code increases to 2 64 -1, the next value can be 0. The sender can be identified by the time series value corresponding to each encoded packet. For example, if the time series value 100 is compiled into the time series bit corresponding to the encoding packet at that moment, the time series value corresponding to the next encoding packet will be 101.
校验信息可以对编码包内的音频数据进行校验,以便接收端确定编码包的完整性。在一些实施例中,检验信息可以是校验码。例如,可以从编码包第1位比特值开始对下一个值进行异或计算,得到的计算结果即可作为校验码。The verification information can verify the audio data in the encoded packet so that the receiving end can determine the integrity of the encoded packet. In some embodiments, the verification information may be a check code. For example, you can perform XOR calculation on the next value starting from the first bit value of the encoded packet, and the obtained calculation result can be used as the check code.
在步骤S230,通过无线信道分别传输第一编码包和第二编码包。以蓝牙音频数据为例,发送端可以利用蓝牙模块发送第一编码包和第二编码包。In step S230, the first encoded packet and the second encoded packet are respectively transmitted through the wireless channel. Taking Bluetooth audio data as an example, the sending end can use the Bluetooth module to send the first encoding packet and the second encoding packet.
将初始PCM音频数据分成多个二进制数据组,可以以更小的粒度进行重传,从而可以降低重传数据量和传输时延。Dividing the initial PCM audio data into multiple binary data groups can be retransmitted at a smaller granularity, thereby reducing the amount of retransmitted data and transmission delay.
在本发明的一些实施例中,对于传输第一和/或第二编码包成功或失败的各种情况,视信道状态或实际需求,可以采用不同的重传策略。例如,对于第一编码包传输成功而第二编码包传输失败的情况,可以重传第二编码包,或,放弃传输第二编码包。又例如,对于第一、第二编码包均传输失败的情况,可以重传第一、第二两个编码包,或,放弃传输第二编码包而仅重传第一编码包。为此,图2的方法还可以包括不同的步骤,以下进一步说明。In some embodiments of the present invention, for various situations of success or failure in transmitting the first and/or second encoded packets, different retransmission strategies may be adopted depending on the channel status or actual requirements. For example, if the first coded packet is successfully transmitted but the second coded packet fails to be transmitted, the second coded packet may be retransmitted, or the transmission of the second coded packet may be given up. For another example, when both the first and second coded packets fail to be transmitted, the first and second coded packets may be retransmitted, or the transmission of the second coded packet may be given up and only the first coded packet may be retransmitted. To this end, the method of Figure 2 can also comprise different steps, which are explained further below.
在一些实施例中,图2的方法还包括步骤A:响应于确定第一编码包的传输成功且第二编码包的传输失败,重传第二编码包。对第二编码包进行重传可以保证无损传输。In some embodiments, the method of FIG. 2 further includes step A: in response to determining that the transmission of the first encoded packet is successful and the transmission of the second encoded packet fails, retransmitting the second encoded packet. Retransmitting the second encoded packet can ensure lossless transmission.
在一些实施例中,图2的方法还包括步骤B:响应于确定第一编码包的传输成功且第二编码包的传输失败,放弃传输第二编码包。放弃传输第二编码包,虽然会损失一定的音 频数据,但可以提高传输效率。In some embodiments, the method of FIG. 2 further includes step B: in response to determining that the transmission of the first encoded packet is successful and the transmission of the second encoded packet fails, giving up transmitting the second encoded packet. Give up transmitting the second encoded packet, although a certain amount of audio will be lost. frequency data, but can improve transmission efficiency.
在一些实施例中,图2的方法还包括步骤C:响应于确定第一编码包的传输失败且第二编码包的传输成功,重传第一编码包。对第一编码包进行重传可以保证无损传输。In some embodiments, the method of FIG. 2 further includes step C: in response to determining that the transmission of the first encoded packet fails and the transmission of the second encoded packet is successful, retransmitting the first encoded packet. Retransmitting the first encoded packet can ensure lossless transmission.
在一些实施例中,图2的方法还包括步骤D:响应于确定第一编码包的传输失败且第二编码包的传输失败,重传第一编码包且放弃传输第二编码包。放弃传输第二编码包,虽然会损失一定的音频数据,但可以提高传输效率。以24位的初始PCM音频数据被拆分成高16位的第一二进制数据组和低8位的第二二进制数据组为例,在重传第一编码包(对应第一二进制数据组)而放弃传输第二编码包(对应第二二进制数据组)的情况下,损失的低8位的数据量为28-1,全部的24位的数据量为224-1,损失率为28-1/224-1≈1/216,显然,这个损失率很低,而同时,因为仅重传第一编码包,传输效率获得提高。In some embodiments, the method of FIG. 2 further includes step D: in response to determining that the transmission of the first encoded packet fails and the transmission of the second encoded packet fails, retransmitting the first encoded packet and giving up transmission of the second encoded packet. Although a certain amount of audio data will be lost by giving up the transmission of the second encoding packet, the transmission efficiency can be improved. Taking the 24-bit initial PCM audio data as an example, it is split into a first binary data group of high 16 bits and a second binary data group of low 8 bits. When retransmitting the first encoded packet (corresponding to the first binary data group) binary data group) and gives up transmitting the second encoded packet (corresponding to the second binary data group), the data amount of the lower 8 bits lost is 2 8 -1, and the total 24-bit data amount is 2 24 -1, the loss rate is 2 8 -1/2 24 -1≈1/2 16 . Obviously, this loss rate is very low. At the same time, because only the first encoded packet is retransmitted, the transmission efficiency is improved.
应理解,上述步骤A、B、C、D可并行执行,也可按不同的顺序先后执行,此外,各步骤可组合执行、或拆分为多个子步骤来执行。例如,步骤C、D可组合成以下两个先后执行的步骤:响应于确定第一编码包的传输失败,重传第一编码包;以及,响应于确定第二编码包的传输失败,放弃传输第二编码包。It should be understood that the above-mentioned steps A, B, C, and D can be executed in parallel or successively in different orders. In addition, each step can be executed in combination or divided into multiple sub-steps. For example, steps C and D can be combined into the following two steps that are executed sequentially: in response to determining that the transmission of the first encoded packet fails, retransmitting the first encoded packet; and in response to determining that the transmission of the second encoded packet fails, giving up the transmission The second encoding package.
在一些实施例中,发送端可以基于无线信道的信道状态确定执行第二编码包的重传或放弃。信道状态可以根据CSI或CQI信息来确定。例如,如果信道状态好(如信道质量大于或等于预设阈值),则可以执行第二编码包的重传。又如,如果信道状态差(如信道质量小于预设阈值),则可以放弃重传第二编码包。In some embodiments, the sending end may determine to perform retransmission or abandonment of the second encoded packet based on the channel status of the wireless channel. The channel status can be determined based on CSI or CQI information. For example, if the channel status is good (eg, the channel quality is greater than or equal to a preset threshold), retransmission of the second encoded packet may be performed. For another example, if the channel status is poor (for example, the channel quality is less than a preset threshold), retransmission of the second encoded packet may be given up.
图3是本申请另一实施例提供的传输音频数据的方法的流程示意图。该传输音频数据的方法还可以称为接收音频数据的方法。图3中的方法可以由PCM音频数据的接收端执行。该接收端例如可以是音频播放设备,如蓝牙耳机、蓝牙音响或汽车蓝牙播放设备。应理解,图3所示的流程中具有与图2所示的流程相互对应的内容,因此,为了简洁,图3不再对图2已经出现的术语进行详细解释。FIG. 3 is a schematic flowchart of a method for transmitting audio data provided by another embodiment of the present application. This method of transmitting audio data may also be called a method of receiving audio data. The method in Figure 3 can be performed by the receiving end of PCM audio data. The receiving end may be, for example, an audio playback device, such as a Bluetooth headset, a Bluetooth speaker, or a car Bluetooth playback device. It should be understood that the process shown in FIG. 3 has content that corresponds to the process shown in FIG. 2 . Therefore, for the sake of simplicity, FIG. 3 no longer explains in detail the terms that have appeared in FIG. 2 .
参见图3,在步骤S310,通过无线信道接收第一编码包。Referring to Figure 3, in step S310, a first encoded packet is received through a wireless channel.
在步骤S320,对第一编码包进行音频解码,得到第一二进制数据组。In step S320, perform audio decoding on the first encoded packet to obtain a first binary data group.
在步骤S330,至少部分地基于第一二进制数据组生成PCM音频数据。At step S330, PCM audio data is generated based at least in part on the first binary data set.
其中,第一二进制数据组可对应于初始PCM音频数据的第一批多个二进制位。Wherein, the first binary data group may correspond to a first plurality of binary bits of the initial PCM audio data.
可以理解的是,此处至少部分地基于第一二进制数据组所生成的PCM音频数据与前文所述的初始PCM音频数据可能是相同的,也可能是不同的。这取决于用于生成PCM音频数据的编码包是否包含了初始PCM音频数据所对应的所有编码包。It can be understood that the PCM audio data generated here based at least in part on the first binary data group may be the same as the aforementioned initial PCM audio data, or may be different. This depends on whether the encoding packet used to generate PCM audio data contains all encoding packets corresponding to the initial PCM audio data.
例如,初始PCM音频数据会被转换并编码为第一编码包和第二编码包,在发送端通 过无线信道将第一编码包和第二编码包传输给接收端的时候,在某些情况下,可能会对第二编码包放弃传输,因此在接收端可能只能接收到第一编码包,此时,接收端可仅通过第一编码包中的数据生成PCM音频数据。这时,所生成的PCM音频数据包括第一二进制数据组(从第一编码包解码得到),而初始PCM音频数据包括第一二进制数据组和第二二进制数据组,两者并不相同。For example, the initial PCM audio data will be converted and encoded into a first encoded packet and a second encoded packet. When transmitting the first coded packet and the second coded packet to the receiving end through the wireless channel, in some cases, the transmission of the second coded packet may be given up, so the receiving end may only receive the first coded packet. This At this time, the receiving end can generate PCM audio data only through the data in the first encoded packet. At this time, the generated PCM audio data includes a first binary data group (decoded from the first encoded packet), and the initial PCM audio data includes a first binary data group and a second binary data group. are not the same.
或者,初始PCM音频数据会被转换并编码为第一编码包和第二编码包,而发送端在通过无线信道进行传输时,不会对第一编码包和第二编码包进行放弃,接收端还可以通过无线信道接收第二编码包,并对第二编码包进行音频解码,以得到第二二进制数据组(其中,第二二进制数据组可对应于初始PCM音频数据的第二批一个或多个二进制位)。此时,接收端是基于第一二进制数据组(从第一编码包解码得到)和第二二进制数据组(从第二编码包解码得到)生成PCM音频数据,因此,其与初始PCM音频数据是相同的。Alternatively, the initial PCM audio data will be converted and encoded into the first encoded packet and the second encoded packet, and the sender will not give up the first encoded packet and the second encoded packet when transmitting through the wireless channel, and the receiving end will The second encoded packet may also be received through the wireless channel, and the second encoded packet may be audio decoded to obtain a second binary data group (wherein the second binary data group may correspond to a second portion of the initial PCM audio data). batch of one or more binary bits). At this time, the receiving end generates PCM audio data based on the first binary data group (decoded from the first encoded packet) and the second binary data group (decoded from the second encoded packet). Therefore, it is different from the initial PCM audio data is the same.
需要说明的是,上述接收端所接收的第一编码包和第二编码包可以是经过初次传输就获得的编码包,也可以是经过重传后所获得的编码包。换言之,在确定第一编码包传输失败的情况下,接收端可再接收重传的第一编码包。在确定第二编码包传输失败的情况下,接收端也可再接收重传的第二编码包。本申请实施例对此不做具体的限定。对应于前文所述的重传,接收音频数据的方法还可以包括接收端生成或者发送请求的步骤,以指示发送端重传编码包或接收端放弃重传机会,具体包括以下几种情况。It should be noted that the first coded packet and the second coded packet received by the receiving end may be coded packets obtained after initial transmission, or may be coded packets obtained after retransmission. In other words, if it is determined that the transmission of the first encoded packet fails, the receiving end may receive the retransmitted first encoded packet. If it is determined that the transmission of the second encoded packet fails, the receiving end may also receive the retransmitted second encoded packet. The embodiments of the present application do not specifically limit this. Corresponding to the retransmission mentioned above, the method of receiving audio data may also include the step of the receiving end generating or sending a request to instruct the sending end to retransmit the encoded packet or the receiving end to give up the retransmission opportunity, specifically including the following situations.
情况一(无损传输):响应于确定第一编码包的传输失败,生成请求重传第一编码包的请求。Case 1 (lossless transmission): In response to determining that transmission of the first encoded packet fails, a request for retransmission of the first encoded packet is generated.
情况二(无损传输):响应于确定第一编码包的传输成功且第二编码包的传输失败,生成请求重传第二编码包的请求。Case 2 (lossless transmission): In response to determining that the transmission of the first encoded packet is successful and the transmission of the second encoded packet fails, a request for retransmission of the second encoded packet is generated.
情况三(有损传输):响应于确定第一编码包的传输成功且第二编码包的传输失败,生成放弃重传第二编码包的请求。Case three (lossy transmission): In response to determining that the transmission of the first encoded packet is successful and the transmission of the second encoded packet fails, a request to give up and retransmit the second encoded packet is generated.
情况四(无损传输):响应于确定第一编码包的传输失败且第二编码包的传输失败,生成请求重传第一编码包和第二编码包的请求。Case 4 (lossless transmission): In response to determining that the transmission of the first encoded packet fails and the transmission of the second encoded packet fails, a request for retransmission of the first encoded packet and the second encoded packet is generated.
情况五(有损传输):响应于确定第一编码包的传输失败且第二编码包的传输失败,生成请求重传第一编码包且放弃重传第二编码包的请求。Case 5 (lossy transmission): In response to determining that the transmission of the first encoded packet fails and the transmission of the second encoded packet fails, a request to retransmit the first encoded packet is generated and a request to retransmit the second encoded packet is given up.
另外,在接收端同样可以基于无线信道的信道状态确定接收重传的第二编码包或放弃重传的第二编码包。其方法与前文相似,此处不再赘述。In addition, the receiving end may also determine to receive the retransmitted second coded packet or to give up the retransmitted second coded packet based on the channel state of the wireless channel. The method is similar to the previous one and will not be described again here.
在一些实施例中,在音频的接收端(例如蓝牙耳机),用户可通过触摸耳机的调节部或按钮来做出选择,用户选择通常是出于期望获得无损音频体验还是更低时延的考量,无 损音频体验可能需要实现无损传输,即在第二编码包传输失败时需要重传。更低时延的考量则需要在第二编码包传输失败时放弃重传。相应地,音频接收端的耳机根据用户选择来生成请求重传第二编码包的请求、或生成放弃重传机会的请求。In some embodiments, at the receiving end of the audio (such as a Bluetooth headset), the user can make a selection by touching the adjustment part or button of the headset. The user's choice is usually based on the desire for a lossless audio experience or lower latency. ,none Lossless audio experience may require lossless transmission, that is, retransmission is required when the second encoded packet fails to be transmitted. The consideration of lower delay requires giving up retransmission when the transmission of the second encoded packet fails. Correspondingly, the headset of the audio receiving end generates a request to retransmit the second encoded packet or generates a request to give up the retransmission opportunity according to the user's selection.
进一步地,在一些实施例中,接收音频数据的方法还可包括:对所述初始PCM音频数据进行数模转换,得到模拟音频信号;并播放所述模拟音频信号。Further, in some embodiments, the method of receiving audio data may further include: performing digital-to-analog conversion on the initial PCM audio data to obtain an analog audio signal; and playing the analog audio signal.
上文结合图2和图3,分别从发送端和接收端的角度介绍了本申请实施例提供的传输音频数据的方法。为便于理解,下面以24位初始PCM音频数据、无损FLAC编码为例,结合图4至图6,对本申请实施例的进行更加详细、清楚地描述。The above describes the method of transmitting audio data provided by embodiments of the present application from the perspectives of the sending end and the receiving end in conjunction with Figure 2 and Figure 3 respectively. For ease of understanding, the following takes 24-bit initial PCM audio data and lossless FLAC encoding as an example to describe the embodiments of the present application in more detail and clearly with reference to Figures 4 to 6 .
图4为将24位的初始PCM音频数据410拆分成高16位的第一二进制数据组和低8位的第二二进制数据组的示意图。在将PCM音频数据410进行拆分之后,可以分别对第一二进制数据组420和第二二进制数据组430进行蓝牙音频编码(FLAC编码),得到如图5所示的第一编码包500,以及如图6所示的第二编码包600。FIG. 4 is a schematic diagram of splitting the 24-bit initial PCM audio data 410 into a first binary data group of high-order 16 bits and a second binary data group of low-order 8 bits. After splitting the PCM audio data 410, Bluetooth audio encoding (FLAC encoding) can be performed on the first binary data group 420 and the second binary data group 430 respectively to obtain the first encoding as shown in Figure 5 packet 500, and the second encoded packet 600 as shown in Figure 6.
参见图5和图6,第一编码包500包括高16为的FLAC包510、时间序列码520和校验码530。第二编码包600包括低8位的FLAC包610、时间序列码620和校验码630。时间序列码620与时间序列码520的取值相同。Referring to FIGS. 5 and 6 , the first encoding packet 500 includes a high-16 FLAC packet 510 , a time sequence code 520 and a check code 530 . The second encoding packet 600 includes the lower 8-bit FLAC packet 610, the time sequence code 620 and the check code 630. The time sequence code 620 has the same value as the time sequence code 520.
电子设备通过发送模块将第一编码包500和第二编码包600进行无线传输。音频播放设备接收到第一编码包500和第二编码包600后,进行校验。如果校验成功,则可表示传输成功。The electronic device wirelessly transmits the first encoded packet 500 and the second encoded packet 600 through the sending module. After receiving the first encoded packet 500 and the second encoded packet 600, the audio playback device performs verification. If the verification is successful, the transmission is successful.
音频播放设备对接收到的第一编码包500和第二编码包600分别进行解压缩,可以得到第一二进制数据组和第二二进制数据组。The audio playback device decompresses the received first encoded packet 500 and the second encoded packet 600 respectively to obtain the first binary data group and the second binary data group.
音频播放设备按照高位和低位的排序,将第一二进制数据组和第二二进制数据组组合在一起,形成初始PCM音频数据。The audio playback device combines the first binary data group and the second binary data group in order of high bits and low bits to form initial PCM audio data.
如果校验失败,说明传输过程中出现了丢包或传输失败。下面分情况进行讨论。If the verification fails, it means that packet loss or transmission failure occurred during the transmission process. The following is discussed case by case.
情况一:第一编码包和第二编码包全部丢失或传输失败。针对情况一,如果第一编码包500和第二编码包600均进行重传,则重传数据量与传统方案(即直接重传24位数据的方案)相同。Scenario 1: Both the first encoded packet and the second encoded packet are lost or the transmission fails. Regarding case 1, if both the first encoded packet 500 and the second encoded packet 600 are retransmitted, the amount of retransmitted data is the same as the traditional solution (that is, the solution of directly retransmitting 24-bit data).
情况二:第一编码包丢失,第二编码包传输成功。针对这种情况,编码包500进行重传。针对情况二,本申请实施例只需要重传高16位的第一编码包,假设重传成功,则一共传输16+8+16=40位的数据,而传统方案一共传输24+24=48位的数据。也就是说,本申请实施例少传8位数据,即少传8/48=1/6的数据量。Scenario 2: The first encoded packet is lost, but the second encoded packet is transmitted successfully. In this case, the encoded packet 500 is retransmitted. Regarding the second situation, the embodiment of this application only needs to retransmit the first coded packet with the upper 16 bits. Assuming that the retransmission is successful, a total of 16+8+16=40 bits of data will be transmitted, while the traditional solution will transmit a total of 24+24=48 bits of data. That is to say, the embodiment of the present application transmits 8 fewer bits of data, that is, 8/48 = 1/6 less data amount is transmitted.
情况三:第一编码包传输成功,第二编码包丢失。针对情况三,本申请实施例只需要 重传低8位的第二编码包。假设重传成功,则一共传输16+8+8=32位的数据,而传统方案一共传输24+24=48位的数据。也就是说,本申请实施例少传16位数据,即少传16/48=1/3的数据量。Scenario 3: The first encoded packet is transmitted successfully, but the second encoded packet is lost. For situation three, the embodiment of this application only requires Retransmit the lower 8 bits of the second encoded packet. Assuming that the retransmission is successful, a total of 16+8+8=32 bits of data are transmitted, while the traditional solution transmits a total of 24+24=48 bits of data. That is to say, the embodiment of the present application transmits less 16-bit data, that is, less data amount of 16/48=1/3 is transmitted.
在进行的全分贝刻度(decibels full scale,dBFS)和总谐波失真加噪声(total harmonic distortion+noise,THD+N)的实验中,对24位的初始PCM音频数据进行低8位清零后,用户的无损音频体验并没有明显下降。对真实的歌曲体验进行调研,大部分用户并不能分清原歌曲和对低位清零的歌曲。因此,本申请实施例提出的音频传输方法,在保证用户体验的前提下,可以达到减少数据传输量、进而降低时延的目的。在恶劣传输环境中,可以显著地降低时延,提升传输效率。In the experiments of full decibel scale (dBFS) and total harmonic distortion plus noise (THD+N), the 24-bit initial PCM audio data was cleared after the lower 8 bits were cleared. , the user’s lossless audio experience has not been significantly degraded. According to a survey on real song experience, most users cannot distinguish between original songs and songs with low bits cleared. Therefore, the audio transmission method proposed in the embodiment of this application can achieve the purpose of reducing the amount of data transmission and thereby reducing the delay while ensuring the user experience. In harsh transmission environments, latency can be significantly reduced and transmission efficiency improved.
在一些实施例中,可以将24位的初始PCM音频数据拆分为16位+4位+4位的三个二进制数据组。在该示例中,前文提到的第一二进制数据组可以是高16位的二进制数据组;第二二进制数据组可以是中4位的二进制数据组,也可以是低4位的二进制数据组。通过对该三个二进制数据组分别进行编码,可以得到三个编码包。在该示例中,低4位二进制数据组对应的编码包传输失败时,可以不进行重传。即使不重传,解码后PCM音频数据的SNR已达到120dB。也就是说,解码后PCM音频数据的SNR大于DAC的SNR指标。In some embodiments, the 24-bit initial PCM audio data may be split into three binary data groups of 16-bit+4-bit+4-bit. In this example, the first binary data group mentioned above can be a binary data group with the upper 16 bits; the second binary data group can be a binary data group with the middle 4 bits or the lower 4 bits. Group of binary data. By encoding the three binary data groups respectively, three encoding packets can be obtained. In this example, when the encoding packet corresponding to the lower 4-bit binary data group fails to be transmitted, retransmission does not need to be performed. Even without retransmission, the SNR of the decoded PCM audio data has reached 120dB. In other words, the SNR of the decoded PCM audio data is greater than the SNR indicator of the DAC.
综上所述,本申请实施例在尽量保证用户体验的前提下,减少了重传音频数据的次数和重传音频数据的传输量,从而降低了传输音频数据的带宽要求。进一步地,降低了数据出错机率,提升传输效率并降低传输时延。To sum up, the embodiments of the present application reduce the number of audio data retransmissions and the amount of audio data retransmissions while ensuring the user experience as much as possible, thereby reducing the bandwidth requirements for audio data transmission. Furthermore, the probability of data errors is reduced, transmission efficiency is improved, and transmission delay is reduced.
下面结合具体例子图7,对本申请实施例进行更加完整地举例说明。应注意,图2至图6的例子仅仅是为了帮助本领域技术人员理解本申请实施例,而非要将本申请实施例限于所例示的具体数值或具体场景。本领域技术人员根据所给出的图2至图6的例子,显然可以进行各种等价的修改或变化,这样的修改或变化也落入本申请实施例的范围内。Below, a more complete illustration of the embodiment of the present application will be given with reference to the specific example in FIG. 7 . It should be noted that the examples in Figures 2 to 6 are only to help those skilled in the art understand the embodiments of the present application, and are not intended to limit the embodiments of the present application to the specific numerical values or specific scenarios illustrated. Those skilled in the art can obviously make various equivalent modifications or changes based on the examples given in FIGS. 2 to 6 , and such modifications or changes also fall within the scope of the embodiments of the present application.
图7是本申请一实施例提供的蓝牙音频传输方法的流程示意图,完整地描述了电子设备和音频播放设备在整个传输过程中的流程。Figure 7 is a schematic flowchart of a Bluetooth audio transmission method provided by an embodiment of the present application, completely describing the flow of the entire transmission process of the electronic device and the audio playback device.
参见图7,与图1相比,图7所示传输方法的差异在步骤S730和步骤S760。其他步骤与图1相同,在此不再赘述。Referring to Figure 7, compared with Figure 1, the difference in the transmission method shown in Figure 7 is step S730 and step S760. Other steps are the same as in Figure 1 and will not be repeated here.
在步骤S730,对初始PCM音频数据进行蓝牙音频分拆编码。分拆和编码方式可以参考前文所述的方法,得到多个编码包。In step S730, Bluetooth audio split encoding is performed on the initial PCM audio data. For splitting and encoding methods, you can refer to the method described above to obtain multiple encoding packages.
在步骤S760,对多个编码包进行PCM解码组包。如前文所述,解码和组包方式以得到电子设备的初始PCM音频数据为目标。 In step S760, perform PCM decoding and grouping on multiple encoded packets. As mentioned above, the decoding and packaging method aims to obtain the initial PCM audio data of the electronic device.
上文结合图2至图7,详细地描述了本申请的方法实施例。在本发明的一些实施例中,传输音频数据的方法可以由手机端的通信芯片执行。相应地,接收音频数据的方法可以由耳机端的通信芯片执行。这样的通信芯片落入本发明的保护范围之内。The method embodiments of the present application are described in detail above with reference to Figures 2 to 7. In some embodiments of the present invention, the method of transmitting audio data may be performed by a communication chip on the mobile phone. Correspondingly, the method of receiving audio data can be performed by the communication chip on the earphone side. Such communication chips fall within the protection scope of the present invention.
下面结合图8至图11,详细描述本申请的装置实施例。应理解,装置实施例的描述与方法实施例的描述相互对应,因此,未详细描述的部分可以参见前面方法实施例。The device embodiments of the present application will be described in detail below with reference to FIGS. 8 to 11 . It should be understood that the description of the device embodiments corresponds to the description of the method embodiments. Therefore, the parts not described in detail can be referred to the previous method embodiments.
图8是本申请一个实施例提供的传输音频数据的装置的结构示意图。图8所示的装置800包括处理器810和发射器820。在一些实施例中,装置800可实现为手机端的通信芯片,处理器对应于芯片的应用处理器,发射器对应于芯片的射频模块(以及可能存在的蓝牙控制器)。Figure 8 is a schematic structural diagram of a device for transmitting audio data provided by an embodiment of the present application. The device 800 shown in FIG. 8 includes a processor 810 and a transmitter 820. In some embodiments, the device 800 can be implemented as a communication chip on a mobile phone, the processor corresponds to the chip's application processor, and the transmitter corresponds to the chip's radio frequency module (and a possible Bluetooth controller).
处理器810可用于将初始PCM音频数据转换为第一二进制数据组和第二二进制数据组,并对所述第一二进制数据组和所述第二二进制数据组分别进行音频编码,得到对应的第一编码包和第二编码包。The processor 810 may be configured to convert the initial PCM audio data into a first binary data group and a second binary data group, and perform processing on the first binary data group and the second binary data group respectively. Perform audio encoding to obtain the corresponding first encoding packet and second encoding packet.
发射器820可用于通过无线信道分别传输所述第一编码包和所述第二编码包;其中,所述第一二进制数据组对应于所述初始PCM音频数据的第一批多个二进制位,所述第二二进制数据组对应于所述初始PCM音频数据的第二批一个或多个二进制位。The transmitter 820 may be configured to transmit the first encoded packet and the second encoded packet respectively through a wireless channel; wherein the first binary data group corresponds to a first plurality of binary data of the initial PCM audio data. bits, the second binary data group corresponding to a second batch of one or more binary bits of the initial PCM audio data.
可选地,处理器810还可用于:响应于确定所述第一编码包的传输成功且所述第二编码包的传输失败,利用所述发射器重传所述第二编码包。Optionally, the processor 810 may also be configured to: in response to determining that the transmission of the first encoded packet is successful and the transmission of the second encoded packet fails, use the transmitter to retransmit the second encoded packet.
可选地,处理器810还可用于:响应于确定所述第一编码包的传输成功且所述第二编码包的传输失败,放弃传输所述第二编码包。Optionally, the processor 810 may also be configured to: in response to determining that the transmission of the first encoded packet is successful and the transmission of the second encoded packet fails, give up transmitting the second encoded packet.
可选地,处理器810还可用于:响应于确定所述第一编码包的传输失败且所述第二编码包的传输成功,利用所述发射器820重传所述第一编码包。Optionally, the processor 810 may also be configured to: in response to determining that the transmission of the first encoded packet fails and the transmission of the second encoded packet is successful, use the transmitter 820 to retransmit the first encoded packet.
可选地,处理器810还可用于:响应于确定所述第一编码包的传输失败且所述第二编码包的传输失败,利用所述发射器820重传所述第一编码包且放弃传输所述第二编码包。Optionally, the processor 810 may also be configured to: in response to determining that the transmission of the first encoded packet fails and the transmission of the second encoded packet fails, use the transmitter 820 to retransmit the first encoded packet and give up. Transmit the second encoded packet.
可选地,处理器810还可用于:基于所述无线信道的信道状态确定执行所述第二编码包的重传或放弃。Optionally, the processor 810 may also be configured to: determine to perform retransmission or abandonment of the second encoded packet based on the channel state of the wireless channel.
可选地,处理器810配置成:以所述初始PCM音频数据的N位数据中的高M位数据形成所述第一二进制数据组。Optionally, the processor 810 is configured to form the first binary data group with high M-bit data among the N-bit data of the initial PCM audio data.
可选地,处理器810配置成:以所述初始PCM音频数据的N位数据中的低L位数据形成所述第二二进制数据组。Optionally, the processor 810 is configured to form the second binary data group with lower L-bit data in the N-bit data of the initial PCM audio data.
可选地,处理器810进一步配置成:使得所述第一二进制数据组满足以下条件中的一种或多种:如果N大于或等于24,则配置所述第一二进制数据组的位数为大于或等于16; 如果N小于24,则配置所述第一二进制数据组的位数为大于或等于8;以及配置所述第一二进制数据组的位数为大于或等于所述第二二进制数据组的位数。Optionally, the processor 810 is further configured to: make the first binary data group satisfy one or more of the following conditions: if N is greater than or equal to 24, configure the first binary data group The number of digits is greater than or equal to 16; If N is less than 24, configure the number of bits of the first binary data group to be greater than or equal to 8; and configure the number of bits of the first binary data group to be greater than or equal to the second binary The number of digits in the data group.
可选地,处理器810进一步配置成:在所述第一编码包和所述第二编码包中分别配置对应的标识信息,所述标识信息用于标识对应的编码包在码流中的位置。Optionally, the processor 810 is further configured to configure corresponding identification information in the first encoding packet and the second encoding packet respectively, where the identification information is used to identify the position of the corresponding encoding packet in the code stream. .
图9是本申请另一实施例提供的接收音频数据的装置的结构示意图。图9所示的装置900包括接收器910和处理器920。在一些实施例中,装置900可实现为耳机端的通信芯片,处理器对应于芯片的处理器,接收器对应于芯片的射频模块(以及可能存在的蓝牙控制器)。Figure 9 is a schematic structural diagram of a device for receiving audio data provided by another embodiment of the present application. The device 900 shown in FIG. 9 includes a receiver 910 and a processor 920. In some embodiments, the device 900 may be implemented as a communication chip on the headset side, the processor corresponds to the processor of the chip, and the receiver corresponds to the radio frequency module (and possibly a Bluetooth controller) of the chip.
接收器910用于通过无线信道接收第一编码包。The receiver 910 is configured to receive the first encoded packet through the wireless channel.
处理器920用于对第一编码包进行音频解码,以得到第一二进制数据组,并至少部分地基于第一二进制数据组生成PCM音频数据。The processor 920 is configured to perform audio decoding on the first encoded packet to obtain a first binary data group, and generate PCM audio data based at least in part on the first binary data group.
其中,第一二进制数据组对应于初始PCM音频数据的第一批多个二进制位。Wherein, the first binary data group corresponds to the first plurality of binary bits of the initial PCM audio data.
可选地,接收器910还用于,通过无线信道接收第二编码包;处理器920还用于,对第二编码包进行音频解码,以得到第二二进制数据组;Optionally, the receiver 910 is also configured to receive the second encoded packet through the wireless channel; the processor 920 is further configured to perform audio decoding on the second encoded packet to obtain the second binary data group;
其中,所述第二二进制数据组对应于所述初始PCM音频数据的第二批一个或多个二进制位。Wherein, the second binary data group corresponds to a second batch of one or more binary bits of the initial PCM audio data.
可选地,处理器920进一步用于:基于所述第一二进制数据组和所述第二二进制数据组生成所述PCM音频数据。Optionally, the processor 920 is further configured to generate the PCM audio data based on the first binary data group and the second binary data group.
可选地,处理器920还用于响应于确定所述第一编码包的传输失败,生成请求重传所述第一编码包的请求。Optionally, the processor 920 is further configured to generate a request to retransmit the first encoded packet in response to determining that the transmission of the first encoded packet fails.
可选地,处理器920还用于:响应于确定所述第一编码包的传输成功且所述第二编码包的传输失败,生成请求重传所述第二编码包的请求。Optionally, the processor 920 is further configured to: in response to determining that the transmission of the first encoded packet is successful and the transmission of the second encoded packet fails, generate a request to retransmit the second encoded packet.
可选地,处理器920还用于:响应于确定所述第一编码包的传输成功且所述第二编码包的传输失败,生成放弃重传所述第二编码包的请求。Optionally, the processor 920 is further configured to: in response to determining that the transmission of the first encoded packet is successful and the transmission of the second encoded packet fails, generate a request to give up and retransmit the second encoded packet.
可选地,处理器920还用于:响应于确定所述第一编码包的传输失败且所述第二编码包的传输失败,生成请求重传所述第一编码包和所述第二编码包的请求。Optionally, the processor 920 is further configured to: in response to determining that the transmission of the first encoding packet fails and the transmission of the second encoding packet fails, generate a request to retransmit the first encoding packet and the second encoding packet. package request.
可选地,处理器920还用于:响应于确定所述第一编码包的传输失败且所述第二编码包的传输失败,生成期望重传所述第一编码包且放弃重传所述第二编码包的请求。Optionally, the processor 920 is further configured to: in response to determining that the transmission of the first encoded packet fails and the transmission of the second encoded packet fails, generate an expectation to retransmit the first encoded packet and give up retransmitting the Request for second encoded packet.
可选地,处理器920还用于:基于所述无线信道的信道状态确定接收重传的所述第二编码包或放弃重传的所述第二编码包。Optionally, the processor 920 is further configured to determine whether to receive the retransmitted second coded packet or to give up the retransmitted second coded packet based on the channel state of the wireless channel.
可选地,处理器920还用于:基于用户选择,生成请求重传所述第二编码包的请求或 放弃重传所述第二编码包的请求。Optionally, the processor 920 is further configured to: based on user selection, generate a request to retransmit the second encoded packet or Give up the request to retransmit the second encoded packet.
可选地,处理器920进一步配置成:在所述第一编码包和所述第二编码包中分别配置对应的标识信息,所述标识信息用于标识对应的编码包在码流中的位置。Optionally, the processor 920 is further configured to configure corresponding identification information in the first encoding packet and the second encoding packet respectively, where the identification information is used to identify the position of the corresponding encoding packet in the code stream. .
图10是本申请实施例提供的一种电子设备的结构示意图。图10的电子设备1000可以包括图8所示的装置800。Figure 10 is a schematic structural diagram of an electronic device provided by an embodiment of the present application. The electronic device 1000 of FIG. 10 may include the device 800 shown in FIG. 8 .
图11是本申请实施例提供的音频播放设备的结构示意图。图11的音频播放设备1100可以包括图9所示的装置900。Figure 11 is a schematic structural diagram of an audio playback device provided by an embodiment of the present application. The audio playback device 1100 of FIG. 11 may include the device 900 shown in FIG. 9 .
可选地,音频播放设备1100还包括:数模转换器,用于对所述初始PCM音频数据进行数模转换,得到模拟音频信号;播放器,用于播放所述模拟音频信号。Optionally, the audio playback device 1100 further includes: a digital-to-analog converter for performing digital-to-analog conversion on the initial PCM audio data to obtain an analog audio signal; and a player for playing the analog audio signal.
可选地,所述音频播放设备为蓝牙耳机、蓝牙音响或汽车蓝牙播放设备。Optionally, the audio playback device is a Bluetooth headset, a Bluetooth speaker, or a car Bluetooth playback device.
应理解,本申请实施例中,处理器可以为中央处理单元(central processing unit,CPU),处理器还可以是其他通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现成可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。It should be understood that in the embodiments of the present application, the processor can be a central processing unit (CPU), and the processor can also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits ( application specific integrated circuit (ASIC), off-the-shelf programmable gate array (field programmable gate array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that in the various embodiments of the present application, the size of the sequence numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its functions and internal logic, and should not be used in the embodiments of the present application. The implementation process constitutes any limitation.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其他方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其他的形式。In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or can be integrated into another system, or some features can be ignored, or not implemented. On the other hand, the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, indirect coupling or communication connection of devices or units, which may be in electrical, mechanical or other forms.
以上以蓝牙无线传输为例提供了多个实施例。然而,应理解,在本申请各实施例中,无线信道可包括配置在3G、4G、5G,Wi-Fi,蓝牙,或其他形式的无线互联网上的信道,经由这些信道均可实现音频数据的传输,并达成本申请各实施例的技术效果。The above provides multiple embodiments taking Bluetooth wireless transmission as an example. However, it should be understood that in various embodiments of the present application, wireless channels may include channels configured on 3G, 4G, 5G, Wi-Fi, Bluetooth, or other forms of wireless Internet, through which audio data can be transmitted. transmission, and achieve the technical effects of each embodiment of this application.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各 个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present application can be integrated into one processing unit, or each functional unit can be integrated into one processing unit. Each unit physically exists alone, or two or more units can be integrated into one unit.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够读取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,数字通用光盘(digital video disc,DVD))或者半导体介质(例如,固态硬盘(solid state disk,SSD))等。In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, e.g., the computer instructions may be transferred from a website, computer, server, or data center Transmission to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) means. The computer The readable storage medium can be any available media that can be read by a computer or a data storage device such as a server, data center, etc. that contains one or more available media integrated. The available media can be magnetic media, (for example, floppy disk, hard disk, tape), optical media (such as digital video disc (DVD)) or semiconductor media (such as solid state disk (SSD)), etc.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。 The above are only specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application. should be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

Claims (36)

  1. 一种传输音频数据的方法,其特征在于,包括:A method of transmitting audio data, characterized by including:
    将初始PCM音频数据拆分为至少第一二进制数据组和第二二进制数据组;Split the initial PCM audio data into at least a first binary data group and a second binary data group;
    对所述第一二进制数据组和所述第二二进制数据组分别进行音频编码;以及Perform audio encoding on the first binary data group and the second binary data group respectively; and
    通过无线信道分别传输所述第一二进制数据组对应的第一编码包和所述第二二进制数据组对应的第二编码包;respectively transmit the first coded packet corresponding to the first binary data group and the second coded packet corresponding to the second binary data group through a wireless channel;
    响应于确定所述第一编码包的传输失败,重传所述第一编码包;In response to determining that transmission of the first encoded packet fails, retransmitting the first encoded packet;
    其中,所述第一二进制数据组和所述第二二进制数据组分别对应于所述初始PCM音频数据的第一批多个二进制位和第二批一个或多个二进制位。Wherein, the first binary data group and the second binary data group respectively correspond to a first plurality of binary bits and a second batch of one or more binary bits of the initial PCM audio data.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1, further comprising:
    响应于确定所述第一编码包的传输成功而所述第二编码包的传输失败,重传所述第二编码包。In response to determining that the transmission of the first encoded packet is successful and the transmission of the second encoded packet fails, the second encoded packet is retransmitted.
  3. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1, further comprising:
    响应于确定所述第一编码包的传输成功而所述第二编码包的传输失败,放弃传输所述第二编码包。In response to determining that transmission of the first encoded packet is successful but transmission of the second encoded packet fails, transmission of the second encoded packet is abandoned.
  4. 根据权利要求1所述的方法,其特征在于,所述初始PCM音频数据为N位二进制数据,所述N位二进制数据中的高M位数据形成所述第一二进制数据组,所述N位二进制数据中的低L位数据形成所述第二二进制数据组。The method according to claim 1, characterized in that the initial PCM audio data is N-bit binary data, and the upper M-bit data in the N-bit binary data forms the first binary data group, and the The lower L-bit data in the N-bit binary data forms the second binary data group.
  5. 根据权利要求4所述的方法,其特征在于,所述N位二进制数据由所述高M位数据和所述低L位数据构成。The method according to claim 4, characterized in that the N-bit binary data consists of the high-M bit data and the low L-bit data.
  6. 根据权利要求4所述的方法,其特征在于,所述高M位数据的位数M不小于所述低L位数据的位数L。The method according to claim 4, characterized in that the number of bits M of the high M-bit data is not less than the number of bits L of the low L-bit data.
  7. 根据权利要求4-6中任一项所述的方法,其特征在于,所述第一二进制数据组满足以下条件其中之一:The method according to any one of claims 4-6, characterized in that the first binary data group satisfies one of the following conditions:
    如果N大于或等于24,则所述第一二进制数据组的位数大于或等于16;If N is greater than or equal to 24, then the number of bits in the first binary data group is greater than or equal to 16;
    如果N小于24,则所述第一二进制数据组的位数大于或等于8。If N is less than 24, the number of bits in the first binary data group is greater than or equal to 8.
  8. 根据权利要求1所述的方法,其特征在于,还包括:The method according to claim 1, further comprising:
    在所述第一编码包的传输失败的情况下,响应于确定所述第二编码包的传输失败,放弃传输所述第二编码包。In the event that the transmission of the first encoded packet fails, in response to determining that the transmission of the second encoded packet fails, the transmission of the second encoded packet is given up.
  9. 根据权利要求1所述的方法,其特征在于,还包括:The method according to claim 1, further comprising:
    基于所述无线信道的信道状态确定执行所述第二编码包的重传或放弃。 It is determined to perform retransmission or abandonment of the second encoded packet based on the channel status of the wireless channel.
  10. 根据权利要求1-9中任一项所述的方法,其特征在于,所述第一编码包和所述第二编码包分别包含标识信息,所述标识信息用于标识对应的编码包在码流中的位置。The method according to any one of claims 1 to 9, characterized in that the first encoding packet and the second encoding packet respectively contain identification information, and the identification information is used to identify the corresponding encoding packet in the code. position in the stream.
  11. 一种接收音频数据的方法,其特征在于,包括:A method for receiving audio data, characterized by including:
    通过无线信道接收第一编码包;Receive the first encoded packet through the wireless channel;
    响应于确定所述第一编码包的传输失败,接收重传的所述第一编码包;In response to determining that transmission of the first encoded packet fails, receiving a retransmission of the first encoded packet;
    对所述第一编码包进行音频解码,以得到第一二进制数据组;Perform audio decoding on the first encoded packet to obtain a first binary data group;
    至少部分地基于所述第一二进制数据组生成PCM音频数据;Generate PCM audio data based at least in part on the first set of binary data;
    其中,所述第一二进制数据组对应于初始PCM音频数据的第一批多个二进制位。Wherein, the first binary data group corresponds to the first plurality of binary bits of the initial PCM audio data.
  12. 根据权利要求11所述的方法,其特征在于,还包括:The method according to claim 11, further comprising:
    通过所述无线信道接收第二编码包;Receive the second encoded packet through the wireless channel;
    响应于确定所述第二编码包的传输失败,接收重传的所述第二编码包;In response to determining that transmission of the second encoded packet fails, receiving a retransmission of the second encoded packet;
    对所述第二编码包进行音频解码,以得到第二二进制数据组;Perform audio decoding on the second encoded packet to obtain a second binary data group;
    其中,所述第二二进制数据组对应于所述初始PCM音频数据的第二批一个或多个二进制位。Wherein, the second binary data group corresponds to a second batch of one or more binary bits of the initial PCM audio data.
  13. 根据权利要求12所述的方法,其特征在于,所述初始PCM音频数据为N位二进制数据,所述第一二进制数据组对应于所述N位二进制数据的高M位数据,所述第二二进制数据组对应于所述N位二进制数据的低L位数据。The method according to claim 12, characterized in that the initial PCM audio data is N-bit binary data, the first binary data group corresponds to the upper M-bit data of the N-bit binary data, and the The second binary data group corresponds to the lower L-bit data of the N-bit binary data.
  14. 根据权利要求12所述的方法,其特征在于,至少部分地基于所述第一二进制数据组生成PCM音频数据进一步包括:The method of claim 12, wherein generating PCM audio data based at least in part on the first binary data set further comprises:
    基于所述第一二进制数据组和所述第二二进制数据组生成所述PCM音频数据。The PCM audio data is generated based on the first binary data set and the second binary data set.
  15. 根据权利要求11所述的方法,其特征在于,还包括:The method according to claim 11, further comprising:
    通过所述无线信道接收第二编码包;Receive the second encoded packet through the wireless channel;
    基于所述无线信道的信道状态,生成请求重传所述第二编码包的请求或放弃重传所述第二编码包的请求。Based on the channel state of the wireless channel, a request to retransmit the second encoded packet is generated or the request to retransmit the second encoded packet is abandoned.
  16. 根据权利要求11所述的方法,其特征在于,还包括:The method according to claim 11, further comprising:
    通过所述无线信道接收第二编码包;Receive the second encoded packet through the wireless channel;
    基于用户选择,生成请求重传所述第二编码包的请求或放弃重传所述第二编码包的请求。Based on user selection, a request to retransmit the second encoded packet is generated or the request to retransmit the second encoded packet is discarded.
  17. 根据权利要求12所述的方法,其特征在于,所述第一编码包和所述第二编码包分别包含标识信息,所述标识信息用于标识所述第一编码包和所述第二编码包在码流中的位置。 The method according to claim 12, characterized in that the first encoding packet and the second encoding packet respectively contain identification information, and the identification information is used to identify the first encoding packet and the second encoding packet. The position of the packet in the code stream.
  18. 一种传输音频数据的装置,其特征在于,包括:A device for transmitting audio data, characterized by including:
    处理器,配置成:Processor, configured as:
    将初始PCM音频数据拆分为至少第一二进制数据组和第二二进制数据组,并对所述第一二进制数据组和所述第二二进制数据组分别进行音频编码;以及Split the initial PCM audio data into at least a first binary data group and a second binary data group, and perform audio encoding on the first binary data group and the second binary data group respectively. ;as well as
    发射器,配置成:Transmitter, configured to:
    通过无线信道分别传输所述第一二进制数据组对应的第一编码包和所述第二二进制数据组对应的第二编码包;respectively transmit the first coded packet corresponding to the first binary data group and the second coded packet corresponding to the second binary data group through a wireless channel;
    响应于确定所述第一编码包的传输失败,重传所述第一编码包;In response to determining that transmission of the first encoded packet fails, retransmitting the first encoded packet;
    其中,所述第一二进制数据组对应于所述初始PCM音频数据的第一批多个二进制位,所述第二二进制数据组对应于所述初始PCM音频数据的第二批一个或多个二进制位。Wherein, the first binary data group corresponds to a first batch of multiple binary bits of the initial PCM audio data, and the second binary data group corresponds to a second batch of one of the initial PCM audio data. or multiple binary bits.
  19. 根据权利要求18所述的装置,其特征在于,所述处理器还配置成:The device of claim 18, wherein the processor is further configured to:
    响应于确定所述第一编码包的传输成功而所述第二编码包的传输失败,重传所述第二编码包。In response to determining that the transmission of the first encoded packet is successful and the transmission of the second encoded packet fails, the second encoded packet is retransmitted.
  20. 根据权利要求18所述的装置,其特征在于,所述处理器还配置成:The device of claim 18, wherein the processor is further configured to:
    响应于确定所述第一编码包的传输成功而所述第二编码包的传输失败,放弃传输所述第二编码包。In response to determining that transmission of the first encoded packet is successful but transmission of the second encoded packet fails, transmission of the second encoded packet is abandoned.
  21. 根据权利要求18所述的装置,其特征在于,所述处理器配置成:The device of claim 18, wherein the processor is configured to:
    以所述初始PCM音频数据的N位二进制数据中的高M位数据形成所述第一二进制数据组;Forming the first binary data group with high-M bit data in the N-bit binary data of the initial PCM audio data;
    以所述初始PCM音频数据的N位二进制数据中的低L位数据形成所述第二二进制数据组。The second binary data group is formed with lower L-bit data in the N-bit binary data of the initial PCM audio data.
  22. 根据权利要求21所述的装置,其特征在于,所述高M位数据的位数M不小于所述低L位数据的位数L。The device according to claim 21, wherein the number of bits M of the high M-bit data is not less than the number of bits L of the low L-bit data.
  23. 根据权利要求21所述的装置,其特征在于,所述处理器进一步配置成:The device of claim 21, wherein the processor is further configured to:
    使得所述第一二进制数据组满足以下条件其中之一:Make the first binary data group satisfy one of the following conditions:
    如果N大于或等于24,则配置所述第一二进制数据组的位数为大于或等于16;If N is greater than or equal to 24, configure the number of digits of the first binary data group to be greater than or equal to 16;
    如果N小于24,则配置所述第一二进制数据组的位数为大于或等于8。If N is less than 24, the number of bits in the first binary data group is configured to be greater than or equal to 8.
  24. 根据权利要求18所述的装置,其特征在于,所述处理器还配置成:The device of claim 18, wherein the processor is further configured to:
    基于所述无线信道的信道状态,确定重传或放弃传输所述第二编码包。Based on the channel status of the wireless channel, it is determined to retransmit or to give up transmission of the second encoded packet.
  25. 根据权利要求18所述的装置,其特征在于,所述处理器进一步配置成:The device of claim 18, wherein the processor is further configured to:
    在所述第一编码包和所述第二编码包中分别配置对应的标识信息,所述标识信息用于 标识对应的编码包在码流中的位置。Corresponding identification information is configured in the first encoding packet and the second encoding packet respectively, and the identification information is used to Identifies the position of the corresponding encoding packet in the code stream.
  26. 一种接收音频数据的装置,其特征在于,包括:A device for receiving audio data, characterized by including:
    接收器,配置成:Receiver, configured as:
    通过无线信道接收第一编码包;Receive the first encoded packet through the wireless channel;
    响应于确定所述第一编码包的传输失败,接收重传的所述第一编码包;In response to determining that transmission of the first encoded packet fails, receiving a retransmission of the first encoded packet;
    处理器,配置成:Processor, configured as:
    对所述第一编码包进行音频解码,以得到第一二进制数据组;Perform audio decoding on the first encoded packet to obtain a first binary data group;
    至少部分地基于所述第一二进制数据组生成PCM音频数据;Generate PCM audio data based at least in part on the first set of binary data;
    其中,所述第一二进制数据组对应于初始PCM音频数据的第一批多个二进制位。Wherein, the first binary data group corresponds to the first plurality of binary bits of the initial PCM audio data.
  27. 根据权利要求26所述的装置,其特征在于,The device according to claim 26, characterized in that:
    所述接收器还配置成:The receiver is also configured to:
    通过所述无线信道接收第二编码包;Receive the second encoded packet through the wireless channel;
    响应于确定所述第二编码包的传输失败,接收重传的所述第二编码包;In response to determining that transmission of the second encoded packet fails, receiving a retransmission of the second encoded packet;
    所述处理器还配置成:The processor is also configured to:
    对所述第二编码包进行音频解码,以得到第二二进制数据组;Perform audio decoding on the second encoded packet to obtain a second binary data group;
    其中,所述第二二进制数据组对应于所述初始PCM音频数据的第二批一个或多个二进制位。Wherein, the second binary data group corresponds to a second batch of one or more binary bits of the initial PCM audio data.
  28. 根据权利要求27所述的装置,其特征在于,所述处理器还配置成:The device of claim 27, wherein the processor is further configured to:
    基于所述第一二进制数据组和所述第二二进制数据组生成所述PCM音频数据;Generate the PCM audio data based on the first binary data group and the second binary data group;
    其中,所述初始PCM音频数据为N位二进制数据,所述第一二进制数据组对应于所述N位二进制数据的高M位数据,所述第二二进制数据组对应于所述N位二进制数据的低L位数据。Wherein, the initial PCM audio data is N-bit binary data, the first binary data group corresponds to the upper M-bit data of the N-bit binary data, and the second binary data group corresponds to the The lower L bit data of N-bit binary data.
  29. 根据权利要求26所述的装置,其特征在于,所述接收器还配置成通过所述无线信道接收第二编码包,所述处理器还配置成:The apparatus of claim 26, wherein the receiver is further configured to receive a second encoded packet through the wireless channel, and the processor is further configured to:
    基于所述无线信道的信道状态,生成请求重传所述第二编码包的请求或放弃重传所述第二编码包的请求。Based on the channel state of the wireless channel, a request to retransmit the second encoded packet is generated or the request to retransmit the second encoded packet is abandoned.
  30. 根据权利要求26所述的装置,其特征在于,所述接收器还配置成通过所述无线信道接收第二编码包,所述处理器还配置成:The apparatus of claim 26, wherein the receiver is further configured to receive a second encoded packet through the wireless channel, and the processor is further configured to:
    基于用户选择,生成请求重传所述第二编码包的请求或放弃重传所述第二编码包的请求。Based on user selection, a request to retransmit the second encoded packet is generated or the request to retransmit the second encoded packet is discarded.
  31. 一种芯片,其特征在于,所述芯片配置成执行如权利要求1-10中任一项所述的方 法。A chip, characterized in that the chip is configured to perform the method according to any one of claims 1-10 Law.
  32. 一种芯片,其特征在于,所述芯片配置成执行如权利要求11-17中任一项所述的方法。A chip, characterized in that the chip is configured to perform the method according to any one of claims 11-17.
  33. 一种电子设备,其特征在于,包括如权利要求18-25中任一项所述的装置。An electronic device, characterized by comprising the device according to any one of claims 18-25.
  34. 一种音频播放设备,其特征在于,包括如权利要求26-30中任一项所述的装置。An audio playback device, characterized by comprising the device according to any one of claims 26-30.
  35. 根据权利要求34所述的音频播放设备,其特征在于,还包括:The audio playback device according to claim 34, further comprising:
    数模转换器,用于对PCM音频数据进行数模转换,得到模拟音频信号;Digital-to-analog converter, used for digital-to-analog conversion of PCM audio data to obtain analog audio signals;
    播放器,用于播放所述模拟音频信号。A player for playing the analog audio signal.
  36. 根据权利要求34或35所述的音频播放设备,其特征在于,所述音频播放设备为蓝牙耳机、蓝牙音响或汽车蓝牙播放设备。 The audio playback device according to claim 34 or 35, characterized in that the audio playback device is a Bluetooth headset, a Bluetooth speaker or a car Bluetooth playback device.
PCT/CN2023/090334 2022-06-22 2023-04-24 Audio data transmission method and apparatus, electronic device, and audio playback equipment WO2023246282A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202210713458.6 2022-06-22
CN202210713458.6A CN115278294A (en) 2022-06-22 2022-06-22 Method and device for transmitting audio data, electronic equipment and audio playing equipment
CN202211385617.0A CN117278775A (en) 2022-06-22 2022-11-07 Method and device for transmitting audio data, electronic equipment and audio playing equipment
CN202211385617.0 2022-11-07

Publications (1)

Publication Number Publication Date
WO2023246282A1 true WO2023246282A1 (en) 2023-12-28

Family

ID=83761218

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/090334 WO2023246282A1 (en) 2022-06-22 2023-04-24 Audio data transmission method and apparatus, electronic device, and audio playback equipment

Country Status (2)

Country Link
CN (2) CN115278294A (en)
WO (1) WO2023246282A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115278294A (en) * 2022-06-22 2022-11-01 哲库科技(上海)有限公司 Method and device for transmitting audio data, electronic equipment and audio playing equipment
CN115243238A (en) * 2022-06-30 2022-10-25 哲库科技(上海)有限公司 Device and method for transmitting audio data and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070270103A1 (en) * 2006-05-16 2007-11-22 Samsung Electronics Co., Ltd. Method and apparatus for transmitting/receiving uncompressed audio/video data
US20080008173A1 (en) * 2000-04-26 2008-01-10 International Business Machines Corporation Methods and Apparatus for Transmitting Data in a Packet Network
CN102017492A (en) * 2008-04-21 2011-04-13 高通股份有限公司 Method and apparatus for encoding transmission data blocks for enhanced switching performance
CN110970039A (en) * 2019-11-28 2020-04-07 北京蜜莱坞网络科技有限公司 Audio transmission method and device, electronic equipment and storage medium
CN111787633A (en) * 2020-08-13 2020-10-16 无锡中感微电子股份有限公司 Bluetooth low-power audio data packet transmission method and device
CN115278294A (en) * 2022-06-22 2022-11-01 哲库科技(上海)有限公司 Method and device for transmitting audio data, electronic equipment and audio playing equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080008173A1 (en) * 2000-04-26 2008-01-10 International Business Machines Corporation Methods and Apparatus for Transmitting Data in a Packet Network
US20070270103A1 (en) * 2006-05-16 2007-11-22 Samsung Electronics Co., Ltd. Method and apparatus for transmitting/receiving uncompressed audio/video data
CN102017492A (en) * 2008-04-21 2011-04-13 高通股份有限公司 Method and apparatus for encoding transmission data blocks for enhanced switching performance
CN110970039A (en) * 2019-11-28 2020-04-07 北京蜜莱坞网络科技有限公司 Audio transmission method and device, electronic equipment and storage medium
CN111787633A (en) * 2020-08-13 2020-10-16 无锡中感微电子股份有限公司 Bluetooth low-power audio data packet transmission method and device
CN115278294A (en) * 2022-06-22 2022-11-01 哲库科技(上海)有限公司 Method and device for transmitting audio data, electronic equipment and audio playing equipment

Also Published As

Publication number Publication date
CN117278775A (en) 2023-12-22
CN115278294A (en) 2022-11-01

Similar Documents

Publication Publication Date Title
WO2023246282A1 (en) Audio data transmission method and apparatus, electronic device, and audio playback equipment
TW201246061A (en) Automatic audio configuration based on an audio output device
US11050971B2 (en) Pulse code modulation (PCM) data-marking
CN108718361B (en) Audio file playing method and wireless answering device
WO2021160040A1 (en) Audio transmission method and electronic device
CN102832968A (en) Method for performing communication between mobile phone and equipment by using audio interface
WO2024016758A1 (en) Audio data transmission method and apparatus, chip, electronic device, and storage medium
KR20220123109A (en) Audio encoding and decoding method and audio encoding and decoding apparatus
WO2024001138A1 (en) Apparatus and method for transmitting audio data, and electronic device
US9680507B2 (en) Offset selection for error correction data
US20190386674A1 (en) Error resiliency for entropy coded audio data
US9271079B2 (en) Data processing method and electronic device
US11443753B2 (en) Audio stream dependency information
US9437203B2 (en) Error concealment for speech decoder
JP2012155233A (en) Information transmission device
WO2019243670A1 (en) Determination of spatial audio parameter encoding and associated decoding
CN115240692A (en) Method and device for receiving audio data and audio playing equipment
CN116110411A (en) Audio transmission method, chip, user terminal and audio playing device
WO2024087001A1 (en) Bluetooth encoding method and apparatus, bluetooth decoding method and apparatus, and device and medium
WO2023049628A1 (en) Efficient packet-loss protected data encoding and/or decoding
EP4348838A1 (en) Wireless transmission and reception of packetized audio data in combination with forward error correction
TWI538419B (en) Bluetooth wireless audio transmitter
TWI469135B (en) Adaptive differential pulse code modulation (adpcm) encoding and decoding method
US20150127332A1 (en) System and method of improving signal-to-noise ratio

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23825935

Country of ref document: EP

Kind code of ref document: A1