TCP congestion control method, device, terminal and readable storage medium
By obtaining the key characteristics of user flow and ISP resources, and determining the recommended congestion window of the TCP protocol layer, the problems of low efficiency and insufficient fairness of TCP solutions are solved, and the user experience and resource utilization efficiency are improved.
Patent Information
- Application Number
- CN201911073237.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-11-05
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2039-11-05
AI Technical Summary
Existing TCP solutions are inefficient when accessing a large number of terminals, resulting in fairness of each stream that enables the available resources of effective mobile phone users to be diluted and have low user experience.
By obtaining the key characteristics of user flow, obtaining ISP resources cached to the buffer queue, and determining the recommended congestion window of the TCP protocol layer control block based on the key characteristics, sending data packets using the sliding window principle, and actively adjusting the congestion window to avoid network congestion.
It improves the available resources of effective users, improves user experience, and avoids network congestion caused by passive adjustment of congestion windows in traditional TCP methods.
Smart Images

Figure CN112787942B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to, but are not limited to, the field of computer communication networks, and specifically, relate to, but are not limited to, a TCP congestion control method, device, terminal, and readable storage medium. Background Art
[0002] Wireless networks have their own specific transmission characteristics, such as out-of-order message forwarding, inability to accurately and timely determine packet loss, and shortage of air interface resources during busy hours. When these situations occur, the Internet access rate of users will change drastically, affecting the Internet experience of mobile users. Figure 1 As shown, Figure 1 This is the networking diagram of the core network where TCPO is located. The TCP proxy and optimization network element TCPO (hereinafter referred to as TCPO for the optimization network element) are deployed on the intermediate node between the user UE and the ISP, dividing the TCP connection between the UE and the ISP into two segments. According to the transmission characteristics of the wireless network environment and the behavioral characteristics of mobile users, the TCP protocol forwarding performance can be optimized through the network element's own cache, congestion control and other mechanisms, reducing the Internet access rate reduction caused by disordered packet loss in wireless transmission, and improving and enhancing the Internet access experience of 2G / 3G / 4G mobile users, including web browsing, FTP downloading, video services, etc.
[0003] TCPO network elements have been commercially used in large quantities, and the key component is the congestion control algorithm. The implemented algorithms mainly refer to the relevant implementations of TCP protocols in FreeBSD and Linux, such as Newreno, Cubic, Westwood, CDG, Fast, etc. However, the growth of traditional TCP is too slow. Assuming a network with 10G bandwidth*100ms, it requires 100,000 CWNDs of packet size to fully utilize it. Newreno and its ilk take half of 50,000 as a valve, and then buy one RTT to increase one CWND. In this way, it takes 50,000 RTTs to be full, which means it takes 1.4 hours. In most cases, the flow has been closed long ago. Therefore, how to approach the maximum utilization rate, especially in LFN, is a problem that TCP congestion control algorithms have consistently tried to solve. For example, the CUBIC algorithm is an improved version of the BIC-TCP algorithm. On the basis of basically complying with the idea of the BIC-TCP algorithm, it increases the friendliness of the standard TCP protocol. The CUBIC algorithm uses the time delay from the measured congestion to the present as the basis for calculating the size of cwnd, and uses a cubic function curve to fit the growth of the window near the peak value, which has become the default standard in the Linux operating system. In short, TCPO draws on the TCP standard and implementation methods such as FresBSD to control the flow of data packets and avoid congestion.
[0004] Ordinary TCP congestion control algorithms all consider the link judgment between point-to-point or client-to-server. Due to the limitations of the TCP protocol, it cannot be informed of the actual network situation. Therefore, it uses delay or packet loss as a signal to determine whether the network channel is full, and then actively reduces or increases the speed. Generally speaking, the initial design of the TCP protocol does not have the perception of network congestion information. So traditional TCP algorithms are like blind people feeling an elephant, relying on rtt delay or packet loss to guess whether the network is busy. At the same time, this is also a method that has to be adopted for PC or UE terminals. After all, the terminal UE does not perceive the network state.
[0005] At the same time, with the advent of the 5G era and the promotion of the Internet of Things and the Internet of Vehicles, a large number of terminals are connected. The traditional TCP solution has become increasingly inefficient. The fairness of TCP makes each flow equal, which greatly dilutes the available resources of effective mobile phone users.
[0006] There are limits to the working capacity of the links in the network and the caches and processors in the switching nodes. When the network demand exceeds their working limits, congestion occurs. Congestion control is to prevent too much data from being injected into the network, so that the routers or links in the network will not be overloaded. The common methods are: 1. Slow start, congestion control; 2. Fast retransmission, fast recovery. One implementation method is as follows:
[0007] (1). The sender maintains a variable called "congestion window", which together with the receiving port determines the sender's sending window;
[0008] (2). When the host starts sending data, avoid injecting a large number of bytes into the network at once, which may cause or increase congestion. Instead, choose to send a probing message of 1 byte;
[0009] (3). After receiving the acknowledgment of the first byte of data, send a message of 2 bytes;
[0010] (4). If the acknowledgment of 2 bytes is received again, send 4 bytes, increasing exponentially by 2 in turn;
[0011] (5). Finally, it will reach a pre-set "slow start threshold", such as 24, that is, 24 packets are sent at one time. At this time, the following conditions are judged:
[0012] *1. cwnd < ssthresh, continue to use the slow start algorithm;
[0013] *2. cwnd > ssthresh, stop using the slow start algorithm and switch to the congestion avoidance algorithm;
[0014] *3.cwnd=ssthresh, either the slow start algorithm or the congestion avoidance algorithm can be used;
[0015] (6) The congestion avoidance algorithm is: after each round trip time (RTT), the sender's congestion window is increased by 1, that is, the congestion window is slowly increased according to the linear law;
[0016] (7) When network congestion occurs, such as packet loss, the slow start threshold is set to half of the original value, and then cwnd is set to 1 to execute the slow start algorithm (lower starting point, exponential growth);
[0017] It can be considered that the sender takes the minimum value of the congestion window and the notification window as the upper limit of sending. The congestion window is the flow control used by the sender, and the notification window is the flow control used by the receiver.
[0018] The TCP protocol layer uses the protocol control block PCB to store multiple pieces of information required by each UDP and TCP socket. The Internet protocol maintains the Internet protocol control block (internet protocol control block) and the TCP control block (TCP control block). Because UDP is connectionless, all the information required by an end node is found in the Internet PCB, and there is no UDP control block.
[0019] The Internet PCB contains information common to all UDP and TCP endpoints: external and local IP addresses, external and local port numbers, IP header prototype, IP options used by the endpoint, and a pointer to the routing table entry for the destination address of the endpoint. The TCP control block contains all the node information maintained by TCP for each connection: sequence numbers in both directions, window size, number of retransmissions, etc.
[0020] The core process of an existing system architecture can be found in Figure 2 , Figure 3-1 and Figure 3-2 , its core business logic is:
[0021] 1. User UE access;
[0022] 2. The user initiates a TCP stream request message;
[0023] 3. TCPO accepts the request;
[0024] 4. TCPO requests resources from ISP;
[0025] 5. TCPO obtains ISP resources and caches them into the buffer queue;
[0026] 6. TCPO obtains the sending quota of N data packets according to the TCP congestion control algorithm module;
[0027] 7. TCPO sets the congestion window of the TCP protocol layer control block according to the quota, and sends the data packets in the buffer queue to the UE based on the principle of sliding window;
[0028] 8. TCPO confirms the sent packet based on the ACK message received from the UE, and then goes to step 6 again to reacquire the quota;
[0029] 9. Until the cache queue is fully processed. Summary of the invention
[0030] The embodiments of the present invention provide a TCP congestion control method, device, terminal and readable storage medium, which mainly solve the technical problem that in the current related technology, when a large number of terminals are connected, the TCP solution is inefficient, and the fairness of TCP makes each flow equal, which greatly dilutes the available resources of effective mobile phone users and leads to low user experience.
[0031] To solve the above technical problems, an embodiment of the present invention provides a TCP congestion control method, including:
[0032] Obtaining key features of the user flow;
[0033] Obtaining ISP resources and caching them into a buffer queue, wherein the ISP resources are resources generated according to the user's TCP stream request message;
[0034] Determine a recommended congestion window of a TCP protocol layer control block according to the key features;
[0035] The data packets in the buffer queue are sent to the user according to the principle of a sliding window.
[0036] The embodiment of the present invention further provides a TCP congestion control device, wherein the TCP congestion control device comprises:
[0037] A first acquisition module, used to acquire key features of the user flow;
[0038] A second acquisition module is used to acquire ISP resources and cache them into a buffer queue, wherein the ISP resources are resources generated according to the user's TCP stream request message;
[0039] A determination module, used to determine a recommended congestion window of a TCP protocol layer control block according to the key features;
[0040] The sending module is used to send the data packets in the buffer queue to the user according to the principle of sliding window.
[0041] An embodiment of the present invention further provides a terminal, the terminal comprising: a processor, a memory and a communication bus;
[0042] The communication bus is used to realize the connection and communication between the processor and the memory;
[0043] The processor is used to execute one or more computer programs stored in the memory to implement the steps of the TCP congestion control method as described in any one of the above items.
[0044] An embodiment of the present invention also provides a computer-readable storage medium, which stores one or more computer programs. The one or more computer programs can be executed by one or more processors to implement the steps of the TCP congestion control method as described in any one of the above items.
[0045] The beneficial effects of the present invention are:
[0046] The present invention provides a TCP congestion control method, device, terminal and readable storage medium. The TCP congestion control method obtains the key features of the user, obtains the ISP resources generated according to the TCP flow request message of the user to the buffer queue, and determines the recommended congestion window of the TCP protocol layer control block according to the key features, and then sends the data packet in the buffer queue to the customer according to the principle of the sliding window. By allocating the corresponding recommended congestion window according to the key features of different users, the corresponding recommended congestion window is provided according to different users, and the same standard is no longer used, thereby improving the available resources of effective users and improving the user experience.
[0047] Other features and corresponding beneficial effects of the present invention are described in the latter part of the specification, and it should be understood that at least part of the beneficial effects become obvious from the description in the specification of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 A schematic diagram of a core network group where TCPO is located provided as the background technology of the present invention;
[0049] Figure 2 A core flow diagram of a system architecture provided as the background technology of the present invention;
[0050] Figure 3-1 A core flow diagram of a system architecture provided as the background technology of the present invention;
[0051] Figure 3-2 A TCPO transmission flow diagram provided as the background technology of the present invention;
[0052] Figure 4A schematic diagram of a TCP congestion control method flow provided in Embodiment 1 of the present invention;
[0053] Figure 5 A schematic diagram of building a deep learning model and performing deep model training provided in the first embodiment of the present invention;
[0054] Figure 6 A schematic diagram of clustering algorithm operation provided in Embodiment 1 of the present invention;
[0055] Figure 7-1 A schematic diagram of the structure of a TCP congestion control device provided in Embodiment 2 of the present invention;
[0056] Figure 7-2 A schematic diagram of the structure of another TCP congestion control device provided in Embodiment 2 of the present invention;
[0057] Figure 7-3 A schematic diagram of the structure of a first determination submodule provided in Embodiment 2 of the present invention;
[0058] Figure 7-4 A schematic diagram of the structure of another TCP congestion control device provided in Embodiment 2 of the present invention;
[0059] Figure 7-5 A schematic diagram of the structure of another TCP congestion control device provided in Embodiment 2 of the present invention;
[0060] Figure 7-6 A schematic diagram of the structure of another determination module provided in Embodiment 2 of the present invention;
[0061] Figure 8 A schematic diagram of the structure of a terminal provided in Embodiment 3 of the present invention. DETAILED DESCRIPTION
[0062] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the following is a further detailed description of the embodiments of the present invention through specific implementation methods combined with the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0063] Embodiment 1:
[0064] See also Figure 4 , a TCP congestion control method provided in this embodiment includes:
[0065] S401: Obtain key features of user flow;
[0066] S402: Obtain ISP resources and cache them into a buffer queue;
[0067] S403: Determine a recommended congestion window of a TCP protocol layer control block according to the key features;
[0068] S404: Send the data packets in the buffer queue to the user according to the principle of the sliding window.
[0069] In some embodiments, TCPO obtains ISP resources and caches them in a buffer queue, wherein the ISP resources are resources generated according to user flow request messages. Specifically, a user accesses and initiates a TCP flow request message, TCPO accepts the request, requests resources from the ISP, and TCPO obtains ISP resources and caches them in a buffer queue.
[0070] In some embodiments, the key features of the user flow may include a five-tuple consisting of the source IP address, source port, destination IP address, destination port, and transport layer protocol of the user flow, as well as the UE network standard, location information, etc.
[0071] In some embodiments, a specific embodiment of determining the recommended congestion window of the TCP protocol layer control block based on key features may be that TCPO sends the key features of the user flow to a specific algorithm module, obtains the sending quota corresponding to the user flow as N data packets through calculation, and TCPO sets the recommended congestion window of the TCP protocol layer control block according to the above sending quota, and sends the data packets in the buffer queue to the UE based on the principle of a sliding window.
[0072] In some embodiments, TCP0 confirms the sent packet according to the received ACK message of the UE, and then proceeds to step S403 to re-acquire the recommended congestion window, and repeats the above process until all the cache queues are processed.
[0073] Compared with the existing related technologies, which rely on RTT delay or packet loss to guess whether the network is busy, and blindly increase the congestion window if the network is not busy, or blindly reduce the congestion window if the network is busy, this passive adjustment of the congestion window, the invention provides a method of determining the recommended congestion window based on key features, which can actively predict possible network congestion, actively adjust the congestion window, and avoid the actual occurrence of network congestion.
[0074] In some embodiments, determining a recommended congestion window for a TCP protocol layer control block based on key features includes:
[0075] A recommended congestion window model is established. The recommended congestion window model includes grouping of users and recommended congestion windows corresponding to each group. The recommended congestion window corresponding to the user is determined by determining the group to which the user belongs according to key features.
[0076] It should be noted that, in some embodiments, establishing a recommended congestion window model includes:
[0077] Obtain the core business indicators of each sample user;
[0078] Perform clustering algorithm operations on core business indicators to obtain preliminary groups of sample users and preliminary recommended congestion windows corresponding to each preliminary group;
[0079] Obtaining a negative incentive signal, where the negative incentive signal is a negative incentive signal generated when users in each preliminary group execute a TCPO business process according to a corresponding preliminary recommended congestion window;
[0080] The negative incentive signal is used as a negative sample consideration indicator to redefine the grouping of sample users and the recommended congestion window corresponding to each group.
[0081] It should be noted that in order to make the recommended congestion window model more accurate, the number and type distribution of sample users should cover as many types of users as possible. Since it is very difficult to achieve full coverage of all types of users, when establishing the recommended congestion window model, a balance point that users are more satisfied with can be achieved between the accuracy of the model and the rationality of the samples, so as to ensure the relative accuracy of the recommended congestion window model and achieve the rationality of the resource occupancy and cost of establishing the recommended congestion window model.
[0082] In some embodiments, in order to more conveniently obtain the core business indicators of each sample user and to more conveniently update the recommended congestion window model, data collection and analysis can be performed by setting up an additional traffic analysis server NAP. The dimensions of collection may include at least some of the following dimensions but are not limited to the following collection dimensions: year, month, date, day of the week, hour, minute, second, congestion window, activity, base station, target IP, source port, target port, standard, RTT delay, cumulative traffic, whether congestion, queue depth, etc., wherein the determination method of activity is described in detail below, and an implementation example of data collection is shown in Table 1:
[0083] Table 1
[0084]
[0085] In some embodiments, the core network advantage can be utilized to collect user location information in non-real time, that is, to collect user's home base station information in non-real time, as an alternative collection dimension.
[0086] It should be noted that the core business indicators of the sample users of the recommended congestion window model may also be obtained by those skilled in the art in other ways.
[0087] It should be noted that after the recommended congestion window model is established, it may not be updated, or it may be updated as needed by supplementing the core business indicators of new sample users. In order to make the recommended congestion window obtained by the recommended congestion window model more accurate, it may also be updated according to a preset time interval, which may be set according to the needs of technical personnel in this field.
[0088] In some embodiments, the establishment of the recommended congestion window model can adopt traditional algorithms, but traditional algorithms are slow to speed up. On the other hand, artificial intelligence algorithms, namely AI algorithms, can be used to perform clustering algorithm operations on the core business indicators of users through AI algorithms, set clustering M groups, namely preliminary grouping M groups, modeling and learning for M groups, and the input layer is evaluated for M groups. The evaluation method can be to execute the negative incentive signal of the TCPO business process generated by the preliminary grouped users according to the corresponding preliminary recommended congestion window. For sample Mi (i takes the value of 1-M), for the negative incentive signal received in the group, according to theoretical analysis combined with practical application, the negative incentive signal adopts the following signals with different weight values, including but not limited to at least one of the following: triggering network congestion, packet loss, three repeated acks, sending delays, and reaching fire extinguishing indicators, reaching annealing indicators, as the consideration indicators of negative samples, it should be noted that the indicators for triggering emergency fire extinguishing and fire reduction are detailed in the subsequent description. Different transmission resources are allocated to users of different feature categories for collection, wherein the different transmission resources include but are not limited to at least one of the following: recommended congestion window, cache queue size, initial sending window size, flow priority, etc. The best evaluated group is selected as the recommended group Mo, and the average wsnd sending window size of the group is passed to the main control module of TCPO. In the TCP control block of the same matching group, the recommended sending window is recorded for the preferred sending window.
[0089] In some embodiments, in some embodiments, as Figure 5 As shown, determining the recommended congestion window of the TCP protocol layer control block according to the key characteristics may also include:
[0090] Obtain the core business indicators of each sample user, build a deep learning model, perform deep model training, obtain the fitting function between the core business indicators and network congestion or delay exceeding the preset delay threshold, and determine the recommended congestion window corresponding to the user based on the fitting function and key features.
[0091] In some embodiments, a clustering algorithm operation may be performed on the sample users, such as Figure 6As shown, M groups are obtained after clustering, and then an N-layer deep learning model is built. The index data sampled within a period of time is trained with the deep model, and the input is a table of various characteristic values of M. The training is carried out through positive and negative samples. The purpose is to learn the characteristic index and the fitting function Y that causes network congestion or excessive delay through the sample data. In this way, for user flows in similar situations, the recommended congestion window can be calculated through function Y, so as to send data flows of appropriate sizes. Compared with the method of performing initialization on TCPO, and then sending the key features of the user to NAP regularly through another task thread, and NAP performing group determination calculation, and regularly backfilling the recommended congestion window of the group to which it belongs for subsequent use by TCPO, the user flow obtains the recommended congestion window through the recommended congestion window model when applying for the recommended congestion window calculation in the future. This method avoids the performance impact of the recommended congestion model calculation on TCPO.
[0092] In some embodiments, before determining the recommended congestion window of the TCP protocol layer control block according to the key features, the method further includes:
[0093] Obtaining the accumulated traffic of the user;
[0094] If the accumulated flow is greater than a preset accumulated flow threshold, obtaining a current activity index of the TCP control block supporting flow corresponding to the user;
[0095] If there is a current activity index greater than a preset activity threshold, then obtaining a hottest user list of the current system, wherein the hottest user list includes users with the largest preset number of congestion windows corresponding to users whose cumulative traffic in the current system exceeds the preset cumulative traffic threshold and whose current activity index is greater than the preset activity index;
[0096] If the user is not in the hottest user list, obtaining the minimum congestion window corresponding to each user in the hottest user list;
[0097] If the current congestion window of the user is larger than the minimum congestion window, the user is added to the hottest user list.
[0098] It should be noted that the preset cumulative flow threshold can be set by those skilled in the art according to actual needs, and the present invention does not limit it.
[0099] It should be noted that, for the comparison of the set threshold in the present invention, it is well known to those skilled in the art that a threshold equal to a preset threshold can be taken as a threshold for executing subsequent steps. For example, in this embodiment, it can also be: if the cumulative flow is equal to the preset cumulative flow threshold, the current activity index of the TCP control block supporting flow corresponding to the user is obtained. In order to make the specification more concise, this type of example will not be listed one by one.
[0100] In some embodiments, obtaining the accumulated traffic of a user can be understood as the accumulated traffic of all TCP flow request messages existing for the user.
[0101] It should be noted that the current congestion window of the user can be understood as the congestion window of the user when the user last received a data packet in the buffer queue before obtaining the recommended congestion window.
[0102] It should be noted that after the user is added to the hottest user list, the last user in the hottest user list will be removed from the hottest user list. That is, the user will replace the user with the smallest congestion window.
[0103] It should be noted that when a user has multiple flows, the current congestion window of the user is equal to the sum of the congestion windows corresponding to each flow. For example, there are users A and B in the current hottest list. User A has flows A and B, and user B has flow C, where the current congestion window of flow A is 5, the current congestion window of flow B is 8, and the current congestion window of flow C is 9. At this time, the current congestion window of user A = 5 + 8 = 13, and the current congestion window of user B is 9, so the minimum congestion window corresponding to each user in the current hottest user list is equal to 8. The existing user C does not exist in the hottest user list, and the cumulative flow of user C is greater than the preset cumulative flow threshold, and the current activity index of user C is greater than the preset activity threshold, then the current congestion window of user C is equal to 10. At this time, the current congestion window of user C is greater than the minimum congestion window. At this time, C replaces user B and exists in the hottest user list.
[0104] In some embodiments, obtaining the current activity index of the TCP control block supporting flow corresponding to the user includes:
[0105] When receiving the ack confirmation, obtain the last reported activity index and the time of the last reported activity index;
[0106] If the current congestion window is larger than the preset congestion window, the time interval between the current time and the last time the activity index was reported is larger than the preset time interval, and the last reported activity index is smaller than the maximum activity index;
[0107] Then, the current activity index is equal to the last reported activity index plus the linear cumulative value.
[0108] It should be noted that the preset time interval is used to distinguish whether it is in a continuous transmission state. Considering the impact of delayed ack, the preset time interval can be 3 times the average RTT, or it can be set by technicians in this field.
[0109] It should be noted that the specific value of the preset congestion window can be set by those skilled in the art according to actual needs, and its function is to reduce the amount of calculation and filter out some smaller stream transmissions.
[0110] It should be noted that since an excessively large activity index will cause the recent speed reduction to not be quickly fed back to the current flow, there is usually a maximum activity index limit to limit the unreasonable growth of the current activity index. The maximum activity index can be set by those skilled in the art according to actual needs or experience.
[0111] It should be noted that the linear cumulative value may also be set by those skilled in the art according to actual needs or experience. The linear cumulative value is a positive number.
[0112] In some embodiments, obtaining the current activity index of the TCP control block supporting flow corresponding to the user includes:
[0113] When the ack confirmation is received,
[0114] If the last reported activity index cannot be obtained;
[0115] Then the current activity index is equal to the initial activity index.
[0116] It should be noted that if the last reported activity index cannot be obtained, it is often because the user has not received any data packets in the buffer queue, so its congestion window is still the initial congestion window. At this time, the current activity index of the flow is equal to the initial activity index. The initial activity index can be set by those skilled in the art according to actual needs or experience.
[0117] In some embodiments, the initial activity index is equal to 1, the linear cumulative value is equal to 1, and the maximum activity index is equal to 10. It should be noted that those skilled in the art can also set the initial activity index to a negative value or other positive value, and the remaining linear cumulative values, maximum activity index, etc. are changed according to the corresponding logic.
[0118] In some embodiments, the value of the activity index lies in reflecting the traffic activity of the current flow, which plays an identification role in subsequent user classification, indicator collection, and system control. By grading the activity index, system-level reverse traffic control can be performed on the same type of flows in the entire system. In some embodiments, the current activity index takes a value of 1-9, and a mechanism of first accumulation and multiplication reduction is adopted, which can reflect the activity of the flow and have good feedback on the active speed reduction of the flow. Usually, when the congestion window is reduced, the network on the UE side has a bottleneck, and the active penalty speed reduction is taken, entering the concave function curve, so the flow will not become active quickly at this time; if the current activity index is too large, the recent speed reduction cannot be quickly fed back to the current flow, so it is usually set to less than 10, which can have a better effect; in addition, calculating the current activity index for a flow that is too small wastes performance and has no value, and calculating for a flow with too large a delay is also worthless. According to the traditional TCP congestion algorithm, a flow with too large a T will not continue to increase in speed; in particular, if the flow is in session hold, that is, no data is sent temporarily, but the flow still exists and the window is large, the algorithm can also adapt well, because of the existence of the preset time interval, the activity of the flow will remain at a high level, but will not continue to grow. Once the user continues to surf the Internet, it can be quickly identified and treated as a highly active user. In short, the algorithm can adapt to most scenarios, and the calculation amount is extremely small, does not affect the performance of the original system, and classifies users of different activity levels, providing a means for subsequent reverse control of the overall system traffic.
[0119] In some embodiments, determining a recommended congestion window for a TCP protocol layer control block based on key features includes:
[0120] If the user is in the most popular user list;
[0121] Get the current activity of the user's stream;
[0122] Get the current system load;
[0123] If the annealing index is reached, the recommended congestion window is less than or equal to the current congestion window; the annealing index includes: the load is greater than a first preset threshold and less than a second preset threshold, and there is a current activity greater than the activity threshold, and the user's current congestion window is greater than the standard window; the standard window includes the average value of the current congestion windows of users in the hottest user list in the system within a preset time.
[0124] It should be noted that when the return index is reached, the recommended congestion window can be selected to be equal to the current congestion window, or it can be equal to the current congestion window multiplied by a first preset ratio, where the first preset ratio is greater than 0 and less than 1. The value of the first preset ratio can be set by the user or a technician in this field and is not limited here.
[0125] It should be noted that in some embodiments, the hottest user list is a real-time updated list. When the system switch is turned on, the user flow needs to provide the phone number or source IP, congestion window, and reporting time. When the user flow reports the phone number, the congestion window corresponding to the user is the cumulative sum of the congestion windows of all flows corresponding to the user.
[0126] It should be noted that each time a user receives a message confirmation ACK, it is reported to the shared memory area. If the user's congestion window is larger than the minimum congestion window corresponding to each user in the hottest user list, the user will replace the user with the smallest congestion window in the hottest user group and be added to the hottest user list. It can be understood that the effectiveness of the hottest user list is only the list of several users with larger congestion windows within a time period. Set the TCPtimer timing reporting mechanism, and the reporting period is 100 times the average rtt. If it is found that no message is received within 100rtt, it will actively clear its ranking record to ensure the update of the ranking list. The design of this algorithm adds the user with the largest sliding window in the system to the ranking list through self-checking every time a message confirmation ACK is received, so that the global control body stores the traffic standard window size sample of the users who have been online continuously for a short period of time in the current system, that is, dw. The timed cleanup mechanism, which is much longer than RTT, reduces the timer startup resources; the mechanism of automatic reporting of active flows in the ACK process greatly reduces the system loss of all flows in rotation. Usually, active flows only account for a small part of all flows, and are only updated when they are active, which disperses the system pressure of concurrent updates. The existence of the hottest user list can reflect the traffic usage of the system's large traffic users, and is an important monitoring target in traffic management.
[0127] In some embodiments, determining a recommended congestion window for a TCP protocol layer control block based on key features includes:
[0128] If the user is in the most popular user list;
[0129] Get the current activity of the user's stream;
[0130] Get the current system load;
[0131] If the fire extinguishing index is reached, the recommended congestion window is smaller than the current congestion window; the fire extinguishing index includes: the load is greater than the second preset threshold, and the user's current congestion window is greater than the standard window; the standard window includes the average value of the current congestion windows of users in the hottest user list in the system within the preset time.
[0132] It should be noted that when the fire extinguishing index is reached, the window needs to be reduced. At this time, the recommended congestion window is equal to the current congestion window multiplied by the second preset ratio, where the second preset ratio is greater than 0 and less than 1. The value of the second preset ratio can be set by the user or technical personnel in this field and is not limited here.
[0133] It should be noted that, although the total traffic of the system is constantly changing, the sample of high-traffic users in the recent short period of time can reflect the current macroscopic size of the traffic and can usually be used as the basis for measurement. This embodiment adopts a low-loss and low-overhead method on the original system to obtain sample data of large traffic users, which can be used as a dynamic traffic reduction method. It does not affect the Internet access of new users, and can be targeted to make partial network concessions to users who have continuously occupied the network for a long time, thereby complying with the fairness principle of TCP.
[0134] In some embodiments, determining a recommended congestion window of a TCP protocol layer control block according to the key features includes:
[0135] Get the current system load;
[0136] If the load is less than a third preset threshold and the user is a new user;
[0137] Then, the recommended window is equal to the standard window multiplied by the third preset ratio, and the standard window includes the average value of the current congestion windows of the users in the hottest user list in the system within the preset time.
[0138] It should be noted that the third preset threshold is smaller than the first preset threshold which is smaller than the second preset threshold.
[0139] It should be noted that new users can be understood as users who initiate TCP flow request messages after access, TCPO accepts the request, requests resources from the ISP, and TCPO obtains ISP resources and caches them in the buffer queue, but has not yet sent the data packets in the buffer queue to the users. In other words, it can be understood that new users are users who have not received data packets in the buffer queue.
[0140] It should be noted that the third preset ratio is greater than 0 and less than 1, and the value of the third preset ratio can be set by the user or a person skilled in the art, for example, 50%.
[0141] In some embodiments, a suitable recommended congestion window can be directly obtained for new users by recommending a congestion window model or a fitting function. At this time, the recommended congestion window for new users can also be understood as an initial congestion window. It should be noted that when the load of the system is less than the third preset threshold, the value of the initial congestion window can be appropriately set to be larger, thereby avoiding the problem of a long slow acceleration phase at the beginning of sending data packets.
[0142] In some embodiments, the negative excitation signal includes but is not limited to at least one of the following: triggering network congestion, packet loss, three repeated acks, sending delay, reaching an annealing index, and reaching a fire extinguishing index.
[0143] In some embodiments, a shared storage hash table can be opened to obtain a list of the system's current hottest users. When a user receives a data packet, the user's traffic and current sending window size are reported, and the activity is calculated based on a traffic activity algorithm. The activity algorithm takes into account whether continuous transmission is in an ascending or descending range, as well as the weight setting of the sending window and the initial valve ratio. The purpose is to record the relatively active user traffic and sending window for a period of time, so as to provide the required reference data for emergency annealing of the system. At the same time, considering the impact on system performance, only relatively active users are recorded, and there is no need to track and record all of them.
[0144] In some embodiments, after determining the recommended congestion window, the notification window of the receiving end can also be obtained. It should be noted that the congestion window is the flow control used by the sender, and the notification window is the flow control used by the receiver. After obtaining the notification window, the smaller of the recommended congestion window and the notification window is taken as the upper limit of sending.
[0145] The method provided in this embodiment is further described below through a specific example.
[0146] When the user UE accesses the Internet, it establishes a link with TCPO through the TCP three-way handshake. There is at least one user flow. At the same time, TCPO establishes a link with the web. The UE initiates a get request. At this time, the uplink stage will extract the key features of the user flow. The get request is forwarded to the web, and the web returns data or corresponding resources to the TCPO cache queue. The TCP congestion control method provided in this embodiment matches the recommended congestion window corresponding to the user flow, and then returns the cached data in the cache queue to the UE according to the principle of the sliding window.
[0147] The present invention provides a TCP congestion control method, device, terminal and computer-readable storage medium. The TCP congestion control method obtains the key features of the user by obtaining the ISP resources generated according to the TCP flow request message of the user to the buffer queue, and determines the recommended congestion window of the TCP protocol layer control block according to the key features, and then sends the data packet in the buffer queue to the client according to the principle of sliding window. By allocating corresponding recommended congestion windows according to the key features of different users, the corresponding recommended congestion windows are provided according to different users, and the same standard is no longer used, thereby improving the available resources of effective users and improving the user experience.
[0148] Embodiment 2:
[0149] This embodiment also provides a TCP congestion control device, such as Figure 7-1 As shown, the TCP congestion control device 700 includes:
[0150] The first acquisition module 701 is used to acquire key features of user flows;
[0151] The second acquisition module 702 is used to acquire ISP resources and cache them into a buffer queue, where the ISP resources are resources generated according to the user's TCP stream request message;
[0152] A determination module 703, configured to determine a recommended congestion window of a TCP protocol layer control block according to key features;
[0153] The sending module 704 is used to send the data packets in the buffer queue to the user according to the principle of the sliding window.
[0154] In some embodiments, TCPO obtains ISP resources and caches them in a buffer queue, wherein the ISP resources are resources generated according to the user's TCP stream request message. Specifically, the user accesses and initiates a TCP stream request message, TCPO accepts the request, requests resources from the ISP, and TCPO obtains ISP resources and caches them in a buffer queue.
[0155] In some embodiments, the key features of the user flow may include a five-tuple consisting of the source IP address, source port, destination IP address, destination port, and transport layer protocol of the user flow, as well as the UE network standard, location information, etc.
[0156] In some embodiments, a specific embodiment of determining the recommended congestion window of the TCP protocol layer control block based on key features may be that TCPO sends the key technical features of the user flow to a specific algorithm module, obtains the sending quota corresponding to the user flow as N data packets through calculation, and TCPO sets the recommended congestion window of the TCP protocol layer control block according to the above sending quota, and sends the data packets in the buffer queue to the UE based on the principle of a sliding window.
[0157] In some embodiments, TCP0 confirms the sent packet according to the received ACK message of the UE, and then proceeds to step S103 to re-acquire the recommended congestion window, and repeats the above process until all the cache queues are processed.
[0158] Compared with the existing related technologies, which rely on RTT delay or packet loss to guess whether the network is busy, and blindly increase the congestion window if the network is not busy, or blindly reduce the congestion window if the network is busy, this passive adjustment of the congestion window, the invention provides a method of determining the recommended congestion window based on key features, which can actively predict possible network congestion, actively adjust the congestion window, and avoid the actual occurrence of network congestion.
[0159] In some embodiments, Figure 7-2 As shown, the determination module 703 includes:
[0160] The first determination submodule 7031 is used to establish a recommended congestion window model, wherein the recommended congestion window model includes groups of the user and recommended congestion windows corresponding to each group, and determines the recommended congestion window corresponding to the user by determining the group to which the user belongs according to the key feature.
[0161] In some embodiments, Figure 7-3 As shown, the first determining submodule 7031 also includes:
[0162] The sample acquisition module 70311 is used to obtain the core business indicators of each sample user;
[0163] A clustering algorithm module 70312 is used to perform a clustering algorithm operation on the core business indicators to obtain preliminary groups of the users and preliminary recommended congestion windows corresponding to the preliminary groups;
[0164] A negative incentive signal acquisition module 70313 is used to acquire a negative incentive signal, where the negative incentive signal is a negative incentive signal generated when the users of each preliminary group execute the TCPO business process according to the corresponding preliminary recommended congestion window;
[0165] The redetermining module 70314 is used to use the negative excitation signal as a negative sample consideration indicator to redetermine the groups of the sample users and the recommended congestion windows corresponding to each group.
[0166] It should be noted that in order to make the recommended congestion window model more accurate, the number and type distribution of sample users should cover as many types of users as possible. Since it is very difficult to achieve full coverage of all types of users, when establishing the recommended congestion window model, a balance point that users are more satisfied with can be achieved between the accuracy of the model and the rationality of the samples, so as to ensure the relative accuracy of the recommended congestion window model and achieve the rationality of the resource occupancy and cost of establishing the recommended congestion window model.
[0167] In some embodiments, in order to more conveniently obtain the core business indicators of each sample user and to more conveniently update the recommended congestion window model, data collection and analysis can be performed by setting up an additional traffic analysis server NAP. The dimensions of collection may include at least some of the following dimensions but are not limited to the following collection dimensions: year, month, date, day of the week, hour, minute, second, congestion window, activity, base station, target IP, source port, target port, standard, RTT delay, cumulative traffic, whether congestion, queue depth, etc., wherein the determination method of activity is described in detail below, and an implementation example of data collection is shown in Table 1:
[0168] Table 1
[0169]
[0170] In some embodiments, the core network advantage can be utilized to collect user location information in non-real time, that is, to collect user's home base station information in non-real time, as an alternative collection dimension.
[0171] It should be noted that the core business indicators of the sample users of the recommended congestion window model may also be obtained by those skilled in the art in other ways.
[0172] It should be noted that after the recommended congestion window model is established, it may not be updated, or it may be updated as needed by supplementing the core business indicators of new sample users. In order to make the recommended congestion window obtained by the recommended congestion window model more accurate, it may also be updated according to a preset time interval, which may be set according to the needs of technical personnel in this field.
[0173] In some embodiments, the establishment of the recommended congestion window model can adopt traditional algorithms, but traditional algorithms are slow to speed up. On the other hand, artificial intelligence algorithms, namely AI algorithms, can be used to perform clustering algorithm operations on the core business indicators of users through AI algorithms, set clustering M groups, namely preliminary grouping M groups, modeling and learning for M groups, and the input layer is evaluated for M groups. The evaluation method can be to execute the negative incentive signal of the TCPO business process generated by the preliminary grouped users according to the corresponding preliminary recommended congestion window. For sample Mi (i takes the value of 1-M), for the negative incentive signal received in the group, according to theoretical analysis combined with practical application, the negative incentive signal adopts the following signals with different weight values, including but not limited to at least one of the following: triggering network congestion, packet loss, three repeated acks, sending delays, and reaching fire extinguishing indicators, reaching annealing indicators, as the consideration indicators of negative samples, it should be noted that the indicators for triggering emergency fire extinguishing and fire reduction are detailed in the subsequent description. Different transmission resources are allocated to users of different feature categories for collection, wherein the different transmission resources include but are not limited to at least one of the following: recommended congestion window, cache queue size, initial sending window size, flow priority, etc. The best evaluated group is selected as the recommended group Mo, and the average wsnd sending window size of the group is passed to the main control module of TCPO. In the TCP control block of the same matching group, the recommended sending window is recorded for the preferred sending window.
[0174] In some embodiments, Figure 7-4 As shown, the determination module 703 includes:
[0175] The second determination submodule is used to obtain the core business indicators of each sample user, build a deep learning model, perform deep model training, obtain the fitting function between the core business indicators and network congestion or delay exceeding a preset delay threshold, and determine the recommended congestion window corresponding to the user based on the fitting function and the key features.
[0176] In some embodiments, a clustering algorithm operation may be performed on sample users to obtain M groups after clustering, and then an N-layer deep learning model is built. The index data sampled within a period of time is trained with a deep model, and the input is a table of various characteristic values of M. The training is performed through positive and negative samples, and the purpose is to learn the characteristic index and the fitting function Y that causes network congestion or excessive delay through the sample data. In this way, for user flows in similar situations, the recommended congestion window can be calculated through function Y, so as to send data flows of appropriate sizes. Compared with the method of performing initialization on TCPO, and then sending the key features of the user to NAP regularly through another task thread, and NAP performing group determination calculation, and regularly backfilling the recommended congestion window of the group to which it belongs for subsequent use by TCPO, the user flow obtains the recommended congestion window through the recommended congestion window model when applying for the recommended congestion window calculation later, which avoids the performance impact of the recommended congestion model calculation on TCPO.
[0177] In some embodiments, Figure 7-5 As shown, the TCP congestion control device 500 also includes:
[0178] A third acquisition module 705 is used to obtain the accumulated traffic of the user before the determination module determines the recommended congestion window of the TCP protocol layer control block according to the key feature;
[0179] The fourth acquisition module 706 is used to acquire the current activity index of the TCP control block supporting flow corresponding to the user if the accumulated flow is greater than the preset accumulated flow threshold;
[0180] A fifth acquisition module 707 is configured to acquire a hottest user list of the current system if there is a user whose current activity index is greater than a preset activity threshold, wherein the hottest user list includes users whose cumulative traffic in the current system exceeds a preset cumulative traffic threshold and whose current activity index is greater than a preset activity index and whose congestion windows have the largest preset number of users;
[0181] A sixth acquisition module 708 is configured to acquire the minimum congestion window corresponding to each user in the hottest user list if the user is not in the hottest user list;
[0182] The adding module 709 is configured to add the user to the hottest user list if the current congestion window of the user is greater than the minimum congestion window.
[0183] It should be noted that the preset cumulative flow threshold can be set by those skilled in the art according to actual needs, and the present invention does not limit it.
[0184] It should be noted that, for the comparison of the set threshold in the present invention, it is well known to those skilled in the art that a threshold equal to a preset threshold can be taken as a threshold for executing subsequent steps. For example, in this embodiment, it can also be: if the cumulative flow is equal to the preset cumulative flow threshold, the current activity index of the TCP control block supporting flow corresponding to the user is obtained. In order to make the specification more concise, this type of example will not be listed one by one.
[0185] In some embodiments, obtaining the accumulated traffic of a user can be understood as the accumulated traffic of all TCP flow request messages existing for the user.
[0186] It should be noted that the current congestion window of the user can be understood as the congestion window of the user when the user last received a data packet in the buffer queue before obtaining the recommended congestion window.
[0187] It should be noted that after the user is added to the hottest user list, the last user in the hottest user list will be removed from the hottest user list. That is, the user will replace the user with the smallest congestion window.
[0188] It should be noted that when a user has multiple flows, the current congestion window of the user is equal to the sum of the congestion windows corresponding to each flow. For example, there are users A and B in the current hottest list. User A has flows A and B, and user B has flow C, where the current congestion window of flow A is 5, the current congestion window of flow B is 8, and the current congestion window of flow C is 9. At this time, the current congestion window of user A = 5 + 8 = 13, and the current congestion window of user B is 9, so the minimum congestion window corresponding to each user in the current hottest user list is equal to 8. The existing user C does not exist in the hottest user list, and the cumulative flow of user C is greater than the preset cumulative flow threshold, and the current activity index of user C is greater than the preset activity threshold, then the current congestion window of user C is equal to 10. At this time, the current congestion window of user C is greater than the minimum congestion window. At this time, C replaces user B and exists in the hottest user list.
[0189] In some embodiments, the fourth acquisition module 706 further includes:
[0190] The fourth obtains the first submodule, which is used to obtain the last reported activity index and the last reported activity index time when receiving the ack confirmation;
[0191] The first activity index determination module is used to determine that if the current congestion window is larger than the preset congestion window, the time interval between the current time and the last time the activity index was reported is larger than the preset time interval, and the last time the activity index was reported is smaller than the maximum activity index; then, the current activity index is equal to the last time reported activity index plus a linear cumulative value.
[0192] It should be noted that the preset time interval is used to distinguish whether it is in a continuous transmission state. Considering the impact of delayed ack, the preset time interval can be 3 times the average RTT, or it can be set by technicians in this field.
[0193] It should be noted that the specific value of the preset congestion window can be set by those skilled in the art according to actual needs, and its function is to reduce the amount of calculation and filter out some smaller stream transmissions.
[0194] It should be noted that since an excessively large activity index will cause the recent speed reduction to not be quickly fed back to the current flow, there is usually a maximum activity index limit to limit the unreasonable growth of the current activity index. The maximum activity index can be set by those skilled in the art according to actual needs or experience.
[0195] It should be noted that the linear cumulative value may also be set by those skilled in the art according to actual needs or experience. The linear cumulative value is a positive number.
[0196] In some embodiments, the fourth acquisition module 706 further includes:
[0197] The second activity index determination module is used to determine that when an ACK confirmation is received, if the last reported activity index cannot be obtained, the current activity index is equal to the initial activity index.
[0198] It should be noted that if the last reported activity index cannot be obtained, it is often because the user has not received any data packets in the buffer queue, so its congestion window is still the initial congestion window. At this time, the current activity index of the flow is equal to the initial activity index. The initial activity index can be set by those skilled in the art according to actual needs or experience.
[0199] In some embodiments, the initial activity index is equal to 1, the linear cumulative value is equal to 1, and the maximum activity index is equal to 10. It should be noted that those skilled in the art can also set the initial activity index to a negative value or other positive value, and the remaining linear cumulative values, maximum activity index, etc. are changed according to the corresponding logic.
[0200] In some embodiments, the value of the activity index lies in reflecting the traffic activity of the current flow, which plays an identification role in subsequent user classification, indicator collection, and system control. By grading the activity index, system-level reverse traffic control can be performed on the same type of flows in the entire system. In some embodiments, the current activity index takes a value of 1-9, and a mechanism of first accumulation and multiplication reduction is adopted, which can reflect the activity of the flow and have good feedback on the active speed reduction of the flow. Usually, when the congestion window is reduced, the network on the UE side has a bottleneck, and the active penalty speed reduction is taken, entering the concave function curve, so the flow will not become active quickly at this time; if the current activity index is too large, the recent speed reduction cannot be quickly fed back to the current flow, so it is usually set to less than 10, which can have a better effect; in addition, calculating the current activity index for a flow that is too small wastes performance and has no value, and calculating for a flow with too large a delay is also worthless. According to the traditional TCP congestion algorithm, a flow with too large a T will not continue to increase in speed; in particular, if the flow is in session hold, that is, no data is sent temporarily, but the flow still exists and the window is large, the algorithm can also adapt well, because of the existence of the preset time interval, the activity of the flow will remain at a high level, but will not continue to grow. Once the user continues to surf the Internet, it can be quickly identified and treated as a highly active user. In short, the algorithm can adapt to most scenarios, and the calculation amount is extremely small, does not affect the performance of the original system, and classifies users of different activity levels, providing a means for subsequent reverse control of the overall system traffic.
[0201] In some embodiments, Figure 7-6 As shown, the determination module 703 includes:
[0202] The third determination submodule 7033 is used for, if the user is in the hottest user list; obtaining the current activity of the user's flow and the load of the current system; if the annealing index is reached, the recommended congestion window is less than or equal to the current congestion window; the annealing index includes: the load is greater than a first preset threshold and less than a second preset threshold, and there is a current activity greater than the activity threshold, and the current congestion window of the user is greater than a standard window; the standard window includes the average value of the current congestion windows of the users in the hottest user list in the system within a preset time;
[0203] and / or,
[0204] The fourth determination submodule 7034 is used for, if the user is in the hottest user list; obtaining the current activity of the user's flow; obtaining the load of the current system; if the fire extinguishing index is reached, the recommended congestion window is smaller than the current congestion window; the fire extinguishing index includes: the load is greater than a second preset threshold, and the user's current congestion window is greater than a standard window; the standard window includes an average value of the current congestion windows of the users in the hottest user list in the system within a preset time;
[0205] and / or,
[0206] The fifth determination submodule 7035 is used to obtain the load of the current system; if the load is less than a third preset threshold and the user is a new user; then, the recommendation window is equal to the standard window multiplied by a third preset ratio, and the standard window includes the average value of the current congestion windows of the users in the hottest user list in the system within a preset time.
[0207] It should be noted that when the return index is reached, the recommended congestion window can be selected to be equal to the current congestion window, or it can be equal to the current congestion window multiplied by a first preset ratio, where the first preset ratio is greater than 0 and less than 1. The value of the first preset ratio can be set by the user or a technician in this field and is not limited here.
[0208] It should be noted that in some embodiments, the hottest user list is a real-time updated list. When the system switch is turned on, the user flow needs to provide the phone number or source IP, congestion window, and reporting time. When the user flow reports the phone number, the congestion window corresponding to the user is the cumulative sum of the congestion windows of all flows corresponding to the user.
[0209] It should be noted that each time a user receives a message confirmation ACK, it is reported to the shared memory area. If the user's congestion window is larger than the minimum congestion window corresponding to each user in the hottest user list, the user will replace the user with the smallest congestion window in the hottest user group and be added to the hottest user list. It can be understood that the effectiveness of the hottest user list is only the list of several users with larger congestion windows within a time period. Set the TCPtimer timing reporting mechanism, and the reporting period is 100 times the average rtt. If it is found that no message is received within 100rtt, it will actively clear its ranking record to ensure the update of the ranking list. The design of this algorithm adds the user with the largest sliding window in the system to the ranking list through self-checking every time a message confirmation ACK is received, so that the global control body stores the traffic standard window size sample of the users who have been online continuously for a short period of time in the current system, that is, dw. The timed cleanup mechanism, which is much longer than RTT, reduces the timer startup resources; the mechanism of automatic reporting of active flows in the ACK process greatly reduces the system loss of all flows in rotation. Usually, active flows only account for a small part of all flows, and are only updated when they are active, which disperses the system pressure of concurrent updates. The existence of the hottest user list can reflect the traffic usage of the system's large traffic users, and is an important monitoring target in traffic management.
[0210] It should be noted that when the fire extinguishing index is reached, the window needs to be reduced. At this time, the recommended congestion window is equal to the current congestion window multiplied by the second preset ratio, where the second preset ratio is greater than 0 and less than 1. The value of the second preset ratio can be set by the user or technical personnel in this field and is not limited here.
[0211] It should be noted that, although the total traffic of the system is constantly changing, the sample of high-traffic users in the recent short period of time can reflect the current macroscopic size of the traffic and can usually be used as the basis for measurement. This embodiment adopts a low-loss and low-overhead method on the original system to obtain sample data of large traffic users, which can be used as a dynamic traffic reduction method. It does not affect the Internet access of new users, and can be targeted to make partial network concessions to users who have continuously occupied the network for a long time, thereby complying with the fairness principle of TCP.
[0212] It should be noted that the third preset threshold is smaller than the first preset threshold which is smaller than the second preset threshold.
[0213] It should be noted that new users can be understood as users who initiate TCP flow request messages after access, TCPO accepts the request, requests resources from the ISP, and TCPO obtains ISP resources and caches them in the buffer queue, but has not yet sent the data packets in the buffer queue to the users. In other words, it can be understood that new users are users who have not received data packets in the buffer queue.
[0214] It should be noted that the third preset ratio is greater than 0 and less than 1, and the value of the third preset ratio can be set by the user or a person skilled in the art, for example, 50%.
[0215] In some embodiments, a suitable recommended congestion window can be directly obtained for new users by recommending a congestion window model or a fitting function. At this time, the recommended congestion window for new users can also be understood as an initial congestion window. It should be noted that when the load of the system is less than the third preset threshold, the value of the initial congestion window can be appropriately set to be larger, thereby avoiding the problem of a long slow acceleration phase at the beginning of sending data packets.
[0216] In some embodiments, the negative excitation signal includes but is not limited to at least one of the following: triggering network congestion, packet loss, three repeated acks, sending delay, reaching an annealing index, and reaching a fire extinguishing index.
[0217] In some embodiments, a shared storage hash table can be opened to obtain a list of the system's current hottest users. When a user receives a data packet, the user's traffic and current sending window size are reported, and the activity is calculated based on a traffic activity algorithm. The activity algorithm takes into account whether continuous sending is in an ascending or descending range, as well as the weight setting of the sending window and the initial valve ratio. The purpose is to record the relatively active user traffic and sending window for a period of time, so as to provide the required reference data for emergency fire prevention in the system; at the same time, considering the impact on system performance, only relatively active users are recorded, and there is no need to track and record all of them.
[0218] In some embodiments, after determining the recommended congestion window, the notification window of the receiving end can also be obtained. It should be noted that the congestion window is the flow control used by the sender, and the notification window is the flow control used by the receiver. After obtaining the notification window, the smaller of the recommended congestion window and the notification window is taken as the upper limit of sending.
[0219] The present invention provides a TCP congestion control device. The TCP congestion control device obtains the key features of the user by obtaining the ISP resources generated according to the TCP flow request message of the user to the buffer queue, and determines the recommended congestion window of the TCP protocol layer control block according to the key features, and then sends the data packet in the buffer queue to the client according to the principle of the sliding window. By allocating the corresponding recommended congestion window according to the key features of different users, the corresponding recommended congestion window is provided according to different users, and the same standard is no longer used, thereby improving the available resources of effective users and improving the user experience.
[0220] Embodiment three:
[0221] This embodiment also provides a terminal, see Figure 8As shown, it includes a processor 801, a memory 803 and a communication bus 802, wherein:
[0222] The communication bus 802 is used to realize the connection and communication between the processor 801 and the memory 803;
[0223] The processor 801 is configured to execute one or more computer programs stored in the memory 803 to implement at least one step in the TCP congestion control method in the above embodiments.
[0224] Embodiment 4:
[0225] The present embodiment also provides a computer-readable storage medium, which includes volatile or non-volatile, removable or non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, computer program modules or other data). Computer-readable storage media include, but are not limited to, RAM (Random Access Memory), ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable read only memory), flash memory or other memory technology, CD-ROM (Compact Disc Read-Only Memory), digital versatile disk (DVD) or other optical disk storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage device, or any other medium that can be used to store desired information and can be accessed by a computer.
[0226] The computer-readable storage medium in this embodiment can be used to store one or more computer programs, and the one or more computer programs stored therein can be executed by a processor to implement at least one step of the TCP congestion control method in the above embodiments.
[0227] This embodiment also provides a computer program (or computer software), which can be distributed on a computer-readable medium and executed by a computing device to implement at least one step of the event processing method in the above embodiments; and in some cases, at least one step shown or described can be executed in an order different from that described in the above embodiments.
[0228] It should be understood that, in some cases, at least one step shown or described may be performed in an order different from that described in the above embodiments.
[0229] This embodiment further provides a computer program product, including a computer readable device, on which the computer program as shown above is stored. In this embodiment, the computer readable device may include the computer readable storage medium as shown above.
[0230] It can be seen that those skilled in the art should understand that all or some of the steps, systems, and functional modules / units in the above disclosed methods can be implemented as software (which can be implemented with computer program code executable by a computing device), firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component can have multiple functions, or a function or step can be performed by several physical components in cooperation. Some or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit.
[0231] In addition, it is well known to those skilled in the art that communication media generally contain computer readable instructions, data structures, computer program modules or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery media. Therefore, the present invention is not limited to any specific hardware and software combination.
[0232] The above contents are further detailed descriptions of the embodiments of the present invention in combination with specific implementation methods, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.
Claims
1. A TCP congestion control method, characterized in that: include: Get the key features of user flows; Obtaining Internet Service Provider (ISP) resources and caching them into a buffer queue, wherein the ISP resources are resources generated according to the TCP stream request message of the user; Determine a recommended congestion window of a TCP protocol layer control block according to the key features; According to the principle of sliding window and the recommended congestion window corresponding to the user, the data packets in the buffer queue are sent to the user; Determining the recommended congestion window of the TCP protocol layer control block according to the key features includes: Establishing a recommended congestion window model, wherein the recommended congestion window model includes groups of the users and recommended congestion windows corresponding to the groups, and determining the recommended congestion windows corresponding to the users by determining the groups of the users according to the key features; The grouping of the users is determined based on a negative excitation signal, wherein the negative excitation signal includes at least one of the following: reaching an annealing index, reaching a fire extinguishing index; The annealing index includes: the load is greater than a first preset threshold and less than a second preset threshold, and there is a current activity greater than the activity threshold, and the current congestion window of the user is greater than the standard window; the standard window includes the average value of the current congestion windows of the users in the hottest user list in the current system within a preset time, the hottest user list includes a preset number of users in the current system whose cumulative traffic exceeds the preset cumulative traffic threshold and whose current activity index is greater than the preset activity index, and the size of the congestion window of the user is the largest; The fire extinguishing index includes: the load is greater than a second preset threshold, and the current congestion window of the user is greater than a standard window.
2. The TCP congestion control method according to claim 1, characterized in that: Determining the recommended congestion window of the TCP protocol layer control block according to the key features includes: Obtain the core business indicators of each sample user, build a deep learning model, perform deep model training, obtain the fitting function between the core business indicator and network congestion or delay exceeding a preset delay threshold, and determine the recommended congestion window corresponding to the user based on the fitting function and the key features; The core business indicators include at least one of the following: communication mode, cumulative traffic, congestion and queue depth.
3. The TCP congestion control method according to claim 1, characterized in that: The establishing of a recommended congestion window model, wherein the recommended congestion window model includes groups of the user and recommended congestion windows corresponding to each group, and determining the recommended congestion window corresponding to the user by determining the group to which the user belongs according to the key feature, further includes: Obtain the core business indicators of each sample user; Performing a clustering algorithm operation on the core business indicators to obtain preliminary groups of the users and preliminary recommended congestion windows corresponding to the preliminary groups; Acquire a negative incentive signal, where the negative incentive signal is a negative incentive signal generated when the users of each preliminary group execute the optimized network element TCP0 service flow according to the corresponding preliminary recommended congestion window; The negative excitation signal is used as a negative sample consideration indicator to re-determine the groups of the sample users and the recommended congestion windows corresponding to each group.
4. The TCP congestion control method according to any one of claims 1 to 3, characterized in that: Before determining the recommended congestion window of the TCP protocol layer control block according to the key feature, the method further includes: Obtaining the accumulated traffic of the user; If the accumulated flow is greater than a preset accumulated flow threshold, obtaining a current activity index of the user flow supported by the TCP control block corresponding to the user; If there is a current activity index greater than a preset activity threshold, then obtaining the hottest user list of the current system; If the user is not in the hottest user list, obtaining the minimum congestion window corresponding to each user in the hottest user list; If the current congestion window of the user is greater than the minimum congestion window, the user is added to the hottest user list.
5. The TCP congestion control method according to claim 4, characterized in that: The obtaining of the current activity index of the user flow supported by the TCP control block corresponding to the user comprises: When receiving the ack confirmation, obtain the last reported activity index and the time of the last reported activity index; If the current congestion window is larger than the preset congestion window, and the time interval between the current time and the last time the activity index was reported is larger than the preset time interval, and the last time the activity index was reported is smaller than the maximum activity index; Then, the current activity index is equal to the last reported activity index plus the linear cumulative value; or, When the ack confirmation is received, If the last reported activity index cannot be obtained; Then the current activity index is equal to the initial activity index.
6. The TCP congestion control method according to claim 5, characterized in that: If the initial activity index is equal to 1 and the linear accumulation value is equal to 1, then the maximum activity index is equal to 10.
7. The TCP congestion control method according to claim 4, characterized in that: Determining the recommended congestion window of the TCP protocol layer control block according to the key features includes: If the user is in the most popular user list; Obtaining the current activity of the user's stream; Get the current system load; If the annealing index is reached, the recommended congestion window is less than or equal to the current congestion window; or, If the user is in the most popular user list; Obtaining the current activity of the user's stream; Get the current system load; If the fire extinguishing index is reached, the recommended congestion window is smaller than the current congestion window; The standard window includes an average value of current congestion windows of users in the hottest user list in the system within a preset time; or, Get the current system load; If the load is less than a third preset threshold, and the user is a new user; Then, the recommended congestion window is equal to the standard window multiplied by a third preset ratio, and the standard window includes an average value of current congestion windows of users in the hottest user list in the system within a preset time.
8. The TCP congestion control method according to claim 3, characterized in that: The negative excitation signal includes at least one of the following: packet loss, three repeated ACKs, and transmission delay.
9. A TCP congestion control device, characterized in that: include: A first acquisition module is used to acquire key features of user flows; A second acquisition module is used to acquire Internet service provider ISP resources and cache them into a buffer queue, wherein the ISP resources are resources generated according to the TCP stream request message of the user; A determination module, used to determine a recommended congestion window of a TCP protocol layer control block according to the key features; A sending module, configured to send the data packets in the buffer queue to the user according to the principle of a sliding window and a recommended congestion window corresponding to the user; The determination module comprises: A first determination submodule is used to establish a recommended congestion window model, wherein the recommended congestion window model includes groups of the users and recommended congestion windows corresponding to the groups, and determines the recommended congestion windows corresponding to the users by determining the groups of the users according to the key features; The grouping of the users is determined based on a negative excitation signal, wherein the negative excitation signal includes at least one of the following: reaching an annealing index, reaching a fire extinguishing index; The annealing index includes: the load is greater than a first preset threshold and less than a second preset threshold, and there is a current activity greater than the activity threshold, and the current congestion window of the user is greater than the standard window; the standard window includes the average value of the current congestion windows of the users in the hottest user list in the current system within a preset time, the hottest user list includes a preset number of users in the current system whose cumulative traffic exceeds the preset cumulative traffic threshold and whose current activity index is greater than the preset activity index, and the size of the congestion window of the user is the largest; The fire extinguishing index includes: the load is greater than a second preset threshold, and the current congestion window of the user is greater than a standard window.
10. The TCP congestion control device according to claim 9, characterized in that: The determination module comprises: The second determination submodule is used to obtain the core business indicators of each sample user, build a deep learning model, perform deep model training, obtain the fitting function between the core business indicators and network congestion or delay exceeding a preset delay threshold, and determine the recommended congestion window corresponding to the user according to the fitting function and the key features; The core business indicators include at least one of the following: communication mode, cumulative traffic, congestion and queue depth.
11. The TCP congestion control device according to claim 9, characterized in that: The first determining submodule further includes: The sample acquisition module is used to obtain the core business indicators of each sample user; A clustering algorithm module, used to perform a clustering algorithm operation on the core business indicators to obtain preliminary groups of the users and preliminary recommended congestion windows corresponding to the preliminary groups; A negative incentive signal acquisition module, used to acquire a negative incentive signal, wherein the negative incentive signal is a negative incentive signal generated when each preliminary grouped user executes the optimized network element TCP0 service process according to the corresponding preliminary recommended congestion window; The redetermining module is used to use the negative excitation signal as a negative sample consideration indicator to redetermine the groups of the sample users and the recommended congestion windows corresponding to each group.
12. The TCP congestion control device according to any one of claims 9 to 11, characterized in that: The TCP congestion control device also includes: A third acquisition module, configured to acquire the accumulated traffic of the user before the determination module determines the recommended congestion window of the TCP protocol layer control block according to the key feature; A fourth acquisition module, configured to acquire a current activity index of a user flow supported by a TCP control block corresponding to the user if the accumulated flow is greater than a preset accumulated flow threshold; A fifth acquisition module, configured to acquire a list of the hottest users in the current system if there is a current activity index greater than a preset activity threshold; a sixth acquisition module, configured to acquire the minimum congestion window corresponding to each user in the hottest user list if the user is not in the hottest user list; An adding module is used to add the user to the hottest user list if the current congestion window of the user is greater than the minimum congestion window.
13. The TCP congestion control device according to claim 12, characterized in that: The fourth acquisition module further includes: The fourth obtains the first submodule, which is used to obtain the last reported activity index and the last reported activity index time when receiving the ack confirmation; A first activity index determination module is used to determine that if the current congestion window is larger than a preset congestion window, and the time interval between the current time and the time of the last reported activity index is larger than the preset time interval, and the last reported activity index is smaller than the maximum activity index; then, the current activity index is equal to the last reported activity index plus a linear cumulative value; The second activity index determination module is used to determine that when an ACK confirmation is received, if the last reported activity index cannot be obtained, the current activity index is equal to the initial activity index.
14. The TCP congestion control device according to claim 13, characterized in that: If the initial activity index is equal to 1 and the linear accumulation value is equal to 1, then the maximum activity index is equal to 10.
15. The TCP congestion control device according to claim 12, characterized in that: The determination module comprises: The third determination submodule is used to, if the user is in the hottest user list; obtain the current activity of the user's flow and the load of the current system; if the annealing index is reached, the recommended congestion window is less than or equal to the current congestion window; or, The fourth determination submodule is used to obtain the current activity of the user's flow if the user is in the hottest user list; obtain the load of the current system; if the fire extinguishing index is reached, the recommended congestion window is smaller than the current congestion window; the standard window includes the average value of the current congestion windows of the users in the hottest user list in the system within a preset time; or, The fifth determination submodule is used to obtain the load of the current system; if the load is less than a third preset threshold and the user is a new user; then, the recommended congestion window is equal to the standard window multiplied by a third preset ratio, and the standard window includes the average value of the current congestion windows of the users in the hottest user list in the system within a preset time.
16. A terminal, characterized in that: The terminal includes: a processor, a memory and a communication bus; The communication bus is used to realize the connection and communication between the processor and the memory; The processor is used to execute one or more computer programs stored in the memory to implement the steps of the TCP congestion control method according to any one of claims 1 to 8.
17. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores one or more computer programs, and the one or more computer programs can be executed by one or more processors to implement the steps of the TCP congestion control method according to any one of claims 1 to 8.
