Congestion control method, device, electronic device and storage medium
By multiplexing the client's historical congestion control information in the network connection for congestion control, the problem of bandwidth wasted before reaching the maximum data transmission rate is solved, achieving higher bandwidth utilization and faster data transmission speed.
Patent Information
- Application Number
- CN202211175281.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-26
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2042-09-26
AI Technical Summary
Prior art causes greater bandwidth waste before obtaining the maximum data transmission rate.
By receiving the client's connection request, the historical congestion control information is searched based on the client's identification information, and the congestion control is performed based on the historical information for a period of time after the connection is established.
Reduces time-consuming in the start phase of congestion control, reduces bandwidth waste before reaching the maximum data transmission rate, and improves bandwidth utilization.
Smart Images

Figure CN115643213B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and more specifically, to a congestion control method, device, electronic device, and storage medium. Background Art
[0002] In order to improve bandwidth utilization and fully utilize bandwidth, the congestion control algorithm can obtain parameters from the external network environment, and use the obtained parameters to calculate and adjust the data transmission rate until the maximum data transmission rate is obtained. For example, for the algorithm based on the delay-bandwidth product (Bottleneck Bandwidth and RTT, BBR), before the data transmission rate of the data sender reaches the maximum data transmission rate, it is necessary to collect parameters such as the minimum round-trip time (RTT) of multiple time windows, and then use the collected minimum RTT and other parameters to calculate and adjust the data transmission rate.
[0003] However, the process of obtaining parameters from the external network environment takes a certain amount of time, that is, the process of obtaining the maximum data transmission rate takes a certain amount of time. Before the maximum data transmission rate is obtained, since the data transmission rate has not reached the maximum value, a large bandwidth waste will be caused. Summary of the invention
[0004] The present disclosure provides a congestion control method, device, electronic device and storage medium to at least solve the problem in the above-mentioned related technologies that a large bandwidth waste may be caused before the maximum data transmission rate is obtained.
[0005] According to a first aspect of an embodiment of the present disclosure, a congestion control method is provided, comprising: receiving a connection request sent by a client, wherein the connection request includes identification information of the client; establishing a connection with the client based on the identification information of the client, and searching for historical congestion control information corresponding to the identification information of the client, wherein the historical congestion control information is information for performing congestion control on a historical connection, and the historical connection is a connection established before receiving the connection request; in a case where the historical congestion control information corresponding to the identification information of the client is found, performing congestion control on the connection based on the historical congestion control information within a preset time interval after the connection is established.
[0006] Optionally, the historical congestion control information includes a historical data sending rate and a historical bandwidth-delay product; performing congestion control on the connection based on the historical congestion control information includes: determining a congestion window according to the product of the historical bandwidth-delay product and a preset congestion window gain; and sending the data contained in the congestion window in the data queue to the client at the historical data sending rate.
[0007] Optionally, after the step of performing congestion control on the connection based on the historical congestion control information, the congestion control method further includes: acquiring congestion control information of the connection in real time after the preset time interval; and performing congestion control on the connection based on the congestion control information acquired in real time.
[0008] Optionally, the congestion control method also includes: if no historical congestion control information corresponding to the identification information of the client is found, acquiring in real time congestion control information after the connection is established; performing congestion control on the connection based on the congestion control information acquired in real time after the connection is established; and storing the congestion control information acquired within a preset time interval after the connection is established as the historical congestion control information corresponding to the identification information of the client.
[0009] Optionally, the congestion control method further includes: when the connection is released, resetting the survival time of the historical congestion control information to zero, wherein the survival time indicates the duration for which the historical congestion control information has currently existed; and clearing the historical congestion control information whose survival time reaches a preset time.
[0010] Optionally, the congestion control method also includes: moving the historical congestion control information to the starting position of a historical congestion control information storage queue, wherein the later the arrangement position of the historical congestion control information in the historical congestion control information storage queue is, the higher the deletion priority of the historical congestion control information; when the number of historical congestion control information in the historical congestion control information storage queue reaches a preset threshold, deleting the historical congestion control information arranged at the end of the historical congestion control information storage queue.
[0011] Optionally, the identification information of the client includes the IP address of the client and the port number of the target port of the client.
[0012] According to a second aspect of an embodiment of the present disclosure, a congestion control device is provided, comprising: a receiving module, configured to receive a connection request sent by a client, wherein the connection request includes identification information of the client; a searching module, configured to establish a connection with the client based on the identification information of the client, and to search for historical congestion control information corresponding to the identification information of the client, wherein the historical congestion control information is information for performing congestion control on a historical connection, and the historical connection is a connection established before receiving the connection request; a first executing module, configured to, when the historical congestion control information corresponding to the identification information of the client is found, perform congestion control on the connection based on the historical congestion control information within a preset time interval after the connection is established.
[0013] Optionally, the historical congestion control information includes a historical data sending rate and a historical bandwidth-delay product; the first execution module is configured to: determine the congestion window based on the product of the historical bandwidth-delay product and a preset congestion window gain; and send the data contained in the congestion window in the data queue to the client at the historical data sending rate.
[0014] Optionally, the congestion control device further includes: a first acquisition module, configured to acquire congestion control information of the connection in real time after the preset time interval; and a second execution module, configured to perform congestion control on the connection based on the congestion control information acquired in real time.
[0015] Optionally, the congestion control device also includes: a second acquisition module, configured to acquire in real time the congestion control information after the connection is established if no historical congestion control information corresponding to the identification information of the client is found; a third execution module, configured to perform congestion control on the connection based on the congestion control information acquired in real time after the connection is established; and a storage module, configured to store the congestion control information acquired within a preset time interval after the connection is established as the historical congestion control information corresponding to the identification information of the client.
[0016] Optionally, the congestion control device also includes: a zeroing module, configured to reset the survival time of the historical congestion control information to zero when the connection is released, wherein the survival time indicates the duration for which the historical congestion control information has currently existed; and a clearing module, configured to clear the historical congestion control information whose survival time reaches a preset time.
[0017] Optionally, the congestion control device also includes: a moving module, configured to move the historical congestion control information to the starting position of a historical congestion control information storage queue, wherein the later the arrangement position of the historical congestion control information in the historical congestion control information storage queue is, the higher the deletion priority of the historical congestion control information; and a deleting module, configured to delete the historical congestion control information arranged at the end of the historical congestion control information storage queue when the number of historical congestion control information in the historical congestion control information storage queue reaches a preset threshold.
[0018] Optionally, the identification information of the client includes the IP address of the client and the port number of the target port of the client.
[0019] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement a congestion control method according to the present disclosure.
[0020] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the congestion control method according to the present disclosure.
[0021] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the congestion control method according to the present disclosure is implemented.
[0022] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:
[0023] When receiving a connection request from a client, congestion control can be performed on the connection based on historical congestion control information, without obtaining parameters from the external network environment to calculate and adjust the data transmission rate. By reusing historical congestion control information to perform congestion control, this connection can use a higher data transmission rate to send data at the beginning of data transmission, reducing the time it takes for this connection to reach the maximum data transmission rate, that is, it can reduce the time it takes to start congestion control, and can reduce the bandwidth waste before this connection reaches the maximum data transmission rate.
[0024] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0026] Figure 1 is a flow chart illustrating a congestion control method according to an exemplary embodiment of the present disclosure;
[0027] Figure 2 is a flowchart showing a specific implementation of a congestion control method according to an exemplary embodiment of the present disclosure;
[0028] Figure 3 is a block diagram illustrating a congestion control apparatus according to an exemplary embodiment of the present disclosure;
[0029] Figure 4 is a block diagram illustrating an electronic device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0030] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.
[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The implementation methods described in the following examples do not represent all implementation methods consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the attached claims.
[0032] It should be noted that the phrase "at least one of the items" in the present disclosure includes three types of parallel situations: "any one of the items", "a combination of any number of the items", and "all of the items". For example, "including at least one of A and B" includes the following three parallel situations: (1) including A; (2) including B; (3) including A and B. Another example is "executing at least one of step 1 and step 2" which means the following three parallel situations: (1) executing step 1; (2) executing step 2; (3) executing step 1 and step 2.
[0033] At present, kernel-mode and user-mode network transmission protocols such as Quick UDP Internet Connections (QUIC) and Transmission Control Protocol (TCP) use congestion control algorithms to improve network transmission performance. Widely used congestion control algorithms such as Cubic and BBR obtain information from the external network environment, and then use the obtained information to gradually and reasonably increase the data transmission rate until the data transmission rate reaches a higher bandwidth utilization level. That is, the congestion control algorithm needs to go through a long startup phase, during which the congestion control algorithm will obtain some network status-related parameters, such as minimum RTT, packet loss rate, and the number of explicit congestion notifications (ECN). Then, the congestion control algorithm can control the size of the congestion window and adjust the data transmission rate according to a certain mapping of the obtained parameters.
[0034] Among them, network applications that rely on network transmission protocols such as TCP and QUIC often request less data in a single connection, for example, only requesting one picture, or only requesting one video segment, etc. In this scenario, the traffic transmitted on a single connection through network transmission protocols such as TCP and QUIC is not normalized, but bursty.
[0035] The congestion control algorithm BBR can include BBRv1 and BBRv2. Both BBRv1 and BBRv2 calculate the current data transmission rate and transmission gain coefficient by collecting the minimum RTT and maximum bandwidth in the time window. The data sender using the BBR congestion control algorithm for congestion control must collect the minimum RTT and maximum bandwidth of multiple time windows before reaching a reasonable and maximum data transmission rate. During this process, the data transmission rate gradually increases to the reasonable maximum data transmission rate to achieve the maximum bandwidth utilization. At this time, it takes a certain amount of time for the data sender using the BBR congestion control algorithm to reach the data transmission rate with the optimal bandwidth utilization. Before the maximum data transmission rate is obtained, the data transmission rate has not reached the maximum value, which will cause a large waste of bandwidth.
[0036] Furthermore, the types of connections can be divided into long connections and short connections. In a single long connection, the sender using QUIC and TCP protocols for data transmission can go through multiple stages of the congestion control algorithm. At this time, all stages except the startup stage in the congestion control algorithm can function normally and play a role in congestion control. The data transmission rate of the connection can reach a reasonable maximum value, and the bandwidth can be fully utilized. In a short connection, the sender using QUIC and TCP protocols for data transmission only sends a small amount of data before the connection is closed, and the congestion control algorithm only goes through the startup stage. At this time, the short connection that has only gone through the startup stage of the congestion control algorithm does not reach a reasonable maximum value when transmitting data, the bandwidth is not fully utilized, and it takes a long time to complete all data transmission. For example, in the short video and picture transmission scenario, a single connection only transmits a small short video fragment or only transmits less picture data. When the data transmission ends and the connection is closed, the maximum data transmission rate and the optimal bandwidth utilization are still not reached, which will cause a large waste of bandwidth.
[0037] In order to solve the problem in the related art that a large amount of bandwidth is wasted before the maximum data transmission rate is obtained, the congestion control method proposed in the present disclosure can perform congestion control on the connection based on historical congestion control information when receiving a connection request sent by the client, without obtaining parameters from the external network environment to calculate and adjust the data transmission rate. By reusing the historical congestion control information to perform congestion control, the current connection can use a higher data transmission rate to send data at the beginning of data transmission, reducing the time it takes for the current connection to reach the maximum data transmission rate, that is, reducing the time it takes for the congestion control startup phase, and reducing the bandwidth waste before the current connection reaches the maximum data transmission rate.
[0038] Figure 1 is a flowchart illustrating a congestion control method according to an exemplary embodiment of the present disclosure.
[0039] Reference Figure 1 In step 101, a connection request sent by a client may be received. The connection request may include identification information of the client. For example, a server may receive a connection request sent by a client, and the connection request is used to request the server to establish a connection and request to obtain data resources. The data resources may be multimedia resources, text resources, etc., and the present disclosure does not specifically limit this.
[0040] According to an exemplary embodiment of the present disclosure, the identification information of the client may include the IP address of the client and the port number of the target port of the client, that is, the present disclosure uses the tuple of the IP address of the client and the port number of the client to identify each client.
[0041] In step 102, a connection can be established with the client based on the identification information of the client, and historical congestion control information corresponding to the identification information of the client can be searched. The historical congestion control information is information used to perform congestion control on historical connections, and the historical connection is a connection established before receiving the above connection request. That is, a connection can be established with the client based on the IP address of the client and the port number of the target port of the client, and historical congestion control information corresponding to the IP address of the client and the port number of the target port of the client can be searched in the memory, wherein the historical congestion control information can be the congestion control information obtained by the port of the client in the startup phase (startup) of the previous connection process of this connection. The congestion control information can include, but is not limited to, data transmission rate (pacingrate) and bandwidth-delay product (Bandwidth-Delay Product, BDP), and congestion control can be performed on the connection based on the data transmission rate and bandwidth-delay product.
[0042] In step 103, when the historical congestion control information corresponding to the identification information of the client is found, congestion control may be performed on the connection based on the historical congestion control information within a preset time interval after the connection is established.
[0043] It should be noted that the performance of each of the multiple ports included in the client is relatively stable, and there will be no large performance fluctuations within a certain time range. Therefore, the network environment of multiple connections with the same client identification information is approximately the same, that is, the data transmission rates of multiple connections with the same client identification information are of reference significance. At this time, the historical congestion control information can be reused to perform congestion control for this connection. Among them, the identification information of the client corresponding to the historical congestion control information is the same as the identification information of the client of this connection. In this way, this connection can use a higher data transmission rate to send data at the beginning of data transmission, reducing the time consumed by this connection to reach the maximum data transmission rate, that is, the time consumed in the congestion control startup phase can be reduced, and the bandwidth waste before this connection reaches the maximum data transmission rate can be reduced, and the bandwidth utilization rate of the connection in the congestion control startup phase can be improved.
[0044] According to an exemplary embodiment of the present disclosure, historical congestion control information may include, but is not limited to, historical data transmission rate and historical bandwidth-delay product. The congestion window can be determined based on the product of the historical bandwidth-delay product and the preset congestion window gain, that is, the product of the historical bandwidth-delay product and the preset congestion window gain can be calculated to obtain the congestion window (congestion window, cwnd) size, wherein the minimum congestion window size can be 4. The preset congestion window gain is a pre-set gain coefficient, which can be a constant. Next, the data contained in the congestion window in the data queue can be sent to the client according to the historical data transmission rate. In this way, based on the historical data transmission rate and the congestion window, the data contained in the data queue can be smoothly sent to the network to avoid the phenomenon of bursting all data to the network at one time, causing network congestion.
[0045] It should be noted that the data fed back by the server to the client is generally in the form of a data queue, which contains multiple data. The congestion window is a sliding window on the data queue, which is used to limit the sending of data in the data queue. For example, assuming that the congestion window size is 10, the first 5 data in the congestion window have been sent out. If these 5 data are successfully received by the client, that is, if the server receives 5 response signals corresponding to the 5 data returned by the client, then the last 5 data in the congestion window can continue to be sent out. Alternatively, assuming that all 10 data in the congestion window have been sent out, but the server has not received any response signal for the sent data, then the subsequent data in the data queue cannot be sent at this time.
[0046] According to an exemplary embodiment of the present disclosure, after a preset time interval has passed, historical congestion control information may no longer be used, but congestion control information of a connection may be acquired in real time, and congestion control may be performed on the connection based on the congestion control information acquired in real time.
[0047] It should be noted that congestion control generally includes four stages, the first stage being the startup stage. In the startup stage, if historical congestion control information is found, congestion control can be performed on the startup stage of this connection based on the historical congestion control information found. After a preset time interval, the startup stage ends, and congestion control enters the subsequent stage. At this time, congestion control can be performed on the subsequent stages of this connection except the startup stage based on the congestion control information obtained in real time. For example, in the subsequent stages of this connection except the startup stage, the minimum round-trip time and bottleneck bandwidth can be obtained in real time, and then congestion control can be performed on the subsequent stages of this connection based on the obtained minimum round-trip time and bottleneck bandwidth.
[0048] According to an exemplary embodiment of the present disclosure, when no historical congestion control information corresponding to the identification information of the client is found, congestion control information after the connection is established can be obtained in real time. Then, congestion control can be performed on the connection based on the congestion control information obtained in real time after the connection is established.
[0049] For example, when no historical congestion control information corresponding to the client's identification information is found, the minimum round-trip time corresponding to this connection can be obtained, and the bottleneck bandwidth corresponding to this connection can also be obtained, and then congestion control can be performed on this connection based on the obtained minimum round-trip time and bottleneck bandwidth.
[0050] Furthermore, the data transmission rate can be calculated based on the obtained bottleneck bandwidth. The data transmission rate is the product of the bottleneck bandwidth and the preset data transmission rate gain, and the preset data transmission rate gain is predefined and can be a constant. The congestion window size can also be calculated based on the obtained bottleneck bandwidth and the minimum round-trip time. The congestion window size is the product of the bottleneck bandwidth, the minimum round-trip time and the preset congestion window gain, and the preset congestion window gain can be a constant. Next, congestion control can be performed on this connection based on the calculated data transmission rate and congestion window size.
[0051] It should be noted that when obtaining the minimum round-trip time corresponding to this connection, multiple resource data packets can be continuously sent to the client, wherein the data volumes of the multiple resource data packets may be different from each other. For example, some resource data packets have a larger data volume and may contain more bytes, while some resource data packets have a smaller data volume and may contain fewer bytes. Then, multiple round-trip times corresponding to the multiple resource data packets can be obtained. The round-trip time is the duration from sending the resource data packet to the client until receiving the response signal of the resource data packet returned by the client. Next, the smallest round-trip time among the multiple round-trip times can be found as the minimum round-trip time corresponding to this connection.
[0052] Furthermore, when obtaining the bottleneck bandwidth corresponding to this connection, for each resource data packet in the multiple resource data packets, the ratio of the data volume of the resource data packet to the round-trip time corresponding to the resource data packet can be calculated to obtain the instantaneous bandwidth corresponding to the resource data packet, that is, the instantaneous bandwidth corresponding to each resource data packet can be calculated using the following formula:
[0053]
[0054] Among them, deliveryRate is the instant bandwidth corresponding to each resource data packet, delivered_delta is the data volume corresponding to the resource data packet, that is, the data volume of the resource data packet that has been confirmed by the client from the last instant bandwidth sampling to the current instant bandwidth sampling, and delivered_interval is the round-trip time corresponding to the resource data packet, that is, the time from the last instant bandwidth sampling to the current instant bandwidth sampling.
[0055] Then, the maximum instant bandwidth among the multiple instant bandwidths corresponding to the multiple resource data packets may be selected as the bottleneck bandwidth corresponding to the current connection.
[0056] Furthermore, congestion control information obtained within a preset time interval after the connection is established can also be stored as historical congestion control information corresponding to the identification information of the client. For example, the minimum round-trip time, data transmission rate, and bandwidth-delay product calculated at the startup phase of this connection can be stored as historical congestion control information corresponding to the identification information of the client, and the historical congestion control information and the identification information of the client of this connection are stored in the memory in correspondence. Among them, the product of the bottleneck bandwidth and the minimum round-trip time is called the bandwidth-delay product.
[0057] As mentioned above, the network environments of multiple connections with the same client identification information are approximately the same. Therefore, the data sending rates of multiple connections with the same client identification information are of reference significance to each other. Therefore, the congestion control information obtained in this connection can be stored in the memory corresponding to the identification information of the client of this connection, so that when a connection request is subsequently received from a client whose corresponding client identification information is the same as the identification information of the client of this connection, the historical congestion control information corresponding to the identification information of the client in the memory can be reused to perform congestion control, so that the new connection can use a higher data sending rate to send data at the beginning of data transmission, reducing the time for the new connection to reach the maximum data sending rate, that is, the time spent in the congestion control startup phase can be reduced, and the bandwidth waste before the new connection reaches the maximum data sending rate can be reduced, thereby improving the bandwidth utilization of the new connection in the congestion control startup phase.
[0058] According to an exemplary embodiment of the present disclosure, when the connection is released, the survival time of the historical congestion control information found can be reset to zero, wherein the survival time indicates the duration of the current existence of the historical congestion control information.
[0059] For example, assuming that the maximum survival time of congestion control information in the server's memory is 20 minutes, and the survival time of a piece of historical congestion control information is 5 minutes, that is, the current survival time of the piece of historical congestion control information in the memory is 5 minutes, and its remaining survival time in the memory is 15 minutes. If the piece of historical congestion control information is reused in the calculation process of the congestion window size and data transmission rate in the startup phase of the congestion control algorithm of the newly established connection, the survival time of the piece of historical congestion control information will be reset to zero, that is, the remaining survival time of the piece of historical congestion control information will be changed from the original 15 minutes to 20 minutes.
[0060] In this way, if a piece of historical congestion control information is reused, then the piece of historical congestion control information is likely to be reused multiple times in the future. Therefore, the survival time of the piece of historical congestion control information can be reset to zero, that is, the survival time of the piece of historical congestion control information can be reset, which is equivalent to extending the survival time of the piece of historical congestion control information in the memory, so that when the piece of historical congestion control information needs to be reused in the future, the piece of historical congestion control information can be found in the memory.
[0061] Furthermore, the historical congestion control information whose survival time has reached a preset time can be cleared, that is, the historical congestion control information whose survival time has reached a maximum survival time can be cleared. In this way, if the survival time of a certain historical congestion control information has reached the maximum survival time, it means that the historical congestion control information has not been reused in this process, and the probability of the historical congestion control information being reused in the subsequent process may not be great. Therefore, the historical congestion control information whose survival time has reached the maximum survival time can be deleted, that is, the historical congestion control information with a low probability of being reused can be cleared, so as to avoid excessive memory consumption by redundant historical congestion control information. In addition, clearing out useless historical congestion control information can also greatly reduce the amount of historical congestion control information stored in the memory, and can reduce the time overhead of searching for historical congestion control information with a high probability of being reused.
[0062] According to an exemplary embodiment of the present disclosure, the historical congestion control information may be moved to the starting position of the historical congestion control information storage queue. The later the historical congestion control information is arranged in the historical congestion control information storage queue, the higher the deletion priority of the historical congestion control information.
[0063] It should be noted that if a piece of historical congestion control information is reused, then the piece of historical congestion control information is likely to be reused multiple times subsequently. Therefore, the piece of historical congestion control information can be moved to the head of the historical congestion control information storage queue, that is, at this time, the historical congestion control information is more likely to be retained; and the historical congestion control information at the back of the historical congestion control information storage queue is less reused or not reused historical congestion control information. Therefore, compared with the historical congestion control information at the front of the historical congestion control information storage queue, that is, compared with the historical congestion control information that is reused more times, the historical congestion control information at the back of the historical congestion control information storage queue has a higher deletion priority, that is, it is more likely to discard the historical congestion control information that is less reused or not reused.
[0064] Furthermore, when the number of historical congestion control information in the historical congestion control information storage queue reaches a preset threshold, the historical congestion control information arranged at the end of the historical congestion control information storage queue can be deleted, that is, the historical congestion control information that is less reused or not reused can be deleted. Among them, the above-mentioned preset threshold can be 100,000. In this way, it can be ensured that when a new connection is established, the historical congestion control information that is compatible with the new connection can be reused as much as possible, and it can also avoid storing too much useless historical congestion control information in the memory of the server, and avoid excessive memory consumption by redundant historical congestion control information. In addition, clearing out useless historical congestion control information can also greatly reduce the number of historical congestion control information stored in the memory, and can reduce the time overhead of searching for historical congestion control information with a high probability of being reused.
[0065] Next, we will refer to Figure 2 The specific implementation process of the congestion control method according to the exemplary embodiment of the present disclosure is described in detail.
[0066] Reference Figure 2 In step 201, a connection request sent by a client is received. The connection request may include identification information of the client, and the identification information of the client may include an IP address of the client and a port number of a target port of the client.
[0067] In step 202, a connection is established with the client based on the identification information of the client.
[0068] In step 203, it is checked whether there is historical congestion control information corresponding to the identification information of the client in the memory of the server.
[0069] In step 204, when the historical congestion control information corresponding to the identification information of the client of the current connection is found, congestion control is performed on the current connection based on the found historical congestion control information within a preset time interval for establishing the current connection. In the case that the historical congestion control information corresponding to the identification information of the client is not found, or after a preset time interval for performing congestion control on the current connection based on the found historical congestion control information, step 205 is performed.
[0070] In step 205, the minimum round-trip time and the bottleneck bandwidth are obtained, and the data transmission rate, the congestion window size and the bandwidth-delay product are calculated based on the obtained minimum round-trip time and the bottleneck bandwidth, and the data in the congestion window of the calculated congestion window size is sent to the client according to the calculated data transmission rate.
[0071] In step 206, the congestion control information in the memory of the server is updated. The "update" may include two aspects: if the historical congestion control information corresponding to the identification information of the client of this connection is found in the memory of the server, the survival time of the historical congestion control information found is reset to zero, or the historical congestion control information found is moved to the head of the historical congestion control information storage queue; if the historical congestion control information corresponding to the identification information of the client of this connection is not found in the memory of the server, the parameters such as the data transmission rate, bandwidth delay product and minimum round-trip time calculated within the preset time interval after the establishment of this connection are stored in the memory of the server in correspondence with the identification information of the client of this connection.
[0072] In step 207, the current connection is released.
[0073] Figure 3 is a block diagram illustrating a congestion control apparatus according to an exemplary embodiment of the present disclosure.
[0074] Reference Figure 3 The device 300 may include a receiving module 301, a searching module 302 and a first executing module 303.
[0075] The receiving module 301 may receive a connection request sent by a client. The connection request may include identification information of the client. For example, a server may receive a connection request sent by a client, and the connection request is used to request the server to establish a connection and request to obtain data resources. The data resources may be multimedia resources, text resources, etc., and the present disclosure does not specifically limit this.
[0076] According to an exemplary embodiment of the present disclosure, the identification information of the client may include the IP address of the client and the port number of the target port of the client, that is, the present disclosure uses the tuple of the IP address of the client and the port number of the client to identify each client.
[0077] The search module 302 can establish a connection with the client based on the identification information of the client, and search for historical congestion control information corresponding to the identification information of the client. The historical congestion control information is information used to perform congestion control on historical connections, and the historical connection is a connection established before receiving the above connection request. That is, a connection can be established with the client based on the IP address of the client and the port number of the target port of the client, and the historical congestion control information corresponding to the IP address of the client and the port number of the target port of the client can be searched in the memory, wherein the historical congestion control information can be the congestion control information obtained by the port of the client in the startup phase (startup) of the previous connection process of this connection. The congestion control information can include, but is not limited to, the data transmission rate and the bandwidth-delay product, and congestion control can be performed on the connection based on the data transmission rate and the bandwidth-delay product.
[0078] When the first execution module 303 finds the historical congestion control information corresponding to the identification information of the client, it can perform congestion control on the connection based on the historical congestion control information within a preset time interval after the connection is established.
[0079] It should be noted that the performance of each of the multiple ports included in the client is relatively stable, and there will be no large performance fluctuations within a certain time range. Therefore, the network environment of multiple connections with the same client identification information is approximately the same, that is, the data transmission rates of multiple connections with the same client identification information are of reference significance. At this time, the historical congestion control information can be reused to perform congestion control for this connection. Among them, the identification information of the client corresponding to the historical congestion control information is the same as the identification information of the client of this connection. In this way, this connection can use a higher data transmission rate to send data at the beginning of data transmission, reducing the time consumed by this connection to reach the maximum data transmission rate, that is, the time consumed in the congestion control startup phase can be reduced, and the bandwidth waste before this connection reaches the maximum data transmission rate can be reduced, and the bandwidth utilization rate of the connection in the congestion control startup phase can be improved.
[0080] According to an exemplary embodiment of the present disclosure, historical congestion control information may include, but is not limited to, historical data transmission rate and historical bandwidth-delay product. The first execution module 303 may determine the congestion window according to the product of the historical bandwidth-delay product and the preset congestion window gain, that is, the product of the historical bandwidth-delay product and the preset congestion window gain may be calculated to obtain the congestion window size, wherein the minimum congestion window size may be 4. The preset congestion window gain is a pre-set gain coefficient, which may be a constant. Next, the data contained in the congestion window in the data queue may be sent to the client at the historical data transmission rate. In this way, the data contained in the data queue may be smoothly sent to the network based on the historical data transmission rate and the congestion window, avoiding the phenomenon that all data is burst to the network at one time, causing network congestion.
[0081] According to an exemplary embodiment of the present disclosure, the congestion control device 300 may further include a first acquisition module and a second execution module. After a preset time interval, the historical congestion control information may no longer be used, the first acquisition module may acquire the congestion control information of the connection in real time, and the second execution module may perform congestion control on the connection based on the congestion control information acquired in real time.
[0082] It should be noted that congestion control generally includes four stages, the first stage being the startup stage. In the startup stage, if historical congestion control information is found, congestion control can be performed on the startup stage of this connection based on the historical congestion control information found. After a preset time interval, the startup stage ends, and congestion control enters the subsequent stage. At this time, congestion control can be performed on the subsequent stages of this connection except the startup stage based on the congestion control information obtained in real time. For example, in the subsequent stages of this connection except the startup stage, the minimum round-trip time and bottleneck bandwidth can be obtained in real time, and then congestion control can be performed on the subsequent stages of this connection based on the obtained minimum round-trip time and bottleneck bandwidth.
[0083] According to an exemplary embodiment of the present disclosure, the congestion control device 300 may further include a second acquisition module, a third execution module and a storage module. In the case where the historical congestion control information corresponding to the identification information of the client is not found, the second acquisition module may acquire the congestion control information after the connection is established in real time. Then, the third execution module may perform congestion control on the connection based on the congestion control information acquired in real time after the connection is established.
[0084] Furthermore, the storage module can also store the congestion control information obtained within a preset time interval after the connection is established as the historical congestion control information corresponding to the identification information of the client. For example, the minimum round-trip time, data transmission rate and bandwidth-delay product calculated at the startup phase of this connection can be stored as the historical congestion control information corresponding to the identification information of the client, and the historical congestion control information and the identification information of the client of this connection are stored in the memory in correspondence. Among them, the product of the bottleneck bandwidth and the minimum round-trip time is called the bandwidth-delay product.
[0085] As mentioned above, the network environments of multiple connections with the same client identification information are approximately the same. Therefore, the data sending rates of multiple connections with the same client identification information are of reference significance to each other. Therefore, the congestion control information obtained in this connection can be stored in the memory corresponding to the identification information of the client of this connection, so that when a connection request is subsequently received from a client whose corresponding client identification information is the same as the identification information of the client of this connection, the historical congestion control information corresponding to the identification information of the client in the memory can be reused to perform congestion control, so that the new connection can use a higher data sending rate to send data at the beginning of data transmission, reducing the time for the new connection to reach the maximum data sending rate, that is, the time spent in the congestion control startup phase can be reduced, and the bandwidth waste before the new connection reaches the maximum data sending rate can be reduced, thereby improving the bandwidth utilization of the new connection in the congestion control startup phase.
[0086] According to an exemplary embodiment of the present disclosure, the congestion control device 300 may further include a zeroing module and a clearing module. When the connection is released, the zeroing module may reset the survival time of the historical congestion control information found to zero. The survival time indicates the duration of the current existence of the historical congestion control information.
[0087] In this way, if a piece of historical congestion control information is reused, then the piece of historical congestion control information is likely to be reused multiple times in the future. Therefore, the survival time of the piece of historical congestion control information can be reset to zero, that is, the survival time of the piece of historical congestion control information can be reset, which is equivalent to extending the survival time of the piece of historical congestion control information in the memory, so that when the piece of historical congestion control information needs to be reused in the future, the piece of historical congestion control information can be found in the memory.
[0088] Furthermore, the clearing module can clear the historical congestion control information whose survival time has reached a preset time, that is, the historical congestion control information whose survival time has reached a maximum survival time can be cleared. In this way, if the survival time of a certain historical congestion control information has reached the maximum survival time, it means that the historical congestion control information has not been reused in this process, and the probability of the historical congestion control information being reused in the subsequent process may not be large. Therefore, the historical congestion control information whose survival time has reached the maximum survival time can be deleted, that is, the historical congestion control information with a low probability of being reused can be cleared, so as to avoid excessive memory consumption by redundant historical congestion control information. In addition, clearing out useless historical congestion control information can also greatly reduce the amount of historical congestion control information stored in the memory, and can reduce the time overhead of searching for historical congestion control information with a high probability of being reused.
[0089] According to an exemplary embodiment of the present disclosure, the congestion control device 300 may further include a moving module and a deleting module. The moving module may move the historical congestion control information to the starting position of the historical congestion control information storage queue. The later the arrangement position of the historical congestion control information in the historical congestion control information storage queue is, the higher the deletion priority of the historical congestion control information is.
[0090] It should be noted that if a piece of historical congestion control information is reused, then the piece of historical congestion control information is likely to be reused multiple times subsequently. Therefore, the piece of historical congestion control information can be moved to the head of the historical congestion control information storage queue, that is, at this time, the historical congestion control information is more likely to be retained; and the historical congestion control information at the back of the historical congestion control information storage queue is less reused or not reused historical congestion control information. Therefore, compared with the historical congestion control information at the front of the historical congestion control information storage queue, that is, compared with the historical congestion control information that is reused more times, the historical congestion control information at the back of the historical congestion control information storage queue has a higher deletion priority, that is, it is more likely to discard the historical congestion control information that is less reused or not reused.
[0091] Furthermore, when the number of historical congestion control information in the historical congestion control information storage queue reaches a preset threshold, the deletion module can delete the historical congestion control information arranged at the end of the historical congestion control information storage queue, that is, the historical congestion control information that is less reused or not reused can be deleted. Among them, the above-mentioned preset threshold can be 100,000. In this way, it can be ensured that when a new connection is established, the historical congestion control information that is compatible with the new connection can be reused as much as possible, and it can also avoid storing too much useless historical congestion control information in the memory of the server, and avoid excessive memory consumption by redundant historical congestion control information. In addition, clearing out useless historical congestion control information can also greatly reduce the number of historical congestion control information stored in the memory, and can reduce the time overhead of searching for historical congestion control information with a high probability of being reused.
[0092] Figure 4 is a block diagram illustrating an electronic device 400 according to an exemplary embodiment of the present disclosure.
[0093] Reference Figure 4 The electronic device 400 includes at least one memory 401 and at least one processor 402, wherein the at least one memory 401 stores instructions, and when the instructions are executed by the at least one processor 402, the congestion control method according to the exemplary embodiment of the present disclosure is executed.
[0094] As an example, the electronic device 400 may be a PC, a tablet device, a personal digital assistant, a smart phone, or other device capable of executing the above instructions. Here, the electronic device 400 is not necessarily a single electronic device, but may also be any device or circuit capable of executing the above instructions (or instruction sets) individually or in combination. The electronic device 400 may also be part of an integrated control system or a system manager, or may be configured as a portable electronic device interconnected with a local or remote (e.g., via wireless transmission) interface.
[0095] In the electronic device 400, the processor 402 may include a central processing unit (CPU), a graphics processing unit (GPU), a programmable logic device, a dedicated processor system, a microcontroller or a microprocessor. As an example and not limitation, the processor may also include an analog processor, a digital processor, a microprocessor, a multi-core processor, a processor array, a network processor, etc.
[0096] The processor 402 may execute instructions or codes stored in the memory 401, which may also store data. Instructions and data may also be sent and received over a network via a network interface device, which may employ any known transmission protocol.
[0097] The memory 401 may be integrated with the processor 402, for example, by placing RAM or flash memory within an integrated circuit microprocessor or the like. In addition, the memory 401 may include a separate device, such as an external disk drive, a storage array, or any other storage device that can be used by a database system. The memory 401 and the processor 402 may be operatively coupled, or may communicate with each other, such as through an I / O port, a network connection, etc., so that the processor 402 can read files stored in the memory.
[0098] In addition, the electronic device 400 may also include a video display (such as a liquid crystal display) and a user interaction interface (such as a keyboard, a mouse, a touch input device, etc.) All components of the electronic device 400 may be connected to each other via a bus and / or a network.
[0099] According to an exemplary embodiment of the present disclosure, a computer-readable storage medium may also be provided, and when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the above-mentioned congestion control method. Examples of computer-readable storage media here include: read-only memory (ROM), random access programmable read-only memory (PROM), electrically erasable programmable read-only memory (EEPROM), random access memory (RAM), dynamic random access memory (DRAM), static random access memory (SRAM), flash memory, non-volatile memory, CD-ROM, CD-R, CD+R, CD-RW, CD+RW, DVD-ROM, DVD-R, DVD+R, DVD-RW, DVD+RW, DVD-RAM, BD-ROM, BD-R, BD-R LTH, BD-RE, Blu-ray or optical disk storage, hard disk drive (HDD), solid state drive (SSD), card storage (such as, multimedia card, secure digital (SD) card or extreme digital (XD) card), magnetic tape, floppy disk, magneto-optical data storage device, optical data storage device, hard disk, solid state disk and any other device, any other device is configured to store computer programs and any associated data, data files and data structures in a non-transitory manner and provide the computer programs and any associated data, data files and data structures to a processor or computer so that the processor or computer can execute the computer program. The computer program in the above-mentioned computer-readable storage medium can be run in an environment deployed in a computer device such as a client, a host, an agent device, a server, etc. In addition, in one example, the computer program and any associated data, data files and data structures are distributed on a networked computer system, so that the computer program and any associated data, data files and data structures are stored, accessed and executed in a distributed manner by one or more processors or computers.
[0100] According to an exemplary embodiment of the present disclosure, a computer program product may also be provided, including a computer program, and when the computer program is executed by a processor, the congestion control method according to the present disclosure is implemented.
[0101] According to the congestion control method, device, electronic device and storage medium disclosed in the present invention, when a connection request sent by a client is received, congestion control can be performed on the connection based on historical congestion control information, without obtaining parameters from the external network environment to calculate and adjust the data transmission rate. By reusing historical congestion control information to perform congestion control, the current connection can use a higher data transmission rate to send data at the beginning of data transmission, reducing the time it takes for the current connection to reach the maximum data transmission rate, that is, it can reduce the time it takes to start the congestion control phase, and can reduce the bandwidth waste before the current connection reaches the maximum data transmission rate.
[0102] Furthermore, the network environments of multiple connections with the same client identification information are approximately the same. Therefore, the data sending rates of multiple connections with the same client identification information are of reference significance to each other. Therefore, the congestion control information obtained in this connection can be stored in the memory corresponding to the identification information of the client of this connection, so that when a connection request is subsequently received from a client whose corresponding client identification information is the same as the identification information of the client of this connection, the historical congestion control information corresponding to the identification information of the client in the memory can be reused to perform congestion control, so that the new connection can use a higher data sending rate to send data at the beginning of data transmission, reducing the time for the new connection to reach the maximum data sending rate, that is, reducing the time of the congestion control startup phase, reducing the bandwidth waste before the new connection reaches the maximum data sending rate, and improving the bandwidth utilization of the new connection in the congestion control startup phase.
[0103] Furthermore, if a piece of historical congestion control information is reused, then the piece of historical congestion control information is likely to be reused multiple times in the future. Therefore, the survival time of the piece of historical congestion control information can be reset to zero, that is, the survival time of the piece of historical congestion control information can be reset, which is equivalent to extending the survival time of the piece of historical congestion control information in the memory, so that when the piece of historical congestion control information needs to be reused in the future, the piece of historical congestion control information can be found in the memory.
[0104] Furthermore, if the survival time of a certain piece of historical congestion control information reaches the maximum survival time, it means that the historical congestion control information has not been reused in this process, and the probability of the historical congestion control information being reused in the subsequent process may not be high. Therefore, the historical congestion control information whose survival time has reached the maximum survival time can be deleted, that is, the historical congestion control information with a low probability of being reused can be cleared, so as to avoid excessive memory consumption by redundant historical congestion control information. In addition, clearing out useless historical congestion control information can also greatly reduce the amount of historical congestion control information stored in the memory, and can reduce the time overhead of searching for historical congestion control information with a high probability of being reused.
[0105] Furthermore, the historical congestion control information arranged at the end of the historical congestion control information storage queue can be deleted. In this way, it can be ensured that when a new connection is established, the historical congestion control information that is compatible with the new connection can be reused as much as possible, and it can also avoid storing too much useless historical congestion control information in the server's memory, and avoid excessive memory consumption by redundant historical congestion control information. In addition, clearing out useless historical congestion control information can also greatly reduce the amount of historical congestion control information stored in the memory, and can reduce the time overhead of searching for historical congestion control information with a high probability of being reused.
[0106] Furthermore, based on the historical data transmission rate and congestion window, the data contained in the data queue can be smoothly sent to the network to avoid the phenomenon that all data is burst to the network at once, causing network congestion.
[0107] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0108] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A congestion control method, characterized in that: include: Receiving a connection request sent by a client, wherein the connection request includes identification information of the client; Establishing a connection with the client based on the identification information of the client, and searching for historical congestion control information corresponding to the identification information of the client, wherein the historical congestion control information is information used to perform congestion control on a historical connection, and the historical connection is a connection established before receiving the connection request; In the case where historical congestion control information corresponding to the identification information of the client is found, within a preset time interval after the connection is established, performing congestion control on the connection based on the historical congestion control information; The historical congestion control information includes the historical data transmission rate and the historical bandwidth-delay product; The performing congestion control on the connection based on the historical congestion control information comprises: Determining a congestion window according to a product of the historical bandwidth-delay product and a preset congestion window gain; The data contained in the congestion window in the data queue is sent to the client according to the historical data sending rate.
2. The congestion control method according to claim 1, characterized in that: After the step of performing congestion control on the connection based on the historical congestion control information, the congestion control method further comprises: After the preset time interval has passed, obtaining congestion control information of the connection in real time; Congestion control is performed on the connection based on the congestion control information acquired in real time.
3. The congestion control method according to claim 1, characterized in that: The congestion control method further includes: If no historical congestion control information corresponding to the identification information of the client is found, acquiring congestion control information after the connection is established in real time; performing congestion control on the connection based on congestion control information acquired in real time after the connection is established; The congestion control information acquired within a preset time interval after the connection is established is stored as the historical congestion control information corresponding to the identification information of the client.
4. The congestion control method according to claim 1, characterized in that: The congestion control method further includes: When the connection is released, the lifetime of the historical congestion control information is reset to zero, wherein the lifetime indicates the duration of the current existence of the historical congestion control information; The historical congestion control information whose survival time reaches a preset time is cleared.
5. The congestion control method according to claim 1, characterized in that: The congestion control method further includes: Moving the historical congestion control information to the starting position of the historical congestion control information storage queue, wherein the later the arrangement position of the historical congestion control information in the historical congestion control information storage queue is, the higher the deletion priority of the historical congestion control information is; When the amount of historical congestion control information in the historical congestion control information storage queue reaches a preset threshold, the historical congestion control information arranged at the end of the historical congestion control information storage queue is deleted.
6. The congestion control method according to claim 1, characterized in that: The identification information of the client includes the IP address of the client and the port number of the target port of the client.
7. A congestion control device, characterized in that: include: A receiving module, configured to receive a connection request sent by a client, wherein the connection request includes identification information of the client; a search module configured to establish a connection with the client based on the identification information of the client, and search for historical congestion control information corresponding to the identification information of the client, wherein the historical congestion control information is information for performing congestion control on a historical connection, and the historical connection is a connection established before receiving the connection request; A first execution module is configured to, when finding the historical congestion control information corresponding to the identification information of the client, perform congestion control on the connection based on the historical congestion control information within a preset time interval after the connection is established; The historical congestion control information includes the historical data transmission rate and the historical bandwidth-delay product; The first execution module is configured to: Determining a congestion window according to a product of the historical bandwidth-delay product and a preset congestion window gain; The data contained in the congestion window in the data queue is sent to the client according to the historical data sending rate.
8. The congestion control device according to claim 7, characterized in that: The congestion control device further comprises: A first acquisition module is configured to acquire the congestion control information of the connection in real time after the preset time interval; The second execution module is configured to perform congestion control on the connection based on the congestion control information acquired in real time.
9. The congestion control device according to claim 7, characterized in that: The congestion control device further comprises: A second acquisition module is configured to acquire, in real time, the congestion control information after the connection is established if no historical congestion control information corresponding to the identification information of the client is found; A third execution module is configured to perform congestion control on the connection based on the congestion control information acquired in real time after the connection is established; The storage module is configured to store the congestion control information acquired within a preset time interval after the connection is established as the historical congestion control information corresponding to the identification information of the client.
10. The congestion control device according to claim 7, characterized in that: The congestion control device further comprises: a zeroing module, configured to reset the survival time of the historical congestion control information to zero when the connection is released, wherein the survival time indicates the duration of the current existence of the historical congestion control information; The clearing module is configured to clear the historical congestion control information whose survival time reaches a preset time.
11. The congestion control device according to claim 7, characterized in that: The congestion control device further comprises: a moving module configured to move the historical congestion control information to a starting position of a historical congestion control information storage queue, wherein the later the arrangement position of the historical congestion control information in the historical congestion control information storage queue is, the higher the deletion priority of the historical congestion control information is; The deleting module is configured to delete the historical congestion control information arranged at the end of the historical congestion control information storage queue when the amount of historical congestion control information in the historical congestion control information storage queue reaches a preset threshold.
12. The congestion control device according to claim 7, characterized in that: The identification information of the client includes the IP address of the client and the port number of the target port of the client.
13. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the congestion control method according to any one of claims 1 to 6.
14. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the congestion control method as claimed in any one of claims 1 to 6.
15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the congestion control method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Transmission rate determination method and device, equipment and storage medium
CN110401511A