TCP link network bandwidth estimation method and system based on packet loss feedback strategy

By adopting a TCP link network bandwidth estimation method based on packet loss feedback strategy, this method solves the problems of long time consumption and high resource consumption in traditional TCP link bandwidth measurement by sending TCP packets at once and iteratively adjusting the number of packets sent, thus achieving fast, accurate and low-consumption bandwidth estimation.

CN121077944APending Publication Date: 2025-12-05BEIJING YUNYUNZHIDU TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing methods for measuring TCP link bandwidth are time-consuming, consume a lot of bandwidth resources, and have a significant impact on business traffic. They cannot quickly and accurately estimate bandwidth without interfering with normal business traffic.

Method used

A TCP link network bandwidth estimation method based on packet loss feedback strategy is adopted. This method involves sending a preset number of TCP packets at once, and iteratively adjusting the number of packets sent until a packet loss equilibrium point is reached. The number of packets sent is dynamically adjusted using packet loss feedback. Historical data is used for comparison. The comparison is achieved by calculating the number of clients and using a dynamic step size. Finally, the TCP link bandwidth is calculated.

Benefits of technology

It achieves fast, accurate, and low-consumption bandwidth estimation, significantly reducing the bandwidth resource consumption and impact on service traffic during the speed measurement process, and improving speed measurement efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121077944A_ABST
    Figure CN121077944A_ABST
Patent Text Reader

Abstract

The invention discloses a TCP link network bandwidth estimation method and system based on a packet loss feedback strategy, and relates to the technical field of network bandwidth speed measurement, and the method comprises the steps: controlling a client to send n TCP messages with the length len to a server at a time based on the packet sending number n after the client establishes TCP connection with the server; and obtaining an actual packet receiving quantity m fed back by the server, and a sending timestamp and a response timestamp recorded by the client. And comparing m with n, iteratively adjusting n and resending until finding the maximum n value which enables m to be equal to n, namely the packet loss balance point. And finally, the TCP link bandwidth is calculated according to the n, len and timestamp of the point. According to the method, bandwidth waste caused by traditional slow start and stable transmission is avoided through single packet sending and iterative adjustment, the bandwidth is rapidly and accurately estimated with few messages and time consumption in combination with intelligent initial value setting, and resource occupation and service influence are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of network bandwidth measurement technology, and in particular to a method and system for estimating TCP link network bandwidth based on a packet loss feedback strategy. Background Technology

[0002] Accurately measuring TCP network link bandwidth has a wide range of applications, such as between clients and servers, between edge computing nodes and cloud centers, and between different network nodes, where it is often necessary to assess and analyze the network quality of TCP links. However, how to quickly and accurately estimate bandwidth without interfering with normal business traffic as much as possible is a technical problem that urgently needs to be solved.

[0003] Currently, TCP link speed testing typically involves performing large-scale data uploads or downloads at both ends of the link. For example... Figure 1 As shown, this process begins with the TCP three-way handshake. After a successful handshake, the client starts sending data to the server. In the early stages of transmission, TCP's congestion control mechanism kicks in: when establishing a new connection, the congestion window is typically set to a small initial value, thus limiting the number of packets the client can send at once. Each time the server successfully receives a batch of packets, it returns an ACK confirmation to the client. As long as there is no packet loss, the client's congestion window gradually increases according to the algorithm, allowing the client to send more packets in the next transmission. This mechanism gradually increases the client's sending rate until it reaches the link's bandwidth bottleneck or packet loss occurs. The entire speed test process often lasts several seconds or even tens of seconds, and the average bandwidth of the link is obtained by dividing the total amount of data transmitted during the entire transmission period by the total time.

[0004] This traditional speed measurement method has significant drawbacks. First, to wait for the congestion window to gradually grow from its initial value to a stable state, and then continue transmitting enough data to calculate the average bandwidth after stabilization, the speed measurement process must last for a relatively long time. This results in a large amount of bandwidth resources being occupied by the speed measurement traffic itself. Second, if the link under test is simultaneously carrying actual business traffic, this long-term, high-volume speed measurement behavior will inevitably compete with the business traffic for network resources, thus having a significant impact on service quality. The fundamental problem is that the traditional method cannot avoid the bandwidth waste during the TCP slow start phase and the additional overhead caused by the need to continue transmitting large amounts of data after the stabilization phase.

[0005] Therefore, there is an urgent need in this field for a new method for estimating TCP link bandwidth that can greatly reduce bandwidth consumption and significantly reduce the impact on business traffic. Summary of the Invention

[0006] The technical problem to be solved by this invention is to address the shortcomings of existing technologies. Specifically, it provides a method and system for estimating TCP link network bandwidth based on a packet loss feedback strategy, as detailed below: 1) In a first aspect, the present invention provides a method for estimating TCP link network bandwidth based on a packet loss feedback strategy, the specific technical solution of which is as follows: S1. After the client and server establish a TCP connection, based on the number of packets n, control the client to send n TCP packets of length len to the server at one time. S2. Obtain the actual number of packets received from the server, m, and obtain the sending timestamp and response timestamp corresponding to this message sending from the client; S3. Based on the comparison between the actual number of received packets m and the number of sent packets n, iteratively adjust the number of sent packets n and return to execute S1 until the packet loss balance point is reached; where the packet loss balance point is: the maximum number of sent packets that makes m=n has been found. S4. When the packet loss balance point is reached, calculate the TCP link bandwidth between the client and the server based on the number of packets sent, the packet length len, and the sending and response timestamps of the TCP packets obtained at that time.

[0007] The beneficial effects of the TCP link network bandwidth estimation method based on packet loss feedback strategy provided by this invention are as follows: By eliminating the TCP slow start and stable transmission phases required in traditional speed measurement methods, this solution completely avoids the significant bandwidth waste generated by these phases. The technical solution directly controls the client to send packets all at once within one RTT, based on a preset packet quantity n, thereby minimizing the amount of data transmitted during the speed measurement process. An iterative feedback mechanism dynamically adjusts the packet quantity n until a packet loss equilibrium point is found; this mechanism itself has the characteristic of rapid convergence. More importantly, the initial packet quantity n for each speed measurement is set based on an intelligent strategy, making it very close to the actual carrying capacity of the link. This significantly reduces the number of iterations and RTTs required to reach the packet loss equilibrium point. Bandwidth estimation can be completed with a very small number of packets sent and a very short measurement time. This not only greatly saves the network bandwidth resources occupied by the speed measurement itself, reducing consumption by one to two orders of magnitude, but also, because the speed measurement traffic is small and the duration is short, its impact on the normal business traffic carried on the link is reduced to a negligible level, achieving efficient and non-intrusive link quality assessment. While ensuring the accuracy of bandwidth estimation, it achieves the goal of fast, accurate, and low-consumption measurement, effectively solving the core technical problems of high bandwidth consumption and significant impact on services in traditional methods in the background technology.

[0008] Based on the above scheme, the TCP link network bandwidth estimation method based on packet loss feedback strategy of the present invention can be further improved as follows.

[0009] Furthermore, the initial number of packets n 初始 The initial value is calculated using the initial value calculation formula: n 初始 =α×last_num+(1-α)×hist_num; where last_num represents the reference value of the number of packets sent when the last speed test reached the packet loss balance point, hist_num represents the number of packets sent corresponding to the historical experience value of the TCP link at the same time based on historical data, and α is the weighting coefficient.

