Audio data transmission method and device, storage medium and audio receiving equipment
By calculating the threshold of retransmission times in the audio receiving device and replying to the response information, the short-block effect caused by the retransmission of audio data packets in wireless headphones is solved, the smoothness and stability of audio playback are improved, and the continuity of audio data is ensured. and integrity.
Patent Information
- Application Number
- CN202411430060.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2025-01-17
AI Technical Summary
In the wireless ear airport scene of Bluetooth headphones, the retransmission of audio data packets due to the deterioration of the RF environment may lead to a short-term effect, resulting in a headphone being unable to play audio normally, affecting the smoothness and stability of audio playback.
By calculating the retransmission threshold in the audio receiving device, accumulating the number of audio packets sent, and generating response information when the threshold is reached to the transmitter, in order to continue sending subsequent audio packets, avoiding network congestion caused by continuous retransmission and Data blocking.
Improves the smoothness and stability of audio playback, reduces the risk of audio transmission interruption caused by network fluctuations or device failures, and ensures the continuity and integrity of audio data.
Smart Images

Figure CN119325002A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of audio data processing, and in particular to an audio data transmission method, apparatus, storage medium and audio receiving device. Background Art
[0002] With the development of technology, Bluetooth headsets are widely used. However, in the actual use of Bluetooth headsets, due to the ACL data feature in Bluetooth, each data packet must ensure that the other party responds normally to confirm receipt before continuing to send the next data packet, otherwise it will be sent repeatedly until the other party receives it. In actual use, when the RF environment deteriorates, a certain packet may be transmitted dozens or hundreds of times before the other party can receive it normally. Audio data packets are data with a certain timeliness. In many scenarios, music data packets will be generated and sent to the headset end at a fixed bit rate over time. When one of the data packets is continuously retransmitted, it will block the transmission of subsequent packets.
[0003] In the wireless headset scenario, this type of situation is particularly prominent. The same packet of data needs to ensure that both left and right earphones are received normally by the mobile phone before the next packet of data can be sent. This has a very obvious short board effect, that is, due to the difference in the position of one earphone relative to the mobile phone or the position of the interference source, the current receiving environment of the other earphone will be very different from that of the other earphone. In this case, even if the other earphone can play the sound normally, it will not be able to play normally due to the short board effect of this earphone. Summary of the invention
[0004] The embodiments of the present application provide an audio data transmission method, apparatus, storage medium and audio receiving device, which can automatically reply a response message to the transmitter according to the number of data retransmissions when the wireless headset receives audio data abnormally, so as to continue to send subsequent audio, thereby improving the fluency and stability of audio playback.
[0005] The present application provides an audio data transmission method, which is applied to an audio receiving device, including:
[0006] Calculating a retransmission number threshold according to the data buffer capacity of the audio receiving device;
[0007] receiving an audio data packet transmitted by an audio sending device, and accumulating the number of times the audio data packet is sent when verification of the audio data packet fails;
[0008] Continuously receiving the audio data packets retransmitted by the audio sending device, counting the cumulative value of sending the audio data packets, and determining whether the cumulative number reaches the retransmission number threshold;
[0009] If the condition is met, a first response message is generated to reply to the audio sending device, so that the audio sending device sends subsequent audio data packets.
[0010] In one embodiment, if the audio data packet is successfully authenticated, a second response message is generated to reply to the audio sending device, so that the audio sending device sends a subsequent audio data packet.
[0011] In one embodiment, the audio receiving device includes a master device and a slave device, and confirming that the audio data packet verification fails includes the following steps:
[0012] When the master device authentication succeeds and the slave device authentication fails, confirming that the audio data packet authentication fails; or,
[0013] When the authentication of the slave device succeeds and the authentication of the master device fails, confirming that the authentication of the audio data packet fails; or,
[0014] When both the master device and the slave device fail to be authenticated, it is confirmed that the audio data packet fails to be authenticated.
[0015] In one embodiment, if the audio data packet verification succeeds, generating a second response message to reply to the audio sending device includes:
[0016] When both the master device and the slave device are successfully authenticated, controlling the slave device to send a third response message to the master device;
[0017] The master device generates second response information according to the third response information to reply to the audio sending device.
[0018] In one embodiment, the step of determining the master device and the slave device includes:
[0019] respectively controlling two audio receiving devices to receive the test signal generated by the audio sending device;
[0020] The master device and the slave device are allocated according to the signal qualities of the test signal respectively received by two audio receiving devices.
[0021] In one embodiment, calculating the retransmission number threshold according to the data buffer amount of the audio receiving device includes:
[0022] Calculate the playing time of the audio according to the data buffer capacity of the audio receiving device;
[0023] The retransmission number threshold is determined according to the playback duration.
[0024] In one embodiment, the verification process of the audio data packet includes:
[0025] Determining whether the audio data packet is transmitted through an ACL link;
[0026] If yes, determining whether the L2CAP features in the audio data packet match;
[0027] If they match, it is determined that the audio data packet verification is successful.
[0028] The present application also provides an audio data transmission device, including:
[0029] A calculation module, used for calculating a retransmission number threshold according to a data buffer amount of the audio receiving device;
[0030] A receiving module, configured to receive an audio data packet transmitted by an audio sending device, and accumulate the number of times the audio data packet is sent when the audio data packet verification fails;
[0031] A judgment module, used for continuously receiving the audio data packets retransmitted by the audio sending device, counting the cumulative value of sending the audio data packets, and judging whether the cumulative number reaches the retransmission number threshold;
[0032] The reply module is used to generate a first response message to reply to the audio sending device when the judgment module judges that the answer is yes, so that the audio sending device sends a subsequent audio data packet.
[0033] An embodiment of the present application further provides a storage medium, wherein the storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute the steps in the audio data transmission method as described in any of the above embodiments.
[0034] An embodiment of the present application further provides an audio receiving device, which includes a memory and a processor, wherein a computer program is stored in the memory, and the processor executes the steps in the audio data transmission method described in any of the above embodiments by calling the computer program stored in the memory.
[0035] The audio data transmission method, device, storage medium and audio receiving device provided in the embodiments of the present application can calculate the retransmission number threshold according to the data cache amount of the audio receiving device, receive the audio data packet transmitted by the audio sending device, and accumulate the number of times the audio data packet is sent when the audio data packet verification fails, continue to receive the audio data packet retransmitted by the audio sending device, count the cumulative value of the sent audio data packet, and determine whether the cumulative number reaches the retransmission number threshold. If so, generate a first response message to reply to the audio sending device, so that the audio sending device sends subsequent audio data packets. When the wireless headset receives audio data abnormally, the present application can automatically reply to the response message to the transmitter according to the number of retransmissions of the data to continue to send subsequent audio, thereby improving the fluency and stability of audio playback. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0037] Figure 1 A flowchart of an audio data transmission method provided in an embodiment of the present application.
[0038] Figure 2 A schematic diagram of a scenario in which an existing headset receives abnormal data provided by an embodiment of the present application.
[0039] Figure 3 Another flowchart of the audio data transmission method provided in an embodiment of the present application.
[0040] Figure 4 A schematic diagram of a scenario in which the improved earphone receives abnormal data provided in an embodiment of the present application.
[0041] Figure 5 A schematic diagram of the structure of an audio data transmission device provided in an embodiment of the present application.
[0042] Figure 6 A schematic diagram of the structure of an audio receiving device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0043] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0044] The embodiments of the present application provide an audio data transmission method, device, storage medium and audio receiving device. Specifically, the audio data transmission method of the embodiments of the present application can be performed by an electronic device, wherein the electronic device can be a terminal. The terminal can be a smart phone, a tablet computer, a laptop computer, a game console, a personal computer (PC, Personal Computer), a personal digital assistant (Personal Digital Assistant, PDA), a smart home, a wearable device, an audio receiving device and other devices, and the terminal can also include a client, which can be a media playback client or an instant messaging client, etc.
[0045] The embodiment of the present application provides an audio data transmission method, which can be executed by an audio receiving device (such as a wireless headset). The embodiment of the present application takes the audio data transmission method executed by the audio receiving device as an example for explanation.
[0046] See also Figure 2 , the specific process of this method can be as follows:
[0047] Step 101: Calculate a retransmission number threshold according to the data buffer capacity of the audio receiving device.
[0048] In the existing technology, since the ACL data feature in Bluetooth is that each data packet must ensure that the other party has a normal response to confirm receipt before continuing to send the next data packet, the industry generally uses the ACK mechanism to solve the problem of audio data transmission. Please refer to Figure 2 When the transmission of an audio data packet fails, the sender will continue to send the data packet until the Nth transmission succeeds, and the terminal will continue to send subsequent data, which will seriously block the transmission of subsequent data packets. For audio data packets, compared with the validity of the data, it is more important that the sound data can be transmitted to the headset in the most stable way. Therefore, this application proposes to pre-calculate the retransmission number threshold. When the number of audio data packet transmission failures reaches the retransmission number threshold, the audio receiving device directly replies to the sender with a response message to continue sending subsequent data packets.
[0049] In one embodiment, the retransmission number threshold can be calculated based on the data buffer size of the audio receiving device, wherein the retransmission number threshold is set dynamically, and the dynamic basis is mainly the size of the music buffer size of the current playing earphone. If the current buffer has enough playable data, the retransmission number threshold can be dynamically increased, otherwise it can be reduced. The size of the data buffer size is related to the format of the current audio data and the storage space of the device itself.
[0050] In other embodiments, the retransmission number threshold may be set according to other factors. For example, if the audio quality is to be guaranteed as much as possible, a higher threshold may be set to perform more retransmission attempts. On the contrary, if the transmission efficiency is more important, a lower threshold may be set. If the verification fails after a certain number of retransmissions, no retransmission is performed, but subsequent audio data packets are received.
[0051] Step 102: receiving an audio data packet transmitted by an audio sending device, and accumulating the number of times the audio data packet is sent when the audio data packet verification fails.
[0052] In one embodiment, the transmission process of the audio data packet as the basic unit for carrying audio information is affected by various factors, including network delay, data packet loss, signal interference, etc. Once the data packet is damaged or lost during transmission, the audio receiving device needs to have a corresponding mechanism to identify and handle this situation to ensure the continuity and integrity of the audio. Therefore, after the audio data packet arrives at the audio receiving device, it will first be verified. The verification process usually includes checking the integrity and verification of the data packet to ensure that the data packet has not been tampered with or damaged during transmission. If the verification is successful, the data packet will be decoded and the corresponding audio content will be played.
[0053] Furthermore, when an audio data packet that fails verification is received, the system of the audio receiving device can add 1 to its transmission count, and the transmitting end will try to resend the data packet when no response message is received. In actual applications, some audio data packets may temporarily fail to be successfully transmitted due to network fluctuations or other temporary problems, but may succeed or still fail after multiple attempts. Therefore, by recording the number of transmissions, the audio receiving end can track which data packets have been tried to be sent multiple times but still failed, so as to take further processing measures.
[0054] Step 103: Continue to receive audio data packets retransmitted by the audio sending device, and count the cumulative value of the sent audio data packets.
[0055] Step 104, determine whether the accumulated number of times reaches the retransmission number threshold, if so, execute step 105.
[0056] First, in step 103, the present embodiment needs to continuously receive the audio data packets retransmitted by the audio sending device. After receiving each data packet, the receiving end will verify it and update a counter when the verification fails to count the cumulative number of times the audio data packet has been received. The cumulative value is used to represent how many times the current audio receiving device has received the data packet and still failed the verification. In step 104, it can be further determined whether the cumulative value has reached the preset retransmission count threshold. If so, step 105 is executed. If not, the audio data packets retransmitted by the audio sending device can continue to be received, and the cumulative value of the sent audio data packets can be counted.
[0057] Once it is determined that the cumulative number of times reaches the retransmission number threshold, the retransmission mechanism needs to be triggered. This usually means that a signal needs to be sent to the sending device to tell it that the lost or erroneous data packets need to be resent. Then, it returns to step 103 again, continues to receive new data packets, and updates the cumulative value.
[0058] Step 105: Generate a first response message to reply to the audio sending device, so that the audio sending device sends subsequent audio data packets.
[0059] In one embodiment, when the audio receiving device still cannot verify the validity of the data packet after reaching the retransmission number threshold, the system will automatically trigger an optimization mechanism. The mechanism can intelligently generate an ACK message and send it back to the audio sending device. This ACK message is not a confirmation message in the traditional sense, but a message with a specific flag to inform the audio sending device of the current state of the receiving device.
[0060] After receiving the ACK message with a specific flag, the audio sending device will immediately recognize that the receiving device is in a state where it cannot receive the current data packet. Therefore, the sending device will suspend the current data packet transmission and send the subsequent audio data packets instead. The advantage of this is that it can avoid network congestion and data blocking caused by continuous sending of invalid data packets.
[0061] In one embodiment, the receiving device can also perform error diagnosis and processing in the background. Once the problem is solved, the receiving device will send a confirmation message to the sending device again to inform it that it has resumed normal working state. At this time, the audio sending device can resend the data packet that was not successfully transmitted before to ensure the integrity and consistency of the data.
[0062] This intelligent retransmission mechanism and error handling process not only improves the efficiency and stability of audio data transmission, but also reduces the risk of audio transmission interruption caused by network fluctuations or equipment failures. This mechanism is particularly important for application scenarios that require real-time and continuous audio transmission, such as remote conferencing and online education.
[0063] In one embodiment, when the audio data packet received by the audio receiving end has always failed to be verified, the lost audio data can be filled by requesting retransmission or interpolation estimation. Among them, interpolation estimation is a technology for predicting and generating lost data based on known audio data. By analyzing the known audio data, the system can estimate the approximate value of the lost data and insert it into the audio stream to maintain the continuity and fluency of the audio. Although interpolation estimation cannot completely restore the lost audio data, it can alleviate the impact of data loss on audio quality to a certain extent.
[0064] In addition to requesting retransmission and interpolation estimation, the system can also use more powerful error correction coding technology to reduce the error rate of data packets during transmission. Error correction coding technology adds additional check codes or error correction codes to data packets, so that the receiving end can detect and correct errors in the data packets after receiving them. This technology can effectively improve the transmission reliability of audio data packets and reduce the risk of data loss. However, the use of error correction coding technology may increase the overhead and transmission delay of data packets, so in actual applications, it is necessary to weigh and optimize according to specific scenarios, which will not be further described in this embodiment.
[0065] As can be seen from the above, the audio data transmission method provided in the embodiment of the present application can calculate the retransmission number threshold according to the data cache amount of the audio receiving device, receive the audio data packet transmitted by the audio sending device, and accumulate the number of times the audio data packet is sent when the audio data packet verification fails, continue to receive the audio data packet retransmitted by the audio sending device, count the cumulative value of the sent audio data packet, and determine whether the cumulative number reaches the retransmission number threshold. If reached, a first response message is generated to reply to the audio sending device so that the audio sending device sends subsequent audio data packets. The present application can automatically reply to the response message to the transmitter according to the number of retransmissions of the data when the wireless headset receives audio data abnormally, so as to continue to send subsequent audio, thereby improving the fluency and stability of audio playback.
[0066] See also Figure 3 , is another flow chart of the audio data transmission method provided in the embodiment of the present application. The specific flow of the method may be as follows:
[0067] Step 201, calculating the playing time of the audio according to the data buffer capacity of the audio receiving device.
[0068] Step 202: Determine a retransmission count threshold according to the playback duration.
[0069] In one embodiment, the duration of audio playback can be calculated based on the data buffer in the audio receiving device, and then the number of times the audio data packet can be retransmitted can be calculated based on the duration and the duration of the audio data packet sent by the transmitter, that is, the above-mentioned retransmission number threshold. Further, after calculating the number of times the above-mentioned data packet can be retransmitted, a part can be deducted to leave the system response time, and finally the retransmission number threshold is obtained.
[0070] Step 203: receiving an audio data packet transmitted by an audio sending device, and accumulating the number of times the audio data packet is sent when the audio data packet verification fails.
[0071] In one embodiment, the transmission process of an audio data packet, as the basic unit of audio information, is affected by various factors, including network delay, packet loss, signal interference, etc. Once a data packet is damaged or lost during transmission, the audio receiving device needs to have a corresponding mechanism to identify and handle this situation to ensure the continuity and integrity of the audio. Therefore, after the audio data packet arrives at the audio receiving device, it will first be verified.
[0072] In one embodiment, the audio receiving device includes a master device and a slave device, and confirming that the audio data packet verification fails includes the following steps:
[0073] When the master device authentication succeeds and the slave device authentication fails, confirm that the audio data packet authentication fails; or,
[0074] When the slave device authentication succeeds and the master device authentication fails, confirm that the audio data packet authentication fails; or,
[0075] When both the master device and the slave device fail authentication, the audio data packet authentication failure is confirmed.
[0076] Furthermore, the above-mentioned master device and slave device determination step may include: respectively controlling two audio receiving devices to receive the test signal generated by the audio transmitting device, and allocating the master device and the slave device according to the signal quality of the test signals respectively received by the two audio receiving devices.
[0077] In one embodiment, if the audio data packet is successfully verified, a second response message is generated to reply to the audio sending device, so that the audio sending device sends subsequent audio data packets. Specifically, when both the master device and the slave device are successfully verified, the slave device is controlled to send a third response message to the master device, and the master device generates a second response message based on the third response message to reply to the audio sending device.
[0078] Step 204: Continue to receive audio data packets retransmitted by the audio sending device, and count the cumulative value of the sent audio data packets.
[0079] It should be noted that the number of retransmissions of the data packet needs to be accumulated only when the above-mentioned audio data packet fails to be verified continuously. In one embodiment, the verification process of the audio data packet may include: determining whether the audio data packet is transmitted through the ACL link, and if so, determining whether the L2CAP features in the audio data packet match, and if so, determining that the audio data packet verification is successful.
[0080] Specifically, in the field of wireless communications, especially in Bluetooth audio transmission, the ACL (Asynchronous Connectionless Link) link is a commonly used communication link. The ACL link provides a packet exchange link between the master unit and the active slave units in the network. The ACL link information is an important basis for the link_control layer to identify the ACL link where the current music package is located. The ACL link is an asynchronous connectionless data transmission method, which is suitable for data transmission with high real-time requirements such as audio data. Through the ACL link information, the link_control layer can accurately identify the link where the music package is located, thereby ensuring that the audio data can be correctly transmitted to the target device. L2CAP (Logical Link Control and Adaption Protocol) can provide connection-oriented or connectionless data services to the upper layer. When the L2CAP features match, it can be confirmed that the audio data packet verification is successful.
[0081] Step 205, determine whether the accumulated number of times reaches the retransmission number threshold, if so, execute step 206.
[0082] Step 206: Generate a first response message to reply to the audio sending device, so that the audio sending device sends subsequent audio data packets.
[0083] In one embodiment, when the audio receiving device still cannot verify the validity of the data packet after reaching the retransmission threshold, the system will automatically trigger an optimization mechanism. This mechanism can intelligently generate an ACK message and send it back to the audio sending device to inform the audio sending device of the current state of the receiving device. After receiving this ACK message with a specific flag, the audio sending device will immediately recognize that the receiving device is in a state where it cannot receive the current data packet. Therefore, the sending device will instead send the subsequent audio data packet. Please refer to Figure 4 When the number of retransmissions of the audio data packet received from the slave device reaches a preset number, the master device generates a first response message to reply to the mobile phone to skip the current data packet and send subsequent data.
[0084] All of the above technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described in detail here.
[0085] As can be seen from the above, the audio data transmission method provided in the embodiment of the present application can calculate the audio playback time according to the data cache amount of the audio receiving device, determine the retransmission number threshold according to the playback time, receive the audio data packet transmitted by the audio sending device, and accumulate the number of times the audio data packet is sent when the audio data packet verification fails, continue to receive the audio data packet retransmitted by the audio sending device, count the cumulative value of the sent audio data packet, and determine whether the cumulative number reaches the retransmission number threshold. If reached, generate a first response message to reply to the audio sending device, so that the audio sending device sends subsequent audio data packets. When the wireless headset receives audio data abnormally, the present application can automatically reply to the response message to the transmitter according to the number of retransmissions of the data to continue to send subsequent audio, thereby improving the fluency and stability of audio playback.
[0086] In order to better implement the audio data transmission method of the embodiment of the present application, the embodiment of the present application also provides an audio data transmission device. Figure 5 , Figure 5 A schematic diagram of a structure of an audio data transmission device provided in an embodiment of the present application. The audio data transmission device may include:
[0087] A calculation module 301, configured to calculate a retransmission number threshold according to a data buffer amount of the audio receiving device;
[0088] The receiving module 302 is used to receive the audio data packet transmitted by the audio sending device, and accumulate the number of times the audio data packet is sent when the audio data packet verification fails;
[0089] The judgment module 303 is used to continuously receive the audio data packets retransmitted by the audio sending device, count the cumulative value of sending the audio data packets, and judge whether the cumulative number reaches the retransmission number threshold;
[0090] The reply module 304 is used to generate a first response message to reply to the audio sending device when the judgment module judges that the answer is yes, so that the audio sending device can send subsequent audio data packets.
[0091] All of the above technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described in detail here.
[0092] As can be seen from the above, the audio data transmission device provided in the embodiment of the present application can calculate the retransmission number threshold according to the data cache amount of the audio receiving device, receive the audio data packet transmitted by the audio sending device, and accumulate the number of times the audio data packet is sent when the audio data packet verification fails, continue to receive the audio data packet retransmitted by the audio sending device, count the cumulative value of the sent audio data packet, and determine whether the cumulative number reaches the retransmission number threshold. If reached, a first response message is generated to reply to the audio sending device so that the audio sending device sends subsequent audio data packets. The present application can automatically reply to the response message to the transmitter according to the number of retransmissions of the data when the wireless headset receives audio data abnormally, so as to continue to send subsequent audio, thereby improving the fluency and stability of audio playback.
[0093] Accordingly, the embodiment of the present application also provides an audio receiving device, which can be a terminal or a server, and the terminal can be a smart phone, a tablet computer, a laptop computer, a touch screen, a game console, a personal computer (PC), a personal digital assistant (PDA), and other terminal devices. Figure 6 As shown, Figure 6 A schematic diagram of the structure of an audio receiving device provided in an embodiment of the present application. The audio receiving device 400 includes a processor 401 having one or more processing cores, a memory 402 having one or more storage media, and a computer program stored in the memory 402 and executable on the processor. The processor 401 is electrically connected to the memory 402. It will be appreciated by those skilled in the art that the structure of the audio receiving device shown in the figure does not constitute a limitation on the audio receiving device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0094] The processor 401 is the control center of the audio receiving device 400. It uses various interfaces and lines to connect the various parts of the entire audio receiving device 400, executes various functions of the audio receiving device 400 and processes data by running or loading software programs and / or modules stored in the memory 402, and calling data stored in the memory 402, thereby monitoring the audio receiving device 400 as a whole.
[0095] In the embodiment of the present application, the processor 401 in the audio receiving device 400 will load instructions corresponding to the processes of one or more application programs into the memory 402 according to the following steps, and the processor 401 will run the application programs stored in the memory 402 to implement various functions:
[0096] Calculating a retransmission number threshold according to the data buffer capacity of the audio receiving device;
[0097] receiving an audio data packet transmitted by an audio sending device, and accumulating the number of times the audio data packet is sent when verification of the audio data packet fails;
[0098] Continuously receiving the audio data packets retransmitted by the audio sending device, counting the cumulative value of sending the audio data packets, and determining whether the cumulative number reaches the retransmission number threshold;
[0099] If the condition is met, a first response message is generated to reply to the audio sending device, so that the audio sending device sends subsequent audio data packets.
[0100] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0101] Optional, such as Figure 6 As shown, the audio receiving device 400 further includes: a touch panel 403, a radio frequency circuit 404, an audio circuit 405, and a power supply 407. Among them, the processor 401 is electrically connected to the touch panel 403, the radio frequency circuit 404, the audio circuit 405, and the power supply 407 respectively. Those skilled in the art can understand that Figure 6 The structure of the audio receiving device shown in the figure does not constitute a limitation on the audio receiving device, and may include more or less components than those shown in the figure, or combine certain components, or arrange the components differently.
[0102] The touch panel 403 can be used to collect the user's touch operation on or near it (such as the user uses any suitable object or accessory such as a finger, stylus, etc. on the touch panel or near the touch panel), and generate corresponding operation instructions, and the operation instructions execute the corresponding program. Optionally, the touch panel may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, and converts it into contact coordinates, and then sends it to the processor 401, and can receive the command sent by the processor 401 and execute it. The touch panel can cover the display panel, and when the touch panel detects the touch operation on or near it, it is transmitted to the processor 401 to determine the type of touch event, and then the processor 401 provides the corresponding visual output on the display panel according to the type of touch event. In an embodiment of the present application, the touch panel and the display panel can be integrated into the touch panel 403 to realize the input and output functions.
[0103] The radio frequency circuit 404 may be used to send and receive radio frequency signals, so as to establish wireless communication with a network device or other devices through wireless communication, and to send and receive signals between the network device or other electronic devices.
[0104] The audio circuit 405 can be used to provide an audio interface between the user and the audio receiving device through a speaker and a microphone. The audio circuit 405 can transmit the electrical signal converted from the received audio data to the speaker, which is converted into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 405 and converted into audio data, and then the audio data is output to the processor 401 for processing, and then sent to another electronic device through the radio frequency circuit 404, or the audio data is output to the memory 402 for further processing.
[0105] The power supply 407 is used to supply power to various components of the audio receiving device 400. Optionally, the power supply 407 can be logically connected to the processor 401 through a power management system, so as to manage charging, discharging, and power consumption management through the power management system. The power supply 407 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.
[0106] although Figure 6 Not shown in the figure, the audio receiving device 400 may also include a camera, a sensor, a wireless fidelity module, a Bluetooth module, etc., which will not be described in detail here.
[0107] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0108] As can be seen from the above, the audio receiving device provided in this embodiment can calculate the retransmission number threshold according to the data cache amount of the audio receiving device, receive the audio data packet transmitted by the audio sending device, and accumulate the number of times the audio data packet is sent when the audio data packet verification fails, continue to receive the audio data packet retransmitted by the audio sending device, count the cumulative value of the sent audio data packet, and determine whether the cumulative number reaches the retransmission number threshold. If reached, a first response message is generated to reply to the audio sending device, so that the audio sending device sends subsequent audio data packets. This application can automatically reply to the response message to the transmitter according to the number of retransmissions of the data when the wireless headset receives audio data abnormally, so as to continue to send subsequent audio, thereby improving the fluency and stability of audio playback.
[0109] A person skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a storage medium and loaded and executed by a processor.
[0110] To this end, an embodiment of the present application provides a storage medium in which multiple computer programs are stored, and the computer program can be loaded by a processor to execute the steps in any audio data transmission method provided in the embodiment of the present application. For example, the computer program can execute the following steps:
[0111] Calculating a retransmission number threshold according to the data buffer capacity of the audio receiving device;
[0112] receiving an audio data packet transmitted by an audio sending device, and accumulating the number of times the audio data packet is sent when verification of the audio data packet fails;
[0113] Continuously receiving the audio data packets retransmitted by the audio sending device, counting the cumulative value of sending the audio data packets, and determining whether the cumulative number reaches the retransmission number threshold;
[0114] If the condition is met, a first response message is generated to reply to the audio sending device, so that the audio sending device sends subsequent audio data packets.
[0115] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0116] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0117] Since the computer program stored in the storage medium can execute the steps in any audio data transmission method provided in the embodiments of the present application, the beneficial effects that can be achieved by any audio data transmission method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0118] The above is a detailed introduction to an audio data transmission method, device, storage medium and audio receiving device provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. An audio data transmission method, applied to an audio receiving device, characterized in that: include: Calculating a retransmission number threshold according to the data buffer capacity of the audio receiving device; receiving an audio data packet transmitted by an audio sending device, and accumulating the number of times the audio data packet is sent when verification of the audio data packet fails; Continuously receiving the audio data packets retransmitted by the audio sending device, counting the cumulative value of sending the audio data packets, and determining whether the cumulative number reaches the retransmission number threshold; If the condition is met, a first response message is generated to reply to the audio sending device, so that the audio sending device sends subsequent audio data packets.
2. The audio data transmission method according to claim 1, characterized in that: The method further comprises: If the audio data packet is successfully authenticated, a second response message is generated to reply to the audio sending device, so that the audio sending device sends subsequent audio data packets.
3. The audio data transmission method according to claim 2, characterized in that: The audio receiving device includes a master device and a slave device, and confirming that the audio data packet verification fails includes the following steps: When the master device authentication succeeds and the slave device authentication fails, confirming that the audio data packet authentication fails; or, When the authentication of the slave device succeeds and the authentication of the master device fails, confirming that the authentication of the audio data packet fails; or, When both the master device and the slave device fail to be authenticated, it is confirmed that the audio data packet fails to be authenticated.
4. The audio data transmission method according to claim 3, characterized in that: If the audio data packet verification succeeds, generating a second response message to reply to the audio sending device, including: When both the master device and the slave device are successfully authenticated, controlling the slave device to send a third response message to the master device; The master device generates second response information according to the third response information to reply to the audio sending device.
5. The audio data transmission method according to claim 3, characterized in that: The step of determining the master device and the slave device comprises: respectively controlling two audio receiving devices to receive the test signal generated by the audio sending device; The master device and the slave device are allocated according to the signal qualities of the test signal respectively received by two audio receiving devices.
6. The audio data transmission method according to claims 1-5, characterized in that: Calculating a retransmission number threshold according to a data buffer amount of the audio receiving device includes: Calculate the playing time of the audio according to the data buffer capacity of the audio receiving device; The retransmission number threshold is determined according to the playback duration.
7. The audio data transmission method according to claims 1 to 5, characterized in that: The verification process of the audio data packet includes: Determining whether the audio data packet is transmitted through an ACL link; If yes, determining whether the L2CAP features in the audio data packet match; If they match, it is determined that the audio data packet verification is successful.
8. An audio data transmission device, characterized in that: include: A calculation module, used for calculating a retransmission number threshold according to a data buffer amount of the audio receiving device; A receiving module, used for receiving an audio data packet transmitted by an audio sending device, and accumulating the number of times the audio data packet is sent when the audio data packet verification fails; A judgment module, used for continuously receiving the audio data packets retransmitted by the audio sending device, counting the cumulative value of sending the audio data packets, and judging whether the cumulative number reaches the retransmission number threshold; The reply module is used to generate a first response message to reply to the audio sending device when the judgment module judges that the answer is yes, so that the audio sending device sends a subsequent audio data packet.
9. A storage medium, characterized in that: The storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute the steps in the audio data transmission method according to any one of claims 1 to 7.
10. An audio receiving device, characterized in that: The audio receiving device comprises a memory and a processor, wherein a computer program is stored in the memory, and the processor executes the steps in the audio data transmission method according to any one of claims 1 to 7 by calling the computer program stored in the memory.