Bandwidth estimation method and device, electronic equipment, storage medium and program product

By continuously sending data packet queues in the data transmission network and obtaining reception time information, the problem of inaccurate bandwidth estimation in scenarios with limited application data volume is solved, and efficient bandwidth estimation and traffic management are achieved.

CN120602386APending Publication Date: 2025-09-05BYTEDANCE TECHNOLOGY CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510903146.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2025-09-05

AI Technical Summary

Technical Problem

Existing bandwidth estimation algorithms cannot accurately estimate network bandwidth in scenarios with limited application data volume and are prone to traffic waste.

Method used

By continuously sending a queue of data packets to the data transmission network until completion, and obtaining the reception time information of the data packets, the bandwidth is estimated using this information to avoid traffic waste.

Benefits of technology

In scenarios where the amount of application data is limited, it can accurately estimate network bandwidth, avoid traffic waste, and improve the accuracy and efficiency of bandwidth estimation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120602386A_ABST
    Figure CN120602386A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a bandwidth estimation method and device, electronic equipment, a storage medium and a program product. The method comprises the following steps: continuously sending data packets in a current data packet queue to a data transmission network until the data packets in the current data packet queue are sent; obtaining receiving time information of each data packet in the current data packet queue; and performing bandwidth estimation on the data transmission network according to the receiving time information to obtain the network bandwidth of the data transmission network. According to the embodiment of the invention, by utilizing the technical scheme, the bandwidth estimation in the application data limited scene can be realized, the bandwidth estimation modes of the data transmission network are enriched, and the phenomenon of traffic waste is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of computer technology, and in particular to a bandwidth estimation method, apparatus, electronic device, storage medium, and program product. Background Art

[0002] Bandwidth estimation algorithms are used to evaluate network bandwidth in real-time communication scenarios.

[0003] In common real-time audio and video transmission scenarios, such as live streaming, the actual bitrate produced by the video encoder is often very low due to various encoding strategies, changes in the live image, and the inherent bitrate limitations of the live content. This scenario is generally referred to as a data-constrained application scenario.

[0004] However, in the related art, traditional bandwidth estimation algorithms cannot correctly estimate the bandwidth of the data transmission network in scenarios where the amount of application data is limited. Summary of the Invention

[0005] Embodiments of the present disclosure provide a bandwidth estimation method, apparatus, electronic device, storage medium, and program product to implement bandwidth estimation in scenarios where application data is limited.

[0006] In a first aspect, an embodiment of the present disclosure provides a bandwidth estimation method, including:

[0007] Continuously sending data packets in the current data packet queue to the data transmission network until the data packets in the current data packet queue are completely sent;

[0008] Obtaining reception time information of each data packet in the current data packet queue;

[0009] The bandwidth of the data transmission network is estimated according to the receiving time information to obtain the network bandwidth of the data transmission network.

[0010] In a second aspect, an embodiment of the present disclosure further provides a bandwidth estimation device, including:

[0011] A first data packet sending module, configured to continuously send data packets in a current data packet queue to a data transmission network until the data packets in the current data packet queue are completely sent;

[0012] A time acquisition module, used to obtain the reception time information of each data packet in the current data packet queue;

[0013] The first bandwidth estimation module is configured to estimate the bandwidth of the data transmission network according to the reception time information to obtain the network bandwidth of the data transmission network.

[0014] In a third aspect, an embodiment of the present disclosure further provides an electronic device, including:

[0015] one or more processors;

[0016] a memory for storing one or more programs,

[0017] When the one or more programs are executed by the one or more processors, the one or more processors implement the bandwidth estimation method as described in the embodiment of the present disclosure.

[0018] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the bandwidth estimation method as described in the embodiment of the present disclosure.

[0019] In a fifth aspect, an embodiment of the present disclosure further provides a computer program product. When the computer program product is executed by a computer, the computer implements the bandwidth estimation method as described in the embodiment of the present disclosure.

[0020] The bandwidth estimation method, device, electronic device, storage medium, and program product provided by the embodiments of the present disclosure detect the network bandwidth of a data transmission network by continuously sending data packets in short bursts. This ensures that even in scenarios where the amount of application data is limited, sufficient data packets can be sent to the data transmission network to estimate the network bandwidth of the data transmission network. This can implement bandwidth estimation in scenarios where application data is limited, enrich the bandwidth estimation methods of the data transmission network, and avoid traffic waste. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale.

[0022] Figure 1 A schematic diagram of a flow chart of a bandwidth estimation method provided in an embodiment of the present disclosure;

[0023] Figure 2 A flowchart of another bandwidth estimation method provided by an embodiment of the present disclosure;

[0024] Figure 3 A schematic diagram of a bandwidth estimation process provided by an embodiment of the present disclosure;

[0025] Figure 4 A schematic diagram of a data packet queue sending process provided by an embodiment of the present disclosure;

[0026] Figure 5A schematic diagram of packet loss before and after a bottleneck provided in an embodiment of the present disclosure;

[0027] Figure 6 A structural block diagram of a bandwidth estimation device provided in an embodiment of the present disclosure;

[0028] Figure 7 A schematic structural diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0029] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.

[0030] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0031] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.

[0032] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0033] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".

[0034] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0035] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) must comply with the requirements of relevant laws, regulations and relevant provisions.

[0036] Figure 1 This is a flow chart of a bandwidth estimation method provided in an embodiment of the present disclosure. This method can be performed by a bandwidth estimation device, which can be implemented in software and / or hardware and configured in an electronic device, typically a computer, mobile phone, or tablet computer. The bandwidth estimation method provided in an embodiment of the present disclosure is applicable to scenarios where bandwidth estimation is performed on a data transmission network, such as scenarios where bandwidth estimation is performed on a data transmission network with limited application data volume.

[0037] The network bandwidth calculated by the bandwidth estimation algorithm can, on the one hand, control the data transmission rate to prevent network congestion caused by excessive data transmission, or waste of network bandwidth caused by insufficient data transmission. On the other hand, it can guide the application layer video encoder to encode audio and video at a specific bit rate, ensuring the highest possible video quality while preventing the video from being unable to be transmitted to the receiving end in a timely manner due to encoding video at an excessively high bit rate.

[0038] Currently, two commonly used bandwidth estimation algorithms are Bottleneck Bandwidth and Round-trip Propagation Time (BBR) and Generalized Cross Correlation (GCC), as well as their modified versions. These algorithms estimate network bandwidth based on the average packet reception rate and the network round-trip delay.

[0039] In scenarios where the amount of application data is limited, the average packet reception rate and network round-trip delay cannot reflect the size of the network bandwidth, resulting in the inability of existing algorithms to correctly estimate the network bandwidth in such scenarios.

[0040] Specifically, for the average receiving rate signal, in scenarios where the amount of application data is not limited and there is sufficient data, sufficient transmission can fill the network bandwidth, making the receiving rate and network bandwidth roughly equal. However, in scenarios where the amount of application data is limited, the amount of data that can be sent is relatively small, and the receiving rate is no longer affected by the network bandwidth but by the sending rate, resulting in an inaccurate reflection of the network bandwidth. As for the network round-trip delay signal, when the current estimated bandwidth is greater than the actual network bandwidth, the excess data will accumulate on the network, resulting in an increase in the network round-trip delay. The algorithm needs to rely on this information to determine whether the bandwidth estimate is correct. However, in scenarios where the amount of application data is limited, the amount of data that can be sent is relatively small, and even if the network bandwidth is overestimated, it will not necessarily result in increased network delay, resulting in an inaccurate estimation of the network bandwidth.

[0041] To compensate for this shortcoming, some algorithms may fill a large number of blank data packets into the network to estimate the bandwidth when the amount of application data is limited, but this algorithm will cause a lot of traffic waste.

[0042] In view of this, an embodiment of the present disclosure provides a bandwidth estimation method. In a scenario where the amount of application data is limited, the limited data is organized into multiple groups of data packet queues. The data packets in each data packet queue are sent to the network continuously or simultaneously, and the network bandwidth is detected through short bursts. This can realize bandwidth estimation in scenarios where the amount of application data is limited, enrich the bandwidth estimation method of the data transmission network, and avoid the phenomenon of traffic waste.

[0043] like Figure 1 As shown, the bandwidth estimation method provided in this embodiment may include:

[0044] S101. Continuously sending data packets in a current data packet queue to a data transmission network until all data packets in the current data packet queue are sent.

[0045] Among them, the data transmission network can be understood as a network used for data transmission, such as a network to which electronic devices that transmit data packets are connected. Taking the live broadcast scenario as an example, this data transmission network can be a network for live streaming, such as the network used by the live broadcast end for live streaming, and / or the network used by the server end for live streaming to the audience end. The current data packet queue can be a data packet queue that currently needs to be sent continuously. The current data packet queue contains multiple data packets. The number of these multiple data packets can be pre-set; it can also be determined based on the buffer length range of the data transmission network, such as obtaining a number of continuously arranged data packets whose total length is within this preset buffer length range as the data packets in the current data packet queue. This embodiment does not limit this.

[0046] Specifically, each data packet in the current data packet queue to be transmitted may be continuously sent to the data transmission network. For example, each data packet in the current data packet queue may be sequentially and continuously sent according to the order in which each data packet is arranged in the current data packet queue or the data packet queue to be transmitted, until all data packets in the current data packet queue are completely sent. Alternatively, each data packet in the current data packet queue may be sent simultaneously, etc. After all data packets in the current data packet queue are completely sent, the current data packet queue may be considered completely sent.

[0047] In some embodiments, the number of packets in the current packet queue can be determined based on the buffer length range of the data transmission network. For example, packets in the queue of packets to be transmitted can be continuously transmitted until the length of this continuous transmission falls within a preset buffer length range. This ensures that an appropriate number of packets are continuously transmitted in a single transmission, while avoiding packet loss due to buffer overflow in the data transmission network due to excessive transmission, thereby further improving the accuracy of bandwidth assessment results. This buffer length range can be characterized, for example, by a maximum buffer length and a minimum buffer length, such as using the range from the minimum buffer length to the maximum buffer length as the buffer length range of the data transmission network.

[0048] In the above embodiment, in order to ensure as much as possible that a media frame is not divided into multiple segments for transmission, such as ensuring as much as possible that the data packets of a media frame are not divided into different data packet queues for transmission, thereby reducing the transmission time of the data packets in the same media frame, when determining the data packets in the current data packet queue, the media frame to which the data packet belongs can be further considered, such as dividing the data packet queue according to the media frame within the preset buffer range.

[0049] Optionally, the continuously sending of data packets in the current data packet queue to the data transmission network until the first data packet in the current data packet queue is sent includes: continuously sending data packets in the data packet queue to be transmitted to the data transmission network until a preset transmission end condition is met, wherein the preset transmission end condition includes the continuous transmission length reaching the maximum buffer length of the data transmission network, or the continuous transmission length reaching the minimum buffer length of the data transmission network and the current media frame transmission ends; and using the data packets continuously transmitted this time as the data packets in the current data packet queue.

[0050] The queue of data packets to be transmitted can be understood as a queue of data packets to be transmitted in the current application. For example, the data packets to be transmitted provided by the upper layer (such as the network layer) can be arranged according to the priority determined by the upper layer to obtain the queue of data packets to be transmitted. It should be noted that the queue of data packets to be transmitted may only include data packets waiting to be transmitted, and may not include data packets that have been successfully transmitted. For example, after a data packet is successfully transmitted, this data packet can be removed from the queue of data packets to be transmitted. The type of data packets in the queue of data packets to be transmitted is not limited. For example, the queue of data packets to be transmitted may include audio data packets, video data packets, retransmitted data packets and / or redundant data packets.

[0051] The preset transmission termination condition can be understood as the condition for terminating the current continuous transmission of data packets to the data transmission network. This preset transmission termination condition can be associated with the maximum and minimum buffer lengths of the data transmission network, as well as the media frames to which each data packet belongs. For example, the preset transmission termination condition can be when the continuous transmission length reaches the maximum buffer length of the data transmission network, or when the continuous transmission length reaches the minimum buffer length of the data transmission network and the current media frame transmission ends.

[0052] The continuous transmission length can be the total length of all data packets continuously sent to the data transmission network, or it can be the sum of the lengths of all data packets continuously sent. The maximum buffer length can be the maximum length of the network buffer of the data transmission network. The minimum buffer length can be the minimum length of the network buffer of the data transmission network. The maximum buffer length and / or minimum buffer length of the data transmission network can be pre-set or dynamically predicted and adjusted based on the data transmission status of the data transmission network, and can be set specifically as needed. The network buffer can be understood as a memory area used to temporarily store data packets to be transmitted.

[0053] A media frame can be understood as a frame in media content, such as a video frame and / or an audio frame. The following description uses a video frame as an example. The current media frame can be the media frame to which the currently transmitted data packet belongs. Exemplarily, the current media frame can be the first media frame to complete data packet transmission after the data transmission length reaches the minimum buffer of the data transmission network.

[0054] For example, the data packets in the queue of data packets to be transmitted can be sequentially and continuously transmitted according to the order in which the data packets are arranged in the queue of data packets to be transmitted, until the data transmission length of each data packet in this continuous transmission reaches the minimum buffer length of the data transmission network and the current media frame transmission ends, or until the data transmission length of each data packet in this continuous transmission reaches the maximum buffer length of the data transmission network. When the above-mentioned preset transmission termination condition is met, the continuous transmission of data packets can be terminated, and the data packets in this continuous transmission can be used as the data packets in the current data transmission queue, thereby obtaining a current data transmission queue containing each data packet in this continuous transmission.

[0055] In some examples, data packets in a queue of data packets to be transmitted can be sent sequentially and continuously. After each data packet is sent, the data transmission length of this time is calculated, and a determination is made as to whether this data transmission length reaches the minimum buffer length of the data transmission network. If the data transmission length reaches (e.g., is greater than or equal to) the minimum buffer length of the data transmission network, the determination as to whether this data transmission length reaches (e.g., is greater than or equal to) the maximum buffer length of the data transmission network and / or whether the last data packet sent is the last data packet of a media frame is continued. If so, the continuous sending of data packets is stopped. If not, the next data packet in the queue of data packets to be transmitted can be sent. After sending this next data packet, the data transmission length of this time is calculated, and the process returns to executing the operation of determining whether this data transmission length reaches the maximum buffer length of the data transmission network or whether this data packet sent is the last data packet of a media frame. In addition, if the data transmission length does not reach (e.g., is less than) the minimum buffer length of the data transmission network, the next data packet in the queue of data packets to be transmitted can be sent, and the process returns to executing the operation of calculating the data transmission length of this time and determining whether this data transmission length reaches the minimum buffer length of the data transmission network.

[0056] In this embodiment, data packets can be continuously transmitted in the form of data packet queues. Exemplarily, the data packet queues serve as the dimension for continuous data packet transmission. For example, each time a preset continuous data packet transmission condition is met, data packets in a data packet queue are continuously transmitted. After the transmission of the data packets in this data packet queue is completed, the continuous transmission is terminated until the preset continuous data packet transmission condition is met again. In this case, optionally, continuously transmitting data packets in the data packet queue to be transmitted to the data transmission network includes: in response to current conditions satisfying the preset continuous transmission condition, continuously transmitting the data packets in the data packet queue to be transmitted to the data transmission network. The preset continuous transmission condition can be understood as a condition that triggers the continuous transmission of data packets. The preset continuous transmission condition can be set as needed, for example, when a preset continuous data packet transmission period has been reached, when the number of data packets in the data packet queue to be transmitted has reached a preset number, or when the length of data packets in the data packet queue to be transmitted has reached a preset length. The preset continuous transmission period, preset number, and preset length can all be flexibly set as needed and are not limited in this embodiment.

[0057] In this embodiment, it is possible to periodically determine whether the current conditions meet a preset continuous transmission condition. If the current conditions meet the preset continuous transmission condition, it is possible to trigger the continuous transmission of data packets to the data transmission network until a preset end-of-transmission condition is met. Furthermore, if the current conditions do not meet the preset continuous transmission condition, data packets may not be transmitted to the data transmission network until the current conditions meet the preset continuous transmission condition; alternatively, data packets of a set type may be transmitted to the data transmission network.

[0058] In some examples, considering that audio data packets themselves are very small and basically do not cause network congestion, in order to ensure smooth audio, when it is determined that the current conditions do not meet the preset continuous sending conditions, it is possible to further determine whether the first data packet to be transmitted in the queue of data packets to be transmitted is an audio data packet. If so, this audio data packet is sent to the data transmission network, such as sending the audio data packet at the head of the queue of data packets to be transmitted in sequence according to the arrangement order of each data packet in the queue of data packets to be transmitted until the head of the queue of data packets to be transmitted is not an audio data packet; if not, no data packet is sent to the data transmission network until the current conditions meet the preset continuous sending conditions. In this case, optionally, the bandwidth estimation method may also include: in response to the current conditions not meeting the preset continuous sending conditions and the head of the queue of data packets to be transmitted is an audio data packet, sending the audio data packet at the head of the queue.

[0059] S102: Obtain reception time information of each data packet in the current data packet queue.

[0060] Specifically, after the local end sends a data packet in the current data packet queue to the receiving end via the data transmission network, if the data packet is successfully received by the receiving end, the receiving end will feedback the reception time information of the data packet to the local end (i.e., the sending end). Accordingly, the local end can obtain the reception time information of each data packet in the current data packet queue, such as obtaining the reception time information of at least some data packets in the current data packet queue returned by the receiving end.

[0061] It can be understood that in this step, if the receiving time information of a data packet in the current data packet queue is successfully obtained, it means that the data packet has been successfully received by the receiving end, that is, the data packet has not been lost during transmission in the data transmission network; if the receiving time information of a data packet in the current data packet queue is not successfully obtained, it means that the data packet may not be received by the receiving end, so the data packet may be lost during transmission in the data transmission network.

[0062] S103: Estimating the bandwidth of the data transmission network according to the receiving time information to obtain the network bandwidth of the data transmission network.

[0063] Among them, network bandwidth refers to the amount of data that can be transmitted within a unit of time (usually 1 second).

[0064] In this embodiment, after the reception time information of the data packets in the current data packet queue is obtained, the bandwidth of the data transmission network can be estimated according to the reception time information to obtain the network bandwidth of the data transmission network.

[0065] For example, based on the reception time information of multiple historically sent data packets, including the data packets in the current data packet queue, the average reception rate and network round-trip delay of the data packets are calculated, and the network bandwidth of the data transmission network is estimated based on this average reception rate and network round-trip delay; or, based on this reception time information, the pre-bottleneck packet loss ratio and / or the post-bottleneck packet loss ratio of the current data packet queue are determined, and the bandwidth of the data transmission network is estimated based on this pre-bottleneck packet loss ratio and / or the post-bottleneck packet loss ratio to obtain the network bandwidth of the data transmission network, and so on.

[0066] It should be noted that this embodiment can dynamically estimate and update the network bandwidth of the data transmission network when there is a demand for data transmission. For example, after completing the transmission of n data packet queues each time, the network bandwidth of the data transmission network can be estimated based on the n data packet queues sent, and the data transmission rate can be controlled based on this network bandwidth, such as adjusting the preset continuous transmission period of the data packet or the length of the data packet queue sent each time, to prevent excessive data transmission from causing network congestion or insufficient data transmission from wasting network bandwidth; and based on this network bandwidth, the video encoder of the application can be guided to use a bit rate when encoding audio and video, ensuring the highest possible video quality while preventing the video from being unable to be transmitted to the receiving end in a timely manner due to encoding at too high a bit rate. Wherein, n is a positive integer, and its value is not limited. For example, n can be 1, 2, or 3, etc. The following explanation takes n as 1 as an example.

[0067] The bandwidth estimation method provided in this embodiment continuously sends data packets in the current data packet queue to the data transmission network until all data packets in the current data packet queue are sent; obtains reception time information for each data packet in the current data packet queue; and estimates the bandwidth of the data transmission network based on this reception time information to obtain the network bandwidth of the data transmission network. This embodiment utilizes the above-mentioned technical solution to detect the network bandwidth of the data transmission network by continuously sending data packets in short bursts. This ensures that even in scenarios where the amount of application data is limited, sufficient data packets can be sent to the data transmission network to estimate the network bandwidth of the data transmission network. This enables bandwidth estimation in scenarios where application data is limited, enriches bandwidth estimation methods for data transmission networks, and avoids the phenomenon of traffic waste.

[0068] In some embodiments, after obtaining the reception time information of each data packet in the current data packet queue, it also includes: updating the network packet loss rate of the data transmission network according to the reception time information; and adjusting the maximum buffer length of the data transmission network based on the network packet loss rate.

[0069] The network packet loss rate of the data transmission network can be understood as the packet loss rate of the data transmission network itself when transmitting different data packets, which can be used to indicate the packet loss situation of the data transmission network. Exemplarily, the network packet loss rate of the data transmission network can be the average packet loss rate of the data transmission network, such as the average packet loss rate of the data transmission network within the most recent preset time length, the average packet loss rate when transmitting the most recent preset number of data packet queues, the average packet loss rate when transmitting the most recent m1 data packets, or the average packet loss rate in the process of successfully transmitting the most recent m2 data packets, etc., which is not limited in this embodiment. Here, the preset time length, preset number, m1 and m2 can all be set as needed, such as the preset time length can be 10s or 20s, etc., and the preset number, m1 and / or m2 can be set to values ​​such as 20, 30 or 40, etc., which is not limited in this embodiment.

[0070] Optionally, the network packet loss rate includes a first network packet loss rate corresponding to the maximum buffer length and / or a second network packet loss rate corresponding to the minimum buffer length. The first network packet loss rate may be the network packet loss rate corresponding to the maximum buffer length, such as the packet loss rate of a data transmission network when transmitting a data packet queue whose data transmission length is within a first length interval corresponding to the maximum buffer length. The second network packet loss rate may be the network packet loss rate corresponding to the minimum buffer length, such as the packet loss rate of a data transmission network when transmitting a data packet queue whose data transmission length is within a second length interval corresponding to the maximum buffer length. The length of this length interval can be set as needed, such as 1KB, 2KB, or 3KB. The initial value of the maximum buffer length can be pre-set. The first length interval can be understood as the length interval corresponding to the maximum buffer length before the current maximum buffer length is adjusted. The first length interval can include the maximum buffer length before the adjustment, such as the right endpoint of the first length interval can be the maximum buffer length before the adjustment. The minimum buffer length can be pre-set. The second length interval can include the minimum buffer length, such as the left endpoint of the second length interval can be the minimum buffer length.

[0071] Specifically, the network packet loss rate of the data transmission network can be updated based on the reception time information of each data packet in the current data packet queue. For example, based on the reception time information of multiple data packets that have been sent recently, including each data packet in the current data column, the lost data packets and non-lost data packets in these multiple data packets can be determined, and the network packet loss rate of the data transmission network can be updated based on this.

[0072] For example, multiple (e.g., a first set number) of data packets can be obtained from a data packet queue whose transmission data length is within a first length interval in order of transmission time, and lost and non-lost data packets among the multiple data packets can be determined based on the reception time information of the multiple data packets. Based on this, a first network packet loss rate of the data transmission network can be updated, such as by updating the first network packet loss rate of the data transmission network to a packet loss rate calculated based on the multiple data packets. And / or, multiple (e.g., a second set number) of data packets can be obtained from a data packet queue whose transmission data length is within a second length interval in order of transmission time, and lost and non-lost data packets among the multiple data packets can be determined based on the reception time information of the multiple data packets. Based on this, a second network packet loss rate of the data transmission network can be updated, such as by updating the second network packet loss rate of the data transmission network to a packet loss rate calculated based on the multiple data packets, and so on.

