Bandwidth estimation method, data transmission method, device and electronic equipment

By determining the continuous packet transmission time period between the sending end and the receiving end, and calculating the actual sending and receiving rates of the data packet group, the problem of inaccurate network state evaluation when the source stream bit rate is lower than the actual network bandwidth is solved, and more accurate network carrying capacity evaluation and smooth audio and video transmission are achieved.

CN120455736APending Publication Date: 2025-08-08TAOBAO CHINA SOFTWARE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510360662.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-25
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

In the case where the source stream bit rate is lower than the actual network bandwidth, the network status between the server and the client cannot be accurately evaluated, resulting in delays and lags in audio and video transmission.

Method used

By determining the continuous packet transmission time period between the sending end and the receiving end, obtaining the transmission and reception time of the data packet, dividing the packet group, calculating the actual transmission and reception rate, and then estimating the network bandwidth.

Benefits of technology

Accurately evaluate the actual carrying capacity of the network, reduce audio and video transmission delays and lags, and improve data transmission fluency and resource utilization efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120455736A_ABST
    Figure CN120455736A_ABST
Patent Text Reader

Abstract

The invention discloses a bandwidth estimation method, a data transmission method and device, electronic equipment and a computer readable storage medium, and the bandwidth estimation method comprises the steps: determining a continuous packet sending time period in a process that a sending end sends a data packet to a receiving end, and obtaining the sending time of the sending end for sending the data packet and the receiving time of the receiving end for receiving the data packet; dividing the sent data packets of which the sending time is in the same continuous packet sending time period into a data packet group; and determining an actual sending rate and an actual receiving rate corresponding to the data packet group according to the sending time and the receiving time corresponding to each data packet in the data packet group and the total size of the data packets in the data packet group, and determining the network bandwidth between the sending end and the receiving end according to the actual sending rate and the actual receiving rate corresponding to the data packet group. According to the scheme provided by the invention, the actual network state can be accurately evaluated under the condition that the source stream code rate is lower than the actual network bandwidth, so that the actual bearing capacity of the network is more accurately evaluated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a bandwidth estimation method, a data transmission method, a device, an electronic device, and a computer-readable storage medium. Background Art

[0002] With the rapid development of network technology, live streaming has been widely used in various industries, such as teaching and selling products through live streaming. In live streaming systems, audio and video data are transmitted from the host's streaming end to the client through the media server. When sending data to the client, the server usually evaluates the network status between the server and the client (such as network bandwidth) and determines the rate at which the server sends data to the client based on the evaluated network status. This ensures that the network is used for efficient data transmission and is less likely to cause network congestion and transmission failure.

[0003] When evaluating network conditions, related technologies usually calculate the average transmission rate of the server during a period of time based on the amount of data transmitted from the server to the client during the previous period, and judge the network conditions based on the average transmission rate.

[0004] However, since the rate at which the streaming end generates audio and video data may be lower than the rate at which the server sends audio and video data to the client, that is, there is a situation where the source stream bit rate is lower than the actual network bandwidth, in this case, the network status evaluated by the relevant technical solution will be lower than the actual network status, resulting in poor accuracy in the assessment of the actual carrying capacity of the network, which can easily cause delays in audio and video transmission and cause freezes. Summary of the Invention

[0005] This application provides a bandwidth estimation method, data transmission method, device, electronic device, and computer-readable storage medium that can accurately assess the actual network status between a server and a client when the source stream bitrate is lower than the actual network bandwidth. This allows for a more accurate assessment of the network's actual carrying capacity and reduces delays and lags in audio and video transmission. The specific solution is as follows:

[0006] In a first aspect, the present application provides a bandwidth estimation method, the method comprising:

[0007] Determine a continuous packet sending time period during a process in which a transmitting end sends data packets to a receiving end, wherein the continuous packet sending time period is used to record a duration period during which the transmitting end continuously sends data packets to the receiving end;

[0008] Acquire the sending time of the data packet sent by the sending end and the receiving time of the data packet received by the receiving end;

[0009] For each data packet sent from the sending end to the receiving end, group the data packets sent within the same continuous packet sending time period into a data packet group;

[0010] Determine, based on the sending time and receiving time corresponding to each data packet in the data packet group and the total size of the data packets in the data packet group, an actual sending rate and an actual receiving rate corresponding to the data packet group, wherein the actual sending rate is used to represent the actual sending rate at which the sending end continuously sends each data packet in the data packet group, and the actual receiving rate is used to represent the actual receiving rate at which the receiving end receives each data packet in the data packet group;

[0011] The network bandwidth between the sending end and the receiving end is estimated according to the actual sending rate and the actual receiving rate corresponding to the data packet group.

[0012] Optionally, the actual sending rate corresponding to the data packet group is determined by:

[0013] determining a first total size of the data packets included in the group of data packets;

[0014] Determine the duration of a sending interval between the earliest sending data packet and the latest sending data packet in the data packet group;

[0015] An actual sending rate corresponding to the data packet group is determined according to the first total size and the sending interval duration.

[0016] Optionally, the actual receiving rate corresponding to the data packet group is determined by:

[0017] Determining a second total size of each data packet received by the receiving end among the data packets included in the data packet group;

[0018] Determine a reception interval duration between a data packet received earliest and a data packet received latest in the data packet group;

[0019] An actual receiving rate corresponding to the packet group is determined according to the second total size and the receiving interval duration.

[0020] Optionally, determining a continuous packet sending time period in a process in which the transmitting end sends data packets to the receiving end includes:

[0021] In the process of sending data packets from the sending end to the receiving end, when it is detected that the sending end changes from a state where there are data packets to be sent to a state where there are no data packets to be sent, the time period between the current moment and the previous conversion moment is determined as a continuous packet sending time period, and the previous conversion moment is the moment corresponding to the most recent time when the sending end changes from a state where there are no data packets to be sent to a state where there are data packets to be sent.

[0022] Optionally, determining a continuous packet sending time period in a process in which the transmitting end sends data packets to the receiving end includes:

[0023] When the data transmission opportunity arrives, if it is detected that the sending end has a data packet to be sent, and the parameter value corresponding to the start time parameter is the initial value, then the parameter value corresponding to the start time parameter is updated to the current time, and the data transmission opportunity is the opportunity for the sending end to send the data packet to be sent to the receiving end;

[0024] If it is detected that there is no data packet to be sent by the sending end, and the parameter value corresponding to the start time parameter is not the initial value and the parameter value corresponding to the end time parameter is the initial value, the end time parameter is set to the current time, and the parameter values corresponding to the start time parameter and the end time parameter are recorded as a continuous packet sending time period;

[0025] When it is detected that the parameter values corresponding to the start time parameter and the end time parameter are recorded as a continuous packet sending time period, the start time parameter and the end time parameter are reset to initial values.

[0026] Optionally, determining a continuous packet sending time period during a process in which the transmitting end sends data packets to the receiving end further includes:

[0027] Add the recorded continuous packet sending time period to the continuous packet sending time period list.

[0028] Optionally, estimating the network bandwidth between the transmitting end and the receiving end according to the actual sending rate and the actual receiving rate corresponding to the data packet group includes:

[0029] Determining an actual sending rate and an actual receiving rate between the sending end and the receiving end according to an actual sending rate and an actual receiving rate corresponding to each of the data packet groups;

[0030] The network bandwidth between the sending end and the receiving end is estimated according to an actual sending rate and an actual receiving rate between the sending end and the receiving end.

[0031] Optionally, determining the actual sending rate and the actual receiving rate between the sending end and the receiving end according to the actual sending rate and the actual receiving rate corresponding to each of the data packet groups includes:

[0032] Determine an average value of actual sending rates corresponding to each of the data packet groups, and determine the average value of the actual sending rates corresponding to each of the data packet groups as the actual sending rate between the transmitting end and the receiving end;

[0033] An average value of actual receiving rates corresponding to each of the data packet groups is determined, and the average value of the actual receiving rates corresponding to each of the data packet groups is determined as the actual receiving rate between the transmitting end and the receiving end.

[0034] Optionally, determining the actual sending rate and the actual receiving rate between the sending end and the receiving end according to the actual sending rate and the actual receiving rate corresponding to each of the data packet groups includes:

[0035] determining a first total size of the data packets included in the group of data packets;

[0036] Determining a first weighted average of actual transmission rates corresponding to each of the data packet groups using a first total size corresponding to the data packet groups as a weight, and determining the first weighted average as the actual transmission rate between the transmitting end and the receiving end;

[0037] Determining a second total size of each data packet received by the receiving end among the data packets included in the data packet group;

[0038] Taking the second total size corresponding to the data packet group as a weight, determine a second weighted average of the actual receiving rates corresponding to each data packet group, and determine the second weighted average as the actual receiving rate between the sending end and the receiving end.

[0039] Optionally, estimating the network bandwidth between the sending end and the receiving end according to an actual sending rate and an actual receiving rate between the sending end and the receiving end includes:

[0040] The smaller rate between the actual sending rate and the actual receiving rate between the sending end and the receiving end is determined as the network bandwidth between the sending end and the receiving end.

[0041] Optionally, the method is applied to a transmitting end, and obtaining the time at which the receiving end receives the data packet includes:

[0042] receiving feedback information sent by the receiving end, wherein the feedback information includes a receiving time of the received data packet;

[0043] The receiving time of the data packet is obtained from the feedback information.

[0044] Optionally, the method is applied to a receiving end, and obtaining the sending time of the data packet sent by the sending end includes:

[0045] receiving a sending time of the data packet sent by the sending end;

[0046] The method further comprises:

[0047] The determined network bandwidth is sent to the sending end.

[0048] Optionally, the method is applied to a data transmission system, the data transmission system comprising a transmitting end and a receiving end;

[0049] The determining of the continuous packet sending time period during the process of the sending end sending data packets to the receiving end is performed by the sending end;

[0050] The steps of obtaining the sending time of the data packet sent by the sending end and the receiving time of the data packet received by the receiving end and estimating the network bandwidth between the sending end and the receiving end based on the actual sending rate and actual receiving rate corresponding to the data packet group are performed by the receiving end.

[0051] Optionally, the sending end is a server, and the receiving end is a client. The server is used to receive audio and video data pushed by the streaming end, and distribute the received audio and video data to the client in the form of data packets, so that the client plays the audio and video data.

[0052] Optionally, determining a continuous packet sending time period in a process in which the transmitting end sends data packets to the receiving end includes:

[0053] Determine, according to a preset time interval, each continuous packet sending time period during the process of the sending end sending data packets to the receiving end within the current time interval, wherein the preset time interval is the same as the packet sending period of the sending end sending data packets, and the current time interval is the preset time interval before the current moment;

[0054] Alternatively, when the statistical timing arrives, each continuous packet sending time period in the process of the sending end sending data packets to the receiving end from the last statistical timing to the current moment is determined.

[0055] In a second aspect, the present application provides a data transmission method, the method comprising:

[0056] Estimating the network bandwidth between the sending end and the receiving end by using the bandwidth estimation method according to any one of the first aspects;

[0057] The sending rate of the data sent by the sending end is updated according to the network bandwidth, so that the sending end sends the data packet to be sent according to the updated sending rate at the next data sending opportunity.

[0058] In a third aspect, the present application provides a data transmission method, the method comprising:

[0059] The server receives the streaming data sent by the streaming end, and sends the streaming data to the client in the form of a data packet, so that the client plays the audio and video data;

[0060] In a process in which the server sends the pushed streaming data to the client in the form of data packets, determining a continuous packet sending time period during which the server sends the data packets to the client, the continuous packet sending time period being used to record a duration period during which the server continuously sends data packets to the client;

[0061] Obtaining the sending time of the data packet sent by the server and the receiving time of the data packet received by the client;

[0062] For each data packet sent by the server to the client, group the data packets whose sending times are within the same continuous packet sending time period into a data packet group;

[0063] Determine, based on the sending time and receiving time corresponding to each data packet in the data packet group and the total size of the data packets in the data packet group, an actual sending rate and an actual receiving rate corresponding to the data packet group, wherein the actual sending rate represents the actual sending rate at which the server continuously sends each data packet in the data packet group, and the actual receiving rate represents the actual receiving rate at which the client receives each data packet in the data packet group;

[0064] estimating the network bandwidth between the transmitting end and the receiving end according to the actual sending rate and the actual receiving rate corresponding to the data packet group;

[0065] The sending rate of the data sent by the server is updated according to the network bandwidth between the sending end and the receiving end, so that the server sends the data packet to be sent according to the updated sending rate at the next data sending opportunity.

[0066] In a fourth aspect, the present application provides a bandwidth estimation device, comprising:

[0067] A first determining unit is configured to determine a continuous packet sending time period during a process in which a transmitting end sends data packets to a receiving end, wherein the continuous packet sending time period is used to record a duration period during which the transmitting end continuously sends data packets to the receiving end;

[0068] an acquiring unit, configured to acquire a sending time of the data packet sent by the transmitting end and a receiving time of the data packet received by the receiving end;

[0069] a grouping unit, configured to group, for each data packet sent from the sending end to the receiving end, data packets whose sending times fall within the same continuous packet sending time period into a data packet group;

[0070] a second determining unit, configured to determine, based on a sending time and a receiving time corresponding to each data packet in the data packet group and a total size of the data packets in the data packet group, an actual sending rate and an actual receiving rate corresponding to each data packet group, wherein the actual sending rate represents an actual sending rate at which the sending end continuously sends each data packet in the data packet group, and the actual receiving rate represents an actual receiving rate at which the receiving end receives each data packet in the data packet group;

[0071] An estimating unit is configured to estimate a network bandwidth between the transmitting end and the receiving end according to an actual sending rate and an actual receiving rate corresponding to the data packet group.

[0072] In a fifth aspect, the present application also provides an electronic device comprising: a processor, a memory, and computer program instructions stored on the memory and executable on the processor; when the processor executes the computer program instructions, it implements the method described in any one of the first to third aspects.

[0073] In a sixth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement any one of the methods in the first to third aspects.

[0074] In a seventh aspect, an embodiment of the present application provides a computer program product, comprising a computer program, which, when executed by a processor, implements the method as described in any one of the first to third aspects.

[0075] Compared with the prior art, this application has the following advantages:

[0076] The bandwidth estimation method provided in the embodiment of the present application determines each continuous packet sending time period in the process of sending data packets from the sending end to the receiving end. Since the continuous packet sending time period is used to record the duration of the continuous packet sending time period of the sending end to the receiving end, that is, there is no time when no packet is sent in a continuous packet sending time period, and packets are continuously sent in the entire continuous packet sending time period; then the sending time of each data packet sent by the sending end and the receiving time of the data packet received by the receiving end are obtained, and for each sent data packet sent by the sending end to the receiving end, the sent data packets whose sending time is within the same continuous packet sending time period are divided into a data packet group, so that each data packet in the same data packet group is continuously sent without a sending gap; then, according to the sending time, receiving time and the data packet group corresponding to the data packet, the sending time of each data packet is calculated. The total size of the data packets in the packet group is used to determine the actual sending rate and the actual receiving rate corresponding to each of the data packet groups, wherein the actual sending rate is used to represent the actual sending rate at which the sending end continuously sends each data packet in the data packet group, and the actual sending rate can reflect the ability of the server to continuously and uninterruptedly send data; the actual receiving rate is used to represent the actual receiving rate at which the receiving end receives each data packet in the data packet group, and the actual receiving rate can reflect the client's receiving ability to receive each data in the data packet group sent by the server; the actual sending rate and actual receiving rate corresponding to each data packet group can reflect the ability of the server and the client to continuously and successfully transmit data; therefore, the network bandwidth between the sending end and the receiving end can be estimated based on the actual sending rate and actual receiving rate corresponding to each data packet group.

[0077] The solution provided in the present application determines a continuous packet sending time period and divides the sent data packets whose sending time falls within the same continuous packet sending time period into a data packet group, so that the data in each data packet group are continuously sent data, and the actual sending rate and actual receiving rate corresponding to the determined data packet group are also the rates corresponding to the continuously sent data. The determined rate can effectively eliminate the influence of data transmission gaps on the bandwidth estimation results, so that even when the source stream bit rate is lower than the actual network bandwidth, the actual network status can be accurately evaluated, so as to more accurately evaluate the actual carrying capacity of the network between the server and the client, thereby reducing the delay and jamming of audio and video transmission.

[0078] In addition, when estimating the bandwidth, this application takes into account both the sending capability of the sender and the receiving capability of the receiver, thereby reflecting the ability of the server and the client to continuously and successfully transmit data. The estimated network bandwidth is the comprehensive capability of the sender and the receiver, and the bandwidth estimation is more accurate, so that the subsequent update of the sending rate based on the estimated network bandwidth is more efficient and smooth, which can not only efficiently utilize network resources to make data transmission smoother, but also reduce data packet loss, congestion and other phenomena, reduce playback errors, and provide users with a better viewing experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0079] Figure 1 This is a schematic diagram of an application scenario of the bandwidth estimation solution provided by this application;

[0080] Figure 2 This is a flow chart of an example of a bandwidth estimation method provided in an embodiment of the present application;

[0081] Figure 3 This is a flowchart of an example of determining a continuous packet sending time period provided in an embodiment of the present application;

[0082] Figure 4 This is an example diagram of dividing data packets into groups in an embodiment of the present application;

[0083] Figure 5 This is a flowchart of an example of a data transmission method provided in an embodiment of the present application;

[0084] Figure 6 is a flowchart of another example of the data transmission method provided in an embodiment of the present application;

