Audio data recovery method and device and Bluetooth equipment

文档序号:1522526 发布日期:2020-02-11 浏览:41次 中文

阅读说明:本技术 音频数据恢复方法、装置及蓝牙设备 (Audio data recovery method and device and Bluetooth equipment ) 是由 冯宇红 王海业 袁赟 徐斌 熊焱 张亦农 杨晓东 于 2018-12-28 设计创作,主要内容包括:音频数据恢复方法、装置及蓝牙设备,包括:接收音频数据;所述音频数据包括M段帧数据以及每段帧数据对应的CRC校验信息;在N个重传窗口的所述音频数据均为错误数据时,根据所述N个错误的音频数据中的CRC校验信息对所述音频数据进行恢复。本申请在数据重传多次依然错误的情况下并不将多次重传的错误数据丢掉,而是充分利用多次重传的错误数据中的冗余信息进行纠错、实现坏帧恢复,有效增加音频广播的传输距离,即使在干扰情况下也能避免音频播放卡顿的情况出现。(The audio data recovery method, the device and the Bluetooth equipment comprise: receiving audio data; the audio data comprises M sections of frame data and CRC (cyclic redundancy check) information corresponding to each section of frame data; and when the audio data of the N retransmission windows are all error data, recovering the audio data according to CRC (cyclic redundancy check) information in the N error audio data. According to the method and the device, under the condition that the data is retransmitted for a plurality of times and still wrong, the wrong data retransmitted for a plurality of times is not lost, the redundant information in the wrong data retransmitted for a plurality of times is fully utilized for error correction, bad frame recovery is realized, the transmission distance of audio broadcasting is effectively increased, and the situation that the audio playing is blocked can be avoided even under the interference situation.)

1. A method for audio data recovery, comprising the steps of:

receiving audio data; the audio data comprises M sections of frame data and CRC (cyclic redundancy check) information corresponding to each section of frame data;

when the audio data of the N retransmission windows are all error data, recovering the audio data according to CRC (cyclic redundancy check) information in the N error audio data; wherein M, N is a positive integer.

2. The method of claim 1, wherein the recovering the audio data according to the CRC check information in the N erroneous audio data comprises:

and restoring each section of frame data according to the N pieces of CRC information corresponding to each section of frame data until the restoration of M sections of frame data is completed.

3. The method as claimed in claim 2, wherein the recovering of each frame data according to the N CRC check information corresponding to each frame data includes:

detecting CRC (cyclic redundancy check) information in N error data corresponding to each section of frame data;

for each section of frame data, if at least one CRC check information of the frame data is correct in the N error data, the correct frame data is reserved; and if the CRC information of the frame data in the N error data is wrong, uploading the frame data in the N error data to a decoder for recovery.

4. The method of claim 3, wherein the process of the decoder recovering the frame data in the N error data comprises:

when N is equal to 1, detecting frame header CRC (cyclic redundancy check) information of the frame data, if the frame header CRC information is correct, normally decoding, and otherwise, recovering a bad frame;

and when N is greater than 1, decoding after error correction is carried out on the sub-band sample domain by using CRC (cyclic redundancy check) information of the N frame data, and if the error samples exceed a preset value, recovering the bad frame.

5. The method as claimed in claim 4, wherein said error correcting in the sub-band sample domain using the CRC check information of the N said frame data comprises:

when the frame header CRC information of at least one frame data is correct, copying the frame header and the Scaleffector information of the frame to other frames;

decoding N of the frame data to obtain a plurality of sub-band samples of the frame data;

recovering erroneous samples from the plurality of sub-band samples.

6. The method according to claim 4, wherein the performing bad frame recovery is specifically recovering the bad frame by using a Packet Loss Concealment (PLC) algorithm.

7. The method of claim 1, wherein the audio data is encoded using an SBC encoder in advance, and the M pieces of frame data and the corresponding CRC check information of each piece of frame data are M SBC frames and the corresponding CRC check information of each SBC frame.

8. An audio data recovery apparatus, comprising:

the receiving module is used for receiving audio data; the audio data comprises M sections of frame data and CRC (cyclic redundancy check) information corresponding to each section of frame data;

the recovery module is used for recovering the audio data according to CRC (cyclic redundancy check) information in the N wrong audio data when the audio data of the N retransmission windows are all wrong data; wherein M, N is a positive integer.

9. The apparatus according to claim 8, wherein the recovery module is configured to, when the audio data of N retransmission windows are all error data, recover each segment of frame data according to N CRC check information corresponding to each segment of frame data until the recovery of M segments of frame data is completed.

10. The apparatus of claim 9, wherein the recovery module comprises:

the detection unit is used for detecting CRC (cyclic redundancy check) information in N error data corresponding to each section of frame data;

the processing unit is used for keeping correct frame data when CRC (cyclic redundancy check) information of at least one frame data exists in the N error data for each section of frame data; and uploading the frame data in the N error data to a decoder for recovery when the CRC information of the frame data in the N error data is all wrong.

11. The apparatus of claim 10, wherein the decoder comprises:

the first recovery unit is used for detecting frame header CRC (cyclic redundancy check) information of the frame data when N is equal to 1, normally decoding the frame header CRC information if the frame header CRC information is correct, and otherwise, sending the frame header CRC information to the third recovery unit;

the second recovery unit is used for decoding after error correction is carried out on the sub-band sample domain by using CRC (cyclic redundancy check) information of N pieces of frame data when N is greater than 1, and if an error sample exceeds a preset value, the error sample is sent to the third recovery unit;

and the third recovery unit is used for recovering the bad frame.

12. The apparatus of claim 11, wherein the second recovery unit comprises:

the replication sub unit is used for replicating the frame header and the ScaleFuactor information of the frame to other frames when the frame header CRC information of at least one frame data is correct;

a decoding subunit, configured to decode the N pieces of frame data to obtain a plurality of subband samples of the frame data;

a recovery subunit, configured to recover erroneous samples from the plurality of subband samples;

and the sending subunit is used for sending the error sample to the third recovery unit when the error sample exceeds the preset value.

13. The apparatus of claim 11, wherein the third recovery unit is configured to recover the bad frame by using a Packet Loss Concealment (PLC) algorithm.

14. The apparatus of claim 8, wherein the audio data is encoded using an SBC encoder in advance, and the M pieces of frame data and the corresponding CRC check information of each piece of frame data are M SBC frames and the corresponding CRC check information of each SBC frame.

15. A bluetooth device, characterized in that it comprises an audio data recovery apparatus as claimed in any one of claims 8 to 14.

Technical Field

The present application relates to the field of bluetooth technologies, and in particular, to an audio data recovery method and apparatus, and a bluetooth device.

Background

The Bluetooth audio broadcasting means that the Bluetooth sound box (main sound box) broadcasts the audio of the mobile phone through a wireless connection Channel (BR/EDR Synchronization Scan Channel) while receiving the audio of the mobile phone, and other sound boxes (auxiliary sound boxes) can synchronously play the audio, so that the constraint of a line is eliminated. However, because the bluetooth wireless connection stability is inferior to the wired connection, a pause phenomenon of playing sound from the speaker may occur under the condition of relatively large interference or relatively long connection distance.

Disclosure of Invention

The embodiment of the application provides an audio data recovery method and device and Bluetooth equipment, so as to solve the technical problem.

In a first aspect, the present application provides an audio data recovery method, comprising the steps of:

receiving audio data; the audio data comprises M sections of frame data and CRC (cyclic redundancy check) information corresponding to each section of frame data;

when the audio data of the N retransmission windows are all error data, recovering the audio data according to CRC (cyclic redundancy check) information in the N error audio data; wherein M, N is a positive integer.

In a second aspect, the present application provides an audio data recovery apparatus comprising:

the receiving module is used for receiving audio data; the audio data comprises M sections of frame data and CRC (cyclic redundancy check) information corresponding to each section of frame data;

the recovery module is used for recovering the audio data according to CRC (cyclic redundancy check) information in the N wrong audio data when the audio data of the N retransmission windows are all wrong data; wherein M, N is a positive integer.

In a third aspect, the present application provides a bluetooth device, including the above audio data processing apparatus.

The beneficial effects are as follows:

the audio data recovery method, the device and the Bluetooth device provided by the embodiment of the application recover wrong data by adding a plurality of CRC check information into a transmitted audio data packet, the application does not discard the wrong data retransmitted for many times under the condition that the data is retransmitted for many times and still wrong, but fully utilizes redundant information in the wrong data retransmitted for many times to correct errors and realize the recovery of the wrong audio data, the transmission distance of audio broadcasting is effectively increased, and the situation that audio playing is blocked can be avoided even under the interference condition.

Drawings

Specific embodiments of the present application will be described below with reference to the accompanying drawings, in which:

fig. 1 is a schematic diagram showing an implementation of an audio data recovery method in an embodiment of the present application;

fig. 2 is a schematic structural diagram showing an audio data recovery apparatus according to an embodiment of the present application;

fig. 3 is a schematic structural diagram of a bluetooth device according to an embodiment of the present application;

FIG. 4 is a schematic diagram showing the structure of three erroneous Bluetooth packets received by the Host layer;

figure 5 shows a schematic diagram of an SBC frame code stream format;

figure 6 shows a block diagram of the structure of an SBC decoder;

FIG. 7 is a schematic view showing a processing flow of three error frame data;

figure 8 shows a schematic distribution diagram of the sub-band samples after decoding the SBC frame.

Detailed Description

In order to make the technical solutions and advantages of the present application more apparent, the following further detailed description of the exemplary embodiments of the present application with reference to the accompanying drawings makes it clear that the described embodiments are only a part of the embodiments of the present application, and not an exhaustive list of all embodiments. And the embodiments and features of the embodiments in the present description may be combined with each other without conflict.

The inventor notices in the process of invention that:

in order to solve the problems of packet loss and packet error in the data transmission process, the Bluetooth audio broadcast transmission ensures the audio quality through a data retransmission mechanism. However, in the existing method, the error data of repeated retransmission is lost, so that the data of repeated retransmission is wasted, and the data cannot be successfully recovered, thereby causing the audio playing to be unsmooth.

The inventor thinks that not all data in the erroneous data packet may be erroneous, and the error positions may also be different in the retransmitted erroneous data packets, so it is proposed to add several pieces of Cyclic Redundancy Check (CRC) information in sections in the transmitted data packet, recover the erroneous data by using the CRC information in the erroneous data retransmitted for many times, and combine the data packets as complete as possible according to the CRC information.

In view of the defects in the prior art, the embodiments of the present application provide an audio data recovery method, an audio data recovery device, and a bluetooth device, which are described below.

15页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:语音信号的发送方法、装置、设备及可读存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类