[0073] After updating the network packet loss rate of the data transmission network, the maximum buffer length of the data transmission network can be adjusted based on the updated network packet loss rate. For example, if the first network packet loss rate of the data transmission network after the update is large, the maximum buffer length of the data transmission network can be reduced; if the first network packet loss rate of the data transmission network after the update is small, the maximum buffer length of the data transmission network can be increased.

[0074] In some implementations, the maximum buffer length of the data transmission network may be adjusted based on the difference between the first network packet loss rate and the second network packet loss rate to further improve the accuracy of adjusting the maximum buffer length.

[0075] Optionally, adjusting the maximum buffer length of the data transmission network based on the network packet loss rate includes: reducing the maximum buffer length by a first preset length in response to the difference between the first network packet loss rate and the second network packet loss rate being greater than a preset threshold; and / or increasing the maximum buffer length by a second preset length in response to the difference between the first network packet loss rate and the second network packet loss rate being less than or equal to a preset threshold.

[0076] For example, if the difference between the first network packet loss rate and the second network packet loss rate is greater than a preset threshold, the maximum buffer length of the data transmission network can be reduced by the first preset length; and / or if the difference between the first network packet loss rate and the second network packet loss rate is less than or equal to the preset threshold, the maximum buffer length of the data transmission network can be increased by the second preset length. The preset threshold, the first preset length, and the second preset length can all be set as needed. For example, the preset threshold can be set to 0.05, 0.1, or 0.15, and the first preset length and / or the second preset length can be set to 1KB, 2KB, or 3KB, etc. The first preset length and the second preset length can be the same or different. At least one of the first network packet loss rate and the second network packet loss rate is the updated network packet loss rate.

[0077] In this embodiment, the network packet loss rate of the data transmission network is updated according to the reception time information of each data packet in the current data packet queue, and the maximum buffer length of the data transmission network is dynamically adjusted based on this network packet loss rate. Compared with the technical solution of setting the maximum buffer length to a fixed value, it can improve the accuracy of the data transmission length of the continuously transmitted data packet queue, avoid the situation where the data transmission length of the data packet queue is too large or too small, and thus improve the accuracy of the estimated network bandwidth of the data transmission network, and improve the transmission effect of the data packet in the data transmission network.

[0078] Figure 2 A flow chart of another bandwidth estimation method provided for an embodiment of the present disclosure. The solution in this embodiment can be combined with one or more optional solutions in the above embodiments. Optionally, the bandwidth estimation of the data transmission network based on the receiving time information to obtain the network bandwidth of the data transmission network includes: determining the pre-bottleneck packet loss ratio and the post-bottleneck packet loss ratio of the current data packet queue based on the receiving time information; and estimating the bandwidth of the data transmission network based on the pre-bottleneck packet loss ratio and the post-bottleneck packet loss ratio to obtain the network bandwidth of the data transmission network.

[0079] Correspondingly, such as Figure 2 As shown, the bandwidth estimation method provided in this embodiment may include:

[0080] S201: Continuously send data packets in a current data packet queue to a data transmission network until all data packets in the current data packet queue are sent.

[0081] S202: Obtain reception time information of each data packet in the current data packet queue.

[0082] S203: Determine a pre-bottleneck packet loss ratio and a post-bottleneck packet loss ratio of the current data packet queue according to the receiving time information.

[0083] The pre-bottleneck packet loss ratio may be the ratio of packets lost in the current packet queue that were lost before the network bottleneck of the data transmission network. The post-bottleneck packet loss ratio may be the ratio of packets lost in the current packet queue that were lost after the network bottleneck of the data transmission network. The sum of the pre-bottleneck packet loss ratio and the post-bottleneck packet loss ratio may be 1.

[0084] Specifically, after obtaining the receiving time information of each data packet in the current data packet queue, the pre-bottleneck packet loss ratio and the post-bottleneck packet loss ratio of the current data packet queue can be determined according to the receiving time information.

[0085] In this embodiment, the method for determining the pre-bottleneck packet loss ratio and the post-bottleneck packet loss ratio of the current data packet queue based on the reception time information of each data packet in the current data packet queue is not limited. For example, considering that for pre-bottleneck packet loss, the reception interval between two adjacent received data packets is independent of the size of the data lost in between; for post-bottleneck packet loss, the reception interval between two adjacent received data packets is positively correlated with the size of the data lost in between, the post-bottleneck packet loss ratio of the current data packet queue can be calculated based on this, and the pre-bottleneck packet loss ratio of the current data packet queue can be calculated based on this post-bottleneck packet loss ratio.

[0086] In some embodiments, determining the pre-bottleneck packet loss ratio and the post-bottleneck packet loss ratio of the current data packet queue based on the receiving time information includes: determining the non-lost data packets and the lost data packets in the current data packet queue based on the receiving time information; determining the packet information of the non-lost data packets based on the non-lost data packets and the lost data packets, the packet information including the packet length, the number of lost bytes between the next non-lost data packet and the receiving time interval between the next non-lost data packet; determining the post-bottleneck packet loss ratio of the current data packet queue based on the packet information of multiple non-lost data packets, wherein the multiple non-lost data packets include at least some of the non-lost data packets in the current data packet queue; calculating the difference between 1 and the post-bottleneck packet loss ratio as the pre-bottleneck packet loss ratio of the data transmission network.

[0087] Among them, non-lost packets can be understood as packets in the current packet queue that have not been lost during transmission, that is, packets in the current packet queue that have been successfully received by the receiver. Lost packets can be understood as packets in the current packet queue that have been lost during transmission, that is, packets in the current packet queue that have not been received by the receiver.

[0088] The data packet information of the non-lost data packet may include the data packet length of this data packet, the number of lost bytes between this data packet and the next non-lost data packet in the current data packet queue, and the reception time interval between this data packet and the next lost data packet.

[0089] Exemplarily, the non-lost data packets and lost data packets in the current data packet queue can be determined based on the receiving time information of each data packet in the current data packet queue, such as determining the data packets in the current data packet queue that have obtained the receiving time information as the non-lost data packets in the current data packet queue, and determining the data packets in the current data packet queue that have not obtained the receiving time information as the lost data packets in the current data packet queue.

[0090] After determining the non-lost data packets and lost data packets in the current data packet queue, data packet information of at least some of the non-lost data packets in the current data packet queue can be determined. For example, each non-lost data packet in the current data packet queue that has a next non-lost data packet is determined; for each non-lost data packet that has a next non-lost data packet, the data packet length S of the non-lost data packet is determined; and based on whether there is a lost data packet between the non-lost data packet and the next non-lost data packet and the data packet length of the lost data packet, the number of lost bytes S between the non-lost data packet and the next non-lost data packet is determined. lost and determining the reception time interval ΔT between the non-lost data packet and the next non-lost data packet based on the reception time information of the data packet and the reception time information of the next non-lost data packet. Thus, the data packet information of the non-lost data packet is obtained.

[0091] After determining that there are non-lost data packets containing data packet information in the current data packet queue, the post-bottleneck packet loss percentage of the current data packet queue can be calculated based on the packet information of multiple non-lost data packets, including the non-lost data packet containing data packet information in the current data packet queue. For example, a third set number of non-lost data packets transmitted by the data transmission network are obtained in order of the transmission time of each non-lost data packet containing data packet information from back to front, and the post-bottleneck packet loss percentage of the current data packet queue is determined based on the obtained packet information of each non-lost data packet.

[0092] After determining the post-bottleneck packet loss ratio of the current data packet queue, the difference between 1 and the post-bottleneck packet loss ratio may be calculated, and the difference may be used as the pre-bottleneck packet loss ratio of the current data packet queue.

[0093] In the above embodiment, the method for determining the post-bottleneck packet loss ratio of the current packet queue based on the obtained packet information of each non-lost packet is not limited. Optionally, determining the post-bottleneck packet loss ratio of the current packet queue based on the packet information of multiple non-lost packets includes: fitting a relationship function between the number of lost bytes and the receiving time interval based on the packet information of multiple non-lost packets; and calculating the post-bottleneck packet loss ratio of the current packet queue based on the relationship function. For example, a relationship function between the number of lost bytes and the receiving time interval can be fitted based on the obtained packet information of each non-lost packet, and the post-bottleneck packet loss ratio of the current packet queue can be calculated based on the parameter values ​​in this relationship function.

[0094] The function type of the relationship between the number of lost bytes and the receiving time interval is not limited, as long as it can characterize the relationship between the number of lost bytes and the receiving time interval. In some examples, y = ΔT / S, x = S lost / S, use the least squares method to linearly fit the relationship between the number of lost bytes and the receiving time interval, y^=kx+b, and calculate the ratio between k and b to obtain the post-bottleneck packet loss ratio of the current packet queue. y^ represents the fitted value of y, such as the fitted y.

[0095] S204 : Estimating the bandwidth of the data transmission network according to the pre-bottleneck packet loss ratio and the post-bottleneck packet loss ratio to obtain the network bandwidth of the data transmission network.

[0096] In this embodiment, the bandwidth of the data transmission network can be estimated based on the pre-bottleneck packet loss ratio and the post-bottleneck packet loss ratio of the current data packet queue to obtain the network bandwidth of the data transmission network. For example, based on the pre-bottleneck packet loss ratio and the post-bottleneck packet loss ratio, the amount of data lost before the bottleneck and the amount of data lost after the bottleneck are determined respectively, and based on this, the bandwidth of the data transmission network is estimated to obtain the network bandwidth of the data transmission network.

[0097] In some embodiments, the pre-bottleneck packet loss ratio and post-bottleneck packet loss ratio of the current data packet queue can be used to correct the pre-bottleneck estimated bandwidth and post-bottleneck estimated bandwidth of the data transmission network, and the network bandwidth of the data transmission network can be calculated based on the corrected pre-bottleneck estimated bandwidth and corrected post-bottleneck estimated bandwidth.

[0098] Optionally, after obtaining the reception time information of each data packet in the current data packet queue, it also includes: taking the lost data packets in the current data packet queue as the pre-bottleneck lost data packets and the post-bottleneck lost data packets of the current data packet queue, respectively, and estimating the bandwidth of the data transmission network to obtain the pre-bottleneck estimated bandwidth and the post-bottleneck estimated bandwidth of the data transmission network; estimating the bandwidth of the data transmission network according to the pre-bottleneck packet loss ratio and the post-bottleneck packet loss ratio to obtain the network bandwidth of the data transmission network, including: calculating the network bandwidth of the data transmission network according to the pre-bottleneck packet loss ratio, the post-bottleneck packet loss ratio, the pre-bottleneck estimated bandwidth and the post-bottleneck estimated bandwidth.

[0099] The pre-bottleneck estimated bandwidth can be understood as the bandwidth of the data transmission network obtained by treating all lost packets in the current packet queue as packets lost before the bottleneck. The post-bottleneck estimated bandwidth can be understood as the bandwidth of the data transmission network obtained by treating all lost packets in the current packet queue as packets lost after the bottleneck.

[0100] For example, lost packets in the current packet queue can be considered as pre-bottleneck lost packets, and the queue packet loss rate of the current packet queue can be calculated. Based on the number of bytes of each packet in the current packet queue, the time required to receive the current packet queue, and the queue packet loss rate, the pre-bottleneck estimated bandwidth of the data transmission network can be calculated. Furthermore, lost packets in the current packet queue can be considered as post-bottleneck lost packets, and based on the number of bytes of each non-lost packet in the current packet queue, the number of bytes of lost packets between adjacent non-lost packets, and the reception time information of the first and last non-lost packets, the post-bottleneck estimated bandwidth of the data transmission network can be calculated.

[0101] After obtaining the estimated pre-bottleneck bandwidth and post-bottleneck bandwidth of the data transmission network, the network bandwidth of the data transmission network can be calculated based on the estimated pre-bottleneck bandwidth, the estimated post-bottleneck bandwidth, and the pre-bottleneck packet loss percentage and post-bottleneck packet loss percentage of the current data packet queue. For example, the pre-bottleneck packet loss percentage of the current data packet queue can be used as the weight of the estimated pre-bottleneck bandwidth of the data transmission network, and the pre-bottleneck and post-bottleneck packet loss percentages of the current data packet queue can be used as the weight of the estimated post-bottleneck bandwidth of the data transmission network. The weighted sum of the pre-bottleneck estimated bandwidth and the post-bottleneck estimated bandwidth of the data transmission network is calculated, and this weighted sum is used as the network bandwidth of the data transmission network.

[0102] The bandwidth estimation method provided in this embodiment estimates the network bandwidth of the data transmission network based on the pre-bottleneck packet loss ratio and the post-bottleneck packet loss ratio of the current data packet queue. It can comprehensively consider the pre-bottleneck packet loss and post-bottleneck packet loss of the current data packet queue, further improving the accuracy of the estimated network bandwidth.

[0103] In an optional embodiment, limited data can be organized into multiple packet queues in data-scarce scenarios. Packets in each packet queue are sent to the network continuously or simultaneously, using short bursts to detect network bandwidth. Network buffer lengths are measured and dynamically adjusted to prevent packet loss caused by short bursts. Furthermore, the random packet loss rate before and after network bottlenecks is estimated to correct errors in bandwidth estimation by packet queues in high-loss scenarios.

[0104] Figure 3 A schematic diagram of a bandwidth estimation process provided by an embodiment of the present disclosure. Figure 3 As shown, the structure directly interacting with the bandwidth estimation method provided by this embodiment is a video encoder and a data transmission network (such as the Internet). The bandwidth estimation method provided by this embodiment can provide the video encoder with a target encoding bit rate to guide the video encoder encoding, send data packets to the data transmission network, and simultaneously receive reception information fed back by the data transmission network. This reception information may include, but is not limited to, the reception timestamp of the data packet, which can be used to calculate the rate, delay, etc.

[0105] Within the bandwidth estimation method provided in this embodiment, network feedback information serves the operations of three modules: a pre- and post-bottleneck packet loss estimation module calculates the packet loss rate based on the received information; a first bandwidth estimation module estimates the network bandwidth based on the received information and packet loss rate of each packet queue; and a network buffer length measurement module estimates the network buffer length based on the received information. The bandwidth estimated by the first bandwidth estimation module is provided to the video encoder as the target encoding bitrate and to the packet queue sending module as the sending rate, which determines when transmission can begin. The buffer length measured by the network buffer length measurement module is also provided to the packet queue sending module to determine the maximum length of a single transmission.

[0106] The packet queue sending module is responsible for organizing the data packets provided by the application layer into queues and sending them to the network. In audio and video scenarios, organizing each frame into a packet queue can minimize frame completion time and can be combined with the high priority processing principle of audio to send packet queues. Figure 4 A schematic diagram of a sending process of a data packet queue provided in an embodiment of the present disclosure is shown as follows: Figure 4As shown, the data packet queue sending module can queue the data packets provided by the upper layer (which may include audio packets, video packets, retransmission packets, redundant packets, etc.) according to the priority determined by the upper layer, and then enter the data packet queue sending module. This module controls an average sending rate, which is determined by the first bandwidth estimation module. When new data packets can be sent at the current sending rate, the module continues to send data packets until a complete frame in the sending queue is sent, or the number of data packets sent this time exceeds the length limit (i.e., the maximum buffer length), which is determined by the network buffer detection module. This ensures that a frame is not split into multiple segments for transmission as much as possible, reducing frame transmission time. If new data packets cannot be sent at the moment, but the first packet in the data packet sending queue (i.e., the queue of data packets to be transmitted) is an audio packet, the module will also directly send the audio packet. Because audio data packets are small in size and rarely cause network congestion, this processing ensures smooth audio.

[0107] After receiving reception information from the network, the first bandwidth estimation module calculates the rate for each packet queue using the formula: estimated bandwidth = number of bytes in the queue / time required to receive packets in the queue. The final bandwidth estimate is then averaged over multiple bandwidth estimates. This allows the algorithm to calculate a unique bandwidth for each packet queue, eliminating the need to rely on the amount of data being sent, enabling accurate bandwidth estimation in data-constrained scenarios.