[0085] Figure 7 This is a structural block diagram of the electronic device provided in this application. DETAILED DESCRIPTION

[0086] In order to enable those skilled in the art to better understand the technical solutions of this application, the following clearly and completely describes this application in conjunction with the drawings in the embodiments of this application. However, this application can be implemented in many other ways different from the following description. Therefore, based on the embodiments provided in this application, all other embodiments obtained by those skilled in the art without creative work should fall within the scope of protection of this application.

[0087] It should be noted that the terms "first", "source domain", "third", etc. in the claims, description and drawings of the present application are used to distinguish similar objects and are not used to describe a specific order or sequence. The data used in this way are interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including", "having" and their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0088] In order to facilitate understanding of the various embodiments of the present application, the application background of the embodiments is described.

[0089] With the rapid development of network technology, live streaming has been widely used in various industries, such as teaching and selling products through live streaming. In live streaming systems, audio and video data are transmitted from the host's streaming end to the client through the media server. When sending data to the client, the server usually evaluates the network status between the server and the client (such as network bandwidth) and determines the rate at which the server sends data to the client based on the evaluated network status. This ensures that the network is used for efficient data transmission and is less likely to cause network congestion and transmission failure.

[0090] When evaluating the network status between a server and a client, related technologies usually calculate the average transmission rate of the server during a period of time based on the amount of data transmitted from the server to the client during the previous period, and judge the network status based on the average transmission rate.

[0091] However, since the rate at which the streaming end generates audio and video data may be lower than the rate at which the server sends audio and video data to the client, that is, there may be a situation where the source stream bitrate is lower than the actual bandwidth, there is usually a time gap between the server's sending and receiving processes. For example, in a live broadcast scenario where the streaming end generates live video at a frame rate of 25fps, 25 frames of video are generated per second, and the frame interval is 40ms. The time points at which the video frames are generated are as follows: [0, 40, 80, 120, ...]. If the server's sending rate is relatively high, for the video frame at time point 0, the server will complete sending it at a time point < 40ms. Assuming that the server completes sending the video frame at time point 0 at 20ms, then no data will be sent during the period [20, 40]. This results in intermittent data traffic on the server. This intermittent traffic pattern will cause time gaps between sending and receiving. In this case, since the relevant technology estimates the network bandwidth based on the amount of data sent within a certain period of time, the network status assessed by the relevant technology solution will be lower than the actual network status, resulting in poorly accurate assessment of the network's actual carrying capacity, which can easily cause delays in audio and video transmission and cause lag.

[0092] To address the above issues, embodiments of the present application provide a bandwidth estimation method, data transmission method, apparatus, electronic device, and computer-readable storage medium. These methods are designed to accurately assess the actual network status when the source stream bitrate is lower than the actual network bandwidth, thereby more accurately assessing the network's actual carrying capacity and reducing delays and lags in audio and video transmission.

[0093] The bandwidth estimation method provided in this application is used to estimate the network bandwidth of the network between the sending end and the receiving end. Specifically, the sending end can be a server of a live broadcast system, such as a transcoding server, a CDN distribution server, or other server for forwarding audio and video streams pushed by a streaming end. The receiving end can be a client, which is used to play the live video received from the server. In this case, the bandwidth estimation method provided in this application is applied to the live broadcast scenario. Alternatively, the sending end and the receiving end can also be devices in other scenarios, such as the server and client of a video conferencing system, the game server and client of an online gaming system, etc., which are not specifically limited in this application.

[0094] In order to facilitate understanding of the method embodiment of this application, its application scenario is introduced. Figure 1 , Figure 1 The following is a schematic diagram of an application scenario of the solution provided in the embodiment of the present application. This application scenario is a schematic illustration and is not intended to be a specific description of its application scenario. Figure 1As shown, in this application scenario, a server 102, a client 101 and a streaming end 103 are provided. In this embodiment, connections are established between the client 101 and the server 102, and between the streaming end 103 and the server 102 via network communication to perform data transmission.

[0095] The streaming end 103 can be an electronic device with display and data processing functions, such as a mobile phone, tablet computer (pad), smart watch, desktop computer, smart TV, VR device, vehicle-mounted device, wearable device, laptop computer, etc. The streaming end 10 is used to push audio and video streams to the server end 102 in real time, and can also be used to obtain interactive information sent by the client from the server end 102, obtain other application data from the server end 102, etc.

[0096] Client 101 can be an electronic device with display and data processing functions, such as a mobile phone, tablet computer (pad), smart watch, desktop computer, smart TV, VR device, in-vehicle device, wearable device, laptop computer, etc. Client 101 is used to obtain and play audio and video data packets from server 102. It can also be used to send access requests, interactive information, etc. to server 102, so that server 102 sends the corresponding request data to client 101 for display. Client 101 is also used to send the reception time of the received data packet to server 102, so that the server can estimate the bandwidth based on the reception time.

[0097] The server 102 has a high computing power. The server 102 can be a server, and the server 102 has a high-speed processor (central processing unit, CPU) computing power, long-term reliable operation, powerful input / output (I / O) external data throughput capacity and better scalability. The server 102 can be a single server or a server cluster. The server 102 is used to receive audio and video streams from the streaming end and send them to the client in the form of data packets. The server is also used to receive feedback information from the client. The feedback information includes the reception time of the data packet received by the client, and can also include information on whether the client has received the data packet sent by the server, whether the packet is lost, etc. The server performs bandwidth estimation based on the feedback information received from the client and the information of the sent data packet to determine the rate of sending the data packet at the next packet sending opportunity based on the bandwidth estimation. The server 102 can also provide other specific services for the client 101, such as user information access, website access, application access, etc., which are not specifically limited in this application.

[0098] The client 101 and the server 102, and the streaming end 103 and the server 102 can communicate using various communication systems, such as a wired communication system or a wireless communication system. The wireless communication system may be, for example, a global system for mobile communications (GSM) system, a code division multiple access (CDMA) system, a wideband code division multiple access (WCDMA) system, a general packet radio service (GPRS), a long term evolution (LTE) system, an LTE frequency division duplex (FDD) system, an LTE time division duplex (TDD) system, a universal mobile telecommunication system (UMTS), a worldwide interoperability for microwave access (WiMAX) communication system, a future fifth generation (5G) system or a new radio (NR), a satellite communication system, etc.

[0099] Example 1

[0100] The first embodiment of the present application provides a bandwidth estimation method, which can be applied to a transmitting end of a data transmission system, or to a receiving end of a data transmission system, or to a data transmission system, wherein the data transmission system includes a transmitting end and a receiving end, and the transmitting end and the receiving end can respectively perform different steps of the bandwidth estimation method, or can also be applied to other electronic devices other than the transmitting end and the receiving end, and the other electronic devices are communicatively connected with the transmitting end and the receiving end to estimate the network bandwidth between the transmitting end and the receiving end through the other electronic devices. The transmitting end can be a server of a live broadcast system, and the receiving end can be a client of a live broadcast system, or the data transmission system can also be a transmitting end and a receiving end in other scenarios.

[0101] like Figure 2 As shown, the bandwidth estimation method provided by the first embodiment of the present application includes the following steps S110 to S150.

[0102] Step S110: determining a continuous packet sending time period during the process of the transmitting end sending data packets to the receiving end, wherein the continuous packet sending time period is used to record a duration period during which the transmitting end continuously sends data packets to the receiving end.

[0103] The continuous packet sending time period may include one, and usually, the continuous packet sending time period may include multiple.

[0104] The sending end can be a server of a live broadcast system, which can be a content delivery network (CDN) server, a data conversion server, or other servers for forwarding live video streams, such as a game server, which is not specifically limited in this application.

[0105] In this embodiment, upon detecting the presence of a data packet to be sent, the transmitting end sends the data packet to the client. The data packet to be sent may be a live audio and video stream generated in real time by the streaming end and sent to the transmitting end by the transmitting end, and then converted into a corresponding data packet. Alternatively, the data sent by the streaming end to the transmitting end may be an audio and video stream in the form of data packets.

[0106] In step S110, each continuous packet transmission time period during which the transmitting end sends data packets to the receiving end within the current time interval can be determined at preset time intervals. That is, the step of determining each continuous packet transmission time period during which the transmitting end sends data packets to the receiving end is performed once every preset time interval. The preset time interval can be the same as the packet transmission period of the transmitting end, and the current time interval is the preset time interval before the current moment. For example, if the packet transmission period of the transmitting end is 20ms, then each continuous packet transmission time period during which the transmitting end sends data packets to the receiving end within the 20ms period before the current moment can be determined at 20ms time intervals (i.e., every 20ms). When the interval period for counting the continuous packet transmission time periods is the same as the packet transmission period of the transmitting end, each continuous packet transmission time period during the packet transmission process can be promptly acquired, facilitating the subsequent timely and rapid estimation of the latest bandwidth.

