CN116566914A - Bypass TCP acceleration method, device, equipment and medium - Google Patents

Bypass TCP acceleration method, device, equipment and medium Download PDF

Info

Publication number
CN116566914A
CN116566914A CN202310831319.8A CN202310831319A CN116566914A CN 116566914 A CN116566914 A CN 116566914A CN 202310831319 A CN202310831319 A CN 202310831319A CN 116566914 A CN116566914 A CN 116566914A
Authority
CN
China
Prior art keywords
data packet
packet
tcp
data
acceleration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310831319.8A
Other languages
Chinese (zh)
Other versions
CN116566914B (en
Inventor
苑志超
吴昊
铁智慧
刘奎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Primate Intelligent Technology Hangzhou Co ltd
Original Assignee
Primate Intelligent Technology Hangzhou Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Primate Intelligent Technology Hangzhou Co ltd filed Critical Primate Intelligent Technology Hangzhou Co ltd
Priority to CN202310831319.8A priority Critical patent/CN116566914B/en
Publication of CN116566914A publication Critical patent/CN116566914A/en
Application granted granted Critical
Publication of CN116566914B publication Critical patent/CN116566914B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/19Flow control; Congestion control at layers above the network layer
    • H04L47/193Flow control; Congestion control at layers above the network layer at the transport layer, e.g. TCP related
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1867Arrangements specially adapted for the transmitter end
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/163In-band adaptation of TCP data exchange; In-band control procedures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Abstract

The invention relates to the technical field of Internet, and provides a bypass TCP acceleration method, device, equipment and medium, which are applied to acceleration equipment or acceleration service of bypass deployment, improve the link state under the condition of not affecting the original TCP link, and are flexible to deploy; capturing data packets in real time, and shunting the captured data packets to different threads so as to improve concurrent processing efficiency; when the packet loss of the data packet is detected, the data packet is retransmitted by combining the buffer memory, the packet is not required to be retransmitted from a sender, the time for retransmitting the packet is reduced, and the packet is supplemented in advance before the packet loss affects the link, so that the link is ensured to be smooth; when congestion of a data flow corresponding to a data packet is detected, congestion control is executed, so that the possibility of occurrence of link congestion is reduced, and the bandwidth utilization rate of a link is improved; whether the data packet needs to be confirmed in advance is detected, and the overall delay and the packet loss rate of the link are reduced by replying the form of the ACK and the form of the reissuing data packet in advance.

Description

Bypass TCP acceleration method, device, equipment and medium
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a bypass TCP acceleration method, apparatus, device, and medium.
Background
TCP (Transmission Control Protocol ) is a connection-oriented, reliable, byte stream based transport layer communication protocol that relies on numbering packets in sequence and acknowledgement mechanisms to provide reliable transport guarantees for upper layer protocols in unreliable network environments.
Although TCP is a reliable protocol, under some special network conditions, problems such as instability, large fluctuation and the like can occur, such as long-distance network links, wireless networks and the like. Taking a wireless network as an example, the wireless network extends data transmission and communication functions between devices without physical connection through radio waves as a transmission medium, allowing the devices to be interconnected and communicate in a wireless manner without using conventional wired connections such as cables or optical fibers. However, the wireless network also has the problems of high error rate and unstable network condition, and when the network environment of the user is poor, a large amount of packet loss is generated, and the packet loss needs to be retransmitted from the sender, which greatly affects the full link performance.
Aiming at the problems of instability, large fluctuation and the like of TCP under special network conditions, the following solutions are generally adopted in the prior art:
1. The number of intermediate routes and switches is increased to improve signal coverage.
However, this approach is expensive and costly.
2. And deploying proxy service on the intermediate route and the switch to perform TCP connection segmentation.
However, this approach generally accelerates the slow start link of TCP, and occupies a large amount of device resources, which is costly. And the intermediate route needs to be modified, so that the existing service can be influenced, and the risk is high. Meanwhile, the scheme divides the original TCP connection into two, the original TCP link is destroyed, and once the proxy service has a problem, the whole TCP link is paralyzed and is fussy to configure.
Disclosure of Invention
In view of the above, it is necessary to provide a bypass TCP acceleration method, apparatus, device and medium, which are aimed at solving the problems of slow packet loss retransmission and high delay in an unstable and fluctuating network environment, and the problem of large influence of a traditional agent on an original TCP link, and solving the problems of complicated configuration, large occupied resources and influence of deployment or modification of the traditional agent on an original service.
A bypass TCP acceleration method applied to acceleration devices or acceleration services of bypass deployment, the bypass TCP acceleration method comprising:
Capturing a data packet in real time, and shunting the captured data packet to a corresponding thread when the data packet is captured;
detecting whether a data packet has a loss risk or not, and when detecting that the data packet has the loss risk, executing retransmission of the data packet in combination with a cache, and retransmitting the data packet to a receiving side of the data packet;
in the retransmission process, detecting whether the data flow corresponding to the data packet is congested, and executing congestion control when the data flow corresponding to the data packet is detected to be congested;
after congestion control is executed, detecting whether the data packet needs to be confirmed in advance;
and when detecting that the data packet needs to be confirmed in advance, generating a simulated ACK packet of the data packet, and transmitting the simulated ACK packet to a sender of the data packet.
According to a preferred embodiment of the invention, the method further comprises:
acquiring intermediate equipment of the sender and the receiver, acquiring an idle port of the intermediate equipment, configuring a mirror image for the idle port, establishing connection with a mirror image server through the idle port, and deploying the acceleration equipment on the mirror image server; or alternatively
And obtaining intermediate equipment of the sender and the receiver, and deploying the acceleration service on the intermediate equipment.
According to a preferred embodiment of the present invention, the splitting the captured data packet into the corresponding threads includes:
acquiring the packet head format of each data packet;
determining the protocol type of each data packet according to the packet head format of each data packet;
analyzing the four-tuple of the TCP/IP of each data packet based on the protocol type of each data packet to obtain an analysis result;
dividing each data packet into a corresponding TCP stream according to the analysis result;
and configuring corresponding threads for each data packet according to the TCP stream to which each data packet belongs.
According to a preferred embodiment of the present invention, before the combining buffer performs retransmission of the data packet, the method further includes:
acquiring an MTU determined when the sender and the receiver carry out TCP handshake;
dividing the unacknowledged data packet by taking the MTU as the length, and storing the divided data packet in the form of an ordered two-dimensional linked list to the cache;
when an ACK packet of any data packet in the cache is received, deleting a field of a section to which the any data packet belongs from the cache;
and when the lost data packet is inquired in the buffer memory, performing binary search within a preset length range at the tail end of the ordered two-dimensional linked list.
According to a preferred embodiment of the present invention, the detecting whether there is a loss risk of the data packet, and when detecting that there is a loss risk of the data packet, performing retransmission of the data packet in conjunction with the buffer includes:
acquiring the bandwidth, the historical packet loss rate and the storage time length of the TCP stream to which each data packet belongs in the cache;
acquiring a first weight corresponding to the bandwidth, a second weight corresponding to the historical packet loss rate and a third weight corresponding to the storage duration;
calculating the product of the bandwidth and the first weight to obtain a first value, calculating the product of the historical packet loss rate and the second weight to obtain a second value, and calculating the product of the storage duration and the third weight to obtain a third value;
calculating the sum of the first value, the second value and the third value to obtain the current dynamic packet loss rate of each data packet;
acquiring a preconfigured packet loss rate threshold;
when the dynamic packet loss rate corresponding to a data packet is larger than the packet loss rate threshold value, determining that the data packet has a loss risk;
acquiring a SACK field from a TCP header corresponding to the data packet;
acquiring the lost data packet sequence number according to the SACK field;
Inquiring and acquiring a lost field from the cache according to the data packet sequence number;
and retransmitting the lost field according to the data packet sequence number.
According to a preferred embodiment of the invention, the method further comprises:
in the process of retransmitting the lost field according to the data packet sequence number, configuring a timer for each retransmitted lost field;
and carrying out timeout retransmission on the lost field of each retransmission based on the timer.
According to a preferred embodiment of the present invention, the detecting whether the data flow corresponding to the data packet is congested, and executing congestion control when detecting that the data flow corresponding to the data packet is congested, includes:
the congestion index is calculated using the following formula:
wherein R represents a preconfigured theoretical bandwidth, S represents the size of the data packet, t RTT Indicating the round trip delay of the data packet, t RTO Representing a preconfigured transmission timeout period, p representing the historical packet loss rate, b tableShowing the number of acknowledgement packets of one ACK; y represents the congestion index, bw represents the bandwidth of the TCP stream to which the data packet belongs; cwnd represents the size of the congestion window;
acquiring a pre-configured congestion index threshold value;
When the congestion index Y is smaller than the congestion index threshold value, determining that the TCP flow corresponding to the data packet is congested;
reducing the sending frequency of the simulated ACK packet for early confirmation in the TCP stream, and improving the retransmission frequency of the data packet corresponding to the TCP stream in the cache;
and for other TCP streams with the same IP, reducing the sending frequency of the simulated ACK packet for the advanced acknowledgement in the other TCP streams, and improving the retransmission frequency of the data packet corresponding to the other TCP streams in the buffer.
According to a preferred embodiment of the present invention, the detecting whether the data packet needs to be acknowledged in advance includes:
acquiring a fourth weight, a fifth weight and a sixth weight which are preset;
calculating the product of the bandwidth of the TCP stream to which the data packet belongs and the fourth weight to obtain a fourth value, calculating the product of the historical packet loss rate and the fifth weight to obtain a fifth value, and calculating the product of the congestion index and the sixth weight to obtain a sixth value;
calculating the sum of the fourth value, the fifth value and the sixth value to obtain a target value;
acquiring a preset threshold value which is preset;
and when the target value is larger than the preset threshold value, determining that the data packet needs to be confirmed in advance.
A bypass TCP acceleration apparatus operating on acceleration devices or acceleration services of a bypass deployment, the bypass TCP acceleration apparatus comprising:
the distribution unit is used for capturing the data packet in real time and distributing the captured data packet to a corresponding thread when the data packet is captured;
the detection unit is used for detecting whether a data packet has a loss risk or not, and when detecting that the data packet has the loss risk, combining the buffer memory to execute retransmission of the data packet and retransmitting the data packet to a receiving side of the data packet;
the congestion control unit is used for detecting whether the data flow corresponding to the data packet is congested in the retransmission process, and executing congestion control when the data flow corresponding to the data packet is detected to be congested;
the detecting unit is further configured to detect whether the data packet needs to be acknowledged in advance after congestion control is performed;
and the retransmission unit is used for generating a simulated ACK packet of the data packet when the data packet is detected to need to be confirmed in advance, and transmitting the simulated ACK packet to a sender of the data packet.
A computer device, the computer device comprising:
a memory storing at least one instruction; a kind of electronic device with high-pressure air-conditioning system
And the processor executes the instructions stored in the memory to realize the bypass TCP acceleration method.
A computer readable storage medium having stored therein at least one instruction for execution by a processor in a computer device to implement the bypass TCP acceleration method.
According to the technical scheme, the method is applied to bypass deployed acceleration equipment or acceleration service, the link state is improved under the condition that the original TCP link is not influenced, the effect similar to the traditional agent for dividing the TCP link into two sections (namely, two sections from a sender to the deployment node of the acceleration equipment or the acceleration service and from the deployment node of the acceleration equipment or the acceleration service to a receiver) is realized in one section of TCP link, the influence of packet loss is limited in any section of link, so that lost data packets can be retransmitted more quickly, and the deployment is flexible; capturing data packets in real time, and shunting the captured data packets to different threads so as to improve concurrent processing efficiency; when packet loss of the data packet is detected, the buffer memory is combined to execute retransmission of the data packet, the retransmission of the data packet is not required to be carried out from a sender, the packet loss retransmission is acquired from the intermediate acceleration buffer memory to a receiver, the time required for packet retransmission is reduced, and the packet is supplemented in advance before the packet loss affects a link so as to ensure the link to be smooth; when congestion of a data flow corresponding to a data packet is detected, congestion control is executed, so that the possibility of occurrence of link congestion is reduced, and the bandwidth utilization rate of a link is improved; whether the data packet needs to be confirmed in advance is detected, and by replying the forms of ACK and the reissuing data packet in advance, the equivalent two-section rates from the sender to the accelerating equipment or the accelerating service deployment node and the accelerating equipment or the accelerating service deployment node to the receiver are balanced, so that the overall delay and the packet loss rate of the link are reduced.
Drawings
FIG. 1 is a flow chart of a preferred embodiment of the bypass TCP acceleration method of the present invention.
FIG. 2 is a schematic diagram of a hardware deployment of the acceleration device of the present invention.
FIG. 3 is a schematic diagram of a software deployment of the acceleration service of the present invention.
FIG. 4 is a functional block diagram of a preferred embodiment of the bypass TCP acceleration device of the present invention.
Fig. 5 is a schematic diagram of a computer device implementing a preferred embodiment of the bypass TCP acceleration method of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
As shown in FIG. 1, a flow chart of a preferred embodiment of the bypass TCP acceleration method of the present invention is shown. The order of the steps in the flowchart may be changed and some steps may be omitted according to various needs.
The bypass TCP acceleration method is applied to one or more computer devices, wherein the computer device is a device capable of automatically performing numerical calculation and/or information processing according to preset or stored instructions, and the hardware comprises, but is not limited to, a microprocessor, an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a programmable gate array (Field-Programmable Gate Array, FPGA), a digital processor (Digital Signal Processor, DSP), an embedded device and the like.
The computer device may be any electronic product that can interact with a user in a human-computer manner, such as a personal computer, tablet computer, smart phone, personal digital assistant (Personal Digital Assistant, PDA), game console, interactive internet protocol television (Internet Protocol Television, IPTV), smart wearable device, etc.
The computer device may also include a network device and/or a user device. Wherein the network device includes, but is not limited to, a single network server, a server group composed of a plurality of network servers, or a Cloud based Cloud Computing (Cloud Computing) composed of a large number of hosts or network servers.
The server may be an independent server, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms.
Among these, artificial intelligence (Artificial Intelligence, AI) is the theory, method, technique and application system that uses a digital computer or a digital computer-controlled machine to simulate, extend and extend human intelligence, sense the environment, acquire knowledge and use knowledge to obtain optimal results.
Artificial intelligence infrastructure technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a robot technology, a biological recognition technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and other directions.
The network in which the computer device is located includes, but is not limited to, the internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (Virtual Private Network, VPN), and the like.
The embodiment is applied to bypass deployed acceleration equipment or acceleration service, and comprises the following steps:
s10, capturing the data packet in real time, and when the data packet is captured, shunting the captured data packet to a corresponding thread.
In this embodiment, the method further includes:
(1) Acquiring intermediate equipment of the sender and the receiver, acquiring an idle port of the intermediate equipment, configuring a mirror image for the idle port, establishing connection with a mirror image server through the idle port, and deploying the acceleration equipment on the mirror image server;
Wherein the intermediary device may include, but is not limited to: intermediate routes, switches, gateways, base stations, etc.
Please refer to fig. 2, which is a schematic diagram of hardware deployment of the acceleration device of the present invention. And establishing connection between the intermediate equipment and the mirror image server for the intermediate equipment between the sender and the receiver, and deploying acceleration equipment on the mirror image server. Under normal conditions, the sender sends a data packet to the receiver through the intermediate device, and the receiver feeds back a real ACK packet to the sender through the intermediate device after receiving the data packet. The acceleration device acts as a proxy device for bypass deployment and is used for sending analog ACK packets to the sender and sending retransmitted data packets to the receiver.
In the above embodiment, the hardware deployment of the acceleration device is implemented.
(2) And obtaining intermediate equipment of the sender and the receiver, and deploying the acceleration service on the intermediate equipment.
Please refer to fig. 3, which is a schematic diagram of software deployment of the acceleration service of the present invention. Wherein an acceleration service is deployed on the intermediary device. Under normal conditions, the sender sends a data packet to the receiver through the intermediate device, and the receiver feeds back a real ACK packet to the sender through the intermediate device after receiving the data packet. The acceleration service acts as a proxy service for bypass deployment for sending analog ACK packets to the sender and retransmitted data packets to the receiver.
In the above embodiment, the software deployment of the acceleration service is implemented.
Specifically, the hardware deployment or the software deployment can be arbitrarily selected according to actual requirements, and the original network architecture system is not required to be modified during deployment, so that the maintenance cost is not increased.
By the embodiment, bypass deployment of acceleration equipment or acceleration service can be realized, and the problems that the conventional agent is complex in configuration, occupies large resources, and is large in influence on original business due to deployment or modification and on an original TCP (Transmission Control Protocol ) link are solved.
In this embodiment, the splitting the captured data packet to the corresponding thread includes:
acquiring the packet head format of each data packet;
determining the protocol type of each data packet according to the packet head format of each data packet;
analyzing the quadruple of TCP/IP (Transmission Control Protocol/Internet Protocol ) of each data packet based on the protocol type of each data packet to obtain an analysis result;
dividing each data packet into a corresponding TCP stream according to the analysis result;
and configuring corresponding threads for each data packet according to the TCP stream to which each data packet belongs.
The protocol type of each packet may include internet protocol version 4 (Internet Protocol version, ipv 4), internet protocol version 6 (Internet Protocol Version, ipv 6), etc.
Through the embodiment, different data packets are divided into different threads for processing, so that the data processing efficiency can be effectively improved.
Furthermore, dynamic load balancing can be performed according to the load pressure change of each thread, so that the multi-core performance is fully utilized.
S11, detecting whether a data packet has a loss risk, and when detecting that the data packet has the loss risk, executing retransmission of the data packet in combination with a cache, and retransmitting the data packet to a receiving side of the data packet.
In this embodiment, before the combining buffer performs retransmission of the data packet, the method further includes:
acquiring an MTU (Maximum Transmission Unit ) determined when the sender performs TCP handshake with the receiver;
dividing the unacknowledged data packets by taking the MTU as the length, and storing the divided data packets in the form of an ordered two-dimensional linked list to the cache.
In the above embodiment, because the network card has mechanisms such as TSO (TCP Segmentation Offload, TCP segment offload), GSO (Generic Segmentation Offload, deferred fragmentation technique), etc., the data packets are merged, and the length of the captured data packet is often greater than the MTU. In order to be able to retransmit lost data segments accurately, the present embodiment divides the data packet into the length of MTU for storage while modifying the sequence number of the data packet header.
Both TSO and GSO technologies move the segmentation and merging operations of the data packet from the CPU to the network card hardware, thereby reducing the load of the CPU.
The MTU refers to the size of the largest data packet that can be transmitted in network communications.
When an ACK (Acknowledge character, acknowledgement character) packet of any data packet in the buffer is received, a field of a section to which the any data packet belongs is deleted from the buffer.
For example: and detecting a flag bit of the TCP data header, and if the flag bit is provided with an ACK field (used for confirming whether the corresponding data packet is confirmed or not), transmitting the ACK field to the cache so as to detect whether the corresponding data packet is confirmed or not through the ACK field. Further, the data packets in the confirmed caches are removed, and useless data packet caches can be timely cleared, so that memory occupation can be greatly reduced. Further, it is detected whether the data packet is data, and if so, the data packet is buffered for possible retransmission.
And when the lost data packet is inquired in the buffer memory, performing binary search within a preset length range at the tail end of the ordered two-dimensional linked list.
For example: the binary search can be performed within the length of 20% of the tail end of the ordered two-dimensional linked list, so that the search range is reduced, and meanwhile, the binary search is combined, so that the query times are reduced, the CPU consumption is reduced, and the query efficiency is further improved.
In this embodiment, the detecting whether the data packet has a loss risk, and when detecting that the data packet has a loss risk, performing retransmission of the data packet in combination with the buffer includes:
acquiring the bandwidth, the historical packet loss rate and the storage time length of the TCP stream to which each data packet belongs in the cache;
acquiring a first weight corresponding to the bandwidth, a second weight corresponding to the historical packet loss rate and a third weight corresponding to the storage duration;
calculating the product of the bandwidth and the first weight to obtain a first value, calculating the product of the historical packet loss rate and the second weight to obtain a second value, and calculating the product of the storage duration and the third weight to obtain a third value;
calculating the sum of the first value, the second value and the third value to obtain the current dynamic packet loss rate of each data packet;
acquiring a preconfigured packet loss rate threshold;
When the dynamic packet loss rate corresponding to a data packet is larger than the packet loss rate threshold value, determining that the data packet has a loss risk;
acquiring SACK (Selective ACK) fields from TCP headers corresponding to the data packets;
acquiring the lost data packet sequence number according to the SACK field;
inquiring and acquiring a lost field from the cache according to the data packet sequence number;
and retransmitting the lost field according to the data packet sequence number.
Wherein the field is an extended mechanism of TCP that allows the receiving party to send multiple selective acknowledgements to the sending party to indicate the range of data that has been successfully received. By using the SACK field, the sender can more accurately know which data has been successfully received.
Specifically, based on the original self-characteristics of the TCP, it can confirm which data packets are lost, for example, the TCP repeatedly sends a certain ACK or sends a SACK field, which data packets are lost can be clearly indicated.
The historical packet loss rate can be obtained by statistics of historical data.
Further, the method further comprises:
in the process of retransmitting the lost field according to the data packet sequence number, configuring a timer for each retransmitted lost field;
And carrying out timeout retransmission on the lost field of each retransmission based on the timer.
Through the above embodiment, when the retransmission is performed, a pre-configured timer may also be acquired, and the timeout retransmission is triggered based on the timer. Specifically, if the acknowledgement is not received late, it can be analyzed by the correlation function that there is a risk of packet loss, and at this time, a timeout retransmission can be triggered. For example: each time a packet is retransmitted, a timer is set for the packet, and if the packet is not acknowledged late, the timer will perform timeout retransmission.
In an actual scenario, if a packet with sequence number 1, 2, 3, 5 is captured, a packet with sequence number 4 may be lost, or if a packet with sequence number 1, 2, 3, 4 is captured, but if a packet with sequence number 5 is not captured later, a packet with sequence number 5 may be lost.
It will be appreciated that network fluctuations or packet loss are often encountered in a wireless network environment, and after determining that the data packet has a risk of loss or determining that the data packet is lost, the sender needs to be notified that the packet is lost or waits for a timeout before the sender retransmits, and the retransmitted data packet also needs to go through a complete link to reach the receiver, which takes a long time. Based on the characteristics of the wireless network, the embodiment shortens the process of retransmitting the packet from the last intermediate route to the receiving party, namely directly obtaining the lost field from the buffer memory for retransmission, rather than retransmitting the data packet from the transmitting party, thereby greatly reducing the time required for retransmitting the packet. And, to ensure that the data packet arrives successfully at the peer, a timer is maintained for each transmitted data packet to periodically trigger a timeout retransmission.
That is, when a data packet is lost, a conventional TCP link needs to be retransmitted from a sender, and a TCP link employing a TCP acceleration service can perform a retransmission of the data packet from an intermediate device, thereby shortening a retransmission path.
When detecting packet loss, the TCP stream can reduce the sending window value, greatly reduce the TCP stream rate, and the TCP acceleration service can judge packet loss more sharply than the original sender, so that the original TCP stream is subjected to packet supplementing before reacting to the packet loss, and the bandwidth utilization rate of the whole network is improved.
The embodiment optimizes the packet loss judgment and retransmission algorithm aiming at the wireless network, and effectively improves the problem of bandwidth reduction caused by poor signals in the wireless network environment.
The embodiment dynamically judges packet loss so as to supplement packets in advance before the packet loss affects the link and ensure that the link is smooth. In this embodiment, the arrival of the data packet is confirmed in advance, the packet loss perception of the sender is shielded, and the transmission speed of the link is ensured to the greatest extent.
And S12, in the retransmission process, detecting whether the data flow corresponding to the data packet is congested, and executing congestion control when the data flow corresponding to the data packet is detected to be congested.
Packet loss generally occurs on wireless networks that are intermediately routed to user terminals, whereas wired networks generally have better network quality. After packet loss occurs, the existing congestion control algorithm based on packet loss can greatly reduce the link transmission speed.
In contrast, in this embodiment, the detecting whether the data flow corresponding to the data packet is congested, and performing congestion control when detecting that the data flow corresponding to the data packet is congested, includes:
the congestion index is calculated using the following formula:
wherein R represents a preconfigured theoretical bandwidth, S represents the size of the data packet, t RTT Indicating the round trip delay of the data packet, t RTO Representing a preconfigured transmission timeout time limit, wherein p represents the historical packet loss rate, and b represents the number of acknowledgement packets of one ACK; y represents the congestion index, bw represents the bandwidth of the TCP stream to which the data packet belongs; cwnd represents the size of the congestion window;
acquiring a pre-configured congestion index threshold value;
when the congestion index Y is smaller than the congestion index threshold value, determining that the TCP flow corresponding to the data packet is congested;
reducing the sending frequency of the simulated ACK packet for early confirmation in the TCP stream, and improving the retransmission frequency of the data packet corresponding to the TCP stream in the cache;
And for other TCP streams with the same IP, reducing the sending frequency of the simulated ACK packet for the advanced acknowledgement in the other TCP streams, and improving the retransmission frequency of the data packet corresponding to the other TCP streams in the buffer. And carrying out dynamic evaluation and regulation on other TCP streams with the same IP, and preventing a plurality of TCP streams from being blocked at the same time.
The congestion index threshold may be configured in a customized manner, such as 0.86.
It can be appreciated that, when congestion occurs, in order to avoid frequent transmission of the analog ACK packet further causing congestion aggravation, therefore, the transmission frequency of the analog ACK packet is reduced, and the bandwidth of the corresponding TCP flow is adjusted to a suitable size; the problem of packet loss is also more likely to occur when congestion occurs, so that the retransmission frequency is increased to reduce the packet loss rate. And dynamically adjusting the frequency of the advance acknowledgement and the retransmission packet according to the congestion condition, reducing the overall load pressure of the TCP link, and promoting the whole TCP link to recover to be normal as soon as possible.
In the above embodiment, a dynamic congestion control algorithm is adopted, so that the possibility of link congestion is reduced, and the bandwidth utilization rate of the link is improved.
S13, after congestion control is executed, whether the data packet needs to be confirmed in advance is detected.
Since the intermediate route from the sender to the receiver is typically a wired network connection and the intermediate route to the receiver is a wireless network, the sender to the intermediate route has a segment of a network that is far superior to the intermediate route to the terminal (i.e. the receiver). Therefore, if a packet is acknowledged in advance endlessly, a large rate difference is formed across the network, which in turn results in a large amount of packet accumulation in the buffer, so that it is necessary to analyze the packet in terms of bandwidth and packet loss rate to determine whether to acknowledge the packet in advance.
Specifically, the detecting whether the data packet needs to be confirmed in advance includes:
acquiring a fourth weight, a fifth weight and a sixth weight which are preset;
calculating the product of the bandwidth of the TCP stream to which the data packet belongs and the fourth weight to obtain a fourth value, calculating the product of the historical packet loss rate and the fifth weight to obtain a fifth value, and calculating the product of the congestion index and the sixth weight to obtain a sixth value;
calculating the sum of the fourth value, the fifth value and the sixth value to obtain a target value;
acquiring a preset threshold value which is preset;
and when the target value is larger than the preset threshold value, determining that the data packet needs to be confirmed in advance.
In the above embodiment, the congestion index, the bandwidth and the historical packet loss rate obtained in the congestion control process are combined to perform weighted sum calculation, so as to detect whether the data packet needs to be confirmed in advance, so that the overall delay and the packet loss rate of the link are reduced by replying the ACK packet and the complementary data packet in advance.
In this embodiment, if it is determined that the data packet does not need to be acknowledged in advance, the data packet is stored in the buffer.
And S14, when the data packet is detected to need to be confirmed in advance, generating a simulated ACK packet of the data packet, and transmitting the simulated ACK packet to a sender of the data packet.
One TCP flow is in a slow start phase at the time of initial setup, the faster the receiver replies ACK, the faster the link speed increases. Thus, replying to the ACK in advance may shorten the time for the TCP stream to reach maximum bandwidth.
By simulating the ACK packet, the data packet can be confirmed more quickly, so that the sender can send the data packet more quickly, and the link transmission speed is improved.
In the above embodiment, the bypass packet filling mode is adopted to improve the link state without affecting the original TCP link. Unlike conventional TCP acceleration, this embodiment supports hot start and hot update because the TCP link is not truncated, but is complemented on the basis of the original link.
According to the technical scheme, the method is applied to bypass deployed acceleration equipment or acceleration service, the link state is improved under the condition that the original TCP link is not influenced, the effect similar to the traditional agent for dividing the TCP link into two sections (namely, two sections from a sender to the deployment node of the acceleration equipment or the acceleration service and from the deployment node of the acceleration equipment or the acceleration service to a receiver) is realized in one section of TCP link, the influence of packet loss is limited in any section of link, so that lost data packets can be retransmitted more quickly, and the deployment is flexible; capturing data packets in real time, and shunting the captured data packets to different threads so as to improve concurrent processing efficiency; when packet loss of the data packet is detected, the buffer memory is combined to execute retransmission of the data packet, the retransmission of the data packet is not required to be carried out from a sender, the packet loss retransmission is acquired from the intermediate acceleration buffer memory to a receiver, the time required for packet retransmission is reduced, and the packet is supplemented in advance before the packet loss affects a link so as to ensure the link to be smooth; when congestion of a data flow corresponding to a data packet is detected, congestion control is executed, so that the possibility of occurrence of link congestion is reduced, and the bandwidth utilization rate of a link is improved; whether the data packet needs to be confirmed in advance is detected, and by replying the forms of ACK and the reissuing data packet in advance, the equivalent two-section rates from the sender to the accelerating equipment or the accelerating service deployment node and the accelerating equipment or the accelerating service deployment node to the receiver are balanced, so that the overall delay and the packet loss rate of the link are reduced.
FIG. 4 is a functional block diagram of a preferred embodiment of the bypass TCP acceleration device of the present invention. The bypass TCP acceleration device 11 includes a branching unit 110, a detecting unit 111, a congestion control unit 112, and a retransmission unit 113. The module/unit referred to in the present invention refers to a series of computer program segments, which are stored in a memory, capable of being executed by a processor and of performing a fixed function. In the present embodiment, the functions of the respective modules/units will be described in detail in the following embodiments.
In this embodiment, the bypass TCP acceleration device 11 operates in a bypass-deployed acceleration apparatus or acceleration service, and includes:
the splitting unit 110 is configured to capture a data packet in real time, and split the captured data packet to a corresponding thread when the data packet is captured;
the detecting unit 111 is configured to detect whether a data packet has a loss risk, and when detecting that a data packet has a loss risk, perform retransmission of the data packet in combination with the buffer, and retransmit the data packet to a receiving side of the data packet;
the congestion control unit 112 is configured to detect whether a data flow corresponding to the data packet is congested in a retransmission process, and perform congestion control when the data flow corresponding to the data packet is detected to be congested;
The detecting unit 111 is further configured to detect whether the packet needs to be acknowledged in advance after congestion control is performed;
the retransmission unit 113 is configured to generate an analog ACK packet of the data packet when it is detected that the data packet needs to be acknowledged in advance, and transmit the analog ACK packet to a sender of the data packet.
According to the technical scheme, the method is applied to bypass deployed acceleration equipment or acceleration service, the link state is improved under the condition that the original TCP link is not influenced, the effect similar to the traditional agent for dividing the TCP link into two sections (namely, two sections from a sender to the deployment node of the acceleration equipment or the acceleration service and from the deployment node of the acceleration equipment or the acceleration service to a receiver) is realized in one section of TCP link, the influence of packet loss is limited in any section of link, so that lost data packets can be retransmitted more quickly, and the deployment is flexible; capturing data packets in real time, and shunting the captured data packets to different threads so as to improve concurrent processing efficiency; when packet loss of the data packet is detected, the buffer memory is combined to execute retransmission of the data packet, the retransmission of the data packet is not required to be carried out from a sender, the packet loss retransmission is acquired from the intermediate acceleration buffer memory to a receiver, the time required for packet retransmission is reduced, and the packet is supplemented in advance before the packet loss affects a link so as to ensure the link to be smooth; when congestion of a data flow corresponding to a data packet is detected, congestion control is executed, so that the possibility of occurrence of link congestion is reduced, and the bandwidth utilization rate of a link is improved; whether the data packet needs to be confirmed in advance is detected, and by replying the forms of ACK and the reissuing data packet in advance, the equivalent two-section rates from the sender to the accelerating equipment or the accelerating service deployment node and the accelerating equipment or the accelerating service deployment node to the receiver are balanced, so that the overall delay and the packet loss rate of the link are reduced.
Fig. 5 is a schematic structural diagram of a computer device according to a preferred embodiment of the present invention for implementing the bypass TCP acceleration method.
The computer device 1 may comprise a memory 12, a processor 13 and a bus, and may further comprise a computer program stored in the memory 12 and executable on the processor 13, for example a bypass TCP acceleration program.
It will be appreciated by those skilled in the art that the schematic diagram is merely an example of the computer device 1 and does not constitute a limitation of the computer device 1, the computer device 1 may be a bus type structure, a star type structure, the computer device 1 may further comprise more or less other hardware or software than illustrated, or a different arrangement of components, for example, the computer device 1 may further comprise an input-output device, a network access device, etc.
It should be noted that the computer device 1 is only used as an example, and other electronic products that may be present in the present invention or may be present in the future are also included in the scope of the present invention by way of reference.
The memory 12 includes at least one type of readable storage medium including flash memory, a removable hard disk, a multimedia card, a card memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. The memory 12 may in some embodiments be an internal storage unit of the computer device 1, such as a removable hard disk of the computer device 1. The memory 12 may in other embodiments also be an external storage device of the computer device 1, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the computer device 1. Further, the memory 12 may also include both an internal storage unit and an external storage device of the computer device 1. The memory 12 may be used not only for storing application software installed in the computer apparatus 1 and various types of data, such as code of a bypass TCP acceleration program, etc., but also for temporarily storing data that has been output or is to be output.
The processor 13 may be comprised of integrated circuits in some embodiments, for example, a single packaged integrated circuit, or may be comprised of multiple integrated circuits packaged with the same or different functions, including one or more central processing units (Central Processing unit, CPU), microprocessors, digital processing chips, graphics processors, a combination of various control chips, and the like. The processor 13 is a Control Unit (Control Unit) of the computer device 1, connects the respective components of the entire computer device 1 using various interfaces and lines, executes or executes programs or modules stored in the memory 12 (for example, executes a bypass TCP acceleration program or the like), and invokes data stored in the memory 12 to perform various functions of the computer device 1 and process data.
The processor 13 executes the operating system of the computer device 1 and various types of applications installed. The processor 13 executes the application program to implement the steps of the various bypass TCP acceleration method embodiments described above, such as the steps shown in fig. 1.
Illustratively, the computer program may be partitioned into one or more modules/units that are stored in the memory 12 and executed by the processor 13 to complete the present invention. The one or more modules/units may be a series of computer readable instruction segments capable of performing the specified functions, which instruction segments describe the execution of the computer program in the computer device 1. For example, the computer program may be divided into a streaming unit 110, a detection unit 111, a congestion control unit 112, a retransmission unit 113.
The integrated units implemented in the form of software functional modules described above may be stored in a computer readable storage medium. The software functional module is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a computer device, or a network device, etc.) or a processor (processor) to execute portions of the bypass TCP acceleration method according to the embodiments of the present invention.
The modules/units integrated in the computer device 1 may be stored in a computer readable storage medium if implemented in the form of software functional units and sold or used as separate products. Based on this understanding, the present invention may also be implemented by a computer program for instructing a relevant hardware device to implement all or part of the procedures of the above-mentioned embodiment method, where the computer program may be stored in a computer readable storage medium and the computer program may be executed by a processor to implement the steps of each of the above-mentioned method embodiments.
Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory, or the like.
Further, the computer-readable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created from the use of blockchain nodes, and the like.
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and the like. The Blockchain (Blockchain), which is essentially a decentralised database, is a string of data blocks that are generated by cryptographic means in association, each data block containing a batch of information of network transactions for verifying the validity of the information (anti-counterfeiting) and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, an application services layer, and the like.
The bus may be a peripheral component interconnect standard (peripheral component interconnect, PCI) bus or an extended industry standard architecture (extended industry standard architecture, EISA) bus, among others. The bus may be classified as an address bus, a data bus, a control bus, etc. For ease of illustration, only one straight line is shown in fig. 5, but not only one bus or one type of bus. The bus is arranged to enable a connection communication between the memory 12 and at least one processor 13 or the like.
Although not shown, the computer device 1 may further comprise a power source (such as a battery) for powering the various components, preferably the power source may be logically connected to the at least one processor 13 via a power management means, whereby the functions of charge management, discharge management, and power consumption management are achieved by the power management means. The power supply may also include one or more of any of a direct current or alternating current power supply, recharging device, power failure detection circuit, power converter or inverter, power status indicator, etc. The computer device 1 may further include various sensors, bluetooth modules, wi-Fi modules, etc., which will not be described in detail herein.
Further, the computer device 1 may also comprise a network interface, optionally comprising a wired interface and/or a wireless interface (e.g. WI-FI interface, bluetooth interface, etc.), typically used for establishing a communication connection between the computer device 1 and other computer devices.
The computer device 1 may optionally further comprise a user interface, which may be a Display, an input unit, such as a Keyboard (Keyboard), or a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, or the like. The display may also be referred to as a display screen or display unit, as appropriate, for displaying information processed in the computer device 1 and for displaying a visual user interface.
It should be understood that the embodiments described are for illustrative purposes only and are not limited to this configuration in the scope of the patent application.
Fig. 5 shows only a computer device 1 with components 12-13, it will be understood by those skilled in the art that the structure shown in fig. 5 is not limiting of the computer device 1 and may include fewer or more components than shown, or may combine certain components, or a different arrangement of components.
In connection with fig. 1, the memory 12 in the computer device 1 stores a plurality of instructions to implement a bypass TCP acceleration method, the processor 13 being executable to implement:
capturing a data packet in real time, and shunting the captured data packet to a corresponding thread when the data packet is captured;
detecting whether a data packet has a loss risk or not, and when detecting that the data packet has the loss risk, executing retransmission of the data packet in combination with a cache, and retransmitting the data packet to a receiving side of the data packet;
in the retransmission process, detecting whether the data flow corresponding to the data packet is congested, and executing congestion control when the data flow corresponding to the data packet is detected to be congested;
After congestion control is executed, detecting whether the data packet needs to be confirmed in advance;
and when detecting that the data packet needs to be confirmed in advance, generating a simulated ACK packet of the data packet, and transmitting the simulated ACK packet to a sender of the data packet.
Specifically, the specific implementation method of the above instructions by the processor 13 may refer to the description of the relevant steps in the corresponding embodiment of fig. 1, which is not repeated herein.
The data in this case were obtained legally.
In the several embodiments provided in the present invention, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be other manners of division when actually implemented.
The invention is operational with numerous general purpose or special purpose computer system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like. The invention may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units can be realized in a form of hardware or a form of hardware and a form of software functional modules.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof.
The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
Furthermore, it is evident that the word "comprising" does not exclude other elements or steps, and that the singular does not exclude a plurality. The units or means stated in the invention may also be implemented by one unit or means, either by software or hardware. The terms first, second, etc. are used to denote a name, but not any particular order.
Finally, it should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made to the technical solution of the present invention without departing from the spirit and scope of the technical solution of the present invention.