[0108] When random network packet loss occurs, bandwidth estimates are often underestimated, requiring correction to ensure accurate bandwidth estimation. Estimating bandwidth based on packet queues, with smaller data volumes, can be more sensitive to edge cases. When bandwidth sampling is performed using a packet slice, different calculation schemes are used to determine whether packet loss at the head or tail occurs before or after the bottleneck. When the number of packets in a packet slice is small, the estimated values ​​obtained by the two calculation methods can differ significantly.

[0109] Figure 5 A schematic diagram of packet loss before and after a bottleneck provided in an embodiment of the present disclosure is provided. Figure 5 Taking the transmission of data packets 1 to 5 as an example, the bandwidth required to compensate for packet loss can be calculated in the event of packet loss.

[0110] Specifically, for packet loss before the bottleneck, the measured actual rate is equal to the actual bandwidth. It is necessary to send more data packets based on the packet loss rate. Otherwise, after the packet loss reaches the bottleneck, the bandwidth utilization is low. In the above example, after counting the packet loss, the bandwidth can be estimated after correcting the bottleneck by the following solution:

[0111]

[0112] Wherein, P1, P2, P3, P4 and P5 are the number of bytes of data packets 1 to 5 respectively; t1 and t5 are the receiving times of data packets 1 and 5 respectively.

[0113] For packet loss after the bottleneck, the measured actual rate is less than the actual bandwidth. It is necessary to compensate for the packet loss to obtain the actual bandwidth. In the above example, the estimated bandwidth after the bottleneck can be calculated using the following scheme:

[0114]

[0115] Among them, t3 and t5 are the receiving times of data packets 3 and 5 respectively; the number of bytes in the queue includes the number of bytes of the data packets lost between the two data packets in calculating the time required for reception. Figure 5 In the strength shown, P2 and P1 cannot be calculated, otherwise the calculated rate will be too high.

[0116] In a scenario where different types of packet loss occur, the calculation scheme adopted in this embodiment is as follows:

[0117] Estimated bandwidth = packet loss ratio after bottleneck × estimated bandwidth after bottleneck + (1-packet loss ratio after bottleneck) × estimated bandwidth before bottleneck

[0118] Among them, for packet loss before the bottleneck, the receiving interval of two adjacent received data packets is independent of the size of the data lost in the middle; for packet loss after the bottleneck, the receiving interval is positively correlated with the size of the data lost in the middle.

[0119] Assume that the packet loss rate before the bottleneck is l1, and the packet loss rate after the bottleneck is l2; the transmission time of a single byte is △t; the number of bytes of a received data packet is S, and the number of bytes lost between the next received data packet is S lost , and the reception interval between the first and the next received data packet is △T.

[0120] The packet loss ratio before and after the bottleneck is l1:(1-l1)l2, so the expected packet loss after the bottleneck is So there is Right now Among them, △T ^ is the fitted △T. Then, when the actual packet loss rate is known to be l, the (S, S) of each packet lost ,△T) records, we can inversely solve the packet loss rates l1 and l2 before and after the bottleneck.

[0121] Specifically, By using the least squares method to linearly fit the parameters k and b of y^=kx+b, then

[0122] In this embodiment, the bandwidth estimation method provided by this embodiment relies on sending a batch of data packets to queue in a bottleneck buffer. If the buffer length is very short, the latter half of this batch of data packets may be lost due to buffer overflow, and the first few packets may be too few to effectively calculate the bandwidth. In this case, the bandwidth estimation method provided by this embodiment will result in large errors. Therefore, this embodiment can also detect the length of the network buffer and roll back to other algorithms (such as BBR or GCC) if the buffer length does not meet the requirements, thereby improving the accuracy of bandwidth estimation results for the data transmission network.

[0123] Considering that there may be random packet loss due to unstable network signals in the data transmission network, there may also be packet loss due to buffer overflow caused by excessive transmission. In the case of random packet loss, the packet loss rate of the data packet queue has no significant relationship with the length of the data packet queue; for packet loss caused by buffer overflow, the packet loss rate of the data packet queue will increase as the length of the data packet queue increases. Therefore, in some examples, the data packet queues over a period of time can be divided into intervals of set length (such as 2KB, etc.) according to the length of the data packet queue. It is approximately considered that the lowest packet loss rate loss0 is random packet loss. Each time it is updated, if the packet loss rate loss of the current maximum gear i i If the packet loss rate is higher than the lowest level by a preset threshold (such as 0.1), the maximum buffer length of the data transmission network is lowered by one level; otherwise, the maximum buffer length of the data transmission network is increased by one level, as shown below:

[0124]

[0125] The preset minimum buffer length can be understood as the minimum buffer length that the data transmission network can support, and the preset maximum buffer length can be understood as the maximum buffer length that the data transmission network can support. The preset minimum buffer length and the preset maximum buffer length can be set in advance by relevant personnel based on the network conditions of the data transmission network.

[0126] In addition, when the maximum buffer length drops to the preset minimum buffer length, the currently used bandwidth estimation method can be adjusted. For example, if the adjusted maximum buffer length is less than or equal to the preset minimum buffer length, it can be rolled back to traditional bandwidth estimation algorithms such as GCC.

[0127] Figure 6This is a block diagram of a bandwidth estimation device provided by an embodiment of the present disclosure. The device can be implemented by software and / or hardware and can be configured in an electronic device, typically a computer, a mobile phone or a tablet computer. The bandwidth of the data transmission network can be estimated by executing the bandwidth estimation method, such as in a scenario where the amount of application data is limited. Figure 6 As shown, the bandwidth estimation device provided by this embodiment may include: a first data packet sending module 601, a time acquisition module 602 and a first bandwidth estimation module 603, wherein:

[0128] A first data packet sending module 601 is configured to continuously send data packets in a current data packet queue to a data transmission network until all data packets in the current data packet queue are sent;

[0129] The time acquisition module 602 is used to obtain the reception time information of each data packet in the current data packet queue;

[0130] The first bandwidth estimation module 603 is configured to estimate the bandwidth of the data transmission network according to the reception time information to obtain the network bandwidth of the data transmission network.

[0131] The bandwidth estimation device provided in this embodiment continuously sends data packets in the current data packet queue to the data transmission network through a first data packet sending module until all data packets in the current data packet queue are sent; obtains reception time information of each data packet in the current data packet queue through a time acquisition module; and estimates the bandwidth of the data transmission network based on this reception time information through a first bandwidth estimation module to obtain the network bandwidth of the data transmission network. This embodiment utilizes the above-mentioned technical solution to detect the network bandwidth of the data transmission network by continuously sending data packets in short bursts. This ensures that even in scenarios where the amount of application data is limited, sufficient data packets can be sent to the data transmission network to estimate the network bandwidth of the data transmission network. This enables bandwidth estimation in scenarios where application data is limited, enriches bandwidth estimation methods for data transmission networks, and avoids the phenomenon of traffic waste.

[0132] Optionally, the first bandwidth estimation module 603 may include: a proportion determination unit, used to determine the pre-bottleneck packet loss proportion and the post-bottleneck packet loss proportion of the current data packet queue based on the receiving time information; a bandwidth estimation unit, used to estimate the bandwidth of the data transmission network based on the pre-bottleneck packet loss proportion and the post-bottleneck packet loss proportion to obtain the network bandwidth of the data transmission network.

[0133] Optionally, the proportion determination unit may include: a data packet determination subunit, used to determine the non-lost data packets and lost data packets in the current data packet queue according to the receiving time information; an information determination subunit, used to determine the data packet information of the non-lost data packets based on the non-lost data packets and the lost data packets, the data packet information including the data packet length, the number of lost bytes between the next non-lost data packet and the receiving time interval between the next non-lost data packet; a first proportion determination subunit, used to determine the post-bottleneck packet loss proportion of the current data packet queue based on the data packet information of multiple non-lost data packets, wherein the multiple non-lost data packets include at least part of the non-lost data packets in the current data packet queue; a second proportion determination subunit, used to calculate the difference between 1 and the post-bottleneck packet loss proportion as the pre-bottleneck packet loss proportion of the data transmission network.

[0134] Optionally, the first proportion determination subunit can be specifically used to: fit the relationship function between the number of lost bytes and the receiving time interval based on the data packet information of multiple non-lost data packets; and calculate the post-bottleneck packet loss ratio of the current data packet queue based on the relationship function.

[0135] Furthermore, the bandwidth estimation device may also include: a second bandwidth estimation module, which is used to, after obtaining the reception time information of each data packet in the current data packet queue, use the lost data packets in the current data packet queue as the pre-bottleneck lost data packets and post-bottleneck lost data packets of the current data packet queue, respectively, to estimate the bandwidth of the data transmission network, and obtain the pre-bottleneck estimated bandwidth and post-bottleneck estimated bandwidth of the data transmission network; the bandwidth estimation unit may be specifically used to: calculate the network bandwidth of the data transmission network based on the pre-bottleneck packet loss ratio, the post-bottleneck packet loss ratio, the pre-bottleneck estimated bandwidth, and the post-bottleneck estimated bandwidth.

[0136] Optionally, the first data packet sending module 601 can be specifically used to: continuously send data packets in the data packet queue to be transmitted to the data transmission network until a preset transmission end condition is met, wherein the preset transmission end condition includes the continuous transmission length reaching the maximum buffer length of the data transmission network, or the continuous transmission length reaches the minimum buffer length of the data transmission network and the current media frame transmission ends; and use the data packets continuously transmitted this time as the data packets in the current data packet queue.

[0137] Furthermore, the bandwidth estimation device may also include: a packet loss rate updating module, which is used to update the network packet loss rate of the data transmission network according to the reception time information after obtaining the reception time information of each data packet in the current data packet queue; and a buffer length adjustment module, which is used to adjust the maximum buffer length of the data transmission network based on the network packet loss rate.

[0138] Optionally, the network packet loss rate includes a first network packet loss rate corresponding to the maximum buffer length and / or a second network packet loss rate corresponding to the minimum buffer length. The buffer length adjustment module can be specifically used to: in response to the difference between the first network packet loss rate and the second network packet loss rate being greater than a preset threshold, reduce the maximum buffer length by a first preset length; and / or, in response to the difference between the first network packet loss rate and the second network packet loss rate being less than or equal to a preset threshold, increase the maximum buffer length by a second preset length.

[0139] Optionally, the first data packet sending module 601 can be specifically used to: in response to the current conditions satisfying the preset continuous sending conditions, continuously send data packets in the queue of data packets to be transmitted to the data transmission network; the bandwidth estimation device can also include: a second data packet sending module, used to send the audio data packet at the head of the queue of data packets to be transmitted in response to the current conditions not satisfying the preset continuous sending conditions and the head of the queue of data packets to be transmitted is an audio data packet.

[0140] The bandwidth estimation device provided in the embodiments of the present disclosure can execute the bandwidth estimation method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of executing the bandwidth estimation method. For technical details not fully described in this embodiment, please refer to the bandwidth estimation method provided in any embodiment of the present disclosure.

[0141] Reference below Figure 7 , which shows a schematic structural diagram of an electronic device (e.g., a terminal device or a server) 700 suitable for implementing the embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 7 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0142] like Figure 7As shown, the electronic device 700 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 into a random access memory (RAM) 703. Various programs and data required for the operation of the electronic device 700 are also stored in the RAM 703. The processing device 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0143] Typically, the following devices may be connected to the I / O interface 705: an input device 706 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 708 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 709. The communication device 709 may allow the electronic device 700 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 7 The electronic device 700 is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.

[0144] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 709, or installed from the storage device 708, or installed from the ROM 702. When the computer program is executed by the processing device 701, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.

[0145] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0146] In some embodiments, the client and server can communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0147] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0148] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: continuously sends data packets in the current data packet queue to the data transmission network until the data packets in the current data packet queue are sent; obtains the receiving time information of each data packet in the current data packet queue; and estimates the bandwidth of the data transmission network based on the receiving time information to obtain the network bandwidth of the data transmission network.

[0149] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0150] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0151] The units involved in the embodiments described in this disclosure may be implemented in software or hardware, wherein the name of a module does not, in some cases, limit the unit itself.

[0152] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0153] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0154] According to one or more embodiments of the present disclosure, Example 1 provides a bandwidth estimation method, including:

[0155] Continuously sending data packets in the current data packet queue to the data transmission network until the data packets in the current data packet queue are completely sent;

[0156] Obtaining reception time information of each data packet in the current data packet queue;

[0157] The bandwidth of the data transmission network is estimated according to the reception time information to obtain the network bandwidth of the data transmission network.

[0158] According to one or more embodiments of the present disclosure, Example 2 is the method according to Example 1, wherein estimating the bandwidth of the data transmission network based on the reception time information to obtain the network bandwidth of the data transmission network includes:

[0159] Determine, according to the receiving time information, a packet loss ratio before the bottleneck and a packet loss ratio after the bottleneck of the current data packet queue;

[0160] The bandwidth of the data transmission network is estimated according to the pre-bottleneck packet loss ratio and the post-bottleneck packet loss ratio to obtain the network bandwidth of the data transmission network.

[0161] According to one or more embodiments of the present disclosure, Example 3 is the method according to Example 2, wherein determining the pre-bottleneck packet loss ratio and the post-bottleneck packet loss ratio of the current data packet queue based on the reception time information includes:

[0162] Determine non-lost data packets and lost data packets in the current data packet queue according to the receiving time information;

[0163] Determine data packet information of the non-lost data packet based on the non-lost data packet and the lost data packet, the data packet information including data packet length, number of lost bytes between the non-lost data packet and the next non-lost data packet, and reception time interval between the non-lost data packet and the next non-lost data packet;

[0164] Determining a post-bottleneck packet loss ratio of the current data packet queue based on data packet information of a plurality of non-lost data packets, wherein the plurality of non-lost data packets include at least some of the non-lost data packets in the current data packet queue;

[0165] The difference between 1 and the post-bottleneck packet loss ratio is calculated as the pre-bottleneck packet loss ratio of the data transmission network.

[0166] According to one or more embodiments of the present disclosure, Example 4 is the method according to Example 3, wherein determining the post-bottleneck packet loss ratio of the current packet queue based on packet information of multiple non-lost packets includes:

[0167] Fitting the relationship function between the number of lost bytes and the receiving time interval according to the data packet information of the plurality of non-lost data packets;

[0168] The post-bottleneck packet loss ratio of the current data packet queue is calculated based on the relationship function.

[0169] According to one or more embodiments of the present disclosure, Example 5 is the method according to Example 2, and further includes, after obtaining the reception time information of each data packet in the current data packet queue:

[0170] Respectively taking the lost data packets in the current data packet queue as the pre-bottleneck lost data packets and the post-bottleneck lost data packets of the current data packet queue, performing bandwidth estimation on the data transmission network, and obtaining the pre-bottleneck estimated bandwidth and the post-bottleneck estimated bandwidth of the data transmission network;

[0171] The estimating the bandwidth of the data transmission network according to the pre-bottleneck packet loss ratio and the post-bottleneck packet loss ratio to obtain the network bandwidth of the data transmission network includes:

[0172] The network bandwidth of the data transmission network is calculated according to the pre-bottleneck packet loss ratio, the post-bottleneck packet loss ratio, the pre-bottleneck estimated bandwidth, and the post-bottleneck estimated bandwidth.

[0173] According to one or more embodiments of the present disclosure, Example 6, according to the method of any one of Examples 1-5, continuously sending data packets in the current data packet queue to the data transmission network until the first data packet in the current data packet queue is completely sent, includes:

[0174] Continuously sending data packets in a queue of data packets to be transmitted to the data transmission network until a preset transmission end condition is met, wherein the preset transmission end condition includes that the continuous transmission length reaches the maximum buffer length of the data transmission network, or the continuous transmission length reaches the minimum buffer length of the data transmission network and the current media frame transmission ends;