[0107] Alternatively, the preset time interval may also be different from the packet sending period of the data packet sent by the sending end. For example, if the packet sending period of the data packet sent by the sending end is 20ms, the preset time interval may be 30ms or other greater or lesser intervals. Those skilled in the art may set the statistical period for counting continuous packet sending time periods according to actual needs.

[0108] Optionally, step S110 can also determine the various continuous packet sending time periods in the process of the sender sending data packets to the receiver from the previous statistical moment to the current moment when the statistical moment is reached. The statistical moment can be the moment corresponding to the preset time interval, or it can be the moment when it is detected that the sender has switched from a state where there are data packets to be sent to a state where there are no data packets to be sent. In this case, it means that there is a sending gap in the sender, and the continuous packet sending time periods can be re-counted to perform subsequent rate updates, so as to flexibly adjust the packet sending rate according to the change of the server state.

[0109] Since the speed at which the push end pushes the audio and video stream to the sender may be slower than the speed at which the sender sends data packets to the receiver, there may be a situation where the sender sends all the data packets to be sent to the receiver and there are no data packets to be sent. In this case, there will be idle gaps at the sender. During the idle gaps, the sender does not send data packets to the client. The existence of idle gaps will affect the accuracy of the sender's bandwidth estimation. Therefore, this application will count the various continuous packet sending time periods in the process of the sender sending data packets to the receiver. During the continuous packet sending time period, the sender continuously sends data packets and there is no moment when no data packets are sent. There are idle gaps between adjacent continuous packet sending time periods where no data packets are sent.

[0110] Specifically, step S110 can determine each continuous packet sending time period in the process of the sending end sending data packets to the receiving end according to the following steps: in the process of the sending end sending data packets to the receiving end, when it is detected that the sending end changes from a state where there are data packets to be sent to a state where there are no data packets to be sent, the time period between the current moment and the previous transition moment is determined as a continuous packet sending time period, and the previous transition moment is the moment corresponding to the most recent time when the sending end changes from a state where there are no data packets to be sent to a state where there are data packets to be sent. In this way, a continuous packet sending time period can be determined each time it is detected that the sending end changes from a state where there are data packets to be sent to a state where there are no data packets to be sent, thereby determining each continuous packet sending time period. This embodiment determines the continuous packet sending time period by the transition of the state of whether there are data packets to be sent at the sending end, and can conveniently and quickly determine each continuous packet sending time period.

[0111] In one implementation, step S110 may also be implemented according to the following steps S111 to S113.

[0112] Step S111: When the data sending timing arrives, if it is detected that there is a data packet to be sent at the sending end, and the parameter value corresponding to the start time parameter is the initial value, then the parameter value corresponding to the start time parameter is updated to the current time, and the data sending timing is the timing when the sending end sends the data packet to be sent to the receiving end.

[0113] The above-mentioned sending timing can be the moment corresponding to the preset sending time interval, and the sending time interval is the sending cycle. The above-mentioned initial value can be 0, or it can be null or other parameter values that can represent the initial state. When the parameter value corresponding to the start time parameter is the initial value, it means that the current statistical cycle has not yet started to count the continuous packet sending time period. At this time, if the sending end has data packets to be sent, it means that the sending end has changed from a state where there are no data packets to be sent to a state where there are data packets to be sent, which also means that the sending end has changed from an idle gap to a state where data packets are sent. At this time, the parameter value corresponding to the start time parameter can be updated to the current time, and the start time is used to record the start time of the continuous packet sending time period.

[0114] Step S112: If it is detected that there is no data packet to be sent at the sending end, and the parameter value corresponding to the start time parameter is not the initial value and the parameter value corresponding to the end time parameter is the initial value, the end time parameter is set to the current time, and the parameter values corresponding to the start time parameter and the end time parameter are recorded as a continuous packet sending time period.

[0115] The parameter value corresponding to the end time parameter is the initial value and the parameter value corresponding to the start time parameter is not the initial value, indicating that since the start time of the continuous packet sending time period began to be recorded, the sending end has not yet changed from a state where there are data packets to be sent to a state where there are no data packets to be sent. At this time, if it is currently detected that there are no data packets to be sent by the sending end, it means that at the current moment the sending end has changed from a state where there are data packets to be sent to a state where there are no data packets to be sent, thereby indicating that a continuous packet sending time period has ended and there will be a packet sending gap subsequently. Therefore, the end time parameter can be set to the current time at this time, and the parameter values corresponding to the start time parameter and the end time parameter can be recorded as a continuous packet sending time period.

[0116] Step S113: when it is detected that the parameter values corresponding to the start time parameter and the end time parameter are recorded as a continuous packet sending time period, the start time parameter and the end time parameter are reset to initial values.

[0117] After resetting the start time parameter and the end time parameter to the initial value, it is convenient to record the next continuous packet sending time period.

[0118] This embodiment can accurately and quickly record each continuous packet sending time period by continuously updating the start time parameter and the end time parameter.

[0119] In one embodiment, step S110 may further include the following step S114.

[0120] Step S114: adding the recorded continuous packet sending time period to the continuous packet sending time period list.

[0121] By creating a list of continuous packet sending time periods, it is easier to subsequently call and obtain continuous time periods, thereby improving bandwidth estimation efficiency.

[0122] For example, Figure 3 As shown, step S110 can determine each continuous packet sending time period in the process of the transmitting end sending data packets to the receiving end according to the following steps A to I.

[0123] Step A: Set the continuous packet sending time period list pairList to be empty, and set the start time parameter startTime and the end time parameter endTime to the initial values.

[0124] For example, set startTime=0 and endTime=0.

[0125] Step B: When the start time of the packet scheduling period is reached, the packet scheduling process is triggered.

[0126] Step C: Determine whether the current sending queue of the sending end has data packets to be sent.

[0127] Step D: If the result of the determination in step C is that the data packet to be sent can be sent, then it is determined whether the start time parameter startTime is an initial value.

[0128] Step E: If the judgment result of step D is the initial value, set the start time parameter startTime=current time curtime.

[0129] Step F: If the judgment result of step D is not the initial value, wait for the next packet scheduling cycle and return to execute step B.

[0130] Step G: If the result of the determination in step C is that there is no data packet to be sent, it is determined whether the start time parameter startTime is not an initial value and the end time parameter endTime is an initial value.

[0131] Step H: If the judgment result of step G is that the start time parameter startTime is not the initial value and the end time parameter endTime is the initial value, then set the end time parameter endTime = current time curtime, record the time period formed by the start time parameter and the end time parameter as a continuous packet sending time period, and add the time period formed by the start time parameter and the end time parameter to the continuous packet sending time period list pairList, and then set the start time parameter startTime and the end time parameter endTime to the initial value.

[0132] Step I: If the judgment result of step G is that the start time parameter startTime is not the initial value and the end time parameter endTime is the initial value, wait for the next packet scheduling cycle and return to step B.

[0133] Step S120: Acquire the sending time of the data packet sent by the sending end and the receiving time of the data packet received by the receiving end.

[0134] Specifically, the sending end can record the sending time when sending each data packet, so that the sending time of the data packet can be easily obtained from the sending end. The receiving end can record the receiving time when receiving the data packet, so that the receiving time of the data packet can be easily obtained from the receiving end.

[0135] Specifically, step S120 can obtain the sending time of the data packet sent by the sending end in the last bandwidth calculation cycle and the receiving time received by the receiving end. In an embodiment of the present application, the steps of estimating the bandwidth in steps S120 to S150 can be performed when the bandwidth calculation opportunity is reached. The bandwidth calculation opportunity can be the time corresponding to the preset time interval, or it can be the moment when it is detected that the sending end changes from having a data packet to be sent to having no data packet to be sent, or it can be when receiving the receiving feedback information sent by the receiving end, etc. The present application does not limit the specific time of the bandwidth calculation opportunity. The above-mentioned last bandwidth calculation cycle refers to the time period between the current bandwidth calculation opportunity and the last bandwidth calculation opportunity.

[0136] In one embodiment, the above-mentioned bandwidth estimation method can be applied to the transmitting end. When the above-mentioned bandwidth estimation method is applied to the transmitting end, in step S120, the transmitting end can obtain the reception time of the data packet received by the receiving end in the following manner: receiving feedback information sent by the receiving end, the feedback information including the reception time of the received data packet; and obtaining the reception time of the data packet from the feedback information.

[0137] In this embodiment, the receiving end can send feedback information to the sending end at a preset time interval. The feedback information includes the reception time of the data packets received within the current time interval. For example, the receiving end can provide feedback information every 50 ms, including the reception time of the data packets received within 50 ms before the current time. Alternatively, the receiving end can send feedback information to the sending end every time a preset number of data packets are received. The feedback information includes the reception time of the data packets that have not been fed back up to the current time. For example, the receiving end can provide feedback information every 200 data packets received, including the reception time of the most recently received 200 data packets. The feedback information can also include an indication of whether the received data packets were received successfully.

[0138] This embodiment estimates the network bandwidth through the sending end. Since the sending end is usually the server end and has relatively high computing resources, estimating the network bandwidth through the sending end can make the estimation process more stable, thereby obtaining more accurate network bandwidth more stably and reliably.

[0139] Step S130: for each transmitted data packet sent from the transmitting end to the receiving end, group the transmitted data packets whose transmission times are within the same continuous packet transmission time period into a data packet group.

[0140] Step S130 is specifically for each sent data packet sent by the sending end to the receiving end in the last bandwidth calculation cycle.

[0141] Specifically, the various continuous packet sending time periods in the process of the sender sending data packets to the receiver can be directly obtained, or, when the recorded continuous packet sending time periods are added to the continuous packet sending time period list, the various continuous packet sending time periods in the process of the sender sending data packets to the receiver can be obtained from the continuous packet sending time period list.

[0142] Since the sending time and receiving time corresponding to each data packet have been obtained, the continuous packet sending time period corresponding to each data packet can be easily determined.

[0143] For example, (startTime, endTime) = (0, 10) is a continuous packet sending time period, and there are 5 sent data packets with sending times of 1, 4, 5, 12, and 15 respectively. Then the sending times of the first three data packets are within (0, 10), and these three data packets belong to a data packet group.

[0144] like Figure 4 As shown, in the previous bandwidth calculation cycle, the sender sends 9 data packets to the receiver. According to the continuous packet sending time periods in the continuous packet sending time period list, the data packets whose sending times are in the same continuous packet sending time period are grouped together. As a result, these 9 data packets are divided into 3 different data packet groups.

[0145] Step S140: Determine the actual sending rate and actual receiving rate corresponding to the data packet group according to the sending time and receiving time corresponding to each data packet in the data packet group and the total size of the data packets in the data packet group.

[0146] Specifically, the actual sending rate and the actual receiving rate corresponding to each of the data packet groups are determined.

[0147] The actual sending rate is used to represent the actual sending rate at which the sending end continuously sends each data packet in the data packet group, and the actual receiving rate is used to represent the actual receiving rate at which the receiving end receives each data packet in the data packet group.

[0148] Specifically, the actual sending rate can be understood as the sending rate when the sender continuously and without gaps sends each packet in a packet group. The actual sending rate reflects the sender's ability to send packets continuously. Because the sending capability of the sender and the receiving capability of the receiver are generally different, the actual receiving rate corresponding to a packet group may also differ from the actual sending rate.

[0149] In a specific embodiment, the actual sending rate corresponding to the data packet group can be determined by following steps S141 to S143.

[0150] Step S141: Determine a first total size of the data packets included in the data packet group.

[0151] For example, step S130 divides m data packet groups, and the i-th data packet group includes n i data packets, 1≤i≤m, then the first total size of the data packets included in the i-th data packet group is Where pktSize[i][j] represents the size of the jth packet in the i-th packet group, 1≤j≤n i .

[0152] Step S142: Determine the duration of the sending interval between the earliest sending data packet and the latest sending data packet in the data packet group.

[0153] For example, if the latest data packet sent in the i-th data packet group is the n-th i data packets, then the sending time of the latest data packet in the i-th data packet group can be expressed as sendTime[i][n i ], the earliest data packet sent in the i-th data packet group is the first data packet, then the sending time corresponding to the earliest data packet sent in the i-th data packet group can be expressed as sendTime[i][1].

[0154] Step S143: determining an actual sending rate corresponding to the data packet group according to the first total size and the sending interval duration.

[0155] Specifically, the quotient of the first total size and the sending interval duration can be determined as the actual sending rate corresponding to the data packet group. Exemplarily, the actual sending rate corresponding to the i-th data packet group can be determined according to the following formula (1).

[0156]

[0157] Among them, sendRate[i] represents the actual sending rate corresponding to the i-th data packet group.

[0158] The actual receiving rate corresponding to the data packet group can be determined by following steps S144 to S146.

[0159] Step S144: Determine a second total size of each data packet received by the receiving end in the data packets included in the data packet group.

[0160] For example, step S130 divides m data packet groups, and the i-th data packet group includes n i data packets, then the second total size of each data packet received by the receiving end in the i-th data packet group is Among them, pktSize[i][j] represents the size of the jth data packet in the i-th data packet group, and isRecvd[i][j] is used to indicate whether the jth data packet in the i-th data packet group is successfully received by the receiver. When the jth data packet in the i-th data packet group is successfully received by the receiver, isRecvd[i][j] is 1; when the jth data packet in the i-th data packet group is not successfully received by the receiver, isRecvd[i][j] is 0.

[0161] Step S145: Determine the duration of the reception interval between the earliest received data packet and the latest received data packet in the data packet group.

[0162] For example, if the latest received data packet in the i-th data packet group is the n-th i data packets, then the receiving time of the latest data packet in the i-th data packet group can be expressed as recvTime[i][n i ], the earliest received data packet in the i-th data packet group is the first data packet, then the receiving time corresponding to the earliest received data packet in the i-th data packet group can be expressed as recvTime[i][1].

[0163] Step S146: Determine the actual receiving rate corresponding to the packet group according to the second total size and the receiving interval duration.

[0164] Specifically, the quotient of the second total size and the receiving interval duration can be determined as the actual receiving rate corresponding to the data packet group. Exemplarily, the actual receiving rate corresponding to the i-th data packet group can be determined according to the following formula (2).

[0165]

[0166] Among them, recvRate[i] represents the actual receiving rate corresponding to the i-th data packet group.

[0167] In this embodiment, since the data in the same data packet group are continuously and uninterruptedly sent by the transmitting end, the transmission interval between the earliest and latest data packets in the data packet group can reflect the total time taken by the transmitting end to continuously transmit the data in the data packet group. When determining the actual transmission rate corresponding to the data packet group, the actual transmission rate of the data in the data packet group continuously transmitted by the transmitting end can be conveniently and accurately determined based on the total size of the data packets included in the data packet group and the transmission interval duration. Similarly, the actual reception rate of the data in the data packet group received by the receiving end can be conveniently and accurately determined based on the second total size of the data packets included in the data packet group and the reception interval duration.

[0168] Those skilled in the art may also use other methods to determine the actual sending rate and actual receiving rate corresponding to the data packet group, which are not specifically limited in this application. After obtaining the receiving time and sending time of each data packet and the size of each data packet, those skilled in the art can easily determine the actual sending rate and actual receiving rate corresponding to the data packet group.

[0169] Step S150: estimating the network bandwidth between the transmitting end and the receiving end according to the actual sending rate and the actual receiving rate corresponding to the data packet group.

[0170] Specifically, the network bandwidth between the sending end and the receiving end may be estimated according to the actual sending rate and the actual receiving rate corresponding to each of the data packet groups.

[0171] The network bandwidth mentioned above indicates the ability to successfully transmit data between a sender and a receiver, including both the ability of the sender to successfully send data to the receiver and the ability of the receiver to successfully receive data from the sender.

[0172] Step S150 specifically determines the network bandwidth between the transmitting end and the receiving end in the previous bandwidth determination period according to each data packet group composed of each data packet sent in the previous bandwidth determination period.

[0173] Optionally, step S150 can determine the network bandwidth between the sending end and the receiving end based on the average value of the actual sending rates corresponding to each data packet group and the average value of the actual receiving rates corresponding to each data packet group. For example, the smaller average value of the average value of the actual sending rates corresponding to each data packet group and the average value of the actual receiving rates corresponding to each data packet group can be determined as the network bandwidth between the sending end and the receiving end; or the average value of the average value of the actual sending rates corresponding to each data packet group and the average value of the actual receiving rates corresponding to each data packet group can be determined as the network bandwidth between the sending end and the receiving end. By determining the average value, the network bandwidth between the sending end and the receiving end can be conveniently and quickly determined.

[0174] In a specific embodiment, step S150 can be implemented according to the following steps S151 to S152.

[0175] Step S151: determining the actual sending rate and the actual receiving rate between the sending end and the receiving end according to the actual sending rate and the actual receiving rate corresponding to each of the data packet groups.

[0176] Specifically, the average value of the actual sending rates corresponding to each of the data packet groups can be determined, and the average value of the actual sending rates corresponding to each of the data packet groups can be determined as the actual sending rate between the sending end and the receiving end; the average value of the actual receiving rates corresponding to each of the data packet groups can be determined, and the average value of the actual receiving rates corresponding to each of the data packet groups can be determined as the actual receiving rate between the sending end and the receiving end. The average values can be used to quickly and accurately obtain the actual sending rate and the actual receiving rate between the sending end and the receiving end.

[0177] Optionally, step S151 may also be determined according to the following steps S151a to S151d.

[0178] Step S151a: Determine a first total size of the data packets included in the data packet group.

[0179] Step S151b: Using the first total size corresponding to the data packet group as a weight, determine a first weighted average of the actual sending rates corresponding to each data packet group, and determine the first weighted average as the actual sending rate between the sending end and the receiving end.

[0180] Specifically, the quotient of the product of the actual transmission rate of the data packet group and the corresponding first total size divided by the total size of each data packet group can be used as the weighted actual transmission rate corresponding to the data packet group, and the sum of the weighted actual transmission rates corresponding to each data packet group can be determined as the first weighted average value of the actual transmission rates corresponding to each data packet group. Specifically, the actual transmission rate between the transmitting end and the receiving end can be determined according to the following formula (3).

[0181]

[0182] Wherein, sendRate represents the actual sending rate between the sending end and the receiving end, sendSize[i] represents the first total size of the data packets included in the i-th data packet group,

[0183] Step S151c: Determine a second total size of each data packet received by the receiving end in the data packets included in the data packet group.

[0184] Step S151d: Using the second total size corresponding to the data packet group as a weight, determine a second weighted average of the actual receiving rates corresponding to each data packet group, and determine the second weighted average as the actual receiving rate between the sending end and the receiving end.

[0185] Specifically, the quotient of the actual receiving rate of the data packet group and the corresponding second total size divided by the total size of each data packet group can be used as the weighted actual receiving rate corresponding to the data packet group, and the sum of the weighted actual receiving rates corresponding to each data packet group can be determined as the second weighted average of the actual receiving rates corresponding to each data packet group.

[0186] Specifically, the actual receiving rate between the transmitting end and the receiving end can be determined according to the following formula (4).

[0187]

[0188] Wherein, recvRate represents the actual receiving rate between the transmitting end and the receiving end, recvSize[i] represents the second total size of the data packets included in the i-th data packet group,

[0189] In this embodiment, the total size of the data packet group is used as a weight for determining the sending rate and the receiving rate, so that the determined sending rate and the receiving rate are more accurate.

[0190] Step S152: Estimate the network bandwidth between the sending end and the receiving end according to the actual sending rate and the actual receiving rate between the sending end and the receiving end.

[0191] Specifically, the smaller rate of the actual sending rate and the actual receiving rate between the sending end and the receiving end can be determined as the network bandwidth between the sending end and the receiving end. In this way, the network condition of the end with weaker bandwidth can be taken into account, and the determined network bandwidth can reflect the network condition of the end with poorer network, so that when the subsequent sending rate is determined based on the estimated network bandwidth, the sending end can successfully send and the receiving end can receive in time, further avoiding phenomena such as packet loss, and ensuring that network resources are fully utilized to make data more efficient and fast. Alternatively, the average rate of the actual sending rate and the actual receiving rate between the sending end and the receiving end can be determined as the network bandwidth between the sending end and the receiving end. In this way, a more accurate network bandwidth can be determined as a whole.

[0192] This embodiment first determines the actual sending rate and the actual receiving rate between the sending end and the receiving end, and can quickly estimate the network bandwidth between the sending end and the receiving end based on the actual sending rate and the actual receiving rate between the sending end and the receiving end.

[0193] In an optional embodiment, the bandwidth estimation method may also be applied to a receiving end. In this case, step S120 may be implemented as follows: receiving the sending time of the data packet sent by the sending end. When sending a data packet to the receiving end, the sending end may also send the sending time of the data packet to the receiving end so that the receiving end can receive the sending time of the data packet.

[0194] The bandwidth estimation method may further include the following steps: sending the determined network bandwidth to the sending end, so that the sending end can use the network bandwidth to determine a rate at which data packets are subsequently sent to the receiving end.

[0195] In an optional embodiment, the bandwidth estimation method can be applied to a data transmission system, which includes a transmitter and a receiver; the step of determining each continuous packet transmission time period in the process of the transmitter transmitting a data packet to the receiver can be performed by the transmitter, and the step of obtaining the transmission time of the data packet transmitted by the transmitter and the reception time of the data packet received by the receiver to estimating the network bandwidth between the transmitter and the receiver based on the actual transmission rate and actual reception rate corresponding to each data packet group can be performed by the receiver. In other words, the transmitter determines each continuous packet transmission time period. Since the transmitter is the active transmitter of the data packet, it can easily and quickly obtain the transmission time of each data packet and whether the transmitter has data packets to be sent, so the continuous packet transmission time period can be determined efficiently and quickly.

[0196] The above lists different situations of the execution entities of the bandwidth estimation method provided in the embodiments of the present application. Those skilled in the art can flexibly arrange the program corresponding to the bandwidth estimation method provided in the present application in different electronic devices according to actual conditions, without limiting the specific execution entity.

[0197] The bandwidth estimation method provided in the embodiment of the present application determines each continuous packet sending time period in the process of sending data packets from the sending end to the receiving end. Since the continuous packet sending time period is used to record the duration of the continuous packet sending time period of the sending end to the receiving end, that is, there is no time when no packet is sent in a continuous packet sending time period, and packets are continuously sent in the entire continuous packet sending time period; then the sending time of each data packet sent by the sending end and the receiving time of the data packet received by the receiving end are obtained, and for each sent data packet sent by the sending end to the receiving end, the sent data packets whose sending time is within the same continuous packet sending time period are divided into a data packet group, so that each data packet in the same data packet group is continuously sent without a sending gap; then, according to the sending time, receiving time and the data packet group corresponding to the data packet, the sending time of each data packet is calculated. The total size of the data packets in the packet group is used to determine the actual sending rate and the actual receiving rate corresponding to each of the data packet groups, wherein the actual sending rate is used to represent the actual sending rate at which the sending end continuously sends each data packet in the data packet group, and the actual sending rate can reflect the ability of the server to continuously and uninterruptedly send data; the actual receiving rate is used to represent the actual receiving rate at which the receiving end receives each data packet in the data packet group, and the actual receiving rate can reflect the client's receiving ability to receive each data in the data packet group sent by the server; the actual sending rate and actual receiving rate corresponding to each data packet group can reflect the ability of the server and the client to continuously and successfully transmit data; therefore, the network bandwidth between the sending end and the receiving end can be estimated based on the actual sending rate and actual receiving rate corresponding to each data packet group.

[0198] The solution provided in the present application determines a continuous packet sending time period and divides the sent data packets whose sending time falls within the same continuous packet sending time period into a data packet group, so that the data in each data packet group are continuously sent data, and the actual sending rate and actual receiving rate corresponding to the determined data packet group are also the rates corresponding to the continuously sent data. The determined rate can effectively eliminate the influence of data transmission gaps on the bandwidth estimation results, so that even when the source stream bit rate is lower than the actual network bandwidth, the actual network status between the server and the client can be accurately evaluated, so as to more accurately evaluate the actual carrying capacity of the network and reduce the delay and jamming of audio and video transmission.

[0199] In addition, when estimating the bandwidth, this application takes into account both the sending capability of the sender and the receiving capability of the receiver, thereby reflecting the ability of the server and the client to continuously and successfully transmit data. The estimated network bandwidth is the comprehensive capability of the sender and the receiver, and the bandwidth estimation is more accurate, so that the subsequent update of the sending rate based on the estimated network bandwidth is more efficient and smooth, which can not only efficiently utilize network resources to make data transmission smoother, but also reduce data packet loss, congestion and other phenomena, reduce playback errors, and provide users with a better viewing experience.

[0200] Example 2

[0201] The second embodiment of the present application further provides a data transmission method, which includes the following steps S210 to S220.

[0202] Step S210: Estimate the network bandwidth between the transmitting end and the receiving end by using any bandwidth estimation method described in the first embodiment.

[0203] Step S220: updating the sending rate of the data sent by the sending end according to the network bandwidth, so that the sending end sends the data packet to be sent according to the updated sending rate at the next data sending opportunity.

[0204] Specifically, the estimated network bandwidth may be updated as the sending rate of the data sent by the sending end, or a rate that is smaller than the estimated network bandwidth by a preset rate value may be updated as the sending rate of the data sent by the sending end.

[0205] The various execution processes of this embodiment are similar to those of the first embodiment. For details of the relevant technical features and the effects achieved, please refer to the corresponding description of the bandwidth estimation method embodiment provided in the first embodiment.

[0206] Example 3

[0207] The third embodiment of the present application further provides a data transmission method, which is applied to a data transmission system, wherein the data transmission system includes a server, a client, and a streaming end. Figure 5 、 Figure 6 As shown, the method includes the following steps S310 to S360.

[0208] Step S310: The server receives the streaming data sent by the streaming end, and sends the streaming data to the client in the form of a data packet, so that the client plays the audio and video data after receiving the data packet sent by the server.

[0209] like Figure 5 As shown, the server can be a CDN server. Figure 5The CDN server sends packets, that is, the streaming data in step S310 is sent to the client in the form of data packets. The CDN server specifically sends each media packet to the client, and the client receives packets, that is, the client receives the data packets sent by the server.

[0210] Step S320: in the process of the server sending the streaming data to the client in the form of data packets, determining a continuous packet sending time period in the process of the server sending the data packets to the client.

[0211] The continuous packet sending time period is used to record the duration of the period in which the server continuously sends data packets to the client.

[0212] like Figure 5 As shown, the process of maintaining the continuous packet sending time period performed by the CDN server is the process of the above-mentioned step S320.

[0213] Step S330: Obtain the sending time of the data packet sent by the server and the receiving time of the data packet received by the client.

[0214] like Figure 5 As shown, after the client receives the data packet sent by the server, that is, after the client receives the packet, the client can generate feedback information, that is, the client constructs a feedback package, which includes the reception time of the information received by the client and information on whether the reception is successful. The client then sends the feedback package to the server, that is, the client sends the feedback package to the CDN server. After the server receives the feedback package sent by the client, it can obtain the reception time of each data packet from the feedback package. Through these steps, the server can obtain the reception time of each data packet.

[0215] Step S340: For each data packet sent from the server to the client, group the data packets whose sending times are within the same continuous packet sending time period into a data packet group.

[0216] Step S350: determining the actual sending rate and the actual receiving rate corresponding to each data packet group according to the sending time and receiving time corresponding to each data packet in the data packet group and the total size of the data packets in the data packet group.

[0217] The actual sending rate is used to represent the actual sending rate at which the server continuously sends each data packet in the data packet group, and the actual receiving rate is used to represent the actual receiving rate at which the client receives each data packet in the data packet group.

[0218] Step S360: Estimate the network bandwidth between the transmitting end and the receiving end according to the actual sending rate and the actual receiving rate corresponding to the data packet group.

[0219] like Figure 5 As shown, the process of step S330 to step S360 is the process of bandwidth estimation by the server. Specifically, the server can estimate the network bandwidth through the bandwidth sample value calculation module.

[0220] Step S370: updating the data transmission rate of the server according to the network bandwidth between the transmitting end and the receiving end, so that the server sends the data packet to be sent according to the updated transmission rate at the next data transmission opportunity.

[0221] like Figure 5 As shown, step S370 is the process of sending packets at the updated sending rate after the CDN server updates the sending rate.

[0222] This embodiment is an application scenario embodiment of the bandwidth estimation method and the data transmission method provided in the above embodiment. The specific process is basically similar to that of the first embodiment, so the description is relatively simple. For details of the relevant technical features and the effects achieved, please refer to the corresponding description of the bandwidth estimation method embodiment provided above.

[0223] Example 4

[0224] The fourth embodiment of the present application also provides a bandwidth estimation device corresponding to the bandwidth estimation method embodiment provided in the first embodiment. Since the device embodiment is substantially similar to the method embodiment, the description is relatively simple. For details of the relevant technical features and the effects achieved, please refer to the corresponding description of the bandwidth estimation method embodiment provided above. The bandwidth estimation device provided in this embodiment includes:

[0225] a determining unit, configured to determine a continuous packet sending time period during a process in which a transmitting end sends data packets to a receiving end, wherein the continuous packet sending time period is used to record a duration period during which the transmitting end continuously sends data packets to the receiving end;

[0226] an acquiring unit, configured to acquire a sending time of the data packet sent by the transmitting end and a receiving time of the data packet received by the receiving end;

[0227] a grouping unit, configured to group, for each data packet sent from the sending end to the receiving end, data packets whose sending times fall within the same continuous packet sending time period into a data packet group;

[0228] a determining unit, configured to determine an actual sending rate and an actual receiving rate corresponding to the data packet group based on a sending time and a receiving time corresponding to each data packet in the data packet group and a total size of the data packets in the data packet group, wherein the actual sending rate is used to represent an actual sending rate at which the sending end continuously sends each data packet in the data packet group, and the actual receiving rate is used to represent an actual receiving rate at which the receiving end receives each data packet in the data packet group;

[0229] An estimating unit is configured to estimate a network bandwidth between the transmitting end and the receiving end according to an actual sending rate and an actual receiving rate corresponding to the data packet group.

[0230] Example 5

[0231] The fifth embodiment of the present application also provides an electronic device embodiment corresponding to the bandwidth estimation method provided in the first embodiment. The following description of the electronic device embodiment is only illustrative. The electronic device embodiment is as follows:

[0232] Please refer to Figure 7 Understand the above electronic devices, Figure 7 Schematic diagram of an electronic device. The electronic device provided in this embodiment includes: a processor 1001, a memory 1002, a communication bus 1003, and a communication interface 1004;

[0233] The memory 1002 is used to store computer instructions for data processing. When the computer instructions are read and executed by the processor 1001, the following steps are performed:

[0234] Determine a continuous packet sending time period during a process in which a transmitting end sends data packets to a receiving end, wherein the continuous packet sending time period is used to record a duration period during which the transmitting end continuously sends data packets to the receiving end;

[0235] Acquire the sending time of the data packet sent by the sending end and the receiving time of the data packet received by the receiving end;

[0236] For each data packet sent from the sending end to the receiving end, group the data packets sent within the same continuous packet sending time period into a data packet group;

[0237] Determine, based on the sending time and receiving time corresponding to each data packet in the data packet group and the total size of the data packets in the data packet group, an actual sending rate and an actual receiving rate corresponding to the data packet group, wherein the actual sending rate is used to represent the actual sending rate at which the sending end continuously sends each data packet in the data packet group, and the actual receiving rate is used to represent the actual receiving rate at which the receiving end receives each data packet in the data packet group;

[0238] The network bandwidth between the sending end and the receiving end is estimated according to the actual sending rate and the actual receiving rate corresponding to the data packet group.

[0239] The sixth embodiment of the present application also provides a computer-readable storage medium for implementing the method described in the first embodiment. The computer-readable storage medium embodiment provided in this application is described in a relatively simple manner. For relevant parts, please refer to the corresponding description of the above method embodiment. The embodiment described below is merely illustrative.

[0240] The computer-readable storage medium provided in this embodiment stores computer instructions, which, when executed by a processor, implement the following steps:

[0241] Determine a continuous packet sending time period during a process in which a transmitting end sends data packets to a receiving end, wherein the continuous packet sending time period is used to record a duration period during which the transmitting end continuously sends data packets to the receiving end;

[0242] Acquire the sending time of the data packet sent by the sending end and the receiving time of the data packet received by the receiving end;

[0243] For each data packet sent from the sending end to the receiving end, group the data packets sent within the same continuous packet sending time period into a data packet group;

[0244] Determine, based on the sending time and receiving time corresponding to each data packet in the data packet group and the total size of the data packets in the data packet group, an actual sending rate and an actual receiving rate corresponding to the data packet group, wherein the actual sending rate is used to represent the actual sending rate at which the sending end continuously sends each data packet in the data packet group, and the actual receiving rate is used to represent the actual receiving rate at which the receiving end receives each data packet in the data packet group;

[0245] The network bandwidth between the sending end and the receiving end is estimated according to the actual sending rate and the actual receiving rate corresponding to the data packet group.

[0246] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0247] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0248] 1. Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include non-transitory computer-readable media, such as modulated data signals and carrier waves.

[0249] 2. Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0250] Although the present application is disclosed as above with the preferred embodiments, it is not intended to limit the present application. Any person skilled in the art may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.

Claims

1. A bandwidth estimation method, characterized in that: The method comprises: Determine a continuous packet sending time period during a process in which a transmitting end sends data packets to a receiving end, wherein the continuous packet sending time period is used to record a duration period during which the transmitting end continuously sends data packets to the receiving end; Acquire the sending time of the data packet sent by the sending end and the receiving time of the data packet received by the receiving end; For each data packet sent from the sending end to the receiving end, group the data packets sent within the same continuous packet sending time period into a data packet group; Determine, based on the sending time and receiving time corresponding to each data packet in the data packet group and the total size of the data packets in the data packet group, an actual sending rate and an actual receiving rate corresponding to the data packet group, wherein the actual sending rate is used to represent the actual sending rate at which the sending end continuously sends each data packet in the data packet group, and the actual receiving rate is used to represent the actual receiving rate at which the receiving end receives each data packet in the data packet group; The network bandwidth between the sending end and the receiving end is estimated according to the actual sending rate and the actual receiving rate corresponding to the data packet group.

2. The bandwidth estimation method according to claim 1, wherein: The actual sending rate corresponding to the data packet group is determined by: determining a first total size of the data packets included in the group of data packets; Determine the duration of a sending interval between the earliest sending data packet and the latest sending data packet in the data packet group; An actual sending rate corresponding to the data packet group is determined according to the first total size and the sending interval duration.

3. The bandwidth estimation method according to claim 1, wherein: The actual receiving rate corresponding to the data packet group is determined by: Determining a second total size of each data packet received by the receiving end among the data packets included in the data packet group; Determine a reception interval duration between a data packet received earliest and a data packet received latest in the data packet group; An actual receiving rate corresponding to the packet group is determined according to the second total size and the receiving interval duration.

4. The bandwidth estimation method according to claim 1, wherein: The determining of a continuous packet sending time period during a process in which a transmitting end sends data packets to a receiving end includes: In the process of sending data packets from the sending end to the receiving end, when it is detected that the sending end changes from a state where there are data packets to be sent to a state where there are no data packets to be sent, the time period between the current moment and the previous conversion moment is determined as a continuous packet sending time period, and the previous conversion moment is the moment corresponding to the most recent time when the sending end changes from a state where there are no data packets to be sent to a state where there are data packets to be sent.

5. The bandwidth estimation method according to claim 4, characterized in that: The determining of a continuous packet sending time period during a process in which a transmitting end sends data packets to a receiving end includes: When the data transmission opportunity arrives, if it is detected that the sending end has a data packet to be sent, and the parameter value corresponding to the start time parameter is the initial value, then the parameter value corresponding to the start time parameter is updated to the current time, and the data transmission opportunity is the opportunity for the sending end to send the data packet to be sent to the receiving end; If it is detected that there is no data packet to be sent by the sending end, and the parameter value corresponding to the start time parameter is not the initial value and the parameter value corresponding to the end time parameter is the initial value, the end time parameter is set to the current time, and the parameter values corresponding to the start time parameter and the end time parameter are recorded as a continuous packet sending time period; When it is detected that the parameter values corresponding to the start time parameter and the end time parameter are recorded as a continuous packet sending time period, the start time parameter and the end time parameter are reset to initial values.

6. The bandwidth estimation method according to claim 5, characterized in that: The determining of a continuous packet sending time period during the process of the transmitting end sending data packets to the receiving end further includes: Add the recorded continuous packet sending time period to the continuous packet sending time period list.

7. The bandwidth estimation method according to claim 1, wherein: The estimating the network bandwidth between the transmitting end and the receiving end according to the actual sending rate and the actual receiving rate corresponding to the data packet group includes: Determining an actual sending rate and an actual receiving rate between the sending end and the receiving end according to an actual sending rate and an actual receiving rate corresponding to each of the data packet groups; The network bandwidth between the sending end and the receiving end is estimated according to an actual sending rate and an actual receiving rate between the sending end and the receiving end.

8. The bandwidth estimation method according to claim 7, wherein: The determining, based on the actual sending rate and the actual receiving rate corresponding to each of the data packet groups, the actual sending rate and the actual receiving rate between the sending end and the receiving end includes: Determine an average value of actual sending rates corresponding to each of the data packet groups, and determine the average value of the actual sending rates corresponding to each of the data packet groups as the actual sending rate between the transmitting end and the receiving end; An average value of actual receiving rates corresponding to each of the data packet groups is determined, and the average value of the actual receiving rates corresponding to each of the data packet groups is determined as the actual receiving rate between the transmitting end and the receiving end.

9. The bandwidth estimation method according to claim 7, wherein: The determining, based on the actual sending rate and the actual receiving rate corresponding to each of the data packet groups, the actual sending rate and the actual receiving rate between the sending end and the receiving end includes: determining a first total size of the data packets included in the group of data packets; Determining a first weighted average of actual transmission rates corresponding to each of the data packet groups using a first total size corresponding to the data packet groups as a weight, and determining the first weighted average as the actual transmission rate between the transmitting end and the receiving end; Determining a second total size of each data packet received by the receiving end among the data packets included in the data packet group; Taking the second total size corresponding to the data packet group as a weight, determine a second weighted average of the actual receiving rates corresponding to each data packet group, and determine the second weighted average as the actual receiving rate between the sending end and the receiving end.

10. The bandwidth estimation method according to claim 7, wherein: The estimating the network bandwidth between the sending end and the receiving end according to the actual sending rate and the actual receiving rate between the sending end and the receiving end includes: The smaller rate between the actual sending rate and the actual receiving rate between the sending end and the receiving end is determined as the network bandwidth between the sending end and the receiving end.

11. The bandwidth estimation method according to any one of claims 1 to 10, characterized in that: The method is applied to a transmitting end, and obtaining the receiving time of the data packet at the receiving end includes: receiving feedback information sent by the receiving end, wherein the feedback information includes a receiving time of the received data packet; The receiving time of the data packet is obtained from the feedback information.

12. The bandwidth estimation method according to any one of claims 1 to 10, characterized in that: The method is applied to a receiving end, and obtaining the sending time of the data packet sent by the sending end includes: receiving a sending time of the data packet sent by the sending end; The method further comprises: The determined network bandwidth is sent to the sending end.

13. The bandwidth estimation method according to any one of claims 1 to 10, characterized in that: The method is applied to a data transmission system, which includes a transmitting end and a receiving end; The determining of the continuous packet sending time period during the process of the sending end sending data packets to the receiving end is performed by the sending end; The steps of obtaining the sending time of the data packet sent by the sending end and the receiving time of the data packet received by the receiving end to estimating the network bandwidth between the sending end and the receiving end based on the actual sending rate and actual receiving rate corresponding to the data packet group are performed by the receiving end.

14. The bandwidth estimation method according to any one of claims 1 to 10, characterized in that: The sending end is a server, and the receiving end is a client. The server is used to receive the audio and video data pushed by the streaming end, and distribute the received audio and video data to the client in the form of data packets, so that the client can play the audio and video data.

15. The bandwidth estimation method according to any one of claims 1 to 10, characterized in that: The determining of a continuous packet sending time period during a process in which a transmitting end sends data packets to a receiving end includes: Determine, according to a preset time interval, each continuous packet sending time period during the process of the sending end sending data packets to the receiving end within the current time interval, wherein the preset time interval is the same as the packet sending period of the sending end sending data packets, and the current time interval is the preset time interval before the current moment; Alternatively, when the statistical timing arrives, each continuous packet sending time period in the process of the sending end sending data packets to the receiving end from the last statistical timing to the current moment is determined.

16. A data transmission method, characterized in that: The method comprises: Estimating the network bandwidth between the transmitting end and the receiving end by the bandwidth estimation method according to any one of claims 1 to 15; The sending rate of the data sent by the sending end is updated according to the network bandwidth, so that the sending end sends the data packet to be sent according to the updated sending rate at the next data sending opportunity.

17. A data transmission method, characterized in that: The method comprises: The server receives the streaming data sent by the streaming end, and sends the streaming data to the client in the form of a data packet, so that the client plays the audio and video data; In a process in which the server sends the pushed streaming data to the client in the form of data packets, determining a continuous packet sending time period during which the server sends the data packets to the client, the continuous packet sending time period being used to record a duration period during which the server continuously sends data packets to the client; Obtaining the sending time of the data packet sent by the server and the receiving time of the data packet received by the client; For each data packet sent by the server to the client, group the data packets whose sending times are within the same continuous packet sending time period into a data packet group; Determine, based on the sending time and receiving time corresponding to each data packet in the data packet group and the total size of the data packets in the data packet group, an actual sending rate and an actual receiving rate corresponding to the data packet group, wherein the actual sending rate represents the actual sending rate at which the server continuously sends each data packet in the data packet group, and the actual receiving rate represents the actual receiving rate at which the client receives each data packet in the data packet group; estimating the network bandwidth between the transmitting end and the receiving end according to the actual sending rate and the actual receiving rate corresponding to the data packet group; The sending rate of the data sent by the server is updated according to the network bandwidth between the sending end and the receiving end, so that the server sends the data packet to be sent according to the updated sending rate at the next data sending opportunity.

18. A bandwidth estimation device, characterized in that: The device comprises: A first determining unit is configured to determine a continuous packet sending time period during a process in which a transmitting end sends data packets to a receiving end, wherein the continuous packet sending time period is used to record a duration period during which the transmitting end continuously sends data packets to the receiving end; an acquiring unit, configured to acquire a sending time of the data packet sent by the transmitting end and a receiving time of the data packet received by the receiving end; a grouping unit, configured to group, for each data packet sent from the sending end to the receiving end, data packets whose sending times fall within the same continuous packet sending time period into a data packet group; a second determining unit, configured to determine, based on a sending time and a receiving time corresponding to each data packet in the data packet group and a total size of the data packets in the data packet group, an actual sending rate and an actual receiving rate corresponding to each data packet group, wherein the actual sending rate represents an actual sending rate at which the sending end continuously sends each data packet in the data packet group, and the actual receiving rate represents an actual receiving rate at which the receiving end receives each data packet in the data packet group; An estimating unit is configured to estimate a network bandwidth between the transmitting end and the receiving end according to an actual sending rate and an actual receiving rate corresponding to the data packet group.

19. An electronic device, characterized in that: include: a processor, a memory, and computer program instructions stored on the memory and executable on the processor; When the processor executes the computer program instructions, the method according to any one of claims 1 to 17 is implemented.

20. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method according to any one of claims 1 to 17.