A TCP flow control method, system, device and medium for satellite network
By calculating the average queue length, delay and packet loss rate of TCP traffic control in the satellite network, and adjusting the TCP reception window, the problem of unstable TCP traffic control in the existing technology is solved, and the smooth flow control effect in the satellite network is achieved.
Patent Information
- Application Number
- CN202310174386.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-15
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2043-02-15
AI Technical Summary
When TCP flow control is used in satellite networks, random early detection RED algorithms are prone to oscillation, resulting in system instability and difficulty in achieving stable TCP flow control.
By obtaining the average queue length, average delay and packet loss rate of the priority cache queue, the maximum reception window of the TCP protocol stack is calculated, and the TCP reception window is periodically adjusted to stabilize it in a reasonable preset area, thereby achieving stable traffic control.
This method can effectively control TCP traffic, avoid system oscillation, and achieve stable traffic control, and is suitable for satellite network environment.
Smart Images

Figure CN116156019B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of satellite networks, and in particular relates to a TCP flow control method, system, equipment and medium for satellite networks. Background Art
[0002] A satellite network is a network that uses the ability of satellite transponders to relay signals to complete data transmission between its nodes. Figure 1 As shown in FIG. 1 , the networking structure of the satellite network includes the following network elements: User Terminal (UT), Satellite Network Link Gateway, On Board Processing (OBP), Resource Manager (RM) and Network Control Center (NCC), and the Satellite Network Link Gateway is generally subdivided into the Forward Link Gateway (MODCOD Servicing System, MCS) and the Return Channel Manager (RCM). Among them, the physical layer satellite modem (SM) does not exist as a separate network element, but is embedded in the UT, MCS / RCM or OBP. In the implementation process, the IP Gateway (IP Gateway, IPGW) is located between the core network and the link layer gateway, and is used as a three-layer adaptation gateway between Ethernet and the satellite network.
[0003] Due to some inherent characteristics of satellite networks, such as the long time delay (RTT), high bit error rate (High Error Bit Rates), network asymmetry (Asymmetric), link discontinuity (Link Disconnection), and high bandwidth delay product (Bandwidth Delay Product, BDP) of GSO (Geosynchronous Orbit) satellite links, the performance of TCP (Transmission Control Protocol) in high-speed data transmission is affected.
[0004] In order to solve these problems, it is generally preferred to enhance the performance of traditional TCP connections, and segmented TCP can use a processing algorithm that is more suitable for space networks, which requires the deployment of a PEP (Performance Enhancing Proxy) server in the link. Based on this, in the application of satellite networks, PEP can be deployed on the IP gateway.
[0005] PEP will speed up the TCP connection establishment process and data transmission speed. The PEP processing flow is as follows: Figure 2 As shown, the details are as follows:
[0006] When PEP receives a SYN (Synchronize Sequence Numbers) request, it will reply with ACK (Acknowledge character) and SYN on behalf of the final node to segment TCP. Since the RTT between the IP gateway and PEP is very small, and the IP gateway replies with ACK after receiving ACK and SYN to implement a three-way handshake, the connection can be established. At this time, the SYN sent by PEP to the remote end may not have arrived, but the IP gateway can already start sending data.
[0007] When the PEP receives data sent by the IP gateway, it will cache it locally and reply ACK on behalf of the end user terminal. After receiving the ACK, the IP gateway can continue to send data without waiting for the ACK from the end user terminal. The PEP will interact with the remote PEP to forward the data sent by the IP gateway to the user terminal. The remote PEP demultiplexes the original data and sends it to the end user terminal using a standard TCP connection. As a result, the processing speed when the PEP is deployed in the link will be much higher than the direct reply of the end user terminal.
[0008] However, due to TCP segmentation, the Ethernet link side is a local connection with a high transmission rate. In a long RTT environment, the user's ACK generally arrives slowly. If the PEP sends ACK back to the IP gateway indefinitely, the amount of data cached locally by the PEP will be large, resulting in data flooding.
[0009] In the prior art, PEP sends back ACK and usually enables TCP RED (Random Early Detection) congestion control algorithm, which is fed back to the IP gateway sender to control the size of the sliding window swnd of the sender, thus achieving the purpose of flow control.
[0010] Among them, random early detection (RED) is an effective method for controlling TCP congestion, which can respond quickly to congestion. The mechanism is that when the network is congested, the receiving end randomly discards a number of data packets with a preset probability, triggering the data source to start the TCP congestion avoidance mechanism. However, in the process of using the prior art, the inventors found that there are at least the following problems in the prior art: if random early detection (RED) is used, it will cause oscillations, resulting in system instability. Therefore, it is necessary to study a delay-based preventive TCP flow control method to achieve the purpose of controlling TCP flow smoothly. Summary of the invention
[0011] The present invention aims to solve the above technical problems at least to a certain extent. The present invention provides a TCP flow control method, system, device and medium for satellite networks.
[0012] In order to achieve the above object, the present invention adopts the following technical solutions:
[0013] In a first aspect, a TCP flow control method for a satellite network is provided, comprising:
[0014] Obtaining the queue length, PEP cache queue length and egress bandwidth of the IP gateway message of the priority i cache queue at time t, and obtaining the average queue length of the priority i cache queue at time t according to the queue length and the PEP cache queue length, and obtaining the average egress bandwidth according to the egress bandwidth;
[0015] Obtaining an average delay of a priority i cache queue at time t according to the average queue length and the average egress bandwidth;
[0016] Obtaining the packet loss rate of each priority i cache queue at time t according to the average delay;
[0017] According to the packet loss rate of each priority cache queue at time t, the average packet loss rate of each priority cache queue at time t is obtained;
[0018] The maximum receiving window of the TCP protocol stack is obtained according to the average packet loss rate, the preset packet loss probability and the preset packet loss rate tolerance.
[0019] The present invention can adjust the TCP receiving window so that the receiving window is stabilized in a reasonable preset area, thereby facilitating the purpose of achieving traffic stability. Specifically, during the implementation of the present invention, the queue length and export bandwidth of the cache can be periodically obtained to calculate the local delay, and then the average queue length and average export bandwidth of each priority cache queue at time t are obtained according to the queue length of the IP gateway message, the PEP cache queue length and the export bandwidth obtained at time t, and then the average delay, packet loss rate and average packet loss rate of each priority cache queue at time t are obtained in turn according to the average queue length and the average export bandwidth, and finally the maximum receiving window of the TCP protocol stack is obtained according to the average packet loss rate, the preset packet loss probability and the preset packet loss rate tolerance, so as to adjust the TCP receiving window size based on the maximum receiving window of the TCP protocol stack, thereby controlling the sending rate of the remote end, and no matter what congestion control algorithm is used at the remote end, the purpose of controlling the traffic can be achieved, which is suitable for satellite networks.
[0020] In a possible design, the queue length includes an inbound interface queue length and an outbound interface queue length; and according to the queue length and the PEP cache queue length, an average queue length of the priority i cache queue at time t is obtained, including:
[0021] According to the queue length and the PEP cache queue length, the total queue length of the priority i cache queue at time t is obtained; wherein the total queue length is:
[0022] Q i (t) = Q_IN i (t)+Q_OUT i (t)+Q_PEP i (t);
[0023] In the formula, Q_IN i (t) indicates the length of the incoming interface queue, Q_OUT i (t) indicates the length of the outgoing interface queue, Q_PEP i (t) represents the length of the PEP buffer queue;
[0024] According to the total queue length, the average queue length of the priority i cache queue at time t is obtained; wherein the average queue length is:
[0025]
[0026] Where a is the sliding average coefficient of the queue length.
[0027] In one possible design, the average egress bandwidth is:
[0028]
[0029] Where b is the sliding average coefficient of the export bandwidth; C i (t) represents the egress bandwidth.
[0030] In one possible design, the average delay is:
[0031]
[0032] Where α is the sliding average coefficient of the delay; is the average queue length, is the average egress bandwidth.
[0033] In a possible design, the packet loss rate of the priority i buffer queue at time t is:
[0034]
[0035] In the formula, D_min i is the lower threshold of message delay, D_max i is the upper threshold of message delay, P max The flow control algorithm reaches the upper threshold of message delay D_max when the delay reaches i The packet loss probability, P DROP_MAX It is the preset maximum allowed packet loss probability.
[0036] In one possible design, the average packet loss rate is:
[0037]
[0038] Where K is the period for calculating the average packet loss rate, t0 is the initial time, and P RED,i (t) is the packet loss rate of the priority i cache queue at time t.
[0039] In one possible design, the maximum receiving window of the TCP protocol stack is obtained according to the average packet loss rate, the preset packet loss probability and the preset packet loss rate tolerance, including:
[0040] According to the average packet loss rate, the preset packet loss probability and the preset packet loss rate tolerance, an initial update window is obtained; wherein the initial update window is:
[0041]
[0042] Where W max,i (t) is the maximum window of the priority i cache queue at time t; ΔW is the window adjustment step; P RED,SMA,i (t) is the average packet loss rate; P th is the preset expected packet loss rate; δ is the preset packet loss rate tolerance;
[0043] According to the initial update window and the preset actual receiving window maximum value, the maximum receiving window of the TCP protocol stack is obtained; wherein the maximum receiving window of the TCP protocol stack is:
[0044] W max,ad (t) = min[W max,i (t)*window_scale,B SFP (t)];
[0045] Where W max,i (t)*window_scale is the actual maximum value of the receiving window of the preset priority i; B SFP (t) is the receive window for the data stream calculated by the TCP protocol stack.
[0046] In a second aspect, a TCP flow control system for a satellite network is provided, which is used to implement the TCP flow control method for a satellite network as described in any one of the above items; the TCP flow control system for a satellite network includes:
[0047] The data collection module is used to obtain the queue length, PEP cache queue length and egress bandwidth of the IP gateway message of the priority i cache queue at time t, and obtain the average queue length of the priority i cache queue at time t according to the queue length and the PEP cache queue length, and obtain the average egress bandwidth according to the egress bandwidth;
[0048] The data processing module is communicatively connected with the data acquisition module, and is used to obtain the average delay of the priority i cache queue at time t according to the average queue length and the average export bandwidth; to obtain the packet loss rate of each priority i cache queue at time t according to the average delay; to obtain the average packet loss rate of each priority cache queue at time t according to the packet loss rate of each priority cache queue at time t; and to obtain the maximum receiving window of the TCP protocol stack according to the average packet loss rate, a preset packet loss probability and a preset packet loss rate tolerance.
[0049] In a third aspect, an electronic device is provided, including:
[0050] a memory for storing computer program instructions; and,
[0051] A processor is used to execute the computer program instructions to complete the operation of the TCP flow control method for a satellite network as described in any one of the above items.
[0052] In a fourth aspect, a computer-readable storage medium is provided for storing computer-readable computer program instructions, wherein the computer program instructions are configured to execute the operations of the TCP flow control method for a satellite network as described in any one of the above items when run. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 It is a schematic diagram of the networking structure of the satellite network;
[0054] Figure 2 This is a schematic diagram of the working principle of PEP;
[0055] Figure 3 is a flow chart of the TCP flow control method for satellite network in Example 1;
[0056] Figure 4 It is a schematic diagram of the Markov model of TCP congestion control;
[0057] Figure 5It is a schematic diagram of the relationship between the average window size and the dropping probability;
[0058] Figure 6 It is a schematic diagram of the relationship between STD and dropping probability;
[0059] Figure 7 This is a schematic diagram of TCP throughput in Test 1;
[0060] Figure 8 This is a schematic diagram of TCP's receive window control in Test 1;
[0061] Fig. 9 This is a diagram of TCP throughput in Test 2;
[0062] Fig.10 This is a schematic diagram of TCP's receive window control in Test 2. DETAILED DESCRIPTION
[0063] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the present invention will be briefly introduced below in combination with the drawings and the description of the embodiments or the prior art. Obviously, the following description of the structure of the drawings is only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. It should be noted that the description of these embodiments is used to help understand the present invention, but does not constitute a limitation of the present invention.
[0064] Embodiment 1:
[0065] This embodiment discloses a TCP flow control method for a satellite network, which can be executed by, but is not limited to, a computer device or a virtual machine with certain computing resources, such as a personal computer, a smart phone, a personal digital assistant, or a wearable device, or by a virtual machine.
[0066] like Figure 3 As shown, a TCP flow control method for a satellite network may include, but is not limited to, the following steps:
[0067] S1. Obtain the queue length, PEP cache queue length and egress bandwidth of the IP gateway message of the priority i cache queue at time t, and obtain the average queue length of the priority i cache queue at time t according to the queue length and the PEP cache queue length, and obtain the average egress bandwidth according to the egress bandwidth; in this embodiment, each priority independently obtains the queue length, so as to calculate the total queue length, average queue length, etc. for different priorities respectively. At the same time, in this embodiment, each priority independently obtains the egress bandwidth, so as to calculate the average egress bandwidth, etc. for different priorities respectively.
[0068] In this embodiment, the queue length includes an inbound interface queue length and an outbound interface queue length. According to the queue length and the PEP cache queue length, an average queue length of the priority i cache queue at time t is obtained, including:
[0069] According to the queue length and the PEP cache queue length, the total queue length of the priority i cache queue at time t is obtained; wherein the total queue length is:
[0070] Q i (t) = Q_IN i (t)+Q_OUT i (t)+Q_PEP i (t);
[0071] In the formula, Q_IN i (t) represents the length of the incoming interface queue obtained through the API interface of the receiving module, Q_OUT i (t) represents the outbound interface queue length obtained through the API interface of the sending module, Q_PEP i (t) represents the length of the PEP buffer queue obtained through the API interface of the PEP module;
[0072] According to the total queue length, the average queue length of the priority i cache queue at time t is obtained; wherein the average queue length is:
[0073]
[0074] In the formula, a is the sliding average coefficient of the queue length. In this embodiment, the recommended default value of the sliding average coefficient a of the queue length is 0.1.
[0075] It should be noted that, in this embodiment, the queue length update task is executed periodically, and the period is consistent with the scheduling period of the sending module of the system, and is 20ms by default. If the scheduling period changes, the update period of the queue length also changes synchronously.
[0076] In this embodiment, the average egress bandwidth is:
[0077]
[0078] Wherein, b is the sliding average coefficient of the export bandwidth. In this embodiment, the recommended default value of the sliding average coefficient b of the export bandwidth is 0.1; C i (t) represents the egress bandwidth obtained through the API interface of the sending module.
[0079] In this embodiment, the update period of the egress bandwidth is consistent with the update period of the bandwidth allocated by the MCS to the IP gateway, and the default value is 100ms.
[0080] In this embodiment, the egress bandwidth obtained through the API interface of the sending module is calculated based on the actual egress bandwidth of the sending module read. Assume that C i (t) represents the actual export bandwidth provided by the sending module at time t, C Max It is the maximum guaranteed bandwidth of the system. i represents the priority. Each priority calculates the export bandwidth independently, ranging from 1 to M, where M is the maximum priority.
[0081] In the absence of data flow C i (t) = 0, the bandwidth is too low for a period of time when the data stream starts to be sent, resulting in inaccurate calculation of the packet loss rate, which will cause relatively large packet loss. In order to avoid this problem, the bandwidth query interface of the sending module should provide a minimum value r*C Max , r is the minimum bandwidth coefficient provided by the bandwidth query interface to the flow control module. In this embodiment, the recommended parameter of the minimum bandwidth coefficient r is 0.15.
[0082] At the same time, in order to ensure the service quality of high-priority interactive services, the bandwidth C of the highest priority 1 1 (t) Use C Max , that is, the export bandwidth obtained through the API interface of the sending module is:
[0083]
[0084] S2. According to the average queue length and the average egress bandwidth, the average delay of the priority i cache queue at time t is obtained;
[0085] In this embodiment, the average delay is:
[0086]
[0087] Wherein, α is the sliding average coefficient of the time delay. In this embodiment, the recommended default value of the sliding average coefficient α of the time delay is 0.1; is the average queue length, is the average egress bandwidth.
[0088] S3. The packet loss rate of each priority i cache queue at time t is obtained according to the average delay;
[0089] Specifically, the packet loss rate of the priority i cache queue at time t is:
[0090]
[0091] In the formula, D_min i is the lower threshold of message delay, D_max i is the upper threshold of message delay, P max The flow control algorithm reaches the upper threshold of message delay D_max when the delay reaches i The packet loss probability, P DROP_MAX is the preset maximum allowed packet loss probability. In this embodiment, 0≤P DROP_MAX ≤1. Specifically, when the upper threshold of the delayed message delay D_max i , the system follows P DROP_MAX Packet loss occurs, P is recommended DROP_MAX The default value is 0.20. Studies have shown that when the RED packet loss rate is 15%-20%, TCP data flows with different peak rates will drop to the same average rate.
[0092] It should be understood that for different priorities, the lower threshold D_min of message delay i And the upper threshold D_max i The configuration allows different values to meet different throughput requirements. Under the same conditions, the lower threshold of the message delay D_min i The larger the configuration, the higher the average bandwidth the terminal can obtain in the balanced state.
[0093] In this embodiment, the update period of the packet loss rate is the same as the update period of the queue length, and can be processed in one task during implementation.
[0094] S4. According to the packet loss rate of each priority cache queue at time t, the average packet loss rate of each priority cache queue at time t is obtained;
[0095] In this embodiment, the average packet loss rate is:
[0096]
[0097] Wherein, K is the period for calculating the average packet loss rate. In this embodiment, the period K for calculating the average packet loss rate is set to 200 by default, t0 is the initial time, P RED,i (t) is the packet loss rate of the priority i cache queue at time t.
[0098] S5. According to the average packet loss rate, the preset packet loss probability and the preset packet loss rate tolerance, the maximum receiving window of the TCP protocol stack is obtained, which can also be called the actual receiving window adjusted by the TCP protocol stack.
[0099] In this embodiment, the maximum receiving window of the TCP protocol stack is obtained according to the average packet loss rate, the preset packet loss probability and the preset packet loss rate tolerance, including:
[0100] According to the average packet loss rate, the preset packet loss probability and the preset packet loss rate tolerance, an initial update window is obtained; wherein the initial update window is:
[0101]
[0102] Where W max,i (t+1) is the initial update window, which can also be called the maximum window of the priority i cache queue at time t+1; W max,i (t) is the maximum window provided by the priority i cache queue to the TCP protocol stack at time t. In this embodiment, 0≤W max,i (t)≤65535; ΔW is the window adjustment step size. It should be noted that if the step size is too small, the system will take a long time to reach a stable state. If the step size is too large, it will easily cause system oscillation. The selection of parameters should take into account RTT and window expansion factor. The smaller the RTT, the smaller ΔW is. Because the smaller the RTT, the greater the impact of window adjustment on bandwidth. In this embodiment, the default value of the window adjustment step size ΔW is 1500; P RED,SMA,i (t) is the average packet loss rate; P th is the preset expected packet loss rate. In this embodiment, the preset expected packet loss rate P th The default value of is 0.5%; δ is the preset packet loss rate tolerance. In this embodiment, the default value of the preset packet loss rate tolerance δ is 0.25%, that is, by default, the expected packet loss rate fluctuates within the interval [0.25%, 0.75%] and the window remains unchanged.
[0103] According to the initial update window and the preset actual receiving window maximum value, the maximum receiving window of the TCP protocol stack is obtained; it should be noted that the TCP protocol has a window expansion factor (window scale) to adjust the window size, and the actual maximum value of the TCP receiving window is W max,i (t)*window_scale, and the TCP protocol stack has an independent receive window adjustment algorithm (based on local memory, ACK reply status, etc.), so the final TCP RED adjusted window value, that is, the maximum receive window of the TCP protocol stack is:
[0104] W max,ad (t) = min[W max,i (t)*window_scale,B SFP (t)];
[0105] Where W max,i (t)*window_scale is the actual maximum value of the receiving window of the preset priority i; B SFP (t) is the receive window for the data stream calculated by the TCP protocol stack.
[0106] It should be noted that W max,i The initial value W of (t) max,i The setting of (0) should take into account the setting of the maximum TCP receiving buffer and TCP window expansion factor allowed by the system. In this embodiment, W max,i The initial value W of (t) max,i (0) The recommended default value is TCP maximum receive buffer / window_sacle.
[0107] In addition, in this embodiment, the minimum value of the window expansion factor window_scale*ΔW should be greater than the MTU (1500 bytes) to ensure that at least one message can be sent after each adjustment. The TCP window adjustment period is set to 200ms by default.
[0108] In this embodiment, the TCP flow control method for satellite network is performed based on a TCP flow control device, wherein the TCP flow control device includes a PEP server and a flow control module, wherein:
[0109] The PEP server includes a receiving module, a sending module, a PEP module, a routing module and a flow control module. The output end of the receiving module is respectively connected to the input end of the PEP module and the first input end of the routing module, the output end of the PEP module is connected to the second input end of the routing module, the output end of the routing module is connected to the input end of the sending module, and the API interface of the receiving module, the API interface of the sending module, and the API interface of the PEP module are all connected to the flow control module.
[0110] The flow control module includes a queue length update processing module, a sending broadband update processing module, an average delay packet loss rate calculation module and a TCP window update control module. The API interface of the receiving module, the API interface of the sending module and the API interface of the PEP module are all connected to the input end of the queue length update processing module, the API interface of the sending module is connected to the input end of the sending broadband update processing module, the output ends of the queue length update processing module and the sending broadband update processing module are both connected to the input end of the average delay packet loss rate calculation module, the output end of the average delay packet loss rate calculation module is connected to the API interface of the receiving module, and the output end of the average delay packet loss rate calculation module is also connected to the API interface of the PEP module through the TCP window update control module.
[0111] Specifically, in this embodiment, the queue length update processing module is used to obtain the queue length including the input interface queue length and the output interface queue length and the PEP cache queue length, and send them to the average delay packet loss rate calculation module; the sending bandwidth update processing module is used to obtain the export bandwidth and send it to the average delay packet loss rate calculation module; the average delay packet loss rate calculation module is used to obtain the average delay of the priority i cache queue at time t according to the average queue length and the average export bandwidth, obtain the packet loss rate of each priority i cache queue at time t according to the average delay, and obtain the average packet loss rate of each priority cache queue at time t according to the packet loss rate of each priority cache queue at time t, and then send the average packet loss rate to the TCP window update control module, so that the TCP window update control module obtains the maximum receiving window of the TCP protocol stack according to the average packet loss rate, the preset packet loss probability and the preset packet loss rate tolerance, and then adjusts the window size of the PEP module according to the maximum receiving window of the TCP protocol stack, thereby achieving a smooth control of TCP traffic.
[0112] This embodiment can adjust the TCP receiving window so that the receiving window is stabilized in a reasonable preset area, thereby facilitating the purpose of achieving traffic stability. Specifically, during the implementation of this embodiment, the queue length and export bandwidth of the cache can be periodically obtained to calculate the local delay, and then the average queue length and average export bandwidth of each priority cache queue at time t are obtained according to the queue length of the IP gateway message, the PEP cache queue length and the export bandwidth obtained at time t, and then the average delay, packet loss rate and average packet loss rate of each priority cache queue at time t are obtained in turn according to the average queue length and the average export bandwidth, and finally the maximum receiving window of the TCP protocol stack is obtained according to the average packet loss rate, the preset packet loss probability and the preset packet loss rate tolerance, so as to adjust the TCP receiving window size based on the maximum receiving window of the TCP protocol stack, thereby controlling the sending rate of the remote end, and no matter what congestion control algorithm is used by the remote end, the purpose of controlling the traffic can be achieved, which is suitable for satellite networks.
[0113] It should also be noted that, during the implementation of this embodiment, the cached queue length and egress bandwidth can be periodically obtained, and the local delay of the data packet can be calculated, and the link congestion can be evaluated based on the local delay of the data packet. Specifically, the data stream from the ground network is forwarded to the satellite network by the IP gateway. If the data cannot be forwarded in time due to insufficient bandwidth or large ACK delay of the satellite network, the delay of the data inside the IP gateway will increase. The local delay is the ratio of the egress bandwidth on the satellite network side to the queue buffer length of the IP gateway from the ground network to the satellite network, which represents the time required for the data to be received and sent at the current moment.
[0114] like Figure 4 , the rationality of this embodiment is explained through an analytical model. Specifically, the Markov process is used to describe RED congestion control. Assuming that the initial window is small, the transition from slow start to congestion avoidance is transient, and a discarded data packet can be found in one RTT. The congestion avoidance process of TCP can be regarded as a discrete Markov process, and its time unit is one RTT. Each state represents a specific TCP receive window, and the first and last states represent the initial and maximum TCP receive windows.
[0115] The probability that at least one packet is dropped in state i is:
[0116] p(i)=1-(1-P RED ) (IW+I-1) ;
[0117] Where IW is the initial TCP receive window, P RED is the initial packet loss rate.
[0118] The transition probability of the data packet in state i is:
[0119]
[0120] The transition probability matrix is Z = {p i,j},i,j∈M. The steady-state probability is Ω={π i} 1×M =linZ n ,n→∞.
[0121] The mean and variance of the TCP receive window are:
[0122]
[0123]
[0124] like Figure 5 and Figure 6 , respectively showing the trend of the average value and standard deviation STD (standard deviation) of the TCP receive window changing with the packet loss rate. When the maximum TCP receive window increases, the STD at the same packet loss rate also increases, that is, the system oscillation characteristics increase.
[0125] Under a specific packet loss probability, in order to obtain a smaller STD, the maximum TCP receive window needs to be reduced. However, by reducing the TCP receive window, the average TCP receive window will also be reduced, resulting in a reduction in bandwidth, thereby reducing the data delay of the system and reducing the packet loss rate. When the packet loss rate is lower than expected, it means that the maximum TCP receive window is adjusted too low and needs to be increased. During actual operation, the bandwidth of the system always changes dynamically. An expected packet loss rate is set, and the window is adjusted according to the change in the packet loss rate so that the input rate can dynamically follow the output rate. Therefore, in this embodiment, the packet loss rate is used as the basis for determining the update of the TCP receive window, so as to obtain a reasonable window size, thereby ensuring the bandwidth utilization and the oscillation of the system, and achieving the purpose of smoothly controlling the flow.
[0126] Practice shows that when the method described in this embodiment is enabled, the egress bandwidth is sufficient and has no effect on the processing of data packets. When the bandwidth is insufficient, by adjusting the TCP receive window, the input traffic of TCP can be stabilized at a value close to the output traffic, while the packet loss rate can be stabilized near the expected value.
[0127] Specifically, the test results are as follows:
[0128] Test 1: The ground network bandwidth is 1Gb / s, and the satellite network outlet bandwidth is 20Mb / s. The TCP throughput control effect and TCP window size control effect are as follows: As the TCP receive window decreases, the TCP flow eventually stabilizes at around 20Mb / s. Specifically, the TCP throughput is as follows: Figure 7 As shown, TCP's receive window control is as follows Figure 8 shown.
[0129] Test 2: Satellite network environment with 300ms latency + 10^-6 packet loss rate, satellite network side egress speed limit 200Mbps, scheduling period 5ms, RED packet loss rate update period 5ms, TCP window update period 25ms, TCP window initial value 25000, maximum value 65535; TCP throughput is stable at about 200Mbps, and the TCP receive window size drops from 520000B to 372280B. Specifically, TCP throughput is as follows Fig. 9 As shown, TCP's receive window control Fig.10 shown.
[0130] Embodiment 2:
[0131] This embodiment discloses a TCP flow control system for a satellite network, which is used to implement the TCP flow control method for a satellite network in Embodiment 1; the TCP flow control system for a satellite network includes:
[0132] The data collection module is used to obtain the queue length, PEP cache queue length and egress bandwidth of the IP gateway message of the priority i cache queue at time t, and obtain the average queue length of the priority i cache queue at time t according to the queue length and the PEP cache queue length, and obtain the average egress bandwidth according to the egress bandwidth;
[0133] The data processing module is communicatively connected with the data acquisition module, and is used to obtain the average delay of the priority i cache queue at time t according to the average queue length and the average export bandwidth; to obtain the packet loss rate of each priority i cache queue at time t according to the average delay; to obtain the average packet loss rate of each priority cache queue at time t according to the packet loss rate of each priority cache queue at time t; and to obtain the maximum receiving window of the TCP protocol stack according to the average packet loss rate, a preset packet loss probability and a preset packet loss rate tolerance.
[0134] Embodiment 3:
[0135] Based on Embodiment 1 or 2, this embodiment discloses an electronic device, which may be a smart phone, a tablet computer, a laptop computer, or a desktop computer, etc. The electronic device may be referred to as a terminal, a portable terminal, a desktop terminal, etc., and the electronic device includes:
[0136] a memory for storing computer program instructions; and,
[0137] A processor is used to execute the computer program instructions to complete the operation of the TCP flow control method for a satellite network as described in any one of Embodiment 1.
[0138] Embodiment 4:
[0139] Based on any one of embodiments 1 to 3, this embodiment discloses a computer-readable storage medium for storing computer-readable computer program instructions, wherein the computer program instructions are configured to execute the operations of the TCP flow control method for a satellite network as described in embodiment 1 during runtime.
[0140] It should be noted that if the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program code.
[0141] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0142] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the above embodiments, a person skilled in the art should understand that the technical solutions described in the above embodiments can still be modified, or some of the technical features can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
[0143] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A TCP flow control method for satellite network, characterized in that: include: Obtaining the queue length, PEP cache queue length and egress bandwidth of the IP gateway message of the priority i cache queue at time t, and obtaining the average queue length of the priority i cache queue at time t according to the queue length and the PEP cache queue length, and obtaining the average egress bandwidth according to the egress bandwidth; Obtaining an average delay of a priority i cache queue at time t according to the average queue length and the average egress bandwidth; Obtaining the packet loss rate of each priority i cache queue at time t according to the average delay; According to the packet loss rate of each priority cache queue at time t, the average packet loss rate of each priority cache queue at time t is obtained; Obtaining a maximum receiving window of a TCP protocol stack according to the average packet loss rate, a preset packet loss probability, and a preset packet loss rate tolerance; According to the average packet loss rate, the preset packet loss probability and the preset packet loss rate tolerance, the maximum receiving window of the TCP protocol stack is obtained, including: According to the average packet loss rate, the preset packet loss probability and the preset packet loss rate tolerance, an initial update window is obtained; wherein the initial update window is: ; In the formula, is the maximum window of the priority i cache queue at time t; is the window adjustment step size; is the average packet loss rate; is the preset expected packet loss rate; is the preset packet loss rate tolerance; According to the initial update window and the preset actual receiving window maximum value, the maximum receiving window of the TCP protocol stack is obtained; wherein the maximum receiving window of the TCP protocol stack is: ; In the formula, is the actual maximum value of the receiving window of the preset priority i; The receive window for the data stream calculated by the TCP stack.
2. A TCP flow control method for satellite network according to claim 1, characterized in that: The queue length includes an inbound interface queue length and an outbound interface queue length; and according to the queue length and the PEP cache queue length, an average queue length of the priority i cache queue at time t is obtained, including: According to the queue length and the PEP cache queue length, the total queue length of the priority i cache queue at time t is obtained; wherein the total queue length is: ; In the formula, Indicates the length of the incoming interface queue. Indicates the length of the outbound interface queue. Indicates the length of the PEP cache queue; According to the total queue length, the average queue length of the priority i cache queue at time t is obtained; wherein the average queue length is: ; Where a is the sliding average coefficient of the queue length.
3. A TCP flow control method for satellite network according to claim 1, characterized in that: The average egress bandwidth is: ; Where b is the sliding average coefficient of the outlet bandwidth; Indicates the egress bandwidth.
4. A TCP flow control method for satellite network according to claim 1, characterized in that: The average delay is: ; Where α is the sliding average coefficient of the delay; , is the average queue length, is the average egress bandwidth.
5. A TCP flow control method for satellite network according to claim 4, characterized in that: The packet loss rate of the priority i cache queue at time t is: ; In the formula, is the lower threshold of message delay, is the upper threshold of message delay, The flow control algorithm is delayed when the delay reaches the upper threshold of the message delay The packet loss probability when It is the preset maximum allowed packet loss probability.
6. A TCP flow control method for satellite network according to claim 1, characterized in that: The average packet loss rate is: ; In the formula, K is the period for calculating the average packet loss rate, is the initial moment, is the packet loss rate of the priority i cache queue at time t.
7. A TCP flow control system for a satellite network, characterized in that: Used to implement the TCP flow control method for a satellite network as described in any one of claims 1 to 6; the system comprises: The data collection module is used to obtain the queue length, PEP cache queue length and egress bandwidth of the IP gateway message of the priority i cache queue at time t, and obtain the average queue length of the priority i cache queue at time t according to the queue length and the PEP cache queue length, and obtain the average egress bandwidth according to the egress bandwidth; a data processing module, which is in communication with the data acquisition module, and is used to obtain the average delay of the priority i cache queue at time t according to the average queue length and the average egress bandwidth; to obtain the packet loss rate of each priority i cache queue at time t according to the average delay; to obtain the average packet loss rate of each priority cache queue at time t according to the packet loss rate of each priority cache queue at time t; and to obtain the maximum receiving window of the TCP protocol stack according to the average packet loss rate, a preset packet loss probability and a preset packet loss rate tolerance; According to the average packet loss rate, the preset packet loss probability and the preset packet loss rate tolerance, the maximum receiving window of the TCP protocol stack is obtained, including: According to the average packet loss rate, the preset packet loss probability and the preset packet loss rate tolerance, an initial update window is obtained; wherein the initial update window is: ; In the formula, is the maximum window of the priority i cache queue at time t; is the window adjustment step size; is the average packet loss rate; is the preset expected packet loss rate; is the preset packet loss rate tolerance; According to the initial update window and the preset actual receiving window maximum value, the maximum receiving window of the TCP protocol stack is obtained; wherein the maximum receiving window of the TCP protocol stack is: ; In the formula, is the actual maximum value of the receiving window of the preset priority i; The receive window for the data stream calculated by the TCP stack.
8. An electronic device, characterized in that: include: a memory for storing computer program instructions; as well as, A processor, configured to execute the computer program instructions to complete the operation of the TCP flow control method for a satellite network as described in any one of claims 1 to 6.
9. A computer-readable storage medium for storing computer program instructions readable by a computer, characterized in that: The computer program instructions are configured to execute the operations of the TCP flow control method for a satellite network as claimed in any one of claims 1 to 6 when executed.
Citation Information
Patent Citations
Congestion control method in wireless multimedia sensor network
CN105007235A
Data processing method, device and equipment
CN111698275A