Claims (11)

1. A bypass TCP acceleration method, applied to acceleration devices or acceleration services of a bypass deployment, comprising:
capturing a data packet in real time, and shunting the captured data packet to a corresponding thread when the data packet is captured;
detecting whether a data packet has a loss risk or not, and when detecting that the data packet has the loss risk, executing retransmission of the data packet in combination with a cache, and retransmitting the data packet to a receiving side of the data packet;
In the retransmission process, detecting whether the data flow corresponding to the data packet is congested, and executing congestion control when the data flow corresponding to the data packet is detected to be congested;
after congestion control is executed, detecting whether the data packet needs to be confirmed in advance;
and when detecting that the data packet needs to be confirmed in advance, generating a simulated ACK packet of the data packet, and transmitting the simulated ACK packet to a sender of the data packet.
2. The bypass TCP acceleration method of claim 1, wherein said method further comprises:
acquiring intermediate equipment of the sender and the receiver, acquiring an idle port of the intermediate equipment, configuring a mirror image for the idle port, establishing connection with a mirror image server through the idle port, and deploying the acceleration equipment on the mirror image server; or alternatively
And obtaining intermediate equipment of the sender and the receiver, and deploying the acceleration service on the intermediate equipment.
3. The bypass TCP acceleration method of claim 1, wherein said offloading captured packets to corresponding threads comprises:
acquiring the packet head format of each data packet;
Determining the protocol type of each data packet according to the packet head format of each data packet;
analyzing the four-tuple of the TCP/IP of each data packet based on the protocol type of each data packet to obtain an analysis result;
dividing each data packet into a corresponding TCP stream according to the analysis result;
and configuring corresponding threads for each data packet according to the TCP stream to which each data packet belongs.
4. The bypass TCP acceleration method of claim 1, wherein said combining buffer performs retransmission of said data packet, said method further comprising:
acquiring an MTU determined when the sender and the receiver carry out TCP handshake;
dividing the unacknowledged data packet by taking the MTU as the length, and storing the divided data packet in the form of an ordered two-dimensional linked list to the cache;
when an ACK packet of any data packet in the cache is received, deleting a field of a section to which the any data packet belongs from the cache;
and when the lost data packet is inquired in the buffer memory, performing binary search within a preset length range at the tail end of the ordered two-dimensional linked list.
5. The bypass TCP acceleration method of claim 1, wherein said detecting whether there is a risk of loss of a data packet, and when detecting that there is a risk of loss of a data packet, performing retransmission of the data packet in conjunction with buffering comprises:
Acquiring the bandwidth, the historical packet loss rate and the storage time length of the TCP stream to which each data packet belongs in the cache;
acquiring a first weight corresponding to the bandwidth, a second weight corresponding to the historical packet loss rate and a third weight corresponding to the storage duration;
calculating the product of the bandwidth and the first weight to obtain a first value, calculating the product of the historical packet loss rate and the second weight to obtain a second value, and calculating the product of the storage duration and the third weight to obtain a third value;
calculating the sum of the first value, the second value and the third value to obtain the current dynamic packet loss rate of each data packet;
acquiring a preconfigured packet loss rate threshold;
when the dynamic packet loss rate corresponding to a data packet is larger than the packet loss rate threshold value, determining that the data packet has a loss risk;
acquiring a SACK field from a TCP header corresponding to the data packet;
acquiring the lost data packet sequence number according to the SACK field;
inquiring and acquiring a lost field from the cache according to the data packet sequence number;
and retransmitting the lost field according to the data packet sequence number.
6. The bypass TCP acceleration method of claim 5, wherein the method further comprises:
In the process of retransmitting the lost field according to the data packet sequence number, configuring a timer for each retransmitted lost field;
and carrying out timeout retransmission on the lost field of each retransmission based on the timer.
7. The bypass TCP acceleration method of claim 5, wherein detecting whether the data flow corresponding to the data packet is congested, and performing congestion control when detecting that the data flow corresponding to the data packet is congested, comprises:
the congestion index is calculated using the following formula:
wherein R represents a preconfigured theoretical bandwidth, S represents the size of the data packet, t RTT Indicating the round trip delay of the data packet, t RTO Representing a preconfigured transmission timeout time limit, wherein p represents the historical packet loss rate, and b represents the number of acknowledgement packets of one ACK; y represents the congestion index, bw tableShowing the bandwidth of the TCP stream to which the data packet belongs; cwnd represents the size of the congestion window;
acquiring a pre-configured congestion index threshold value;
when the congestion index Y is smaller than the congestion index threshold value, determining that the TCP flow corresponding to the data packet is congested;
reducing the sending frequency of the simulated ACK packet for early confirmation in the TCP stream, and improving the retransmission frequency of the data packet corresponding to the TCP stream in the cache;
And for other TCP streams with the same IP, reducing the sending frequency of the simulated ACK packet for the advanced acknowledgement in the other TCP streams, and improving the retransmission frequency of the data packet corresponding to the other TCP streams in the buffer.
8. The bypass TCP acceleration method of claim 7, wherein said detecting whether said data packet requires an advance acknowledgement comprises:
acquiring a fourth weight, a fifth weight and a sixth weight which are preset;
calculating the product of the bandwidth of the TCP stream to which the data packet belongs and the fourth weight to obtain a fourth value, calculating the product of the historical packet loss rate and the fifth weight to obtain a fifth value, and calculating the product of the congestion index and the sixth weight to obtain a sixth value;
calculating the sum of the fourth value, the fifth value and the sixth value to obtain a target value;
acquiring a preset threshold value which is preset;
and when the target value is larger than the preset threshold value, determining that the data packet needs to be confirmed in advance.
9. A bypass TCP acceleration apparatus, operating on a bypass deployed acceleration device or acceleration service, comprising:
the distribution unit is used for capturing the data packet in real time and distributing the captured data packet to a corresponding thread when the data packet is captured;
The detection unit is used for detecting whether a data packet has a loss risk or not, and when detecting that the data packet has the loss risk, combining the buffer memory to execute retransmission of the data packet and retransmitting the data packet to a receiving side of the data packet;
the congestion control unit is used for detecting whether the data flow corresponding to the data packet is congested in the retransmission process, and executing congestion control when the data flow corresponding to the data packet is detected to be congested;
the detecting unit is further configured to detect whether the data packet needs to be acknowledged in advance after congestion control is performed;
and the retransmission unit is used for generating a simulated ACK packet of the data packet when the data packet is detected to need to be confirmed in advance, and transmitting the simulated ACK packet to a sender of the data packet.
10. A computer device, the computer device comprising:
a memory storing at least one instruction; a kind of electronic device with high-pressure air-conditioning system
A processor executing instructions stored in the memory to implement the bypass TCP acceleration method of any one of claims 1 to 8.
11. A computer-readable storage medium, characterized by: the computer readable storage medium having stored therein at least one instruction for execution by a processor in a computer device to implement the bypass TCP acceleration method of any one of claims 1 to 8.
CN202310831319.8A 2023-07-07 2023-07-07 Bypass TCP acceleration method, device, equipment and medium Active CN116566914B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310831319.8A CN116566914B (en) 2023-07-07 2023-07-07 Bypass TCP acceleration method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310831319.8A CN116566914B (en) 2023-07-07 2023-07-07 Bypass TCP acceleration method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN116566914A true CN116566914A (en) 2023-08-08
CN116566914B CN116566914B (en) 2023-09-19

Family

ID=87500430

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310831319.8A Active CN116566914B (en) 2023-07-07 2023-07-07 Bypass TCP acceleration method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN116566914B (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040062822A (en) * 2003-01-03 2004-07-09 삼성전자주식회사 Apparatus for managing buffer in rlc layer and method therof
CN101369877A (en) * 2007-12-27 2009-02-18 华为技术有限公司 Wireless transmission control protocol processing method and equipment
US20100020689A1 (en) * 2007-01-29 2010-01-28 Bob Tang Immediate ready implementation of virtually congestion free guaranteed service capable network : nextgentcp/ftp/udp intermediate buffer cyclical sack re-use
CN102355462A (en) * 2011-10-09 2012-02-15 大唐移动通信设备有限公司 Method and device for realizing TCP (Transmission Control Protocol) transmission
US20120290727A1 (en) * 2009-12-31 2012-11-15 Bce Inc. Method and system for increasing performance of transmission control protocol sessions in data networks
CN103098510A (en) * 2011-08-30 2013-05-08 华为技术有限公司 Method, apparatus and system for controlling data transmission
CN103548296A (en) * 2011-03-21 2014-01-29 诺基亚西门子通信公司 Method and apparatus to improve TCP performance in mobile networks
US20150089500A1 (en) * 2013-09-26 2015-03-26 Acelio, Inc. System and method for improving tcp performance in virtualized environments
CN105049369A (en) * 2015-08-14 2015-11-11 浙江大学 Video transmission congestion control method based on MPTCP in heterogeneous wireless network
US20170117999A1 (en) * 2015-10-22 2017-04-27 Harris Corporation Communications device serving as transmission control protocol (tcp) proxy
CN108476231A (en) * 2015-10-30 2018-08-31 思杰***有限公司 System and method for maintaining session via intermediate device
CN109639340A (en) * 2018-12-11 2019-04-16 成都天奥信息科技有限公司 A kind of TCP accelerated method suitable for satellite link
CN114979839A (en) * 2021-02-27 2022-08-30 华为技术有限公司 Transmission control protocol proxy method and communication device

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040062822A (en) * 2003-01-03 2004-07-09 삼성전자주식회사 Apparatus for managing buffer in rlc layer and method therof
US20100020689A1 (en) * 2007-01-29 2010-01-28 Bob Tang Immediate ready implementation of virtually congestion free guaranteed service capable network : nextgentcp/ftp/udp intermediate buffer cyclical sack re-use
CN101369877A (en) * 2007-12-27 2009-02-18 华为技术有限公司 Wireless transmission control protocol processing method and equipment
US20120290727A1 (en) * 2009-12-31 2012-11-15 Bce Inc. Method and system for increasing performance of transmission control protocol sessions in data networks
CN103548296A (en) * 2011-03-21 2014-01-29 诺基亚西门子通信公司 Method and apparatus to improve TCP performance in mobile networks
CN103098510A (en) * 2011-08-30 2013-05-08 华为技术有限公司 Method, apparatus and system for controlling data transmission
CN102355462A (en) * 2011-10-09 2012-02-15 大唐移动通信设备有限公司 Method and device for realizing TCP (Transmission Control Protocol) transmission
US20150089500A1 (en) * 2013-09-26 2015-03-26 Acelio, Inc. System and method for improving tcp performance in virtualized environments
CN105049369A (en) * 2015-08-14 2015-11-11 浙江大学 Video transmission congestion control method based on MPTCP in heterogeneous wireless network
US20170117999A1 (en) * 2015-10-22 2017-04-27 Harris Corporation Communications device serving as transmission control protocol (tcp) proxy
CN108476231A (en) * 2015-10-30 2018-08-31 思杰***有限公司 System and method for maintaining session via intermediate device
CN109639340A (en) * 2018-12-11 2019-04-16 成都天奥信息科技有限公司 A kind of TCP accelerated method suitable for satellite link
CN114979839A (en) * 2021-02-27 2022-08-30 华为技术有限公司 Transmission control protocol proxy method and communication device

Also Published As

Publication number Publication date
CN116566914B (en) 2023-09-19

Similar Documents

Publication Publication Date Title
CN102045362B (en) Data transmission method and system based on UDP protocol
CN108881008B (en) Data transmission method, device and system
US20020078164A1 (en) System and method for data transfer acceleration in a TCP network environment
CN111327603B (en) Data transmission method, device and system
US10230563B2 (en) Methods and first network node for managing a stream control transmission protocol association
US10355961B2 (en) Network traffic capture analysis
US20060262799A1 (en) Transmit flow for network acceleration architecture
US20060262797A1 (en) Receive flow in a network acceleration architecture
CN103546258B (en) Method and device for data transmission
US9509450B2 (en) Snoop virtual receiver time
CN112953850B (en) Data transmission method and device, computer readable medium and electronic equipment
US20070291782A1 (en) Acknowledgement filtering
US11271842B2 (en) Enhancing transmission control protocol (TCP) performance and scalability on multicore processor architectures
US9231873B1 (en) System and method for reducing latency via client side dynamic acknowledgements
CN103368872A (en) Data packet forwarding system and method
CN116566914B (en) Bypass TCP acceleration method, device, equipment and medium
CN116743885A (en) UDP engine-based data transmission method, device, equipment and medium
Kulkarni et al. Analysis of tcp performance in data center networks
Grossman et al. Teraflows over gigabit wans with udt
EP3408989B1 (en) Detecting malware on spdy connections
EP2842275A1 (en) Increasing a data transfer rate
US20230208913A1 (en) In-order streaming in-network computation
CN111447650B (en) Data forwarding method, equipment and storage medium
US11134020B1 (en) Flow control of two TCP streams between three network nodes
CN116156018A (en) Data transmission method and related equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant