Audio transmission method, device, storage medium and electronic device

By obtaining the data length and transmission rate of UWB audio transmission, estimating the remaining position of the buffer queue at the receiving end, and switching channels according to the preset threshold, the problem of poor stability of UWB audio transmission is solved and the continuity and stability of audio transmission are achieved.

CN118337770BActive Publication Date: 2024-09-20QUESTYLE AUDIO TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410771224.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-14
Publication Date
2024-09-20
Estimated Expiration
2044-06-14

AI Technical Summary

Technical Problem

UWB audio transmission has the problem of poor stability and is easily affected by occlusion and short transmission distance in open spaces, resulting in discontinuous audio transmission.

Method used

By obtaining the single packet data length and transmission rate of the transmitting end, calculating the maximum number of transmissions and audio transmission success rate, estimating the remaining buffer queue position of the receiving end, and comparing it with the preset threshold, deciding whether to switch the audio transmission channel, thereby ensuring the smoothness of audio transmission. continuity and stability.

Benefits of technology

It improves the continuity and stability of audio transmission, ensures the integrity and real-time nature of audio data, and is suitable for audio transmission tasks in smart devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118337770B
    Figure CN118337770B
Patent Text Reader

Abstract

The present application discloses an audio transmission method, device, storage medium and electronic device, wherein the audio transmission method includes obtaining the data length of a single packet of data transmitted by a transmitter and the transmission rate of a first transmission channel; calculating the maximum number of transmissions of the transmitter within a first preset period according to the data length and the transmission rate; obtaining the audio transmission success rate of the first transmission channel within a second preset period; estimating the estimated remaining position of the cache queue of the receiving end after a third preset period according to the transmission success rate and the maximum number of transmissions; comparing the estimated remaining position with a preset threshold, and determining whether to switch the audio transmission channel according to the comparison result. This scheme can improve the stability of audio transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the technical field of audio transmission, and specifically to an audio transmission method, device, storage medium and electronic device. Background Art

[0002] With the continuous evolution of smart device technology, audio transmission methods based on ultra-wideband (UWB) are showing great potential and can make important breakthroughs in achieving high-quality, low-latency audio transmission. As a wireless communication technology that uses ultra-short pulses or extremely wide bandwidth continuous waves for data transmission, UWB technology has high anti-interference, precise positioning capabilities and excellent data transmission rates. In the field of smart devices, audio transmission methods based on UWB technology are gradually becoming a frontier field that has received much research and attention. In particular, ultra-wideband, high-sampling and low-latency audio transmission devices are beginning to provide users with an excellent auditory experience.

[0003] However, real-time audio transmission requires UWB to work continuously. Due to its own characteristics, UWB audio transmission is easily affected by occlusion and has a short transmission distance in open areas, resulting in poor stability of audio transmission. Summary of the invention

[0004] The embodiments of the present application provide an audio transmission method, device, storage medium and electronic device, which can improve the stability of audio transmission.

[0005] In a first aspect, an embodiment of the present application provides an audio transmission method, including:

[0006] Acquire the data length of a single packet of data transmitted by the transmitting end and the transmission rate of the first transmission channel;

[0007] Calculate the maximum number of transmissions of the transmitter within a first preset period according to the data length and the transmission rate;

[0008] Obtaining an audio transmission success rate of the first transmission channel within a second preset period;

[0009] estimating an estimated remaining position of a cache queue of a receiving end after a third preset period according to the audio transmission success rate and the maximum number of transmissions;

[0010] The estimated remaining position is compared with a preset threshold, and it is determined whether to switch the audio transmission channel according to the comparison result.

[0011] In the audio transmission method provided in an embodiment of the present application, the estimating the estimated remaining position of the cache queue of the receiving end after the third preset period according to the audio transmission success rate and the maximum number of transmissions includes:

[0012] estimating the maximum number of single-packet data received by the receiving end within a third preset period according to the audio transmission success rate and the maximum number of transmissions;

[0013] The estimated remaining position of the cache queue of the receiving end after the third preset period is calculated according to the current remaining position of the cache queue and the maximum number.

[0014] In the audio transmission method provided in the embodiment of the present application, comparing the estimated remaining position with a preset threshold, and determining whether to switch the audio transmission channel according to the comparison result, includes:

[0015] comparing the estimated remaining position with a preset threshold;

[0016] When the estimated remaining position is greater than or equal to the preset threshold, it indicates that the current audio transmission is normal, and the first transmission channel is used as the audio transmission channel;

[0017] When the estimated remaining position is less than the preset threshold, it indicates that the current audio transmission is abnormal, and the second transmission channel is used as the audio transmission channel.

[0018] In the audio transmission method provided in the embodiment of the present application, after comparing the estimated remaining position with the preset threshold and determining whether to switch the audio transmission channel according to the comparison result, it also includes:

[0019] The step of obtaining the data length of a single packet of data transmitted by the transmitting end and the transmission rate of the first transmission channel is returned to be executed at every preset time interval.

[0020] In the audio transmission method provided in the embodiment of the present application, the obtaining of the audio transmission success rate of the first transmission channel within the second preset period includes:

[0021] Obtaining a first total number of the single packet data successfully received by the receiving end within a second preset period;

[0022] Acquire a second total number of the single packet data transmitted by the transmitting end within a second preset period;

[0023] The audio transmission success rate of the first transmission channel is calculated according to the first total number and the second total number.

[0024] In the audio transmission method provided in the embodiment of the present application, the calculating the maximum number of transmissions of the transmitting end within the first preset period according to the data length and the transmission rate includes:

[0025] Calculating the transmission time of the single packet of data from the transmitting end to the receiving end according to the data length and the transmission rate;

[0026] The maximum number of transmission times of the transmitting end within the first preset period is calculated based on the first preset period and the transmission time.

[0027] In the audio transmission method provided in the embodiment of the present application, the first transmission channel is a UWB transmission channel, and the second transmission channel is a BT transmission channel.

[0028] In a second aspect, an embodiment of the present application provides an audio transmission device, including:

[0029] A first acquisition unit, used to acquire the data length of a single packet of data transmitted by the transmitting end and the transmission rate of the first transmission channel;

[0030] A times calculation unit, used for calculating the maximum number of transmissions of the transmitting end within a first preset period according to the data length and the transmission rate;

[0031] A second acquisition unit, configured to acquire an audio transmission success rate of the first transmission channel within a second preset period;

[0032] A memory estimation unit, configured to estimate an estimated remaining position of a cache queue of a receiving end after a third preset period according to the audio transmission success rate and the maximum number of transmissions;

[0033] The channel switching unit is used to compare the estimated remaining position with a preset threshold and determine whether to switch the audio transmission channel according to the comparison result.

[0034] In a third aspect, the present application provides a storage medium, wherein the storage medium stores a plurality of instructions, wherein the instructions are suitable for loading by a processor to execute any of the above-mentioned audio transmission methods.

[0035] In a fourth aspect, the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the above-described audio transmission methods when executing the computer program.

[0036] In summary, the audio transmission method provided in the embodiment of the present application is by obtaining the data length of a single packet of data transmitted by the transmitter and the transmission rate of the first transmission channel; calculating the maximum number of transmissions of the transmitter within the first preset period according to the data length and the transmission rate; obtaining the audio transmission success rate of the first transmission channel within the second preset period; estimating the estimated remaining position of the cache queue of the receiving end after the third preset period according to the audio transmission success rate and the maximum number of transmissions; comparing the estimated remaining position with a preset threshold, and determining whether to switch the audio transmission channel based on the comparison result. This scheme can determine whether the current audio transmission is abnormal by comparing the estimated remaining position with the preset threshold, thereby selecting a suitable audio transmission channel for audio transmission based on the judgment result to ensure the continuity and stability of the audio transmission. That is, this scheme can improve the continuity and stability of audio transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] 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.

[0038] Figure 1 It is a structural diagram of the audio transmission system provided in an embodiment of the present application.

[0039] Figure 2 It is another structural schematic diagram of the audio transmission system provided in an embodiment of the present application.

[0040] Figure 3 It is a flowchart of the audio transmission method provided in an embodiment of the present application.

[0041] Figure 4 It is a structural diagram of the audio transmission device provided in an embodiment of the present application.

[0042] Figure 5 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0043] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0044] It should be noted that, in this article, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element. In addition, components, features, and elements with the same name in different embodiments of the present application may have the same meaning or different meanings, and their specific meanings need to be determined by their explanation in the specific embodiment or further combined with the context of the specific embodiment.

[0045] 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.

[0046] In the subsequent description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present application, and have no specific meanings. Therefore, "module", "component" or "unit" can be used in a mixed manner.

[0047] In the description of the present application, it should be noted that the terms "upper", "lower", "left", "right", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present application. In addition, terms such as "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0048] Real-time audio transmission requires UWB to work continuously. Due to its own characteristics, UWB audio transmission is easily affected by occlusion and has a short transmission distance in open areas, resulting in poor stability of audio transmission.

[0049] Based on this, the embodiments of the present application provide an audio transmission method, device, storage medium and electronic device. Specifically, the audio transmission device can be integrated in an electronic device, and the electronic device can be a server or a terminal or other device; wherein the terminal can include a mobile phone, a wearable smart device, a tablet computer, a laptop computer, and a personal computer (PC), etc.; the server can be a single server or a server cluster composed of multiple servers, and can be a physical server or a virtual server.

[0050] For example, see Figure 1 , Figure 1 1 is a schematic diagram of the structure of an audio transmission system provided in an embodiment of the present application. The audio transmission system may include a transmitting end 1000 and a receiving end 2000.

[0051] The transmitting end 1000 may be connected to the receiving end 2000 via a network. In this embodiment, the receiving end 2000 may execute the audio transmission method provided in the embodiment of the present application.

[0052] For example, the receiving end 2000 obtains the data length of a single packet of data transmitted by the transmitting end 1000 and the transmission rate of the first transmission channel; then, the receiving end 2000 calculates the maximum number of transmissions of the transmitting end within the first preset period according to the data length and the transmission rate; thereafter, the receiving end 2000 obtains the audio transmission success rate of the first transmission channel within the second preset period; then, the receiving end 2000 estimates the estimated remaining position of the cache queue of the receiving end 2000 after the third preset period according to the transmission success rate and the maximum number of transmissions; finally, the receiving end 2000 compares the estimated remaining position with a preset threshold, and determines whether to switch the audio transmission channel according to the comparison result.

[0053] For another example, see Figure 2 , Figure 2 1 is another structural diagram of an audio transmission system provided in an embodiment of the present application. The audio transmission system may include a transmitter 1000, a receiver 2000 and a server 3000.

[0054] The sending end 1000 and the receiving end 2000 can be connected to the server 3000 through the network respectively. The sending end 1000 and the receiving end 2000 communicate indirectly through the server 3000.

[0055] In this embodiment, the audio transmission method provided in the embodiment of the present application can be executed by the server 3000. For example, the server 3000 obtains the data length of the single packet data transmitted by the transmitter 1000 and the transmission rate of the first transmission channel; then, the server 3000 calculates the maximum number of transmissions of the transmitter in the first preset period according to the data length and the transmission rate; thereafter, the server 3000 obtains the audio transmission success rate of the first transmission channel in the second preset period; then, the server 3000 estimates the estimated remaining position of the cache queue of the receiving end 2000 after the third preset period according to the transmission success rate and the maximum number of transmissions; finally, the server 3000 compares the estimated remaining position with the preset threshold, and determines whether to switch the audio transmission channel according to the comparison result.

[0056] In the embodiment of the present application, the transmitting end 1000 and the receiving end 2000 may be electronic devices with computing hardware, and the computing hardware may support and execute software products corresponding to multimedia. It should be noted that the network may be a wireless network such as Bluetooth and UWB.

[0057] The technical solutions shown in the present application will be described in detail below through specific embodiments. It should be noted that the description order of the following embodiments is not intended to limit the priority order of the embodiments.

[0058] See also Figure 3 , Figure 3 : is a flow chart of the audio transmission method provided in the embodiment of the present application. The specific flow of the audio transmission method can be as follows:

[0059] 101. Obtain a data length of a single packet of data transmitted by a transmitting end and a transmission rate of a first transmission channel.

[0060] It is understandable that the audio data may be composed of a plurality of audio frames. The audio data refers to data transmitted via audio. It should be noted that the audio data includes but is not limited to original lossless audio recorded in real time by an audio recording device with networking function.

