Audio data transmission method, terminal, device, storage medium and program product

By counting the number of retransmissions of audio data by the sending terminal at the main terminal and forwarding the data to the slave terminal when the threshold is reached, the problem of frequent retransmissions in TWS headsets but failed transmission is solved, and the success rate of audio data transmission is improved.

CN119544156APending Publication Date: 2025-02-28GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202311120892.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-31
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

In TWS headsets, the main ear and the mobile phone are connected, the main ear and the slave ear are connected, and the interactive data packets of the main ear and the mobile phone are monitored at the same time, resulting in the mobile phone being retransmitted frequently but still failing to transmit if any headset is received.

Method used

When the master terminal does not receive the monitoring confirmation information from the slave terminal, the number of retransmissions of the audio data by the sending terminal is counted. If the preset number threshold is reached, the audio data is forwarded to the slave terminal.

Benefits of technology

The number of times the transmitter retransmits audio data is reduced and the success rate of audio data transmission is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119544156A_ABST
    Figure CN119544156A_ABST
Patent Text Reader

Abstract

The invention relates to an audio data transmission method, a terminal, equipment, a storage medium and a program product. The method comprises the following steps: receiving audio data sent by a sending end; under the condition that the monitoring confirmation information of the slave terminal is not received, determining the retransmission times of sending the audio data to the master terminal by the sending end; wherein the monitoring confirmation information is used for indicating that the audio data is monitored by the slave terminal; and forwarding the audio data to the slave terminal under the condition that the retransmission frequency reaches a preset frequency threshold. By adopting the method, the frequency of retransmitting the audio data by the sending end can be reduced, and the success rate of audio data transmission can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic technology, and in particular to an audio data transmission method, terminal, device, storage medium and program product. Background Art

[0002] With the maturity of True Wireless Stereo (TWS) technology, TWS has become extremely popular due to its light and cordless portability, and there are more and more scenarios and environments in which users use TWS headphones.

[0003] In the related art, the master ear of the TWS headset maintains connection and interactive communication with the mobile phone, and the slave ear maintains connection and interactive communication with the master ear while monitoring the interactive data packets between the master ear and the mobile phone. During the data transmission between the master ear and the slave ear, if any earphone fails to receive, the mobile phone is required to retransmit the data packet. There may be a situation where the mobile phone frequently retransmits but still fails to transmit. Summary of the invention

[0004] Based on this, it is necessary to provide an audio data transmission method, terminal, device, storage medium and program product that can reduce the number of times the sender retransmits audio data and improve the success rate of audio data transmission in response to the above technical problems.

[0005] In a first aspect, the present application provides an audio data transmission method, which is applied to a master terminal, and the method includes:

[0006] Receive the message data sent by the sender;

[0007] In the case where the monitoring confirmation information of the slave terminal is not received, determining the number of retransmissions of the audio data sent by the transmitting end to the master terminal; wherein the monitoring confirmation information is used to indicate that the slave terminal monitors the audio data;

[0008] When the number of retransmissions reaches a preset number threshold, the audio data is forwarded to the slave terminal.

[0009] In one of the embodiments, the method further includes: determining a first received signal strength of the master terminal receiving the transmitter signal and a second received signal strength of the slave terminal receiving the transmitter signal; and determining whether to switch the master-slave relationship based on the first received signal strength and the second received signal strength.

[0010] In one of the embodiments, determining whether to switch the master-slave relationship based on the first received signal strength and the second received signal strength includes: when the second received signal strength is greater than the first received signal strength, switching the master-slave relationship between the master terminal and the slave terminal.

[0011] In one of the embodiments, determining the number of retransmissions of the audio data sent by the transmitter to the master terminal when no monitoring confirmation information is received from the slave terminal includes: returning non-confirmation information to the transmitter when no monitoring confirmation information is received from the slave terminal, the non-confirmation information being used to instruct the transmitter to retransmit the audio data to the master terminal; and updating the number of retransmissions when no monitoring confirmation information is received from the slave terminal for the retransmitted audio data.

[0012] In one of the embodiments, when the number of retransmissions reaches a preset number threshold, forwarding the audio data to the slave terminal includes: when the number of retransmissions reaches the preset number threshold, returning confirmation information to the sending end; forwarding the audio data to the slave terminal through a preset channel negotiated with the slave terminal.

[0013] In one of the embodiments, before forwarding the audio data to the slave terminal through the preset channel negotiated with the slave terminal, the method also includes: determining the difference between a third received signal strength and a second received signal strength of the master terminal signal received by the slave terminal; the second received signal strength is the received signal strength of the transmitter signal received by the slave terminal; correspondingly, forwarding the audio data to the slave terminal through the preset channel negotiated with the slave terminal includes: when the difference is greater than a preset difference threshold, forwarding the audio data to the slave terminal through the preset channel.

[0014] In one of the embodiments, after forwarding the audio data to the slave terminal through a preset channel negotiated with the slave terminal, the method further includes: in response to not receiving confirmation information fed back by the slave terminal, continuing to forward the audio data to the slave terminal until receiving confirmation information fed back by the slave terminal.

[0015] In one of the embodiments, after forwarding the audio data to the slave terminal through a preset channel negotiated with the slave terminal, the method further includes: in response to receiving confirmation information fed back by the slave terminal, switching from the preset channel to a communication channel with the sending end; and receiving audio data sent by the sending end on the communication channel.

[0016] In a second aspect, the present application further provides an audio data transmission terminal, the terminal comprising:

[0017] A receiving module, used for receiving the audio data sent by the sending end;

[0018] A first determination module is used to determine the number of retransmissions of the audio data sent by the transmitting end to the master terminal when no monitoring confirmation information is received from the slave terminal; wherein the monitoring confirmation information is used to indicate that the slave terminal monitors the audio data;

[0019] The forwarding module is used to forward the audio data to the slave terminal when the number of retransmissions reaches a preset number threshold.

[0020] In a third aspect, the present application further provides an electronic device, wherein the electronic device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the first aspect are implemented.

[0021] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the first aspect are implemented.

[0022] In a fifth aspect, the present application further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the first aspect are implemented.

[0023] In the above-mentioned audio data transmission method, terminal, device, storage medium and program product, after the master terminal receives the audio data sent by the sender, if it does not receive the monitoring confirmation information from the slave terminal, it determines the number of times the sender retransmits the audio data; the monitoring confirmation information is used to indicate that the slave terminal monitors the audio data. And, if the number of retransmissions reaches a preset number threshold, the master terminal forwards the audio data to the slave terminal. In this way, after the master terminal receives the audio data, if it does not receive the monitoring confirmation information from the slave terminal, it starts to count the number of retransmissions of the audio data by the sender to determine whether the number of retransmissions reaches the preset number threshold; if the number of retransmissions is high, the master terminal forwards the audio data to the slave terminal; in this way, it can not only reduce the number of times the sender retransmits the audio data, but also improve the success rate of audio data transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 A schematic diagram of the implementation framework of master-slave earphone data transmission in the related art;

[0025] Figure 2 A diagram showing an application environment of an audio data transmission method in one embodiment;

[0026] Figure 3 A schematic diagram of a flow chart of an audio data transmission method in one embodiment;

[0027] Figure 4A schematic diagram of a flow chart of steps for switching a master-slave relationship in an embodiment;

[0028] Figure 5 Schematic diagram of the implementation process of step 302 in one embodiment;

[0029] Figure 6 Schematic diagram of the implementation process of step 303 in one embodiment;

[0030] Figure 7 A schematic diagram of an implementation framework of an audio data transmission method in an embodiment;

[0031] Figure 8 A schematic diagram of another implementation framework of an audio data transmission method in one embodiment;

[0032] Fig. 9 It is another implementation framework schematic diagram of the audio data transmission method in one embodiment;

[0033] Fig.10 is a structural block diagram of an audio data transmission terminal in one embodiment;

[0034] Fig.11 FIG. 4 is a diagram showing the internal structure of an electronic device in one embodiment. DETAILED DESCRIPTION

[0035] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0036] In some embodiments, users use TWS headphones in a variety of scenarios, such as making phone calls, watching videos, and holding video conferences; the environments in which TWS headphones are used include outdoors, offices, airports, stations, and other environments. Since TWS uses Bluetooth wireless communication technology, it has natural disadvantages compared to corded headphones. For example, the quality of the transmission signal is greatly affected by the transmission distance and is easily interfered by other electromagnetic wave signals around it. In particular, the Bluetooth signal uses the unlicensed Industrial, Scientific and Medical (ISM) 2.4 Gigabit (G) frequency band, and many devices also work in this frequency band, such as microwave ovens, cordless phones, infrared, wireless cameras, etc. Therefore, the Bluetooth signal is easily interfered by surrounding signals.

[0037] The Bluetooth headset in the related technology has only one earphone, because the mobile phone can only communicate with one peer device at the same time. In order to achieve that both earphones of the TWS headset can receive the data packets from the mobile phone and play them at the same time, the related technology maintains connection and interactive communication between the master ear and the mobile phone, and the slave ear maintains connection and interactive communication with the master ear while listening to the interactive data packets between the master ear and the mobile phone. When the slave ear successfully monitors the data packet, the slave ear sends a paging (page) confirmation packet to the master ear before the end time when the master ear receives the data packet and the start time of replying to the mobile phone. The master ear replies to the mobile phone based on whether the master and slave ears have successfully received the data packet. When the master and slave ears have successfully received the audio data packet sent by the mobile phone, the master ear replies with an acknowledgment character packet (Acknowledge character, ACK) to the mobile phone. The mobile phone does not need to retransmit, but prepares to send the next packet of data. When either the master or slave ear fails to successfully receive the data packet, the master ear will reply with a non-acknowledgement character packet (Negative Acknowledgement, NAK) to the mobile phone. After receiving the NAK, the mobile phone retransmits the data packet to the headset until it receives the headset reply ACK packet. Such as Figure 1 As shown, for data packet 0 (packet0), both the master ear 12 and the slave ear 13 receive successfully, so there is no need to retransmit. When receiving packet 1, the slave ear fails to receive, causing the master ear 12 to reply NAK to the mobile phone 11, and the mobile phone 11 retransmits packet 1 once; then the master ear 12 fails to receive, causing the master ear 12 to reply NAK to the mobile phone 11, and the mobile phone 11 retransmits packet 1 for the second time. The last time, both the master ear 12 and the slave ear 13 receive successfully, and the master ear replies ACK to the mobile phone, and the mobile phone will not retransmit. When receiving packet2, both the master ear 12 and the slave ear 13 receive successfully, so there is no need to retransmit.

[0038] In actual applications, due to the user's usage scenario, one earphone is more likely to receive successfully, while the other earphone is not, which causes the mobile phone to frequently retransmit, but still fails to transmit. For example, when holding the mobile phone in the right hand, the right ear is closer to the visual distance, so it is easier to transmit successfully, while the left ear is more likely to fail to transmit because the signal is severely attenuated because it has to pass through the head. Therefore, blindly requiring the mobile phone to retransmit cannot solve the problem of data transmission failure.

[0039] Based on this, an embodiment of the present application provides an audio data transmission method. When the main terminal does not receive the monitoring confirmation information from the slave terminal, the number of retransmissions of the audio data by the sending end is counted to determine whether the number of retransmissions reaches a preset threshold; if the number of retransmissions is high, the main terminal forwards the audio data to the slave terminal, thereby reducing the number of times the sending end retransmits the audio data and improving the success rate of audio data transmission.

[0040] The audio data transmission method provided in the embodiment of the present application can be applied to Figure 2In the application environment shown. Among them, the main terminal 101 is connected to the transmitting terminal 102, and the main terminal 101 is connected to the slave terminal 103. The transmitting terminal 102 sends audio data to the main terminal 101, and the slave terminal 103 monitors the communication link between the transmitting terminal and the main terminal. If the main terminal 101 does not receive the monitoring confirmation information from the slave terminal 103, the number of retransmissions of the audio data by the transmitting terminal 102 is counted; if the number of retransmissions reaches the preset number threshold, the main terminal 101 forwards the audio data to the slave terminal 103 to reduce the number of retransmissions of the audio data by the transmitting terminal. Among them, the transmitting terminal 102 can be but not limited to various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices, and the Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The main terminal 101 and the slave terminal 103 can be the master ear and slave ear in a pair of Bluetooth headsets, or the master speaker and slave speaker in a pair of Bluetooth speakers, etc.

[0041] In one embodiment, Figure 3 As shown, a method for audio data transmission is provided, which is applied to Figure 2 The main terminal in the example is used as an example to illustrate, including the following steps:

[0042] Step 301, receiving the audio data sent by the sending end.

[0043] The audio data may be any type of audio, such as audio in Compact Disc (CD) format, audio in Waveform Audio File Format (WAV) format, audio in Media Player Three (MP3) format, audio in Windows Media Audio (WMA) format, or noise audio, etc. In some possible implementations, the master terminal receives the audio data first sent by the sender. Alternatively, the master terminal does not receive the audio data first sent by the sender, and returns a NAK to the sender, so that the sender retransmits the audio data until the master terminal receives the audio data.

[0044] Step 302: When no monitoring confirmation information is received from the slave terminal, determine the number of retransmissions of the audio data sent by the transmitting end to the master terminal.

[0045] The monitoring confirmation information is used to indicate that the slave terminal monitors that the master terminal receives the audio data sent by the transmitter. The number of retransmissions indicates the number of times the transmitter repeatedly sends the audio data to the master terminal. The transmitter is only connected to the master terminal, the slave terminal is connected to the master terminal, and the slave terminal is not connected to the transmitter. The slave terminal can monitor the communication link between the master terminal and the transmitter to monitor the data interaction between the master terminal and the transmitter.

[0046] Exemplarily, the transmitting end sends audio data to the main terminal, and the slave terminal monitors the audio data sent by the transmitting end to the main terminal. If the slave terminal monitors the audio data sent by the transmitting end to the main terminal, then the slave terminal transmits a monitoring confirmation message (e.g., a page packet) to the main terminal, so that the slave terminal informs the main terminal through the monitoring confirmation message that the audio data is successfully received from the slave terminal. In some possible implementations, if the main terminal does not receive the monitoring confirmation message from the slave terminal, it means that the slave terminal has not successfully monitored the audio data sent by the transmitting end to the main terminal. At this time, the main terminal returns the unconfirmed reception information to the transmitting end, so that the transmitting end retransmits the audio data; and starts to count the number of times the transmitting end retransmits the audio data. If the transmitting end still does not receive the monitoring confirmation message fed back by the slave terminal for the retransmitted audio data after retransmitting the audio data, then the number of retransmissions is increased by 1, so that the final number of retransmissions is obtained.

[0047] Step 303: when the number of retransmissions reaches a preset number threshold, forward the audio data to the slave terminal.

[0048] The preset number threshold can be user-defined or determined according to the data processing capability of the sending end. For example, if the data processing capability of the sending end is strong, the preset number threshold can be set to be slightly larger; if the data processing capability of the sending end is strong, the preset number threshold can be set to be slightly smaller.

[0049] Exemplarily, if the number of retransmissions reaches a preset number threshold, it means that the sender has repeatedly sent the audio data for a large number of times, and it also means that even if it is retransmitted many times, the slave terminal still cannot monitor the audio data. The master terminal returns confirmation information to the sender so that the sender will not continue to repeatedly transmit the audio data. And the master terminal forwards the received audio data to the slave terminal so that the slave terminal can receive the audio data and demodulate it. In this way, after the sender continues to retransmit, since the retransmission is invalid, further retransmission will waste more air interface resources. At this time, the master terminal directly forwards the audio data to the slave terminal, which can not only improve the data success rate, but also reduce the frequent transmission of audio data by the sender.

[0050] In an embodiment of the present application, if the master terminal does not receive the monitoring confirmation information from the slave terminal, it starts to count the number of retransmissions of the audio data by the sender to determine whether the number of retransmissions reaches a preset threshold; if the number of retransmissions is high, it means that after multiple retransmissions, the slave terminal still has not monitored the audio data. At this time, the master terminal forwards the audio data to the slave terminal; in this way, it can not only reduce the number of times the sender retransmits the audio data, but also improve the success rate of audio data transmission.

[0051] In one embodiment, in order to enable the main terminal connected to the transmitting end to receive the audio data with a stronger signal strength, Figure 4 The steps shown achieve:

[0052] Step 401 determines a first received signal strength of a signal received by the master terminal from a transmitting end and a second received signal strength of a signal received by the slave terminal from a transmitting end.

[0053] The first received signal strength is the signal strength of the transmitting end signal that can be received by the master terminal, and the second received signal strength is the signal strength of the transmitting end signal that can be received by the slave terminal. In some possible implementations, the master terminal receives the second received signal strength fed back by the slave terminal, and obtains the first received signal strength of the transmitting end signal received by itself.

[0054] Step 402: Determine whether to switch the master-slave relationship based on the first received signal strength and the second received signal strength.

[0055] In some possible implementations, by comparing the first received signal strength and the second received signal strength, the master-slave relationship between the master terminal and the slave terminal is switched according to the comparison result, so that the master-slave relationship between the master terminal and the slave terminal can match the respective received signal strengths. In this way, by analyzing the received signal strengths of the master terminal and the slave terminal respectively receiving the signal from the transmitting end, the master-slave relationship between the master terminal and the slave terminal is switched in real time, so that the master terminal connected to the transmitting end can always receive audio data with a stronger signal strength, thereby improving the accuracy of the master terminal receiving the audio data.

[0056] In some possible implementations, the above step 402 may be implemented by the following steps 421 (not shown):

[0057] Step 421: When the second received signal strength is greater than the first received signal strength, switching the master-slave relationship between the master terminal and the slave terminal.

[0058] Among them, after the master terminal receives the second received signal strength fed back from the slave terminal, it compares the numerical values ​​of the first received signal strength and the second received signal strength to obtain the numerical relationship. In this way, the numerical relationship includes: the first received signal strength is greater than the second received signal strength, or the first received signal strength is less than the second received signal strength. If the second received signal strength is greater than the first received signal strength, the master terminal switches to the slave terminal, disconnects from the transmitter, and monitors the audio data sent by the transmitter to the new master terminal; at the same time, the slave terminal receives the first received signal strength fed back from the master terminal, and by judging the numerical value between the first received signal strength and the second received signal strength, if the second received signal strength is greater than the first received signal strength, the slave terminal switches to the master terminal and connects to the transmitter.

[0059] Among them, if the numerical relationship indicates that the second received signal strength is greater than the first received signal strength, it means that the signal strength received from the terminal to the main terminal at the current moment is stronger, and the master-slave relationship between the main terminal and the slave terminal is switched in time. That is, the main terminal with a smaller received signal strength is switched to the slave terminal, and the slave terminal with a higher received signal strength is switched to the main terminal. In this way, when it is detected that the received signal strength of the slave terminal is greater than the received signal strength of the master terminal, the master-slave relationship between the master terminal and the slave terminal is switched in time, so that the master terminal is always the terminal with a larger received signal strength, thereby improving the success rate of the master terminal receiving audio data.

[0060] In one embodiment, in order to accurately count the number of times the master terminal retransmits the audio data, the above step 302 can be performed by Figure 5 The steps shown achieve:

[0061] Step 501: Returning non-acknowledgement information to the sending end when no monitoring confirmation information from the slave terminal is received, wherein the non-acknowledgement information is used to instruct the sending end to retransmit the audio data to the master terminal.

[0062] Among them, the unconfirmed information is used to indicate that at least one of the master terminal and the slave terminal has not obtained the audio data, and the sending end needs to retransmit the audio data. For example, the unconfirmed information can be a negative acknowledgement (NAK). If the master terminal does not receive the monitoring confirmation information from the slave terminal, it means that the slave terminal has not monitored the audio data and has not sent a page packet to the master terminal. While the monitoring confirmation information from the slave terminal is not received, the master terminal may have received the audio data or may not have received the audio data. In order to enable both the master terminal and the slave terminal to obtain the audio data, the master terminal sends the unconfirmed information to the sending end, and the sending end retransmits the audio data to the master terminal in response to the unconfirmed information. At the same time, the slave terminal monitors the retransmitted audio data, and may monitor the audio data or may not monitor the audio data. If the slave terminal monitors the audio data, the slave terminal feeds back monitoring confirmation information to the master terminal, the master terminal receives the monitoring confirmation information, and returns confirmation information to the sender. In this way, after receiving the confirmation information, the sender will not retransmit the audio data, but continue to send other audio data in the next clock cycle.

[0063] In some possible implementations, when the monitoring confirmation information of the slave terminal is not received and the master terminal itself has received the audio data, non-confirmation information is returned to the sending end, and a counter is started at the same time, and the counter counts to 1.

[0064] Step 502: if no monitoring confirmation information of the retransmitted audio data is received from the slave terminal, update the number of retransmissions.

[0065] If the monitoring confirmation information of the retransmitted audio data is not received from the slave terminal, it means that the slave terminal still has not monitored the retransmitted audio data of the sender. At this time, the count value is increased by 1, that is, the number of retransmissions is increased by 1, and so on, the number of retransmissions is increased one by one until the number of retransmissions reaches the preset number threshold. In this way, after the master terminal returns the unconfirmed information to the sender, the sender retransmits the audio data in response to the unconfirmed information. If the monitoring confirmation information from the slave terminal is still not received, the number of retransmissions is increased. In this way, the number of retransmissions of the audio data by the sender can be accurately counted.

[0066] If the monitoring confirmation information of the slave terminal is not received, the number of retransmissions of the audio data sent by the sender to the master terminal is counted. In order to reduce the frequent retransmission of the audio data by the sender, the above step 303 can be performed by Figure 6 Steps 601 and 602 shown implement:

[0067] Step 601: When the number of retransmissions reaches the preset number threshold, return confirmation information to the sending end.

[0068] The confirmation information is used to indicate that both the master terminal and the slave terminal have obtained the audio data, and the sender does not need to retransmit the audio data. In this way, the number of retransmissions reaches the preset number threshold, indicating that although the sender has retransmitted the audio data many times, the slave terminal still has not heard it, which means that the sender retransmitting the audio data cannot effectively solve the problem that the slave terminal cannot hear the audio data. Therefore, in order to reduce the frequent retransmission of the sender, the master terminal returns the confirmation information to the sender, so that the sender stops retransmitting the audio data in response to the confirmation information.

[0069] Step 602: forwarding the audio data to the slave terminal via a preset channel negotiated with the slave terminal.

[0070] Among them, the preset channel is the channel negotiated by the master terminal and the slave terminal, and the preset channel is different from the channel for transmitting data between the master terminal and the transmitter; in this way, although the transmitter stops retransmitting audio data and continues to transmit other audio data in the next clock cycle, the preset channel is different from the communication channel corresponding to the transmitter, so the master terminal will not be affected by the transmitter sending other audio data to the master terminal during the process of forwarding audio data to the slave terminal, which can improve the accuracy of the master terminal forwarding audio data. In this way, if the number of retransmissions has reached the preset number threshold, it means that the slave terminal still cannot monitor the audio data after the transmitter retransmits the audio data for many times, then the master terminal forwards the audio data to the slave terminal through the preset channel to improve the success rate of the slave terminal monitoring the audio data, and can control the transmitter from continuing to retransmit frequently.

[0071] After the above step 602, if the confirmation information is still not received, the master terminal continues to forward the audio data to the slave terminal so that the slave terminal can accurately receive the audio data, which can be achieved through step 603:

[0072] Step 603: In response to not receiving the confirmation information fed back by the slave terminal, continue to forward the audio data to the slave terminal until receiving the confirmation information fed back by the slave terminal.

[0073] If the master terminal still does not receive the confirmation information fed back by the slave terminal after forwarding the audio data to the slave terminal, it means that the slave terminal still has not received the forwarded audio data. At this time, the master terminal continues to send the audio data to the slave terminal until the slave terminal receives the audio data and transmits the confirmation information to the master terminal. In this way, it can ensure that the slave terminal successfully receives the audio data, so as to improve the accuracy of receiving the audio data from the slave terminal.

[0074] After the above step 602, if the master terminal receives the confirmation information, the master terminal switches from the preset channel to the communication channel for receiving the audio data to effectively receive the audio data sent by the transmitter in each clock cycle, which can be achieved by the following steps 604 and 605:

[0075] Step 604: In response to receiving the acknowledgement information fed back from the terminal, switching from the preset channel to the communication channel with the transmitting end.

[0076] If the master terminal receives the confirmation information fed back by the slave terminal, it means that the slave terminal has successfully received the audio data forwarded by the master terminal, and after successful demodulation, it feeds back ACK to the master terminal to indicate normal reception. In response to the confirmation information, the master terminal exits from the current preset channel and enters the communication channel with the transmitter; and after feeding back the confirmation information to the master terminal, the slave terminal also exits from the preset channel so as to correctly monitor the audio data sent by the transmitter to the master terminal.

[0077] Step 605: Receive the audio data sent by the transmitter on the communication channel.

[0078] After the master terminal enters the communication channel, it continues to receive the audio data sent by the sender in the next clock cycle. In this way, after receiving the confirmation information, the master terminal returns to the communication channel corresponding to the sender, so that the audio data sent by the sender can be received more effectively on the communication channel.

[0079] In some possible implementations, in order to reduce the impact of the data packet sent by the sending end on the forwarding of the audio data by the main terminal, the above step 602 can be implemented by the following steps 621 and 622 (not shown):

[0080] Step 621: Determine a difference between a third received signal strength and a second received signal strength of the master terminal signal received by the slave terminal.

[0081] The second received signal strength is the received signal strength of the sender signal received by the slave terminal. In this way, the difference can reflect the difference between the signal strength of the slave terminal receiving the data forwarded by the master terminal and the signal strength of the sender signal received by the slave terminal.

[0082] Step 622: When the difference is greater than a preset difference threshold, forward the audio data to the slave terminal through the preset channel.

[0083] Among them, the preset difference threshold can be set by the anti-channel interference capability and the anti-adjacent channel interference capability of the communication rate. For example, the signal-to-noise ratio is calculated according to the anti-channel interference capability and the anti-adjacent channel interference capability, and the preset difference threshold is set by the signal-to-noise ratio. If the difference is greater than the preset difference threshold, it means that the difference can reflect the signal strength of the data forwarded by the slave terminal received from the main terminal, which is higher than the signal strength received by the slave terminal from the transmitting end. At this time, the main terminal forwards the audio data to the slave terminal through the preset channel. In this way, although the main terminal will continue to send the next data packet after replying the confirmation information to the transmitting end, the main terminal is also forwarding the audio data at this time, and the sending end may interfere with the forwarding of the data packet by the main terminal. If the slave terminal is affected by the strong signal of the main terminal, even if the data packet sent by the transmitting end is interfered, the slave terminal can still resist the interference and the normal demodulation will not be affected. In this way, when the signal strength received by the slave terminal from the main terminal is greater than a certain range of the second received signal strength, the audio data is forwarded to the slave terminal, which can reduce the interference of the data sent by the transmitting end to the data forwarded by the slave terminal, thereby improving the success rate of receiving audio data from the terminal.

[0084] An embodiment of the present application provides an audio data transmission method, which is described below by taking the example of adaptively selecting an optimal communication path according to signal source quality.

[0085] First, the mobile phone is connected to the TWS dual-ears as follows: only the master ear is connected, the slave ear is connected to the master ear, and the slave ear is not connected to the mobile phone. The master ear and the slave ear periodically interact with each other for n seconds or milliseconds to receive the received signal strength (ReceivedSignal Strength Indication, RSSI) received by both parties. The slave ear receives RSSI_s from the mobile phone, and the master ear receives RSSI_m from the mobile phone. Compare RSSI_s and RSSI_m. If RSSI_m is greater than or equal to RSSI_s, the master ear remains unchanged; if RSSI_m is less than RSSI_s, the master-slave switch is performed, the slave ear switches to the master ear, and the master ear switches to the slave ear.

[0086] like Figure 7 As shown in Figure (a), the mobile phone 71 is connected to the earphone 72 as the master ear to establish a communication path; the earphone 72 is connected to the earphone 73 as the slave ear, the earphone 73 is not connected to the mobile phone 71, and a monitoring path is established between the earphone 73 and the mobile phone 71. If RSSI_m is less than RSSI_s, the master and slave earphones are switched, as shown in Figure (b), the earphone 71 is used as the slave ear, the earphone 7 is used as the master ear, the earphone 73 is connected to the mobile phone 71, and the earphone 72 is disconnected from the mobile phone 71 to form a monitoring path.

[0087] Secondly, the master ear establishes a communication link with the slave ear. The signal strength of the master ear receiving the slave ear packet is RSSI_f_s, and the signal strength of the slave ear receiving the master ear packet is RSSI_f_m.

[0088] Again, the mobile phone sends a packet to the master ear, and the slave ear still monitors. The slave ear monitors successfully and sends a paging packet to the master ear. After the master ear receives the page packet and successfully receives the mobile phone packet, it replies ACK to the mobile phone and indicates that it has been successfully received. Figure 8 As shown, the mobile phone 81 sends packet 0 to the master ear 82, and the master ear 82 receives it successfully (i.e., Rx succeeds). The slave ear 83 monitors "Rx succeeds" and sends page to the master ear 82. After the master ear 82 receives the page and receives it successfully, it returns ACK to the mobile phone 81. After that, the mobile phone continues to send packet 1 to the master ear, and the slave ear monitors "Rx succeeds", sends page to the master ear 82. After the master ear 82 receives the page and receives it successfully, it returns ACK to the mobile phone.

[0089] Since the master ear signal is always the best, when the master ear cannot correctly receive the data packets sent by the mobile phone, the slave ear 83 can basically not correctly monitor the data packets sent by the mobile phone. Fig. 9 The process shown realizes that the master ear receives the data packet and the slave ear also receives the data packet:

[0090] A: The master ear 91 cannot correctly receive packet 0 sent by mobile phone 90. The master ear directly returns NAK or does not respond in the next reply time slot, asking the mobile phone to retransmit.

[0091] B: Initially, slave ear 92 cannot correctly receive packet 0 sent by the mobile phone, but master ear 91 has successfully received packet 0. Slave ear 92 does not send page to master ear 91, that is, the slave ear thinks "Rx is unsuccessful". The master ear cannot receive the page packet, starts the counter, and calculates to 1, that is, counter + 1. Master ear 91 sends NAK to mobile phone 90, and the mobile phone receives NAK and retransmits packet 0 in the next clock cycle.

[0092] C: If the mobile phone initiates to retransmit packet0, and the slave ear 92 still fails to receive it successfully, the counter is incremented by 1. When the counter value reaches the preset condition M, the master ear 91 no longer returns NAK to the mobile phone 90, but returns ACK to the mobile phone 90 to indicate successful receipt.

[0093] D: After the master ear 91 sends ACK, it enters the channel negotiated with the slave ear 92 in the next clock cycle and sends the mobile phone packet0 received by the master ear 91 to the slave ear 92.

[0094] Here, after receiving ACK, mobile phone 90 sends packe1 to the master ear 91 in the next clock cycle. Since the master ear 91 will not feedback ACK to mobile phone 90 in the next clock cycle, mobile phone 90 will continue to send packe1 repeatedly until it receives ACK feedback from the master ear, and then send other data packets in the next clock cycle.

[0095] E: Since the slave ear 92 knows the counter M, after M meets the counting threshold, the slave ear 92 will enter the channel (channel) negotiated with the master ear 91 in the next clock cycle (this channel can avoid the mobile phone's next time slot transmission channel) to receive packet0 transmitted by the master ear.

[0096] F: After receiving packet0 forwarded by master ear 91, slave ear 92 replies ACK to master ear 91 to indicate normal reception.

[0097] G: If the master ear 91 forwards the message to the slave ear 92 for the first time, and the slave ear fails to receive the message and returns NAK or does not reply, the master ear continues to forward the message until the slave ear receives the message successfully.

[0098] H: After the master ear forwards successfully, both the master ear and the slave ear return to the clock cycle of the mobile phone and continue to receive packet1 from the mobile phone.

[0099] I: Forwarding mechanism can also be configured to be triggered only when the value of RSSI_f_m is greater than RSSI_s and reaches a certain range. For example, the threshold can be set according to the communication rate's ability to resist intra-channel interference or adjacent channel interference. It can effectively solve the problem of mobile phone data packets interfering with forwarded data packets when mobile phone packets are sent and forwarded at the same time.

[0100] In the embodiment of the present application, the master-slave switching is realized through RSSI judgment, and the earphone with the best signal is always kept as the master ear, so as to maintain the highest reception success rate of the master ear. Then the signal is adaptively forwarded from the master ear to the slave ear according to the conditions, which solves the problem of continuous retransmission due to poor reception of one earphone; in this way, the best transmission path is selected in real time when the TWS earphone plays mobile music, which can solve the problem of transmission failure and audio jamming caused by poor signal of one of the earphones in actual use. In particular, it solves the problem of audio jamming caused by severe attenuation of the left earphone (or right earphone) due to the mobile phone being placed in the right pocket (or left pocket).

[0101] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0102] Based on the same inventive concept, the embodiment of the present application also provides an audio data transmission terminal for implementing the audio data transmission method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more audio data transmission terminal embodiments provided below can refer to the limitations of the audio data transmission method above, and will not be repeated here.

[0103] In one embodiment, Fig.10 As shown, an audio data transmission terminal 1000 is provided, comprising: a receiving module 1001, a first determining module 1002, and a forwarding module 1003, wherein:

[0104] The receiving module 1001 is used to receive the audio data sent by the sending end;

[0105] The first determination module 1002 is used to determine the number of retransmissions of the audio data sent by the transmitting end to the master terminal when the monitoring confirmation information of the slave terminal is not received; wherein the monitoring confirmation information is used to indicate that the slave terminal monitors the audio data;

[0106] The forwarding module 1003 is used to forward the audio data to the slave terminal when the number of retransmissions reaches a preset number threshold.

[0107] In one embodiment, the terminal also includes: a second determination module, used to determine the first received signal strength of the master terminal receiving the transmitter signal and the second received signal strength of the slave terminal receiving the transmitter signal; a third determination module, used to determine whether to switch the master-slave relationship based on the first received signal strength and the second received signal strength.

[0108] In one embodiment, the third determining module is further configured to switch the master-slave relationship between the master terminal and the slave terminal when the second received signal strength is greater than the first received signal strength.

[0109] In one embodiment, the first determination module 1002 is also used to return non-confirmation information to the sending end when no monitoring confirmation information is received from the slave terminal, and the non-confirmation information is used to instruct the sending end to retransmit the audio data to the master terminal; and to update the number of retransmissions when no monitoring confirmation information is received from the slave terminal for the retransmitted audio data.

[0110] In one embodiment, the forwarding module 1003 is further used to return confirmation information to the sending end when the number of retransmissions reaches the preset number threshold; and forward the audio data to the slave terminal through a preset channel negotiated with the slave terminal.

[0111] In one embodiment, the forwarding module 1003 is also used to determine the difference between the third received signal strength and the second received signal strength of the slave terminal receiving the main terminal signal; the second received signal strength is the received signal strength of the slave terminal receiving the transmitting terminal signal; when the difference is greater than a preset difference threshold, the audio data is forwarded to the slave terminal through the preset channel.

[0112] In one embodiment, the forwarding module 1003 is further configured to, in response to not receiving the confirmation information fed back by the slave terminal, continue to forward the audio data to the slave terminal until receiving the confirmation information fed back by the slave terminal.

[0113] In one embodiment, the forwarding module 1003 is further used to switch from the preset channel to the communication channel between the transmitting end in response to receiving the confirmation information fed back from the terminal; and receive the audio data sent by the transmitting end on the communication channel.

[0114] Each module in the above-mentioned audio data transmission terminal can be implemented in whole or in part by software, hardware or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in an electronic device in the form of hardware, or can be stored in a memory in an electronic device in the form of software, so that the processor can call and execute operations corresponding to each of the above modules.

[0115] In one embodiment, an electronic device is provided. The electronic device may be a terminal, and its internal structure diagram may be as follows: Fig.11As shown. The electronic device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the electronic device is used to exchange information between the processor and an external device. The communication interface of the electronic device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, an audio data transmission method is implemented. The display unit of the electronic device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the electronic device casing, or an external keyboard, touchpad or mouse.

[0116] Those skilled in the art will understand that Fig.11 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0117] In one embodiment, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor executes the steps in the above-mentioned method embodiments when executing the computer program.

[0118] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0119] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0120] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0121] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited thereto. The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification. The above-mentioned embodiments only express several implementation methods of the present application, and the description is more specific and detailed, but it cannot be understood as a limitation on the scope of the patent of this application. It should be pointed out that for ordinary technicians in this field, without departing from the concept of this application, several modifications and improvements can be made, which all belong to the scope of protection of this application. Therefore, the protection scope of the present application should be determined by the appended claims.

Claims

1. An audio data transmission method, applied to a master terminal, characterized in that: The method comprises: Receive the message data sent by the sender; In the case where the monitoring confirmation information of the slave terminal is not received, determining the number of retransmissions of the audio data sent by the transmitting end to the master terminal; wherein the monitoring confirmation information is used to indicate that the slave terminal monitors the audio data; When the number of retransmissions reaches a preset number threshold, the audio data is forwarded to the slave terminal.

2. The method according to claim 1, characterized in that The method further comprises: Determine a first received signal strength of the master terminal receiving the transmitter signal and a second received signal strength of the slave terminal receiving the transmitter signal; Based on the first received signal strength and the second received signal strength, it is determined whether to perform a master-slave relationship switch.

3. The method according to claim 2, characterized in that The determining whether to perform a master-slave relationship switch based on the first received signal strength and the second received signal strength includes: When the second received signal strength is greater than the first received signal strength, the master-slave relationship between the master terminal and the slave terminal is switched.

4. The method according to claim 1, characterized in that The determining, when no monitoring confirmation information from the slave terminal is received, the number of retransmissions of the audio data sent by the transmitting end to the master terminal comprises: In case of not receiving the monitoring confirmation information from the slave terminal, returning non-confirmation information to the sending end, wherein the non-confirmation information is used to instruct the sending end to retransmit the audio data to the master terminal; In the case where monitoring confirmation information of the retransmitted audio data is not received from the slave terminal, the number of retransmissions is updated.

5. The method according to claim 1, characterized in that When the number of retransmissions reaches a preset number threshold, forwarding the audio data to the slave terminal includes: When the number of retransmissions reaches the preset number threshold, returning confirmation information to the sending end; The audio data is forwarded to the slave terminal through a preset channel negotiated with the slave terminal.

6. The method according to claim 5, characterized in that Before forwarding the audio data to the slave terminal through the preset channel negotiated with the slave terminal, the method further includes: Determine a difference between a third received signal strength and a second received signal strength of the slave terminal receiving the master terminal signal; the second received signal strength is the received signal strength of the slave terminal receiving the transmitting terminal signal; Correspondingly, forwarding the audio data to the slave terminal through a preset channel negotiated with the slave terminal includes: When the difference is greater than a preset difference threshold, the audio data is forwarded to the slave terminal through the preset channel.

7. The method according to claim 5, characterized in that After forwarding the audio data to the slave terminal through the preset channel negotiated with the slave terminal, the method further includes: In response to not receiving the confirmation information fed back by the slave terminal, continue to forward the audio data to the slave terminal until receiving the confirmation information fed back by the slave terminal.

8. The method according to claim 5, characterized in that After forwarding the audio data to the slave terminal through the preset channel negotiated with the slave terminal, the method further includes: In response to receiving the acknowledgement information fed back from the terminal, switching from the preset channel to the communication channel with the transmitting end; The audio data sent by the transmitting end on the communication channel is received.

9. An audio data transmission terminal, characterized in that: The terminal comprises: A receiving module, used for receiving the audio data sent by the sending end; A first determination module is used to determine the number of retransmissions of the audio data sent by the transmitting end to the master terminal when no monitoring confirmation information is received from the slave terminal; wherein the monitoring confirmation information is used to indicate that the slave terminal monitors the audio data; The forwarding module is used to forward the audio data to the slave terminal when the number of retransmissions reaches a preset number threshold.

10. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.

12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Audio data transmission method and electronic device

    CN112042212A

  • High-reliability Bluetooth data transmission system and method

    CN113068167A

  • Data transmission control method and device, Internet of Things terminal and storage medium

    CN113890691A

  • Systems and methods including wireless data packet retransmission schemes

    US20210306103A1