[0010] The beneficial effects of adopting the above-mentioned further scheme are as follows: Using the reference value `last_num` corresponding to the number of packets sent when the last speed test reached the packet loss equilibrium point, the latest state of the link can be reflected; simultaneously, combining this with the packet number `hist_num` corresponding to the historical empirical value of the TCP link at the same time based on historical data, the periodic pattern of link bandwidth can be captured. By fusing recent measured results with long-term historical trends through a weighting coefficient α, the calculated initial packet number `n` is usually very close to the packet number corresponding to the actual bandwidth capacity of the current link. This mechanism ensures that each speed test process starts from a near-optimal starting point, greatly reducing the number of probe rounds and round-trip times (RTTs) required for subsequent iterative adjustments, thus quickly converging to the packet loss equilibrium point. Ultimately, this technical feature effectively improves speed test efficiency and minimizes the bandwidth resources consumed by the speed test process itself.

[0011] Furthermore, it also includes: By statistically estimating the TCP link bandwidth at the same time within a preset number of days prior to the current moment, converting the TCP link bandwidth estimate into the corresponding number of packets sent, and then calculating the number of packets sent corresponding to the historical speed test value (hist_num) using a weighted average or time series prediction model.

[0012] The beneficial effects of adopting the above further solution are as follows: By deeply exploring and utilizing the regularity of the TCP link bandwidth varying over time, a highly intelligent historical reference benchmark is provided for the speed measurement process. By systematically counting the historical bandwidth estimates at the same time within a preset number of days before the current moment of the TCP link and converting them into corresponding packet sending quantities, the typical capacity characteristics of the link during a specific period (such as the business peak or idle period) can be accurately captured. Then, by processing these historical packet sending quantity data using a weighted average or time series prediction model, the generated historical speed measurement experience value hist_num not only includes the historical average level but also can reflect the trend and periodic pattern of the bandwidth change. This mechanism ensures that hist_num, as a predicted value, has high accuracy and adaptability, so that the initial packet sending quantity n_initial calculated based on it can be very close to the instantaneous real capacity of the link. This significantly improves the starting point accuracy of each speed measurement, greatly reduces the number of exploratory packet sendings for finding the packet loss balance point, fundamentally reduces the resource overhead of the speed measurement process itself, and further ensures the rapidity and reliability of the estimation result.

[0013] Further, according to the comparison result of the actual received packet quantity m and the sent packet quantity n, iteratively adjust the sent packet quantity n and return to execute S1 until the packet loss balance point is reached, including: If m < n, reduce the sent packet quantity n; if m = n, increase the sent packet quantity n. Here, the adjustment step size step is a dynamic value, satisfying step = β × n, where β is the step size coefficient, and the value range of β is [0.05, 0.5]. During consecutive iterations, when the first actual received packet quantity m is less than the sent packet quantity n appears, the sent packet quantity n used in the previous iteration adjacent to this iteration and satisfying m = n is determined as the maximum sent packet quantity, that is, the packet loss balance point is reached.

[0014] The beneficial effects of adopting the above further solution are as follows: Determine the adjustment direction according to the comparison result of the actual received packet quantity m and the sent packet quantity n. If m is less than n, reduce the value of n; if m is equal to n, increase the value of n. This ensures that the detection process always approaches the bandwidth critical point. The adjustment step size step is designed as a dynamic value, which is in a proportional relationship with the current n value, enabling it to quickly approach the target with a larger step size when far from the critical point and automatically switch to a small step size for fine tuning when approaching the critical point, effectively avoiding oscillation or overshoot phenomena during the adjustment process. Particularly crucial is that the successful sent packet quantity n in the previous iteration before the first packet loss is recognized as the packet loss balance point. This judgment logic is rigorous and efficient, and can accurately capture the maximum available capacity of the link. Therefore, the entire iterative process has the dual advantages of fast convergence and accurate results, ensuring the efficiency and reliability of the bandwidth estimation.

[0015] Furthermore, when the packet loss equilibrium point is reached, the TCP link bandwidth between the client and server is calculated based on the number of packets sent, the packet length len, and the sending and response timestamps of the acquired TCP packets at that point. This includes: When the packet loss balance point is reached, the TCP link bandwidth between the client and the server is calculated using the TCP link bandwidth calculation formula: R=(N×len) / (timestamp2-timestamp1), where N represents the number of packets sent when the packet loss balance point is reached, R represents the TCP link bandwidth between the client and the server, timestamp1 represents the sending timestamp of the TCP packet when the packet loss balance point is reached, and timestamp2 represents the response timestamp of the TCP packet when the packet loss balance point is reached.

[0016] The beneficial effects of adopting the above-mentioned further scheme are: by converting the detection results into accurate bandwidth estimates through explicit mathematical formulas, a closed-loop measurement process and direct result output are achieved. Its core benefit lies in the fact that the parameters relied upon by the calculation formula all come from key measured data at the moment the packet loss equilibrium point is reached, thus ensuring the accuracy and real-time nature of the estimation results. The numerator N×len in the formula represents the maximum amount of data that the network path can carry without packet loss within one RTT, which directly reflects the instantaneous effective capacity of the link. The denominator timestamp2-timestamp1 is the actual round-trip time from message sending to acknowledgment, accurately capturing the network latency at that time. By calculating the amount of data successfully transmitted per unit time, the obtained bandwidth estimate R can truly reflect the upper limit of the available bandwidth of the TCP link under the current network conditions. This calculation method does not require continuously transmitting large amounts of data to calculate an average; it directly uses the one-time measurement data at the critical point to obtain the result, greatly improving the speed measurement efficiency and making the final result highly representative and reliable.

[0017] 2) In a second aspect, the present invention also provides a TCP link network bandwidth estimation system based on a packet loss feedback strategy, the specific technical solution of which is as follows: It includes a control and transmission module, a feedback acquisition module, an iterative adjustment module, and a link bandwidth determination module; The control and transmission module is used to: after the client and the server establish a TCP connection, based on the number of packets n, control the client to send n TCP packets of length len to the server at one time; The feedback acquisition module is used to: obtain the actual number of packets received m from the server, and obtain the sending timestamp and response timestamp corresponding to this packet sending from the client; The iterative adjustment module is used to: according to the comparison result of the actual packet reception quantity m and the packet sending quantity n, iteratively adjust the packet sending quantity n and re - call the control sending module and the feedback acquisition module until the packet loss balance point is reached; where the packet loss balance point is: the maximum packet sending quantity that has been found to make m = n. The link bandwidth determination module is used to: when the packet loss balance point is reached, calculate the TCP link bandwidth between the client and the server according to the packet sending quantity, the message length len, and the sending timestamp and response timestamp of the TCP message obtained this time, which correspond to the packet loss balance point.

[0018] Based on the above - mentioned solution, a TCP link network bandwidth estimation system based on a packet loss feedback strategy of the present invention can also be improved as follows.

[0019] Further, the initial packet sending quantity n 初始 is calculated through an initial value calculation formula, and the initial value calculation formula is: n 初始 =α×last_num+(1 - α)×hist_num; where last_num represents: the reference value of the packet sending quantity corresponding to the last speed measurement reaching the packet loss balance point, hist_num represents: the packet sending quantity corresponding to the historical speed measurement experience value of the TCP link at the same moment based on historical data, and α is a weighting coefficient.

