WO2023273671A1 - 重传音频数据包的方法、音频接收器、存储介质及系统 - Google Patents

重传音频数据包的方法、音频接收器、存储介质及系统 Download PDF

Info

Publication number
WO2023273671A1
WO2023273671A1 PCT/CN2022/093496 CN2022093496W WO2023273671A1 WO 2023273671 A1 WO2023273671 A1 WO 2023273671A1 CN 2022093496 W CN2022093496 W CN 2022093496W WO 2023273671 A1 WO2023273671 A1 WO 2023273671A1
Authority
WO
WIPO (PCT)
Prior art keywords
audio
data packet
audio data
receiver
snk
Prior art date
Application number
PCT/CN2022/093496
Other languages
English (en)
French (fr)
Inventor
任凯
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2023273671A1 publication Critical patent/WO2023273671A1/zh

Links

Images

Classifications

    • 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/1607Details of the supervisory signal
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/04Error control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication

Definitions

  • the embodiments of the present application relate to the technical field of communications, and in particular to a method for retransmitting an audio data packet, an audio receiver, a storage medium, and a system.
  • TWS (True Wireless Stereo) headset is a wireless headset based on Bluetooth technology, including a pair of wireless headsets.
  • each earphone includes an audio receiver SNK (audio sink).
  • the audio source SRC (audio source) sends audio data to one of the first audio receiver SNK-1 and the second audio receiver SNK-2, and the other SNK listens to the channel to obtain audio data packets.
  • the SRC or another SNK that has completely received the audio data will retransmit the audio data packet to the SNK that did not correctly decode the audio data packet in the subsequent time slot, so that it does not decode correctly SNK for audio data correctly decodes audio packets.
  • Embodiments of the present application provide a method for retransmitting an audio data packet, an audio receiver, a storage medium, and a system. Described technical scheme is as follows:
  • a method for retransmitting an audio data packet in a first audio receiver is provided, the first audio receiver is configured to communicate with a sound source, and communicate with a second audio receiver communicating, the method comprising:
  • the first audio data packet is respectively acquired by the first audio receiver and the second audio receiver;
  • the second audio data packet including first redundant information (RI, Redundant Information);
  • a method for retransmitting an audio data packet in a second audio receiver is provided, the second audio receiver is configured to communicate with a sound source, and communicate with the first audio receiver communicating, the method comprising:
  • the first audio data packet is respectively acquired by the first audio receiver and the second audio receiver;
  • a method for retransmitting an audio data packet in a first audio receiver is provided, the first audio receiver is configured to communicate with a sound source, and communicate with a second audio receiver communicating, the method comprising:
  • the first audio data packet is respectively acquired by the first audio receiver and the second audio receiver;
  • the decoding of the first audio data packet fails, when the notification indicating that the second audio receiver fails to decode the first audio data packet is not received, send to the second audio receiver A first NACK message, where the first NACK message is used to indicate that the first audio receiver has not successfully received the first audio data packet;
  • the retransmitted first audio data packet is sent by the sound source under a preset condition, and the preset condition is the first audio receiver Neither the first audio data packet nor the second audio receiver can successfully receive the first audio data packet.
  • a method for retransmitting an audio data packet in a second audio receiver is provided, the second audio receiver is configured to communicate with a sound source, and communicate with the first audio receiver communicating, the method comprising:
  • the sound source is configured to confirm that neither the first audio receiver nor the second audio receiver has received the first audio data packet when an ACK message is not received in the second time slot
  • the decoding of the first audio data packet fails and the first NACK message sent by the first audio receiver is received
  • no feedback message is sent to the sound source in the second time slot
  • the feedback message includes The ACK message and a second NACK message
  • the second time slot is the next time slot relative to the first time slot
  • the second NACK message is used to indicate that the first audio receiver and the second time slot Neither of the two audio receivers has received the first audio data packet
  • the sound source is configured to confirm that neither the first audio receiver nor the second audio receiver has received the first audio data packet when receiving a second NACK message in a second time slot
  • a second NACK message is sent to the audio source, and the second time slot is relative to the In a time slot next to the first time slot, the second NACK message is used to indicate that neither the first audio receiver nor the second audio receiver has received the first audio data packet.
  • a method for retransmitting an audio data packet in a first audio receiver is provided, the first audio receiver is configured to communicate with a sound source, and communicate with a second audio receiver communicating, the method comprising:
  • a method for retransmitting an audio data packet in a second audio receiver is provided, the second audio receiver is configured to communicate with a sound source, and communicate with the first audio receiver communicating, the method comprising:
  • a second NACK message is sent to the sound source, and the loss notification is used to indicate that the first audio
  • the receiver completely loses the first audio data packet, and the second NACK message is used to indicate that neither the first audio receiver nor the second audio receiver has received the first audio data packet, so that The audio source retransmits the first audio data packet to the first audio receiver; or;
  • the decoding of the first audio data packet is successful and the loss notification sent by the first audio receiver is received, an ACK message is sent to the sound source, and the complete audio data packet is sent to the first audio receiver.
  • the first audio data packet, the loss notification is used to indicate that the first audio receiver completely lost the first audio data packet, and the ACK message is used to indicate that the first audio receiver and the second audio The receivers have all received the first audio data packet.
  • a first audio receiver the first audio receiver includes a processor, a memory connected to the processor, and at least one segment stored in the memory program, the processor implements the method for retransmitting the audio data packet in the first audio receiver as provided in any aspect of the present application when executing the at least one segment of the program.
  • a second audio receiver includes a processor, a memory connected to the processor, and at least one segment stored in the memory program, the processor implements the method for retransmitting the audio data packet in the second audio receiver as provided in any aspect of the present application when executing the at least one segment of the program.
  • a computer-readable storage medium is provided, and at least one program is stored in the storage medium, and the at least one program is loaded and executed by a processor to implement any aspect of the present application.
  • Provided is a method for retransmitting audio data packets in a first audio receiver.
  • a computer-readable storage medium is provided, and at least one program is stored in the storage medium, and the at least one program is loaded and executed by a processor to implement any aspect of the present application.
  • Provided is a method for retransmitting audio data packets in a second audio receiver.
  • a computer program product includes computer instructions stored in a computer-readable storage medium.
  • the processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above-mentioned method for retransmitting the audio data packet in the first audio receiver.
  • the computer device is the first audio receiver.
  • a computer program product comprising computer instructions stored in a computer-readable storage medium.
  • the processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above-mentioned method for retransmitting the audio data packet in the second audio receiver.
  • the computer device is the second audio receiver.
  • the system includes a sound source, a method for retransmitting an audio data packet in a first audio receiver as provided in the first aspect, and a method for retransmitting an audio data packet in a second audio receiver as provided in the second aspect. Method for retransmitting audio packets in the receiver.
  • the system includes a sound source, a method for retransmitting an audio data packet in a first audio receiver as provided in the third aspect, and a method for retransmitting an audio data packet in a second audio receiver as provided in the fourth aspect. Method for retransmitting audio packets in the receiver.
  • the system includes a sound source, a method for retransmitting an audio data packet in a first audio receiver as provided in the fifth aspect, and a method for retransmitting an audio data packet in a second audio receiver as provided in the sixth aspect. Method for retransmitting audio packets in the receiver.
  • FIG. 1 is a schematic diagram of an application scenario of a TWS earphone and a sound source SRC provided by an embodiment of the present application;
  • Fig. 2 is a schematic diagram of the composition and structure of a TWS earphone provided based on the embodiment shown in Fig. 1;
  • FIG. 3 is a flowchart of a method for retransmitting an audio data packet in a first audio receiver provided by an exemplary embodiment of the present application;
  • FIG. 4 is a flow chart of a method for retransmitting an audio data packet in a second audio receiver provided by an exemplary embodiment of the present application
  • FIG. 5 is a flow chart of a method for retransmitting audio data packets applied in a wireless audio system provided by an embodiment of the present application
  • FIG. 6 is a schematic diagram of another audio packet retransmission method shown in the embodiment of the present application.
  • Fig. 7 is a schematic diagram of restoring the first audio data packet provided based on the embodiment shown in Fig. 6;
  • FIG. 8 is a schematic diagram of another audio packet retransmission method shown in the embodiment of the present application.
  • FIG. 9 is a schematic diagram of another method for retransmitting an audio data packet shown in an embodiment of the present application.
  • FIG. 10 is a flowchart of a method for retransmitting an audio data packet in a first audio receiver according to an embodiment of the present application
  • FIG. 11 is a flowchart of a method for retransmitting an audio data packet in a second audio receiver provided in an embodiment of the present application
  • FIG. 12 is a schematic diagram of a method for retransmitting an audio data packet shown in an embodiment of the present application.
  • FIG. 13 is a schematic diagram of a design scheme of an encoding rule provided by an embodiment of the present application.
  • FIG. 14 is a flowchart of a method for retransmitting an audio data packet in a first audio receiver according to an embodiment of the present application
  • FIG. 15 is a flowchart of a method for retransmitting an audio data packet in a second audio receiver according to an embodiment of the present application
  • FIG. 16 is a schematic diagram of another audio packet retransmission method shown in the embodiment of the present application.
  • FIG. 17 is a schematic diagram of another audio packet retransmission method shown in the embodiment of the present application.
  • Fig. 18 is a structural block diagram of an audio receiver provided by an exemplary embodiment of the present application.
  • FIG. 1 is a schematic diagram of an application scenario of a TWS earphone and a sound source SRC provided by an embodiment of the present application.
  • Fig. 1 is a schematic diagram of an application scenario of a TWS earphone and a sound source SRC provided by an embodiment of the present application.
  • the user's left ear wears the first earphone 110 of the TWS earphone
  • the user's right ear wears the second earphone 120 of the TWS earphone
  • the first earphone 110 and the sound source 130 pass through the first piconet (piconet-1 ) connection
  • the second earphone 120 and the sound source 130 are connected through the second piconet (piconet-2)
  • the first earphone 110 and the second earphone 120 are connected through the third piconet (piconet-3).
  • the sound source 130 may be a mobile terminal, such as a mobile phone, a tablet computer, an MP4 player terminal, an MP5 player terminal, a learning machine, an electronic dictionary, and a smart watch.
  • piconet-1 and piconet-2 may be the same wireless network, that is, have the same network configuration parameters and use the same channel.
  • piconet-1 and piconet-2 use the same channel, in the case of SRC sending audio information to the first earphone 110, the second earphone 120 can obtain the same audio information by detecting the same signal, thereby realizing SRC simultaneously The effect of sending audio information to the first earphone 110 and the second earphone 120 .
  • piconet-3 between the first headset 110 and the second headset 120 may be a network with different configurations from piconet-1.
  • piconet-3 is a private wireless link (Primary Wireless Link).
  • piconet-3 has the ability of two-way communication.
  • FIG. 2 is a schematic structural diagram of a TWS earphone provided based on the embodiment shown in FIG. 1 .
  • a first audio receiver 111 SNK-1
  • a speaker is included in the first earphone 110 .
  • the first audio receiver 111 is coupled with the speaker to form the first earphone 110 .
  • the first earphone 110 may further include components such as a battery, a microphone array, a processor, a proximity light sensor, a pressure sensor, and a bone sensor.
  • the second earphone 120 includes a second audio receiver 121 (SNK-2) and a speaker.
  • SNK-1 and SNK-2 receive the first audio data packet at the same time.
  • SNK-1 fails to receive the first audio data packet, SNK-1 will not discard the first audio information in the received first audio data packet, but save it.
  • SNK-1 sends a first NACK message to SNK-2, where the first NACK message is used to indicate that SNK-1 has not successfully received the first audio data packet.
  • SNK-2 receives the first NACK message from SNK-1, according to the first NACK message, selects the target coding rule for the first audio data packet received by SNK-2 and encodes it to obtain additional first redundant information.
  • SNK-2 encapsulates the first redundant information into a second audio data packet and sends it to SNK-1.
  • SNK-1 decodes the first redundant information and the originally stored first audio data to restore the first audio data packet.
  • SNK-1 can determine the duration of the time slot where the second audio data packet is sent through the information exchanged with SNK-2, so as to ensure that there is enough time to complete the interaction of the second audio data packet.
  • FIG. 3 is a flowchart of a method for retransmitting an audio data packet in a first audio receiver provided by an exemplary embodiment of the present application.
  • the first audio receiver is configured to communicate with the audio source and to communicate with the second audio receiver.
  • the method for retransmitting the audio data packet includes:
  • Step 310 receiving the first audio data packet from the sound source, and the first audio data packet is acquired by the first audio receiver and the second audio receiver respectively.
  • SNK-1 can receive the first audio data packet through the communication link with the audio source.
  • SNK-1 directly receives the first audio data packet through a communication link established with the audio source.
  • SNK-1 receives the first audio data packet by monitoring the communication link between the audio source and SNK-2.
  • SNK-1 can receive the first audio data packet from the sound source within the first time slot.
  • the SRC sends the first audio data packet to SNK-1 or SNK-2.
  • Another SNK obtains the first audio data packet by listening. That is, the SRC may only have a communication link with one of SNK-1 and SNK-2.
  • Another SNK obtains the first audio data packet by detecting the communication link.
  • the communication link may be a piconet.
  • the SRC transmits the first audio data packet to SNK-1 through the communication link in the first time slot.
  • SNK-2 detects the communication link in the first time slot, so as to acquire the first audio data packet.
  • the transmission channel may also be a piconet.
  • the SRC transmits the first audio data packet to SNK-2 through the transmission channel.
  • SNK-1 detects the transmission channel at the beginning of the current time slot, so as to acquire the first audio data packet.
  • Step 320 if the decoding of the first audio data packet fails, save the first data in the received first audio data packet.
  • SNK-1 after receiving the first audio data packet, SNK-1 will decode the first audio data packet. It should be noted that, in the process of decoding the first audio data packet by SNK-1, SNK-1 may check the first audio data packet through a check code, so as to verify whether the first audio data packet is completely and correctly received.
  • the check code can be either a CRC (Cyclic Redundancy Check, Cyclic Redundancy Check) code, or other check codes with a check function.
  • the first audio data packet When SNK-1 fails to decode the first audio data packet, the first audio data packet will save the first data in the received first audio data packet.
  • the first data may be partly correct data in the first audio data packet, or may be content including partly correct data and partly erroneous data, which is not limited in this embodiment of the present application.
  • Step 330 Send a first NACK message to the second audio receiver, where the first NACK message is used to indicate that the first audio receiver has not successfully received the first audio data packet.
  • SNK-1 can send the first NACK message to SNK-2 in the first time slot.
  • the first NACK message is used to indicate that SNK-1 has not successfully received the first audio data packet.
  • the timing for sending the first NACK message from SNK-1 to SNK-2 is used to indicate that SNK-1 has not successfully received the first audio data packet.
  • SNK-1 sends the first NACK message to SNK-2 immediately after generating the first NACK message.
  • SNK-1 sends the first NACK message to SNK-2 after a specified number of time slices have elapsed after generating the first NACK message.
  • after generating the first NACK message SNK-1 sends the first NACK message to SNK-2 after a random (random) time slice elapses.
  • Step 340 Receive a second audio data packet sent by the second audio receiver, where the second audio data packet includes the first redundant information.
  • SNK-1 can receive the second audio data packet sent by SNK-2.
  • the second audio data packet includes the first redundant information.
  • SNK-1 can continue to detect the communication link between SNK-1 and SNK-2 after sending the first NACK message, when the second audio data packet sent by SNK-2 appears in the communication link After that, the redundant information is received.
  • the first time slot is a time slot where the sound source is in a sending state relative to the second audio receiver
  • the second time slot is a time slot where the sound source is in a receiving state relative to the second audio receiver
  • the first time slot is a time slot where the SRC sends the first audio data packet to the SNK-2 and the SRC is in the Tx state.
  • the second time slot is the time slot where the data of SNK-2 relative to SRC is in the Rx state.
  • Step 350 decoding the first redundant information and the first audio data to restore the first audio data packet.
  • a target encoding rule may be preset in SNK-1 to decode the first redundant information and the first audio data to restore the first audio data packet.
  • a plurality of encoding rules may be preset in SNK-1, and a target encoding rule is selected from the plurality of encoding rules for use in actual use. After the first audio data packet is restored, the first audio receiver can successfully obtain the first audio data packet.
  • SNK-1 can firstly combine the first redundant information and the first audio data to obtain the combined data, and then decode the combined data through the target encoding rule to restore the first An audio data packet.
  • this embodiment provides the application of the method for retransmitting the audio data packet in the first audio receiver SNK-1, which can firstly send the received first audio data packet when SNK-1 fails to decode the first audio data packet
  • the first audio data is saved, and then the second audio data packet is obtained from SNK-2, and the first redundant information in the second audio data packet is decoded together with the first audio data to obtain the complete first audio data package, so that SNK-1 does not need to obtain the complete first audio data packet from SRC, nor does it need to obtain the complete first audio data packet from SNK-2, so SNK-1 only needs to obtain a small amount of data to obtain the complete The first audio data packet. Since this solution restores the first audio data packet by transmitting the first redundant information, thereby reducing the amount of retransmitted data, and reducing SNK-1’s acquisition of the first audio data after the first acquisition of the first audio data fails. delay.
  • the first NACK message includes reception level information of the first audio data packet, so that the second audio receiver determines the encoding rule based on the reception level information, and the second audio receiver uses the encoding rule to encode the first audio data packet to obtain First redundant information.
  • the first NACK message includes correctness information of the first audio data packet, and the correctness information is used to indicate the probability that the first audio data packet is received correctly, so that the second audio receiver determines the encoding rule based on the correctness information,
  • the second audio receiver encodes the first audio data packet using an encoding rule to obtain first redundant information.
  • the correctness information includes a signal-to-noise ratio (SNR) and/or a historical bit error rate (BER) of a channel where the first audio data packet is located.
  • SNR signal-to-noise ratio
  • BER historical bit error rate
  • receiving the first audio data packet from the audio source includes:
  • Sending a first NACK message to a second audio receiver comprising:
  • Receiving the second audio data packet sent by the second audio receiver including:
  • the second time slot In the second time slot, a second audio data packet sent by the second audio receiver is received, and the second time slot is a next time slot relative to the first time slot.
  • the second audio data packet further includes indication information, and the indication information is used to indicate the duration of the second time slot, so that the second time slot is suitable for exchanging the first NACK between the first audio receiver and the second audio receiver message and a second audio data packet.
  • sending the first NACK message to the second audio receiver includes:
  • a first NACK message is sent to a second audio receiver at a first sending moment.
  • the method also includes:
  • a second reception failure notification is sent to the second audio receiver.
  • the method further includes: receiving a third audio data packet sent by the second audio receiver, the third audio data packet includes second redundant information, and the data amount of the second redundant information is greater than the data of the first redundant information amount; and
  • the second redundant information and the first audio data are decoded to restore the first audio data packet.
  • sending a second reception failure notification to the second audio receiver includes:
  • the second audio data packet further includes an ACK message, and the ACK message is used to indicate to the sound source that both the first audio receiver and the second audio receiver have successfully received the first audio data packet.
  • the first redundant information further includes at least a part of original data in the first audio data packet.
  • decoding the first redundant information and the first audio data to restore the first audio data packet includes:
  • a corresponding decoding rule is determined based on the encoding rule, and the first redundant information and the first audio data are decoded by the decoding rule to restore the first audio data packet.
  • the method also includes:
  • the first audio receiver and the second audio receiver are preconfigured to share encoding rules.
  • this application also provides a method for retransmitting audio data packets in SNK-2, as compared to the solution implemented on the SNK-1 side, please refer to the following embodiment .
  • FIG. 4 is a flowchart of a method for retransmitting an audio data packet in a second audio receiver provided by an exemplary embodiment of the present application.
  • the second audio receiver is configured to communicate with the audio source and to communicate with the first audio receiver.
  • the method for retransmitting the audio data packet includes:
  • Step 410 receiving the first audio data packet from the sound source, and the first audio data packet is acquired by the first audio receiver and the second audio receiver respectively.
  • SNK-2 is able to receive the first audio data packet from SRC.
  • the time slot in which SNK-2 receives the first audio data packet is the same time slot as the time slot in which SNK-1 receives the first audio data packet.
  • Step 420 Receive a first NACK message from the first audio receiver, where the first NACK message is used to indicate that the first audio receiver has not successfully received the first audio data packet.
  • SNK-2 can receive the first NACK message from SNK-1.
  • the function of the first NACK message is to indicate that SNK-1 has not successfully received the first audio data packet.
  • the first NACK message may be represented by one data bit.
  • the data bit when the data bit is 1, it indicates that SNK-1 has not successfully received the first audio data packet.
  • the data bit when the data bit is 0, it indicates that SNK-1 has not successfully received the first audio data packet.
  • Step 430 determine an encoding rule based on the first NACK message.
  • multiple encoding rules may be pre-stored in SNK-2.
  • SNK-2 can determine an encoding rule based on the first NACK message from among multiple encoding rules. It should be noted that different first NACK messages can determine different encoding rules.
  • Step 440 Encode the first audio data packet using an encoding rule to obtain first redundant information.
  • SNK-2 can use the encoding rule to encode the first audio data packet after determining that the encoding rule is encoded.
  • the data volume of the first audio data packet is 50 bytes, and after encoding according to a coding rule, the first redundant information with a size of 10 bytes is obtained.
  • the data volume of the first redundant information in this application is smaller than that of the first audio data packet, so as to realize the fast restoration of the first audio data packet by SNK-1.
  • the first redundant information may include at least a part of original data.
  • the original data is the original data in the first audio data packet.
  • the first redundant information may not include original data, but only include new data encoded according to encoding rules.
  • Step 450 sending the second audio data packet to the first audio receiver, where the second audio data packet includes the first redundant information.
  • SNK-2 is generating the first redundant information, can place the first redundant information in the second audio data packet, and send the second audio data packet to SNK-1, so that SNK-1 Restoring the first audio data packet based on the first redundant information and the saved first audio data.
  • the method for retransmitting audio data packets in SNK-2 can enable SNK-2 to know through the first NACK message sent by SNK-1 when it successfully receives the first audio data packet SNK-1 did not successfully receive the first audio data packet.
  • SNK-2 determines the corresponding encoding rule according to the first NACK message, and then uses the encoding rule to encode the first audio data packet to obtain the first redundant information, and after obtaining the first redundant information, send the second audio data packet to SNK-1.
  • SNK-2 can obtain the first NACK message sent by SNK-1 when SNK-1 does not receive the first audio data packet correctly, and then determine the corresponding encoding rule, under the action of the encoding rule, according to the first audio
  • the data packet obtains the first redundant information, and sends the second audio data packet containing the first redundant information to SNK-1, so that SNK-1 can , so as to obtain the first audio data packet.
  • the second audio data packet further includes an ACK message, and the ACK message is used to indicate to the sound source that both the first audio receiver and the second audio receiver have successfully received the first audio data packet.
  • the method further includes: sending an ACK message to the audio source, where the ACK message is used to indicate to the audio source that both the first audio receiver and the second audio receiver have successfully received the first audio data packet.
  • the first NACK message includes reception degree information of the first audio data packet
  • receiving the first NACK message from the first audio receiver includes:
  • Determining an encoding rule based on the first NACK message including:
  • an encoding rule is determined.
  • the first NACK message includes correctness information of the first audio data packet
  • receiving the first NACK message from the first audio receiver includes:
  • the correctness information being used to indicate the probability that the first audio data packet is correctly received
  • Determining an encoding rule based on the first NACK message including:
  • an encoding rule is determined.
  • receiving the first audio data packet from the audio source includes:
  • Send the second audio data packet to the first audio receiver including:
  • a second audio data packet is sent to the first audio receiver in a second time slot, the second time slot being a next time slot relative to the first time slot.
  • the second audio data packet further includes indication information, and the indication information is used to indicate the duration of the second time slot, so that the second time slot is suitable for exchanging the first NACK between the first audio receiver and the second audio receiver message and a second audio data packet.
  • the method also includes:
  • the method further includes: sending a third audio data packet to the first audio receiver, the third audio data packet includes second redundant information, and the data amount of the second redundant information is greater than the data amount of the first redundant information , so that the first audio receiver decodes the second redundant information and the first audio data to restore the first audio data packet.
  • the first redundant information further includes at least a part of original data in the first audio data packet.
  • SNK-1 can also use another method to restore the first audio data packet by retransmitting the first redundant information through SNK-2 after failing to obtain the first audio data packet for the first time,
  • the introduction is as follows.
  • FIG. 5 is a flowchart of a method for retransmitting audio data packets applied in a wireless audio system provided by an embodiment of the present application.
  • the method for retransmitting the audio data packet is completed by the cooperation of the sound source (SRC), the first audio receiver (SNK-1) and the second audio receiver (SNK-2) in the wireless audio system.
  • the method for retransmitting audio data packets includes the following steps.
  • Step 501 within a first time slot, the sound source sends a first audio data packet.
  • SNK-1 and SNK-2 can obtain the first audio data packet respectively in the first time slot.
  • SNK-1 receives the first audio data packet from SRC in the first time slot
  • SNK-2 listens to the first audio data packet sent by SRC to SNK-1 in the first time slot, so that The first audio data packet can also be obtained within the first time slot.
  • SNK-2 receives the first audio data packet from the SRC in the first time slot, and SNK-1 listens to the first audio data packet sent by the SRC to SNK-2 in the first time slot, Therefore, the first audio data packet can also be obtained in the first time slot.
  • Step 502 if the decoding of the first audio data packet fails, the first audio receiver saves the first audio data in the received first audio data packet.
  • SNK-1 On the SNK-1 side, it may or may not succeed in decoding the first audio data packet. In the case that SNK-1 fails to decode the first audio data packet, SNK-1 saves the received data. Optionally, SNK-1 can store the data in the internal memory as temporary data, or store the data in an external memory chip as persistent data.
  • Step 503 within the first time slot, the first audio receiver sends a first NACK message to the second audio receiver.
  • the first NACK message is used to indicate that the first audio receiver has not successfully received the first audio data packet.
  • SNK-1 is designed to send the first NACK message to SNK-2, so that SNK-2 can know that SNK-1 has not successfully received the first audio data packet.
  • SNK-1 may determine the first sending moment according to a random backoff mechanism or a fixed time slice, and send the first NACK message to SNK-2 at the first sending moment.
  • the first sending moment belongs to the first time slot.
  • the random backoff mechanism is that SNK-1 generates a random number when it needs to send the first NACK message, and determines the time after the random number of time slices as the first sending time.
  • the method of fixing time slices is that when SNK-1 needs to send the first NACK message, it determines the time after a fixed number of time slices as the first sending time.
  • the first NACK message may include various information.
  • the first NACK message includes reception degree information of the first audio data packet.
  • the reception level information can be used by SNK-2 to determine the encoding rule, so that SNK-2 encodes the first audio data packet according to the encoding rule to obtain the first redundant information.
  • the first NACK message includes correctness information of the first audio data packet.
  • SNK-2 receives correctness information from SNK-1, the correctness information is used to indicate the probability that the first audio data packet is received correctly; SNK-2 determines the encoding rule based on the correctness information.
  • the correctness information can be used by SNK-2 to determine the encoding rule, so that SNK-2 encodes the first audio data packet according to the encoding rule to obtain the first redundant information.
  • the correctness information may include the signal-to-noise ratio (SNR) of the channel where the first audio data packet is located.
  • the correctness information may also include a historical bit error rate (Bit Error Rate, BER) of the channel where the first audio data packet is located.
  • the correctness information may also include the signal-to-noise ratio (SNR) and the historical bit error rate (BER) of the channel where the first audio data packet is located.
  • SNK-2 receives the first audio data packet from the SRC.
  • SNK-2 receives the first NACK message from SNK-1 in the first time slot, and determines an encoding rule based on the first NACK message.
  • SNK-2 may determine a corresponding fixed encoding rule according to the content included in the first NACK message.
  • Step 504 the second audio receiver encodes the first audio data packet using an encoding rule to obtain first redundant information.
  • the first NACK message includes reception degree information of the first audio data packet.
  • SNK-2 receives reception degree information from SNK-1, and determines an encoding rule based on the reception degree information.
  • the receiving degree is used to measure the effectiveness of the available information received from the first data.
  • the coding rules may be Hamming codes.
  • the reception level information is used to indicate the percentage of the data volume of the first audio data to the total data volume of the first audio data packet.
  • the reception degree information may be a value between 0 and 1, such as 20%, 30% or 60%, and the embodiment of the present application does not limit the specific value.
  • reception degree information may correspond to different encoding rules.
  • Table 1 for the correspondence between reception level information and encoding rules.
  • SNK-2 can first determine the interval in which the reception level information is located, and then determine the encoding rules corresponding to the interval. For example, if the reception degree information is 0.5, SNK-2 determines that the interval of the reception degree information is (0.4,0.6]. Then, SNK-2 determines that the coding rule corresponding to (0.4,0.6] is coding rule C.
  • SNK-2 uses The data volume of the first redundant information obtained by encoding the first audio data packet with the coding rule corresponding to the first reception level information is smaller than the first redundant information obtained by encoding the first audio data packet with the coding rule corresponding to the second reception level information by SNK-2. Data volume of redundant information.
  • the first NACK message includes correctness information of the first audio data packet.
  • the correctness information is used to indicate the probability that the first audio data packet is received correctly.
  • the correctness information may be a value between 0 and 1 such as 30%, 40% or 60%.
  • the implementation of the present application Example does not limit its specific numerical value.
  • Step 505 within the second time slot, the second audio receiver sends the second audio data packet to the first audio receiver.
  • SNK-2 sends the second audio data packet to SNK-1 in the second time slot.
  • the second time slot is the next time slot relative to the first time slot.
  • SNK-1 receives the second audio data packet sent by SNK-2 in the second time slot.
  • the second time slot is the next time slot relative to the first time slot.
  • the second audio data packet may also include an ACK message.
  • the SRC can obtain the second audio data packet by monitoring, so as to obtain the ACK message.
  • the ACK message is used to indicate to the sound source that both the first audio receiver and the second audio receiver have successfully received the first audio data packet.
  • the ACK message and the first redundant information in the second audio data packet may belong to two data packets.
  • the second audio data packet containing the first redundant information is sent by SNK-2 to SNK-1.
  • the packet containing the ACK message is sent by SNK-2 to SRC. That is, SNK-2 sends an ACK message to SRC.
  • the ACK message is used to indicate to the audio source that both the first audio receiver and the second audio receiver have successfully received the first audio data packet.
  • the second audio data packet further includes indication information.
  • the indication information is used to indicate the duration of the second time slot, so that the second time slot is suitable for exchanging the first NACK message and the second audio data packet between the first audio receiver and the second audio receiver.
  • Step 506 Determine the corresponding decoding rule based on the encoding rule, and decode the first redundant information and the first audio data according to the decoding rule, so as to restore the first audio data packet.
  • SNK-1 can determine the corresponding decoding rule based on the encoding rule. It should be noted that encoding rules and decoding rules appear in pairs during design. For example, five sets of encoding rules are stored in SNK-2, and corresponding five sets of encoding rules can be stored in SNK-1.
  • encoding rules and decoding rules are designed as a whole set of rules.
  • SNK-1 and SNK-2 are designed to share encoding rules. If there are n sets of encoding rules stored in SNK-1, then the n sets of encoding rules are also stored in SNK-2. Wherein, n is a positive integer greater than or equal to 1.
  • Step 507 in the case of failure to decode the first redundant information and the first audio data, the first audio receiver sends a second reception failure notification to the second audio receiver.
  • the first redundant information is data with a small amount of data obtained after encoding according to the first audio data packet. Therefore, when SNK-1 decodes the first redundant information and the first audio data, there is a certain probability that the decoding is successful, and there is also a certain probability that the decoding fails.
  • SNK-1 fails to decode, SNK-1 will send a second reception failure notification to SNK-2. Wherein, the second reception failure notification is used to indicate that SNK-1 fails to decode the first redundant information and the first audio data.
  • SNK-2 receives the second reception failure notification sent by SNK-1.
  • the second reception failure notification is used to indicate that the first audio receiver fails to decode the first redundant information and the first audio data.
  • SNK-1 determines the second sending moment according to a random backoff mechanism or a fixed time slice. SNK-1 sends a second reception failure notification to the second audio receiver at the second sending moment.
  • the process of determining the second sending moment according to the random backoff mechanism or the fixed time slice may refer to the execution process of step 503, and details are not repeated here.
  • Step 508 the second audio receiver sends a third audio data packet to the first audio receiver, where the third audio data packet includes second redundant information.
  • the data amount of the second redundant information is greater than the data amount of the first redundant information, so that the first audio receiver decodes the second redundant information and the first audio data to restore the first audio data packet.
  • SNK-2 since the first redundant information and the first audio data are insufficient to restore the first audio data packet. Therefore, SNK-2 will send the second redundant information with a larger amount of data again. In this example, SNK-2 encapsulates the second redundant information in the third audio data packet. SNK-2 sends the third audio data packet to SNK-1.
  • SNK-1 receives the third audio data packet sent by SNK-2, the third audio data packet includes second redundant information, and the data amount of the second redundant information is greater than the data amount of the first redundant information.
  • Step 509 the first audio receiver decodes the second redundant information and the first audio data to restore the first audio data packet.
  • the method provided by the embodiment of this application can first save the received first audio data when SNK-1 fails to decode the first audio data packet, and then Obtain the second audio data packet from SNK-2, decode the first redundant information in the second audio data packet together with the first audio data, and then obtain the complete first audio data packet, so that SNK-1 no longer needs to Obtaining the complete first audio data packet from SRC does not need to obtain the complete first audio data packet from SNK-2, so SNK-1 only needs to obtain a small amount of data to obtain the complete first audio data packet.
  • SNK-2 restores the first audio data packet by transmitting the first redundant information, thereby reducing the amount of retransmitted data, and reducing SNK-1’s acquisition of the first audio data after the first acquisition of the first audio data fails. delay.
  • SNK-2 when SNK-2 successfully receives the first audio data packet, it can be known that SNK-1 has not successfully received the first audio data packet through the first NACK message sent by SNK-1, in this case
  • SNK-2 determines the corresponding encoding rule according to the first NACK message, and then uses the encoding rule to encode the first audio data packet to obtain the first redundant information, and after obtaining the first redundant information, send it to SNK-1 the second audio data packet.
  • SNK-2 can obtain the first NACK message sent by SNK-1 when SNK-1 does not receive the first audio data packet correctly, and then determine the corresponding encoding rule, under the action of the encoding rule, according to the first audio
  • the data packet obtains the first redundant information, and sends the second audio data packet containing the first redundant information to SNK-1, so that SNK-1 can , so as to obtain the first audio data packet.
  • the embodiments of the present application may also use various cases to illustrate the implementation scenarios of the present application.
  • this application provides the implementation cases shown in Fig. 6, Fig. 8 and Fig. 9 below.
  • FIG. 6 is a schematic diagram of another method for retransmitting an audio information packet according to an embodiment of the present application.
  • the retransmission method is divided into 7 processing stages.
  • stage 610 in time slot N, sound source SRC enters Tx state after time slot N starts, simultaneously sends the first audio data packet to SNK-2 and SNK-1 (the first audio data packet can be represented by Data 1) .
  • the sound source SRC enters the Tx state (transmitting state) in the time slot N, and SNK-2 enters the Rx state (receiving state) and successfully receives the first audio data packet.
  • SNK-1 also enters the Rx state but fails to receive and decode the first audio packet,
  • stage 620 when the sound source SRC is in the Tx state, SNK-1 is in the Rx state, but fails to decode the first audio data packet during the receiving process. After SNK-1 exits the Tx state, it saves the first audio data in the received first audio data packet. Subsequently, SNK-1 will enter the Tx state.
  • stage 630 SNK-1 is in the Tx state, trying to send a retransmission request to SNK-2.
  • stage 640 corresponding to the time period when SNK-1 is in Tx state and SNK-2 is in Rx state, a first NACK message is received from SNK-1.
  • SNK-2 knows that SNK-1 fails to decode the first audio data packet.
  • SNK-2 will determine the encoding rule according to the degree of reception and/or correctness information in the retransmission request carried in the first NACK message, and then encode the first audio data packet based on the encoding rule to obtain the first redundant information RI (Redundant Information).
  • RI Redundant Information
  • SNK-2 enters the Tx state to transmit a second audio data packet.
  • SNK-2 packs the ACK message sent to the sound source SRC and the first redundant information sent to SNK-1 into a second audio data packet, and sends it to the sound source SRC.
  • stage 660 when SNK-2 is in Tx state, SNK-1 is in Rx state and obtains the second audio data packet by listening to the communication link between SNK-2 and SRC.
  • SNK-1 After SNK-1 obtains the first redundancy information RI from the second audio data packet. SNK-1 determines decoding rules based on encoding rules. SNK-1 decodes the first redundant information RI and the stored first audio data based on the decoding rule, so as to restore the first audio data packet. In this example, SNK-1 successfully recovered the first audio data packet in stage 660 .
  • SNK-1 connects the process of decoding the first redundant information RI and the first audio data based on the decoding rule.
  • FIG. 7 is a schematic diagram of restoring the first audio data packet provided based on the embodiment shown in FIG. 6 .
  • SNK-1 decodes the first audio data and the first redundant information RI based on the decoding rule to obtain the data packet to be confirmed.
  • SNK-1 can verify the data packet to be confirmed, and determine the data packet to be confirmed as the first audio data packet after the verification is passed, and confirm that the process successfully restores the first audio data packet.
  • parameter 1 in FIG. 7 is the same parameter used when encoding the first audio data packet by the encoding method corresponding to the decoding method.
  • the sound source SRC is in Rx state while SNK-2 is in Tx state.
  • the sound source SRC receives the second audio data packet, and obtains ACK information from the second audio data packet.
  • the sound source SRC knows that both SNK-2 and SNK-1 have successfully received the first audio data packet according to the ACK information, thus ending the transmission process of the first audio data packet, and will not retransmit the first audio data packet.
  • FIG. 8 is a schematic diagram of another method for retransmitting an audio information packet according to an embodiment of the present application.
  • the retransmission method is divided into 10 processing stages.
  • SRC enters Tx state after time slot N begins, and sends the first audio data packet (Data 1) to SNK-2 and SNK-1 after entering Tx state.
  • SNK-2 enters the Rx state and successfully receives the first audio data packet.
  • stage 802 SNK-1 enters Rx state during the period when SRC enters Tx state. However, SNK-1 does not successfully decode the first audio data packet, but saves the first audio data in the successfully received first audio data packet.
  • SNK-1 enters the Tx state and sends the first NACK message to SNK-2.
  • SNK-2 is in Rx state and receives the first NACK message corresponding to the period of time that SNK-1 is in Tx state in stage 803.
  • SNK-2 determines the encoding rule according to the receiving degree in the first NACK message, and then calculates the first redundant information RI based on the encoding rule and the receiving degree.
  • SNK-2 directly determines the coding rule based on the degree of reception, and then calculates the first redundant information RI based on the coding rule and the degree of reception.
  • SNK-2 enters the Tx state and sends a second audio data packet to the SRC in time slot N+1.
  • the second audio data packet includes the first redundant information and the ACK message.
  • the second data may also include indication information, where the indication information is used to set the duration of the time slot where the second audio data packet is sent.
  • the time slot is the N+1th time slot. If the first time slot is the Nth time slot, then the second time slot is the N+1th time slot.
  • SNK-1 receives and acquires the first redundant information RI_1 in the second audio data packet sent by SNK-2, and decodes the first redundant information RI_1 and the saved first audio data.
  • stage 807 corresponding to the period in stage 803 when SNK-2 is in Tx state, the SRC is in Rx state.
  • the SRC receives the second audio data packet in the Rx state, obtains the ACK message from the second audio data packet, and learns that both SNK-1 and SNK-2 have received the information of the first audio data packet based on the ACK message, so as not to Retransmit the first audio data packet to SNK-1 or SNK-2.
  • stage 808 because SNK-1 still cannot restore the first audio data packet based on the first redundancy information RI_1. Therefore, SNK-1 enters the Tx state again and sends a second reception failure notification to SNK-2 within the remaining time of time slot N+1.
  • SNK-2 enters the Rx state. And SNK-2 receives the second reception failure notification sent by SNK-1.
  • SNK-2 recalculates second redundancy information RI_2 based on the second reception failure notification.
  • SNK-2 enters the Tx state during the remaining time of time slot N+1, and sends the second redundancy information RI_2 to SNK-1.
  • stage 810 corresponding to the time period when SNK-2 is in Tx state in stage 809, SNK-1 enters Rx state and receives the second redundancy information RI_2 sent by SNK-2.
  • SNK-1 decodes the second redundant information RI_2 and the stored first audio data.
  • SNK-1 decodes the second redundant information RI_2, the first redundant information RI_1 and the first audio data.
  • SNK-1 fails to restore the first audio data packet after obtaining redundant information from SNK-2 twice, then SNK-1 can directly request SNK-2 to retransmit the first audio data Bag.
  • SNK-1 and SNK-2 can also be designed to perform three, four or multiple interactive processes of obtaining redundant information, the number of times can be Q times, and Q is a positive integer greater than 1 .
  • SNK-1 will request SNK-2 to send the complete first audio data packet.
  • FIG. 9 is a schematic diagram of another method for retransmitting an audio data packet according to an embodiment of the present application.
  • the processing is divided into 10 processing stages.
  • the SRC enters the Tx state after the time slot N starts, and simultaneously sends the first audio data packet (Data1) to SNK-2 and SNK-1.
  • time slot N in the time slot N is set according to actual needs.
  • time slot N may be the first time slot.
  • stage 902 SNK-1 enters the Rx state, but SNK-1 does not successfully receive the first audio data packet.
  • SNK-1 enters the Rx state during the period when the SRC is in the Tx state in stage 901 . But before the Rx state, SNK-1 does not successfully decode the first audio data packet.
  • SNK-1 After exiting the Rx state, SNK-1 enters the Tx state and sends the first NACK message to SNK-2.
  • SNK-2 enters the Rx state, and SNK-2 calculates the first redundancy information according to the first NACK message of SNK-1.
  • SNK-2 enters the Rx state in stage 904.
  • SNK-2 After the end phase 904, SNK-2 enters the Tx state in time slot N+1 and sends an ACK message to the SRC.
  • stage 905 the SRC is in the Rx state, and the SRC receives the ACK message sent by SNK-2.
  • the SRC will not retransmit the first audio data packet to SNK-1 and SNK-2.
  • SNK-2 sends the first redundant information to SNK-1 after sending the ACK.
  • SNK-1 is in the Rx state, receives and parses the first redundant information of SNK-2, and decodes the first redundant information and the first audio data.
  • SNK-1 still cannot restore the first audio data packet using the first redundant information.
  • SNK-1 sends a second reception failure notification to SNK-2.
  • SNK-2 enters the Rx state and obtains the second reception failure notification.
  • SNK-2 recalculates the second redundancy information according to the second reception failure information.
  • SNK-2 enters the Tx state, and sends the second redundant information to SNK-1 in the remaining time of time slot N+1.
  • SNK-1 receives the second redundant information sent by SNK-2, either independently decodes the second redundant information and the first audio data, or decodes the second redundant information, the first redundant The information and the first audio data are decoded, which is not limited in this application.
  • SNK-1 fails to restore the first audio data packet after obtaining redundant information from SNK-2 twice, then SNK-1 can directly request SNK-2 to retransmit the first audio data Bag.
  • SNK-1 and SNK-2 can also be designed to perform three, four or multiple interactive processes of obtaining redundant information, the number of times can be Q times, and Q is a positive integer greater than 1 .
  • SNK-1 will request SNK-2 to send the complete first audio data packet.
  • the present application provides a method for retransmitting the audio data packet. Please refer to the following Example.
  • FIG. 10 is a flowchart of a method for retransmitting an audio data packet in a first audio receiver according to an embodiment of the present application.
  • the first audio receiver is configured to communicate with the sound source and communicate with the second audio receiver.
  • the method for retransmitting the audio data packet includes:
  • Step 1010 receiving the first audio data packet from the sound source, and the first audio data packet is acquired by the first audio receiver and the second audio receiver respectively.
  • SNK-1 has received the first audio data packet from SRC. Wherein, the first audio data packet is also acquired by SNK-2.
  • Step 1020 in the case that the decoding of the first audio data packet fails, when the notification indicating that the second audio receiver fails to decode the first audio data packet is not received, send the first NACK message to the second audio receiver, The first NACK message is used to indicate that the first audio receiver has not successfully received the first audio data packet.
  • SNK-1 may also receive a notification indicating that SNK-2 fails to decode. If the SNK-1 receives the notification, the SNK-1 will notify the SRC that neither of the two devices successfully decodes the first audio data packet. In this example, neither SNK-1 nor SNK-2 successfully decodes the first audio data packet, so they need to compete to send the first NACK message to each other. In this application, SNK-1 sends the first NACK message to SNK-2 as an example for illustration.
  • the first NACK message is used to indicate that SNK-1 has not successfully received the first audio data packet.
  • Step 1030 receiving the first audio data packet retransmitted by the sound source, the retransmitted first audio data packet is sent by the sound source under a preset condition, and the preset condition is that neither the first audio receiver nor the second audio receiver can The first audio data packet is successfully received.
  • SNK-1 receives the first audio data packet retransmitted by the SRC.
  • the SRC can retransmit the first audio data packet to SNK-1 under preset conditions. It should be noted that the preset condition is that both the first audio receiver and the second audio receiver fail to receive the first audio data packet successfully.
  • the SRC may know that it is already in a preset condition through a message sent by SNK-2.
  • the catalyst that triggers SNK-2 to notify SRC that it is already in the preset condition is the first NACK message sent by SNK-1.
  • the application provides a method for retransmitting audio data packets in the first audio receiver, which can make SNK -1 and SNK-2 compete with each other to feed back information to SRC.
  • SNK-1 sends the first NACK message to SNK-2 first, so that SNK-2 notifies SRC that it is in the preset condition.
  • SRC will retransmit the first audio data packet to SNK-1 and SNK-2 respectively, has realized the effect of retransmitting the first audio data packet, has avoided SNK-1 and SNK-2 when both have not successfully decoded
  • the retransmitted first audio data packet cannot be obtained in time.
  • FIG. 11 is a flowchart of a method for retransmitting an audio data packet in a second audio receiver according to an embodiment of the present application.
  • the scheme performed by SNK-2 shown in FIG. 11 is a scheme on the other side of the scheme performed by SNK-1 shown in FIG. 10 .
  • SNK-2 is configured to communicate with the audio source, and SNK-2 communicates with SNK-1, and the method for retransmitting the audio data packet includes:
  • Step 1110 receiving the first audio data packet from the sound source in the first time slot, and the first audio data packet is acquired by the first audio receiver and the second audio receiver respectively.
  • SNK-2 receives the first audio data packet from the SRC in the first time slot.
  • the first audio data packet can be acquired by the first audio receiver and the second audio receiver at the same time.
  • Step 1120 decode the first audio data packet.
  • SNK-2 will also decode the first audio data packet.
  • SNK-2 may perform step 1130 or step 1140 after completing step 1120 .
  • Step 1130 when the sound source is configured to confirm that the first audio receiver and the second audio receiver have not received the first audio data packet when the ACK message is not received in the second time slot, in the first audio data
  • packet decoding fails and the first NACK message sent by the first audio receiver is received, no feedback message is sent to the audio source in the second time slot.
  • the feedback message includes an ACK message and a second NACK message.
  • the second time slot is relative to In the next time slot of the first time slot, the second NACK message is used to indicate that neither the first audio receiver nor the second audio receiver has received the first audio data packet.
  • the SRC can be preset with a preset condition for retransmitting the first audio data packet.
  • the preset condition is limited by the second time slot, and when no ACK message is received in the second time slot, it is confirmed that neither SNK-1 nor SNK-2 has successfully decoded the first audio data packet. That is, neither SNK-1 nor SNK-2 has successfully received the first audio data packet.
  • SNK-2 can not send a feedback message to the SRC in the second time slot when it fails to decode the first audio data packet and receives the first NACK message sent by SNK-1.
  • the second time slot is a time slot next to the first time slot.
  • the feedback message includes an ACK message and a second NACK message.
  • the second NACK message is used to indicate that neither SNK-1 nor SNK-2 has successfully received the first audio data packet.
  • SNK-2 will neither send a message to SRC to indicate that both SNK-1 and SNK-2 have successfully received the first audio data packet, nor will it send a message to SRC to indicate that SNK- Neither 1 nor SNK-2 has successfully received the message of the first audio data packet.
  • Step 1140 confirming that the first audio receiver and the second audio receiver have not received the first audio data packet when the sound source is set to receive the second NACK message in the second time slot, in the first audio
  • a second NACK message is sent to the audio source, the second time slot is the next time slot relative to the first time slot, and the second NACK message is used for It indicates that neither the first audio receiver nor the second audio receiver has received the first audio data packet.
  • the SRC can be preset with a preset condition for retransmitting the first audio data packet.
  • the preset condition is limited by the second time slot, and when the second NACK message is received in the second time slot, it is confirmed that neither SNK-1 nor SNK-2 has received the first audio data packet.
  • SNK-2 can send a second NACK message to the SRC in the second time slot when it fails to decode the first audio data packet and receives the first NACK message sent by SNK-1.
  • the second time slot is the next time slot relative to the first time slot.
  • the second NACK message is used to indicate that neither SNK-1 nor SNK-2 has received the first audio data packet.
  • the method for retransmitting an audio data packet in the second audio receiver can make SNK-2 receive the first audio data packet from the SRC in the first time slot and decode the first audio data packet. audio packets.
  • SNK-2 can decode the first audio data packet
  • no feedback message is sent to the SRC in the second time slot, so that the SRC knows that both SNK-1 and SNK-2 have not successfully received the first audio data packet, thereby facilitating SRC retransmits the first audio data packet to SNK-2 and/or SNK-1, realizing the effect of retransmitting the first audio data packet, avoiding the scenario where neither SNK-1 nor SNK-2 are successfully decoded , the problem that the retransmitted first audio data packet cannot be obtained in time.
  • the present application can also enable SNK-2 to receive the first audio data packet from the SRC in the first time slot, and decode the first audio data packet.
  • SNK-2 can fail to decode the first audio data packet and receive the first NACK message sent by SNK-1, in the second The time slot sends a second NACK message to the SRC, so that the SRC knows that neither SNK-1 nor SNK-2 has successfully received the first audio data packet, so that the SRC retransmits the first audio data to SNK-2 and/or SNK-1 packet, which achieves the effect of retransmitting the first audio data packet, and avoids the problem that SNK-1 and SNK-2 cannot obtain the retransmitted first audio data packet in time in the scenario where neither of them is successfully decoded.
  • FIG. 12 is a schematic diagram of a method for retransmitting an audio data packet according to an embodiment of the present application.
  • the retransmission process of the first audio data packet is divided into 6 processing stages.
  • the sound source SRC enters the Tx state in time slot N.
  • SRC sends the first audio data packet to SNK-2 and SNK-1 after entering the Tx state (the first audio data packet can also be represented by Data 1).
  • time slot N represents the Nth time slot among the N time slots, and N is a positive integer.
  • N can select a suitable value according to needs.
  • the sound source SRC can enter the Tx state immediately after entering the time slot N.
  • the sound source SRC can send the first audio data packet to SNK-2.
  • SNK-1 can obtain the first audio data packet by monitoring the communication link through which the sound source SRC sends information to SNK-2.
  • the sound source SRC sends the first audio data packet to SNK-1.
  • SNK-2 can obtain the first audio data packet by monitoring the communication link through which the sound source SRC sends information to SNK-1.
  • stage 1220 when the sound source SRC is in the Tx state, SNK-2 is in the Rx state to receive the first audio data packet. In the case that SNK-2 fails to decode the first audio data packet Data1 successfully, SNK-2 will try to send a retransmission request to SNK-1 after exiting the Rx state.
  • stage 1230 SNK-1 is in the Rx state, and SNK-1 has not successfully decoded the first audio data packet Data1. SNK-1 enters stage 1240 after the receiving process shown in stage 1230 is completed.
  • SNK-1 is in the Tx state, and SNK-1 first sends a first NACK message to SNK-2.
  • SNK-2 is in the Rx state and receives the first NACK message.
  • SNK-2 gives up sending the first NACK message to SNK-1 because it received the first NACK message first.
  • stage 1250 the preset data packet corresponding to stage 1250 is not sent.
  • the timing position of stage 1250 is shown in dashed box in FIG. 12 .
  • SNK-2 has received the first NACK message from SNK-1, and SNK-2 has not received the first audio data packet Data1 from SRC. Therefore, SNK-2 can choose to send the second NACK message to the SRC at time slot N+1, or choose not to send any audio data packet.
  • the SRC is in the Rx state. Therefore, the SRC can know that neither SNK-1 nor SNK-2 has received the first audio data packet, and then retransmits the first audio data packet to SNK-1 and/or SNK-2.
  • FIG. 13 is a schematic diagram of a design scheme of an encoding rule provided by an embodiment of the present application.
  • the present application can preset multiple encoding rules for the first audio data packet.
  • two types of encoding rules are used as an example for introduction.
  • the first audio data packet can be encoded according to the reception level 1 under the encoding rule 1, and the encoded first audio data packet and corresponding redundant information RI_11 are obtained.
  • the first audio data packet can be encoded according to the degree of reception 2, to obtain the encoded first audio data packet and corresponding redundant information RI_12.
  • acceptance level 1 may be 0.4 and acceptance level 2 may be 0.5. It is schematically illustrated that since the reception level 1 is low, the amount of redundant information RI_11 generated by it will be larger than that of the redundant information RI_12.
  • the first audio data packet can be encoded according to the degree of reception 3, to obtain the encoded first audio data packet and the corresponding redundant information RI_21.
  • the first audio data packet can be encoded according to the degree of reception 4, to obtain the encoded first audio data packet and the corresponding redundant information RI_22.
  • acceptance level 3 may be 0.6 and acceptance level 4 may be 0.7. It is schematically illustrated that since the reception level 3 is relatively low, the amount of redundant information RI_21 generated by it will be larger than that of the redundant information RI_22.
  • SNK may select corresponding encoding rules according to the degree of acceptance. For example, in this example, when the degree of reception is within the interval [0.4,0.5], encoding rule 1 is selected as the target encoding method. When the acceptance level is in the [0.6,0.1) interval, choose encoding rule 2 as the target encoding method. It should be noted that, when the receiving degree is in the interval (0, 0.4), SNK will consider that the receiving degree is too low, and there is no need to select a coding rule, but will request the SRC to retransmit the first audio data packet. Or, request another SNK that has successfully received the first audio data packet to retransmit.
  • such a situation may also exist.
  • the data of the first audio data packet received by SNK-1 is too small, but SNK-2 successfully receives and decodes the first audio data packet.
  • SNK-2 if SNK-2 is still required to feed back redundant information to SNK-1, then SNK-1 cannot restore the first audio data packet, instead causing SNK-1 to restore the first audio data packet after multiple interactions. Extended the time for SNK-1 to restore the first audio data packet. Therefore, in order to solve the problem that it may take a long time for SNK-1 to restore the first audio data packet in this scenario.
  • This application provides the following examples.
  • FIG. 14 is a flowchart of a method for retransmitting an audio data packet in a first audio receiver according to an embodiment of the present application.
  • the first audio receiver is configured to communicate with the sound source and communicate with the second audio receiver.
  • the method for retransmitting the audio data packet includes:
  • Step 1410 receiving the first audio data packet from the sound source, wherein the first audio data packet is acquired by the first audio receiver and the second audio receiver respectively.
  • SNK-1 is able to receive the first audio data packet from SRC.
  • the first audio data packet can also be received by SNK-2.
  • Step 1420 in the case that the decoding of the first audio data packet fails and the received first audio data cannot be used to restore the first audio data packet, discard the received first audio data.
  • a data threshold can be set in SNK-1, and the threshold can be either a percentage or a fixed value.
  • SNK-1 determined that the first audio data received by itself could not be used to restore the first audio data packet, and then discarded the received first audio data packet. - audio data.
  • Step 1430 Send a loss notification to the second audio receiver, where the loss notification is used to indicate that the first audio receiver completely loses the first audio data packet.
  • SNK-1 sends a loss notification to SNK-2, and the loss notification is used to indicate that SNK-1 has completely lost the first audio data packet.
  • Step 1440 receive the first audio data packet retransmitted by the second audio receiver.
  • SNK-1 can receive the first audio data packet retransmitted by SNK-2. Wherein, after obtaining the loss notification, SNK-2 will retransmit the first audio data packet to SNK-1 if it has successfully decoded the first audio data packet.
  • the method for retransmitting the audio data packet in the first audio receiver can enable SNK-1 to receive the first audio data packet, and SNK-1 fails to decode the first audio data packet and If the received data cannot be used to restore the first audio data packet together with the redundant information, SNK-1 will discard the received first audio data and inform SNK-2, and then SNK-1 can receive SNK -2 retransmits the first audio data, so that when the received data is too small, the complete first audio data packet can be directly reacquired from SNK-2, without the interactive process of obtaining redundant information.
  • the time delay for SNK-1 to re-acquire the first audio data packet is reduced when the amount of data in the first audio data packet is small when SNK-1 acquires it for the first time.
  • FIG. 15 is a flow chart of a method for retransmitting an audio data packet in a second audio receiver according to an embodiment of the present application.
  • the second audio receiver is configured to communicate with the sound source, and the second audio receiver communicates with the first audio receiver.
  • SNK-2 in this embodiment forms a wireless audio system work with SNK-1 and SRC among Fig. 13.
  • the method includes:
  • Step 1510 receiving the first audio data packet from the sound source, and the first audio data packet is acquired by the first audio receiver and the second audio receiver respectively.
  • SNK-2 will receive the first audio data packet from SRC.
  • the source from which SNK-1 acquires the first audio data packet is also the SRC.
  • SNK-2 may execute step 1520 or step 1530 after completing step 1510 .
  • SNK-2 receives the first audio data packet from the SRC in the first time slot.
  • Step 1520 in the case that the first audio data packet is successfully decoded and the loss notification sent by the first audio receiver is received, a second NACK message is sent to the audio source, and the loss notification is used to indicate that the first audio receiver completely loses the first audio
  • the second NACK message is used to indicate that neither the first audio receiver nor the second audio receiver has received the first audio data packet, so that the audio source retransmits the first audio data packet to the first audio receiver.
  • SNK-2 sends a second NACK message to the SRC in the second time slot.
  • the second time slot is the next time slot relative to the first time slot.
  • Step 1530 in the case that the decoding of the first audio data packet is successful and the loss notification sent by the first audio receiver is received, an ACK message is sent to the audio source, and the complete first audio data packet is sent to the first audio receiver.
  • the notification is used to indicate that the first audio receiver has completely lost the first audio data packet, and the ACK message is used to indicate that both the first audio receiver and the second audio receiver have received the first audio data packet.
  • SNK-2 sends an ACK message to the sound source in the second time slot.
  • the ACK message sent by SNK-2 to the SRC and the complete first audio data packet sent to SNK-1 may be packaged into one data packet. See step (a1) for details.
  • Step (a1) SNK-2 packs the ACK message and the complete first audio data packet into a combined data packet; sends the combined data packet to the sound source and the first audio receiver in the second time slot.
  • SNK-2 can send the combined data packet to the SRC.
  • the SNK-1 can also obtain the combined data packet by monitoring.
  • SNK-2 may send the combined data packet to SNK-1, and the SRC obtains the combined data packet by monitoring.
  • the ACK message sent by SNK-2 to the SRC and the complete first audio data packet sent to SNK-1 may be divided into two independent data packets and sent separately. See step (a2) for details.
  • Step (a2) sending an ACK message to the audio source in the second time slot; and retransmitting the first audio data packet to the first audio receiver in the second time slot.
  • SNK-2 sends an ACK message to SRC in the second time slot. And, SNK-2 retransmits the first audio data packet to SNK-1 in the second time slot.
  • a method for retransmitting audio data packets in the second audio receiver shown in this application can make SNK-2 receive the first audio data packet from SRC first, and SNK-2 decode the first audio data packet data packet, when SNK-2 decodes the first audio data packet successfully and learns that SNK-1 has discarded the first audio data, SNK-2 sends the second NACK message to SRC to inform SRC that it needs to retransmit the first audio data packet, In order for the SRC to retransmit the first audio data packet to SNK-1, the time delay for SNK-1 to reacquire the first audio data packet is reduced.
  • the present application can also make SNK-2 receive the first audio data packet from SRC first, and SNK-2 decode the first audio data packet, when SNK-2 decodes the first audio data packet successfully and learns that SNK-1 discards
  • SNK-2 sends an ACK message to SRC, so that SRC no longer retransmits the first audio data packet, but retransmits the first audio data packet from SNK-2 to SNK-1, reducing SNK -1 Delay for reacquiring the first audio data packet.
  • receiving the first audio data packet from the audio source includes:
  • Send the second NACK message to the audio source including:
  • Send an ACK message to the audio source including:
  • the embodiments of the present application may also use various cases to illustrate the implementation scenarios of the present application.
  • this application provides the implementation cases shown in Fig. 16 and Fig. 17 below.
  • FIG. 16 is a schematic diagram of another method for retransmitting an audio information packet according to an embodiment of the present application.
  • the processing is divided into 5 processing stages.
  • stage 1601 the SRC enters the Tx state after the time slot N starts, and simultaneously sends the first audio data packet (Data1) to SNK-2 and SNK-1.
  • Data1 the first audio data packet
  • stage 1602 SNK-1 does not receive the first audio data packet, and completely discards the first audio data in the first audio data packet. SNK-1 will try to send the loss notification sent to SNK-2 after the receiving process is completed.
  • stage 1603 SNK-1 first sends a loss notification to SNK-2 after stage 1102 ends.
  • SNK-2 receives the loss notification from SNK-1, and no longer calculates the first redundant information.
  • SNK-2 chooses to send a second NACK message to SRC to trigger SRC to retransmit the first audio data packet.
  • FIG. 17 is a schematic diagram of another method for retransmitting an audio information packet according to an embodiment of the present application.
  • the processing is divided into 7 processing stages.
  • the SRC enters the Tx state after the start of time slot N, and simultaneously sends the first audio data packet (Data1) to SNK-2 and SNK-1.
  • SNK-1 does not receive the first audio data packet, and completely discards the first audio data therein. Therefore, SNK-1 will try to send the loss notification to SNK-2 after the receiving process is completed.
  • SNK-1 first sends a loss notification to SNK-2.
  • SNK-2 receives the loss notification sent by SNK-1, and no longer calculates the first redundant information.
  • SNK-2 sends a combined data packet to the SRC, which includes the ACK message sent to the SRC and the complete first audio data packet.
  • the SRC obtains the information that SNK-2 has received the first audio data packet based on the ACK message in the combined data packet, so that the first audio data packet will not be retransmitted.
  • SNK-1 receives and parses the first audio data packet contained in the combined data packet.
  • FIG. 18 is a structural block diagram of an audio receiver provided by an exemplary embodiment of the present application.
  • the audio receiver includes a processor 1820 and a memory 1840, and the memory 1840 stores There is at least one instruction, and the instruction is loaded and executed by the processor 1820 to implement the method for retransmitting an audio data packet as described in each method embodiment of the present application.
  • the audio receiver shown in FIG. 18 can be either the first audio receiver or the second audio receiver.
  • Processor 1820 may include one or more processing cores. Processor 1820 uses various interfaces and lines to connect various parts in the entire audio receiver 1800, by running or executing instructions, programs, code sets or instruction sets stored in memory 1840, and calling data stored in memory 1840, Various functions of the audio receiver 1800 are performed and data is processed.
  • the processor 1820 may adopt at least one of Digital Signal Processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable Logic Array, PLA). implemented in the form of hardware.
  • DSP Digital Signal Processing
  • FPGA Field-Programmable Gate Array
  • PLA Programmable Logic Array
  • the processor 1820 may integrate one or a combination of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), a modem, and the like.
  • CPU Central Processing Unit
  • GPU Graphics Processing Unit
  • the CPU mainly handles the operating system, user interface and application programs, etc.
  • the GPU is used to render and draw the content that needs to be displayed on the display screen
  • the modem is used to handle wireless communication. It can be understood that the foregoing modem may also not be integrated into the processor 1820, but implemented by a single chip.
  • the memory 1840 may include random access memory (Random Access Memory, RAM), and may also include read-only memory (Read-Only Memory, ROM).
  • the memory 1840 includes a non-transitory computer-readable storage medium (non-transitory computer-readable storage medium).
  • the memory 1840 may be used to store instructions, programs, codes, sets of codes or sets of instructions.
  • the memory 1840 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), Instructions and the like for implementing the following method embodiments; the storage data area can store data and the like involved in the following method embodiments.
  • the transceiver component 1860 includes a signal processing unit and an antenna.
  • the transceiving component 1860 may receive the feedback information sent via the target channel, and may also send the feedback information to the audio source, or may also send the feedback information to the first audio receiver.
  • the transceiver component 1860 may also cooperate with the processor 1820 to calculate a signal-to-noise ratio (Signal-to-Noise Ratio, SNR) of the first audio data packet.
  • SNR signal-to-noise ratio
  • the transceiver component 1860 may cooperate with the processor 1820 to calculate the historical bit error rate BER of the channel where the first audio data packet is received.
  • the embodiment of the present application also provides a computer-readable medium, the computer-readable medium stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the first A method for retransmitting audio packets in an audio sink.
  • the embodiment of the present application also provides a computer-readable medium, the computer-readable medium stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the above-mentioned various embodiments in the second A method for retransmitting audio packets in an audio sink.
  • the embodiment of the present application also provides a computer program product, where the computer program product includes computer instructions, and the computer instructions are stored in a computer-readable storage medium.
  • the processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above-mentioned method for retransmitting the audio data packet in the first audio receiver.
  • the computer device is the first audio receiver.
  • the embodiment of the present application also provides a computer program product, where the computer program product includes computer instructions, and the computer instructions are stored in a computer-readable storage medium.
  • the processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device performs the above-mentioned method for retransmitting the audio data packet in the second audio receiver.
  • the computer device is the second audio receiver.
  • the sound source SRC, the first audio receiver SNK-1 and the second audio receiver SNK-2 form a wireless audio system.
  • SNK-1 as shown in FIG. 3 SNK-2 as shown in FIG. 4 and the sound source form a wireless audio system.
  • SNK-2 as shown in Figure 11 and the sound source form another wireless audio system.
  • SNK-1 as shown in Figure 14 SNK-2 as shown in Figure 15 and the sound source form another wireless audio system.
  • the audio information retransmission device when the audio information retransmission device provided in the above-mentioned embodiment executes the method for retransmitting the audio data packet, the division of the above-mentioned functional modules is used as an example for illustration. In practical applications, the above-mentioned functions can be combined as needed The allocation is done by different functional modules, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
  • the device for retransmitting audio information provided by the above embodiment and the embodiment of the method for retransmitting the audio data packet belong to the same idea, and the specific implementation process thereof can be found in the method embodiment, and will not be repeated here.

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Detection And Prevention Of Errors In Transmission (AREA)

Abstract

一种重传音频数据包的方法、音频接收器、存储介质及系统,属于通信技术领域。所述方法在第一音频接收器中重传音频数据包的方法,能够从音源接收第一音频数据包(310),在第一音频数据包解码失败时保存已接收到的数据包中的第一音频数据(320),向第二音频接收器发送第一NACK消息,该消息用于指示第一音频接收器未成功接收到第一音频数据包(330),随后接收第二音频接收器发送的第二音频数据包,该数据包中包括第一冗余信息(340),对第一冗余信息和第一音频数据进行解码,以还原第一音频数据包(350)。本方案通过传送冗余信息来实现对第一数据的纠错,从而降低了重传的数据量,并降低了SNK-1获取正确信息的时延。

Description

重传音频数据包的方法、音频接收器、存储介质及系统
本申请要求于2021年6月29日提交的申请号为202110726264.5、发明名称为“重传音频数据包的方法、音频接收器、存储介质及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及通信技术领域,特别涉及一种重传音频数据包的方法、音频接收器、存储介质及系统。
背景技术
TWS(True Wireless Stereo,真无线立体声)耳机是一种基于蓝牙技术的无线耳机,包括一对无线耳机。其中,每一个耳机都包括一个音频接收器SNK(audio sink)。
相关技术中,音源SRC(audio source)向第一音频接收器SNK-1和第二音频接收器SNK-2中的一个SNK发送音频数据,另一个SNK侦听该信道从而获得音频数据包。当两个SNK中任意一个没有正确解码音频数据包,SRC或者另一个完整接收到音频数据的SNK将在后续的时隙向没有正确解码音频数据包的SNK重传音频数据包,以便没有正确解码音频数据的SNK能正确解码音频数据包。
发明内容
本申请实施例提供了一种重传音频数据包的方法、音频接收器、存储介质及系统。所述技术方案如下:
根据本申请的第一方面内容,提供了一种在第一音频接收器中重传音频数据包的方法,所述第一音频接收器配置为与音源进行通信,并且与第二音频接收器进行通信,所述方法包括:
从所述音源接收第一音频数据包,所述第一音频数据包分别被所述第一音频接收器和所述第二音频接收器获取;
在所述第一音频数据包解码失败的情况下,保存已接收到的所述第一音频数据包中的第一音频数据;
向所述第二音频接收器发送第一NACK消息,所述第一NACK消息用于指示所述第一音频接收器未成功接收到所述第一音频数据包;
接收所述第二音频接收器发送的第二音频数据包,所述第二音频数据包包括第一冗余信息(RI,Redundant Information);以及
对所述第一冗余信息和所述第一音频数据进行解码,以还原所述第一音频数据包。
根据本申请的第二方面内容,提供了一种在第二音频接收器中重传音频数据包的方法,所述第二音频接收器配置为与音源进行通信,并且与第一音频接收器进行通信,所述方法包括:
从所述音源接收第一音频数据包,所述第一音频数据包分别被所述第一音频接收器和所述第二音频接收器获取;
从所述第一音频接收器接收第一NACK消息,所述第一NACK消息用于指示所述第一音频接收器未成功接收到所述第一音频数据包;
基于所述第一NACK消息确定编码规则;
使用所述编码规则编码所述第一音频数据包,以获得第一冗余信息;以及
向所述第一音频接收器发送第二音频数据包,所述第二音频数据包包括第一冗余信息。
根据本申请的第三方面内容,提供了一种在第一音频接收器中重传音频数据包的方法,所述第一音频接收器配置为与音源进行通信,并且与第二音频接收器进行通信,所述方法包括:
从所述音源接收第一音频数据包,所述第一音频数据包分别被所述第一音频接收器和所述第二音频接收器获取;
在所述第一音频数据包解码失败的情况下,在未接收到用于指示所述第二音频接收器解码所述第一音频数据包失败的通知时,向所述第二音频接收器发送第一NACK消息,所述第一NACK消息用于指示所述第一音频接收器未成功接收到所述第一音频数据包;
接收所述音源重传的所述第一音频数据包,所述重传的所述第一音频数据包是所述音源在预设条件下发送的,所述预设条件是第一音频接收器和所述第二音频接收器均未能成功接收所述第一音频数据包。
根据本申请的第四方面内容,提供了一种在第二音频接收器中重传音频数据包的方法,所述第二音频接收器配置为与音源进行通信,并且与第一音频接收器进行通信,所述方法包括:
在第一时隙从所述音源接收第一音频数据包,所述第一音频数据包分别被所述第一音频接收器和所述第二音频接收器获取;
解码所述第一音频数据包;
在所述音源被设置为在第二时隙中未接收到ACK消息时确认所述第一音频接收器和所述第二音频接 收器均没有接收到所述第一音频数据包的情况下,在所述第一音频数据包解码失败且接收到所述第一音频接收器发送的第一NACK消息时,在所述第二时隙中不向所述音源发送反馈消息,所述反馈消息包括所述ACK消息和第二NACK消息,所述第二时隙是相对于所述第一时隙的下一时隙,所述第二NACK消息用于指示所述第一音频接收器和所述第二音频接收器均没有接收到所述第一音频数据包;
或,
在所述音源被设置为在第二时隙中接收到第二NACK消息时确认所述第一音频接收器和所述第二音频接收器均没有接收到所述第一音频数据包的情况下,在所述第一音频数据包解码失败且接收到所述第一音频接收器发送的第一NACK消息时,向所述音源发送第二NACK消息,所述第二时隙是相对于所述第一时隙的下一时隙,所述第二NACK消息用于指示所述第一音频接收器和所述第二音频接收器均没有接收到所述第一音频数据包。
根据本申请的第五方面内容,提供了一种在第一音频接收器中重传音频数据包的方法,所述第一音频接收器配置为与音源进行通信,并且与第二音频接收器进行通信,所述方法包括:
从所述音源接收第一音频数据包,其中所述第一音频数据包分别被所述第一音频接收器和第二音频接收器获取;
在所述第一音频数据包解码失败且已接收到的第一音频数据无法用于还原得到所述第一音频数据包的情况下,丢弃已接收到的所述第一音频数据;
向所述第二音频接收器发送丢失通知,所述丢失通知用于指示所述第一音频接收器完全丢失所述第一音频数据包;
接收所述第二音频接收器重传的所述第一音频数据包。
根据本申请的第六方面内容,提供了一种在第二音频接收器中重传音频数据包的方法,所述第二音频接收器配置为与音源进行通信,并且与第一音频接收器进行通信,所述方法包括:
从所述音源接收第一音频数据包,所述第一音频数据包分别被所述第一音频接收器和第二音频接收器获取;
在所述第一音频数据包解码成功且接收到所述第一音频接收器发送的丢失通知的情况下,向所述音源发送第二NACK消息,所述丢失通知用于指示所述第一音频接收器完全丢失所述第一音频数据包,所述第二NACK消息用于指示所述第一音频接收器和所述第二音频接收器均没有接收到所述第一音频数据包,以便所述音源向所述第一音频接收器重传所述第一音频数据包;或;
在所述第一音频数据包解码成功且接收到所述第一音频接收器发送的丢失通知的情况下,向所述音源发送ACK消息,并向所述第一音频接收器发送完整的所述第一音频数据包,所述丢失通知用于指示所述第一音频接收器完全丢失所述第一音频数据包,所述ACK消息用于指示所述第一音频接收器和所述第二音频接收器均已接收到所述第一音频数据包。
根据本申请的另一方面内容,提供了一种第一音频接收器,所述第一音频接收器包括处理器、和与所述处理器相连的存储器,以及存储在所述存储器上的至少一段程序,所述处理器执行所述至少一段程序时实现如本申请中任意一方面提供的在第一音频接收器中重传音频数据包的方法。
根据本申请的另一方面内容,提供了一种第二音频接收器,所述第二音频接收器包括处理器、和与所述处理器相连的存储器,以及存储在所述存储器上的至少一段程序,所述处理器执行所述至少一段程序时实现如本申请中任意一方面提供的在第二音频接收器中重传音频数据包的方法。
根据本申请的另一方面内容,提供了一种计算机可读存储介质,所述存储介质中存储有至少一段程序,所述至少一段程序由处理器加载并执行以实现如本申请中任意一方面提供的在第一音频接收器中重传音频数据包的方法。
根据本申请的另一方面内容,提供了一种计算机可读存储介质,所述存储介质中存储有至少一段程序,所述至少一段程序由处理器加载并执行以实现如本申请中任意一方面提供的在第二音频接收器中重传音频数据包的方法。
根据本申请的另一个方面内容,提供了一种计算机程序产品,该计算机程序产品包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述在第一音频接收器中重传音频数据包的方法。其中,计算机设备是第一音频接收器。
根据本申请的另一方面内容,提供了一种计算机程序产品,该计算机程序产品包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述在第二音频接收器中重传音频数据包的方法。其中,计算机设备是第二音频接收器。
根据本申请提供的一种无线音频系统,该系统包括音源、如第一方面内容提供的在第一音频接收器中 重传音频数据包的方法、和如第二方面内容提供的在第二音频接收器中重传音频数据包的方法。
根据本申请提供的一种无线音频系统,该系统包括音源、如第三方面内容提供的在第一音频接收器中重传音频数据包的方法、和如第四方面内容提供的在第二音频接收器中重传音频数据包的方法。
根据本申请提供的一种无线音频系统,该系统包括音源、如第五方面内容提供的在第一音频接收器中重传音频数据包的方法、和如第六方面内容提供的在第二音频接收器中重传音频数据包的方法。
附图说明
图1是本申请实施例提供的一种TWS耳机和音源SRC的应用场景示意图;
图2是基于图1所示实施例提供的一种TWS耳机的组成结构示意图;
图3是本申请一个示例性实施例提供的一种在第一音频接收器中重传音频数据包的方法的流程图;
图4是本申请一个示例性实施例提供的一种在第二音频接收器中重传音频数据包的方法的流程图;
图5是本申请实施例提供的一种应用在无线音频系统中的重传音频数据包的方法的流程图;
图6是本申请实施例示出的另一种音频信息包的重传方法的示意图;
图7是基于图6所示实施例提供的一种还原第一音频数据包的示意图;
图8是本申请实施例示出的另一种音频信息包的重传方法的示意图;
图9是本申请实施例示出的另一种重传音频数据包的方法的示意图;
图10是本申请实施例提供的一种在第一音频接收器中重传音频数据包的方法的流程图;
图11是本申请实施例提供的一种在第二音频接收器中重传音频数据包的方法的流程图;
图12是本申请实施例示出的一种重传音频数据包的方法的示意图;
图13是本申请实施例提供的一种编码规则的设计方案示意图;
图14是本申请实施例提供的一种在第一音频接收器中重传音频数据包的方法的流程图;
图15是本申请实施例提供的一种在第二音频接收器中重传音频数据包的方法的流程图;
图16是本申请实施例示出的另一种音频信息包的重传方法的示意图;
图17是本申请实施例示出的另一种音频信息包的重传方法的示意图;
图18是本申请一个示例性实施例提供的一种音频接收器的结构框图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。
在耳机技术的发展过程中,由于TWS技术能够免去耳机的线缆,使用方便,因此得到了大规模应用。请参见图1,图1是本申请实施例提供的一种TWS耳机和音源SRC的应用场景示意图。在图1中,用户的左耳佩戴TWS耳机中的第一耳机110,用户的右耳佩戴TWS耳机的第二耳机120,第一耳机110与音源130之间通过第一微微网(piconet-1)连接,第二耳机120与音源130之间通过第二微微网(piconet-2)连接,第一耳机110与第二耳机120之间通过第三微微网(piconet-3)相连。可选地,音源130可以是移动终端,比如手机、平板电脑、MP4播放终端、MP5播放终端、学习机、电子词典和智能手表等。
可选地,piconet-1和piconet-2可以是相同的无线网络,即具有同样的网络配置参数,使用相同的信道。当piconet-1和piconet-2使用相同的信道时,在SRC向第一耳机110发送音频信息的情况下,第二耳机120可以通过侦测相同的信号获取到相同的音频信息,从而实现SRC同时将音频信息发送至第一耳机110和第二耳机120的效果。
可选地,第一耳机110与第二耳机120之间的piconet-3可以与piconet-1是具有不同配置的网络。在一种可能的方式中,piconet-3是一种私有无线链接(Primary Wireless Link)。其中,piconet-3具有双向通信的能力。
示意性地,请参考图2,图2是基于图1所示实施例提供的一种TWS耳机的组成结构示意图。在第一耳机110中,包括第一音频接收器111(SNK-1)和扬声器。换言之,第一音频接收器111和扬声器耦合组成第一耳机110。在一种可能的实施方式中,第一耳机110还可以包括电池、麦克风阵列、处理器、接近光传感器、压力传感器和骨传感器等组件。类似的,第二耳机120包括第二音频接收器121(SNK-2)和扬声器。
示意性的,在本申请实施例中,SNK-1和SNK-2同时接收第一音频数据包之后。当SNK-1没有成功收到第一音频数据包时,SNK-1不会把收到的第一音频数据包中的第一音频信息丢掉,而是保存下来。同时,SNK-1向SNK-2发送第一NACK消息,该第一NACK消息用于指示SNK-1未成功接收到第一音频数据包。SNK-2在收到SNK-1的第一NACK消息时,根据第一NACK消息,对SNK-2收到的第一音频数据包选取目标编码规则进行编码,得到额外的第一冗余信息。SNK-2将第一冗余信息封装成第二音频数 据包,发送给SNK-1。SNK-1对第一冗余信息与原来保存的第一音频数据进行解码,以还原第一音频数据包。SNK-1可以通过与SNK-2交互的信息,决定发送第二音频数据包所在的时隙的持续时间长度,以保证有足够的时间完成第二音频数据包的交互。
请参考图3,图3是本申请一个示例性实施例提供的一种在第一音频接收器中重传音频数据包的方法的流程图。第一音频接收器配置为与音源进行通信,并且与第二音频接收器进行通信。在图3中,重传音频数据包的方法包括:
步骤310,从音源接收第一音频数据包,第一音频数据包分别被第一音频接收器和第二音频接收器获取。
在本申请实施例中,SNK-1能够通过与音源之间的通信链路接收第一音频数据包。一种可能的方式中,SNK-1通过与音源之间建立的通信链路直接接收该第一音频数据包。另一种可能的方式中,SNK-1通过监听音源与SNK-2之间的通信链路,从而接收到第一音频数据包。
可选的,在本申请实施例中,SNK-1能够在第一时隙内,从音源接收第一音频数据包。
在第一时隙开始时,SRC向SNK-1或SNK-2发送第一音频数据包。另外一个SNK通过侦听的方式获取到第一音频数据包。也即,SRC可以仅与SNK-1和SNK-2中的一个之间具有通信链路。另一个SNK通过侦测该通信链路获取第一音频数据包。
例如,SRC与SNK-1之间具有通信链路,该通信链路可以是微微网(piconet)。SRC在第一时隙中,通过该通信链路向SNK-1传输第一音频数据包。相应的,SNK-2在第一时隙中,侦测该通信链路,从而获取到第一音频数据包。
又例如,SRC与SNK-2之间具有传输信道,该传输信道也可以是微微网(piconet)。SRC在当前时隙开始时,通过该传输信道向SNK-2传输第一音频数据包。相应的,SNK-1在当前时隙开始时,侦测该传输信道,从而获取到第一音频数据包。
步骤320,在第一音频数据包解码失败的情况下,保存已接收到的第一音频数据包中的第一数据。
在本例中,SNK-1接收完成第一音频数据包后,将对第一音频数据包进行解码。需要说明的是,在SNK-1解码第一音频数据包的过程中,SNK-1可以通过校验码对第一音频数据包进行校验,以验证第一音频数据包是否完整正确地接收。其中,校验码既可以是CRC(Cyclic Redundancy Check,循环冗余校验)码,也可以是其他具有校验功能的校验码。
当SNK-1解码第一音频数据包失败时,第一音频数据包将保存已接收到的第一音频数据包中的第一数据。需要说明的是,第一数据既可以是部分正确的第一音频数据包中的数据,也可以是既包括部分正确的数据也包括部分错误数据的内容,本申请实施例对此不作限定。
步骤330,向第二音频接收器发送第一NACK消息,第一NACK消息用于指示第一音频接收器未成功接收到第一音频数据包。
在本申请实施例中,SNK-1能够在第一时隙向SNK-2发送第一NACK消息。其中,该第一NACK消息用于指示SNK-1没有成功接收到第一音频数据包。可选的,针对SNK-1向SNK-2发送第一NACK消息的时机。一种可能的方式中,SNK-1在生成第一NACK消息后立即向SNK-2发送第一NACK消息。另一种可能的方式中,SNK-1在生成第一NACK消息后,经过指定数目个时间片后,向SNK-2发送第一NACK消息。在又一种可能的方式中,SNK-1在生成第一NACK消息后,经过随机(random)个时间片后,向SNK-2发送第一NACK消息。
步骤340,接收第二音频接收器发送的第二音频数据包,第二音频数据包包括第一冗余信息。
在本例中,SNK-1能够接收SNK-2发送的第二音频数据包。其中,第二音频数据包包括第一冗余信息。需要说明的是,SNK-1可以在发送第一NACK消息后,持续侦测SNK-1和SNK-2之间的通信链路,当通信链路中出现SNK-2发送的第二音频数据包后,接收该冗余信息。
可选地,第一时隙是音源处于相对第二音频接收器的发送状态所在的时隙,第二时隙是音源处于相对第二音频接收器的接收状态所在的时隙。
在一种可能的实施方式中,第一时隙是SRC向SNK-2发送第一音频数据包且SRC处于Tx状态所在的时隙。第二时隙是SNK-2相对SRC的数据是Rx状态所在的时隙。
步骤350,对第一冗余信息和第一音频数据进行解码,以还原第一音频数据包。
在本例中,SNK-1中可以预先设置目标编码规则,对第一冗余信息和第一音频数据进行解码,以还原第一音频数据包。在一种处理方式中,SNK-1中可以预先设置多个编码规则,在实际使用时从多个编码规则中选择目标编码规则进行使用。当第一音频数据包被还原后,第一音频接收器能够成功得到该第一音频数据包。
在一种可能的解码方式中,SNK-1可以先将第一冗余信息和第一音频数据合并,获得合并后的数据,然后再通过目标编码规则对合并后的数据进行解码,以还原第一音频数据包。
综上所述,本实施例提供在第一音频接收器SNK-1中重传音频信息包的方法应用,能够在SNK-1没能成功解码第一音频数据包时先把已接收到的第一音频数据保存下来,然后再从SNK-2中获取第二音频数据包,对第二音频数据包中的第一冗余信息和第一音频数据一起进行解码,进而得到完整的第一音频数据包,使得SNK-1无需再从SRC得到完整的第一音频数据包,也无需从SNK-2中得到完整的第一音频数据包,因此SNK-1仅需要再得到少量数据即可获取完整的第一音频数据包。由于本方案通过传送第一冗余信息来实现对第一音频数据包的还原,从而降低了重传的数据量,并降低了SNK-1在首次获取第一音频数据失败后获取第一音频数据的时延。
可选地,第一NACK消息包括第一音频数据包的接收程度信息,以便第二音频接收器基于接收程度信息确定编码规则,第二音频接收器使用编码规则编码第一音频数据包,以获得第一冗余信息。
可选地,第一NACK消息包括第一音频数据包的正确程度信息,正确程度信息用于指示第一音频数据包被正确接收的概率,以便第二音频接收器基于正确程度信息确定编码规则,第二音频接收器使用编码规则编码第一音频数据包,以获得第一冗余信息。
可选地,正确程度信息包括第一音频数据包所在信道的信噪比SNR和/或历史误比特率BER。
可选地,从音源接收第一音频数据包,包括:
在第一时隙内,从音源接收第一音频数据包;
向第二音频接收器发送第一NACK消息,包括:
在第一时隙内,向第二音频接收器发送第一NACK消息;
接收第二音频接收器发送的第二音频数据包,包括:
在第二时隙内,接收第二音频接收器发送的第二音频数据包,第二时隙是相对第一时隙的下一个时隙。
可选地,第二音频数据包还包括指示信息,指示信息用于指示第二时隙的时长,以便第二时隙适于第一音频接收器和第二音频接收器之间交互第一NACK消息和第二音频数据包。
可选地,向第二音频接收器发送第一NACK消息,包括:
根据随机退避机制或固定时间片确定第一发送时刻,第一发送时刻属于第一时隙;
在第一发送时刻向第二音频接收器发送第一NACK消息。
可选地,方法还包括:
在对第一冗余信息和第一音频数据解码失败的情况下,向第二音频接收器发送第二接收失败通知。
可选地,方法还包括:接收第二音频接收器发送的第三音频数据包,第三音频数据包包括第二冗余信息,第二冗余信息的数据量大于第一冗余信息的数据量;以及
对第二冗余信息和第一音频数据进行解码,以还原第一音频数据包。
可选地,向第二音频接收器发送第二接收失败通知,包括:
根据随机退避机制或固定时间片确定第二发送时刻;
在第二发送时刻向第二音频接收器发送第二接收失败通知。
可选地,第二音频数据包还包括ACK消息,ACK消息用于向音源指示第一音频接收器和第二音频接收器均成功接收到了第一音频数据包。
可选地,第一冗余信息还包括第一音频数据包中的至少一部分原始数据。
可选地,对第一冗余信息和第一音频数据进行解码,以还原第一音频数据包,包括:
基于编码规则来确定对应的解码规则,并且通过解码规则来对第一冗余信息和第一音频数据进行解码,以还原第一音频数据包。
可选地,方法还包括:
第一音频接收器与第二音频接收器被预配置为共享编码规则。
在由SNK-1、SNK-2和SRC组成的系统中,相对于SNK-1侧执行的方案,本申请还提供一种在SNK-2中重传音频数据包的方法,请参看如下实施例。
在图4中,图4是本申请一个示例性实施例提供的一种在第二音频接收器中重传音频数据包的方法的流程图。第二音频接收器配置为与音源进行通信,并且与第一音频接收器进行通信。在图4中,重传音频数据包的方法包括:
步骤410,从音源接收第一音频数据包,第一音频数据包分别被第一音频接收器和第二音频接收器获取。
在本例中,SNK-2能够从SRC中接收第一音频数据包。其中,SNK-2接收第一音频数据包的时隙,和,SNK-1接收第一音频数据包的时隙是同一个时隙。
步骤420,从第一音频接收器接收第一NACK消息,第一NACK消息用于指示第一音频接收器未成功接收到第一音频数据包。
其中,SNK-2能够从SNK-1接收第一NACK消息。第一NACK消息的作用是指示SNK-1没有成功 接收到第一音频数据包。在一种可能的方式中,第一NACK消息可以通过一个数据位表示。可选地,该数据位是1时表示SNK-1没有成功接收到第一音频数据包。或者,该数据位是0时表示SNK-1没有成功接收到第一音频数据包。
步骤430,基于第一NACK消息确定编码规则。
在本例中,SNK-2中可以预先存储多个编码规则。SNK-2能够从多个编码规则中,基于第一NACK消息确定编码规则。需要说明的是,不同的第一NACK消息能够确定出不同的编码规则。
步骤440,使用编码规则编码第一音频数据包,以获得第一冗余信息。
在本例中,SNK-2确定编码规则编码后,能够使用编码规则对第一音频数据包编码。例如,第一音频数据包的数据量是50字节,按照一个编码规则编码后,得到大小为10字节的第一冗余信息。
需要说明的是,本申请中的第一冗余信息的数据量小于第一音频数据包,以实现SNK-1快速还原第一音频数据包。
可选地,在一种可能的方式中,第一冗余信息中可以包括至少一部分原始数据。其中,该原始数据是第一音频数据包中原始的数据。在另一种可能的方式中,第一冗余信息可以不包括原始数据,仅包括全部根据编码规则编码出的新数据。
步骤450,向第一音频接收器发送第二音频数据包,第二音频数据包包括第一冗余信息。
在本例中,SNK-2在生成第一冗余信息,能够将第一冗余信息放置于第二音频数据包中,并将第二音频数据包发送至SNK-1中,以便SNK-1基于第一冗余信息与已保存的第一音频数据还原第一音频数据包。
综上所述,本申请所提供的在SNK-2中重传音频数据包的方法,能够令SNK-2在成功接收到第一音频数据包时,通过SNK-1发送的第一NACK消息获知SNK-1没有成功接收到第一音频数据包,在此情况下,SNK-2根据第一NACK消息确定出相应的编码规则,再使用编码规则编码第一音频数据包,以获取第一冗余信息,在得到第一冗余信息后,向SNK-1发送第二音频数据包。由于SNK-2能够在SNK-1没有正确接收第一音频数据包的情况下,获取SNK-1发送的第一NACK消息,进而确定对应的编码规则,在编码规则的作用下,根据第一音频数据包得到第一冗余信息,并将包含第一冗余信息的第二音频数据包发送给SNK-1,以令SNK-1能够根据第一冗余信息和已经接收到的第一音频数据,从而得到第一音频数据包。
可选地,第二音频数据包还包括ACK消息,ACK消息用于向音源指示第一音频接收器和第二音频接收器均成功接收到了第一音频数据包。
可选地,方法还包括:向音源发送ACK消息,ACK消息用于向音源指示第一音频接收器和第二音频接收器均成功接收到了第一音频数据包。
可选地,第一NACK消息包括第一音频数据包的接收程度信息,从第一音频接收器接收第一NACK消息,包括:
从第一音频接收器接收接收程度信息;
基于第一NACK消息确定编码规则,包括:
基于接收程度信息,确定编码规则。
可选地,第一NACK消息包括第一音频数据包的正确程度信息,从第一音频接收器接收第一NACK消息,包括:
从第一音频接收器接收正确程度信息,正确程度信息用于指示第一音频数据包被正确接收的概率;
基于第一NACK消息确定编码规则,包括:
基于正确程度信息,确定编码规则。
可选地,从音源接收第一音频数据包,包括:
在第一时隙内,从音源接收第一音频数据包;
从第一音频接收器接收第一NACK消息,包括:
在第一时隙内,从第一音频接收器接收第一NACK消息;
向第一音频接收器发送第二音频数据包,包括:
在第二时隙内,向第一音频接收器发送第二音频数据包,第二时隙是相对第一时隙的下一个时隙。
可选地,第二音频数据包还包括指示信息,指示信息用于指示第二时隙的时长,以便第二时隙适于第一音频接收器和第二音频接收器之间交互第一NACK消息和第二音频数据包。
可选地,方法还包括:
接收第一音频接收器发送的第二接收失败通知,第二接收失败通知用于指示第一音频接收器对第一冗余信息和第一音频数据解码失败。
可选地,方法还包括:向第一音频接收器发送第三音频数据包,第三音频数据包包括第二冗余信息,第二冗余信息的数据量大于第一冗余信息的数据量,以便第一音频接收器对第二冗余信息和第一音频数据 进行解码,以还原第一音频数据包。
可选地,第一冗余信息还包括第一音频数据包中的至少一部分原始数据。
在本申请实施例中,SNK-1还能够通过另一种方式在首次获取第一音频数据包失败后,再次通过SNK-2重传第一冗余信息的方式重新还原第一音频数据包,以避免系统再向SNK-1完整重传第一音频数据包,介绍如下。
请参考图5,图5是本申请实施例提供的一种应用在无线音频系统中的重传音频数据包的方法的流程图。该重传音频数据包的方法由无线音频系统中的音源(SRC)、第一音频接收器(SNK-1)和第二音频接收器(SNK-2)配合完成。该重传音频数据包的方法包括如下步骤。
步骤501,在第一时隙内,音源发送第一音频数据包。
相应的,SNK-1和SNK-2能够在第一时隙内,分别获取该第一音频数据包。
在一种可能的方式中,SNK-1在第一时隙内从SRC接收第一音频数据包,SNK-2在第一时隙内监听SRC发送给SNK-1的第一音频数据包,从而也能在第一时隙内够获取到该第一音频数据包。
在另一种可能的方式中,SNK-2在第一时隙内从SRC接收第一音频数据包,SNK-1在第一时隙内监听SRC发送给SNK-2的第一音频数据包,从而也能够在第一时隙内获取到该第一音频数据包。
步骤502,在第一音频数据包解码失败的情况下,第一音频接收器保存已接收到的第一音频数据包中的第一音频数据。
在SNK-1这一侧,其解码第一音频数据包可能成功也可能失败。在SNK-1解码第一音频数据包失败的情况下,SNK-1将已经接收到的数据保存下来。可选地,SNK-1可以将该数据作为临时数据存储在内存中,也可以将该数据作为持续保留的数据存储在外部存储芯片中。
步骤503,在第一时隙内,第一音频接收器向第二音频接收器发送第一NACK消息。
其中,第一NACK消息用于指示第一音频接收器未成功接收到第一音频数据包。本申请中设计SNK-1向SNK-2发送第一NACK消息,使得SNK-2能够知晓SNK-1未成功接收到第一音频数据包的情况。
需要说明的是,SNK-1可以根据随机退避机制或固定时间片确定第一发送时刻,并在第一发送时刻向SNK-2发送第一NACK消息。其中,第一发送时刻属于第一时隙。在该实现方式中,随机退避机制是SNK-1在需要发送第一NACK消息时,生成一个随机数,将随机数个时间片后的时刻确定为第一发送时刻。而固定时间片的方式是,SNK-1在需要发送第一NACK消息时,将固定个数个时间片后的时刻确定为第一发送时刻。
在本申请实施例中,第一NACK消息可以包括多种信息。在一种可能的方式中,第一NACK消息包括第一音频数据包的接收程度信息。该接收程度信息能够被SNK-2用来确定编码规则,以便SNK-2根据编码规则编码第一音频数据包以获得第一冗余信息。
在另一种可能的方式中,第一NACK消息包括第一音频数据包的正确程度信息。SNK-2从SNK-1接收正确程度信息,该正确程度信息用于指示第一音频数据包被正确接收的概率;SNK-2基于正确程度信息,确定编码规则。同时,该正确程度信息能够被SNK-2用来确定编码规则,以便SNK-2根据编码规则编码第一音频数据包以获得第一冗余信息。
作为一种落地的实现方式,正确程度信息可以包括第一音频数据包所在信道的信噪比SNR。或者,正确程度信息也可以包括第一音频数据包所在信道的历史误比特率(Bit Error Rate,BER)。或者,正确程度信息还可以同时包括第一音频数据包所在信道的信噪比SNR和历史误比特率BER。
相应地,在第一时隙内,SNK-2从SRC接收第一音频数据包。
相应的,SNK-2在第一时隙内从SNK-1接收第一NACK消息,并基于第一NACK消息确定编码规则。
在本申请实施例中,SNK-2可以根据第一NACK消息中包括的内容的不同,来确定相应的定编码规则。
步骤504,第二音频接收器使用编码规则编码第一音频数据包,以获得第一冗余信息。
在一种可能的方式中,第一NACK消息中包括的是第一音频数据包的接收程度信息。在此情况下,SNK-2从SNK-1接收接收程度信息,并基于接收程度信息确定编码规则。可选地,接收程度用于衡量从第一数据中接收到的可用信息的有效程度。可选地,编码规则可以是汉明(Hamming)码。
其中,该接收程度信息用于指示第一音频数据的数据量占第一音频数据包总的数据量的百分比。例如,接收程度信息可以是20%、30%或60%等介于0与1之间的数值,本申请实施例不对其具体的数值进行限定。
需要说明的是,在本申请实施例中,不同的接收程度信息可以对应不同的编码规则。例如,可以参见表一所示的接收程度信息和编码规则的对应情况。
表一
(0,0.2] (0.2,0.4] (0.4,0.6] (0.6,0.8] (0.8,1)
编码规则A 编码规则B 编码规则C 编码规则D 编码规则E
若本申请按照表一提供的场景设计有五种编码规则,则SNK-2能够先确定接收程度信息所在的区间中,然后再确定区间对应的编码规则。例如,若接收程度信息是0.5,则SNK-2确定出接收程度信息所在的区间是(0.4,0.6]。然后,SNK-2确定(0.4,0.6]对应的编码规则是编码规则C。
在一种可选的实现方式中,若第一接收程度信息大于第二接收程度信息,且第一接收程度信息对应的编码规则不同于第二接收程度信息对应的编码规则,则SNK-2使用第一接收程度信息对应的编码规则编码第一音频数据包获得的第一冗余信息的数据量,小于SNK-2使用第二接收程度信息对应的编码规则编码第一音频数据包获得的第一冗余信息的数据量。
在另一种可能的方式中,第一NACK消息中包括的是第一音频数据包的正确程度信息。该正确程度信息用于指示第一音频数据包被正确接收的概率,示意性的,该正确程度信息可以是30%、40%或60%等介于0与1之间的数值,本申请实施例不对其具体的数值进行限定。
步骤505,在第二时隙内,第二音频接收器向第一音频接收器发送第二音频数据包。
在本申请实施例中,SNK-2在第二时隙内,向SNK-1发送第二音频数据包。其中,第二时隙是相对第一时隙的下一个时隙。
相应的,SNK-1在第二时隙内,接收SNK-2发送的第二音频数据包。其中,第二时隙是相对第一时隙的下一个时隙。
在本申请实施例中,由于SNK-2成功接收到第一音频数据包。因此,第二音频数据包中还可以包括ACK消息。SRC可以通过监听的方式获取第二音频数据包,从而得到ACK消息。其中,该ACK消息用于向音源指示第一音频接收器和第二音频接收器均成功接收到了第一音频数据包。
在另一种可能的方式中,ACK消息可以和第二音频数据包中的第一冗余信息分属两个数据包。其中,第一冗余信息所在的第二音频数据包被SNK-2发送给SNK-1。ACK消息所在的数据包被SNK-2发送给SRC。也即,SNK-2向SRC发送ACK消息。ACK消息用于向音源指示第一音频接收器和第二音频接收器均成功接收到了第一音频数据包。
在又一种可能的实施方式中,第二音频数据包还包括指示信息。其中,该指示信息用于指示第二时隙的时长,以便第二时隙适于第一音频接收器和第二音频接收器之间交互第一NACK消息和第二音频数据包。
步骤506,基于编码规则来确定对应的解码规则,并且通过解码规则来对第一冗余信息和第一音频数据进行解码,以还原第一音频数据包。
在本例中,SNK-1能够基于编码规则来确定对应的解码规则。需要说明的是,编码规则和解码规则在设计时成对出现。例如,SNK-2中存储了5套编码规则,则SNK-1中可以存储相应的5套编码规则。
在另一种可能的方式中,编码规则和解码规则是设计成为一整套的规则。SNK-1和SNK-2被设计为共享编码规则。若SNK-1中存储有n套编码规则,则SNK-2中也同样存储有该n套编码规则。其中,n为大于或者等于1的正整数。
在本例中,若SNK-1成功还原了第一音频数据包,则本申请流程终止。若SNK-1仍没有还原第一音频数据包,则SNK-1继续执行后续步骤。
步骤507,在对第一冗余信息和第一音频数据解码失败的情况下,第一音频接收器向第二音频接收器发送第二接收失败通知。
在本例中,由于第一冗余信息是根据第一音频数据包编码后得到的数据量较小的数据。因此,SNK-1对第一冗余信息和第一音频数据解码时,有一定概率解码成功,同时也存在一定概率解码失败。当SNK-1解码失败时,SNK-1将再向SNK-2发送第二接收失败通知。其中,第二接收失败通知用于指示SNK-1对第一冗余信息和第一音频数据解码失败。
相应的,SNK-2接收SNK-1发送的第二接收失败通知。其中,第二接收失败通知用于指示第一音频接收器对第一冗余信息和第一音频数据解码失败。
在一种可能的方式中,SNK-1根据随机退避机制或固定时间片确定第二发送时刻。在第二发送时刻SNK-1向第二音频接收器发送第二接收失败通知。
其中,根据随机退避机制或固定时间片确定第二发送时刻的过程可以参见步骤503的执行过程,此处不再赘述。
步骤508,第二音频接收器向第一音频接收器发送第三音频数据包,第三音频数据包包括第二冗余信息。
其中,第二冗余信息的数据量大于第一冗余信息的数据量,以便第一音频接收器对第二冗余信息和第一音频数据进行解码,以还原第一音频数据包。
在本例中,由于第一冗余信息和第一音频数据已经不足还原第一音频数据包。因此,SNK-2将再次发 送数据量更大的第二冗余信息。在本例中,SNK-2将第二冗余信息封装在第三音频数据包中。SNK-2通过向SNK-1发送第三音频数据包。
相应地,SNK-1接收SNK-2发送的第三音频数据包,第三音频数据包包括第二冗余信息,第二冗余信息的数据量大于第一冗余信息的数据量。
步骤509,第一音频接收器对第二冗余信息和第一音频数据进行解码,以还原第一音频数据包。
综上所述,本申请实施例提供的方法,针对SNK-1而言,能够在SNK-1没能成功解码第一音频数据包时先把已接收到的第一音频数据保存下来,然后再从SNK-2中获取第二音频数据包,对第二音频数据包中的第一冗余信息和第一音频数据一起进行解码,进而得到完整的第一音频数据包,使得SNK-1无需再从SRC得到完整的第一音频数据包,也无需从SNK-2中得到完整的第一音频数据包,因此SNK-1仅需要再得到少量数据即可获取完整的第一音频数据包。由于本方案通过传送第一冗余信息来实现对第一音频数据包的还原,从而降低了重传的数据量,并降低了SNK-1在首次获取第一音频数据失败后获取第一音频数据的时延。针对SNK-2而言,能够令SNK-2在成功接收到第一音频数据包时,通过SNK-1发送的第一NACK消息获知SNK-1没有成功接收到第一音频数据包,在此情况下,SNK-2根据第一NACK消息确定出相应的编码规则,再使用编码规则编码第一音频数据包,以获取第一冗余信息,在得到第一冗余信息后,向SNK-1发送第二音频数据包。由于SNK-2能够在SNK-1没有正确接收第一音频数据包的情况下,获取SNK-1发送的第一NACK消息,进而确定对应的编码规则,在编码规则的作用下,根据第一音频数据包得到第一冗余信息,并将包含第一冗余信息的第二音频数据包发送给SNK-1,以令SNK-1能够根据第一冗余信息和已经接收到的第一音频数据,从而得到第一音频数据包。
基于上述实施例所示的方法,本申请实施例还可以通过多种案例来说明本申请的实施场景。针对上述图3至图5所示实施例提供的方案,本申请提供有如下图6、图8和图9所示的落地案例。
请参见图6,图6是本申请实施例示出的另一种音频信息包的重传方法的示意图。在本例中,该重传方法分为7个处理阶段。
在阶段610中,在时隙N中,音源SRC在时隙N开始后进入Tx状态,同时向SNK-2和SNK-1发送第一音频数据包(第一音频数据包可以用Data 1表示)。
相应的,音源SRC在时隙N内进入Tx状态(发送状态),SNK-2进入Rx状态(接收状态)并成功接收到第一音频数据包。SNK-1也进入Rx状态但接收并解码第一音频数据包时失败,
在阶段620中,在音源SRC处于Tx状态时,SNK-1处于Rx状态,但在接收过程中解码第一音频数据包失败。SNK-1在退出Tx状态后,保存已经接收到的第一音频数据包中的第一音频数据。随后,SNK-1将进入Tx状态。
在阶段630中,SNK-1处于Tx状态,尝试将重传请求发送至SNK-2。
在阶段640中,对应于SNK-1处于Tx状态的时段,SNK-2处于Rx状态,从SNK-1接收第一NACK消息。SNK-2根据第一NACK消息,知晓SNK-1解码第一音频数据包失败。随后,SNK-2将根据第一NACK消息中携带的重传请求中的接收程度和/或正确程度信息确定编码规则,再基于编码规则编码第一音频数据包得到第一冗余信息RI(Redundant Information)。
在阶段650中,在时隙N+1中,SNK-2进入Tx状态以发送第二音频数据包。SNK-2将发送给音源SRC的ACK消息和发送给SNK-1的第一冗余信息打包在第二音频数据包中,向音源SRC发送。
在阶段660中,在SNK-2处于Tx状态时,SNK-1处于Rx状态并通过监听SNK-2与SRC之间的通信链路以获取第二音频数据包。
在SNK-1从第二音频数据包中获取到第一冗余信息RI后。SNK-1基于编码规则确定解码规则。SNK-1基于解码规则,对第一冗余信息RI和已保存的第一音频数据进行解码,以还原第一音频数据包。在本例中,SNK-1在阶段660中成功还原了第一音频数据包。
示意性的,SNK-1基于解码规则接对第一冗余信息RI和第一音频数据进行解码的流程。可参见图7,图7是基于图6所示实施例提供的一种还原第一音频数据包的示意图。在图7中,SNK-1基于解码规则解码第一音频数据和第一冗余信息RI,得到待确认数据包。随后,SNK-1可以对待确认数据包进行校验,校验通过后将待确认数据包确定为第一音频数据包,并确认本次流程成功还原了第一音频数据包。其中,图7中的参数1是解码方法对应的编码方法编码第一音频数据包时使用的相同的参数。
在阶段670中,在SNK-2处于Tx状态时,音源SRC处于Rx状态。音源SRC接收第二音频数据包,并从第二音频数据包中获取ACK信息。音源SRC根据ACK信息明了SNK-2和SNK-1均已成功收到第一音频数据包,从而结束第一音频数据包的传输流程,并不会再重传第一音频数据包。
请参见图8,图8是本申请实施例示出的另一种音频信息包的重传方法的示意图。在本例中,该重传方法分为10个处理阶段。
在阶段801中,SRC在时隙N开始后进入Tx状态,在进入Tx状态后向SNK-2和SNK-1发送第一音 频数据包(Data 1)。
在SRC进入Tx状态的时段,SNK-2进入Rx状态并成功接收到第一音频数据包。
在阶段802中,在SRC进入Tx状态的时段,SNK-1进入Rx状态。但SNK-1没有成功解码第一音频数据包,而是保存已成功接收到的第一音频数据包中的第一音频数据。
在阶段803中,SNK-1进入Tx状态,将第一NACK消息发送至SNK-2。
在阶段804中,对应于阶段803的SNK-1处于Tx状态的时段,SNK-2处于Rx状态,并接收第一NACK消息。SNK-2根据第一NACK消息中的接收程度确定编码规则,再基于编码规则和接收程度计算出第一冗余信息RI。或者,SNK-2直接基于接收程度确定编码规则,再基于编码规则和接收程度计算出第一冗余信息RI。
在阶段805中,SNK-2在时隙N+1中,进入Tx状态并向SRC发送第二音频数据包。第二音频数据包中包括第一冗余信息和ACK消息。可选地,第二数据包括还可以包括指示信息,该指示信息用于设置发送第二音频数据包所在的时隙的时长。
在本例中,该时隙是第N+1时隙。若第一时隙是第N时隙,则第二时隙时第N+1时隙。
在阶段806中,SNK-1接收并获取SNK-2发送的第二音频数据包中的第一冗余信息RI_1,并对第一冗余信息RI_1与保存的第一音频数据进行解码。
在阶段807中,对应于阶段803中SNK-2处于Tx状态的时段,SRC处于Rx状态。SRC在Rx状态中接收第二音频数据包,从第二音频数据包中的获取ACK消息,基于ACK消息获知SNK-1和SNK-2均已收到第一音频数据包的信息,从而不会向SNK-1或者SNK-2重传第一音频数据包。
在阶段808中,由于SNK-1基于第一冗余信息RI_1仍然无法还原出第一音频数据包。因此,SNK-1在时隙N+1的剩余时间内,再次进入Tx状态并向SNK-2发送第二接收失败通知。
对应于阶段808中SNK-1处于Tx状态的时段,SNK-2进入Rx状态。且SNK-2接收SNK-1发送的第二接收失败通知。
在阶段809中,SNK-2基于第二接收失败通知,再计算第二冗余信息RI_2。SNK-2在时隙N+1的剩余时间内进入Tx状态,向SNK-1发送第二冗余信息RI_2。
在阶段810中,对应于阶段809中SNK-2处于Tx状态的时段,SNK-1进入Rx状态并接收SNK-2发送的第二冗余信息RI_2。SNK-1对第二冗余信息RI_2与保存的第一音频数据进行解码。或者,SNK-1将第二冗余信息RI_2、第一冗余信息RI_1和第一音频数据进行解码。
需要说明的是,若SNK-1在两次从SNK-2中获取冗余信息后仍没有成功还原第一音频数据包时,则SNK-1可以直接向SNK-2请求重传第一音频数据包。
在另一种可能的方式中,SNK-1和SNK-2还可以被设计进行三次、四次或者多次获取冗余信息的交互过程,该次数可以是Q次,Q为大于1的正整数。当,SNK-1和SNK-2之间获取冗余信息的次数超过Q次时,SNK-1将请求SNK-2发送完整的第一音频数据包。
请参见图9,图9是本申请实施例示出的另一种重传音频数据包的方法的示意图。在本例中,处理过程分为10个处理阶段。
在阶段901中,SRC在时隙N开始后进入Tx状态,同时向SNK-2和SNK-1发送第一音频数据包(Data1)。
在本例中,时隙N中的N根据实际需要设置。在一种可能的方式中,时隙N可以是第一时隙。
在阶段902中,SNK-1进入Rx状态,但是SNK-1没有成功接收到第一音频数据包。
在本例中,在阶段901中的SRC处于Tx状态的时段中,SNK-1进入Rx状态。但在该Rx状态先,SNK-1没有成功解码第一音频数据包。
在阶段903中,SNK-1在退出Rx状态后,进入Tx状态向SNK-2发送第一NACK消息。
在阶段904中,SNK-2进入Rx状态,SNK-2根据SNK-1的第一NACK消息,计算出第一冗余信息。
对应于阶段903中SNK-1处于Tx状态的时段,在阶段904中SNK-2进入Rx状态。
在结束阶段904后,SNK-2在时隙N+1中进入Tx状态,并向SRC发送ACK消息。
在阶段905中,SRC处于Rx状态,SRC接收SNK-2发送的ACK消息。
其中,由于ACK消息指示SNK-1和SNK-2均已接收到第一音频数据包。因此,SRC不会再向SNK-1和SNK-2重传第一音频数据包。
在阶段906中,SNK-2在发送完ACK后,将第一冗余信息发送给SNK-1。
在阶段907中,SNK-1处于Rx状态,接收并解析SNK-2的第一冗余信息,并对第一冗余信息与第一音频数据进行解码。
在阶段908中,SNK-1使用第一冗余信息仍无法还原第一音频数据包。在时隙N+1的持续时间内,SNK-1向SNK-2发送第二接收失败通知。
对应于阶段908,SNK-2进入Rx状态并获取第二接收失败通知。
在阶段909中,SNK-2根据第二接收失败信息,重新计算第二冗余信息。SNK-2进入Tx状态,在时隙N+1的剩余时间内向SNK-1发送第二冗余信息。
在阶段910中,SNK-1接收SNK-2发送的第二冗余信息,既可以单独对第二冗余信息和第一音频数据进行解码,也可以对第二冗余信息、第一冗余信息和第一音频数据进行解码,本申请对此不作限定。
需要说明的是,若SNK-1在两次从SNK-2中获取冗余信息后仍没有成功还原第一音频数据包时,则SNK-1可以直接向SNK-2请求重传第一音频数据包。
在另一种可能的方式中,SNK-1和SNK-2还可以被设计进行三次、四次或者多次获取冗余信息的交互过程,该次数可以是Q次,Q为大于1的正整数。当,SNK-1和SNK-2之间获取冗余信息的次数超过Q次时,SNK-1将请求SNK-2发送完整的第一音频数据包。
在本申请实施例中,还存在SNK-1和SNK-2都没有成功解码第一音频数据包的情况,在该情况中,本申请提供了一种重传音频数据包的方法,请参见如下实施例。
请参见图10,图10是本申请实施例提供的一种在第一音频接收器中重传音频数据包的方法的流程图。其中,第一音频接收器配置为与音源进行通信,并且与第二音频接收器进行通信。在图10中,该重传音频数据包的方法包括:
步骤1010,从音源接收第一音频数据包,第一音频数据包分别被第一音频接收器和第二音频接收器获取。
在本例中,SNK-1从SRC接收了第一音频数据包。其中,该第一音频数据包还被SNK-2获取。
步骤1020,在第一音频数据包解码失败的情况下,在未接收到用于指示第二音频接收器解码第一音频数据包失败的通知时,向第二音频接收器发送第一NACK消息,第一NACK消息用于指示第一音频接收器未成功接收到第一音频数据包。
在本例中,SNK-1也有可能接收到用于指示SNK-2解码失败的通知。若SNK-1接收到该通知,则由SNK-1执行向SRC告知两个设备均没有成功解码第一音频数据包的情况。在本例中,SNK-1和SNK-2都没有成功解码第一音频数据包,因此需要竞争向对方发送第一NACK消息。本申请以SNK-1抢先向SNK-2发送第一NACK消息为例进行说明。
其中,第一NACK消息用于指示SNK-1未成功接收到第一音频数据包。
步骤1030,接收音源重传的第一音频数据包,重传的第一音频数据包是音源在预设条件下发送的,预设条件是第一音频接收器和第二音频接收器均未能成功接收第一音频数据包。
在本例中,SNK-1接收SRC重传的第一音频数据包。其中,SRC能够在预设条件下向SNK-1重传该第一音频数据包。需要说明是,预设条件是第一音频接收器和第二音频接收器均未能成功接收第一音频数据包。
其中,SRC可以是通过SNK-2发送的消息获知已处于预设条件中。触发SNK-2通知SRC其已经处于预设条件的触媒是SNK-1发送的第一NACK消息。
综上所述,本申请提供的一种在第一音频接收器中重传音频数据包的方法,能够在SNK-1和SNK-2均没有成功解码第一音频数据包的情况下,令SNK-1和SNK-2互相竞争向SRC反馈信息。在本例中,SNK-1抢先向SNK-2发送了第一NACK消息,令SNK-2通知SRC其已处于预设条件中。从而,SRC将分别向SNK-1和SNK-2重传第一音频数据包,实现了重传第一音频数据包的效果,避免了SNK-1和SNK-2在两者都没有成功解码的场景下,无法及时获取重传的第一音频数据包的问题。
请参见图11,图11是本申请实施例提供的一种在第二音频接收器中重传音频数据包的方法的流程图。图11所示的由SNK-2执行的方案是图10所示的由SNK-1执行的方案的另一侧的方案。SNK-2配置为与音源进行通信,并且SNK-2与SNK-1进行通信,在重传音频数据包的方法中,包括:
步骤1110,在第一时隙从音源接收第一音频数据包,第一音频数据包分别被第一音频接收器和第二音频接收器获取。
在本例中,SNK-2在第一时隙从SRC中接收第一音频数据包。其中,第一音频数据包能够同时被第一音频接收器和第二音频接收器获取。
步骤1120,解码第一音频数据包。
在本例中,SNK-2也将解码第一音频数据包。
在本申请实施例中,SNK-2在执行完成步骤1120后,既可以执行步骤1130,也可以执行步骤1140。
步骤1130,在音源被设置为在第二时隙中未接收到ACK消息时确认第一音频接收器和第二音频接收器均没有接收到第一音频数据包的情况下,在第一音频数据包解码失败且接收到第一音频接收器发送的第一NACK消息时,在第二时隙中不向音源发送反馈消息,反馈消息包括ACK消息和第二NACK消息,第二时隙是相对于第一时隙的下一时隙,第二NACK消息用于指示第一音频接收器和第二音频接收器均没有 接收到第一音频数据包。
在本例中,SRC能够被预设有重传第一音频数据包的预设条件。该预设条件是以第二时隙为限定,在第二时隙中没有接收到ACK消息时确认SNK-1和SNK-2均没有成功解码第一音频数据包。也即SNK-1和SNK-2均没有成功接收到第一音频数据包。
在此情况下,SNK-2能够在自身解码第一音频数据包失败,并且接收到SNK-1发送的第一NACK消息时,在第二时隙不向SRC发送反馈消息。其中,第二时隙是第一时隙的下一个时隙。反馈消息中包括ACK消息和第二NACK消息。第二NACK消息用于指示SNK-1和SNK-2均没有成功接收到第一音频数据包。换言之,SNK-2在第二时隙内,既不会向SRC发送用于指示SNK-1和SNK-2都成功接收第一音频数据包的消息,也不会向SRC发送用于指示SNK-1和SNK-2都没有成功接收第一音频数据包的消息。
步骤1140,在音源被设置为在第二时隙中接收到第二NACK消息时确认第一音频接收器和第二音频接收器均没有接收到第一音频数据包的情况下,在第一音频数据包解码失败且接收到第一音频接收器发送的第一NACK消息时,向音源发送第二NACK消息,第二时隙是相对于第一时隙的下一时隙,第二NACK消息用于指示第一音频接收器和第二音频接收器均没有接收到第一音频数据包。
在本例中,SRC能够被预设有重传第一音频数据包的预设条件。该预设条件是以第二时隙为限定,在第二时隙中接收到第二NACK消息时确认SNK-1和SNK-2均没有接收到第一音频数据包。
在此情况中,SNK-2能够在自身解码第一音频数据包失败,并且接收到SNK-1发送的第一NACK消息时,在第二时隙向SRC发送第二NACK消息。其中,第二时隙是相对于第一时隙的下一时隙。第二NACK消息用于指示SNK-1和SNK-2均没有接收到第一音频数据包。
综上所述,本申请实施例提供的在第二音频接收器中重传音频数据包的方法,能够令SNK-2在第一时隙从SRC接收第一音频数据包,并且解码该第一音频数据包。在SRC中预设在第二时隙中没有接收到反馈消息时确认SNK-1和SNK-2均没有成功接收到第一音频数据包的情况下,SNK-2能够在解码第一音频数据包失败且接收到SNK-1发送的第一NACK消息时,在第二时隙不向SRC发送反馈消息,以便SRC知晓SNK-1和SNK-2均没有成功接收到第一音频数据包,从而便于SRC向SNK-2和/或SNK-1重传第一音频数据包,实现了重传第一音频数据包的效果,避免了SNK-1和SNK-2在两者都没有成功解码的场景下,无法及时获取重传的第一音频数据包的问题。
可选的,本申请还能够令SNK-2在第一时隙从SRC接收第一音频数据包,并且解码该第一音频数据包。在SRC中预设在第二时隙中接收到第二NACK消息的情况下,SNK-2能够在解码第一音频数据包失败且接收到SNK-1发送的第一NACK消息时,在第二时隙向SRC发送第二NACK消息,以便SRC知晓SNK-1和SNK-2均没有成功接收到第一音频数据包,从而便于SRC向SNK-2和/或SNK-1重传第一音频数据包,实现了重传第一音频数据包的效果,避免了SNK-1和SNK-2在两者都没有成功解码的场景下,无法及时获取重传的第一音频数据包的问题。
作为图10和图11所示实施例的一种可能的落地实现方式,请参见图12所示的方案。图12是本申请实施例示出的一种重传音频数据包的方法的示意图。在图12提供的案例中,第一音频数据包的重传过程分为6个处理阶段。
在阶段1210中,音源SRC在时隙N中进入Tx状态。SRC在进入Tx状态后,向SNK-2和SNK-1发送第一音频数据包(第一音频数据包也可用Data 1表示)。
需要说明的是,时隙N表示N个时隙中的第N个时隙,N为正整数。在实际处理过程中,N可以根据需要选择适合的数值。
在本例中,音源SRC可以在刚进入时隙N后,立即进入Tx状态。当音源SRC处于Tx状态时,音源SRC可以向SNK-2发送第一音频数据包。同时SNK-1可以通过监听音源SRC向SNK-2发送信息的通信链路,来获取第一音频数据包。
或者,音源SRC在进入Tx状态后,音源SRC向SNK-1发送第一音频数据包。同时SNK-2可以通过监听音源SRC向SNK-1发送信息的通信链路,来获取第一音频数据包。
在阶段1220中,在音源SRC处于Tx状态的时段,SNK-2处于Rx状态以接收第一音频数据包。在SNK-2没有成功解码第一音频数据包Data1的情况下,SNK-2会在退出Rx状态后,尝试向SNK-1发送重传请求。
在阶段1230中,SNK-1处于Rx状态,SNK-1没有成功解码第一音频数据包Data1。SNK-1会在阶段1230所示的接收过程结束后,进入阶段1240。
在阶段1240中,SNK-1处于Tx状态,SNK-1首先向SNK-2发送第一NACK消息。相应的,SNK-2处于Rx状态,接收该第一NACK消息。
在阶段1250中,SNK-2由于先收到了第一NACK消息,从而放弃了向SNK-1发送第一NACK消息。
也即,在实际执行过程中,阶段1250对应的预设数据包并没有发送。图12中以虚线框示出阶段1250 所处的时序位置。
在阶段1260中,SNK-2由于得到了SNK-1的第一NACK消息,且SNK-2也没有收到SRC的第一音频数据包Data1。所以SNK-2可以选择在时隙N+1向SRC发送第二NACK消息,也可以选择不发送任何音频数据包。在SNK-2处于Tx状态的时段,SRC处于Rx状态。从而SRC能够知晓SNK-1和SNK-2均没有接收到第一音频数据包,进而向SNK-1和/或SNK-2重传第一音频数据包。
请参见图13,图13是本申请实施例提供的一种编码规则的设计方案示意图,在图13中,本申请可以为第一音频数据包预设多种编码规则。图13中以多种编码规则为2种为例进行介绍。其中,第一音频数据包在编码规则1下,可以按照接收程度1进行编码,得到编码后的第一音频数据包和对应的冗余信息RI_11。第一音频数据包在编码规则1下,可以按照接收程度2进行编码,得到编码后的第一音频数据包和对应的冗余信息RI_12。例如,接收程度1可以是0.4,接收程度2可以是0.5。示意性地说明,由于接收程度1较低,其生成的冗余信息RI_11的数据量相较于冗余信息RI_12会多一些。
类似的,第一音频数据包在编码规则2下,可以按照接收程度3进行编码,得到编码后的第一音频数据包和对应的冗余信息RI_21。第一音频数据包在编码规则2下,可以按照接收程度4进行编码,得到编码后的第一音频数据包和对应的冗余信息RI_22。例如,接收程度3可以是0.6,接收程度4可以是0.7。示意性地说明,由于接收程度3较低,其生成的冗余信息RI_21的数据量相较于冗余信息RI_22会多一些。
在一种可能的编码规则的选择方式中,SNK可以根据接收程度选择相应的编码规则。例如,本例中当接收程度在[0.4,0.5]区间内时,选择编码规则1作为目标编码方式。当接收程度在在[0.6,0.1)区间内时,选择编码规则2作为目标编码方式。需要说明的是,当接收程度在(0,0.4)区间内时,SNK将自认接收程度过低,无需选择编码规则,而是请求SRC重传第一音频数据包。或者,请求另一个成功接收到第一音频数据包的SNK重传。
在本申请实施例中,还可能存在这样一种情况。其中SNK-1接收的第一音频数据包的数据过少,但SNK-2成功接收并解码第一音频数据包。在该情况下,若依旧令SNK-2向SNK-1反馈冗余信息,则SNK-1无法还原第一音频数据包,反而导致SNK-1需要多次交互之后才能还原第一音频数据包,延长了SNK-1还原第一音频数据包的时长。因此,为了解决该场景中SNK-1还原第一音频数据包的时长潜在的可能耗时较长的问题。本申请提供如下实施例。
请参见图14,图14是本申请实施例提供的一种在第一音频接收器中重传音频数据包的方法的流程图。其中,第一音频接收器配置为与音源进行通信,并且与第二音频接收器进行通信。在图14中,该重传音频数据包的方法包括:
步骤1410,从音源接收第一音频数据包,其中第一音频数据包分别被第一音频接收器和第二音频接收器获取。
在本例中,SNK-1能够从SRC接收第一音频数据包。其中,第一音频数据包也能够被SNK-2接收。
步骤1420,在第一音频数据包解码失败且已接收到的第一音频数据无法用于还原得到第一音频数据包的情况下,丢弃已接收到的第一音频数据。
在本例中,SNK-1接收第一音频数据包时可能出现接收到的数据量非常少的情况。在该场景中,SNK-1中可以设置一个数据阈值,该阈值既可以是一个百分比,也可以是一个固定的数值。当SNK-1保存的第一音频数据的数据量小于该数据阈值时,SNK-1确定自身已接收到的第一音频数据无法用于还原得到第一音频数据包,进而丢弃已经接收到的第一音频数据。
步骤1430,向第二音频接收器发送丢失通知,丢失通知用于指示第一音频接收器完全丢失第一音频数据包。
在本例中,SNK-1向SNK-2发送丢失通知,该丢失通知用于指示SNK-1已经完全丢失第一音频数据包。
步骤1440,接收第二音频接收器重传的第一音频数据包。
在本例中,SNK-1能够接收SNK-2重传的第一音频数据包。其中,SNK-2在获取丢失通知后,在自身已经成功解码第一音频数据包的情况下,会向SNK-1重传第一音频数据包。
综上所述,本申请实施例提供的在第一音频接收器中重传音频数据包的方法,能够令SNK-1接收第一音频数据包,SNK-1在解码第一音频数据包失败并且已经接收到的数据无法用于和冗余信息一起还原得到第一音频数据包,则SNK-1将丢弃已经接收到的第一音频数据,并告知SNK-2,随后SNK-1能够接收到SNK-2重传的第一音频数据,从而实现了在接收到的数据过少的时候,直接从SNK-2重新获取完整的第一音频数据包,而不再进行获取冗余信息的交互过程,减低了SNK-1在首次获取第一音频数据包中的数据量较少的情况下,重新获取第一音频数据包的时延。
请参考图15,图15是本申请实施例提供的一种在第二音频接收器中重传音频数据包的方法的流程图。其中,第二音频接收器配置为与音源进行通信,并且第二音频接收器与第一音频接收器进行通信。该实施 例中的SNK-2与图13中的SNK-1以及SRC组成一个无线音频系统工作。该方法包括:
步骤1510,从音源接收第一音频数据包,第一音频数据包分别被第一音频接收器和第二音频接收器获取。
在本例中,SNK-2将从SRC接收第一音频数据包。其中,SNK-1获取第一音频数据包的来源也是SRC。
在本例中,SNK-2在执行完成步骤1510后,既可以执行步骤1520,也可以执行步骤1530。
在一种可能的方式中,SNK-2在第一时隙从SRC接收第一音频数据包。
步骤1520,在第一音频数据包解码成功且接收到第一音频接收器发送的丢失通知的情况下,向音源发送第二NACK消息,丢失通知用于指示第一音频接收器完全丢失第一音频数据包,第二NACK消息用于指示第一音频接收器和第二音频接收器均没有接收到第一音频数据包,以便音源向第一音频接收器重传的第一音频数据包。
在一种可能的方式中,SNK-2在第二时隙向SRC第二NACK消息。其中,第二时隙是相对于第一时隙的下一个时隙。
步骤1530,在第一音频数据包解码成功且接收到第一音频接收器发送的丢失通知的情况下,向音源发送ACK消息,并向第一音频接收器发送完整的第一音频数据包,丢失通知用于指示第一音频接收器完全丢失第一音频数据包,ACK消息用于指示第一音频接收器和第二音频接收器均已接收到第一音频数据包。
在一种可能的方式中,SNK-2在第二时隙向音源发送ACK消息。
在一种可能的方式中,SNK-2向SRC发送的ACK消息和向SNK-1发送的完整的第一音频数据包可以打包成为一个数据包。详情可参见步骤(a1)。
步骤(a1),SNK-2将ACK消息和完整的第一音频数据包打包为一个组合数据包;在第二时隙向音源和第一音频接收器发送组合数据包。
需要说明的是,SNK-2可以将组合数据包发送给SRC。其中SNK-1通过监听的方式,也能够获取该组合数据包。或者,SNK-2可以将组合数据包发送给SNK-1,SRC通过监听的方式获取该组合数据包。
在另一种可能的方式中,SNK-2向SRC发送的ACK消息和向SNK-1发送的完整的第一音频数据包,可以分为两个独立的数据包分别发送。详情可参见步骤(a2)。
步骤(a2),在第二时隙向音源发送ACK消息;并且在第二时隙向第一音频接收器重传第一音频数据包。
在本例中,SNK-2在第二时隙向SRC发送ACK消息。并且,SNK-2在第二时隙向SNK-1重传第一音频数据包。
综上所述,本申请所示的一种在第二音频接收器中重传音频数据包的方法,能够令SNK-2先从SRC接收第一音频数据包,并且SNK-2解码第一音频数据包,当SNK-2解码第一音频数据包成功且获知SNK-1丢弃了第一音频数据时,SNK-2向SRC发送第二NACK消息,以告知SRC需要重传第一音频数据包,以便SRC向SNK-1重传第一音频数据包,降低了SNK-1重新获取第一音频数据包的时延。
可选的,本申请还能够令SNK-2先从SRC接收第一音频数据包,并且SNK-2解码第一音频数据包,当SNK-2解码第一音频数据包成功且获知SNK-1丢弃了第一音频数据时,SNK-2向SRC发送ACK消息,以令SRC不再重传第一音频数据包,而是由SNK-2向SNK-1重传第一音频数据包,降低了SNK-1重新获取第一音频数据包的时延。
可选地,从音源接收第一音频数据包,包括:
在第一时隙从音源接收第一音频数据包;
向音源发送第二NACK消息,包括:
在第二时隙向音源发送第二NACK消息,第二时隙是相对于第一时隙的下一个时隙;
向音源发送ACK消息,包括:
在第二时隙向音源发送ACK消息。
可选地,向音源发送ACK消息,并向第一音频接收器发送完整的第一音频数据包,包括:
将ACK消息和完整的第一音频数据包打包为一个组合数据包;在第二时隙向音源和第一音频接收器发送组合数据包;或;
在第二时隙向音源发送ACK消息;并且在第二时隙向第一音频接收器重传第一音频数据包。
基于上述实施例所示的方法,本申请实施例还可以通过多种案例来说明本申请的实施场景。针对上述图14和图15所示实施例提供的方案,本申请提供有如下图16和图17所示的落地案例。
请参见图16,图16是本申请实施例示出的另一种音频信息包的重传方法的示意图。在本例中,处理过程分为5个处理阶段。
在阶段1601中,SRC在时隙N开始后进入Tx状态,同时向SNK-2和SNK-1发送第一音频数据包(Data1)。
在阶段1602中,SNK-1没有收到第一音频数据包,且完全丢弃了第一音频数据包中的第一音频数据。SNK-1会在接收过程结束后,尝试发送向SNK-2发送的丢失通知。
在阶段1603中,SNK-1在阶段1102结束后,首先发送丢失通知至SNK-2。
在阶段1604中,SNK-2收到SNK-1的丢失通知,不再计算第一冗余信息。
在阶段1605中,由于SNK-1无法正确得到第一音频数据包,所以SNK-2选择向SRC发送第二NACK消息,以触发SRC重传第一音频数据包。
请参见图17,图17是本申请实施例示出的另一种音频信息包的重传方法的示意图。在本例中,处理过程分为7个处理阶段。
在阶段1701中,SRC在时隙N开始后进入Tx状态,同时向SNK-2和SNK-1发送第一音频数据包(Data1)。
在阶段1702中,SNK-1没有收到第一音频数据包,且完全丢弃了其中的第一音频数据。因此,SNK-1会在接收过程结束后,尝试向SNK-2发送的丢失通知。
在阶段1703中,SNK-1首先将丢失通知发送至SNK-2。
在阶段1704中,SNK-2收到SNK-1发送的丢失通知,不再计算第一冗余信息。
在阶段1705中,SNK-2向SRC发送组合数据包,组合数据包中包括发送至SRC的ACK消息和完整的第一音频数据包。
在阶段1706中,SRC基于组合数据包中的ACK消息,得到SNK-2已经收到第一音频数据包的信息,从而不会重传第一音频数据包。
在阶段1707中,SNK-1接收并解析组合数据包中包含的第一音频数据包。
请参见图18,图18是本申请一个示例性实施例提供的一种音频接收器的结构框图,如图18所示,该音频接收器包括处理器1820和存储器1840,所述存储器1840中存储有至少一条指令,所述指令由所述处理器1820加载并执行以实现如本申请各个方法实施例所述的重传音频数据包的方法。
可选地,图18所示的音频接收器既可以是第一音频接收器也可以是第二音频接收器。
处理器1820可以包括一个或者多个处理核心。处理器1820利用各种接口和线路连接整个音频接收器1800内的各个部分,通过运行或执行存储在存储器1840内的指令、程序、代码集或指令集,以及调用存储在存储器1840内的数据,执行音频接收器1800的各种功能和处理数据。可选的,处理器1820可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器1820可集成中央处理器(Central Processing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示屏所需要显示的内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器1820中,单独通过一块芯片进行实现。
存储器1840可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory,ROM)。可选的,该存储器1840包括非瞬时性计算机可读介质(non-transitory computer-readable storage medium)。存储器1840可用于存储指令、程序、代码、代码集或指令集。存储器1840可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等;存储数据区可存储下面各个方法实施例中涉及到的数据等。
收发组件1860中包括信号处理单元和天线。收发组件1860可以接收经由目标信道发送的反馈信息,还可以向音源发送反馈信息,或者也可以向第一音频接收器发送反馈信息。示意性的,收发组件1860还可以配合处理器1820计算第一音频数据包的信噪比(Signal-to-Noise Ratio,SNR)。或者,收发组件1860还可以配合处理器1820计算接收所述第一音频数据包所在信道的历史误比特率BER。
本申请实施例还提供了一种计算机可读介质,该计算机可读介质存储有至少一条指令,所述至少一条指令由所述处理器加载并执行以实现如上各个实施例所述的在第一音频接收器中重传音频数据包的方法。
本申请实施例还提供了一种计算机可读介质,该计算机可读介质存储有至少一条指令,所述至少一条指令由所述处理器加载并执行以实现如上各个实施例所述的在第二音频接收器中重传音频数据包的方法。
本申请实施例还提供了一种计算机程序产品,该计算机程序产品包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述在第一音频接收器中重传音频数据包的方法。其中,计算机设备是第一音频接收器。
本申请实施例还提供了一种计算机程序产品,该计算机程序产品包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该 计算机指令,使得该计算机设备执行上述在第二音频接收器中重传音频数据包的方法。其中,计算机设备是第二音频接收器。
需要说明的是,本申请中音源SRC、第一音频接收器SNK-1和第二音频接收器SNK-2组成一个无线音频系统。
可选地,如图3所示的SNK-1、如图4所示的SNK-2和音源组成一种无线音频系统。
可选地,如图10所示的SNK-1、如图11所示的SNK-2和音源组成另一种无线音频系统。
可选地,如图14所示的SNK-1、如图15所示的SNK-2和音源组成另一种无线音频系统。
需要说明的是:上述实施例提供的音频信息的重传装置在执行重传音频数据包的方法时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的音频信息的重传装置与重传音频数据包的方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
以上所述仅为本申请的能够实现的示例性的实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (39)

  1. 一种在第一音频接收器中重传音频数据包的方法,所述第一音频接收器配置为与音源进行通信,并且与第二音频接收器进行通信,所述方法包括:
    从所述音源接收第一音频数据包,所述第一音频数据包分别被所述第一音频接收器和所述第二音频接收器获取;
    在所述第一音频数据包解码失败的情况下,保存已接收到的所述第一音频数据包中的第一音频数据;
    向所述第二音频接收器发送第一NACK消息,所述第一NACK消息用于指示所述第一音频接收器未成功接收到所述第一音频数据包;
    接收所述第二音频接收器发送的第二音频数据包,所述第二音频数据包包括第一冗余信息;以及
    对所述第一冗余信息和所述第一音频数据进行解码,以还原所述第一音频数据包。
  2. 根据权利要求1所述的方法,其中,所述第一NACK消息包括所述第一音频数据包的接收程度信息,以便所述第二音频接收器基于所述接收程度信息确定编码规则,所述第二音频接收器使用所述编码规则编码所述第一音频数据包,以获得所述第一冗余信息。
  3. 根据权利要求1所述的方法,其中,所述第一NACK消息包括所述第一音频数据包的正确程度信息,所述正确程度信息用于指示所述第一音频数据包被正确接收的概率,以便所述第二音频接收器基于所述正确程度信息确定编码规则,所述第二音频接收器使用所述编码规则编码所述第一音频数据包,以获得所述第一冗余信息。
  4. 根据权利要求3所述的方法,其中,所述正确程度信息包括所述第一音频数据包所在信道的信噪比SNR和/或历史误比特率BER。
  5. 根据权利要求1所述的方法,其中,所述从所述音源接收第一音频数据包,包括:
    在第一时隙内,从所述音源接收第一音频数据包;
    所述向所述第二音频接收器发送第一NACK消息,包括:
    在所述第一时隙内,向所述第二音频接收器发送第一NACK消息;
    所述接收所述第二音频接收器发送的第二音频数据包,包括:
    在第二时隙内,接收所述第二音频接收器发送的第二音频数据包,所述第二时隙是相对所述第一时隙的下一个时隙。
  6. 根据权利要求5所述的方法,其中,所述第二音频数据包还包括指示信息,所述指示信息用于指示所述第二时隙的时长,以便所述第二时隙适于所述第一音频接收器和所述第二音频接收器之间交互所述第一NACK消息和所述第二音频数据包。
  7. 根据权利要求5所述的方法,其中,所述向所述第二音频接收器发送第一NACK消息,包括:
    根据随机退避机制或固定时间片确定第一发送时刻,所述第一发送时刻属于所述第一时隙;
    在所述第一发送时刻向所述第二音频接收器发送所述第一NACK消息。
  8. 根据权利要求1所述的方法,其中,所述方法还包括:
    在对所述第一冗余信息和所述第一音频数据解码失败的情况下,向所述第二音频接收器发送第二接收失败通知。
  9. 根据权利要求8所述的方法,其中,所述方法还包括:接收所述第二音频接收器发送的第三音频数据包,所述第三音频数据包包括第二冗余信息,所述第二冗余信息的数据量大于所述第一冗余信息的数据量;以及
    对所述第二冗余信息和所述第一音频数据进行解码,以还原所述第一音频数据包。
  10. 根据权利要求8所述的方法,其中,所述向所述第二音频接收器发送第二接收失败通知,包括:
    根据随机退避机制或固定时间片确定第二发送时刻;
    在所述第二发送时刻向所述第二音频接收器发送所述第二接收失败通知。
  11. 根据权利要求1所述的方法,其中,所述第二音频数据包还包括ACK消息,所述ACK消息用于向所述音源指示所述第一音频接收器和所述第二音频接收器均成功接收到了所述第一音频数据包。
  12. 根据权利要求1至11任一所述的方法,其中,所述第一冗余信息还包括所述第一音频数据包中的至少一部分原始数据。
  13. 根据权利要求2所述的方法,其中,所述对所述第一冗余信息和所述第一音频数据进行解码,以还原所述第一音频数据包,包括:
    基于所述编码规则来确定对应的解码规则,并且通过所述解码规则来对所述第一冗余信息和所述第一音频数据进行解码,以还原所述第一音频数据包。
  14. 根据权利要求13所述的方法,其中,所述方法还包括:
    所述第一音频接收器与所述第二音频接收器被预配置为共享所述编码规则。
  15. 一种在第二音频接收器中重传音频数据包的方法,所述第二音频接收器配置为与音源进行通信,并且与第一音频接收器进行通信,所述方法包括:
    从所述音源接收第一音频数据包,所述第一音频数据包分别被所述第一音频接收器和所述第二音频接收器获取;
    从所述第一音频接收器接收第一NACK消息,所述第一NACK消息用于指示所述第一音频接收器未成功接收到所述第一音频数据包;
    基于所述第一NACK消息确定编码规则;
    使用所述编码规则编码所述第一音频数据包,以获得第一冗余信息;以及
    向所述第一音频接收器发送第二音频数据包,所述第二音频数据包包括第一冗余信息。
  16. 根据权利要求15所述的方法,其中,所述第二音频数据包还包括ACK消息,所述ACK消息用于向所述音源指示所述第一音频接收器和第二音频接收器均成功接收到了所述第一音频数据包。
  17. 根据权利要求15所述的方法,其中,所述方法还包括:向所述音源发送ACK消息,所述ACK消息用于向所述音源指示所述第一音频接收器和第二音频接收器均成功接收到了所述第一音频数据包。
  18. 根据权利要求15所述的方法,其中,所述第一NACK消息包括所述第一音频数据包的接收程度信息,所述从所述第一音频接收器接收第一NACK消息,包括:
    从所述第一音频接收器接收所述接收程度信息;
    所述基于所述第一NACK消息确定编码规则,包括:
    基于所述接收程度信息,确定所述编码规则。
  19. 根据权利要求15所述的方法,其中,所述第一NACK消息包括所述第一音频数据包的正确程度信息,所述从所述第一音频接收器接收第一NACK消息,包括:
    从所述第一音频接收器接收所述正确程度信息,所述正确程度信息用于指示所述第一音频数据包被正确接收的概率;
    所述基于所述第一NACK消息确定编码规则,包括:
    基于所述正确程度信息,确定所述编码规则。
  20. 根据权利要求15所述的方法,其中,所述从所述音源接收第一音频数据包,包括:
    在第一时隙内,从所述音源接收第一音频数据包;
    所述从所述第一音频接收器接收第一NACK消息,包括:
    在所述第一时隙内,从所述第一音频接收器接收所述第一NACK消息;
    所述向所述第一音频接收器发送第二音频数据包,包括:
    在第二时隙内,向所述第一音频接收器发送第二音频数据包,所述第二时隙是相对所述第一时隙的下一个时隙。
  21. 根据权利要求20所述的方法,其中,所述第二音频数据包还包括指示信息,所述指示信息用于指示所述第二时隙的时长,以便所述第二时隙适于所述第一音频接收器和所述第二音频接收器之间交互所述第一NACK消息和所述第二音频数据包。
  22. 根据权利要求15所述的方法,其中,所述方法还包括:
    接收所述第一音频接收器发送的第二接收失败通知,所述第二接收失败通知用于指示所述第一音频接收器对所述第一冗余信息和所述第一音频数据解码失败。
  23. 根据权利要求22所述的方法,其中,所述方法还包括:向所述第一音频接收器发送第三音频数据包,所述第三音频数据包包括第二冗余信息,所述第二冗余信息的数据量大于所述第一冗余信息的数据量,以便所述第一音频接收器对所述第二冗余信息和所述第一音频数据进行解码,以还原所述第一音频数据包。
  24. 根据权利要求15至23任一所述的方法,其中,所述第一冗余信息还包括所述第一音频数据包中的至少一部分原始数据。
  25. 一种在第一音频接收器中重传音频数据包的方法,所述第一音频接收器配置为与音源进行通信,并且与第二音频接收器进行通信,所述方法包括:
    从所述音源接收第一音频数据包,所述第一音频数据包分别被所述第一音频接收器和所述第二音频接收器获取;
    在所述第一音频数据包解码失败的情况下,在未接收到用于指示所述第二音频接收器解码所述第一音频数据包失败的通知时,向所述第二音频接收器发送第一NACK消息,所述第一NACK消息用于指示所述第一音频接收器未成功接收到所述第一音频数据包;以及
    接收所述音源重传的所述第一音频数据包,所述重传的所述第一音频数据包是所述音源在预设条件下发送的,所述预设条件是第一音频接收器和所述第二音频接收器均未能成功接收所述第一音频数据包。
  26. 一种在第二音频接收器中重传音频数据包的方法,所述第二音频接收器配置为与音源进行通信,并且与第一音频接收器进行通信,所述方法包括:
    在第一时隙从所述音源接收第一音频数据包,所述第一音频数据包分别被所述第一音频接收器和所述第二音频接收器获取;
    解码所述第一音频数据包;
    在所述音源被设置为在第二时隙中未接收到ACK消息时确认所述第一音频接收器和所述第二音频接收器均没有接收到所述第一音频数据包的情况下,在所述第一音频数据包解码失败且接收到所述第一音频接收器发送的第一NACK消息时,在所述第二时隙中不向所述音源发送反馈消息,所述反馈消息包括所述ACK消息和第二NACK消息,所述第二时隙是相对于所述第一时隙的下一时隙,所述第二NACK消息用于指示所述第一音频接收器和所述第二音频接收器均没有接收到所述第一音频数据包;以及
    在所述音源被设置为在第二时隙中接收到第二NACK消息时确认所述第一音频接收器和所述第二音频接收器均没有接收到所述第一音频数据包的情况下,在所述第一音频数据包解码失败且接收到所述第一音频接收器发送的第一NACK消息时,向所述音源发送第二NACK消息,所述第二时隙是相对于所述第一时隙的下一时隙,所述第二NACK消息用于指示所述第一音频接收器和所述第二音频接收器均没有接收到所述第一音频数据包。
  27. 一种在第一音频接收器中重传音频数据包的方法,所述第一音频接收器配置为与音源进行通信,并且与第二音频接收器进行通信,所述方法包括:
    从所述音源接收第一音频数据包,其中所述第一音频数据包分别被所述第一音频接收器和第二音频接收器获取;
    在所述第一音频数据包解码失败且已接收到的第一音频数据无法用于还原得到所述第一音频数据包的情况下,丢弃已接收到的所述第一音频数据;
    向所述第二音频接收器发送丢失通知,所述丢失通知用于指示所述第一音频接收器完全丢失所述第一音频数据包;以及
    接收所述第二音频接收器重传的所述第一音频数据包。
  28. 一种在第二音频接收器中重传音频数据包的方法,所述第二音频接收器配置为与音源进行通信,并且与第一音频接收器进行通信,所述方法包括:
    从所述音源接收第一音频数据包,所述第一音频数据包分别被所述第一音频接收器和第二音频接收器获取;
    在所述第一音频数据包解码成功且接收到所述第一音频接收器发送的丢失通知的情况下,向所述音源发送第二NACK消息,所述丢失通知用于指示所述第一音频接收器完全丢失所述第一音频数据包,所述第二NACK消息用于指示所述第一音频接收器和所述第二音频接收器均没有接收到所述第一音频数据包,以便所述音源向所述第一音频接收器重传所述第一音频数据包;以及
    在所述第一音频数据包解码成功且接收到所述第一音频接收器发送的丢失通知的情况下,向所述音源发送ACK消息,并向所述第一音频接收器发送完整的所述第一音频数据包,所述丢失通知用于指示所述第一音频接收器完全丢失所述第一音频数据包,所述ACK消息用于指示所述第一音频接收器和所述第二音频接收器均已接收到所述第一音频数据包。
  29. 根据权利要求28所述的方法,其中,所述从所述音源接收第一音频数据包,包括:
    在第一时隙从所述音源接收第一音频数据包;
    所述向所述音源发送第二NACK消息,包括:
    在第二时隙向所述音源发送第二NACK消息,所述第二时隙是相对于所述第一时隙的下一个时隙;
    所述向所述音源发送ACK消息,包括:
    在所述第二时隙向所述音源发送ACK消息。
  30. 根据权利要求29所述的方法,其中,所述向所述音源发送ACK消息,并向所述第一音频接收器发送完整的所述第一音频数据包,包括:
    将所述ACK消息和所述完整的所述第一音频数据包打包为一个组合数据包;在所述第二时隙向所述音源和所述第一音频接收器发送所述组合数据包;或;
    在所述第二时隙向所述音源发送所述ACK消息;并且在所述第二时隙向所述第一音频接收器重传所述第一音频数据包。
  31. 第一音频接收器,所述第一音频接收器包括处理器、和与所述处理器相连的存储器,以及存储在所述存储器上的至少一段程序,所述处理器执行所述至少一段程序时实现如权利要求1至14任一所述的在 第一音频接收器中重传音频数据包的方法,或,实现如权利要求25所述的在第一音频接收器中重传音频数据包的方法,或,实现如权利要求27所述的在第一音频接收器中重传音频数据包的方法。
  32. 第二音频接收器,所述第二音频接收器包括处理器、和与所述处理器相连的存储器,以及存储在所述存储器上的至少一段程序,所述处理器执行所述至少一段程序时实现如权利要求15至24任一所述的在第二音频接收器中重传音频数据包的方法,或,实现如权利要求26所述的在第二音频接收器中重传音频数据包的方法,或,实现如权利要求28至30任一所述的在第二音频接收器中重传音频数据包的方法。
  33. 一种计算机可读存储介质,所述存储介质中存储有至少一段程序,所述至少一段程序被处理器执行时实现如权利要求1至14任一所述的在第一音频接收器中重传音频数据包的方法,或,实现如权利要求25所述的在第一音频接收器中重传音频数据包的方法,或,实现如权利要求27所述的在第一音频接收器中重传音频数据包的方法。
  34. 一种计算机可读存储介质,所述存储介质中存储有至少一段程序,所述至少一段程序被处理器执行时实现如权利要求15至24任一所述的在第二音频接收器中重传音频数据包的方法,或,实现如权利要求26所述的在第二音频接收器中重传音频数据包的方法,或,实现如权利要求28至30任一所述的在第二音频接收器中重传音频数据包的方法。
  35. 一种计算机程序产品,所述计算机程序产品包括计算机指令,所述计算机指令存储在计算机可读存储介质中;计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行如权利要求1至14任一所述的在第一音频接收器中重传音频数据包的方法,或,实现如权利要求25所述的在第一音频接收器中重传音频数据包的方法,或,实现如权利要求27所述的在第一音频接收器中重传音频数据包的方法。
  36. 一种计算机程序产品,所述计算机程序产品包括计算机指令,所述计算机指令存储在计算机可读存储介质中;计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行如权利要求15至24任一所述的在第二音频接收器中重传音频数据包的方法,或,实现如权利要求26所述的在第二音频接收器中重传音频数据包的方法,或,实现如权利要求28至30任一所述的在第二音频接收器中重传音频数据包的方法。
  37. 一种无线音频系统,所述系统包括:
    音源;
    如权利要求1至14任一所述的第一音频接收器;以及
    如权利要求15至24任一所述的第二音频接收器。
  38. 一种无线音频系统,所述系统包括:
    音源;
    如权利要求25所述的第一音频接收器;以及
    如权利要求26所述的第二音频接收器。
  39. 一种无线音频系统,所述系统包括:
    音源;
    如权利要求27所述的第一音频接收器;以及
    如权利要求28至30任一所述的第二音频接收器。
PCT/CN2022/093496 2021-06-29 2022-05-18 重传音频数据包的方法、音频接收器、存储介质及系统 WO2023273671A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110726264.5A CN115549863A (zh) 2021-06-29 2021-06-29 重传音频数据包的方法、音频接收器、存储介质及系统
CN202110726264.5 2021-06-29

Publications (1)

Publication Number Publication Date
WO2023273671A1 true WO2023273671A1 (zh) 2023-01-05

Family

ID=84689984

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/093496 WO2023273671A1 (zh) 2021-06-29 2022-05-18 重传音频数据包的方法、音频接收器、存储介质及系统

Country Status (2)

Country Link
CN (1) CN115549863A (zh)
WO (1) WO2023273671A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102752087A (zh) * 2012-07-09 2012-10-24 华中科技大学 一种基于amc-arq跨层的链路自适应方法
CN110312237A (zh) * 2019-07-05 2019-10-08 恒玄科技(上海)有限公司 无线耳机及无线耳机的通信方法
EP3629539A1 (en) * 2018-09-28 2020-04-01 Rtx A/S Audio data buffering for low latency wireless communication
CN111770428A (zh) * 2020-06-24 2020-10-13 杭州国芯科技股份有限公司 一种无线设备的监听方法
CN112437369A (zh) * 2020-07-27 2021-03-02 珠海市杰理科技股份有限公司 音频数据的传输方法、系统、tws耳机对、芯片及介质
CN112804622A (zh) * 2019-11-13 2021-05-14 络达科技股份有限公司 无线音频输出装置及其操作方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102752087A (zh) * 2012-07-09 2012-10-24 华中科技大学 一种基于amc-arq跨层的链路自适应方法
EP3629539A1 (en) * 2018-09-28 2020-04-01 Rtx A/S Audio data buffering for low latency wireless communication
CN110312237A (zh) * 2019-07-05 2019-10-08 恒玄科技(上海)有限公司 无线耳机及无线耳机的通信方法
CN112804622A (zh) * 2019-11-13 2021-05-14 络达科技股份有限公司 无线音频输出装置及其操作方法
CN111770428A (zh) * 2020-06-24 2020-10-13 杭州国芯科技股份有限公司 一种无线设备的监听方法
CN112437369A (zh) * 2020-07-27 2021-03-02 珠海市杰理科技股份有限公司 音频数据的传输方法、系统、tws耳机对、芯片及介质

Also Published As

Publication number Publication date
CN115549863A (zh) 2022-12-30

Similar Documents

Publication Publication Date Title
CN111031437B (zh) 一种无线耳机组件及其通信方法
US11304090B2 (en) Method for correcting audio data during dual wireless communication and wireless playback system
JP2013518514A (ja) 多数決エラー訂正技術分野
US20220209893A1 (en) Adaptive Payload Extraction and Retransmission in Wireless Data Communications with Error Aggregations
US10887048B2 (en) Bluetooth transmission using low density parity check
TWI526019B (zh) 用於在無線區域網路系統中處理封包之方法及裝置
CN112187406B (zh) 一种真无线耳机的纠错方法、装置及介质
WO2018018627A1 (zh) 一种数据传输方法、系统及接收装置
WO2018137563A1 (zh) 发送和接收反馈信息的方法、接入网设备和终端设备
CN111770428B (zh) 一种无线设备的监听方法
CN113783662B (zh) 自适应数据传输方法、装置、计算机设备及可读存储介质
US20170288742A1 (en) Wireless data transmission method, network side device, user equipment, and system
US20220123862A1 (en) Polar code retransmission method and apparatus
CN103607264A (zh) 基于3g网络的带内数据传输方法
CN104113722A (zh) 一种无线视频会议传输方法
EP3790213B1 (en) Mac-based hybrid automatic repeat request (harq)
EP4184938A1 (en) Communication method and device used for wireless dual earphones
WO2023273671A1 (zh) 重传音频数据包的方法、音频接收器、存储介质及系统
TW202119793A (zh) 無線音訊輸出裝置與其操作方法
US20210336730A1 (en) Feedback Information Sending or Receiving Methods, Devices and System
CN113259803B (zh) 一种无线耳机组件及其信号处理方法
CN112217602B (zh) 集群语音包的处理方法、装置和终端
US20230117443A1 (en) Systems and Methods for Selective Storing of Data Included in a Corrupted Data Packet
WO2023226702A1 (zh) 一种通信方法及装置
US20240121549A1 (en) Earbud-to-earbud cross-acknowledgement and communication relay

Legal Events

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

Ref document number: 22831497

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE