Audio transmission method and device and computer readable storage medium
By receiving and allocating audio transmission serial numbers and data windows in audio transmission, the problem of inflexible resource allocation in the prior art is solved, and the audio transmission quality and stability are improved.
Patent Information
- Application Number
- CN202510148482.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-10
- Publication Date
- 2025-06-13
AI Technical Summary
The prior art has difficulty in ensuring the quality of audio transmission due to inflexible resource allocation in audio transmission, especially in complex environments.
The first terminal receives the audio transmission request of the second terminal, and allocates the audio transmission serial number and the final data window based on the audio transmission code rate, so as to realize flexible allocation of audio transmission resources.
It improves the audio transmission quality and can dynamically adjust the audio quality in complex environments to ensure the stability and continuity of the transmission quality.
Smart Images

Figure CN120151935A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of wireless communication technologies, and particularly to an audio transmission method, apparatus, and computer-readable storage medium. Background Art
[0002] Audio transmission refers to the process of transmitting sound signals to a receiving end through a device or medium. Audio transmission has wide applications in various fields, including television, radio, telephone, audio devices, etc. In audio transmission, due to insufficient resource allocation, it is often difficult to ensure the audio transmission quality in various application environments. Therefore, how to flexibly allocate audio transmission resources and improve audio transmission quality has become an urgent problem to be solved. Summary of the Invention
[0003] This application provides an audio transmission method, apparatus, and computer-readable storage medium, which can flexibly allocate audio transmission resources and improve audio transmission quality.
[0004] To solve the above technical problems, the technical solution adopted in this application is: providing an audio transmission method, the method includes: a first terminal receives audio transmission requests of at least one second terminal in a current transmission cycle, and the audio transmission requests include audio transmission bitrates; in response to the audio transmission requests, based on the audio transmission bitrates, audio transmission information is obtained, where the audio transmission information includes at least one audio transmission sequence number and at least one final data window corresponding to each of the first terminal and the at least one second terminal; the audio transmission information is sent to each of the second terminals so that the second terminals perform audio transmission based on the audio transmission information; audio transmission is performed based on the audio transmission sequence number and the final data window corresponding to the first terminal.
[0005] To solve the above technical problems, another technical solution adopted in this application is: providing an audio transmission apparatus, which includes a memory and a processor connected to each other, where the memory is used to store a computer program, and when the computer program is executed by the processor, it is used to implement the audio transmission method in the above technical solution.
[0006] To solve the above technical problems, another technical solution adopted in this application is: providing a computer-readable storage medium, which is used to store a computer program, and when the computer program is executed by the processor, it is used to implement the audio transmission method in the above technical solution.
[0007] Through the above solution, the beneficial effects of the present application are as follows: The first terminal receives audio transmission requests from at least one second terminal in the current transmission cycle. Since the audio transmission request includes the audio transmission bit rate, in response to the audio transmission request, based on the audio transmission bit rate in the audio transmission request, at least one audio transmission sequence number and at least one final data window corresponding to the first terminal and at least one second terminal respectively can be obtained. These audio transmission information. Then, the first terminal sends the audio transmission information to each second terminal so that the second terminal can perform audio transmission based on the audio transmission information, and the first terminal itself performs audio transmission based on the allocated audio transmission sequence number and the final data window, realizing audio transmission between the first terminal and at least one second terminal. Since the first terminal can allocate audio transmission resources such as audio transmission sequence numbers and final data windows according to the transmission bit rate of the second terminal, and the allocation of audio transmission sequence numbers and final data windows can be one or more, the order and channel resources of audio transmission can be flexibly allocated, improving the quality of audio transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings. Among them:
[0009] Figure 1 is a schematic flowchart of an embodiment of the audio transmission method provided by the present application;
[0010] Figure 2 is a schematic diagram of the channel resources in the current transmission cycle in step S11 of an embodiment of the audio transmission method provided by the present application;
[0011] Figure 3 is a schematic flowchart of step S12 in an embodiment of the audio transmission method provided by the present application;
[0012] Figure 4 is a schematic flowchart of another embodiment of the audio transmission method provided by the present application;
[0013] Figure 5 is a schematic structural diagram of an embodiment of the audio transmission device provided by the present application;
[0014] Figure 6 is a schematic structural diagram of an embodiment of the computer-readable storage medium provided by the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0015] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be specifically noted that the following embodiments are only used to illustrate the present application, but do not limit the scope of the present application. Similarly, the following embodiments are only partial embodiments of the present application rather than all embodiments. All other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present application.
[0016] The mention of "embodiment" in the present application means that the specific features, structures or characteristics described in connection with the embodiment may be included in at least one embodiment of the present application. The phrase appears in various positions in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will explicitly and implicitly understand that the embodiments described herein may be combined with other embodiments.
[0017] It should be noted that the terms "first", "second", and "third" in the present application are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first", "second", and "third" may explicitly or implicitly include at least one of such features. In the description of the present application, the meaning of "a plurality" is at least two, such as two, three, etc., unless otherwise specifically defined. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products or devices.
[0018] The audio transmission method of this application is a wireless audio transmission method. Taking the traditional Sub_1G wireless audio transmission scheme as an example, the Sub_1G wireless audio transmission scheme has the advantage of long transmission distance, but its transmission code rate is much smaller than that of the common 2.4G audio transmission scheme. The Sub_1G wireless audio transmission scheme has a half-duplex communication mode and a two-way voice transmission communication mode. And in the audio transmission scheme, multi-channel audio transmission is achieved by dividing multiple data windows. However, the time of the data windows allocated to the terminals for audio transmission is fixed and the transmission time is short, resulting in limited data volume transmitted, making it difficult to guarantee the communication quality. And when fixed data windows are provided for the terminals to perform audio transmission, it often causes waste of air interface resources in the actual intercom usage scenario. Therefore, no matter which audio transmission scheme, there are influencing factors such as transmission distance, transmission code rate, communication mode, resource allocation, etc. that affect the audio transmission quality. This application hopes to ensure the maximization of the use of wireless channel resources, improve the quality of audio during wireless audio transmission, and be able to dynamically adjust the audio quality, so that the transmission quality can also be guaranteed in complex environments. The technical solutions of this application are described in detail below:
[0019] Please refer to Figure 1 , Figure 1 which is a schematic flowchart of an embodiment of the audio transmission method provided by this application. The method includes:
[0020] S11: The first terminal receives audio transmission requests from at least one second terminal in the current transmission cycle, where the audio transmission request includes an audio transmission code rate.
[0021] In audio transmission, after the terminal initiating audio transmission initiates an audio transmission communication in the current network environment, other terminals can join the initiated audio transmission communication. Therefore, realizing audio transmission can include the terminal initiating the audio transmission communication and the terminals joining the audio transmission communication. Of course, it can be understood that in audio transmission participated by multiple terminals, one or more terminals can send audio data. The first terminal is the terminal initiating the audio transmission communication, and the second terminal is the terminal joining the audio transmission communication. The first terminal can be any terminal in the current network environment. The second terminal can be one or more, which is not limited here. The first terminal and the second terminal are any terminals capable of audio transmission, so the first terminal and the second terminal include but are not limited to smart phones, PCs (Personal Computers), PDAs (Personal Digital Assistants or tablet computers), etc. with audio transmission communication functions, as well as wearable devices with audio transmission communication functions worn on the body or embedded in clothing, jewelry, and accessories.
[0022] The current transmission cycle is the transmission cycle at the current time in the cyclic audio transmission cycle. The data window that the current network environment can support for each transmission cycle is limited, that is, the maximum value of the data window for each transmission cycle in the current network environment is the same. The maximum bandwidth corresponding to the maximum value of the data window can be, but is not limited to, 400 - 500 kbit / s, and no specific limitation is made here. Please refer to Figure 2 , Figure 2 Figure Figure 2 is a schematic diagram of the channel resources of the current transmission cycle in step S11 of an embodiment of the audio transmission method provided by this application. The channel resources of the current transmission cycle include four clear-air windows and their corresponding data windows. The clear-air windows are used to detect whether an audio transmission request is received, so as to determine the audio transmission sequence number, and thus determine the transmission timing among multiple terminals. The data window is used for single-source audio data transmission and can be allocated to the terminal as the final data window, so that the terminal uses the final data window to transmit audio data. The clear-air window corresponds to the clear-air window time slot, and the data window corresponds to the data window time slot, and the two together form a transmission cycle for transmitting audio data. It should be noted that Figure 2 the number of clear-air windows and data windows in Figure 2 is only an example, and the actual number of windows is not specifically limited.
[0023] In an embodiment, before the first terminal receives the audio transmission requests of at least one second terminal in the current transmission cycle, the audio analysis algorithm can be used to denoise the data to be transmitted, extract the effective audio data, so as to transmit the effective audio data during audio transmission. If it is detected that there is no effective audio data, the execution of the audio transmission method is stopped, which can effectively reduce the data volume of data transmission and reduce resource waste. The audio analysis algorithm can be any algorithm for denoising audio data, including but not limited to the human voice extraction algorithm, and no specific limitation is made here. Therefore, using the audio analysis algorithm to denoise the data to be transmitted, identify the effective conversation content, filter out the environmental background noise, and extract the effective audio data, so that the data transmitted by the channel resources during audio transmission are all effective audio data, thereby improving the usage efficiency of the wireless channel.
[0024] In an embodiment, before the first terminal receives the audio transmission requests of at least one second terminal in the current transmission cycle, if it is detected that no audio transmission request is received throughout the current transmission cycle, all audio transmission sequence numbers and the final data window are allocated to the first terminal, and the steps in response to the audio transmission request and subsequent steps are not executed. Taking Figure 2 as an example, when all audio transmission sequence numbers and the final data window are allocated to the first terminal, Figure 2All data windows are allocated to the first terminal, allowing the first terminal to exclusively occupy all data windows and achieve exclusive access to channel resources by the first terminal. Therefore, during audio transmission, if no audio transmission request is received in the current transmission cycle, the first terminal is allowed to exclusively occupy the channel resources. It can be understood that in any transmission cycle after the current transmission cycle, an audio transmission request can still be received to enable the second terminal to send audio data.
[0025] S12: In response to the audio transmission request, based on the audio transmission bitrate, obtain audio transmission information, where the audio transmission information includes at least one audio transmission sequence number and at least one final data window corresponding to each of the first terminal and at least one second terminal.
[0026] The audio transmission sequence number is used to indicate the order of precedence during actual audio transmission. The final data window is the data window actually allocated to the terminal for audio transmission. The audio transmission bitrate is used to calculate the number of data windows required for the second terminal to perform audio transmission.
[0027] After receiving the audio transmission request, in response to the audio transmission request, based on the audio transmission bitrate in the audio transmission request, the first terminal can calculate the number of data windows required for each second terminal to perform audio transmission. The audio transmission bitrate is positively correlated with the number of data windows required for audio transmission. The larger the audio transmission bitrate, the larger the bandwidth of audio transmission, and the more data windows required for audio transmission. Since the audio transmission request includes the audio transmission bitrate, after the first terminal receives the audio transmission request from one or more second terminals, it can calculate the number of data windows required for each second terminal to perform audio transmission, and then allocate the respective audio transmission sequence numbers and final data windows to all terminals including the first terminal itself.
[0028] The audio transmission sequence numbers allocated to the first terminal and / or the second terminal can be one or more, and the allocated final data windows can also be one or more. Therefore, the durations of audio transmission by multiple terminals may be the same or different. Different from the situation where all the allocated final data windows of all terminals are the same and the time slots of each terminal are the same, the transmission time may not be sufficient to transmit the total amount of audio data that needs to be transmitted currently. This application can flexibly allocate audio transmission resources. For the second terminal, each second terminal can detect whether the terminal that previously performed audio transmission has finished transmitting. After the previous terminal finishes transmitting, it then performs audio transmission in its allocated audio transmission sequence number and final data window, thereby improving the continuity of audio transmission.
[0029] Since the audio transmission sequence number and the final data window required by the first terminal itself can be calculated, it is only necessary to directly calculate the audio transmission sequence number and the final data window when the first terminal performs audio transmission. The audio transmission sequence numbers and the final data windows of all the second terminals are allocated by the first terminal. Therefore, the audio transmission sequence numbers and the final data windows of all the terminals participating in the audio transmission form audio transmission information, so that all the terminals can perform audio transmission based on the audio transmission information.
[0030] Please refer to Figure 3 , Figure 3 which is a schematic flowchart of step S12 in an embodiment of the audio transmission method provided by this application. When obtaining audio transmission information based on the audio transmission bit rate, it may include:
[0031] S121: Obtain the maximum value of the data window, the maximum value of the audio transmission sequence number, the order of receiving the audio transmission requests, and the number of first data windows required for the first terminal to perform audio transmission.
[0032] The maximum value of the data window is the maximum number of data windows that can be supported by a transmission cycle in the current network environment. The maximum value of the audio transmission sequence number is the same as the maximum value of the data window. Taking Figure 2 as an example, Figure 2 there are four data windows, so the maximum value of the data window is four, and the corresponding audio transmission sequence numbers are from one to four. Therefore, the maximum value of the audio transmission sequence number is also four.
[0033] In the case where multiple second terminals send audio transmission requests, there is an order when the first terminal receives the audio transmission requests. Therefore, the order of receiving the audio transmission requests can be obtained. In the current transmission cycle, if the number of second terminals is one, the data windows other than the final data window required for the first terminal to perform audio transmission can be used as the final data window of this second terminal.
[0034] The first terminal itself also has the need to transmit audio data during audio transmission and needs to occupy data windows. Therefore, obtain the number of first data windows required for the first terminal to perform audio transmission.
[0035] S122: Calculate the number of second data windows required for each second terminal to perform audio transmission based on the audio transmission bit rate corresponding to the second terminal.
[0036] The larger the audio transmission bit rate, the larger the bandwidth of the audio transmission, and the more the number of second data windows required for the second terminal to perform audio transmission.
[0037] The execution order of the above steps S121 and S122 can be that step S121 is before, or step S122 is before, or steps S121 and S122 are executed simultaneously. No specific limitation is made here.
[0038] S123: Obtain the audio transmission sequence number in the audio transmission information based on the sequence of receiving audio transmission requests, the maximum value of the audio transmission sequence number, the number of first data windows, and the number of second data windows.
[0039] In one embodiment, when obtaining the audio transmission sequence number in the audio transmission information based on the sequence of receiving audio transmission requests, the maximum value of the audio transmission sequence number, the number of first data windows, and the number of second data windows, the audio transmission sequence numbers of the first terminal can be determined as the sequence numbers corresponding to the first to the number of first data windows to obtain the remaining audio transmission sequence numbers; then the remaining audio transmission sequence numbers are sequentially assigned to the second terminal according to the sequence of receiving audio transmission requests until the maximum value of the audio transmission sequence number is reached. Since there is a sequence in the first terminal's receipt of audio transmission requests, the remaining audio transmission sequence numbers can be preferentially assigned to the second terminal that sent the audio transmission request earlier.
[0040] In one embodiment, when obtaining the audio transmission sequence number in the audio transmission information based on the sequence of receiving audio transmission requests, the maximum value of the audio transmission sequence number, the number of first data windows, and the number of second data windows, the audio transmission sequence numbers of the first terminal can be determined as the sequence numbers corresponding to the first to the number of first data windows to obtain the remaining audio transmission sequence numbers; then the remaining audio transmission sequence numbers are sequentially assigned to the second terminal according to the size order of the number of second data windows until the maximum value of the audio transmission sequence number is reached. Since the second terminal with a larger number of second data windows requires more windows, if it is assigned data windows later, it is very likely that the number of data windows assigned is not enough to support it to complete all audio data, resulting in discontinuous transmission data. Therefore, by sequentially assigning the remaining audio transmission sequence numbers to the second terminal according to the size order of the number of second data windows, the continuity of data transmission can be improved. In addition, through audio continuous transmission detection, the usage efficiency of the wireless channel can be improved. During the process of sequentially assigning the remaining audio transmission sequence numbers to the second terminal according to the size order of the number of second data windows, if there are multiple second terminals with the same size of the number of second data windows, the new remaining audio transmission sequence numbers are first assigned to any one of the multiple second terminals with the same size of the number of second data windows, and then to other second terminals.
[0041] In one embodiment, when the order of receiving the audio transmission requests and the order of the sizes of the second data window quantities exist simultaneously, the order of the sizes of the second data window quantities has a higher priority. That is, the priority of the order of the sizes of the second data window quantities is higher than the priority of the order of receiving the audio transmission requests. When obtaining the audio transmission sequence numbers in the audio transmission information based on the order of receiving the audio transmission requests, the maximum value of the audio transmission sequence numbers, the first data window quantity, and the second data window quantity, the audio transmission sequence numbers of the first terminal can be determined as the sequence numbers corresponding to the first to the first data window quantity to obtain the remaining audio transmission sequence numbers. Then, the remaining audio transmission sequence numbers are sequentially allocated to the second terminals according to the order of the sizes of the second data window quantities. And if there are multiple second terminals with the same size of the second data window quantity, the new remaining audio transmission sequence numbers are sequentially allocated to the multiple second terminals with the same size of the second data window quantity according to the order of receiving the audio transmission requests until the maximum value of the audio transmission sequence numbers is reached.
[0042] Since it is considered that the number of data windows allocated to the second terminal is insufficient to support it to complete all audio data, resulting in the problem of discontinuous transmitted data, in order to improve the continuity of audio data transmission, when sequentially allocating the remaining audio transmission sequence numbers to the second terminals according to the order of the sizes of the second data window quantities until the maximum value of the audio transmission sequence numbers is reached, it can be determined whether the number of data windows corresponding to the audio transmission sequence numbers allocated to the second terminal is less than the second data window quantity corresponding to the second terminal. If so, the remaining audio transmission sequence numbers are allocated to the next second terminal until the number of data windows corresponding to the audio transmission sequence numbers allocated to the second terminal is greater than or equal to the second data window quantity corresponding to the second terminal, so that in the case of insufficient data window quantity, it is preferentially allocated to the second terminal that can transmit data continuously. For the second terminal that has not been allocated an audio transmission sequence number, audio transmission can be performed in the next transmission cycle. In another embodiment, when sequentially allocating the remaining audio transmission sequence numbers to the second terminals according to the order of the sizes of the second data window quantities until the maximum value of the audio transmission sequence numbers is reached, it can be determined whether the number of data windows corresponding to the audio transmission sequence numbers allocated to the second terminal is less than the second data window quantity corresponding to the second terminal. If so, the latest remaining data window and the first adjustable transmission code rate that it can carry are sent to the second terminal so that the second terminal updates the audio transmission code rate to the first adjustable transmission code rate. The first adjustable transmission code rate is based on the transmission code rate that the latest remaining data window can support. Thus, after the second terminal adjusts the transmission code rate, it can just use the latest remaining data window to perform audio transmission. Furthermore, in the case of insufficient data window quantity, the second terminal can reduce the transmission code rate to match the remaining data windows.
[0043] S124: Determine the remaining data windows based on the maximum value of the data window and the number of the first data windows, and sequentially allocate the remaining data windows to the second terminals with earlier audio transmission serial numbers, so as to obtain the final data windows in the audio transmission information.
[0044] Since the first terminal is the terminal that initiates the audio transmission communication, the data windows allocated to the first terminal are the first data window to the data windows corresponding to the number of the first data windows. For example, if the number of the first data windows of the first terminal is two, the first and second data windows are the data windows allocated to the first terminal, and the subsequent data windows are the remaining data windows. After the data transmission of the first terminal itself is completed, the data transmission is then carried out by other second terminals. Since the sequence of the audio transmission serial numbers has been determined, the remaining data windows are sequentially allocated to the second terminals with earlier audio transmission serial numbers, and thus the final data windows in the audio transmission information can be obtained.
[0045] Therefore, by considering various factors such as the maximum value of the data window, the maximum value of the audio transmission serial number, the sequence of receiving the audio transmission requests, the number of the first data windows required for the first terminal to perform audio transmission, the number of the second data windows required for each second terminal to perform audio transmission, the remaining data windows, and the remaining audio transmission serial numbers, the resources for audio transmission are flexibly allocated, that is, the time slots are arranged according to the audio transmission bit rate and the remaining channel resources.
[0046] S13: Send the audio transmission information to each second terminal so that the second terminal can perform audio transmission based on the audio transmission information.
[0047] Since the audio transmission information includes at least one audio transmission serial number and at least one final data window corresponding to the first terminal and each of at least one second terminal, when actually performing audio transmission, after the first terminal sends the audio transmission information to each second terminal, the second terminal can know, according to the audio transmission information, at which one or which several audio transmission serial numbers and final data windows each terminal performs audio transmission.
[0048] S14: Perform audio transmission based on the audio transmission serial number and the final data window corresponding to the first terminal.
[0049] Since the audio transmission information includes at least one audio transmission serial number and at least one final data window corresponding to the first terminal and each of at least one second terminal, when actually performing audio transmission, the first terminal performs audio transmission based on the audio transmission serial number and the final data window corresponding to the first terminal.
[0050] Through the above solution, the first terminal receives audio transmission requests from at least one second terminal in the current transmission cycle. Since the audio transmission request includes an audio transmission bitrate, in response to the audio transmission request, based on the audio transmission bitrate in the audio transmission request, at least one audio transmission sequence number and at least one final data window corresponding to the first terminal and at least one second terminal can be obtained. These audio transmission information are then sent by the first terminal to each second terminal, so that the second terminal can perform audio transmission based on the audio transmission information, and the first terminal itself performs audio transmission based on the assigned audio transmission sequence number and final data window, realizing audio transmission between the first terminal and at least one second terminal. Since the first terminal can allocate audio transmission resources such as audio transmission sequence numbers and final data windows according to the transmission bitrate of the second terminal, and the allocation of audio transmission sequence numbers and final data windows can be one or more, the order and channel resources of audio transmission can be flexibly allocated, improving the audio transmission quality.
[0051] Considering that after audio transmission in the current transmission cycle, there may be situations where the audio transmission is incomplete due to transmission delay, transmission interruption, transmission jitter, etc., and it is necessary to re-adjust the resource allocation in the next transmission cycle after the current transmission cycle; there may also be a situation where a new terminal joins the current audio transmission in the next transmission cycle and receives a new audio transmission request, and it is also necessary to re-adjust the resource allocation in the next transmission cycle; there may also be a situation where the second terminal has only finished transmitting audio data in the current transmission cycle, resulting in an idle data window, and it is also necessary to re-adjust the resource allocation in the next transmission cycle. Therefore, in each subsequent transmission cycle, the resource allocation can be dynamically adjusted in real time. Please refer to Figure 4 , Figure 4 is a schematic flowchart of another embodiment of the audio transmission method provided by this application. The method includes:
[0052] S41: The first terminal receives audio transmission requests from at least one second terminal in the current transmission cycle. The audio transmission request includes an audio transmission bitrate, a start flag, and an end flag. The start flag indicates that the second terminal has started audio transmission, and the end flag indicates that the second terminal has ended audio transmission.
[0053] S42: In response to the audio transmission request, based on the audio transmission bitrate, obtain audio transmission information, where the audio transmission information includes at least one audio transmission sequence number and at least one final data window corresponding to the first terminal and at least one second terminal respectively.
[0054] S43: Send the audio transmission information to each second terminal so that the second terminal can perform audio transmission based on the audio transmission information.
[0055] S44: Perform audio transmission based on the audio transmission sequence number corresponding to the first terminal and the final data window.
[0056] Except that the audio transmission request also includes a start flag and an end flag, which is different from the embodiment in Figure 1 For the relevant descriptions of the above steps S41 to S44, reference can be made to the above steps S11 to S14, which will not be elaborated here.
[0057] S45: In the next transmission cycle of the current transmission cycle, if an end flag is detected, all the final data windows corresponding to the end flag are regarded as idle data windows.
[0058] If an end flag is detected, it indicates that the audio data of the terminal corresponding to the end flag has been completely transmitted, and there is no need to continue using the corresponding final data window. Therefore, all the final data windows corresponding to the end flag can be regarded as idle data windows, so that when the terminal no longer performs audio data transmission, the time slot resources corresponding to the idle data windows can be recycled, and the arrangement of the idle data windows and their corresponding time slots can be re-performed.
[0059] S46: Re-allocate at least one idle data window to at least one of the first terminal and / or the second terminal.
[0060] Since the number of final data windows allocated to each terminal may be one or more, the number of idle data windows may also be one or more. In the case of multiple idle data windows, one, multiple, or all idle data windows can be re-allocated. In the case of the existence of idle data windows, the idle data windows can also be retained without re-allocation. The idle data windows can be re-allocated only to the first terminal, only to the second terminal, or to both the first terminal and the second terminal at the same time, which is not specifically limited here.
[0061] When re-allocating, the re-allocation can be performed in the same way as the way of allocating data windows in the current transmission cycle, and the specific operation process will not be elaborated here.
[0062] In an embodiment, when re-allocating at least one idle data window to at least one of the first terminal and / or the second terminal, if a re-allocation request sent by the second terminal is received, the re-allocation request includes a delay flag, and the delay flag indicates that there is at least one of transmission delay, transmission interruption, and transmission jitter in the audio transmission of the second terminal; then the idle data window is preferentially allocated to the second terminal that sends the re-allocation request, so that in the case of incomplete audio transmission caused by transmission delay, transmission interruption, transmission jitter, etc., a new data window can be preferentially obtained for transmission. The detection methods for transmission delay, transmission interruption, and transmission jitter can be any detection methods of existing technologies, which will not be elaborated here.
[0063] In one embodiment, when reallocating at least one idle data window to at least one of the first terminal and / or the second terminal, it may be detected whether a new audio transmission request sent by a new second terminal is received. If so, the idle data window is preferentially allocated to the new second terminal corresponding to the new audio transmission request. Thus, for a new terminal joining the current audio transmission in the next transmission cycle and in the case of receiving a new audio transmission request, it can preferentially obtain a new data window for transmission.
[0064] In one embodiment, if there are both reallocation requests and new audio transmission requests at the same time, the idle data window is preferentially allocated to the second terminal that sends the reallocation request. Thus, after the idle data window is preferentially allocated to the second terminal that sends the reallocation request, if a new audio transmission request sent by a new second terminal is received, it is detected whether there is an idle data window. If so, the idle data window is allocated to the new second terminal. If not, a rejection audio transmission reply is sent to the new second terminal. Based on this, it is possible to preferentially ensure that each terminal that is already performing audio transmission performs audio transmission first, improving the continuity of audio transmission. Of course, in other embodiments, if there are both reallocation requests and new audio transmission requests at the same time, the idle data window may also be preferentially allocated to the second terminal that sends the new audio transmission request, and the specific operation will not be elaborated here.
[0065] Through the above method, in the next transmission cycle of the current transmission cycle, if a termination flag is detected, all the final data windows corresponding to the termination flag are regarded as idle data windows, so as to reallocate at least one idle data window to at least one of the first terminal and / or the second terminal. Not only can the effective utilization of resources be achieved by reallocating the idle data window, improving the utilization rate of channel resources, but also the audio parameters can be dynamically adjusted according to the wireless audio transmission quality and bandwidth.
[0066] In one embodiment, after the end of the current transmission cycle and before the termination flag is detected, it indicates that there is temporarily no idle data window available for reallocation. At this time, if a reallocation request sent by a second terminal is received, the reallocation request is sent after at least one of transmission delay, transmission interruption, and transmission jitter exists in the audio transmission of the second terminal, and the reallocation request further includes the audio data to be transmitted; then the transmission code rate to be reduced can be determined based on the audio data to be transmitted; a transmission code rate adjustment request is sent to all second terminals; it is determined whether a transmission code rate adjustment reply sent by the second terminal in response to the transmission code rate adjustment request is received; if so, based on the transmission code rate to be reduced, the second transmission code rate to be adjusted that each second terminal sending the transmission code rate adjustment reply needs to adjust is calculated, and the second transmission code rate to be adjusted is sent to the corresponding second terminal so that the second terminal updates the audio transmission code rate to the second transmission code rate to be adjusted. Therefore, even if there is no idle data window available for reallocation, but there are still situations such as transmission delay, transmission interruption, and transmission jitter that cause incomplete audio transmission, the terminals currently performing audio transmission can be notified to adjust their own transmission code rates, so that the terminals with transmission delay, transmission interruption, transmission jitter, etc. can be allocated more resources.
[0067] In one embodiment, after the end of the current transmission cycle and before the termination flag is detected, it indicates that there is temporarily no idle data window available for reallocation. At this time, if a new audio transmission request sent by a new second terminal is received, a rejection audio transmission reply can be sent to the new second terminal, so that the transmission of the terminal currently transmitting audio can be preferentially guaranteed. In other embodiments, after the end of the current transmission cycle and before the termination flag is detected, it indicates that there is temporarily no idle data window available for reallocation. At this time, if a new audio transmission request sent by a new second terminal is received, the audio transmission code rate can also be adjusted in the same way as the adjustment of the second transmission code rate to be adjusted above, except that the basis for determining the transmission code rate to be reduced is the audio transmission code rate in the new audio transmission request. Specifically: based on the audio transmission code rate in the new audio transmission request, the transmission code rate to be reduced is determined; a transmission code rate adjustment request is sent to all second terminals; it is determined whether a transmission code rate adjustment reply sent by the second terminal in response to the transmission code rate adjustment request is received; if so, based on the transmission code rate to be reduced, the second transmission code rate to be adjusted that each second terminal sending the transmission code rate adjustment reply needs to adjust is calculated, and the second transmission code rate to be adjusted is sent to the corresponding second terminal so that the second terminal updates the audio transmission code rate to the second transmission code rate to be adjusted.
[0068] In any of the above embodiments, before performing audio transmission based on the audio transmission sequence number corresponding to the first terminal and the final data window, it is also possible to determine whether the ratio of the total bandwidth value corresponding to all the final data windows to the maximum bandwidth value corresponding to the maximum data window in the current transmission cycle is greater than the pressure threshold; if so, it is determined that the current transmission pressure is high, and the first compression information including the lossy first compression algorithm is sent to all the second terminals, so that the second terminals use the first compression algorithm to compress the data for audio transmission; if not, it is determined that the current transmission pressure is low, and the second compression information including the lossless second compression algorithm is sent to all the second terminals, so that the second terminals use the second compression algorithm to compress the data for audio transmission. The pressure threshold can be custom-set as needed, including but not limited to 80%, 88%, 90%, 100%, etc. The ratio of the total bandwidth value corresponding to all the final data windows to the maximum bandwidth value corresponding to the maximum data window being greater than the pressure threshold indicates that the total bandwidth of the current audio transmission is close to the maximum bandwidth of the channel resources, and the transmission pressure is relatively high. The lossy first compression algorithm can be any lossy compression algorithm, including but not limited to a set of voice compression standards G.711 customized by the International Telecommunication Union ITU-T, which is not specifically limited here. The lossless second compression algorithm can be any lossless compression algorithm, including but not limited to a compression algorithm based on the FLAC (Free Lossless Audio Codec) coding principle, which is not specifically limited here. Therefore, when the transmission pressure is not high and the channel resources are abundant, a larger audio sampling rate and bit depth are selected, and a lossless compression algorithm with better audio quality effect is chosen; while when the transmission pressure is relatively high and the channel resources are insufficient, the audio sampling rate and bit depth are reduced, and a lossy compression algorithm with better compression effect is selected, thereby dynamically adjusting the sampling rate and bit depth according to the audio transmission pressure and choosing different compression algorithms. In another embodiment, if a reallocation request sent after detecting at least one of transmission delay, transmission interruption, and transmission jitter in the audio transmission of the second terminal is detected, it can also be determined that the current transmission pressure is high, and the first compression information including the lossy first compression algorithm is sent to all the second terminals, so that the second terminals use the first compression algorithm to compress the data for audio transmission; if no reallocation request is detected, it is determined that the current transmission pressure is low, and the second compression information including the lossless second compression algorithm is sent to all the second terminals, so that the second terminals use the second compression algorithm to compress the data for audio transmission. In the case of determining that the current transmission pressure is high, the first terminal can send a first audio sampling rate and bit depth adjustment instruction to each of the second terminals, so that the second terminals choose to increase the audio sampling rate and bit depth; or in the case of determining that the current transmission pressure is low, the first terminal can send a second audio sampling rate and bit depth adjustment instruction to each of the second terminals, so that the second terminals choose to reduce the audio sampling rate and bit depth.The first audio sampling rate and bit depth adjustment instruction and the second audio sampling rate and bit depth adjustment instruction may include the audio sampling rate value and bit depth value that each second terminal needs to adjust, so that the second terminal can adjust according to the first or second audio sampling rate and bit depth adjustment instruction.
[0069] Please refer to Figure 5 , Figure 5 FIG. Figure 5 is a schematic structural diagram of an embodiment of the audio transmission device provided by the present application. The audio transmission device 50 includes a memory 51 and a processor 52 that are connected to each other. Among them, the memory 51 is used to store a computer program, and when the computer program is executed by the processor 52, it is used to implement the audio transmission method in the above embodiment.
[0070] Please refer to Figure 6 , Figure 6 FIG. Figure 6 is a schematic structural diagram of an embodiment of the computer-readable storage medium provided by the present application. The computer-readable storage medium 60 is used to store a computer program 61, and when the computer program 61 is executed by the processor, it is used to implement the audio transmission method in the above embodiment.
[0071] The computer-readable storage medium 60 may be various media that can store program codes, such as a server, a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk, or an optical disc.
[0072] In several embodiments provided by the present application, it should be understood that the disclosed method and device can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0073] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0074] In addition, each functional unit in various embodiments of the present application may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0075] The above are only embodiments of the present application, and thus do not limit the patent scope of the present application. Any equivalent structural or equivalent process transformations made by using the content of the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, are similarly included in the patent protection scope of the present application.
Claims
1. An audio transmission method, characterized in that: The method comprises: The first terminal receives an audio transmission request from at least one second terminal in a current transmission period, wherein the audio transmission request includes an audio transmission bit rate; In response to the audio transmission request, audio transmission information is obtained based on the audio transmission bit rate, wherein the audio transmission information includes at least one audio transmission sequence number and at least one final data window corresponding to each of the first terminal and the at least one second terminal; sending the audio transmission information to each of the second terminals, so that the second terminals perform audio transmission based on the audio transmission information; Audio transmission is performed based on the audio transmission sequence number and the final data window corresponding to the first terminal.
2. The audio transmission method according to claim 1, characterized in that: The obtaining audio transmission information based on the audio transmission bit rate includes: Obtaining a maximum value of a data window, a maximum value of an audio transmission sequence number, an order of receiving the audio transmission request, and a number of first data windows required for the first terminal to perform audio transmission; Calculating the number of second data windows required for each of the second terminals to perform audio transmission based on the audio transmission bit rate corresponding to the second terminal; Obtaining the audio transmission sequence number in the audio transmission information based on the order of receiving the audio transmission request, the maximum value of the audio transmission sequence number, the number of the first data windows, and the number of the second data windows; Based on the maximum value of the data window and the number of the first data windows, the remaining data windows are determined, and the remaining data windows are sequentially allocated to the second terminal with the preceding audio transmission sequence number to obtain the final data window in the audio transmission information.
3. The audio transmission method according to claim 2, characterized in that: The obtaining the audio transmission sequence number in the audio transmission information based on the order of receiving the audio transmission request, the maximum value of the audio transmission sequence number, the number of the first data windows, and the number of the second data windows includes: Determine the audio transmission sequence number of the first terminal as the sequence number corresponding to the number of the first to first data windows, and obtain the remaining audio transmission sequence number; The remaining audio transmission sequence numbers are allocated to the second terminals in sequence according to the order of receiving the audio transmission requests until the maximum value of the audio transmission sequence number is reached; and / or, the remaining audio transmission sequence numbers are allocated to the second terminals in sequence according to the size order of the second data window numbers until the maximum value of the audio transmission sequence number is reached; wherein, when the order of receiving the audio transmission requests and the size order of the second data window numbers exist at the same time, the size order of the second data window numbers has a higher priority.
4. The audio transmission method according to claim 3, characterized in that: The step of allocating the remaining audio transmission sequence numbers to the second terminals in order of the number of the second data windows until the maximum audio transmission sequence number is reached includes: Determine whether the number of data windows corresponding to the audio transmission sequence number allocated to the second terminal is less than the number of second data windows corresponding to the second terminal; If so, the remaining audio transmission sequence number is assigned to the next second terminal until the number of data windows corresponding to the audio transmission sequence number assigned to the second terminal is greater than or equal to the number of second data windows corresponding to the second terminal; or the latest remaining data window and its corresponding first transmission bit rate to be adjusted that can be carried are sent to the second terminal, so that the second terminal updates the audio transmission bit rate to the first transmission bit rate to be adjusted.
5. The audio transmission method according to claim 1, characterized in that: The audio transmission request further includes a start flag and an end flag, wherein the start flag indicates that the second terminal has started audio transmission, and the end flag indicates that the second terminal has ended audio transmission. In a transmission cycle next to the current transmission cycle, if the termination mark is detected, the final data windows corresponding to the termination mark are all used as idle data windows; At least one of the idle data windows is reallocated to at least one of the first terminal and / or the second terminal.
6. The audio transmission method according to claim 5, characterized in that: The reallocating at least one of the idle data windows to at least one of the first terminal and / or the second terminal comprises: receiving a reallocation request sent by the second terminal, the reallocation request including a delay flag, the delay flag indicating that at least one of transmission delay, transmission interruption, and transmission freeze exists in audio transmission of the second terminal; The idle data window is preferentially allocated to the second terminal that sends the reallocation request.
7. The audio transmission method according to claim 6, characterized in that: After preferentially allocating the idle data window to the second terminal that sends the reallocation request, the method further includes: receiving a new audio transmission request sent by a new second terminal; Detecting whether the idle data window exists; If yes, allocating the idle data window to the new second terminal; If not, a rejection audio transmission response is sent to the new second terminal.
8. The audio transmission method according to claim 5, characterized in that: After the current transmission cycle ends and before the termination mark is detected, the method further includes: receiving a reallocation request sent by the second terminal, wherein the reallocation request is sent after at least one of transmission delay, transmission interruption, and transmission freeze occurs in audio transmission of the second terminal, and the reallocation request further includes audio data to be transmitted; Determining a transmission bit rate to be reduced based on the audio data to be transmitted; Sending a transmission bit rate adjustment request to all the second terminals; determining whether a transmission rate adjustment response sent by the second terminal in response to the transmission rate adjustment request is received; If so, based on the transmission bit rate to be reduced, calculate the second transmission bit rate to be adjusted that needs to be adjusted for each second terminal that sends the transmission bit rate adjustment reply, and send the second transmission bit rate to be adjusted to the corresponding second terminal, so that the second terminal updates the audio transmission bit rate to the second transmission bit rate to be adjusted.
9. The audio transmission method according to claim 1, characterized in that: Before performing audio transmission based on the audio transmission sequence number and the final data window corresponding to the first terminal, the method further includes: Determine whether the ratio of the total bandwidth corresponding to all the final data windows to the maximum bandwidth corresponding to the maximum value of the data window in the current transmission cycle is greater than a pressure threshold; If so, it is determined that the current transmission pressure is high, and the first compression information including the lossy first compression algorithm is sent to all the second terminals, so that the second terminals compress the audio transmission data using the first compression algorithm; If not, it is determined that the current transmission pressure is small, and the second compression information including the lossless second compression algorithm is sent to all the second terminals, so that the second terminals compress the audio transmission data using the second compression algorithm.
10. The audio transmission method according to claim 1, characterized in that: Before the first terminal receives an audio transmission request from at least one second terminal in a current transmission period, the method further includes: De-noising the data to be transmitted by using an audio analysis algorithm to extract valid audio data so that the valid audio data can be transmitted during the audio transmission; and / or, If it is detected that the audio transmission request is not received during the entire current transmission period, all the audio transmission sequence numbers and the final data window are allocated to the first terminal.
11. An image ghosting detection device, characterized in that: It comprises a memory and a processor connected to each other, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, it is used to implement the audio transmission method according to any one of claims 1 to 10.
12. A computer-readable storage medium for storing a computer program, characterized in that: When the computer program is executed by a processor, it is used to implement the audio transmission method according to any one of claims 1 to 10.