[0020] Further, it further includes an acquisition module, and the acquisition module is used to: By statistically estimating the TCP link bandwidth at the same moment within a preset number of days before the current moment of the TCP link, and after converting the TCP link bandwidth estimation value into the corresponding packet sending quantity, then calculating the packet sending quantity hist_num corresponding to the speed measurement historical experience value through weighted average or a time - series prediction model.

[0021] Further, the iterative adjustment module is specifically used to: If m < n, then reduce the packet sending quantity n, if m = n, then increase the packet sending quantity n; where the adjustment step size step is a dynamic value, satisfying step = β×n, β is a step - size coefficient, and the value range of β is [0.05, 0.5]. In consecutive iterative processes, when the first actual packet reception quantity m is less than the packet sending quantity n appears, then the packet sending quantity n used in the previous iteration adjacent to this iteration and satisfying m = n is determined as the maximum packet sending quantity, that is, the packet loss balance point is reached.

[0022] Further, the link bandwidth determination module is used to: When the packet loss balance point is reached, the TCP link bandwidth between the client and the server is calculated using the TCP link bandwidth calculation formula: R=(N×len) / (timestamp2-timestamp1), where N represents the number of packets sent when the packet loss balance point is reached, R represents the TCP link bandwidth between the client and the server, timestamp1 represents the sending timestamp of the TCP packet when the packet loss balance point is reached, and timestamp2 represents the response timestamp of the TCP packet when the packet loss balance point is reached.

[0023] 3) In a third aspect, the present invention also provides an electronic device, the electronic device including a processor coupled to a memory, the memory storing at least one computer program, the at least one computer program being loaded and executed by the processor, so that the electronic device implements any of the above-mentioned TCP link network bandwidth estimation methods based on packet loss feedback strategies.

[0024] 4) In a fourth aspect, the present invention also provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements any of the above-mentioned TCP link network bandwidth estimation methods based on packet loss feedback strategies.

[0025] It should be noted that the beneficial effects of the technical solutions of the second to fourth aspects of the present invention and their corresponding possible implementations can be found in the above description of the technical effects of the first aspect and its corresponding possible implementations, and will not be repeated here. Attached Figure Description

[0026] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments of the present invention will be briefly introduced below: Figure 1 This is a schematic diagram of the speed measurement process for an existing TCP link. Figure 2 This is one of the flowcharts illustrating a TCP link network bandwidth estimation method based on a packet loss feedback strategy according to an embodiment of the present invention. Figure 3 This is a second flowchart illustrating a TCP link network bandwidth estimation method based on a packet loss feedback strategy according to an embodiment of the present invention. Figure 4 This is a schematic diagram of the structure of a TCP link network bandwidth estimation system based on a packet loss feedback strategy according to an embodiment of the present invention; Figure 5 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0027] The principles and features of the present invention are described below. The examples given are only for explaining the present invention and are not intended to limit the scope of the present invention.

[0028] The technical solution of the present invention and how the technical solution of the present invention solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of the present invention will now be described with reference to the accompanying drawings.

[0029] like Figure 2 As shown in the figure, a TCP link network bandwidth estimation method based on a packet loss feedback strategy according to an embodiment of the present invention includes the following steps: S1. After the client and server establish a TCP connection, based on the number of packets n, control the client to send n TCP packets of length len to the server at once; specifically: First, the speed test management center generates a speed test task between the client and server according to a preset speed test cycle. This task includes speed test parameters such as the number of packets (n) and the packet length (len). The speed test management center then distributes the task to both the client and server. The server, according to the requirements of the speed test task, starts a listening service on the specified IP address and port, waiting for TCP connection requests from the client. After receiving the task, the client parses the server's IP address and port specified in the task and initiates a TCP three-way handshake to establish a reliable connection with the server. Once the connection is successfully established, the client constructs n consecutive TCP packets based on the packet number (n) and packet length (len) set in the speed test task. The sequence numbers of these packets increment sequentially to ensure transmission continuity. Subsequently, the client sends all n packets to the server at once, without waiting for intermediate confirmation, thus completing packet transmission within one round-trip time (RTT). At the start of transmission, the client accurately records the current time as a timestamp (timestamp1) for subsequent bandwidth calculations. The entire packet sending process is strictly controlled by the parameter settings of the speed test management center to ensure that the speed test is carried out with the smallest packet granularity, effectively reducing bandwidth usage.

[0030] S2. Obtain the actual number of packets received m from the server, and obtain the sending timestamp and response timestamp corresponding to this packet transmission from the client. Specifically: The server successfully receives n TCP packets sent by the client in the listening state. The server performs real-time counting on the received packets to statistically count the number of packets actually and successfully received in this connection, denoted as the actual packet reception quantity m. After completing the packet reception counting, the server generates feedback information containing the actual packet reception quantity m and sends this feedback information to the speed measurement management center. Meanwhile, after the client successfully sends all n packets, it starts waiting to receive the corresponding ACK confirmation packets returned by the server. When the client receives the ACK packet responded by the server, it immediately records the accurate time of the current system as the response timestamp timestamp2. The sending timestamp timestamp1 has been recorded when the packet started to be sent in step S1. Subsequently, the client generates feedback information for this packet sending, and the key data included in this information are: the packet sending quantity n, the pre-recorded sending timestamp timestamp1, and the just-obtained response timestamp timestamp2. The client also sends this feedback information to the speed measurement management center. Finally, the speed measurement management center respectively receives and aggregates the feedback of the actual packet reception quantity m from the server, and the feedback of the packet sending quantity n, the sending timestamp timestamp1, and the response timestamp timestamp2 from the client. Based on this, the speed measurement management center completes the collection of all data required for this speed measurement cycle, preparing for subsequent comparison of the packet sending quantity n with the actual packet reception quantity m and calculation of the link bandwidth.

[0031] S3. According to the comparison result of the actual packet reception quantity m and the packet sending quantity n, iteratively adjust the packet sending quantity n and return to execute S1 until the packet loss balance point is reached; where the packet loss balance point is: the maximum packet sending quantity that has been found to make m = n. Specifically, if m < n, reduce the packet sending quantity n; if m = n, increase the packet sending quantity n; where the adjustment step size step is a dynamic value, satisfying step = β × n, β is the step size coefficient, and the value range of β is [0.05, 0.5]. In consecutive iterations, when the first time the actual packet reception quantity m is less than the packet sending quantity n appears, the packet sending quantity n used in the previous iteration adjacent to this iteration and satisfying m = n is determined as the maximum packet sending quantity, that is, the packet loss balance point is reached.

[0032] After the speed measurement management center collects the actual packet reception quantity m feedback from the server and the packet sending quantity n, the sending timestamp, and the response timestamp feedback from the client, it starts the iterative adjustment algorithm. The core of this process is to dynamically adjust the packet sending quantity n for the next speed measurement by comparing the size relationship between the actual packet reception quantity m and the packet sending quantity n, so as to approach the true bandwidth capacity of the link.

[0033] Among them, the speed measurement management center compares the actual packet reception quantity m and the packet sending quantity n of this feedback. The comparison results are divided into two cases: 1) The first scenario is that the actual number of received packets, *m*, is less than the number of sent packets, *n*. This indicates that the number of packets sent by the client within the current RTT has exceeded the instantaneous carrying capacity of the network path, leading to packet loss. In this case, the speed test management center determines that the current number of sent packets, *n*, exceeds the critical point of the link bandwidth. To find the accurate critical point, the number of sent packets, *n*, needs to be reduced. The reduction is determined by the dynamic step size, *step*, calculated as *step* = β × *n*, where β is the step size coefficient, typically ranging from 0.05 to 0.5. After calculating the *step* value, the new number of sent packets, *n*, is updated to *n* minus *step*, i.e., *n* = *n* - *step*. This new, smaller value of *n* will be set by the speed test management center as the initial number of sent packets for the next speed test task.

[0034] 2) The second scenario is that the actual number of packets received, *m*, equals the number of packets sent, *n*. This indicates that all sent messages were successfully received, the network path was not congested at the current number of packets sent, *n*, and there was still bandwidth available. Therefore, to further probe the bandwidth limit, the number of packets sent, *n*, needs to be increased. The increase is also determined by the dynamic step size, *step*, which is calculated as β×n. Subsequently, the new number of packets sent, *n*, is updated to *n* plus *step*, i.e., *n* = *n* + *step*. This larger value of *n* will be used as the initial value for the next speed test.

[0035] During the continuous iterative adjustment process, the speed test management center continuously monitors the feedback from each speed test. A key state transition is defined as the marker of reaching the packet loss equilibrium point. Specifically, when, in a certain round of speed testing, the actual number of received packets *m* is less than the number of sent packets *n* for the first time, it means that the bandwidth critical point of the link has just been crossed. At this point, the speed test management center will determine the number of sent packets *n* used in the previous iteration immediately preceding this iteration as the target value. This is because in the previous iteration, the actual number of received packets *m* equaled the number of sent packets *n*, and this was the last successful full-capacity transmission before packet loss occurred. This value of *n* is the maximum number of sent packets, i.e., the maximum number of sent packets *N*, which is the packet loss equilibrium point sought.

[0036] Once the packet loss equilibrium point is determined, the iterative adjustment process ends. The speed measurement management center will use the n value corresponding to this equilibrium point for the final bandwidth calculation. The entire adjustment mechanism combines coarse and fine adjustments through dynamic step sizes, rapidly approaching the critical point in the initial stage and fine-tuning near the critical point in the later stage, thereby efficiently and accurately locating the TCP network bandwidth with the fewest speed measurement rounds.

[0037] S4. When the packet loss equilibrium point is reached, calculate the TCP link bandwidth between the client and server based on the number of packets sent, the packet length len, and the sending and response timestamps of the TCP packets acquired at that point. Specifically: When the packet loss equilibrium point is reached, the TCP link bandwidth between the client and the server is calculated using the TCP link bandwidth calculation formula: R=(N×len) / (timestamp2-timestamp1), where N represents the number of packets sent at the packet loss equilibrium point, i.e., the maximum number of packets sent; R represents the TCP link bandwidth between the client and the server; timestamp1 represents the sending timestamp of the TCP packet at the packet loss equilibrium point; and timestamp2 represents the response timestamp of the TCP packet at the packet loss equilibrium point.

[0038] Once the speed test management center determines that the packet loss equilibrium point has been reached through an iterative adjustment process, it enters the final TCP link bandwidth calculation stage. This equilibrium point is marked by the first occurrence, in consecutive speed test iterations, of the actual number of received packets (m) being less than the number of sent packets (n). At this point, the number of sent packets (n) in the immediately preceding iteration that satisfies m equal to n is considered the maximum number of packets that can fully utilize the link without causing packet loss.

[0039] The calculation process begins with the speed test management center accurately identifying the key parameters corresponding to reaching the packet loss balance point. These parameters include: the final determined number of packets n, i.e., the number of packets when the last full transmission was successfully achieved (m=n); the fixed packet length len preset in the speed test task; the precise timestamp recorded by the client when it successfully sends the batch of packets, i.e., the sending timestamp timestamp 1; and the precise timestamp recorded by the client when it receives the ACK confirmation packet returned by the server for the batch of packets, i.e., the response timestamp timestamp 2.

[0040] Then, the speed measurement management center uses the TCP link bandwidth calculation formula to perform the calculation. In the calculation, the numerator is n multiplied by len, which physically represents the total amount of effective data successfully transmitted within one RTT when the packet loss balance point is reached. The denominator is timestamp2 minus timestamp1, and the result is the round-trip time (RTT) from sending to receiving acknowledgment for that batch of packets, in seconds. Dividing the total data volume by the time interval gives the estimated bandwidth R of the TCP link at the current moment, typically in bits per second. For example, if the packet length len is in bytes, the result needs to be multiplied by 8 to convert it to bits per second.

[0041] After the calculation is completed, the speed test management center records and stores the bandwidth estimate R obtained from this calculation, along with its corresponding packet count n, timestamp, and other information. The packet count n from this speed test will be updated to the reference value last_num from the previous speed test, which will be used to calculate the initial value of n for the next speed test. Simultaneously, the bandwidth estimate R measured at this specific moment will be included in the historical database to update the historical experience value for this TCP link at the same time, thereby providing a more accurate initial reference for subsequent periodic speed tests, further optimizing convergence speed and reducing bandwidth consumption. This completes one full bandwidth estimation cycle.

[0042] Optionally, in the above technical solution, the initial number of packets n 初始 The initial value is calculated using the initial value calculation formula: n 初始 =α×last_num+(1-α)×hist_num; where last_num represents the reference value of the number of packets sent when the last speed test reached the packet loss balance point, hist_num represents the number of packets sent corresponding to the historical experience value of the TCP link at the same time based on historical data, and α is the weighting coefficient.

[0043] When initiating a new TCP link bandwidth estimation task, determine a reasonable initial number of packets n. 初始 This is crucial, as it directly affects the speed at which the rate measurement process converges to the packet loss equilibrium point and the overall bandwidth consumption. This method employs an intelligent prediction mechanism based on historical experience to calculate n. 初始 The specific implementation process is as follows: ① The speed test management center needs to obtain two key parameters: the reference value of the number of packets sent corresponding to the last speed test result last_num and the number of packets sent corresponding to the historical speed test experience value obtained based on historical data hist_num.

[0044] The parameter `last_num` is obtained relatively directly. It originates from the data recorded during the last successful bandwidth estimation of this TCP link. Specifically, in the previous speed test period, when the iterative adjustment process reached the packet loss equilibrium point (i.e., finding the maximum number of packets that satisfy m=n, which is N), the value of n was stored by the speed test management center and marked as the reference value `last_num` for the next speed test of this link. If this is the first time the link is being tested and there is no previous test result, then `last_num` uses a preset default value.

[0045] ② After obtaining last_num and hist_num, the speed test management center will perform a weighted calculation, specifically calculating the initial packet quantity n using the initial value calculation formula. 初始 Here, α is a weighting coefficient between 0 and 1, which determines the relative weight of the previous real-time speed measurement result and the historical long-term trend in the current prediction. The value of α can be dynamically adjusted according to the speed measurement strategy. For example, in scenarios where the link status changes rapidly, last_num can be given a higher weight (a larger α value) to track recent changes more quickly; while in periodic scenarios where the link status is relatively stable, hist_num can be given a higher weight (a smaller α value) to make full use of the effectiveness of historical patterns.

[0046] Optionally, the above technical solution also includes: By statistically estimating the TCP link bandwidth at the same time within a preset number of days prior to the current moment, converting the TCP link bandwidth estimate into the corresponding packet count, and then calculating the packet count hist_num corresponding to the historical speed test value using a weighted average or time series prediction model, the following is specifically: ① The speed test management center retrieves relevant data from its persistent historical database. The retrieval criteria are based on the specific TCP link identifier targeted by the current speed test task, such as the five-tuple information, and the current time. A preset number of days is set, such as thirty days, and then all historical speed test records before the current time, at the same time, or within the same time period are filtered from the historical records. The same time period here usually refers to the same point in time during the day; for example, if the current time is 10:05 AM, then speed test records completed around 10:05 AM every day within the past thirty days will be retrieved.

[0047] ② Extract the key "TCP link bandwidth estimation" results from these filtered historical records. Each historical record contains a bandwidth value R_historical that was actually measured at the same time in the past.

[0048] ③ Convert the historical bandwidth estimate R_historical to the corresponding historical packet quantity n_historical. This conversion is derived from the basic principles of bandwidth estimation. The conversion formula is: n_historical = R_historical × T / len. Where R_historical is the historical bandwidth value, T is the typical round-trip time (RTT), and len is a fixed packet length. The RTT value T can be the average historical RTT of the link or an empirical constant. Through this conversion, each historical bandwidth value is mapped to the number of packets theoretically required to fill that bandwidth under the same RTT and packet length conditions, thus transforming the bandwidth trend into a packet quantity trend.

[0049] ④ After obtaining a series of historical packet count sequences n_historical from the same point in time, the speed test management center uses a data aggregation algorithm to calculate the final hist_num. The most commonly used method is the weighted average method. In this method, historical data closer to the current date is assigned a higher weight because recent data better reflects the latest state of the link. A weight is assigned to each n_historical value in the sequence, and then their weighted average is calculated as hist_num.

[0050] For scenarios requiring higher prediction accuracy, more complex time series forecasting models can be used, such as exponential smoothing or ARIMA models. These models treat the historical packet quantity sequence n_historical as a time series, learn its inherent patterns, trends, and periodicity (such as daily bandwidth peaks and troughs) through algorithms, and predict the most likely packet quantity at the current moment based on the learned model. This predicted value is then used as hist_num.

[0051] The TCP link network bandwidth estimation method based on packet loss feedback strategy of the present invention will be further illustrated by the following embodiments: The system primarily involves a client, a server, and a speed test management center. The client and server are deployed on the two network nodes requiring bandwidth estimation, respectively. The bandwidth capacity of the link between these two nodes is estimated by sending TCP packets from the client to the server. The speed test management center acts as the control hub, responsible for periodically distributing speed test tasks to the client and server, configuring key speed test parameters including the number of packets sent (n) and the packet length (len), processing packet loss feedback from the server, and maintaining the real-time status and long-term historical data of all tested links, thereby accurately reflecting the trend of link quality changes.

[0052] To significantly reduce the bandwidth consumption of traditional TCP speed measurement methods, the core mechanism of this invention lies in utilizing only the number of packets sent by the client at one time within one round-trip time (RTT) of the TCP protocol to perform bandwidth detection and estimation. This means that the measurement is performed at the smallest possible packet granularity. Specifically, the number of packets sent by the client at one time within one RTT is entirely set by the speed measurement management center. Figure 3 As shown, the speed test process begins with the speed test management center sending a speed test task to the client and server, and setting initial parameters such as the number of packets to be sent. For a specific TCP connection (usually identified by a 5-tuple), during the first speed test, due to the lack of historical references, the speed test management center presets the number of packets to be sent, n, to a system default initial value. Subsequently, the client and server perform a TCP three-way handshake to establish a reliable connection. After the connection is established, the client sends n TCP packets to the server at once, according to the set number n. After receiving these packets, the server responds with a corresponding ACK confirmation packet, counts the number of packets actually successfully received, m, and then feeds back this number m to the speed test management center.

[0053] After receiving the actual number of packets received (m) from the server, the speed test management center compares it with the initially set number of packets sent (n) to determine if packet loss occurred during transmission. If m equals n, it indicates no packet loss, and the current number of packets sent (n) has not yet reached the link's bandwidth bottleneck. The speed test management center then instructs the client to increase the number of packets sent, i.e., send n+step packets for the next round of probing. If m is less than n, it indicates packet loss has occurred, and the current number of packets sent (n) may have exceeded the link's instantaneous carrying capacity. The speed test management center then instructs the client to reduce the number of packets sent, i.e., send n-step packets for re-probing. This adjustment step size (step) is a dynamic value, usually proportional to the current number of packets sent (n). Figure 3As shown, through several rounds of iterative feedback loops of "sending n+ / -step packets, receiving an ACK from the server, and reporting the number of packets received," the network's carrying capacity limit is gradually approached. When the maximum number of packets sent without packet loss is found through iteration—that is, when the packet loss equilibrium point is reached—the speed measurement management center can accurately estimate the TCP transmission bandwidth using the value of n, the packet length len, and the time difference between sending and acknowledging the packet in that round. This speed measurement method, through targeted and dynamic adjustment strategies, can detect link bandwidth with far fewer packets than traditional methods.

[0054] like Figure 3 As shown, the initial packet count for subsequent speed test tasks will no longer be set blindly. This invention fully utilizes the characteristic of TCP link bandwidth typically exhibiting stability and periodicity over time. For example, the bandwidth level of a link often shows similar characteristics during the same time period each day (such as evening peak hours or early morning off-peak hours). Therefore, when starting a new speed test task, the speed test management center intelligently combines two key reference values ​​to calculate the initial packet count n for this speed test: one is the packet count reference value last_num corresponding to the packet loss equilibrium point reached in the last speed test, and the other is the packet count hist_num corresponding to the historical speed test experience value obtained based on the analysis of historical speed test results at the same time in the last few days. 初始 The calculation usually uses a weighted average method, that is: n 初始 =α×last_num+(1-α)×hist_num, where α is the weighting coefficient.

[0055] like Figure 3 As shown, the number of packets sent in subsequent speed tests is referenced to the previous speed test value and historical speed test experience values. This greatly accelerates the convergence speed to reach the packet loss equilibrium point and enables rapid measurement of link bandwidth. During the initial speed test, due to the lack of historical reference, multiple RTTs and multiple rounds of packet sending may be required to converge to accurate bandwidth. However, in subsequent speed tests, because of the previously measured bandwidth reference value for this TCP link (including recent results and long-term historical patterns), this reference value is usually very close to the actual bandwidth. Using its corresponding number of packets as the initial value, the speed test process requires only a very small number of RTTs and a very small number of packets to reach the packet loss equilibrium point, thus completing the bandwidth estimation. This intelligent prediction mechanism based on historical experience reduces the bandwidth resources consumed by the overall speed test process by one to two orders of magnitude compared to traditional methods, achieving efficient, accurate link bandwidth measurement with minimal impact on business operations.

[0056] The specific implementation process is as follows: S101. The speed test management center generates a speed test task for two specific network nodes, namely the client and the server. This task includes necessary parameters, such as the target address and port. The speed test management center then distributes the speed test task to the client and the server respectively.

[0057] S102. After receiving the speed test task, the server starts a listening service on the specified IP address and port according to the task requirements, ready to accept new TCP connection requests initiated by the client.

[0058] S103. After receiving the speed test task, the client resolves the server's IP address and port information, and then initiates a TCP three-way handshake process to establish a new TCP connection.

[0059] S104. After the TCP connection is successfully established, the client begins preparing to send data. The client constructs a message according to the parameters specified in the speed test task. The message length len is directly specified by the task, while the key parameter for this speed test—the number of packets n—is determined based on an intelligent strategy: If it is not the first speed test, the speed test management center will combine the reference value of the number of packets last_num corresponding to the packet loss balance point in the previous speed test, and the packet number hist_num corresponding to the historical experience value of the TCP link at the same time obtained based on historical data, and calculate the initial value of n using the initial value calculation formula. 初值 If this is the first speed test, since historical reference values ​​are lacking, n will take a system-preset default value. The client constructs n TCP packets of length len with consecutive sequence numbers, and then sends all packets to the server at once. At the start of transmission, the client accurately records the current system time as the transmission timestamp (timestamp1).

[0060] S105. The server receives TCP packets from the client. During the reception process, the server counts the number of packets successfully received within a specific time window, denoted as the actual number of packets received, m. After reception is complete, the server responds to the client with an ACK confirmation packet.

[0061] S106. The server will send the actual number of packets received, m, back to the speed test management center.

[0062] S107. After sending all n messages, the client waits for and receives the ACK message returned by the server. Upon receiving the ACK, the client records the current system time as the response timestamp (timestamp2).

[0063] S108. The client sends the key data of this speed test, including the number of packets sent (n), the sending timestamp (timestamp1), and the response timestamp (timestamp2), to the speed test management center.

[0064] S109. After gathering feedback information from the client and server, the speed test management center performs a core judgment: comparing the set number of packets sent (n) with the actual number of packets received (m) reported by the server. If m equals n, it means that no packet loss occurred during this transmission process, and the current number of packets sent (n) has not yet reached the network path's carrying capacity limit; if m is less than n, it means that packet loss occurred, and the current number of packets sent (n) may have exceeded the network's instantaneous bandwidth capacity.

[0065] S110. Based on the comparison results, the speed measurement management center dynamically adjusts the number of packets n to approximate the packet loss equilibrium point: If m is less than n, it indicates that the client is sending too many packets, and the value of n needs to be reduced. The reduction amount is determined by the dynamic step size step, which is calculated as step = β × n, where β is the step size coefficient, ranging from 0.05 to 0.5. The value of β can be dynamically adjusted. A larger value can be used for the initial speed measurement or when the target is far from the critical point to quickly approximate the target; a smaller value should be used for fine-tuning as the target approaches the critical point. The new packet quantity n is updated to n minus step.

[0066] If m equals n, it indicates that the link still has remaining bandwidth, and the value of n needs to be increased to further probe the upper limit. The increase is also calculated by step = β×n, and the new number of packets n is updated to n plus step.

[0067] Subsequently, the speed test management center sends a speed test task containing the new value of n to the client and server again, repeating steps S104 to S109 to form an iterative probing loop. This loop continues until the packet loss balance point is met: in consecutive iterations, the first instance occurs where m is less than n. At this point, the n value used in the immediately preceding iteration that satisfies m equal to n is considered the maximum number of packets that makes m equal to n, which is when the packet loss balance point is reached.

[0068] S111. When the packet loss equilibrium point is reached, the speed measurement management center calculates the TCP link bandwidth using the key parameters of that round. The bandwidth calculation formula is: Bandwidth estimate R = (N × len) / (timestamp2 - timestamp1). Where n is the number of packets sent when the packet loss equilibrium point is reached, len is the packet length, and timestamp2 - timestamp1 is the round-trip time from sending to acknowledgment. The calculated result R is the estimated TCP link bandwidth at the current moment.

[0069] S112. The speed test management center records the bandwidth estimate R and the corresponding number of packets n obtained from this calculation. This value of n will be stored as a reference value last_num for calculating the initial value of n in the next speed test.

[0070] S113. The speed test management center will also aggregate and analyze the bandwidth estimate R measured at a specific time with multiple bandwidth estimates of the TCP link at the same time in the same historical period. For example, by calculating a weighted average or applying a time series prediction model, it will generate or update the historical experience value of the speed test at that time and convert it into the corresponding number of packets sent, hist_num, for reference in future speed tests at the same time.

[0071] S114. After a preset speed test cycle, the next speed test cycle begins. The speed test management center uses the packet quantity reference value last_num stored in the previous cycle, and the packet quantity hist_num corresponding to the generated or updated historical speed test experience value, to calculate the initial packet quantity n for this speed test using the weighted formula α×last_num+ (1-α)×hist_num.

[0072] In step S115, the speed test management center uses an intelligently estimated value 'n' based on historical data as the initial packet quantity, sends a new speed test task to the client and server, and repeats the process from S104 to S114. Since this initial 'n' value is usually very close to the packet quantity corresponding to the actual bandwidth capacity of the link, the entire speed test process can quickly converge to the packet loss equilibrium point with very few iterations and packet transmissions, thus greatly saving the bandwidth resources occupied by the speed test itself.

[0073] This invention abandons the traditional TCP speed measurement approach that requires continuous transmission of large amounts of data to increase the congestion window and maintain a stable transmission phase. Instead, it creatively proposes using only the number of packets transmitted by the client within one round-trip time (RTT) of the TCP protocol to detect and estimate link bandwidth. This mechanism essentially employs the smallest feasible packet sending granularity for measurement. Specifically, the client sends n packets set by the speed measurement management center within one RTT, and then immediately makes judgments and adjustments based on feedback from the server, thus skipping the significant bandwidth consumption generated by the TCP slow start and stable transmission phases in traditional methods.

[0074] This invention designs bandwidth estimation as a periodic, continuous process. The speed test management center plays a core role, responsible for maintaining historical speed test data for each TCP link at different time points (e.g., seconds, minutes, or hours). Based on this data, the system generates and continuously updates historical speed test experience values ​​and their corresponding packet count references for each time point. Each time a new speed test task is started, this historical experience value is preferentially referenced when setting the initial packet count n, making the starting point of each probe more accurate. This mechanism fully utilizes the temporal regularity that network bandwidth often exhibits similar characteristics at the same time, thereby significantly accelerating the convergence of the probe process to the packet loss equilibrium point.

[0075] Based on the characteristic that TCP link bandwidth typically remains relatively stable in the short term, this invention intelligently integrates recent measured results with long-term historical patterns to calculate the initial packet quantity for each speed test. Specifically, it calculates the weighted average of the packet quantity reference value `last_num` corresponding to the packet loss equilibrium point reached during the last successful speed test, and the packet quantity `hist_num` corresponding to the historical empirical value of the same speed test at the same time obtained based on historical data analysis. This average is α×last_num + (1-α)×hist_num, and the result is used as the initial packet quantity `n` for the current speed test. Since this estimated value is usually very close to the packet quantity corresponding to the actual bandwidth capacity of the link, the speed test process can quickly reach the packet loss equilibrium point within a very small number of RTT rounds, such as a few RTTs, successfully estimating the bandwidth. This innovation reduces the number of packets consumed during the speed test itself, i.e., the bandwidth resources occupied, by one to two orders of magnitude compared to traditional methods.