[0061] In some embodiments, the audio recording device may be integrated into the transmitting end, and the transmitting end may directly obtain the audio data through the audio recording device. The audio recording device may also be a device independent of the transmitting end, and the audio data may be collected by the audio recording device, and then the transmitting end obtains the audio data from the audio recording device through data interaction.

[0062] Among them, the data length of the single packet of data refers to the measurement of the amount of information contained in a single data packet. It is understandable that the single packet of data may include several audio frames. In an embodiment of the present application, the data length of the single packet of data is Lt. Among them, L is the data length of several audio frames plus the data length of the header information of the first transmission channel. For example, when the first transmission channel is a UWB transmission channel, L is the data length of several audio frames plus the header information length of the UWB transmission channel. t is the time length of several audio frames.

[0063] 102. Calculate the maximum number of transmissions of the transmitter within the first preset period according to the data length and the transmission rate.

[0064] In some embodiments, the transmission time of a single packet of data from the transmitter to the receiver can be calculated based on the data length and the transmission rate; then the maximum number of transmissions of the transmitter within the first preset period is calculated based on the first preset period and the transmission time.

[0065] Specifically, the transmission time can be added to the response time configured by the system to obtain the total transmission time of a single packet of data, and then the first preset period can be divided by the total transmission time to obtain the maximum number of transmissions of the transmitter within the first preset period.

[0066] 103. Obtain an audio transmission success rate of the first transmission channel within a second preset period.

[0067] For example, the first total number of single-packet data successfully received by the receiving end within the second preset period can be obtained; the second total number of single-packet data transmitted by the transmitting end within the second preset period can be obtained; and the audio transmission success rate of the first transmission channel can be calculated based on the first total number and the second total number.

[0068] 104. Estimate the estimated remaining position of the cache queue of the receiving end after a third preset period according to the transmission success rate and the maximum number of transmissions.

[0069] Specifically, the maximum number of single-packet data received by the receiving end within the third preset period can be estimated based on the transmission success rate and the maximum number of transmissions; the estimated remaining position of the cache queue of the receiving end after the third preset period can be calculated based on the current remaining position and maximum number of the cache queue.

[0070] The cache queue of the receiving end refers to a first-in-first-out queue (FIFO). In the embodiment of the present application, the cache queue includes two FIFOs, and the number of positions of each FIFO is configured as F0. That is, all positions in the cache queue are 2F0.

[0071] It can be understood that in the FIFO, each position corresponds to a single packet of data.

[0072] In the embodiment of the present application, F0 / 2*t is a period T. Wherein, t refers to the time length of a number of audio frames in a single packet of data. The first preset period refers to 2T. The second preset period is T. The third preset period refers to the next first preset period 2T.

[0073] 105. Compare the estimated remaining position with a preset threshold, and determine whether to switch the audio transmission channel according to the comparison result.

[0074] Specifically, the estimated remaining position can be compared with a preset threshold; when the estimated remaining position is greater than or equal to the preset threshold, it indicates that the current audio transmission is normal, and the first transmission channel is used as the audio transmission channel; when the estimated remaining position is less than the preset threshold, it indicates that the current audio transmission is abnormal, and the second transmission channel is used as the audio transmission channel.

[0075] It should be noted that the preset threshold is 2F0.

[0076] In an embodiment of the present application, the cache queue includes two FIFOs, one is a buffer FIFO and the other is a playback FIFO.

[0077] It can be understood that the maximum number of transmissions C of the transmitting end within the first preset period 2T is 2T It must be greater than 2F0. Because the audio data is losslessly compressed during transmission. In addition, the ultra-wideband transmission rate of UWB is several hundred megabits per second, and the rate can be calculated using 192k 24-bit audio data. That is, the rate = 192000*2*3*8 = 9.216Mbps. Therefore, the maximum number of transmissions C in the first preset period 2T is 2T >2F0.

[0078] The maximum number FC of single-packet data received by the receiving end in the third preset period can be regarded as the maximum replenishment speed of the cache queue in the third preset period. When FC>=2F0, the transmission success rate is large enough to ensure that all data in the third preset period are successfully sent out. This situation can be regarded as full replenishment, which can ensure that the audio data in the third preset period is transmitted normally and the audio is played normally. When FC<2F0, the transmission rate is reduced, the audio data in the third preset period will be lost, and the audio playback will be abnormal.