[0175] The data packets transmitted continuously this time are regarded as the data packets in the current data packet queue.

[0176] According to one or more embodiments of the present disclosure, Example 7 is the method according to Example 6, and further includes, after obtaining the reception time information of each data packet in the current data packet queue:

[0177] updating a network packet loss rate of the data transmission network according to the receiving time information;

[0178] The maximum buffer length of the data transmission network is adjusted based on the network packet loss rate.

[0179] According to one or more embodiments of the present disclosure, Example 8 is the method according to Example 7, wherein the network packet loss rate includes a first network packet loss rate corresponding to the maximum buffer length and / or a second network packet loss rate corresponding to the minimum buffer length, and adjusting the maximum buffer length of the data transmission network based on the network packet loss rate includes:

[0180] In response to a difference between the first network packet loss rate and the second network packet loss rate being greater than a preset threshold, reducing the maximum buffer length by a first preset length; and / or

[0181] In response to a difference between the first network packet loss rate and the second network packet loss rate being less than or equal to a preset threshold, the maximum buffer length is increased by a second preset length.

[0182] According to one or more embodiments of the present disclosure, Example 9 is the method according to Example 6, wherein continuously sending data packets in the queue of data packets to be transmitted to the data transmission network includes:

[0183] In response to the current condition satisfying the preset continuous transmission condition, continuously sending data packets in the queue of data packets to be transmitted to the data transmission network;

[0184] The method further comprises:

[0185] In response to the current condition not satisfying the preset continuous sending condition and the head of the queue of data packets to be transmitted is an audio data packet, the audio data packet at the head of the queue is sent.

[0186] According to one or more embodiments of the present disclosure, Example 10 provides a bandwidth estimation device, including:

[0187] A first data packet sending module, configured to continuously send data packets in a current data packet queue to a data transmission network until the data packets in the current data packet queue are completely sent;

[0188] A time acquisition module, used to obtain the reception time information of each data packet in the current data packet queue;

[0189] The first bandwidth estimation module is configured to estimate the bandwidth of the data transmission network according to the reception time information to obtain the network bandwidth of the data transmission network.

[0190] According to one or more embodiments of the present disclosure, Example 11 provides an electronic device, including:

[0191] one or more processors;

[0192] a memory for storing one or more programs,

[0193] When the one or more programs are executed by the one or more processors, the one or more processors implement the bandwidth estimation method as described in any one of Examples 1-9.

[0194] According to one or more embodiments of the present disclosure, Example 12 provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the bandwidth estimation method as described in any one of Examples 1-9.

[0195] According to one or more embodiments of the present disclosure, Example 13 provides a computer program product. When the computer program product is executed by a computer, the computer implements the bandwidth estimation method as described in any one of Examples 1-9.

[0196] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.

[0197] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0198] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.

Claims

1. A bandwidth estimation method, characterized in that: include: Continuously sending data packets in the current data packet queue to the data transmission network until the data packets in the current data packet queue are completely sent; Obtaining reception time information of each data packet in the current data packet queue; The bandwidth of the data transmission network is estimated according to the reception time information to obtain the network bandwidth of the data transmission network.

2. The method according to claim 1, characterized in that The estimating the bandwidth of the data transmission network according to the reception time information to obtain the network bandwidth of the data transmission network includes: Determine, according to the receiving time information, a packet loss ratio before the bottleneck and a packet loss ratio after the bottleneck of the current data packet queue; The bandwidth of the data transmission network is estimated according to the pre-bottleneck packet loss ratio and the post-bottleneck packet loss ratio to obtain the network bandwidth of the data transmission network.

3. The method according to claim 2, characterized in that The determining, according to the receiving time information, a pre-bottleneck packet loss ratio and a post-bottleneck packet loss ratio of the current data packet queue includes: Determine non-lost data packets and lost data packets in the current data packet queue according to the receiving time information; Determine data packet information of the non-lost data packet based on the non-lost data packet and the lost data packet, the data packet information including data packet length, number of lost bytes between the non-lost data packet and the next non-lost data packet, and reception time interval between the non-lost data packet and the next non-lost data packet; Determining a post-bottleneck packet loss ratio of the current data packet queue based on data packet information of a plurality of non-lost data packets, wherein the plurality of non-lost data packets include at least some of the non-lost data packets in the current data packet queue; The difference between 1 and the post-bottleneck packet loss ratio is calculated as the pre-bottleneck packet loss ratio of the data transmission network.

4. The method according to claim 3, characterized in that The determining, based on the data packet information of the plurality of non-lost data packets, the proportion of packet loss after the bottleneck of the current data packet queue includes: Fitting the relationship function between the number of lost bytes and the receiving time interval according to the data packet information of the plurality of non-lost data packets; The post-bottleneck packet loss ratio of the current data packet queue is calculated based on the relationship function.

5. The method according to claim 2, characterized in that After obtaining the receiving time information of each data packet in the current data packet queue, the method further includes: Respectively taking the lost data packets in the current data packet queue as the pre-bottleneck lost data packets and the post-bottleneck lost data packets of the current data packet queue, performing bandwidth estimation on the data transmission network, and obtaining the pre-bottleneck estimated bandwidth and the post-bottleneck estimated bandwidth of the data transmission network; The estimating the bandwidth of the data transmission network according to the pre-bottleneck packet loss ratio and the post-bottleneck packet loss ratio to obtain the network bandwidth of the data transmission network includes: The network bandwidth of the data transmission network is calculated according to the pre-bottleneck packet loss ratio, the post-bottleneck packet loss ratio, the pre-bottleneck estimated bandwidth, and the post-bottleneck estimated bandwidth.

6. The method according to any one of claims 1 to 5, characterized in that: The continuously sending the data packets in the current data packet queue to the data transmission network until the first data packet in the current data packet queue is completely sent includes: Continuously sending data packets in a queue of data packets to be transmitted to the data transmission network until a preset transmission end condition is met, wherein the preset transmission end condition includes that the continuous transmission length reaches the maximum buffer length of the data transmission network, or the continuous transmission length reaches the minimum buffer length of the data transmission network and the current media frame transmission ends; The data packets transmitted continuously this time are regarded as the data packets in the current data packet queue.

7. The method according to claim 6, characterized in that After obtaining the receiving time information of each data packet in the current data packet queue, the method further includes: updating a network packet loss rate of the data transmission network according to the receiving time information; The maximum buffer length of the data transmission network is adjusted based on the network packet loss rate.

8. The method according to claim 7, characterized in that The network packet loss rate includes a first network packet loss rate corresponding to the maximum buffer length and / or a second network packet loss rate corresponding to the minimum buffer length, and adjusting the maximum buffer length of the data transmission network based on the network packet loss rate includes: In response to a difference between the first network packet loss rate and the second network packet loss rate being greater than a preset threshold, reducing the maximum buffer length by a first preset length; and / or In response to a difference between the first network packet loss rate and the second network packet loss rate being less than or equal to a preset threshold, the maximum buffer length is increased by a second preset length.

9. The method according to claim 6, characterized in that The continuously sending the data packets in the queue of data packets to be transmitted to the data transmission network includes: In response to the current condition satisfying the preset continuous transmission condition, continuously sending data packets in the queue of data packets to be transmitted to the data transmission network; The method further comprises: In response to the current condition not satisfying the preset continuous sending condition and the head of the queue of data packets to be transmitted is an audio data packet, the audio data packet at the head of the queue is sent.

10. A bandwidth estimation device, characterized in that: include: A first data packet sending module, configured to continuously send data packets in a current data packet queue to a data transmission network until the data packets in the current data packet queue are completely sent; A time acquisition module, used to obtain the reception time information of each data packet in the current data packet queue; The first bandwidth estimation module is configured to estimate the bandwidth of the data transmission network according to the reception time information to obtain the network bandwidth of the data transmission network.

11. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to perform the bandwidth estimation method according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the bandwidth estimation method according to any one of claims 1 to 9 when executed.

13. A computer program product, characterized in that The computer program product comprises a computer program, which, when executed by a processor, implements the bandwidth estimation method according to any one of claims 1 to 9.