[0076] This invention constructs a closed-loop control logic based on packet loss feedback. The speed measurement management center compares the actual number of packets received (m) reported by the server with the preset number of packets sent (n) in real time to accurately determine whether packet loss has occurred during message transmission. Based on the comparison result, the subsequent number of packets sent (n) is dynamically adjusted: if m equals n, n is increased; if m is less than n, n is decreased. The adjustment step size (step) adopts a dynamic strategy, proportional to the current value of n, achieving a balance between rapid approximation and fine-tuning. Through this iterative feedback mechanism, the system can gradually approach and ultimately determine the maximum number of packets sent that just does not cause packet loss, i.e., the packet loss equilibrium point, and then accurately estimate the actual bandwidth of the link based on the data at this point.

[0077] Compared to traditional TCP link bandwidth estimation methods based on HTTP or other protocols that involve continuous large-scale data transmission, this invention effectively avoids excessive network bandwidth consumption during the speed measurement process and significantly reduces interference with the quality of services carried on the link. Its technical effects and advantages are specifically reflected in the following aspects: First, by omitting the congestion window growth phase necessary in traditional TCP speed measurements, the data transmission consumption during this phase is avoided. Second, by omitting the phase in traditional methods where packets need to be continuously sent and received to calculate the average bandwidth after the sending window stabilizes, estimation is performed solely based on the number of packets sent in a single RTT cycle, greatly reducing the amount of data sent. Finally, since the initial number of packets sent in each speed measurement is based on intelligent prediction and is usually close to the actual value, the number of RTT rounds and the total number of packets required for the overall speed measurement process are far lower than in traditional methods, ultimately achieving high-precision bandwidth estimation with extremely low overhead.

[0078] Although the steps have been numbered in the above embodiments, they are only specific embodiments given by the present invention. Those skilled in the art can adjust the execution order of the steps according to the actual situation, which is also within the protection scope of the present invention. It can be understood that some embodiments may include some or all of the above embodiments.

[0079] like Figure 4 As shown, an embodiment of the present invention provides a TCP link network bandwidth estimation system 200 based on a packet loss feedback strategy, which includes a control and transmission module 201, a feedback acquisition module 202, an iterative adjustment module 203, and a link bandwidth determination module 204. The control and transmission module 201 is used to: after the client and the server establish a TCP connection, based on the number of packets n, control the client to send n TCP packets of length len to the server at one time; The feedback acquisition module 202 is used to: obtain the actual number of packets received m from the server, and obtain the sending timestamp and response timestamp corresponding to this message sending from the client; The iterative adjustment module 203 is used to: iteratively adjust the number of packets sent (n) based on the comparison result between the actual number of packets received (m) and the number of packets sent (n), and re-call the control transmission module 201 and the feedback acquisition module 202 until the packet loss balance point is reached; wherein, the packet loss balance point is: the maximum number of packets sent that makes m=n has been found. The link bandwidth determination module 204 is used to: when the packet loss balance point is reached, calculate the TCP link bandwidth between the client and the server based on the number of packets sent, the packet length len, and the sending and response timestamps of the TCP packets obtained at that time.

[0080] Optionally, in the above technical solution, the initial number of packets n 初始 The initial value is calculated using the initial value calculation formula: n 初始 =α×last_num+(1-α)×hist_num; where last_num represents the reference value of the number of packets sent when the last speed test reached the packet loss balance point, hist_num represents the number of packets sent corresponding to the historical experience value of the TCP link at the same time based on historical data, and α is the weighting coefficient.

[0081] Optionally, the above technical solution further includes an acquisition module, which is used for: By statistically estimating the TCP link bandwidth at the same time within a preset number of days prior to the current moment, converting the TCP link bandwidth estimate into the corresponding number of packets sent, and then calculating the number of packets sent corresponding to the historical speed test value (hist_num) using a weighted average or time series prediction model.

[0082] Optionally, in the above technical solution, the iterative adjustment module 203 is specifically configured to: If m < n, reduce the packet sending quantity n; if m = n, increase the packet sending quantity n. Here, the adjustment step size step is a dynamic value, satisfying step = β × n, where β is the step size coefficient, and the value range of β is [0.05, 0.5]. In the continuous iterative process, when the first actual packet receiving quantity m is less than the packet sending quantity n, the packet sending quantity n used in the previous iteration adjacent to this iteration and satisfying m = n is determined as the maximum packet sending quantity, that is, the packet loss balance point is reached.

[0083] Optionally, in the above technical solution, the link bandwidth determination module 204 is configured to: When the packet loss balance point is reached, calculate the TCP link bandwidth between the client and the server through the TCP link bandwidth calculation formula. The TCP link bandwidth calculation formula is: R = (N × len) / (timestamp2 - timestamp1), where N represents the packet sending quantity corresponding to the packet loss balance point, R represents the TCP link bandwidth between the client and the server, timestamp1 represents the sending timestamp of the TCP packet when the packet loss balance point is reached, and timestamp2 represents the response timestamp of the TCP packet when the packet loss balance point is reached.

[0084] It should be noted that the beneficial effects of the TCP link network bandwidth estimation system 200 based on the packet loss feedback strategy provided in the above embodiments are the same as those of the TCP link network bandwidth estimation method based on the packet loss feedback strategy, and will not be elaborated here. In addition, when the system provided in the above embodiments implements its functions, only the above division of each functional module is used for illustration. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the system can be divided into different functional modules according to actual situations to complete all or part of the functions described above. In addition, the system and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be seen in the method embodiments, and will not be elaborated here.

[0085] Among them, the TCP link network bandwidth estimation system based on the packet loss feedback strategy of the present invention can be a computer program (including program code) running in a computer device. For example, the TCP link network bandwidth estimation system based on the packet loss feedback strategy of the present invention is an application software, which can be used to execute the corresponding steps in the TCP link network bandwidth estimation method based on the packet loss feedback strategy of the present invention.

[0086] In some embodiments, the TCP link network bandwidth estimation system based on packet loss feedback strategy of the present invention can be implemented in a combination of hardware and software. As an example, the TCP link network bandwidth estimation system based on packet loss feedback strategy of the present invention can be a processor in the form of a hardware decoding processor, which is programmed to execute the TCP link network bandwidth estimation method based on packet loss feedback strategy of the present invention. For example, the processor in the form of a hardware decoding processor can be one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.

[0087] The modules described in the embodiments of this invention can be implemented in software or hardware. The names of the modules are not, in some cases, limiting the scope of the module itself.

[0088] An electronic device according to an embodiment of the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements any of the above-mentioned TCP link network bandwidth estimation methods based on packet loss feedback strategies. That is, an electronic device according to an embodiment of the present invention may include, but is not limited to: a processor and a memory; the memory is used to store the computer program; the processor is used to execute the TCP link network bandwidth estimation method based on packet loss feedback strategies shown in any embodiment of the present invention by calling the computer program.

[0089] In one alternative embodiment, an electronic device is provided, such as Figure 5 As shown, Figure 5 The illustrated electronic device 4000 includes a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, for example, via a bus 4002. Optionally, the electronic device 4000 may further include a transceiver 4004, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 4004 is not limited to one type, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present invention.

[0090] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this invention. Processor 4001 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.

[0091] Bus 4002 may include a path for transmitting information between the aforementioned components. Bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 4002 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 5 The bus 4002 is represented by only one thick line, but this does not mean that there is only one bus or one type of bus.

[0092] The memory 4003 may be ROM (Read Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto.

[0093] The memory 4003 stores application code (computer program) for executing the present invention, and its execution is controlled by the processor 4001. The processor 4001 executes the application code stored in the memory 4003 to implement the content shown in the foregoing method embodiments.

[0094] Among them, electronic devices can also be terminal devices, which can be any device that can install applications, including at least one of smartphones, tablets, laptops, desktop computers, smart speakers, smartwatches, smart TVs, and smart in-vehicle devices.

[0095] It should be noted that, Figure 5 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.

[0096] An embodiment of the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements any of the above-mentioned TCP link network bandwidth estimation methods based on packet loss feedback strategies.

[0097] Alternatively, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, a floppy disk, and an optical data storage device, etc.

[0098] In an exemplary embodiment, a computer program product or computer program is also provided, comprising computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform any of the aforementioned TCP link network bandwidth estimation methods based on a packet loss feedback strategy.

[0099] Computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0100] It should be understood that the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of methods and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0101] The computer-readable storage medium provided in this invention can be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EEPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0102] The aforementioned computer-readable storage medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the method shown in the above embodiments.

[0103] The above description is merely a preferred embodiment of the present invention and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of disclosure in this invention is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-disclosed concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this invention.

[0104] It should be noted that the terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and represent a limitation on a specific order or sequence. Where appropriate, the order of use for similar objects can be interchanged so that the embodiments of this application described herein can be implemented in an order other than that shown or described.

[0105] Those skilled in the art will recognize that this invention can be implemented as a system, method, or computer program product. Therefore, this invention can be specifically implemented in the following forms: it can be entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software, generally referred to herein as a "circuit," "module," or "system." Furthermore, in some embodiments, this invention can also be implemented as a computer program product contained in one or more computer-readable media, which includes computer-readable program code.

[0106] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.

Claims

1. A method for estimating bandwidth of TCP link network based on packet loss feedback strategy, characterized in that, Comprise: S1, when the client and server establish TCP connection, based on the number of packets n, control the client to send n length len TCP message to the server at a time; S2, get the actual packet number m from the server, and get the sending timestamp and response timestamp corresponding to this message sending from the client; S3, according to the comparison result of the actual packet number m and the packet number n, iteratively adjust the packet number n and return to execute S1 until the packet loss balance point is reached; wherein, the packet loss balance point is: the maximum packet number found so that m=n; S4, when the packet loss balance point is reached, according to the packet number corresponding to the packet loss balance point, the message length len, and the sending timestamp and response timestamp of the TCP message obtained this time, the TCP link bandwidth between the client and the server is calculated.

2. The method of claim 1, wherein, Initial packet sending quantity n 初始 The initial value is calculated by an initial value calculation formula: n 初始 = α × last_num + (1 - α) × hist_num; wherein last_num represents a packet sending quantity reference value corresponding to a last time when the speed reaches the packet loss balance point, hist_num represents a packet sending quantity corresponding to a speed history experience value of the TCP link at the same time based on historical data, and α is a weighting coefficient.

3. The method of claim 2, wherein the method further comprises: Also include: By counting the TCP link bandwidth estimation value of the same time within a preset number of days before the current time of the TCP link, and converting the TCP link bandwidth estimation value into the corresponding packet number, and then through the weighted average or time series prediction model, the packet number corresponding to the speed measurement historical experience value hist_num is calculated.

4. The method of any one of claims 1 to 3, wherein, According to the comparison result of the actual packet number m and the packet number n, iteratively adjust the packet number n and return to execute S1 until the packet loss balance point is reached, including: If m < n, reduce the packet number n, if m = n, increase the packet number n; wherein, the step length step is a dynamic value, which satisfies step = β × n, β is the step length coefficient, and the value range of β is [0.05, 0.5], in the continuous iteration process, when the first actual packet number m is less than the packet number n, the packet number n used in the previous iteration and satisfying m = n is determined as the maximum packet number, that is, the packet loss balance point is reached.

5. The method of claim 1 to 3, wherein, When the packet loss balance point is reached, according to the packet number corresponding to the packet loss balance point, the message length len, and the sending timestamp and response timestamp of the TCP message obtained this time, the TCP link bandwidth between the client and the server is calculated, including: When the packet loss balance point is reached, the TCP link bandwidth between the client and the server is calculated by the TCP link bandwidth calculation formula, the TCP link bandwidth calculation formula is: R = (N × len) / (timestamp2-timestamp1), N represents the packet number corresponding to the packet loss balance point, R represents: the TCP link bandwidth between the client and the server, timestamp1 represents: the sending timestamp of the TCP message when the packet loss balance point is reached, timestamp2 represents: the response timestamp of the TCP message when the packet loss balance point is reached.

6. A system for estimating bandwidth of a TCP link network based on a packet loss feedback strategy, the system comprising: a packet loss estimator configured to estimate a packet loss rate of the TCP link network; a bandwidth estimator configured to estimate a bandwidth of the TCP link network based on the estimated packet loss rate. Including control sending module, feedback acquisition module, iterative adjustment module and link bandwidth determination module; The control sending module is configured to, after the client establishes a TCP connection with the server, control the client to send n TCP packets with a length of len to the server at one time based on a packet sending number n; The feedback obtaining module is configured to obtain an actual packet receiving number m from the server and obtain a sending timestamp and a response timestamp corresponding to the packet sending from the client; The iterative adjustment module is configured to, according to a comparison result of the actual packet receiving number m and the packet sending number n, iteratively adjust the packet sending number n and re-call the control sending module and the feedback obtaining module until a packet loss balance point is reached; wherein the packet loss balance point is a maximum packet sending number m=n that has been found. The link bandwidth determination module is configured to, when the packet loss balance point is reached, calculate a TCP link bandwidth between the client and the server according to a packet sending number corresponding to the packet loss balance point, a packet length len, and the sending timestamp and the response timestamp of the TCP packet obtained this time.

7. The system of claim 6, wherein the system further comprises: a packet loss estimator configured to estimate the packet loss rate based on the number of packets sent and the number of packets received. Initial packet sending quantity n 初始 The initial value is calculated by an initial value calculation formula: n 初始 = α × last_num + (1 - α) × hist_num; wherein last_num represents a packet sending quantity reference value corresponding to a last time when the speed reaches the packet loss balance point, hist_num represents a packet sending quantity corresponding to a speed history experience value of the TCP link at the same time based on historical data, and α is a weighting coefficient.

8. The system of claim 7, wherein, Further comprising an obtaining module, the obtaining module is configured to: The TCP link bandwidth estimation value at the same time of the current time within a preset number of days before the current time is counted, and the TCP link bandwidth estimation value is converted into a corresponding packet sending number, and then a weighted average or a time series prediction model is used to calculate a packet sending number hist_num corresponding to the speed measurement historical experience value.

9. An electronic device, comprising: The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the TCP link network bandwidth estimation method based on the packet loss feedback strategy in any one of claims 1 to 5.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the TCP link network bandwidth estimation method based on the packet loss feedback strategy in any one of claims 1 to 5.