[0079] The estimated remaining position Ft is used as the estimated value of the remaining position of the cache queue after the third preset period. Therefore, when Ft>= 2F0, the audio transmission is normal, and the audio playback within the third preset period can be normal. When Ft<2F0, the audio transmission is abnormal, and the audio data within 2T cannot be transmitted normally, and the audio playback will be unstable.

[0080] It should be noted that, in the embodiment of the present application, the first transmission channel is a UWB transmission channel. The second transmission channel is a Bluetooth transmission channel. It should be noted that, in the embodiment of the present application, when the audio transmission task starts, the UWB transmission channel is used as the audio transmission channel by default.

[0081] In a specific implementation, when the first transmission channel is used for audio transmission, the estimated remaining position Ft can be monitored in real time. If Ft<2F0 occurs, the audio transmission channel is switched from the first transmission channel to the second transmission channel.

[0082] In the process of using the second transmission channel for audio transmission, the estimated remaining position Ft can be periodically monitored, and the monitoring period is once every 2 seconds. If Ft>= 2F0 appears, it means that the first transmission channel can be transmitted normally. At this time, the audio transmission channel can be switched from the second transmission channel to the first transmission channel. That is, when the second transmission channel is the current audio transmission channel, the step of obtaining the data length of the single packet data transmitted by the transmitter and the transmission rate of the first transmission channel can be returned at every preset interval.

[0083] In the embodiment of the present application, the UWB transmission channel is used by default for audio transmission. If the transmission efficiency is low, the Bluetooth transmission channel is selected for audio transmission. During the Bluetooth transmission process, the UWB transmission efficiency is periodically detected. If the UWB transmission efficiency is high, it is switched to UWB transmission. UWB and Bluetooth are two common wireless audio transmission technologies, which are widely used in various smart devices, such as mobile phones, headphones, speakers, etc. However, due to the characteristics of wireless transmission, these technologies may be affected by various factors during the transmission process, such as signal interference, transmission distance, etc., resulting in unstable transmission speed. In order to ensure the integrity and real-time nature of the audio data, it is necessary to monitor the transmission process in real time to ensure the smooth audio transmission. That is, in the embodiment of the present application, Bluetooth audio transmission is introduced to assist the UWB technology in real-time wireless audio transmission, and the low latency and high-definition audio brought by UWB can be enjoyed under reliable conditions, and the continuity and reliability of audio transmission can be ensured under unfavorable conditions.

[0084] In summary, the audio transmission method provided by the embodiment of the present application includes obtaining the data length of a single packet of data transmitted by the transmitter and the transmission rate of the first transmission channel; calculating the maximum number of transmissions of the transmitter within the first preset period according to the data length and the transmission rate; obtaining the audio transmission success rate of the first transmission channel within the second preset period; estimating the estimated remaining position of the cache queue of the receiving end after the third preset period according to the transmission success rate and the maximum number of transmissions; comparing the estimated remaining position with the preset threshold, and determining whether to switch the audio transmission channel according to the comparison result. This scheme can determine whether the current audio transmission is abnormal by comparing the estimated remaining position with the preset threshold, thereby selecting a suitable audio transmission channel for audio transmission according to the judgment result to ensure the continuity and stability of the audio transmission. That is, this scheme can improve the continuity and stability of audio transmission.

[0085] In order to better implement the audio transmission method provided in the embodiment of the present application, the embodiment of the present application also provides an audio transmission device, wherein the meanings of the terms are the same as those in the above-mentioned audio transmission method, and the specific implementation details can refer to the description in the method embodiment.

[0086] See also Figure 4 , Figure 4 2 is a schematic diagram of the structure of the audio transmission device provided in the embodiment of the present application. The audio transmission device may include a first acquisition unit 201, a number calculation unit 202, a second acquisition unit 203, a memory estimation unit 204 and a channel switching unit 205.

[0087] A first acquisition unit 201 is used to acquire the data length of a single packet of data transmitted by the transmitting end and the transmission rate of the first transmission channel;

[0088] A times calculation unit 202, configured to calculate a maximum number of transmissions of the transmitter within a first preset period according to the data length and the transmission rate;

[0089] A second acquisition unit 203 is used to acquire the audio transmission success rate of the first transmission channel within a second preset period;

[0090] A memory estimation unit 204, configured to estimate an estimated remaining position of a cache queue of a receiving end after a third preset period according to the audio transmission success rate and the maximum number of transmissions;

[0091] The channel switching unit 205 is used to compare the estimated remaining position with a preset threshold and determine whether to switch the audio transmission channel according to the comparison result.

[0092] The specific implementation of each of the above units can refer to the above-mentioned embodiment of the audio transmission method, which will not be described one by one here.

[0093] In summary, the audio transmission device provided in the embodiment of the present application can obtain the data length of a single packet of data transmitted by the transmitter and the transmission rate of the first transmission channel through the first acquisition unit 201; the number calculation unit 202 calculates the maximum number of transmissions of the transmitter within the first preset period according to the data length and the transmission rate; the second acquisition unit 203 obtains the audio transmission success rate of the first transmission channel within the second preset period; the memory estimation unit 204 estimates the estimated remaining position of the cache queue of the receiving end after the third preset period according to the audio transmission success rate and the maximum number of transmissions; the channel switching unit 205 compares the estimated remaining position with the preset threshold, and determines whether to switch the audio transmission channel according to the comparison result. This scheme can determine whether the current audio transmission is abnormal by comparing the estimated remaining position with the preset threshold, and select a suitable audio transmission channel for audio transmission according to the judgment result to ensure the continuity and stability of the audio transmission. That is, this scheme can improve the continuity and stability of audio transmission.

[0094] The present application also provides an electronic device, in which the audio transmission device of the present application can be integrated, such as Figure 5As shown, it shows a schematic diagram of the structure of the electronic device involved in the embodiment of the present application, specifically:

[0095] The electronic device may include components such as a radio frequency (RF) circuit 401, a memory 402 including one or more computer-readable storage media, an input unit 403, a display unit 404, a sensor 405, an audio circuit 406, a wireless fidelity (WiFi) module 407, a processor 408 including one or more processing cores, and a power supply 409. Those skilled in the art will appreciate that Figure 5 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0096] The RF circuit 401 can be used for receiving and sending signals during the process of sending and receiving information or making calls. In particular, after receiving the downlink information of the base station, it is handed over to one or more processors 408 for processing; in addition, the data related to the uplink is sent to the base station. Generally, the RF circuit 401 includes but is not limited to an antenna, at least one amplifier, a tuner, one or more oscillators, a subscriber identity module (Subscriber Identity Module, SIM) card, a transceiver, a coupler, a low noise amplifier (LowNoise Amplifier, LNA), a duplexer, etc. In addition, the RF circuit 401 can also communicate with the network and other devices through wireless communication. Wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile communication (Global System of Mobile communication, GSM), General Packet Radio Service (General PacketRadio Service, GPRS), Code Division Multiple Access (Code Division Multiple Access, CDMA), Wideband Code Division Multiple Access (Wideband Code Division Multiple Access, WCDMA), Long Term Evolution (Long Term Evolution, LTE), email, Short Messaging Service (SMS), etc.

[0097] The memory 402 can be used to store software programs and modules. The processor 408 executes various functional applications and information processing by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device (such as audio data, a phone book, etc.), etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 402 may also include a memory controller to provide the processor 408 and the input unit 403 with access to the memory 402.

[0098] The input unit 403 can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. Specifically, in a specific embodiment, the input unit 403 may include a touch-sensitive surface and other input devices. The touch-sensitive surface, also known as a touch display screen or a touch pad, can collect the user's touch operations on or near it (such as the user's operation on or near the touch-sensitive surface using any suitable object or accessory such as a finger, a stylus, etc.), and drive the corresponding connection device according to a pre-set program. Optionally, the touch-sensitive surface may include a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch direction, 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, converts it into the touch point coordinates, and then sends it to the processor 408, and can receive and execute the command sent by the processor 408. In addition, the touch-sensitive surface can be implemented using multiple types such as resistive, capacitive, infrared and surface acoustic wave. In addition to the touch-sensitive surface, the input unit 403 may also include other input devices. Specifically, other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as a volume control key, a switch key, etc.), a trackball, a mouse, a joystick, and the like.

[0099] The display unit 404 can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the electronic device, which can be composed of graphics, text, icons, videos, and any combination thereof. The display unit 404 may include a display panel. Optionally, the display panel may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like. Furthermore, the touch-sensitive surface may cover the display panel, and when the touch-sensitive surface detects a touch operation on or near it, it is transmitted to the processor 408 to determine the type of touch event, and then the processor 408 provides a corresponding visual output on the display panel according to the type of touch event. Although in Figure 5 In the embodiment, the touch-sensitive surface and the display panel are used as two independent components to realize input and output functions, but in some embodiments, the touch-sensitive surface and the display panel can be integrated to realize input and output functions.

[0100] The electronic device may also include at least one sensor 405, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel according to the brightness of the ambient light, and the proximity sensor may turn off the display panel and / or backlight when the electronic device is moved to the ear. As a type of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; As for other sensors that can be configured in electronic devices, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be repeated here.

[0101] The audio circuit 406, the speaker, and the microphone can provide an audio interface between the user and the electronic device. The audio circuit 406 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 406 and converted into audio data, and then the audio data is output to the processor 408 for processing, and then sent to another electronic device through the RF circuit 401, or the audio data is output to the memory 402 for further processing. The audio circuit 406 may also include an earplug jack to provide communication between an external headset and the electronic device.

[0102] WiFi is a short-range wireless transmission technology. Electronic devices can help users send and receive emails, browse web pages, and access streaming media through WiFi module 407. It provides users with wireless broadband Internet access. Figure 5 , a WiFi module 407 is shown, but it is understandable that it is not a necessary component of the electronic device and can be omitted as needed without changing the essence of the invention.

[0103] The processor 408 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire mobile phone. By running or executing software programs and / or modules stored in the memory 402, and calling data stored in the memory 402, it performs various functions of the electronic device and processes data, thereby monitoring the mobile phone as a whole. Optionally, the processor 408 may include one or more processing cores; preferably, the processor 408 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 408.

[0104] The electronic device also includes a power supply 409 (such as a battery) for supplying power to each component. Preferably, the power supply can be logically connected to the processor 408 through a power management system, so that the power management system can manage charging, discharging, and power consumption. The power supply 409 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0105] Although not shown, the electronic device may also include a camera, a Bluetooth module, etc., which will not be described in detail here. Specifically in this embodiment, the processor 408 in the electronic device will load the executable files corresponding to the processes of one or more applications into the memory 402 according to the following instructions, and the processor 408 will run the application stored in the memory 402 to achieve various functions, such as:

[0106] Acquire the data length of a single packet of data transmitted by the transmitting end and the transmission rate of the first transmission channel;

[0107] Calculate the maximum number of transmissions of the transmitter within the first preset period according to the data length and the transmission rate;

[0108] Obtaining an audio transmission success rate of the first transmission channel within a second preset period;

[0109] estimating an estimated remaining position of a cache queue of the receiving end after a third preset period according to a transmission success rate and a maximum number of transmissions;

[0110] The estimated remaining position is compared with a preset threshold, and a determination is made based on the comparison result whether to switch the audio transmission channel.

[0111] In summary, the electronic device provided in the embodiment of the present application obtains the data length of a single packet of data transmitted by the transmitter and the transmission rate of the first transmission channel; calculates the maximum number of transmissions of the transmitter within the first preset period according to the data length and the transmission rate; obtains the audio transmission success rate of the first transmission channel within the second preset period; estimates the estimated remaining position of the cache queue of the receiving end after the third preset period according to the transmission success rate and the maximum number of transmissions; compares the estimated remaining position with the preset threshold, and determines whether to switch the audio transmission channel according to the comparison result. This scheme can determine whether the current audio transmission is abnormal by comparing the estimated remaining position with the preset threshold, and thus selects a suitable audio transmission channel for audio transmission according to the judgment result to ensure the continuity and stability of the audio transmission. That is, this scheme can improve the continuity and stability of audio transmission.

[0112] In the above embodiments, the description of each embodiment has its own focus. For the part that is not described in detail in a certain embodiment, please refer to the detailed description of the audio transmission method above, and will not be repeated here.

[0113] It should be noted that, for the audio transmission method in the embodiment of the present application, those skilled in the art can understand that all or part of the process of implementing the audio transmission method in the embodiment of the present application can be completed by controlling the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, such as stored in the memory of the terminal, and executed by at least one processor in the terminal. During the execution process, it can include the process of the embodiment of the audio transmission method.

[0114] For the audio transmission device of the embodiment of the present application, each functional module thereof may be integrated into a processing chip, or each module may exist physically separately, or two or more modules may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0115] To this end, the embodiment of the present application provides a storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any audio transmission method provided in the embodiment of the present application. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), etc.

[0116] The audio transmission method, device, storage medium and electronic device provided by the present application are respectively introduced in detail above. 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 core idea of ​​the present application; at the same time, for technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method 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 transmission method, characterized in that: include: Acquire the data length of a single packet of data transmitted by the transmitting end and the transmission rate of the first transmission channel; Calculate the maximum number of transmissions of the transmitter within a first preset period according to the data length and the transmission rate; Obtaining an audio transmission success rate of the first transmission channel within a second preset period; estimating an estimated remaining position of a cache queue of a receiving end after a third preset period according to the audio transmission success rate and the maximum number of transmissions; The estimated remaining position is compared with a preset threshold, and it is determined whether to switch the audio transmission channel according to the comparison result.

2. The audio transmission method according to claim 1, characterized in that: The estimating the estimated remaining position of the cache queue of the receiving end after the third preset period according to the audio transmission success rate and the maximum number of transmissions includes: estimating the maximum number of single-packet data received by the receiving end within a third preset period according to the audio transmission success rate and the maximum number of transmissions; The estimated remaining position of the cache queue of the receiving end after the third preset period is calculated according to the current remaining position of the cache queue and the maximum number.

3. The audio transmission method according to claim 1, characterized in that: The step of comparing the estimated remaining position with a preset threshold and determining whether to switch the audio transmission channel according to the comparison result includes: comparing the estimated remaining position with a preset threshold; When the estimated remaining position is greater than or equal to the preset threshold, it indicates that the current audio transmission is normal, and the first transmission channel is used as the audio transmission channel; When the estimated remaining position is less than the preset threshold, it indicates that the current audio transmission is abnormal, and the second transmission channel is used as the audio transmission channel.

4. The audio transmission method according to claim 1, characterized in that: After comparing the estimated remaining position with a preset threshold and determining whether to switch the audio transmission channel according to the comparison result, the method further includes: The step of obtaining the data length of a single packet of data transmitted by the transmitting end and the transmission rate of the first transmission channel is returned to be executed at every preset time interval.

5. The audio transmission method according to claim 1, characterized in that: The obtaining the audio transmission success rate of the first transmission channel within the second preset period includes: Obtaining a first total number of the single packet data successfully received by the receiving end within a second preset period; Acquire a second total number of the single packet data transmitted by the transmitting end within a second preset period; The audio transmission success rate of the first transmission channel is calculated according to the first total number and the second total number.

6. The audio transmission method according to claim 1, characterized in that: The calculating the maximum number of transmission times of the transmitting end within the first preset period according to the data length and the transmission rate includes: Calculating the transmission time of the single packet of data from the transmitting end to the receiving end according to the data length and the transmission rate; The maximum number of transmission times of the transmitting end within the first preset period is calculated based on the first preset period and the transmission time.

7. The audio transmission method according to claim 3, characterized in that: The first transmission channel is a UWB transmission channel, and the second transmission channel is a BT transmission channel.

8. An audio transmission device, characterized in that: include: A first acquisition unit, used to acquire the data length of a single packet of data transmitted by the transmitting end and the transmission rate of the first transmission channel; A times calculation unit, used for calculating the maximum number of transmissions of the transmitting end within a first preset period according to the data length and the transmission rate; A second acquisition unit, configured to acquire an audio transmission success rate of the first transmission channel within a second preset period; A memory estimation unit, configured to estimate an estimated remaining position of a cache queue of a receiving end after a third preset period according to the audio transmission success rate and the maximum number of transmissions; The channel switching unit is used to compare the estimated remaining position with a preset threshold and determine whether to switch the audio transmission channel according to the comparison result.

9. A storage medium, characterized in that: The storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the audio transmission method according to any one of claims 1 to 7.

10. An electronic device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the audio transmission method according to any one of claims 1 to 7 when executing the computer program.