CN109547946B - Audio data communication method - Google Patents

Audio data communication method Download PDF

Info

Publication number
CN109547946B
CN109547946B CN201811298376.XA CN201811298376A CN109547946B CN 109547946 B CN109547946 B CN 109547946B CN 201811298376 A CN201811298376 A CN 201811298376A CN 109547946 B CN109547946 B CN 109547946B
Authority
CN
China
Prior art keywords
data
broadcast
audio data
interval
audio
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201811298376.XA
Other languages
Chinese (zh)
Other versions
CN109547946A (en
Inventor
徐斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing ZGmicro Co Ltd
Original Assignee
Nanjing ZGmicro Co Ltd
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 Nanjing ZGmicro Co Ltd filed Critical Nanjing ZGmicro Co Ltd
Priority to CN201811298376.XA priority Critical patent/CN109547946B/en
Publication of CN109547946A publication Critical patent/CN109547946A/en
Priority to US16/659,583 priority patent/US10945101B2/en
Application granted granted Critical
Publication of CN109547946B publication Critical patent/CN109547946B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/06Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/04Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using predictive techniques
    • G10L19/16Vocoder architecture
    • G10L19/167Audio streaming, i.e. formatting and decoding of an encoded audio signal representation into a data stream for transmission or storage purposes
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B27/00Editing; Indexing; Addressing; Timing or synchronising; Monitoring; Measuring tape travel
    • G11B27/10Indexing; Addressing; Timing or synchronising; Measuring tape travel
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0056Systems characterized by the type of code used
    • H04L1/0061Error detection codes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1829Arrangements specially adapted for the receiver end
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Multimedia (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the application provides an audio data communication method, which comprises the following steps: after audio data to be transmitted are coded according to a fixed interval, the audio data are broadcast and transmitted on a first time slot at a preset broadcast interval; playing the decoded audio data after the anchor point of the first broadcast anchor point time slot is broadcast and sent and the anchor point is delayed for a preset time; the preset time length is used for synchronous playing of the audio data at the opposite terminal, the preset time length is X times of the broadcasting interval, and X is a positive integer. By adopting the scheme provided by the embodiment of the application, the synchronous playing of audio between point and multipoint can be realized.

Description

Audio data communication method
Technical Field
The present application relates to the field of communications technologies, and in particular, to an audio data communication method.
Background
The wide development of the bluetooth technology makes bluetooth products become a part of people's life, and especially brings great convenience to people for audio applications such as bluetooth earphones and bluetooth speakers centered on smart phones.
Bluetooth is mainly a point-to-point communication technology, and such network topology limits bluetooth to meet more and more extensive demands of people.
For this reason, the bluetooth standard adds a Connectionless Slave Broadcast (CSB) technology to implement point-to-multipoint data transmission.
The inventors have found that the CSB protocol does not enable the simultaneous playback of audio between points and multiple points.
In the prior art, the audio and video synchronization technology generally adopts a time stamping (Timestamp) mode, i.e. each frame of audio and video data is added with a playing time, so as to realize synchronous playing. But if this method is directly used for audio synchronous playing between point-to-multipoint under CSB protocol, it will result in increased bandwidth consumption.
It can be seen that the technical problem of audio synchronous playing between point-to-multipoint devices is not solved well at present.
Disclosure of Invention
The embodiment of the application provides an audio data communication method, which is used for realizing synchronous playing of audio between point-to-multipoint.
According to a first aspect of embodiments of the present application, there is provided an audio data communication method, including: after audio data to be transmitted are coded according to a fixed interval, the audio data are broadcast and transmitted on a first time slot at a preset broadcast interval; wherein, a broadcast interval sends coded M frames of audio data in a broadcast anchor time slot of a first time slot; the predetermined broadcast interval is M times the fixed interval, M being a positive integer; playing audio data after the anchor point of the first broadcast anchor point time slot is broadcast and sent and the anchor point is delayed for a preset time; the preset time length is used for synchronous playing of the audio data at the opposite terminal, the preset time length is X times of the broadcasting interval, and X is a positive integer.
According to a second aspect of embodiments of the present application, there is provided an audio data communication method, including: receiving and demodulating audio data at a predetermined broadcast interval on a first slot; decoding the audio data; after delaying for a preset time from the demodulation of the anchor point of the first broadcast anchor point time slot, starting to play the decoded audio data from the audio data received by the first broadcast anchor point time slot; the preset time length is X times of the broadcasting interval, and X is a positive integer; the preset time is the delay playing time of the audio data at the opposite end.
By adopting the audio data communication method provided by the embodiment of the application, at a broadcast sending end, the audio data is coded according to a fixed interval, such as the length of a coding frame, and is broadcast and sent at a preset broadcast interval; playing the decoded audio data after the anchor point of the first broadcast anchor point time slot is broadcast and sent and the anchor point is delayed for a preset time; the duration of one broadcast interval is M times of a fixed interval, coded M frames of audio data are sent in one broadcast interval, the preset duration is X times of the broadcast interval, and M and X are positive integers. At the broadcast receiving end, starting at the anchor point demodulated to the first broadcast anchor point time slot, the playing is started by delaying X times of the broadcast interval. Therefore, under the condition that time synchronization data are not required to be loaded to each audio frame, the synchronous playing of the audio between the point and the multiple points is realized.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 shows a schematic diagram of an implementation scenario according to an embodiment of the present application;
fig. 2 shows a flow chart of an audio data communication method performed by a receiving and sending device according to a first embodiment of the present application;
fig. 3 shows a communication slot allocation diagram according to a first embodiment of the present application;
fig. 4 shows a timing diagram of transmitting synchronization sequences on three channels according to a first embodiment of the present application;
fig. 5 is a flowchart illustrating an audio data communication method performed by a receiving apparatus according to a second embodiment of the present application;
fig. 6 is a flowchart of a method for determining whether to retransmit according to signal quality according to the second embodiment of the present application;
fig. 7 shows a schematic structural diagram of an audio communication device according to a third embodiment of the present application;
fig. 8 shows a schematic structural diagram of an audio communication apparatus according to a fourth embodiment of the present application;
fig. 9 is a schematic structural diagram of an audio communication system according to a fifth embodiment of the present application;
fig. 10 is a schematic structural diagram of a receiving and transmitting device according to a sixth embodiment of the present application;
fig. 11 shows a schematic structural diagram of a receiving device according to a sixth embodiment of the present application.
Detailed Description
In order to make the technical solutions and advantages of the embodiments 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 are not exhaustive of all embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
Fig. 1 shows a schematic implementation scenario according to an embodiment of the present application.
As shown in fig. 1, a communication system 10 according to an embodiment of the present application includes: an audio source device 100, a receiving and transmitting device 200, and one or more receiving devices 300.
In particular implementations, the audio source device and the receiving and transmitting devices may communicate via various wireless communication protocols, such as bluetooth and WiFi. Specifically, an A2DP link may be established between the sound source device and the receiving and transmitting device according to the bluetooth protocol, and the sound source device may transmit audio data through an SBC (sub band code) to the receiving and transmitting device. The receiving and sending devices play the audio locally and forward to one or more receiving devices through a broadcast protocol.
In specific implementation, the sound source device and the receiving and sending devices can also communicate with each other through various wired communication modes to acquire audio data, such as the internet, a wired local area network, a USB interface protocol and the like; alternatively, the receiving and transmitting device 200 may broadcast the audio data stored or recorded by itself to one or more receiving devices 300 for synchronous playing. Therefore, it should be understood that the manner and the specific scheme of the receiving and transmitting device 200 for acquiring the audio data may be adaptively adjusted according to the specific implementation scenarios, such as the function of communicating with the audio source device 100 may not be used or used, the audio data may not need to be demodulated or decoded, and the like, and these specific implementation scenarios are all within the protection scope of the present application.
In an implementation, the audio source device may be an audio source device such as a smart phone or a smart tv. The receiving and sending device can be various devices with audio playing functions, such as a smart phone, an earphone, a sound box, or the like; the receiving device may be a variety of devices with audio playing functions, such as a smart phone, a headset, or a sound box.
In particular implementation, the receiving and transmitting device 200 and the receiving device 300 may be different devices each performing only respective corresponding functions. Specifically, the receiving and transmitting device may have only a function of receiving and demodulating audio data from the sound source device; decoding the audio data; recoding the decoded audio data according to a fixed interval, and broadcasting and transmitting the audio data on a first time slot at a preset broadcasting interval; and playing the decoded audio data after the anchor point of the first broadcast anchor point time slot is broadcast and sent is delayed for a preset time. And the receiving device can only have the functions of receiving the audio data from the receiving and sending device and decoding and then playing synchronously with the receiving and sending device.
In another embodiment, the receiving and sending device 200 and the receiving device 300 may be devices having both functions. Specifically, the receiving and transmitting apparatus 200 and the receiving apparatus 300 each have a function of receiving and demodulating audio data from the sound source apparatus; decoding the audio data; recoding the decoded audio data according to a fixed interval, and broadcasting and transmitting the audio data on a first time slot at a preset broadcasting interval; playing the decoded audio data after the anchor point of the first broadcast anchor point time slot is broadcast and sent and the anchor point is delayed for a preset time; and the function of receiving audio data from the receiving and sending equipment, decoding and synchronously playing with the receiving and sending end. It should be understood that "transmission" and "reception" at this time are relative concepts, and the positions of the reception and transmission apparatus 200 and the reception apparatus 300 may be interchanged in different scenarios. For example, in a certain scenario, a device a may be considered as a receiving and transmitting device, and a device B as a receiving device; in another scenario, the B device may be used as a receiving and transmitting device, and the a device may be used as a receiving device. It will be understood that when one of the two headsets is referred to as a "receiving and transmitting device", the other will be referred to as a "receiving device" accordingly.
Specifically, when the receiving and transmitting device 200 and the receiving device 300 are devices having the above two functions at the same time, the receiving and transmitting device and the receiving device may be determined according to various ways, for example, a device that first accesses a sound source device may be used as the receiving and transmitting device, and then accesses the device as the receiving device; the equipment close to the sound source equipment can be used as receiving and sending equipment, and the equipment far away from the sound source equipment can be used as receiving equipment; or may be determined by a user selecting or setting on the audio source device, which is not limited in this application.
In the embodiment of the application, different application modes can be set for the receiving and sending device and the receiving device according to different application scenes, different system parameters can be configured for each application mode, and the system parameters are broadcasted to the receiving device through a synchronization sequence. The application mode mainly comprises the following steps: an outdoor high performance mode, an outdoor low latency mode, an indoor high performance mode, an indoor low latency mode, and the like. The main differences between indoor and outdoor are different transmission distances, different interference, different fading, and different volume. The main difference between the high performance mode and the low delay mode is that the audio performance and delay requirements are different, and in general, scenes with high audio performance requirements sacrifice the delay requirements.
Example one
Fig. 2 shows a flowchart of an audio data communication method performed by a receiving and sending device according to a first embodiment of the present application.
As shown in fig. 2, an audio data communication method performed by a receiving and sending device according to a first embodiment of the present application includes:
s201, receiving and demodulating audio data from the sound source device.
In specific implementation, S201 may be implemented by a common method in the prior art, which is not described herein.
S202, the audio data is decoded.
In specific implementation, S202 may be implemented by a common method in the prior art, which is not described herein.
S203, recoding the decoded audio data according to a fixed interval, and broadcasting and sending the recoded audio data on a first time slot at a preset broadcasting interval, wherein one broadcasting interval sends the coded M frames of audio data in a broadcasting anchor point time slot of the first time slot; the predetermined broadcast interval is M times the fixed interval, M being a positive integer.
In a specific implementation, the re-encoding may be performed in an equal interval manner, the fixed interval may be a length of the encoded frame, and the number of the encoded frames transmitted in one broadcast interval is equal to a multiple of the broadcast interval, where the broadcast interval is a fixed interval, so that the audio data transmitted in one broadcast interval exactly corresponds to the audio of the interval length, or the playing time after decoding the audio encoded data transmitted in one broadcast interval exactly corresponds to the time length of one broadcast interval. For example, a coding frame is 10ms long, i.e., the fixed interval is 10ms, let M be 2, i.e., 2 frames of audio data are transmitted in one broadcast interval; thus, two coded frames are combined into load data of one data packet; and the broadcast interval is 20 ms. At this time, the play time after decoding of the audio data transmitted in the 20ms broadcasting interval is 20 ms.
In a specific implementation, the receiving function and the transmitting function in the receiving and transmitting device may share the antenna, the rf transceiver, and the baseband processor in a Time-Division Multiplexing (TDM) manner.
Fig. 3 shows a communication timeslot allocation diagram according to a first embodiment of the application. As shown in fig. 3, in the embodiment of the present application, the length of the broadcast interval is fixed. The slot resource is divided into two parts in one broadcast interval, one part being a first slot for broadcasting the re-encoded audio data, which may also be referred to as a "broadcast slot", and the other part being a second slot for receiving data from the audio source device and transmitting data when receiving data from the audio source device, which may also be referred to as a "bluetooth slot" when a bluetooth connection is used between the audio source device and the receiving and transmitting devices. The second time slot may be determined whether reservation is required depending on whether data needs to be received from the audio source device and by what communication means to communicate with the audio source device.
In a specific implementation, a first time slot may include a broadcast Anchor Point (Anchor Point) time slot and N broadcast retransmission time slots in succession, where the broadcast Anchor Point time slot is used to send re-encoded M frames of audio data, and the broadcast retransmission time slot is used to retransmit the M frames of audio data; wherein N is a non-negative integer. In specific implementation, N can be 2, 3, 4, and the like; m may be 4, 6, 8, etc. In the present invention, the starting time Point of the broadcast Anchor slot is referred to as an Anchor (Anchor Point) or a broadcast Anchor.
In one implementation, the second time slot includes a receive time slot and a transmit time slot for receiving and transmitting data from the audio source device, respectively.
In fig. 3, the solid line F- > R is the broadcast anchor timeslot, and the dashed line F- > R is the broadcast retransmission timeslot. F- > T is a transmission time slot between the receiving and transmitting device and the audio source device, and T- > F is a reception time slot between the receiving and transmitting device and the audio source device. That is, in the F- > T and T- > F slots, the receiving and transmitting device communicates with the sound source device through the A2DP link, receiving the audio data. In the F- > R time slot, the receiving and transmitting equipment broadcasts the received audio data to the receiving equipment after the audio data is processed by coding and the like.
In practical implementation, the communication time slot shown in the first embodiment of the present application may further include a synchronization time slot Sync, where the synchronization time slot is used to transmit a synchronization sequence.
In an implementation, the synchronization slot may be transmitted immediately after the broadcast slot, and the transmission period of the synchronization slot may be Y times the broadcast interval, where Y is a positive integer. Specifically, the Y may be, for example, 6, 9, 12, 15, or the like.
In particular implementations, the synchronization sequence may include the following information:
a broadcast interval for indicating an interval duration between two consecutive broadcast anchors, for example, 20 ms;
an application mode for indicating a current transmission mode; the application mode has a corresponding relation with a broadcast interval and volume.
Since the playing time of the audio data transmitted in one broadcast interval is equal to the duration of the broadcast interval, the receiving and sending device 200 and the receiving device 300 both use the broadcast anchor point as the synchronization reference point and play the audio data after delaying the same predetermined duration, and the predetermined duration is also an integral multiple of the broadcast interval, in this embodiment, the synchronous playing can be realized without loading a timestamp for each frame of audio data.
Furthermore, the present embodiment adopts a mode of separately broadcasting and transmitting the synchronization sequence, and can reduce the number of times of broadcasting the synchronization sequence by setting the transmission period of the synchronization sequence, thereby further saving bandwidth consumption.
Further, in the present embodiment, by sending the application mode information having a corresponding relationship with the volume level in the synchronization sequence, it is not necessary to load the volume level information for each frame of audio data.
In a specific implementation, the synchronization sequence may further include a broadcast retransmission number, which is used to indicate the number of broadcast retransmission slots in one first slot, and is, for example, 2, 3, 4, etc.: therefore, a limited retransmission mechanism can be realized, the burstiness of data transmission can be resisted, and meanwhile, the buffering is reduced, and the delay of audio playing is reduced.
In particular implementation, the synchronization sequence may further include the following information:
the Bluetooth clock is used for indicating the Bluetooth clocks of the receiving and sending devices so as to realize the synchronization of the received audio data; a device address indicating an address of a receiving and transmitting device so that a receiving side can distinguish different transmitting devices; an AFH channel map for negotiating useful channels to be used against interference; the type of encoding and the rate used to indicate the re-encoding format and the rate size, e.g., the audio data is encoded with opus at a coding rate of 100 kbps.
The application mode may have a correspondence with a broadcast interval, the number of broadcast retransmissions, a coding type and rate, a volume level, and the like.
Specifically, the application modes may include an outdoor high performance mode, an outdoor low latency mode, an indoor high performance mode, an indoor low latency mode, and the like. In particular, different broadcast intervals, broadcast retransmission times, coding types and coding rates, and volume levels may be set according to application modes. For example, in the indoor low-delay mode, a smaller broadcast interval and a larger coding rate, as well as a smaller volume, may be set; in the outdoor high-performance mode, the anti-interference performance is considered, and the high broadcast retransmission times, the low coding rate and the high volume can be set. The volume level may be represented by different steps, e.g., low volume, medium volume, high volume, etc.
In order to better utilize resources and provide better performance against interference and fading, the synchronization sequences may be transmitted on L channels, and in this case, the interval between adjacent synchronization sequences on each two adjacent channels may be one L times the interval between two adjacent synchronization sequences on the same channel, where L is a positive integer. When L is 3, a timing chart of the transmission synchronization sequence is shown in fig. 4.
As shown in fig. 4, when the synchronization sequences according to the embodiment of the present application are transmitted at equal intervals on three channels, respectively, the interval between adjacent synchronization sequences on each two channels may be 1/3 times the interval between two adjacent synchronization sequences on the same channel.
For example, when the sync sequence is transmitted using 2DH1 packets on channels 0, 37, and 78, respectively, the sync sequence interval is 180ms, i.e., 288slots, which is 9 times the broadcast interval. The synchronization sequence phase on the three channels is 60ms, i.e. 96slots, which is 3 times the broadcast interval.
S204, playing decoded audio data at the broadcast sending starting time, namely after the anchor point of the first broadcast anchor point time slot is broadcast and sent for a predetermined time; the predetermined time length is used for the synchronous playing of the audio data at the opposite end, the predetermined time length is X times of the broadcast interval, and X is a positive integer.
In a specific implementation, the time reference of the receiving device aligned with the music played by the sending device and the receiving device is the broadcast anchor point, the time reserved for decoding and audio post-processing is set to be a fixed delay time length, and the delay time length is a fixed multiple X of the broadcast interval. Specifically, X may be set according to different application modes. For example, X can be 5, 6, 7, 8, and the like.
In particular implementations, the decoded audio data may be played locally at a volume level corresponding to the volume level in the application mode set in the synchronization sequence in step S205. Therefore, the volume synchronization between the point and the multipoint can be realized while the multipoint and multipoint synchronous playing is realized.
By adopting the audio data communication method in the embodiment of the application, at a broadcast sending end, the audio data is coded according to a fixed interval, such as the length of a coding frame, and is broadcast and sent at a preset broadcast interval; playing the decoded audio data after the anchor point of the first broadcast anchor point time slot is broadcast and sent and the anchor point is delayed for a preset time; the duration of one broadcast interval is M times of a fixed interval, coded M frames of audio data are sent in one broadcast interval, the preset duration is X times of the broadcast interval, and M and X are positive integers. Therefore, synchronous playing of audio between a point and multiple points can be realized without loading time synchronization data to each audio frame.
Furthermore, the embodiment of the application does not need to package volume data in the audio data to realize volume synchronization. In addition, the embodiment also provides better anti-interference and fading performance, and the compromise between the performance and the delay, and better distributes the wireless resources between the Bluetooth A2DP link and the broadcast.
Example two
Fig. 5 is a flowchart illustrating an audio data communication method performed by a receiving apparatus according to a second embodiment of the present application.
It should be understood that the receiving device in the second embodiment of the present application is used as a receiving end in communication. Therefore, the communication time slot, the broadcast interval, and the synchronization sequence used in the method are consistent with the communication time slot, the broadcast interval, and the synchronization sequence used in the receiving and sending device in the first embodiment, and the implementation of the communication time slot, the broadcast interval, and the synchronization sequence may refer to the related description in the first embodiment of the present application, and repeated details are not repeated.
As shown in fig. 5, the audio data communication method performed by the receiving device according to the second embodiment of the present application includes:
s501, searching and parsing the synchronization sequence to obtain: a Bluetooth clock; a device address; mapping an AFH channel; a broadcast interval; broadcasting retransmission times; a coding type and rate; the mode is applied.
In a specific implementation, in addition to the above information carried in the synchronization sequence, the receiving device may determine timing information according to a time point when the synchronization sequence is received, where the timing information may be used to determine a time point when the broadcast slot starts.
In particular implementations, the receiving device may store the parsed bluetooth clock, device address, AFH channel map, broadcast interval, broadcast retransmission times, coding type and rate, application mode, timing information, etc. in the memory of the data and protocol processor.
S502, audio data is received and demodulated at a first time slot at a predetermined broadcast interval.
In the implementation, on the receiving device side, since communication with the sound source device is not involved, the audio signal is received only in the first time slot in each broadcast interval, that is, the broadcast time slot, and is demodulated into audio data.
In specific implementation, each broadcast slot includes one broadcast anchor timeslot and N broadcast retransmission timeslots, and audio data transmitted in the broadcast anchor timeslot and the N broadcast retransmission timeslots in one broadcast interval are the same. Therefore, the receiving device can determine whether to continue receiving in the broadcast retransmission slot according to the signal quality of the demodulated data after receiving and demodulating the audio data from the broadcast anchor slot. Specifically, when the signal quality is good, such as the demodulated audio data CRC check is correct, the reception may be stopped, and when the signal quality is not good enough, such as the demodulated audio data CRC check is incorrect, the audio data retransmitted in the broadcast retransmission slot may be further received within the broadcast interval.
Fig. 6 is a flowchart of a method for determining whether to retransmit according to signal quality according to the second embodiment of the present application.
As shown in fig. 6, the method for determining whether to retransmit according to signal quality according to the second embodiment of the present application includes:
s601, setting a transmission threshold according to the broadcast retransmission times in the synchronous sequence.
Specifically, the transmission threshold is +1 broadcast retransmission times.
S602, when the audio signal starts to be received in a broadcast anchor slot within one broadcast interval, the number of transmissions is set to 0.
S603, the audio data in the broadcast slot of the broadcast interval is received and demodulated.
S604, performing cyclic redundancy CRC check on the demodulated audio data.
S605, judging whether the CRC check result of the audio data is correct; when correct, execute S606; when not correct, S607 is executed.
S606, the reception of the audio data is ended within the broadcast interval.
The CRC-correct payload data may be transmitted to subsequent processing, such as decoding, through S604-606.
S607, storing the load data of the audio data and the signal quality of each data segment in the load data, and adding 1 to the transmission frequency.
S608, judging whether the transmission times of the audio data is equal to a transmission threshold; when the transmission number is not equal to the transmission threshold, S603 is continuously executed; when the number of transmissions is equal to the transmission threshold, S609 is performed.
S609, processing the load data according to the stored signal quality of each data segment in one or more load data with incorrect CRC check result; wherein, the signal quality is determined according to the signal angle difference before and after judgment of each data segment in each load data during demodulation; and performs S606.
In a specific implementation, processing the payload data according to the stored signal quality of each data segment in one or more payload data whose CRC check result is incorrect may include: subtracting the difference value of the corresponding angle after data judgment from the signal angle before demodulating the data to obtain an absolute value; accumulating the absolute values of the angle differences corresponding to all the symbols of each section of signal, and then averaging; setting an angle difference value corresponding to a signal-to-noise ratio required by a demodulation signal as a judgment threshold; comparing the average value of the actual angle errors with the threshold, wherein the data below the threshold are normal data, and the data above the threshold are interfered data.
For example, when DQPSK or D8PSK modulation is used, an absolute value may be obtained by subtracting a difference value of a corresponding angle after data decision from a signal angle before DQPSK or D8PSK demodulation data; accumulating the absolute values of the angle differences corresponding to all DQPSK or D8PSK symbols of each section of signal, and then averaging; and setting an angle difference value corresponding to the signal-to-noise ratio required by demodulating the DQPSK or D8PSK signal as a judgment threshold.
Specifically, determining the signal quality of each data segment in the load data according to the signal angle difference before and after the decision of each data segment in each load data during demodulation may specifically include: dividing the load data into A data segments with the same length according to the length of the load data, wherein each data segment comprises B symbols (symbol); b is a natural number more than or equal to 1; a is a natural number greater than 1; the angle theta of the complex signal before the decision of each symbol at the time of demodulation and the angle of the data after the decision are calculated separately
Figure BDA0001851680770000121
Calculating the angle theta of the complex signal and the angle of the data for each symbol
Figure BDA0001851680770000122
Absolute value of the difference of
Figure BDA0001851680770000123
Calculating each of A data segments
Figure BDA0001851680770000124
Wherein the content of the first and second substances,
Figure BDA0001851680770000125
the average value of B delta theta corresponding to B symbols in each section of load data; according to the data section
Figure BDA0001851680770000126
The signal quality of each data segment is determined.
For example, when DQPSK or D8PSK modulation is employed,
specifically, in one embodiment, a may be preset by the relevant personnel by comprehensively considering the calculation amount and the desired data quality, and in general, the larger a is, the larger the calculation amount is, but the higher the processed data quality is. If a is set in advance, B may be determined according to the length of the payload data and a, specifically, B is the length of the payload data divided by a.
In another embodiment, B may be preset, and the number of segments a is determined according to the length of the payload data and the set length B of each data segment, specifically, a is the length of the payload data divided by B. For example, the length B of each data segment is set to 10, that is, each data segment includes 10 symbols, and when the payload data length is 100 symbols, a is 100/10 is 10; when the length of the load data is 80 symbols, A is 80/10 is 8; this is not a limitation of the present application.
In the specific implementation, the angle θ of the complex signal before the decision of each symbol in demodulation and the angle of the data after the decision
Figure BDA0001851680770000127
Can be obtained by means of common technical means of a person skilled in the art, and the details are not described herein.
In practice, according to the respective data section
Figure BDA0001851680770000128
Determining the signal quality of each data segment may specifically include: signal quality of data segment
Figure BDA0001851680770000129
When the signal quality is smaller than or equal to a preset threshold value, determining the signal quality of the data segment to be in a first state; otherwise, the signal quality of the data segment is determined to be in the second state. Specifically, the first state may be, for example, normal, available, etc., and the second state may be abnormal, unavailable, etc. Specifically, the threshold value may be set to a value such as 5 degrees, 8 degrees, 10 degrees, or the like.
In a specific implementation, when there is one load data, the stored load data may be used as the processed load data and indicate the data segment with the signal quality in the second state.
Specifically, when in some cases, for example, packet loss is severe; after multiple retransmissions, when only one packet of data with incorrect CRC is received, it can be determined whether each data segment is normal according to the signal quality. If each data segment is normal, it may be considered that the load data is not affected by the severe interference, and the load data is sent to decoding, otherwise, the load data is sent to decoding as processed load data, and the data segment indicating the signal quality in the second state is sent to decoding, for example, to perform PLC (Packet Loss compensation) processing in the subsequent process.
In a specific implementation, when a plurality of pieces of load data are stored, processing the load data according to the signal quality of each data segment in the plurality of pieces of load data which are stored in advance and of which the CRC check result is incorrect includes: selecting A corresponding data segments of a plurality of load data with incorrect CRC check results from a plurality of data segments stored in advance
Figure BDA0001851680770000131
The smallest data segment, and a
Figure BDA0001851680770000132
Combining the minimum data segments into new load data; and taking the new load data as the processed load data and indicating the signal quality as a data segment of the second state.
Specifically, when there are two or more packets of CRC error data, the best quality data in each data segment corresponding to the multiple packets, that is, the average value of the absolute values of the angle differences corresponding to each data segment, can be selected
Figure BDA0001851680770000133
The smallest data, make up a new data packet. And then judging whether each data segment of the new data packet is normal. And if the signal quality of each data segment in the newly formed new data packet is not affected by serious interference, sending the data segment to decoding, otherwise, sending the new load data serving as the processed load data to decoding, indicating the signal quality to be the data segment in the second state, and performing subsequent data processing according to the loss, for example, performing subsequent PLC processing.
In specific implementation, when synchronization fails or an error occurs in receiving a packet header, the PLC processing may be performed according to the packet loss and subsequently performed.
When the CRC check result is incorrect and the transmission times of the load data in a broadcast interval are used up, processing the load data according to the signal quality of each data segment in one or more load data which is stored in advance and the CRC check result is incorrect; the data with error CRC check and better signal quality is used for concealing the damage of data loss to voice or audio, and the reliability of limited retransmission data can be effectively improved, thereby improving the performance of broadcast communication.
S503, the audio data is decoded.
In the specific implementation, the decoding is performed by using a decoding algorithm of a pair corresponding to the encoding type used in the re-encoding on the transmitting device side. The coding type used in the re-coding at the receiving and transmitting device sides can be obtained from the coding type parsed from the synchronization sequence.
S504, after delaying the preset time from the time when the first broadcast anchor point time slot is demodulated, starting to play the decoded audio data from the audio data received by the first broadcast anchor point time slot; the predetermined duration is X times the broadcast interval, where X is a positive integer; the predetermined time length is the delayed playing time of the audio data at the opposite end.
In a specific implementation, the time reference of the receiving device aligned with the music played by the sending device and the receiving device is the broadcast anchor point, the time reserved for decoding and audio post-processing is set to be a fixed delay time length, and the delay time length is a fixed multiple X of the broadcast interval. Specifically, X may be set according to different application modes. For example, X can be 5, 6, 7, 8, and the like.
In a specific implementation, the decoded audio data may be locally played at a volume level corresponding to the application mode in the synchronization sequence searched in S501. Therefore, the volume synchronization between the point and the multipoint can be realized while the multipoint and multipoint synchronous playing is realized.
In the implementation, the receiving device and the receiving and transmitting device can cause audio sampling deviation due to clock deviation, and the accumulation of the sampling deviation can cause synchronization loss. In order to overcome this problem, in the embodiments of the present application, a clock frequency deviation between a transmitting device that transmits audio data and a receiving device that receives audio data may be determined according to synchronization information obtained during demodulation; and adjusting the playing clock according to the clock frequency deviation. That is, if the synchronization information provided by the baseband processor indicates that the clock of the receiving device is faster than the receiving and transmitting devices, the clock of the audio playback is slowed down. Otherwise, the clock of audio playing is adjusted to be fast.
By adopting the audio data communication method in the embodiment of the application, after receiving and demodulating the audio data on the first time slot at the preset broadcast interval, from the demodulated anchor point of the first broadcast anchor point time slot, after delaying the X times of the broadcast interval, the decoded audio data is played; therefore, synchronous playing of audio between a point and multiple points is realized.
By adopting the audio data communication method in the embodiment of the application, when the CRC check result is incorrect and the transmission times of the load data in a broadcast interval are used up, the load data is processed according to the signal quality of each data segment in one or more load data which is stored in advance and the CRC check result is incorrect; the data with error CRC check and better signal quality is used for concealing the damage of data loss to voice or audio, and the reliability of limited retransmission data can be effectively improved, thereby improving the performance of broadcast communication.
Based on the same inventive concept, the embodiment of the present application further provides an audio communication device, and as the principle of the audio communication device for solving the problem is similar to the method provided in the first embodiment of the present application, the implementation of the audio communication device may refer to the implementation of the method, and repeated details are not repeated.
EXAMPLE III
Fig. 7 shows a schematic structural diagram of an audio communication device according to a third embodiment of the present application.
In specific implementation, the audio communication device according to the third embodiment of the present application may be a variety of devices with an audio playing function, such as a smart phone, an earphone, or a sound box, which is not limited in this application.
As shown in fig. 7, the audio communication apparatus 700 according to the third embodiment of the present application includes at least: a radio frequency transceiver 701, configured to modulate data and audio data encoded by the protocol processor, and broadcast and transmit the modulated data and the audio data on a first timeslot at a predetermined broadcast interval; a data and protocol processor 702 for decoding audio data to be transmitted; the decoded audio data are coded according to fixed intervals and then sent to a radio frequency transceiver; wherein, one broadcast interval transmits the encoded M frames of audio data in the broadcast anchor slot of the first slot; the predetermined broadcast interval is M times the fixed interval, M being a positive integer; the speaker 703 is configured to play the audio data after the anchor point that broadcasts the first broadcast anchor point time slot delays for a predetermined time; the preset time length is used for synchronous playing of the audio data at the opposite terminal, the preset time length is X times of the broadcasting interval, and X is a positive integer.
In an implementation, one broadcast interval may specifically include: the first time slot is used for broadcasting and sending the coded audio data, one first time slot comprises a continuous broadcast anchor point time slot and N broadcast retransmission time slots, the broadcast anchor point time slot is used for sending the coded M frames of audio data, and the broadcast retransmission time slot is used for retransmitting the M frames of audio data; wherein N is a non-negative integer.
In an implementation, the one broadcast interval may further include a second time slot for receiving data from an external audio source device and transmitting the data, where the second time slot includes a receiving time slot and a transmitting time slot;
the radio frequency transceiver 701 is further configured to receive audio data from the audio source device in the second time slot, and demodulate the audio data; modulating the audio data recoded by the data and protocol processor and then broadcasting and transmitting the audio data on a first time slot at a preset broadcasting interval;
the data and protocol processor 702 is further configured to decode the demodulated audio data; and re-encoding the decoded audio data at a fixed interval.
In particular implementations, the radio frequency transceiver may be further configured to: broadcasting and sending a synchronization sequence by taking Y times of a broadcasting interval as a period, wherein the synchronization sequence carries the following information:
a broadcast interval for indicating an interval duration between two consecutive broadcast anchors, for example, 20 ms;
an application mode for indicating a current transmission mode; the application mode has a corresponding relation with a broadcast interval and volume.
Because the playing time of the audio data transmitted in one broadcast interval is equal to the duration of the broadcast interval, the sending and receiving of the audio broadcast both use the broadcast anchor point as a synchronization reference point and play the audio data after delaying the same predetermined duration, and the predetermined duration is also an integral multiple of the broadcast interval, in this embodiment, the synchronous playing can be realized without loading a timestamp for each frame of audio data.
Furthermore, the present embodiment adopts a mode of separately broadcasting and transmitting the synchronization sequence, and can reduce the number of times of broadcasting the synchronization sequence by setting the transmission period of the synchronization sequence, thereby further saving bandwidth consumption.
Further, in the present embodiment, by sending the application mode information having a corresponding relationship with the volume level in the synchronization sequence, it is not necessary to load the volume level information for each frame of audio data.
In a specific implementation, the synchronization sequence may further include a broadcast retransmission number, which is used to indicate the number of broadcast retransmission slots in one first slot, and is, for example, 2, 3, 4, etc.: therefore, a limited retransmission mechanism can be realized, the burstiness of data transmission can be resisted, and meanwhile, the buffering is reduced, and the delay of audio playing is reduced.
In particular implementation, the synchronization sequence may further include the following information:
the Bluetooth clock is used for indicating the Bluetooth clocks of the receiving and sending devices so as to realize the synchronization of the received audio data; a device address indicating an address of a receiving and transmitting device so that a receiving side can distinguish different transmitting devices; an AFH channel map for negotiating useful channels to be used against interference; the type of encoding and the rate used to indicate the re-encoding format and the rate size, e.g., the audio data is encoded with opus at a coding rate of 100 kbps.
The application mode may have a correspondence with a broadcast interval, the number of broadcast retransmissions, a coding type and rate, a volume level, and the like. In particular implementations, the radio frequency transceiver may be further configured to: when the synchronization sequences are transmitted on L channels, the interval between the adjacent synchronization sequences on every two adjacent channels is one L times of the interval between the two adjacent synchronization sequences on the same channel, wherein L is a positive integer.
In particular implementation, the speaker may be specifically configured to: and according to the application mode, delaying the playing of the audio data by the corresponding preset time length and volume.
By adopting the audio communication equipment in the embodiment of the application, the audio data to be sent is coded at fixed intervals and is sent in a broadcasting mode at preset broadcasting intervals; after the anchor point of the first broadcast anchor point time slot is broadcast and sent, the broadcast interval is delayed by X times, and then the decoded audio data is played; the synchronous playing of the audio between the point and the multipoint can be realized. In addition, the volume is synchronized by adopting a synchronization sequence between the receiving and sending equipment and the receiving equipment, so that the volume is synchronously controlled between multiple points.
Therefore, the embodiment of the application does not need to package volume and time synchronization data in music data to realize volume and time synchronization. And, better interference and fading performance is provided, and the performance is compromised with delay, and the wireless resources are better distributed between the Bluetooth A2DP link and the broadcast.
Based on the same inventive concept, the embodiment of the present application further provides an audio communication device, and as the principle of the audio communication device for solving the problem is similar to the method provided in the second embodiment of the present application, the implementation of the audio communication device may refer to the implementation of the method, and repeated details are not repeated.
Example four
Fig. 8 shows a schematic structural diagram of an audio communication device according to a fourth embodiment of the present application.
In specific implementation, the audio communication device according to the fourth embodiment of the present application may be a variety of devices with an audio playing function, such as a smart phone, an earphone, or a sound box, which is not limited in this application.
As shown in fig. 8, the audio communication apparatus 800 according to the fourth embodiment of the present application includes at least: a radio frequency receiver 801 for receiving and demodulating audio data on a first slot at a predetermined broadcast interval; a data and protocol processor 802 for decoding the audio data; a speaker 803, configured to play the decoded audio data from the audio data received from the first broadcast anchor timeslot after delaying for a predetermined time from the time when the first broadcast anchor timeslot is demodulated; the preset time length is X times of the broadcasting interval, and X is a positive integer; the preset time is the delay playing time of the audio data at the opposite end.
In particular implementation, the rf receiver may be further configured to: the sync sequence is searched and parsed to get the following information: the broadcast interval is used for indicating the interval duration between the starting moments of two continuous broadcast anchor point time slots; an application mode for indicating a current transmission mode; wherein, the application mode has a corresponding relation with the broadcast interval and the volume; the speaker 803 delays the playback by a corresponding predetermined time length and volume level according to the application mode when playing back the decoded audio data.
In specific implementation, the radio frequency receiver searches and analyzes the synchronization sequence, and may further obtain the following information:
a broadcast retransmission number of times for indicating the number of broadcast retransmission slots in a first slot; and/or the presence of a gas in the gas,
a Bluetooth clock for indicating a Bluetooth clock of the transmitting device; and/or the presence of a gas in the gas,
a device address indicating an address of a transmitting device; and/or the presence of a gas in the gas,
frequency hopping adaptive AFH channel mapping for negotiating useful channels; and/or the presence of a gas in the gas,
a coding type and rate for indicating the re-coding format and rate size;
the application mode has a corresponding relationship with the broadcast retransmission times, the coding type and the rate.
In specific implementation, the audio communication device according to the fourth embodiment of the present application may further include: the baseband processor is used for carrying out cyclic redundancy CRC (cyclic redundancy check) on the demodulated audio data; when the CRC result of the audio data is correct, triggering the radio frequency receiver to finish receiving the audio data in a broadcast interval; the signal quality estimator is used for acquiring the signal angle difference of each data segment in each load data before and after judgment from the radio frequency receiver; determining the signal quality of each data segment in the load data according to the signal angle difference of each data segment before and after judgment during demodulation; the data and protocol processor is also used for obtaining a CRC check result of the audio data and corresponding load data from the baseband processor; when the CRC result of the audio data is incorrect, storing the load data of the audio data and the signal quality of each data segment in the load data, and adding 1 to the transmission times; judging whether the transmission times are equal to a transmission threshold or not; wherein, the transmission threshold is the broadcast retransmission times plus 1; when the transmission times are not equal to the transmission threshold, the radio frequency receiver is triggered to continue to receive the audio data in the broadcast interval; when the transmission times are equal to the transmission threshold, processing the load data according to the stored signal quality of each data segment in one or more load data with incorrect CRC check results; wherein, the signal quality is determined according to the signal angle difference before and after the judgment of each data segment in each load data during the demodulation.
In an implementation, the signal quality estimator may specifically include: the device comprises a splitting unit, a data processing unit and a data processing unit, wherein the splitting unit is used for splitting load data into A data sections according to the length of the load data, and each data section comprises B symbols (symbol); b is a natural number more than or equal to 1; a is a natural number greater than 1; a first calculation unit for calculating an angle theta of the complex signal before the decision of each symbol at the time of demodulation and an angle of the data after the decision, respectively
Figure BDA0001851680770000191
A second calculation unit for calculating an angle theta of the complex signal of each symbol and an angle of the data
Figure BDA0001851680770000192
Absolute value of the difference of
Figure BDA0001851680770000193
A third calculation unit for calculating the data segments of the A data segments
Figure BDA0001851680770000194
Wherein the content of the first and second substances,
Figure BDA0001851680770000195
the average value of B delta theta corresponding to B symbols in each section of load data; a first determining unit for determining the data segment according to
Figure BDA0001851680770000196
The signal quality of each data segment is determined.
In a specific implementation, the first determining unit may specifically be configured to: signal quality of data segment
Figure BDA0001851680770000197
When the signal quality is smaller than or equal to a preset threshold value, determining the signal quality of the data segment to be in a first state; otherwise, the signal quality of the data segment is determined to be in the second state.
In a specific implementation, when the stored load data is one, the data and protocol processor may be specifically configured to: and taking one piece of load data which is stored in advance and has an incorrect CRC check result as the processed load data, and indicating the signal quality as a data segment of the second state.
In a specific implementation, when the stored load data is multiple, the data and protocol processor may be specifically configured to: selecting A corresponding data segments of a plurality of load data with incorrect CRC check results from a plurality of data segments stored in advance
Figure BDA0001851680770000198
The smallest data segment, and a
Figure BDA0001851680770000199
Combining the minimum data segments into new load data; taking the new load data as the processed load data, and indicatingA data segment indicating a signal quality as a second state.
In particular implementations, the data and protocol processor may be further configured to: determining the clock frequency deviation of a sending device sending the audio data and a receiving device receiving the audio data according to the synchronization information provided by the baseband processor; and adjusting the playing clock according to the clock frequency deviation.
With the audio communication device in the embodiment of the present application, after receiving and demodulating audio data at a first time slot at a predetermined broadcast interval, the decoded audio data is played after delaying X times of the broadcast interval from the anchor point of the first broadcast anchor point time slot that is demodulated; therefore, synchronous playing of audio between a point and multiple points is realized. In addition, the volume is synchronized by adopting a synchronization sequence between the receiving and sending equipment and the receiving equipment, so that the volume is synchronously controlled between multiple points.
By adopting the audio communication equipment in the embodiment of the application, when the CRC check result is incorrect and the transmission times of the load data in a broadcast interval are used up, the load data is processed according to the signal quality of each data segment in one or more load data which is stored in advance and the CRC check result is incorrect; the data with error CRC check and better signal quality is used for concealing the damage of data loss to voice or audio, and the reliability of limited retransmission data can be effectively improved, thereby improving the performance of broadcast communication.
Based on the same inventive concept, the embodiment of the present application further provides an audio communication system, and as the principle of solving the problem of the system is similar to the methods provided in the first and second embodiments of the present application, the implementation of the system can refer to the implementation of the method, and repeated details are not repeated.
EXAMPLE five
Fig. 9 shows a schematic structural diagram of an audio communication system according to a fifth embodiment of the present application.
As shown in fig. 9, an audio communication system 900 according to the fifth embodiment of the present application includes: a receiving and transmitting device 700; one or more receiving devices 800.
In specific implementation, the implementation of the receiving and sending device 700 may refer to the implementation of the receiving and sending device 700 in the third embodiment of the present application, and repeated details are not repeated.
In specific implementation, the implementation of the receiving device 800 may refer to the implementation of the receiving device 800 in the fourth embodiment of the present application, and repeated details are not described again.
By adopting the audio communication system in the embodiment of the application, after receiving audio data from the sound source equipment, the audio data are coded according to a fixed interval and are broadcast and sent at a preset broadcast interval; playing the decoded audio data after the anchor point of the first broadcast anchor point time slot is broadcast and sent and the anchor point is delayed for a preset time; the predetermined duration is X times the broadcast interval, where X is a positive integer; and the receiving equipment starts playing after demodulating the first broadcast anchor point time slot and delaying X times of the broadcast interval, thereby realizing synchronous playing of audio between the point and the multipoint.
In addition, the volume is synchronized by adopting a synchronization sequence between the receiving and sending equipment and the receiving equipment, so that the volume is synchronously controlled between multiple points.
By adopting the audio communication system in the embodiment of the application, when the CRC check result is incorrect and the transmission times of the load data in a broadcast interval are used up, the receiving equipment processes the load data according to the signal quality of each data segment in one or more load data which is stored in advance and the CRC check result is incorrect; the data with error CRC check and better signal quality is used for concealing the damage of data loss to voice or audio, and the reliability of limited retransmission data can be effectively improved, thereby improving the performance of broadcast communication.
In order to make the present application better understood by those skilled in the art, the following will describe the embodiments of the present application in detail by taking a specific implementation scenario as an example.
EXAMPLE six
According to the sixth implementation scenario of the sixth embodiment of the present application, referring to the implementation scenario shown in fig. 1, the receiving and sending device is wirelessly connected to the sound source device through radio frequency wireless communication, and receives an audio signal wirelessly transmitted by the sound source device through radio frequency. An A2DP link is established between the audio source device and the receiving and transmitting device according to the bluetooth protocol, and the audio source device transmits audio data encoded by the SBC to the receiving and transmitting device. The receiving and sending devices play the audio locally and simultaneously forward the audio to a plurality of receiving devices through a broadcast protocol.
In the examples of the present application, the specific implementation will be explained by taking the indoor high performance mode as an example.
In the embodiment of the present application, the structure of the receiving and transmitting device is as shown in fig. 10. Specifically, the receiving and transmitting device 1000 according to the sixth embodiment of the present application includes: an antenna 1001, a radio frequency transceiver 1002, a baseband processor 1003, a data and protocol processor 1004, a speaker 1005. The receiving and sending equipment receives the wireless signal sent to the air by the sound source equipment through the antenna, and then the wireless signal is demodulated into a digital baseband signal through the radio frequency transceiver, the digital baseband signal is analyzed out a data load through the digital baseband processor, and the data load is sent to the data and protocol processor to be decoded into audio data. The data and protocol processor may specifically include a microprocessor and a memory for data and code. The decoded audio data is sent to a local loudspeaker for playing, is re-encoded according to a fixed interval and an appointed encoding format through a data and protocol processor, is sent to a baseband processor for processing into a digital baseband signal, is modulated into a radio frequency signal through a radio frequency transceiver, and is finally sent to receiving equipment through an antenna.
In the embodiment of the present application, the structure of the receiving apparatus is as shown in fig. 11. Specifically, the receiving apparatus 1100 according to the sixth embodiment of the present application includes: an antenna 1101, a radio frequency transceiver 1102, a baseband processor 1103, a signal quality estimator 1104, a data and protocol processor 1105 and a speaker 1106. The antenna receives the aerial signal, the radio frequency signal is converted into a digital baseband signal through the radio frequency receiver, and the baseband processor processes the digital baseband data and provides a CRC (cyclic redundancy check) check result and a data load for the data and protocol processor. The signal quality estimator is used for estimating the signal quality of the demodulated data and sending the estimated signal quality information to the data and protocol processor as the basis for error data reconstruction. The data and protocol processor is responsible for processing data with correct CRC detection and CRC error, communication protocol processing, audio post-processing and the like. The data and protocol processor may include a microprocessor for executing programs for data and protocol processing and a memory for storing data and protocol codes, etc. The signal quality estimator estimates the quality of the baseband data, or the severity of the interference, by calculating a decision error of a baseband signal demodulating the baseband data.
In this embodiment, the audio coding between the receiving and transmitting device 1000 and the receiving device 1100 is Opus coding, and the coding rate is about 100 kbps; the length of a coding frame is 10ms, each frame is about 125bytes, and every two coding frames form a data packet load of about 375 bytes; 2DH3 packet type broadcast using extended length classical Bluetooth, each 2DH3 packet occupying 4 slots; in a receiving and transmitting device, a receiving function and a transmitting function share an antenna, a radio frequency transceiver, and a baseband processor in a Time Division Multiplexing (TDM) manner.
In time division multiplexed slots, the broadcast interval is fixed. In a broadcast interval, the slot resource is divided into two parts, one part is a broadcast slot and the other part is a Bluetooth slot. Specifically, the broadcast interval is set to 20ms for 32 slots. In each broadcast interval, the broadcast packet 2DH3 is sent 3 times, that is, the anchor point is sent once and retransmitted twice, occupying 12slots in total. That is, of the 32slots in the broadcast interval, 12slots are used for broadcasting, and 20slots are used for receiving the A2DP link with the transmitting device and the audio source device.
The synchronization sequences are sent using 2DH1 on channels 0, 37, and 78, respectively. The sync sequence interval is 180ms, 288slots, which is 9 times the broadcast interval. The synchronization sequence phase on the three channels is 60ms, i.e. 96slots, which is 3 times the broadcast interval. The application mode of the synchronization sequence is set to an indoor high-performance mode, and the corresponding volume is a medium volume.
The play delay corresponding to the indoor high performance mode is set to 360 ms. The receiving and sending equipment receives an A2DP data packet from the sound source equipment, the data buffered for 240ms starts to be broadcast, and the data buffered for 360ms starts to be played; i.e. the start of the playback is delayed by 120ms from the start of the broadcast. After receiving the broadcast data, the receiving device also buffers 120ms of data to start playing.
Specifically, when the broadcasting is started after the appointed delay of 120ms, the receiving and transmitting device and all the receiving devices use the starting time of the broadcast anchor point time slot as the synchronous reference time, the broadcast data received in each broadcast interval is decoded and processed with audio, and the first sampling data is started to be played at the 6 th anchor point after 5 intervals. In this way, it is ensured that the reception is synchronized with the audio played by the sending device and all receiving devices.
Meanwhile, since the A2DP data received from the audio source device is buffered for 240ms, there is enough time to solve the audio packet loss problem caused by the burst of the wireless channel. Buffering the audio data transmitted by broadcasting for 120ms allows enough time for decoding and audio post-processing, such as PLC processing of packet loss and data loss.
In particular, the sampling frequency of the digital-to-analog converter for audio playback can be adjusted by using the synchronization information provided by the baseband processor of the receiving device. That is, if the synchronization result provided by the baseband processor indicates that the clock of the receiving device is faster than the receiving and transmitting devices, the clock of the digital-to-analog converter of the audio playback is slowed down. Otherwise, the clock of the audio playing digital-to-analog converter is adjusted to be fast. Since the clock bias of bluetooth is specified to be within +/-40ppm, the clock adjustment of the digital-to-analog converter can be in minute adjustment steps.
When the receiving device starts to receive the audio data in the broadcast time slot, the threshold of the limited retransmission is set to be 3 according to the broadcast retransmission times in the synchronization sequence. Every time a new packet starts to be received at a new broadcast anchor, the number of retransmissions is set to 0. In the broadcast time slot, the receiver receives the broadcast data, judges according to the CRC check result provided by the baseband processor, if the CRC check is correct, ends the receiving of the broadcast interval, and delivers the data with correct CRC check to the data and protocol processor for decoding and processing. If the CRC checks the error, the error data and the corresponding signal quality information are saved. Then, whether the retransmission times are equal to a preset limited retransmission threshold is judged. And if the retransmission times are smaller than the retransmission preset threshold, adding 1 to the retransmission times, and receiving the broadcast data in the next retransmission window. And if the retransmission times are equal to the retransmission preset threshold 3, processing the stored error data and finishing the receiving of the broadcast interval.
Specifically, the error data processing method is as follows: if no CRC error data exists, the synchronization fails or the receiving header, namely the HEC error data, is processed according to the packet loss; under the condition that only one packet of CRC error data exists, judging whether each section of data is normal according to the data quality provided by the signal quality estimator; if each segment of data is normal, namely not affected by serious interference, sending the data to an audio decoder for decoding; otherwise, indicating abnormal data segment to the audio decoder, and processing according to the lost data; if two or more packets of CRC error data exist, each segment of data is processed respectively, and the data with the best quality in each segment of data in multiple packets, namely the data with the minimum actual angle error average value, is selected to form a new data packet; and judging whether each section of data of the new data packet is normal or not, if the corresponding signal quality is not influenced by serious interference, sending the data to an audio decoder for decoding, otherwise, indicating the abnormal data section to the audio decoder, and processing according to lost data. Packet loss or lost data is eliminated by audio post-processing.
By adopting the audio communication system in the embodiment of the application, after receiving audio data from the sound source equipment, the audio data are coded according to a fixed interval and are broadcast and sent at a preset broadcast interval; playing the decoded audio data after the anchor point of the first broadcast anchor point time slot is broadcast and sent and the anchor point is delayed for a preset time; the predetermined duration is X times the broadcast interval, where X is a positive integer; and the receiving equipment starts playing after demodulating the first broadcast anchor point time slot and delaying X times of the broadcast interval, thereby realizing synchronous playing of audio between the point and the multipoint.
In addition, the volume is synchronized by adopting a synchronization sequence between the receiving and sending equipment and the receiving equipment, so that the volume is synchronously controlled between multiple points.
By adopting the audio communication system in the embodiment of the application, when the CRC check result is incorrect and the transmission times of the load data in a broadcast interval are used up, the receiving equipment processes the load data according to the signal quality of each data segment in one or more load data which is stored in advance and the CRC check result is incorrect; the data with error CRC check and better signal quality is used for concealing the damage of data loss to voice or audio, and the reliability of limited retransmission data can be effectively improved, thereby improving the performance of broadcast communication.
By adopting the audio communication system in the embodiment of the application, better anti-interference and fading performance can be provided, the performance and delay compromise can be realized, and wireless resources can be better distributed between the Bluetooth A2DP link and broadcasting.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (14)

1. An audio data communication method, comprising:
after audio data to be transmitted are coded according to a fixed interval, the audio data are broadcast and transmitted on a first time slot at a preset broadcast interval; wherein one of the broadcast intervals transmits the encoded M-frame audio data at a broadcast anchor timeslot of a first timeslot; the predetermined broadcast interval is M times the fixed interval, where M is a positive integer;
playing audio data after the anchor point of the first broadcast anchor point time slot is broadcast and sent and the anchor point is delayed for a preset time; the preset time length is used for synchronous playing of the audio data at the opposite end, the preset time length is X times of the broadcasting interval, and X is a positive integer.
2. The method of claim 1, wherein one broadcast interval comprises:
a first time slot, configured to broadcast and send encoded audio data, where the first time slot includes a broadcast anchor time slot and N broadcast retransmission time slots, the broadcast anchor time slot is used to send encoded M frames of audio data, and the broadcast retransmission time slot is used to retransmit the M frames of audio data; wherein N is a non-negative integer.
3. The method of claim 2, further comprising:
broadcasting and sending a synchronization sequence with a period of Y times of the broadcasting interval, wherein the synchronization sequence comprises the following information:
the broadcasting interval is used for indicating the interval duration between two continuous broadcasting anchors;
an application mode for indicating a current transmission mode; wherein, the application mode has a corresponding relation with a broadcast interval and volume;
when playing the audio data, according to the application mode, delaying the playing with the corresponding preset time length and volume;
and Y is a positive integer.
4. The method of claim 3, wherein the synchronization sequence further comprises:
a broadcast retransmission number of times for indicating the number of broadcast retransmission slots in a first slot; and/or the presence of a gas in the gas,
a Bluetooth clock for indicating a Bluetooth clock of the transmitting device; and/or the presence of a gas in the gas,
a device address indicating an address of a transmitting device; and/or the presence of a gas in the gas,
frequency hopping adaptive AFH channel mapping for negotiating useful channels; and/or the presence of a gas in the gas,
a coding type and rate for indicating a re-coding format and a rate size;
the application mode has a corresponding relationship with the broadcast retransmission times, the coding type and the rate.
5. The method of claim 3, further comprising:
when the synchronization sequences are transmitted on L channels, the interval between the adjacent synchronization sequences on every two adjacent channels is one L times of the interval between the two adjacent synchronization sequences on the same channel, wherein L is a positive integer.
6. The method of claim 2, wherein the one broadcast interval further comprises a second time slot for receiving data from an audio source device and transmitting data, the second time slot comprising a receive time slot and a transmit time slot;
and receiving audio data from sound source equipment in the second time slot, and obtaining the audio data to be sent after demodulation and decoding.
7. An audio data communication method, comprising:
receiving and demodulating audio data at a predetermined broadcast interval on a first slot; the audio data is broadcast and transmitted on a first time slot at a preset broadcast interval after being coded at a fixed interval;
decoding the audio data;
after delaying for a preset time from the demodulation of the anchor point of the first broadcast anchor point time slot, starting to play the decoded audio data from the audio data received by the first broadcast anchor point time slot;
the preset time length is X times of the broadcasting interval, and X is a positive integer; the preset time is the delay playing time of the audio data at the opposite end.
8. The method of claim 7, wherein prior to receiving and demodulating audio data on the first time slot at a predetermined broadcast interval, further comprising:
searching and analyzing the synchronous sequence to obtain the following information: the broadcasting interval is used for indicating the interval duration between two continuous broadcasting anchors; an application mode for indicating a current transmission mode; wherein the application mode has a corresponding relationship with the broadcast interval and volume size;
and when the decoded audio data are played, delaying the playing with the corresponding preset time length and volume according to the application mode.
9. The method of claim 8, wherein searching for and parsing the synchronization sequence further results in:
a broadcast retransmission number of times for indicating the number of broadcast retransmission slots in a first slot; and/or the presence of a gas in the gas,
a Bluetooth clock for indicating a Bluetooth clock of the transmitting device; and/or the presence of a gas in the gas,
a device address indicating an address of a transmitting device; and/or the presence of a gas in the gas,
frequency hopping adaptive AFH channel mapping for negotiating useful channels; and/or the presence of a gas in the gas,
a coding type and rate for indicating a re-coding format and a rate size;
the application mode has a corresponding relationship with the broadcast retransmission times, the coding type and the rate.
10. The method of claim 9, wherein after receiving and demodulating audio data, and prior to decoding the audio data, further comprising:
performing cyclic redundancy CRC (cyclic redundancy check) on the demodulated audio data;
when the CRC check result of the audio data is correct, ending the reception of the audio data in the broadcast interval;
when the CRC result of the audio data is incorrect, storing the load data of the audio data and the signal quality of each data segment in the load data, and accumulating the transmission times of the audio data; judging whether the transmission times are equal to a transmission threshold or not; wherein the transmission threshold is the broadcast retransmission times plus 1;
when the transmission times are not equal to a transmission threshold, continuing to receive the audio data in the broadcast interval;
when the transmission times are equal to a transmission threshold, processing the load data according to the stored signal quality of each data segment in one or more load data with incorrect CRC check results;
wherein the signal quality is determined according to the signal angle difference of each data segment before and after judgment in each load data during demodulation.
11. The method of claim 10, wherein determining the signal quality of each data segment in the payload data according to the signal angle difference before and after the decision of each data segment in each payload data during demodulation comprises:
dividing the load data into A data segments according to the length of the load data, wherein each data segment comprises B symbols (symbols); b is a natural number more than or equal to 1; a is a natural number greater than 1;
the angle theta of the complex signal before the decision of each symbol at the time of demodulation and the angle of the data after the decision are calculated separately
Figure FDA0003003233190000041
Calculating an angle theta of the complex signal and an angle of data for each symbol
Figure FDA0003003233190000042
Absolute value of the difference of
Figure FDA0003003233190000043
Calculating each of A data segments
Figure FDA0003003233190000044
Wherein the content of the first and second substances,
Figure FDA0003003233190000045
the average value of B deltas theta corresponding to B symbols in each section of load data is obtained;
signal quality of data segment
Figure FDA0003003233190000046
When the signal quality of the data segment is smaller than or equal to a preset threshold value, determining the signal quality of the data segment to be a first state;
otherwise, determining the signal quality of the data segment to be in a second state.
12. The method of claim 11, wherein when there is one payload data, processing the payload data according to the signal quality of each data segment in the one payload data which is pre-stored and the CRC check result is incorrect comprises:
and taking the load data which is saved in advance and has an incorrect CRC check result as the processed load data, and indicating the signal quality as a data segment of the second state.
13. The method of claim 12, wherein when there are a plurality of pieces of stored payload data, processing the payload data according to the signal quality of each data segment of the plurality of pieces of payload data, which are stored in advance and the CRC check result of which is incorrect, comprises:
selecting A corresponding data segments of a plurality of load data with incorrect CRC check results from a plurality of data segments stored in advance
Figure FDA0003003233190000047
The smallest data segment, and a
Figure FDA0003003233190000048
Combining the minimum data segments into new load data;
and taking the new load data as processed load data and indicating the signal quality as a data segment of a second state.
14. The method of claim 7, further comprising:
determining the clock frequency deviation of a sending device sending the audio data and a receiving device receiving the audio data according to the synchronous information obtained during demodulation;
and adjusting the playing clock according to the clock frequency deviation.
CN201811298376.XA 2018-11-02 2018-11-02 Audio data communication method Active CN109547946B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201811298376.XA CN109547946B (en) 2018-11-02 2018-11-02 Audio data communication method
US16/659,583 US10945101B2 (en) 2018-11-02 2019-10-22 Method, device and system for audio data communication

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811298376.XA CN109547946B (en) 2018-11-02 2018-11-02 Audio data communication method

Publications (2)

Publication Number Publication Date
CN109547946A CN109547946A (en) 2019-03-29
CN109547946B true CN109547946B (en) 2021-07-02

Family

ID=65845825

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811298376.XA Active CN109547946B (en) 2018-11-02 2018-11-02 Audio data communication method

Country Status (1)

Country Link
CN (1) CN109547946B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110351669B (en) * 2019-06-28 2022-05-31 南京中感微电子有限公司 Bluetooth wireless broadcast transmitting and receiving method, equipment and communication system
CN112055314B (en) * 2019-06-28 2021-09-24 合肥炬芯智能科技有限公司 Bluetooth broadcast communication method, system and master device and slave device thereof
CN110931026B (en) * 2019-11-27 2022-07-12 南京中感微电子有限公司 Audio data communication method, equipment and system
CN111132111B (en) * 2019-12-26 2023-12-22 歌尔股份有限公司 BLE-based audio sharing method, system and computer readable storage medium
CN112330943A (en) * 2020-10-27 2021-02-05 深圳市元素创达科技有限公司 Method and device for controlling rotation of mobile phone clamping part by self-photographing remote controller
CN113114852B (en) * 2021-03-11 2022-04-15 厦门亿联网络技术股份有限公司 Audio transmission method, earphone and base station
CN115103317B (en) * 2022-05-19 2024-06-11 恒玄科技(上海)股份有限公司 Wireless communication method and assembly for audio sharing to destination device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100571119C (en) * 2006-12-07 2009-12-16 中兴通讯股份有限公司 A kind of mobile network of utilization realizes the method for clock synchronization
CN104599691B (en) * 2014-12-31 2018-02-13 小米科技有限责任公司 Audio frequency playing method and device
US20160309258A1 (en) * 2015-04-15 2016-10-20 Qualcomm Technologies International, Ltd. Speaker location determining system
CN105530698A (en) * 2015-12-17 2016-04-27 Tcl通力电子(惠州)有限公司 Time synchronization method and system among wireless devices

Also Published As

Publication number Publication date
CN109547946A (en) 2019-03-29

Similar Documents

Publication Publication Date Title
CN109547946B (en) Audio data communication method
CN110913375B (en) Wireless communication system and equipment
US10945101B2 (en) Method, device and system for audio data communication
US11259192B2 (en) Ultra-low latency audio over bluetooth
US10271152B1 (en) Synchronization of wireless headphones
US10454811B2 (en) Apparatus and method for de-jitter buffer delay adjustment
CN109450490B (en) A kind of voice data communication equipment and system
CN110931026B (en) Audio data communication method, equipment and system
US9112696B2 (en) Radio communication apparatus and a method of transmitting a retransmission packet
KR101930057B1 (en) Apparatus and method for transmitting/receiving data in communication system
US8331476B2 (en) Method for detecting transmission mode in a system using multiple antennas
US10735120B1 (en) Reducing end-to-end delay for audio communication
US20230199382A1 (en) Method and device for transmitting audio data based on Bluetooth Low Energy
US20110032916A1 (en) Wireless communication apparatus and method using the same
US11012484B2 (en) Audio data communication system
US7924765B2 (en) Method and system for improved wireless communications payload
WO2018122378A1 (en) Reduction of de-synchronization effects in tdm signals including dvb-t2 frames
JP2000217159A (en) Data packet multi-access communication method and its transmitter-receiver
US8208417B2 (en) Method for transmitting data in a radio network, a radio network and a receiver
CN111383644A (en) Audio communication method, equipment and system
US11190862B1 (en) Enhanced high frequency avalanche relay protocol
CN112291719B (en) Method for transmitting and receiving data in flexible time slot, and transmitting device and system
JP5955755B2 (en) Digital radio communication system and radio apparatus
JPH11331057A (en) Code division multiplex mobile communication equipment
Tatlas et al. WLAN Technologies for Audio Delivery

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant