This application relates to the field of Bluetooth audio communication technologies, and in particular, to a packet loss data error correction method and apparatus in dual-transmit mode, a device, and a system.
The Bluetooth Special Interest Group has added Bluetooth Low Energy (BLE) audio support (LE audio) to the Bluetooth protocol version 5.2. For applications of dual-wireless audio communication, for example, scenarios such as dual-wireless Bluetooth earphones and dual-wireless Bluetooth speakers, according to descriptions in the Bluetooth Low Energy protocol, an audio source device performs dual transmission for implementation, and only single-channel audio data belonging to its playing device is transmitted over each link. Therefore, there is inevitably a problem that a distance of dual-wireless audio communication decreases due to environmental changes, human interference, and the like. As a result, communication provided by a standard Bluetooth network does not meet application requirements of dual-wireless audio.
Existing dual-wireless Bluetooth audio devices are usually developed with changes made to the Bluetooth Classic protocol to obtain a new manner of audio communication, so as to meet requirements of dual-wireless audio communication. Currently, several methods used on Bluetooth Classic include a pure listening manner, a pure forwarding manner, a dual-transmit manner, and a listening and forwarding manner. The Bluetooth Special Interest Group has added audio functionality to the BLE section of the Bluetooth protocol 5.2, and adopts a dual-transmit manner for transmission of dual-wireless audio.
In the pure listening manner used on Bluetooth Classic, a Bluetooth audio source device connects to only one of two Bluetooth playing devices, and the Bluetooth playing device notifies the other Bluetooth playing device of information about a connection to the Bluetooth audio source device after being connected to the other Bluetooth playing device, so that the other Bluetooth playing device can listen to audio data from the Bluetooth audio source device based on the information and play the audio data synchronously, implementing dual-wireless Bluetooth audio functionality.
In the pure forwarding manner used on Bluetooth Classic, a Bluetooth audio source device connects to only one of two Bluetooth playing devices, and the Bluetooth playing device directly forwards audio data from the Bluetooth audio source device to the other Bluetooth playing device for synchronous playing after being connected to the other Bluetooth playing device, implementing dual-wireless Bluetooth audio functionality.
In the dual-transmit manner used on Bluetooth Classic, a Bluetooth audio source device connects to two Bluetooth playing devices separately, and transmits audio data to each Bluetooth playing device separately for synchronous playing, implementing dual-wireless Bluetooth audio functionality. This manner requires the Bluetooth audio source device to support dual-transmit functionality, hindering mass promotion and affecting competitiveness of products.
In the listening and forwarding manner used on Bluetooth Classic, the pure listening manner and the pure forwarding manner are integrated, so that reliability of communication can be optimized using the forwarding manner when communication over a listened-on link deteriorates, improving application scenarios of dual-wireless Bluetooth audio.
A wireless audio communication method used on BLE is similar to the dual-transmit manner used on Bluetooth Classic, as shown in
For the dual-wireless audio applications in dual-transmit mode described in the BLE protocol, in standard Bluetooth Low Energy protocol specifications, communication over the CIS1 or the CIS2 may be interfered with by factors such as environmental changes and human interference, for example, a position of a person's head in the dual-wireless audio communication network. Consequently, performance of the TWS Sink1 or the TWS Sink2 in receiving audio data deteriorates, resulting in a problem that dual-wireless audio communication encounters distance decreasing or stuttering, and affecting user experience.
Therefore, how impact of poor data reception performance that is due to interference caused by factors such as environments and human bodies to links is reduced in a case of the dual-transmit mode becomes an urgent technical problem to be resolved.
Based on the foregoing situation, the present invention mainly aims to provide a packet loss data error correction method and apparatus in dual-transmit mode, a device, and a system, to reduce, in a case of dual-transmit mode, impact of poor data reception performance that is due to interference caused by factors such as environments and human bodies to links.
To achieve the foregoing objective, technical solutions described in the present invention are as follows.
According to a first aspect, an embodiment of the present invention discloses a packet loss data error correction method in dual-transmit mode, used for controlling data exchange between a first Bluetooth playing device and a second Bluetooth playing device. The first Bluetooth playing device, the second Bluetooth playing device, and an audio source device constitute a Bluetooth communication network in dual-transmit mode. The audio source device establishes a first communication link with the first Bluetooth playing device, and the audio source device establishes a second communication link with the second Bluetooth playing device, so that the audio source device performs audio data communication with the first Bluetooth playing device and the second Bluetooth playing device separately. The packet loss data error correction method includes:
Optionally, the method further includes:
Optionally, in step S420, when the second forwarding request is received during the receiving window, the method further includes:
Optionally, in step S420, when the second forwarding request is not received during the receiving window, the method further includes:
Optionally, the preset time interval is a sum of maximum duration of audio data currently sent by the audio source device and an interframe space between adjacent packets.
According to a second aspect, an embodiment of the present invention discloses a packet loss data error correction apparatus in dual-transmit mode, configured to control data exchange between a first Bluetooth playing device and a second Bluetooth playing device. The first Bluetooth playing device, the second Bluetooth playing device, and an audio source device constitute a Bluetooth communication network in dual-transmit mode. The audio source device establishes a first communication link with the first Bluetooth playing device, and the audio source device establishes a second communication link with the second Bluetooth playing device, so that the audio source device performs audio data communication with the first Bluetooth playing device and the second Bluetooth playing device separately. The packet loss data error correction apparatus includes:
Optionally, the apparatus further includes:
Optionally, in the window opening module, when the second forwarding request is received during the receiving window, the following is further included:
Optionally, in the window opening module, when the second forwarding request is not received during the receiving window, the following is further included:
Optionally, the preset time interval is a sum of maximum duration of audio data currently sent by the audio source device and an interframe space between adjacent packets.
According to a third aspect, an embodiment of the present invention discloses a Bluetooth playing device, including:
According to a fourth aspect, an embodiment of the present invention discloses an audio signal processing system, including a first Bluetooth playing device and a second Bluetooth playing device. The first Bluetooth playing device and the second Bluetooth playing device are an audio playing device pair;
Optionally, the system further includes:
According to a fifth aspect, an embodiment of the present invention discloses a computer-readable storage medium. A computer program is stored in the computer-readable storage medium. The computer program stored in the storage medium is executed to implement the method disclosed in the first aspect.
According to a sixth aspect, an embodiment of the present invention discloses a chip for an audio device. An integrated circuit is provided on the chip. The integrated circuit is designed to implement the method disclosed in the first aspect.
According to the packet loss data error correction method and apparatus in dual-transmit mode, the device, and the system disclosed in the embodiments of the present invention, the first Bluetooth playing device exchanges link information with the second Bluetooth playing device over the information exchange link, so that the first Bluetooth playing device configures itself to listen on the second communication link based on link information provided by the second Bluetooth playing device, and the second Bluetooth playing device configures itself to listen on the first communication link based on link information provided by the first Bluetooth playing device. In this way, in dual-transmit mode, the first Bluetooth playing device and the second Bluetooth playing device can listen to audio data of each other. At the local link subevent anchor, the first Bluetooth playing device receives the first current audio data that is sent to the first Bluetooth playing device by the audio source device, where during the period, the second Bluetooth playing device listens to the first current audio data. In this way, the second Bluetooth playing device can also receive the audio data that is sent to the first Bluetooth playing device by the audio source device. When the first current audio data is not received at the local link subevent anchor, the first Bluetooth playing device sends the first forwarding request to the second Bluetooth playing device over the information exchange link the preset time interval after the local link subevent anchor. At the arrival of the agreed anchor, the first Bluetooth playing device receives the first current audio data that is forwarded by the second Bluetooth playing device based on the first forwarding request. In the embodiments of the present invention, in dual-transmit mode, when the first current audio data is not received, the first forwarding request is sent to the second Bluetooth playing device, and the first current audio data that is forwarded by the second Bluetooth playing device based on the first forwarding request is received. In this way, in dual-transmit mode, when data reception performance of the link of the first Bluetooth playing device deteriorates due to interference caused by factors such as environments and human bodies, the first current audio data can be forwarded by the second Bluetooth playing device. Because the first Bluetooth playing device and the second Bluetooth playing device are in different positions in space, a good space diversity gain can be obtained, reducing impact of poor signal quality that is caused by factors such as environments and human bodies. A manner of forwarding from another link is used to avoid a communication problem that is caused after a single link is interfered with, improving communication quality of dual Bluetooth playing devices.
Other beneficial effects of the present invention are elaborated on in the detailed description through description of specific technical features and technical solutions. With descriptions of the technical features and technical solutions, persons skilled in the art should be able to understand beneficial technical effects brought by the technical features and technical solutions.
The following describes embodiments of the present invention with reference to the accompanying drawings. Of the drawings:
The following describes this application based on embodiments, but this application is not limited merely to these embodiments. In descriptions of details of this application below, some specific details are described in detail. To avoid confusion about essence of this application, well-known methods, processes, procedures, and components are not described in detail.
In addition, persons of ordinary skill in the art should understand that the accompanying drawings provided herein are all for illustrative purposes and are not necessarily drawn to scale.
Unless explicitly indicated in the context, “include”, “comprise”, and similar words throughout the specification and claims should be interpreted as inclusive rather than exclusive or exhaustive, that is, as “including but not limited to”.
In descriptions of this application, it should be understood that terms such as “first” and “second” are used for descriptive purposes only, and shall not be understood as an indication or implication of relative importance. In addition, in the descriptions of this application, “a plurality of” means two or more unless otherwise specified.
To reduce, in a case of dual-transmit mode, impact of poor data reception performance that is due to interference caused by factors such as environments and human bodies to links, an embodiment discloses a packet loss data error correction method in dual-transmit mode.
In this embodiment, an example is used for description in which the first Bluetooth playing device 21 and the second Bluetooth playing device 22 are Bluetooth earphones. During specific implementation, the first Bluetooth playing device 21 and the second Bluetooth playing device 22 may alternatively be devices with Bluetooth and audio playing functions such as Bluetooth speakers.
It should be noted that the first Bluetooth playing device 21 and the second Bluetooth playing device 22 are paired playing devices. Therefore, roles of the first Bluetooth playing device 21 and the second Bluetooth playing device 22 can be interchanged, that is, “first” and “second” are used merely for distinguishing between two Bluetooth playing devices. For example, when the first Bluetooth playing device 21 is a left earphone, the second Bluetooth playing device 22 is a right earphone; or when the first Bluetooth playing device 21 is a right earphone, the second Bluetooth playing device 22 is a left earphone.
Step S100: Drive the first Bluetooth playing device to establish an information exchange link CTRL with the second Bluetooth playing device. With reference to
Step S200: Control the first Bluetooth playing device to exchange link information with the second Bluetooth playing device over the information exchange link. With reference to
Step S300: Control, at a local link subevent anchor (or anchor point), the first Bluetooth playing device to receive first current audio data that is sent to the first Bluetooth playing device by the audio source device, where during the period, the second Bluetooth playing device listens to the first current audio data. In this embodiment, the Bluetooth communication network in dual-transmit mode includes local link subevent anchors and listened-on link subevent anchors. With reference to
With reference to
Step S400: When the first current audio data is not received at the local link subevent anchor, control the first Bluetooth playing device to send, a preset time interval after the local link subevent anchor, a first forwarding request to the second Bluetooth playing device over the information exchange link CTRL. With reference to
In an optional embodiment, the preset time interval is a sum of maximum duration MPTm of audio data currently sent by the audio source device and an interframe space TIFS between adjacent packets. To be specific, the first Bluetooth playing device (for example, the TWS Sink2) sends the first forwarding request Rreq MPTm+TIFS after the local link subevent anchor. MPTm is converted from duration of a longest audio packet sent by the audio source device. Specifically, the duration of the longest audio packet can be obtained based on information of a header of the audio packet. The interframe space between adjacent packets is a time interval from the end of a previous packet to the start of a packet following the previous packet. TIFS is an interframe space of 150 ρs stipulated in the Bluetooth protocol. In this embodiment, the maximum duration MPTm is added to the interframe space TIFS between adjacent packets to form the preset time interval, avoiding that there is no space for an additional packet due to an excessively long packet.
Step S500: Control, at the arrival of an agreed anchor, the first Bluetooth playing device to receive the first current audio data that is forwarded by the second Bluetooth playing device based on the first forwarding request. With reference to
In an optional embodiment, preferably, the first communication link CIS1, the second communication link CIS2, and the information exchange link CTRL operate in a same frequency band.
According to the standard protocol, the first Bluetooth playing device does not send an ACK response to the audio source device if failing to receive the audio data. Therefore, based on that no ACK response is received, the audio source device retransmits the first current audio data. For example, at a position of the CIS2 subevent2 anchor in
Therefore, the first Bluetooth playing device 21 can simultaneously receive the first current audio data forwarded by the second Bluetooth playing device 22 and the first current audio data retransmitted by the audio source device 20. In other words, the first Bluetooth playing device 21 can receive the retransmitted/forwarded first current audio data from two devices. In this way, a probability that data reception fails again because a single link is interfered with is reduced, and a success rate of receiving the first current audio data is further increased.
To improve communication quality of the second Bluetooth playing device, in an optional embodiment, with reference to
Step S320: Control, at a listened-on link subevent anchor, the first Bluetooth playing device to listen to second current audio data that is sent to the second Bluetooth playing device by the audio source device. With reference to
Step S420: Control, a preset time interval after the listened-on link subevent anchor, the first Bluetooth playing device to open a receiving window for receiving a forwarding request. With reference to
In an optional embodiment, in step S420, when the second forwarding request is received during the receiving window, the method further includes: at the arrival of the agreed anchor, latching the first Bluetooth playing device into a forwarding state, and forwarding the second current audio data. In step S420, when the second forwarding request is not received during the receiving window, the method further includes: controlling the first Bluetooth playing device to return to perform step S300 or step S320.
Specifically, after receiving a forwarding request Rreq from the second Bluetooth playing device 22, the first Bluetooth playing device 21 (as a listening device of the second Bluetooth playing device 22) is latched into the forwarding state for forwarding a corresponding packet in a next listened-on link subevent. A forwarding state latching flag is used for determining whether receiving/listening to audio packets from a link continues or forwarding a previous audio packet is performed at an agreed anchor. If the latched forwarding state is forwarding, the first Bluetooth playing device 21 (as a listening device of the second Bluetooth playing device 22) performs forwarding at the agreed anchor, or otherwise, performs receiving/listening.
As shown in
To help persons skilled in the art understand the foregoing information, the following describes
Case 1: A current time point is a local link subevent anchor.
As shown in
Due to interference caused by an environmental change, a human body, or the like, reception performance of a TWS device deteriorates and cannot receive audio data from a local link. For example, the device TWS Sink2 cannot receive the audio data 401 (indicated by the mark 443 in
Case 2: A current time point is a listened-on link subevent anchor.
A TWS device determines whether a current time point is a listened-on link CIS subevent anchor. For example, the device TWS Sink1 determines whether a current time point is at a position of a link CIS2 subevent anchor, or the device TWS Sink2 determines whether a current time point is at a position of a link CIS1 subevent anchor.
As shown in
The device TWS Sink1 starts to receive to the audio data 401 from the listened-on link CIS at the CIS2 subevent anchor, and the device TWS Sink2 starts to receive the audio data 400 from the listened-on link CIS at the CIS1 subevent anchor.
If obtaining an audio packet through listening, a TWS device opens, MPTm+TIFS after a listened-on link subevent anchor, a receiving window to receive a forwarding request, as indicated by the mark 441 for the TWS Sink2 that serves as a listening device of the TWS Sink1, and as indicated by the mark 422 for the TWS Sink1 that serves as a listening device of the TWS Sink2 in
If no forwarding request packet is received at the position, for example, if the TWS Sink2 that serves as a listening device of the TWS Sink1 does not receive a forwarding request at the mark 441, the listening device TWS Sink2 decides to continue listening to, at a position of a next listened-on link anchor (for example, a position indicated by the mark 442), audio source data that is sent to the TWS Sink1 by the audio device.
If a forwarding request packet is received at the position, for example, if the TWS Sink1 that serves as a listening device of the TWS Sink2 receives a forwarding request 444 at the mark 422, the listening device TWS Sink1 determines, based on information included in the forwarding request packet, whether a corresponding audio packet is obtained through listening, and decides to forward corresponding audio data 423 at a position of a next listened-on link anchor.
An embodiment further discloses a packet loss data error correction apparatus in dual-transmit mode, configured to control data exchange between a first Bluetooth playing device and a second Bluetooth playing device. The first Bluetooth playing device, the second Bluetooth playing device, and an audio source device constitute a Bluetooth communication network in dual-transmit mode. The audio source device establishes a first communication link CIS1 with the first Bluetooth playing device, and the audio source device establishes a second communication link CIS2 with the second Bluetooth playing device, so that the audio source device performs audio data communication with the first Bluetooth playing device and the second Bluetooth playing device separately.
The information exchange link establishment module 100 is configured to drive the first Bluetooth playing device to establish an information exchange link CTRL with the second Bluetooth playing device. The first Bluetooth playing device and the second Bluetooth playing device exchange communication information over the information exchange link CTRL.
The link information exchange module 200 is configured to control the first Bluetooth playing device to exchange link information with the second Bluetooth playing device over the information exchange link CTRL, so that the first Bluetooth playing device configures itself to listen on the second communication link CIS2 based on link information provided by the second Bluetooth playing device, and the second Bluetooth playing device configures itself to listen on the first communication link CIS1 based on link information provided by the first Bluetooth playing device.
The first receiving module 300 is configured to control, at a local link subevent anchor, the first Bluetooth playing device to receive first current audio data that is sent to the first Bluetooth playing device by the audio source device, where during the period, the second Bluetooth playing device listens to the first current audio data, and the local link subevent anchor is a time point at which the audio source device sends audio data to the first Bluetooth playing device over the first communication link CIS1.
The request sending module 400 is configured to: when the first current audio data is not received at the local link subevent anchor, control the first Bluetooth playing device to send, a preset time interval after the local link subevent anchor, a first forwarding request to the second Bluetooth playing device over the information exchange link CTRL, so that the second Bluetooth playing device forwards the first current audio data.
The second receiving module 500 is configured to control, at the arrival of an agreed anchor, the first Bluetooth playing device to receive the first current audio data that is forwarded by the second Bluetooth playing device based on the first forwarding request.
In an optional embodiment, the apparatus further includes:
In an optional embodiment, in the window opening module, when the second forwarding request is received during the receiving window, the following is further included:
In an optional embodiment, in the window opening module, when the second forwarding request is not received during the receiving window, the following is further included:
In an optional embodiment, the preset time interval is a sum of maximum duration of audio data currently sent by the audio source device and an interframe space between adjacent packets.
An embodiment further discloses a Bluetooth playing device. The Bluetooth playing device may be a device with wireless data exchange functionality such as Bluetooth earphones or Bluetooth speakers. The Bluetooth playing device includes a processor, configured to implement the method disclosed in the foregoing embodiment.
An embodiment further discloses an audio signal processing system, including a first Bluetooth playing device and a second Bluetooth playing device. The first Bluetooth playing device and the second Bluetooth playing device are an audio playing device pair, for example, a left and right earphone pair or a left and right speaker pair. In this embodiment, the first Bluetooth playing device has the apparatus disclosed in the foregoing embodiment, and the second Bluetooth playing device has the apparatus disclosed in the foregoing embodiment.
In an optional embodiment, the audio signal processing system further includes an audio source device. The audio source device is configured to provide audio data to the first Bluetooth playing device and the second Bluetooth playing device. The audio source device may be a device with a function of sending audio data over Bluetooth, such as a mobile phone, a tablet, a notebook computer, or a music player.
An embodiment further discloses a computer-readable storage medium. A computer program is stored in the computer-readable storage medium. The computer program stored in the storage medium is executed to implement the method disclosed in the foregoing embodiment.
An embodiment further discloses a chip for an audio device. An integrated circuit is provided on the chip. The integrated circuit is designed to implement the method disclosed in the foregoing embodiment.
According to the packet loss data error correction method and apparatus in dual-transmit mode, the device, and the system disclosed in the embodiments of the present invention, the first Bluetooth playing device exchanges link information with the second Bluetooth playing device over the information exchange link, so that the first Bluetooth playing device configures itself to listen on the second communication link based on link information provided by the second Bluetooth playing device, and the second Bluetooth playing device configures itself to listen on the first communication link based on link information provided by the first Bluetooth playing device. In this way, in dual-transmit mode, the first Bluetooth playing device and the second Bluetooth playing device can listen to audio data of each other. At the local link subevent anchor, the first Bluetooth playing device receives the first current audio data that is sent to the first Bluetooth playing device by the audio source device, where during the period, the second Bluetooth playing device listens to the first current audio data. In this way, the second Bluetooth playing device can also receive the audio data that is sent to the first Bluetooth playing device by the audio source device. When the first current audio data is not received at the local link subevent anchor, the first Bluetooth playing device sends the first forwarding request to the second Bluetooth playing device over the information exchange link the preset time interval after the local link subevent anchor. At the arrival of the agreed anchor, the first Bluetooth playing device receives the first current audio data that is forwarded by the second Bluetooth playing device based on the first forwarding request. In the embodiments of the present invention, in dual-transmit mode, when the first current audio data is not received, the first forwarding request is sent to the second Bluetooth playing device, and the first current audio data that is forwarded by the second Bluetooth playing device based on the first forwarding request is received. In this way, in dual-transmit mode, when data reception performance of the link of the first Bluetooth playing device deteriorates due to interference caused by factors such as environments and human bodies, the first current audio data can be forwarded by the second Bluetooth playing device. Because the first Bluetooth playing device and the second Bluetooth playing device are in different positions in space, a good space diversity gain can be obtained, reducing impact of poor signal quality that is caused by factors such as environments and human bodies. A manner of forwarding from another link is used to avoid a communication problem that is caused after a single link is interfered with, improving communication quality of dual Bluetooth playing devices.
It should be noted that using step numbers (letters or numbers) to represent some specific method steps in the present invention is merely for ease of description and brevity, rather than using letters or numbers to limit an order of these method steps. Persons skilled in the art can understand that an order of related method steps should be determined by the technology and should not be improperly limited due to presence of step numbers.
Persons skilled in the art can understand that the foregoing preferred solutions can be combined and superimposed freely if they do not conflict.
It should be understood that the foregoing implementations are merely illustrative but not restrictive. Without departing from basic principles of the present invention, any obvious or equivalent modifications or substitutions made by persons skilled in the art to the foregoing details shall be included in the scope of the claims of the present invention.
Number | Date | Country | Kind |
---|---|---|---|
202110830805.9 | Jul 2021 | CN | national |
The present application is a Continuation application of PCT Application No. PCT/CN2021/132494 filed on Nov. 23, 2021, which claims the benefit of Chinese Patent Application No. 202110830805.9 filed on Jul. 22, 2021. All the above are hereby incorporated by reference in their entirety.
Number | Date | Country | |
---|---|---|---|
Parent | PCT/CN2021/132494 | Nov 2021 | WO |
Child | 18608963 | US |