WO2020154872A1 - 一种传输控制协议加速方法和装置 - Google Patents

一种传输控制协议加速方法和装置 Download PDF

Info

Publication number
WO2020154872A1
WO2020154872A1 PCT/CN2019/073564 CN2019073564W WO2020154872A1 WO 2020154872 A1 WO2020154872 A1 WO 2020154872A1 CN 2019073564 W CN2019073564 W CN 2019073564W WO 2020154872 A1 WO2020154872 A1 WO 2020154872A1
Authority
WO
WIPO (PCT)
Prior art keywords
tcp
message
layer
mac layer
network device
Prior art date
Application number
PCT/CN2019/073564
Other languages
English (en)
French (fr)
Inventor
汪伊明
罗勇
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2019/073564 priority Critical patent/WO2020154872A1/zh
Priority to CN201980090423.8A priority patent/CN113424578B/zh
Publication of WO2020154872A1 publication Critical patent/WO2020154872A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/06Optimizing the usage of the radio link, e.g. header compression, information sizing, discarding information

Definitions

  • This application relates to the field of communications, and in particular to a method and device for accelerating transmission control protocol (Transmission Control Protocol, TCP) on unreliable links such as Wi-Fi.
  • TCP Transmission Control Protocol
  • Transmission Control Protocol is a connection-oriented, reliable, and byte stream-based transport layer communication protocol.
  • TCP acceleration is a technology used to increase the transmission speed of TCP packets in the network.
  • the TCP protocol was originally designed for the wired network environment.
  • the TCP protocol used for wired transmission implies an assumption: packet loss is caused by network congestion, which is not true for wireless networks, and wireless network environments cannot It satisfies this assumption well, coupled with the small bandwidth, large delay, and mobility of the wireless network environment, so that the working efficiency of TCP in the wireless network is reduced.
  • the traditional TCP algorithm adopts a method for network congestion: the start phase of the congestion window increases exponentially, and after receiving the ACK (Acknowledgement, confirmation character) reaches the slow start threshold, the next forwarding will use linear growth to reach the maximum throughput. It is very long and has a greater impact on the loading time of video services.
  • Unreliable links mainly include wireless communication and power line communication.
  • Wi-Fi Wireless Fidelity, wireless fidelity
  • air interface forwarding delay is usually at the level of 10ms, and it can reach the second level in bad conditions.
  • Due to the wireless air interface competition mechanism CSMA/CA (Carrier Sense Multiple Access with Collision Avoidance) , Carrier sense multiple access/conflict avoidance), retransmission at the MAC (Media Access Control) sublayer of the Wi-Fi chip will cause a large number of Wi-Fi packet loss, resulting in fluctuations in Wi-Fi air interface traffic .
  • the retransmission mechanism and the sliding window halving mechanism in the TCP protocol will cause traffic fluctuations, which are superimposed on the suddenness of the Wi-Fi air interface traffic fluctuations, resulting in a long-term low throughput of TCP.
  • the current TCP algorithm does not make some targeted optimizations for unreliable links such as Wi-Fi, which is the reason why the current Wi-Fi network service experience is poor. Therefore, there is an urgent need for a TCP acceleration method and device on unreliable links such as Wi-Fi, which can quickly load video services, and can reduce or avoid the impact of Wi-Fi air interface fluctuations on user services.
  • the present invention provides a TCP acceleration method, device and system.
  • the technical solution is as follows:
  • an embodiment of the present invention provides a TCP acceleration method, which is characterized by being applied to the TCP layer and the media intervention control MAC layer, and the method includes:
  • the first network device receives the TCP layer message
  • the first network device maps the TCP layer message to a MAC layer message, and the MAC layer message data frame format is a MAC protocol data unit MPDU;
  • the first network device maps the MAC layer ACK message to a first TCP layer ACK message
  • the first network device sends the first TCP layer ACK message to the TCP server.
  • the mapping of the TCP layer message to the MAC layer message by the first network device specifically includes:
  • the first network device maps the TCP layer message to the MAC layer message according to the mapping relationship table.
  • the first network device maps the MAC layer ACK packet to the first TCP layer ACK Message, specifically including:
  • the first network device maps the MAC layer ACK message to the first TCP layer ACK message according to the mapping relationship table.
  • the mapping relationship table uses TCP layer message characteristics and MAC layer message characteristics To generate, the TCP message feature includes a TCP layer message sequence number sequence ID, and the MAC layer message feature includes a MAC layer message sequence number sequence ID.
  • the TCP packet feature further includes TCP layer packet quintuple information and The message descriptor, the five-tuple information includes a source IP address, a source port, a destination IP address, a destination port, and a transport layer protocol.
  • the method further includes:
  • the first network device receives a second TCP layer ACK message sent by the second network device, and the second TCP layer ACK message is an acknowledgment character generated by the TCP client according to the received TCP layer message ;
  • the first network device discards the second TCP layer ACK message.
  • the method further includes:
  • the first network device detects the link quality parameters and congestion conditions of the MAC layer and the physical PHY layer, and determines the time to respond to the MAC layer ACK message or the first TCP layer ACK message.
  • the link quality parameter includes a signal strength parameter, a wireless link Air interface retransmission rate, packet loss rate and wireless negotiation rate.
  • the method further includes:
  • the first network device If the first network device detects instantaneous conflict and packet loss on the link air interface, and the actual link is not congested, the first network device reduces the response time of the MAC layer ACK message or the first TCP layer ACK message.
  • the method further includes:
  • the first network device When the first network device detects that link congestion occurs, the first network device increases the response time of the MAC layer ACK message or the first TCP layer ACK message.
  • an embodiment of the present invention provides a transmission control protocol TCP acceleration method, which is applied to the TCP layer and the media intervention control MAC layer, and the method includes:
  • the second network device receives a MAC layer message sent by the first network device, and the MAC layer message data frame format is a MAC protocol data unit MPDU;
  • the second network device maps the MAC layer message to a TCP layer message
  • the second network device sends the TCP layer message to the TCP client.
  • the method further includes:
  • the second network device receives a second TCP layer ACK message, and sends the second TCP layer ACK message to the first network device, and the second TCP layer ACK message is the TCP client A confirmation character generated according to the received TCP layer message.
  • the method further includes:
  • the second network device receives a second TCP layer ACK message, the second network device discards the second TCP layer ACK message, and the second TCP layer ACK message is received by the TCP client according to The confirmation character generated by the TCP layer message.
  • the second network device maps the MAC layer packet to a TCP layer Message, specifically including:
  • the second network device maps the MAC layer message to the TCP layer message according to the mapping relationship table.
  • the mapping relationship table uses TCP layer message characteristics and MAC layer message characteristics To generate, the TCP message feature includes a TCP layer message sequence number sequence ID, and the MAC layer message feature includes a MAC layer message sequence number sequence ID.
  • the TCP message feature further includes TCP message quintuple information and message The text descriptor, the five-tuple information includes a source IP address, a source port, a destination IP address, a destination port, and a transport layer protocol.
  • an embodiment of the present invention provides a first acceleration device for transmission control protocol TCP, which is applied to the TCP layer and the media intervention control MAC layer, and the device includes:
  • Memory used to store program instructions
  • Receiver used to receive TCP layer messages
  • a processor configured to execute the program instructions stored in the memory to map the TCP layer message to a MAC layer message, and the MAC layer message data frame format is a MAC protocol data unit MPDU;
  • a transmitter configured to send the MAC layer message to a second network device
  • the receiver is further configured to receive a MAC layer confirmation character ACK message sent by the second network device;
  • the processor is further configured to execute the program instructions stored in the memory to realize the mapping of the MAC layer ACK message to the first TCP layer ACK message;
  • the sender is also used to send the first TCP layer ACK message to the TCP server.
  • the processor mapping the TCP layer message to the MAC layer message specifically includes:
  • the processor maps the TCP layer message to the MAC layer message according to the mapping relationship table.
  • the processor maps the MAC layer ACK message to the first TCP layer ACK message , Specifically including:
  • the processor maps the MAC layer ACK message to the first TCP layer ACK message according to the mapping relationship table.
  • the mapping relationship table uses TCP layer message characteristics and MAC layer message characteristics To generate, the TCP message feature includes a TCP layer message sequence number sequence ID, and the MAC layer message feature includes a MAC layer message sequence number sequence ID.
  • the TCP packet feature further includes TCP layer packet quintuple information and The message descriptor, the five-tuple information includes a source IP address, a source port, a destination IP address, a destination port, and a transport layer protocol.
  • the receiver is further configured to receive the data sent by the second network device A second TCP layer ACK message, where the second TCP layer ACK message is an acknowledgment character generated by the TCP client according to the received TCP layer message; the processor is further configured to discard the second TCP Layer ACK message.
  • the device further includes:
  • the detector is used to detect the link quality parameters and congestion status of the MAC layer and the physical PHY layer.
  • the link quality parameters include signal strength parameters, radio link air interface retransmission Rate, packet loss rate and wireless negotiation rate.
  • the processor is further configured to: when the detector detects that there is no When link congestion occurs, the processor executes to reduce the response time of the MAC layer ACK message or the first TCP layer ACK message; when the detector detects that link congestion occurs, the processor Improve the response time of the MAC layer ACK message or the first TCP layer ACK message.
  • an embodiment of the present invention provides a second acceleration device for transmission control protocol TCP, which is applied to the TCP layer and the media intervention control MAC layer, and the device includes:
  • Memory used to store program instructions
  • a receiver configured to receive a MAC layer message sent by a first network device, and the MAC layer message data frame format is a MAC protocol data unit MPDU;
  • a transmitter configured to send a MAC layer confirmation character ACK message corresponding to the MAC layer message to the first network device
  • a processor configured to execute the program instructions stored in the memory to realize the mapping of the MAC layer message into a TCP layer message;
  • the transmitter is also used to send the TCP layer message to the TCP client.
  • the receiver is further configured to receive a second TCP layer ACK message, and the second TCP layer ACK message is the TCP client according to the received The acknowledgment character generated by the TCP layer message; the sender is also used to send the second TCP layer ACK message to the first network device.
  • the receiver is further configured to receive a third TCP layer ACK message, and the third The TCP layer ACK message is an acknowledgment character generated by the TCP client according to the received TCP layer message; the processor is further configured to discard the third TCP layer ACK message.
  • the processor maps the MAC layer message to a TCP layer message, specifically include:
  • the processor maps the MAC layer message to the TCP layer message according to the mapping relationship table.
  • the mapping relationship table uses TCP layer message characteristics and MAC layer message characteristics To generate, the TCP message feature includes a TCP layer message sequence number sequence ID, and the MAC layer message feature includes a MAC layer message sequence number sequence ID.
  • the TCP message feature further includes TCP message quintuple information and message The text descriptor, the five-tuple information includes source IP address, source port, destination IP address, destination port, and transport layer protocol.
  • an embodiment of the present invention provides a first acceleration device for transmission control protocol TCP, which is applied to the TCP layer and the media intervention control MAC layer, and the device includes:
  • the receiving unit is used to receive TCP layer messages
  • a mapping unit configured to map the TCP layer message to a MAC layer message, and the MAC layer message data frame format is a MAC protocol data unit MPDU;
  • a sending unit configured to send the MAC layer message to the second network device
  • the receiving unit is further configured to receive a MAC layer confirmation character ACK message sent by the second network device;
  • the mapping unit is further configured to map the MAC layer ACK message to the first TCP layer ACK message;
  • the sending unit is further configured to send the first TCP layer ACK message to the TCP server.
  • mapping the TCP layer message to the MAC layer message specifically includes:
  • the mapping unit generates a mapping relationship table between the TCP layer message and the MAC layer message
  • the mapping unit maps the TCP layer message to the MAC layer message according to the mapping relationship table.
  • the mapping unit maps the MAC layer ACK message to the first TCP layer ACK message , Specifically including:
  • the mapping unit generates a mapping relationship table between the TCP layer ACK message and the MAC layer ACK message
  • the mapping unit maps the MAC layer ACK message to the first TCP layer ACK message according to the mapping relationship table.
  • the mapping relationship table uses TCP layer message characteristics and MAC layer message characteristics To generate, the TCP message feature includes a TCP layer message sequence number sequence ID, and the MAC layer message feature includes a MAC layer message sequence number sequence ID.
  • the TCP packet feature further includes TCP layer packet quintuple information and The message descriptor, the five-tuple information includes a source IP address, a source port, a destination IP address, a destination port, and a transport layer protocol.
  • the device further includes:
  • the receiving unit is further configured to receive a second TCP layer ACK message sent by the second network device, where the second TCP layer ACK message is generated by the TCP client according to the received TCP layer message Confirm character
  • the first processing unit is further configured to discard the second TCP layer ACK message.
  • the device further includes:
  • the detection unit is used to detect link quality parameters and congestion conditions of the MAC layer and the physical PHY layer.
  • the link quality parameters include signal strength parameters, radio link air interface retransmission Rate, packet loss rate and wireless negotiation rate.
  • the apparatus further includes:
  • the second processing unit is further configured to: when the detection unit detects that no link congestion occurs, the second processing unit executes to reduce the response time of the MAC layer ACK message or the first TCP layer ACK message; When the detection unit detects that link congestion occurs, the second processing unit increases the response time of the MAC layer ACK message or the first TCP layer ACK message.
  • an embodiment of the present invention provides a second acceleration device for transmission control protocol TCP, which is applied to the TCP layer and the media intervention control MAC layer, and the device includes:
  • the receiving unit is configured to receive a MAC layer message sent by the first network device, and the MAC layer message data frame format is a MAC protocol data unit MPDU;
  • a sending unit configured to send a MAC layer confirmation character ACK message corresponding to the MAC layer message to the first network device
  • a mapping unit configured to map the MAC layer message to a TCP layer message
  • the sending unit is also used to send the TCP layer message to the TCP client.
  • the receiving unit is further configured to receive a second TCP layer ACK message, and the second TCP layer ACK message is the TCP client according to the received all The confirmation character generated by the TCP layer message; the sending unit is further configured to send the second TCP layer ACK message to the first network device.
  • the receiving unit is further configured to receive a third TCP layer ACK message, and the third The TCP layer ACK message is an acknowledgment character generated by the TCP client according to the received TCP layer message; the mapping unit is also used to discard the third TCP layer ACK message.
  • the mapping unit maps the MAC layer packet to a TCP layer packet , Specifically including:
  • the mapping unit generates a mapping relationship table between the TCP layer message and the MAC layer message
  • the mapping unit maps the MAC layer message to the TCP layer message according to the mapping relationship table.
  • the mapping relationship table uses TCP layer message characteristics and MAC layer message characteristics To generate, the TCP message feature includes a TCP layer message sequence number sequence ID, and the MAC layer message feature includes a MAC layer message sequence number sequence ID.
  • the TCP packet feature further includes TCP packet quintuple information and packet information.
  • the text descriptor, the five-tuple information includes source IP address, source port, destination IP address, destination port, and transport layer protocol.
  • an embodiment of the present invention provides a transmission control protocol TCP acceleration system, including: a TCP first acceleration device and a TCP second acceleration device:
  • the TCP first acceleration device is the TCP first acceleration device described in the third aspect
  • the TCP second acceleration device is the TCP second acceleration device described in the fourth aspect.
  • an embodiment of the present invention provides a transmission control protocol TCP acceleration system, including: a TCP first acceleration device and a TCP second acceleration device:
  • the TCP first acceleration device is the TCP first acceleration device described in the foregoing fifth aspect
  • the TCP second acceleration device is the TCP second acceleration device described in the foregoing sixth aspect.
  • an embodiment of the present invention provides a chip.
  • the chip includes a processor and a memory; the memory is used to store a program; the processor is used to execute the program stored in the memory to execute the method described in the first aspect or the second aspect.
  • the first embodiment of the present invention provides a computer-readable storage medium including computer-readable instructions.
  • the computer reads and executes the computer-readable instructions, the computer executes the first aspect or the second aspect. The method described in.
  • an embodiment of the present invention also provides a computer program product containing instructions, which when the computer program product runs on a computer, causes the computer to execute the method described in the first or second aspect.
  • the present invention provides a TCP acceleration method, device and system.
  • a first network device receives a TCP layer message and maps it to a MAC layer message, and the first network device sends the MAC layer message to the second network device, and receives the first network device. 2.
  • the MAC layer acknowledgment character ACK message sent by the network device the first network device maps the MAC layer ACK message to the first TCP layer ACK message and sends it to the TCP server.
  • the TCP acceleration method, device and system provided by the present invention cooperatively convert the MAC layer ACK message and the TCP layer ACK message to realize the rapid response of the ACK confirmation mechanism, and use the MAC layer ACK message to replace the TCP layer at the MAC layer ACK messages are confirmed, which can achieve a rapid increase in TCP throughput, greatly reduce the number of ACK messages, and avoid the long-term low caused by the fluctuation of the TCP layer ACK message confirmation mechanism and the MAC layer ACK message confirmation mechanism. Channel situation.
  • Figure 1 is a schematic diagram of the traditional TCP congestion control method
  • Fig. 2 is a schematic diagram of a sending response confirmation mechanism between a Wi-Fi gateway and an access STA in an existing Wi-Fi network;
  • FIG. 3 is a schematic diagram of the architecture of a TCP acceleration solution provided by the first embodiment of the present invention.
  • FIG. 4 is a schematic flowchart of a TCP acceleration method provided by the second embodiment of the present invention.
  • FIG. 5 is a specific data structure of a TCP message provided by the second embodiment of the present invention.
  • FIG. 6 is a flowchart of a TCP acceleration method provided by the third embodiment of the present invention.
  • FIG. 7 is a flowchart of a TCP acceleration method provided by the fourth embodiment of the present invention.
  • FIG. 8 is a schematic diagram of a first TCP acceleration device provided by the fifth embodiment of the present invention.
  • FIG. 9 is a schematic diagram of a second TCP acceleration device provided by the sixth embodiment of the present invention.
  • FIG. 10 is a schematic diagram of a first TCP acceleration device provided by the seventh embodiment of the present invention.
  • FIG. 11 is a schematic diagram of a second TCP acceleration device provided by the eighth embodiment of the present invention.
  • the TCP protocol When data transmission is based on the TCP protocol, when the network resources available in the transmission system (for example: bandwidth or network resources such as the buffer of switching nodes) in a certain transmission period cannot meet the network resources required for data transmission, the performance of the network is It will get worse, that is, the network will be congested.
  • the TCP protocol generally adopts a congestion control method to solve this problem.
  • the congestion control method controls the amount of data injected into the network by controlling the size of the congestion window, so as to avoid network congestion, and in controlling the large congestion window.
  • the congestion control method mainly includes four processes: slow start (also called slow start), congestion avoidance, fast retransmission, and fast recovery.
  • FIG. 1 is a schematic diagram of the principle of the traditional TCP congestion control method. As shown in Figure 1, the principles of the slow start process and the congestion avoidance process are:
  • the slow start process When the size of the congestion window is less than the initial slow start threshold, the slow start process is executed, and when the size of the congestion window is greater than the initial slow start threshold, the congestion avoidance process is executed.
  • the initial size of the congestion window is 1.
  • the congestion avoidance process After each transmission round (that is, when the data messages allowed by the congestion window are sent out, and the confirmation information of the last byte of all sent data messages is received), Increase the size of the congestion window.
  • the congestion avoidance process is started, and the size of the congestion window is increased by one after each transmission round.
  • the slow start threshold is updated, and the updated slow start threshold is reduced to half the size of the congestion window when congestion occurs, and the congestion window The size of is updated to 1, and the slow start algorithm is restarted.
  • the data receiving end when the data receiving end receives an out-of-sequence data message segment, it can send a repeated confirmation message to the data sending end, without waiting for all data messages to be received before sending the repeated confirmation message, and when When the data sender receives three repeated confirmation messages, it can be considered that the network is congested.
  • the updated slow start threshold is set to half the size of the current congestion window, and the size of the congestion window is reduced to the current congestion window. Half of the size, and then perform the congestion avoidance algorithm.
  • the number of data packets transmitted in the network is constant. Only when the "old" data packets leave the network, can the "new" data packets enter the network, and if the data sender receives A duplicate acknowledgment message, it is considered that a data message packet has left the network, and the congestion window is increased by 1.
  • timeout retransmission mechanism is another important retransmission mechanism for the TCP protocol to ensure data reliability.
  • the principle is to start a timer after sending a certain data. If the ACK report of the sent data packet is not obtained within a certain period of time Text, then resend the data until the transmission is successful.
  • TCP congestion control algorithms are all through the slow start mechanism.
  • the start phase of the congestion window increases exponentially.
  • ACK Acknowledgement, confirmation character
  • linear growth is used for the next forwarding, instead of exponential growth. , It takes a long time to reach the maximum throughput, which has a greater impact on the loading time of video services.
  • TCP three-way handshake In the TCP protocol, two devices need to establish a TCP connection through a three-way handshake mechanism. For example, when device A wants to establish a connection with device B, device A sends a SYN message to device B, and device A enters the SYN_SENT state, waiting for device B to confirm, this is the first handshake. After device B receives the SYN message, it will send a SYN-ACK message to device A to respond to the SYN message sent by device A, and device B will enter the SYN_RECV state, which is the second handshake. After device A receives the SYN-ACK message from device B, it sends an acknowledgment (ACK) message to device B, which is the third handshake. After the three-way handshake, device A and device B establish a TCP connection and enter the TCP connection successful state (established state), and then device A and device B can start to transmit TCP packets.
  • ACK acknowledgment
  • the wireless network rate negotiation mechanism includes a message confirmation mechanism, a message retransmission mechanism, and a message rate adjustment mechanism.
  • the message confirmation mechanism is used to ensure the reliability of air interface data transmission.
  • the receiver In the process of message transmission, for every IEEE802.11 message sent by the sender, the receiver must make an ACK reply confirmation after receiving it. After the sender receives the ACK acknowledgement received by the receiver, it is determined that the message has been successfully sent, and the next frame of data is sent, otherwise the sender retransmits the message.
  • the message retransmission mechanism is that after a message fails to be sent, it is re-sent at the same rate; at this time, the sender and receiver still use the message confirmation mechanism for reliability confirmation.
  • the message rate adjustment mechanism is to use the current rate in the current environment and the message confirmation mechanism and the message retransmission mechanism are still unable to retransmit successfully.
  • the sender performs the speed reduction operation and retransmits the message after the speed reduction. Until a suitable rate is negotiated, packets can be transmitted normally at this rate.
  • the above-mentioned negotiation mechanism of the MAC layer of Wi-Fi and power line media can complete the rapid retransmission of the MAC layer messages of Wi-Fi and power line media after being discarded.
  • retransmission will increase the burden on the air interface, and it will still cause Forwarding failed.
  • the negotiation rate of Wi-Fi and power line media air interface transmission fluctuates in real time.
  • the TCP protocol cannot perceive the forwarding status of the actual Wi-Fi air interface.
  • the real-time fluctuation of Wi-Fi air interface rate will affect the performance of the TCP protocol.
  • the current TCP protocol has not yet been optimized for the status quo of Wi-Fi.
  • the application scenario of the embodiment of the present invention is first introduced. Please refer to Fig. 2.
  • a Wi-Fi network as an example.
  • the actual power line communication is similar to this, and the embodiments provided by the present invention can also be applied to the field of power line communication.
  • Fig. 2 is a schematic diagram of a sending response confirmation mechanism between a Wi-Fi gateway and an access STA (Station, terminal user) in an existing Wi-Fi network.
  • the Wi-Fi gateway 220 here includes general home gateway routers, such as wireless CPE (Customer Premise Equipment), optical network terminal (Optical network terminal), AP (Access point, access point), etc. ;
  • End user STA (Station, end user) 210 includes Wi-Fi user terminals such as mobile phones and tablet computers.
  • the transmission layers of the gateway 220 and the STA210 include a TCP layer, a MAC (Media access control, media access control) layer, and a physical PHY layer.
  • TCP server231 is at the remote end and is the data source; TCP client211 obtains data from TCP server231.
  • a TCP proxy is deployed on the gateway 220, and the gateway 220 includes TCP proxy 221, gateway WiFi MAC 222, and gateway WiFi PHY 223.
  • TCP layer and the Wi-Fi MAC layer each have a separate sending response confirmation mechanism, and there is no information transfer between the TCP layer and the Wi-Fi MAC layer response confirmation mechanism.
  • TCP proxy221 sends TCP messages to TCP client211, and TCP client211 sends ACK messages to TCP proxy221.
  • TCP proxy221 After TCP proxy221 receives the ACK confirmation message, TCP proxy221 continues to send TCP messages to TCP client211; at the MAC layer, the gateway Wi -Fi MAC222 sends MAC message to STA Wi-Fi 212, STA Wi-Fi MAC212 sends an acknowledgement ACK to gateway Wi-Fi MAC222 after receiving it, and then gateway Wi-Fi MAC 222 continues to send MAC message to STA Wi-Fi MAC 212.
  • the TCP layer ACK confirmation mechanism and the MAC layer ACK confirmation mechanism do not interfere with each other.
  • TCP proxy is also known as TCP performance enhancement. It can be processed in the Radio Access Network (RAN) or unreliable transmission through split acknowledgment (ACK), duplication DupACK, local retransmission, and uplink/downlink data packet sequencing. The function of optimizing TCP packets in media networks (such as power lines).
  • RAN Radio Access Network
  • ACK split acknowledgment
  • duplication DupACK duplication DupACK
  • local retransmission local retransmission
  • uplink/downlink data packet sequencing uplink/downlink data packet sequencing.
  • FIG. 3 is a schematic diagram of the architecture of a TCP acceleration solution provided by the first embodiment of the present invention.
  • the gateway 320 includes a general home gateway router, such as wireless CPE, optical modem ONT, AP, etc.; end user STA310 includes Wi-Fi user terminals such as mobile phones and tablet computers.
  • the transmission layers of the gateway 320 and the STA 310 include the TCP layer, the MAC layer, and the physical PHY layer.
  • TCP server331 is at the remote end and is the data source; TCP client311 obtains data from TCP server331.
  • a TCP proxy is deployed and implemented on the gateway 320, and the gateway 320 includes a TCP proxy321, a gateway WiFi MAC322, and a gateway WiFi PHY323.
  • the TCP connection is divided into two segments: TCP client311-TCP proxy321 and TCP proxy321-TCP server331.
  • the TCP proxy321 protocol stack and the WiFi MAC322 forwarding module realize coordination.
  • a TCP and Wi-Fi MPDU (MAC Protocol Data Unit, MAC protocol data unit) mapping table is automatically generated according to the quintuple information of the message. According to the MPDU mapping table, the communication between the transport layer and the WiFi MAC layer can be realized.
  • Wi-Fi MPDU MAC Protocol Data Unit, MAC protocol data unit
  • the quintuple information includes source IP address, source port, destination IP address, destination port, and transport layer protocol;
  • Protocol stack also known as protocol stack, is a specific software implementation of a computer network protocol suite.
  • a protocol in the protocol suite is usually designed for only one purpose, which can make the design easier. Because each protocol module usually communicates with two other protocol modules above and below, they can usually be thought of as layers in the protocol stack. The lowest level protocol always describes the physical interaction with the hardware. Each advanced level adds more features. The user application only deals with the top-level protocol.
  • the TCP layer and the MAC layer only use a one-layer ACK confirmation mechanism to unify the original TCP layer and the Wi-Fi MAC layer's separate sending response confirmation mechanisms. Then, after TCP client311 sends TCP ACK301, there is no need to separately send ACK to TCP proxy321; STA WiFi MAC312 generates ACK302 after receiving TCP ACK301; gateway WiFi MAC322 generates ACK203 after receiving ACK302, and sends the notification to TCP proxy321 , The ACK of the MAC layer replaces the ACK of the TCP layer for confirmation.
  • Fig. 4 is a schematic flowchart of a TCP acceleration method provided by the second embodiment of the present invention.
  • the interactive body of this embodiment includes STA410, router 420, and TCP server430.
  • TCP server430 is at the remote end, which is data source.
  • a TCP proxy is deployed on the router 420, and the router 420 includes TCP proxy421 and WiFi MAC422;
  • a TCP client is deployed on the STA410, and the STA410 includes TCP client411 and STA WiFi MAC412.
  • TCP server331, TCP proxy321, and TCP client are at the TCP layer
  • WiFi MAC322 and WiFi MAC312 are at the link layer
  • WiFi PHY323 and WiFi PHY313 are at the physical layer.
  • the TCP connection is divided into two segments: TCP client411-TCP proxy421 and TCP proxy421-TCP server430.
  • TCP client411 obtains data from TCP server430.
  • the TCP acceleration method includes the following steps:
  • Step 401 The TCP Client and the TCP proxy establish a TCP session, and the TCP proxy and the TCP server establish a TCP session.
  • TCP client411 sends a request for data acquisition, and TCP client411 establishes a TCP session with TCP proxy421. It is worth mentioning that the TCP session here is equivalent to a logical connection between TCP client411 and TCP proxy421, and there is not necessarily a direct physical contact between TCP client411 and TCP proxy421.
  • Step 402 The TCP Server constructs a TCP message and sends it to the TCP proxy421 in the route 420.
  • the TCP header contains the length of the congestion window of the server.
  • the reserved 6 bits of the TCP header can be used to carry the length of the congestion window.
  • the TCP header may include:
  • Sequence number (English: Sequence Number), used to indicate the position of TCP data in the sent data stream;
  • Acknowledgment sequence number (English: Acknowledgment Number), used to indicate the sequence number of the first byte of the data that the receiver wants to receive next time;
  • Data Offset (English: Data Offset), used to indicate the data offset, the value of this field is the length of the TCP packet (including the option part) divided by 4;
  • Identification bit reserved 6 bits, here, the reserved 6 bits can be used to carry the length of the congestion window
  • Urgent flag (English: Urgent, abbreviated as: URG), used in conjunction with the emergency pointer, when it is 1, it means that this message should be transmitted as soon as possible;
  • Push flag (English: Push, PSH for short), when set to 1, the sender will immediately send the data in the buffer;
  • Reset flag (English: Reset, referred to as: RST). When set to 1, it indicates that there is a serious error and the connection must be released;
  • Synchronization flag (English: Synchronization, abbreviated as: SYN), when set to 1, it means that a connection is requested;
  • Termination flag (English: Finish, abbreviation: FIN), when set to 1, it indicates that the data has been sent, and the connection is requested to be released;
  • Window (English: Windows), used to indicate the free space of the receive buffer, 16 bits, used to tell the maximum data length that the TCP connection peer can receive;
  • Checksum (English: Checksum), the check range includes section header, data and pseudo header;
  • Urgent Pointers (English: Urgent Pointers), occupies 16 bits, this field is meaningful only when the URG flag bit is set, and indicates the offset of the emergency data relative to the sequence number (the value of the Sequence Number field).
  • Step 403 In the routing 420, a key information mapping table between the TCP message and the Wi-Fi MPDU is generated, and the TCP message of the TCP layer is mapped to the MAC message of the MAC layer of the wireless air interface link, and the MAC layer is routed through WiFi MAC422 Send the MAC message.
  • WI-FI MPDU (MAC Protocol Data Unit, MAC protocol data unit) is a WiFi data frame format, that is, the data frame format of a MAC message.
  • MSDU MAC Service Data Unit
  • MPDU MAC Protocol Data Unit
  • MSDU can be considered as an Ethernet message
  • MPDU refers to a data frame encapsulated by 802.11.
  • the key information mapping table between the TCP message and the Wi-Fi MPDU is used to map the TCP message of the TCP layer to the MAC message of the wireless air interface link MAC layer.
  • Step 404 The STA WiFi MAC412 receives the MAC message, generates a mapping relationship table between the TCP message and the Wi-Fi MPDU, maps the MAC message to a TCP message, and forwards the TCP message to the TCP client411. STA WiFi MAC412 will automatically send a first MAC ACK message to the router WiFi MAC422 for this successfully received MAC message.
  • Step 405 After receiving the TCP message, the TCP client411 generates a second TCP ACK message for confirmation, and sends the second TCP ACK message to the STA WiFi MAC412.
  • Step 406 After receiving the second TCP ACK message, the STA WiFi MAC412 generates a second MAC ACK message according to the mapping relationship table between the TCP message and the Wi-Fi MPDU, and forwards the second MAC ACK message to the routing WiFi MAC422, if the router WiFi MAC422 has responded to the first MAC ACK message, the second MAC ACK message is discarded.
  • Step 407 After receiving the first MAC ACK message, the routing WiFi MAC422 generates the first TCP ACK message according to the mapping relationship table between the TCP message and the Wi-Fi MPDU and forwards it to the TCP proxy421.
  • the routing WiFi MAC422 also determines the time to respond to the first MAC ACK message according to the link quality parameters and congestion information of the WiFi MAC layer and the WiFi physical layer.
  • Link quality parameters include signal strength, air interface retransmission rate, packet loss rate, wireless negotiation rate, etc.
  • the router WiFi MAC422 detects instantaneous conflict and packet loss on the link air interface, the actual link is not congested, and there is no need to reduce the TCP sliding window, and the TCP ACK fast pickup can continue, so that a high TCP throughput can be maintained.
  • the router WiFi MAC422 detects link congestion, it is necessary to control the response time of TCP ACK pickup, reduce the TCP sliding window, and dynamically adjust the TCP RTT (Round-Trip Time) to reduce TCP throughput .
  • TCP RTT Red-Trip Time
  • RTT represents the time required from the sender to the receiver.
  • TCP will sample the RTT during data transmission (that is, measure the time difference between the sent data packet and its ACK, and update the RTT value according to the measured value) , TCP updates the RTO (Retransmission Time Out) value according to the obtained RTT value, and the sender counts each sent data packet. If the corresponding ACK of the sent data packet is not received within the RTO time, then The task data packet is lost and the data will be retransmitted.
  • the RTO value is larger than the RTT value obtained by sampling.
  • RTT is determined by three parts, namely the propagation time of the link, the processing time of the end system, and the queuing and processing time in the buffer of the router.
  • the propagation time of the link and the processing time of the end system are relatively fixed as a TCP connection, and the queuing and processing time in the buffer of the router will change with the change of the congestion degree of the entire network. Therefore, changes in RTT reflect changes in network congestion to a certain extent.
  • Step 408 The TCP proxy421 sends the first TCP ACK message to the TCP server 430, so as to realize the rapid response of the TCP ACK mechanism.
  • Step 409 After receiving the first TCP ACK message, the TCP server constructs the next TCP message and forwards it to TCP proxy421. This step will increase the TCP congestion window length to 4 and increase the sending TCP data throughput.
  • the initial size of the congestion window is 1.
  • the slow start process is executed, and when the size of the congestion window is greater than the initial slow start threshold, the congestion avoidance process is executed.
  • the slow start process after each transmission round (that is, when the data messages allowed by the congestion window are sent out, and the confirmation information of the last byte of all sent data messages is received), Increase the size of the congestion window.
  • the congestion avoidance process is started, and the size of the congestion window is increased by one after each transmission round.
  • the slow start threshold is updated, and the updated slow start threshold is reduced to half the size of the congestion window when congestion occurs, and the congestion window The size of is updated to 1, and the slow start algorithm is restarted.
  • Step 4010 TCP proxy421 continues to forward and receive new TCP packets, and send them to TCP client411, and then the subsequent steps are the same as 403 ⁇ 409.
  • the TCP layer and MAC layer ACK message confirmation mechanisms in wireless network information transmission are unified, and the ACK message response of the hardware forwarding layer and the hardware line congestion state are sensed in real time on the gateway to adjust the TCP layer in real time.
  • the ACK message confirmation mechanism avoids the long-term low channel situation caused by the fluctuation and superposition of the TCP layer and the MAC layer ACK message confirmation mechanism.
  • the MAC layer ACK message and the TCP layer ACK message cooperate and convert each other, using the MAC layer ACK
  • the MAC layer ACK message is used on the gateway to replace the TCP layer ACK message for confirmation, thereby achieving a rapid increase in TCP throughput.
  • Fig. 6 is a flowchart of a TCP acceleration method provided by the third embodiment of the present invention.
  • this method involves a first network device, a second network device, and a TCP server.
  • the first network device can be CPE (Customer Premises Equipment), AP ((Wireless) Access Point, (wireless) ) Access point), such as routers, switches, firewalls, etc.
  • the second network device is a client device, including but not limited to a variety of different applications such as browsers, video players, IM chat software, and online games. It requests data from the TCP server via TCP, and provides users with network browsing, video playback, Communication and entertainment functions.
  • TCP Server equipment including but not limited to web server (English: Web Server), video server (English: Video Server), instant messaging server (English: IM Server) and game server (English: Game Server), etc., used to respond to TCP
  • the client's request provides the TCP client with functions such as network pages, video files, IM communication and games.
  • Internet The communication network between the TCP client and the TCP server, including the access network, the core network, and the Internet.
  • the implementation of the embodiment of the present invention is deployed on the network element of the TCP server.
  • Step 601 The first network device receives a TCP layer packet.
  • Step 602 The first network device maps the TCP layer message to a MAC layer message, and the MAC layer message data frame format is a MAC protocol data unit MPDU.
  • MPDU (MAC Protocol Data Unit, MAC protocol data unit) is the data frame format of the MAC layer message.
  • MSDU MAC Service Data Unit
  • MPDU MAC Protocol Data Unit
  • MPDU MAC Protocol Data Unit
  • MSDU can be considered as an Ethernet message
  • MPDU refers to a data frame encapsulated by 802.11.
  • the first network device maps the TCP layer message to the MAC layer message, which specifically includes:
  • the first network device generates a mapping relationship table between TCP layer messages and MAC layer messages
  • the first network device maps the TCP layer message to a MAC layer message according to the mapping relationship table.
  • the mapping relationship table is generated by TCP layer message characteristics and MAC layer message characteristics, the TCP message characteristics include TCP layer message sequence ID, and the MAC layer message characteristics include MAC layer message characteristics. Document sequence ID.
  • the TCP message feature further includes TCP layer message quintuple information and a message descriptor, and the quintuple information includes a source IP address, a source port, a destination IP address, a destination port, and a transport layer protocol.
  • Step 603 The first network device sends the MAC layer message to the second network device.
  • Step 604 The first network device receives the MAC layer confirmation character ACK message sent by the second network device.
  • Step 605 The first network device maps the MAC layer ACK message to the first TCP layer ACK message.
  • the first network device detects the link quality parameters and congestion status of the MAC layer and the physical PHY layer, and determines the time to respond to the MAC layer ACK message according to the detection result.
  • Link quality parameters include signal strength parameters, radio link air interface retransmission rate, packet loss rate and wireless negotiation rate.
  • the first network device If the first network device detects that the link air interface instantaneously conflicts and loses packets, and the actual link is not congested, the first network device reduces the response time of the MAC layer ACK message or the first TCP layer ACK message to improve The response speed of the MAC layer ACK message or the first TCP layer ACK message.
  • the first network device If the first network device detects that link congestion occurs, the first network device increases the response time of the MAC layer ACK message or the first TCP layer ACK message, reduces the TCP sliding window, and dynamically adjusts the TCP RTT (Round-Trip Time) to reduce TCP throughput.
  • TCP RTT Red-Trip Time
  • RTT represents the time required from the sender to the receiver.
  • TCP will sample the RTT during data transmission (that is, measure the time difference between the sent data packet and its ACK, and update the RTT value according to the measured value) , TCP updates the RTO (Retransmission Time Out) value according to the obtained RTT value, and the sender counts each sent data packet. If the corresponding ACK of the sent data packet is not received within the RTO time, then The task data packet is lost and the data will be retransmitted.
  • the RTO value is larger than the RTT value obtained by sampling.
  • RTT is determined by three parts, namely the propagation time of the link, the processing time of the end system, and the queuing and processing time in the buffer of the router.
  • the propagation time of the link and the processing time of the end system are relatively fixed as a TCP connection, and the queuing and processing time in the router's cache will change with the change of the entire network congestion. Therefore, changes in RTT reflect changes in network congestion to a certain extent.
  • the first network device maps the MAC layer ACK message to the first TCP layer ACK message, which specifically includes:
  • the first network device generates a mapping relationship table between the TCP layer ACK message and the MAC layer ACK message;
  • the first network device maps the MAC layer ACK message to the first TCP layer ACK message according to the mapping relationship table.
  • the mapping relationship table is generated by TCP layer message characteristics and MAC layer message characteristics, the TCP message characteristics include TCP layer message sequence ID, and the MAC layer message characteristics include MAC layer message characteristics. Document sequence ID.
  • the TCP message feature further includes TCP layer message quintuple information and a message descriptor, and the quintuple information includes a source IP address, a source port, a destination IP address, a destination port, and a transport layer protocol.
  • Step 606 The first network device sends the first TCP layer ACK message to the TCP server.
  • the method further includes:
  • Step 607 The first network device receives the second TCP layer ACK message sent by the second network device.
  • the second TCP layer ACK message is an acknowledgment character generated by the TCP client according to the received TCP layer message.
  • Step 608 The first network device discards the second TCP layer ACK message.
  • This embodiment provides a TCP acceleration method.
  • the first network device receives a TCP layer message and maps it to a MAC layer message, and the first network device sends the MAC layer message to the second network device and receives the second network device For the sent MAC layer acknowledgment character ACK message, the first network device maps the MAC layer ACK message to the first TCP layer ACK message and sends it to the TCP server.
  • the TCP acceleration method provided in this embodiment converts the MAC layer ACK message and the TCP layer ACK message cooperatively to realize the fast response of the ACK confirmation mechanism, and uses the MAC layer ACK message instead of the TCP layer ACK message for confirmation. In this way, a rapid increase in TCP throughput can be achieved, while avoiding the long-term low channel situation caused by the fluctuation of the TCP layer ACK message confirmation mechanism and the MAC layer ACK message confirmation mechanism.
  • Fig. 7 is a flowchart of a TCP acceleration method provided by the fourth embodiment of the present invention.
  • this method involves a first network device, a second network device, and a TCP client.
  • the first network device can be CPE (Customer Premises Equipment), AP ((Wireless) Access Point, ( Wireless) access point), such as routers, switches, firewalls, etc.
  • the second network device is a client device, including but not limited to a variety of different applications such as browsers, video players, IM chat software, and online games. It requests data from the TCP server via TCP, and provides users with network browsing, video playback, Communication and entertainment functions.
  • TCP Server equipment including but not limited to web server (English: Web Server), video server (English: Video Server), instant messaging server (English: IM Server) and game server (English: Game Server), etc., used to respond to TCP
  • the client's request provides the TCP client with functions such as network pages, video files, IM communication and games.
  • Internet The communication network between the TCP client and the TCP server, including the access network, core network, and interconnection network.
  • the implementation of the embodiment of the present invention is deployed on the network element of the TCP server.
  • Step 701 The second network device receives a MAC layer message sent by the first network device, where the data frame format of the MAC layer message is a MAC protocol data unit MPDU.
  • MPDU (MAC Protocol Data Unit, MAC protocol data unit) is the data frame format of the MAC layer message.
  • MSDU MAC Service Data Unit
  • MPDU MAC Protocol Data Unit
  • MPDU MAC Protocol Data Unit
  • MSDU can be considered as an Ethernet message
  • MPDU refers to a data frame encapsulated by 802.11.
  • Step 702 The second network device sends a MAC layer confirmation character ACK message corresponding to the MAC layer message to the first network device.
  • the second network device After receiving the MAC layer message, the second network device sends a MAC layer ACK message confirmation message to the first network device.
  • Step 703 The second network device maps the MAC layer message to a TCP layer message.
  • the second network device maps the MAC layer message to a TCP layer message, which specifically includes:
  • the second network device generates a mapping relationship table between TCP layer messages and MAC layer messages
  • the second network device maps the MAC layer message to the TCP layer message according to the mapping relationship table.
  • the mapping relationship table is generated by TCP layer message characteristics and MAC layer message characteristics, the TCP message characteristics include TCP layer message sequence ID, and the MAC layer message characteristics include MAC layer message sequence No. sequence ID.
  • the TCP message feature further includes TCP message quintuple information and a message descriptor, and the quintuple information includes a source IP address, a source port, a destination IP address, a destination port, and a transport layer protocol.
  • Step 704 The second network device sends the TCP layer message to the TCP client.
  • the method further includes:
  • Step 705 The second network device receives the second TCP layer ACK message sent by the TCP client.
  • the second TCP layer ACK message is an acknowledgment character generated by the TCP client according to the received TCP layer message.
  • Step 706 The second network device discards or forwards the second TCP layer ACK message.
  • the second network device may directly discard the second TCP layer ACK message, or forward the second TCP layer ACK message to the first network device.
  • the embodiment of the present invention provides a TCP acceleration method
  • the second network device receives the MAC layer message sent by the first network device, the second network device sends the MAC layer confirmation character ACK message to the first network device, and the MAC layer
  • the message is mapped to a TCP layer message, and the second network device sends the TCP layer message to the TCP client.
  • the TCP acceleration method provided in this embodiment directly sends the MAC layer ACK message at the MAC layer to realize the fast response of the ACK confirmation mechanism.
  • the MAC layer ACK message is used to replace the TCP layer ACK message at the MAC layer for confirmation. It can achieve a rapid increase in TCP throughput, while avoiding the long-term low channel situation caused by the fluctuation of the TCP layer ACK message confirmation mechanism and the MAC layer ACK message confirmation mechanism.
  • an embodiment of the present invention provides a first TCP acceleration device for executing the TCP packet transmission method described in the embodiment corresponding to FIG.
  • the transmission method may be CPE (Customer Premises Equipment), AP ((Wireless) Access Point), such as routers, switches, firewalls, etc.
  • CPE Customer Premises Equipment
  • AP (Wireless) Access Point
  • Internet The communication network between the TCP client and the TCP server, including the access network, core network, and interconnection network.
  • the implementation of the embodiment of the present invention is deployed on the network element of the TCP server.
  • FIG. 8 is a schematic diagram of a TCP first acceleration device provided by the fifth embodiment of the present invention.
  • a TCP first acceleration device 80 is applied to the TCP layer and the media intervention control MAC layer, and includes: a receiving unit 801 , A mapping unit 802, a sending unit 803, a first processing unit 804, a detection unit 805, and a second processing unit 806.
  • the receiving unit 801 is configured to receive TCP layer messages
  • the mapping unit 802 is configured to map a TCP layer message to a MAC layer message, and the data frame format of the MAC layer message is a MAC protocol data unit MPDU;
  • the sending unit 803 is configured to send the MAC layer message to the second network device
  • the receiving unit 801 is further configured to receive a MAC layer confirmation character ACK message sent by the second network device;
  • the mapping unit 802 is also used to map the MAC layer ACK message to the first TCP layer ACK message;
  • the sending unit 803 is further configured to send the first TCP layer ACK message to the TCP server.
  • mapping unit 802 maps the TCP layer message to the MAC layer message, which specifically includes:
  • the mapping unit 802 generates a mapping relationship table between TCP layer packets and MAC layer packets
  • the mapping unit 802 maps the TCP layer message to the MAC layer message according to the mapping relationship table.
  • mapping unit 802 maps the MAC layer ACK message to the first TCP layer ACK message, which specifically includes:
  • the mapping unit 802 generates a mapping relationship table between the TCP layer ACK message and the MAC layer ACK message;
  • the mapping unit 802 maps the MAC layer ACK message to the first TCP layer ACK message according to the mapping relationship table.
  • mapping relationship table is generated by TCP layer message characteristics and MAC layer message characteristics.
  • TCP message characteristics include TCP layer message sequence ID
  • MAC layer message characteristics include MAC layer message sequence ID. .
  • the TCP message feature also includes TCP layer message quintuple information and a message descriptor, and the quintuple information includes source IP address, source port, destination IP address, destination port, and transport layer protocol.
  • the device 80 further includes:
  • the receiving unit 801 is further configured to receive a second TCP layer ACK message sent by a second network device, where the second TCP layer ACK message is an acknowledgment character generated by the TCP client according to the received TCP layer message
  • the first processing unit 804 is configured to discard the second TCP layer ACK message.
  • the device 80 further includes:
  • the detection unit 805 is used to detect link quality parameters and congestion conditions of the MAC layer and the physical PHY layer.
  • Link quality parameters include signal strength parameters, radio link air interface retransmission rate, packet loss rate and wireless negotiation rate.
  • the device 80 further includes a second processing unit 806, configured to: when the detection unit detects that the link air interface instantaneously conflicts and loses packets, and the actual link is not congested, the second processing unit performs a reduction The response time of the MAC layer ACK message or the first TCP layer ACK message; when the detection unit detects that link congestion has occurred, the second processing unit increases the MAC layer ACK message or the first TCP layer Response time of TCP layer ACK packets.
  • a second processing unit 806 configured to: when the detection unit detects that the link air interface instantaneously conflicts and loses packets, and the actual link is not congested, the second processing unit performs a reduction The response time of the MAC layer ACK message or the first TCP layer ACK message; when the detection unit detects that link congestion has occurred, the second processing unit increases the MAC layer ACK message or the first TCP layer Response time of TCP layer ACK packets.
  • an embodiment of the present invention provides a second TCP acceleration device for executing the TCP packet transmission method described in the embodiment corresponding to FIG.
  • the transmission method can be a client device, including but not limited to various applications such as browsers, video players, IM chat software, and online games. It requests data from the TCP server through TCP, and provides users with network browsing, video playback, Communication and entertainment functions.
  • Server equipment including but not limited to web server (English: Web Server), video server (English: Video Server), instant messaging server (English: IM Server) and game server (English: Game Server), etc., used to respond to TCP
  • the client's request provides the TCP client with functions such as network pages, video files, IM communication and games.
  • Internet The communication network between the TCP client and the TCP server, including the access network, core network, and interconnection network.
  • the implementation of the embodiment of the present invention is deployed on the network element of the TCP server.
  • FIG. 9 is a schematic diagram of a TCP second acceleration device provided by the sixth embodiment of the present invention.
  • a TCP second acceleration device 90 is applied to the TCP layer and the media intervention control MAC layer, and includes: a receiving unit 901 , A sending unit 902, a mapping unit 903, and a processing unit 904.
  • the receiving unit 901 is configured to receive a MAC layer message sent by the first network device, and the MAC layer message data frame format is a MAC protocol data unit MPDU;
  • the sending unit 902 is configured to send a MAC layer confirmation character ACK message corresponding to the MAC layer message to the first network device;
  • the mapping unit 903 is configured to map MAC layer packets to TCP layer packets
  • the sending unit 901 is also used to send the TCP layer message to the TCP client.
  • the receiving unit 901 is further configured to receive a second TCP layer ACK message, where the second TCP layer ACK message is an acknowledgment character generated by the TCP client according to the received TCP layer message;
  • the sending unit 902 is further configured to send the second TCP layer ACK message to the first network device.
  • the device 90 further includes:
  • the receiving unit 901 is further configured to receive a third TCP layer ACK message, where the third TCP layer ACK message is an acknowledgment character generated by the TCP client according to the received TCP layer message;
  • the processing unit 904 is configured to discard the third TCP layer ACK message.
  • mapping unit 903 maps the MAC layer message to the TCP layer message, which specifically includes:
  • the mapping unit 903 generates a mapping relationship table between the TCP layer message and the MAC layer message
  • the mapping unit 903 maps the MAC layer message to the TCP layer message according to the mapping relationship table.
  • mapping relationship table is generated by TCP layer message characteristics and MAC layer message characteristics.
  • TCP message characteristics include TCP layer message sequence ID
  • MAC layer message characteristics include MAC layer message sequence ID. .
  • the TCP message feature also includes TCP message quintuple information and a message descriptor.
  • the quintuple information includes a source IP address, a source port, a destination IP address, a destination port, and a transport layer protocol.
  • an embodiment of the present invention provides a first TCP acceleration device for executing the TCP packet transmission method described in the embodiment corresponding to FIG.
  • the transmission method may be CPE (Customer Premises Equipment), AP ((Wireless) Access Point, (wireless) access point), such as routers, switches, firewalls, etc.
  • CPE Customer Premises Equipment
  • AP ((Wireless) Access Point, (wireless) access point), such as routers, switches, firewalls, etc.
  • Internet The communication network between the TCP client and the TCP server, including the access network, core network, and interconnection network.
  • the implementation of the embodiment of the present invention is deployed on the network element of the TCP server.
  • FIG. 10 is a schematic diagram of a TCP first acceleration device provided by the seventh embodiment of the present invention.
  • a TCP first acceleration device 100 is applied to the TCP layer and the media intervention control MAC layer, and includes: a memory 1001
  • the memory 1001, the receiver 1002, the processor 1003, the transmitter 1004, and the detector 1005 are connected to each other through a bus 1006.
  • the bus 1006 can be divided into address bus, data bus, control bus and so on. For ease of presentation, only one thick line is used in FIG. 10 to represent, but it does not mean that there is only one bus or one type of bus.
  • the transmitter or receiver provided in the embodiment of the present invention includes a network interface such as an Ethernet interface.
  • the memory 1001 may include a volatile memory, such as RAM; the memory 1001 may also include a non-volatile memory, such as flash memory, HDD or SSD; the memory 1001 may also include a combination of the foregoing types of memories.
  • a volatile memory such as RAM
  • the memory 1001 may also include a non-volatile memory, such as flash memory, HDD or SSD
  • the memory 1001 may also include a combination of the foregoing types of memories.
  • the processor 1003 may be a hardware chip, directly implemented as a queue scheduler, and complete the function of the TCP acceleration device in the data transmission method provided in the embodiment of the present application.
  • the above hardware chip may be an application specific integrated circuit ASIC, PLD or a combination thereof.
  • the above-mentioned PLD may be a complex programmable logic device CPLD, FPGA, GAL or any combination thereof.
  • the processor 1003 may also be a general-purpose processor, for example, CPU, NP, or a combination of CPU and NP.
  • the memory 1001 is also used to store program instructions.
  • the processor 1003 calls the program instructions stored in the memory 1001 to execute one or more steps in the TCP acceleration method provided by the third embodiment of the present invention, or alternatively, In an implementation manner, the TCP first acceleration device 10 realizes the functions in the foregoing TCP acceleration method.
  • the first TCP acceleration device provided by the embodiment of the present invention is applied to the TCP layer and the media intervention control MAC layer, and includes:
  • the memory 1001 is used to store program instructions
  • the receiver 1002 is used to receive TCP layer messages
  • the processor 1003 is configured to execute the program instructions stored in the memory to map a TCP layer message to a MAC layer message, and the MAC layer message data frame format is a MAC protocol data unit MPDU;
  • the transmitter 1004 is configured to send the MAC layer message to the second network device
  • the receiver 1002 is further configured to receive the MAC layer confirmation character ACK message sent by the second network device;
  • the processor 1003 is further configured to execute the program instructions stored in the memory to realize the mapping of the MAC layer ACK message to the first TCP layer ACK message;
  • the sender 1004 is further configured to send the first TCP layer ACK message to the TCP server.
  • the processor 1003 maps the TCP layer message to the MAC layer message, which specifically includes:
  • the processor 1003 generates a mapping relationship table between TCP layer messages and MAC layer messages
  • the processor 1003 maps the TCP layer message to a MAC layer message according to the mapping relationship table.
  • the processor 1003 maps the MAC layer ACK message to the first TCP layer ACK message, which specifically includes:
  • the processor maps the MAC layer ACK message to the first TCP layer ACK message according to the mapping relationship table.
  • the mapping relationship table is generated by TCP layer message characteristics and MAC layer message characteristics.
  • TCP message characteristics include TCP layer message sequence ID
  • MAC layer message characteristics include MAC layer message sequence ID.
  • the TCP message feature also includes TCP layer message quintuple information and a message descriptor.
  • the quintuple information includes a source IP address, a source port, a destination IP address, a destination port, and a transport layer protocol.
  • the receiver 1002 is further configured to receive a second TCP layer ACK message sent by the second network device, where the second TCP layer ACK message is an acknowledgment character generated by the TCP client according to the received TCP layer message ;
  • the processor 1003 is further configured to discard the second TCP layer ACK message.
  • the device 100 further includes:
  • the detector 1005 is used to detect link quality parameters and congestion conditions of the MAC layer and the physical PHY layer.
  • Link quality parameters include signal strength parameters, radio link air interface retransmission rate, packet loss rate and wireless negotiation rate.
  • the processor 1003 is further configured to: when the detector 1005 detects that no link congestion occurs, the processor 1003 executes to reduce the response time of the MAC layer ACK message or the first TCP layer ACK message; 1005. Detecting that link congestion occurs, the processor 1003 increases the response time of the MAC layer ACK message or the first TCP layer ACK message.
  • an embodiment of the present invention provides a second TCP acceleration device for executing the TCP packet transmission method described in the embodiment corresponding to FIG.
  • the transmission method can be a client device, including but not limited to various applications such as browsers, video players, IM chat software, and online games. It requests data from the TCP server through TCP, and provides users with network browsing, video playback, Communication and entertainment functions.
  • Server equipment including but not limited to web server (English: Web Server), video server (English: Video Server), instant messaging server (English: IM Server) and game server (English: Game Server), etc., used to respond to TCP
  • the client's request provides the TCP client with functions such as network pages, video files, IM communication and games.
  • Internet The communication network between the TCP client and the TCP server, including the access network, core network, and interconnection network.
  • the implementation of the embodiment of the present invention is deployed on the network element of the TCP server.
  • FIG. 11 is a schematic diagram of a TCP second acceleration device provided by the eighth embodiment of the present invention.
  • a TCP second acceleration device 110 is applied to the TCP layer and the media intervention control MAC layer, and includes: a memory 1101
  • the memory 1101, the receiver 1102, the processor 1103, and the transmitter 1104 are connected to each other through a bus 1105.
  • the bus 1105 can be divided into an address bus, a data bus, a control bus, and so on. For ease of presentation, only one thick line is used in FIG. 11 to represent, but it does not mean that there is only one bus or one type of bus.
  • the memory 1101 may include a volatile memory, such as RAM; the memory 1101 may also include a non-volatile memory, such as flash memory, HDD, or SSD; the memory 1101 may also include a combination of the foregoing types of memories.
  • a volatile memory such as RAM
  • the memory 1101 may also include a non-volatile memory, such as flash memory, HDD, or SSD; the memory 1101 may also include a combination of the foregoing types of memories.
  • the processor 1103 may be a hardware chip, directly implemented as a queue scheduler, and complete the function of the TCP acceleration device in the data transmission method provided in the embodiment of the present application.
  • the above hardware chip may be an application specific integrated circuit ASIC, PLD or a combination thereof.
  • the above-mentioned PLD may be a complex programmable logic device CPLD, FPGA, GAL or any combination thereof.
  • the processor 1103 may also be a general-purpose processor, for example, a CPU, NP, or a combination of CPU and NP.
  • the memory 1101 is also used to store program instructions.
  • the processor 1103 calls the program instructions stored in the memory 1101 to execute one or more steps in the TCP acceleration method provided by the fourth embodiment of the present invention, or alternatively, In an implementation manner, the TCP second acceleration device 110 realizes the functions in the foregoing TCP acceleration method.
  • the second TCP acceleration device provided by the embodiment of the present invention is applied to the TCP layer and the media intervention control MAC layer, and includes:
  • the memory 1101 is used to store program instructions
  • the receiver 1102 is configured to receive a MAC layer message sent by the first network device, and the MAC layer message data frame format is a MAC protocol data unit MPDU;
  • the transmitter 1104 is configured to send a MAC layer confirmation character ACK message corresponding to the MAC layer message to the first network device;
  • the processor 1103 is configured to execute the program instructions stored in the memory to implement the mapping of the MAC layer message into a TCP layer message;
  • the sender 1104 is also used to send TCP layer messages to the TCP client.
  • the receiver 1102 is further configured to receive a second TCP layer ACK message, where the second TCP layer ACK message is an acknowledgment character generated by the TCP client according to the received TCP layer message;
  • the transmitter 1104 is further configured to send the second TCP layer ACK message to the first network device.
  • the receiver 1102 is further configured to receive a third TCP layer ACK message, where the third TCP layer ACK message is an acknowledgment character generated by the TCP client according to the received TCP layer message;
  • the processor 1103 is further configured to discard the third TCP layer ACK message.
  • the processor 1103 maps the MAC layer message to the TCP layer message, which specifically includes:
  • the processor 1103 generates a mapping relationship table between TCP layer messages and MAC layer messages
  • the processor 1103 maps the MAC layer message to the TCP layer message according to the mapping relationship table.
  • the mapping relationship table is generated by TCP layer message characteristics and MAC layer message characteristics.
  • TCP message characteristics include TCP layer message sequence ID
  • MAC layer message characteristics include MAC layer message sequence ID.
  • the TCP message feature also includes TCP message quintuple information and a message descriptor.
  • the quintuple information includes a source IP address, a source port, a destination IP address, a destination port, and a transport layer protocol.
  • the ninth embodiment of the present invention provides a transmission control protocol TCP acceleration system, including: a TCP first acceleration device and a TCP second acceleration device.
  • the TCP first acceleration device is the TCP first acceleration device described in the embodiment corresponding to FIG. 8
  • An acceleration device is the TCP second acceleration device described in the embodiment corresponding to FIG. 9.
  • the tenth embodiment of the present invention provides a transmission control protocol TCP acceleration system, including: a TCP first acceleration device and a TCP second acceleration device.
  • the TCP first acceleration device is the TCP first acceleration device described in the embodiment corresponding to FIG. 10
  • An acceleration device is the TCP second acceleration device described in the embodiment corresponding to FIG. 11.
  • the eleventh embodiment of the present invention provides a chip.
  • the chip includes a processor and a memory; the memory is used to store a program; the processor is used to execute the program stored in the memory to execute the method described in the above method embodiment.
  • the twelfth embodiment of the present invention provides a computer-readable storage medium including computer-readable instructions.
  • the computer reads and executes the computer-readable instructions, the computer is caused to execute the method described in the above method embodiment.
  • the thirteenth embodiment of the present invention also provides a computer program product containing instructions, which when the computer program product runs on a computer, causes the computer to execute the method described in the above method embodiment.
  • the disclosed system, device, and method may be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or It can be integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of this application essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in each embodiment of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program code .

Abstract

本发明提供了一种TCP加速方法、装置和系统,第一网络设备接收TCP层报文并映射为MAC层报文,第一网络设备将MAC层报文发送给第二网络设备,并接收第二网络设备发送的MAC层确认字符ACK报文,第一网络设备将MAC层ACK报文映射为第一TCP层ACK报文并发送给TCP服务器。本发明提供的一种TCP加速方法、装置和系统将MAC层ACK报文与TCP层ACK报文协同转换,实现了ACK确认机制的快速响应,利用MAC层ACK报文在MAC层代替了TCP层ACK报文进行确认,从而可以实现TCP吞吐量的快速提升,大大减少了ACK报文的数量,同时避免了TCP层ACK报文确认机制和MAC层ACK报文确认机制波动叠加引起的长期的低通道的情况。

Description

一种传输控制协议加速方法和装置 技术领域
本申请涉及通信领域,尤其涉及一种传输控制协议(Transmission Control Protocol,TCP)在Wi-Fi等不可靠链路上加速方法及装置。
背景技术
传输控制协议(Transmission Control Protocol,TCP)是一种面向连接的、可靠的且基于字节流的传输层通信协议,TCP加速是一种用于提高TCP报文在网络中传输的速度的技术。TCP协议最初是为有线网络环境条件下设计的,用于有线传输的TCP协议隐含了一个假设:分组丢失都是由网络拥塞引起的,而这一点对于无线网络不成立,而无线网络环境不能很好的满足该假设,加上无线网络环境的小带宽,大时延,可移动性等特点,以致降低了TCP在无线网络中的工作效率。
传统TCP算法针对网络拥塞现象采用的方法是:拥塞窗口启动阶段是指数增长,接收到ACK(Acknowledgement,确认字符)达到慢启动阈值后再进行下一次转发时采用线性增长,达到最大吞吐所需时间很长,对视频业务的载入时间影响较大。
不可靠链路主要包括无线通信和电力线通信。在不可靠链路中,Wi-Fi(Wireless Fidelity,无线保真)空口转发时延通常是10ms级别,恶劣情况会达到秒级,由于无线空口竞争机制CSMA/CA(Carrier Sense Multiple Access with Collision Avoidance,载波侦听多路访问/冲突避免),在Wi-Fi芯片的MAC(Media Access Control,媒体访问控制)子层重传会导致Wi-Fi的大量丢包,从而导致Wi-Fi空口流量波动。另外,TCP协议中重传机制和滑动窗口减半机制会导致流量波动,和Wi-Fi空口流量波动的突发性叠加在一起,导致TCP长期处于低通量。
目前的TCP算法没有针对Wi-Fi这种不可靠链路做一些针对性的优化,这是目前Wi-Fi网络业务体验较差的原因所在。故亟须一种TCP在Wi-Fi等不可靠链路上的加速方法和装置,可以快速载入视频业务,并且可以较小或避免Wi-Fi空口波动对用户业务的影响。
发明内容
为了解决目前无线通信和电力线通信中空口流量波动、视频业务的载入时间长、TCP长期处于低通量导致业务体验较差等问题,本发明提供了一种TCP加速方法、装置及系统。所述技术方案如下:
第一方面,本发明实施例提供了一种TCP加速方法,其特征在于,应用于TCP层和媒体介入控制MAC层,所述方法包括:
第一网络设备接收TCP层报文;
所述第一网络设备将所述TCP层报文映射为MAC层报文,所述MAC层报文数 据帧格式为MAC协议数据单元MPDU;
所述第一网络设备将所述MAC层报文发送给第二网络设备;
所述第一网络设备接收所述第二网络设备发送的MAC层确认字符ACK报文;
所述第一网络设备将所述MAC层ACK报文映射为第一TCP层ACK报文;
所述第一网络设备将所述第一TCP层ACK报文发送给TCP服务器。
在第一方面的第一种可能的实施方式中,所述第一网络设备将所述TCP层报文映射为MAC层报文,具体包括:
所述第一网络设备生成所述TCP层报文和所述MAC层报文之间映射关系表;
所述第一网络设备依据所述映射关系表将所述TCP层报文映射为所述MAC层报文。
结合第一方面及第一方面第一种可能的实施方式,在第一方面第二种可能的实施方式中,所述第一网络设备将所述MAC层ACK报文映射为第一TCP层ACK报文,具体包括:
所述第一网络设备生成所述TCP层报文和所述MAC层报文之间映射关系表;
所述第一网络设备依据所述映射关系表将所述MAC层ACK报文映射为所述第一TCP层ACK报文。
结合第一方面及第一方面第一种至第二种可能的实施方式,在第一方面第三种可能的实施方式中,所述映射关系表通过TCP层报文特征和MAC层报文特征来生成,所述TCP报文特征包括TCP层报文序列号sequence ID,所述MAC层报文特征包括MAC层报文序列号sequence ID。
结合第一方面及第一方面第一种至第三种可能的实施方式,在第一方面第四种可能的实施方式中,所述TCP报文特征还包括TCP层报文五元组信息和报文描述符,所述五元组信息包括源IP地址、源端口、目的IP地址、目的端口和传输层协议。
结合第一方面及第一方面第一种至第四种可能的实施方式,在第一方面第五种可能的实施方式中,所述方法还包括:
所述第一网络设备接收所述第二网络设备发送的第二TCP层ACK报文,所述第二TCP层ACK报文为TCP客户端根据收到的所述TCP层报文生成的确认字符;
所述第一网络设备丢弃所述第二TCP层ACK报文。
结合第一方面及第一方面第一种至第五种可能的实施方式,在第一方面第六种可能的实施方式中,所述方法还包括:
所述第一网络设备检测MAC层和物理PHY层的链路质量参数和拥塞状况,并决定响应所述MAC层ACK报文或所述第一TCP层ACK报文的时间。
结合第一方面及第一方面第一种至第六种可能的实施方式,在第一方面第七种可能的实施方式中,其特征在于,所述链路质量参数包括信号强度参数、无线链路空口重传率、报文丢包率和无线协商速率。
结合第一方面及第一方面第一种至第七种可能的实施方式,在第一方面第八种可能的实施方式中,所述方法还包括:
所述第一网络设备检测到链路空口瞬间冲突丢包,实际链路未拥塞,则所述第一网络设备执行减少所述MAC层ACK报文或第一TCP层ACK报文的响应时间。
结合第一方面及第一方面第一种至第八种可能的实施方式,在第一方面第九种可能的实施方式中,述方法还包括:
所述第一网络设备检测到发生了链路拥塞,则所述第一网络设备提高所述MAC层ACK报文或第一TCP层ACK报文的响应时间。
第二方面,本发明实施例提供了一种传输控制协议TCP加速方法,应用于TCP层和媒体介入控制MAC层,所述方法包括:
第二网络设备接收第一网络设备发送的MAC层报文,所述MAC层报文数据帧格式为MAC协议数据单元MPDU;
所述第二网络设备发送与所述MAC层报文对应的MAC层确认字符ACK报文给第一网络设备;
所述第二网络设备将所述MAC层报文映射为TCP层报文;
所述第二网络设备将所述TCP层报文发送给TCP客户端。
在第二方面第一种可能的实施方式中,所述方法还包括:
所述第二网络设备接收第二TCP层ACK报文,并将所述第二TCP层ACK报文发送给所述第一网络设备,所述第二TCP层ACK报文为所述TCP客户端根据收到的所述TCP层报文生成的确认字符。
结合第二方面及第二方面第一种可能的实施方式,在第二方面第二种可能的实施方式中,所述方法还包括:
所述第二网络设备接收第二TCP层ACK报文,所述第二网络设备丢弃所述第二TCP层ACK报文,所述第二TCP层ACK报文为所述TCP客户端根据收到的所述TCP层报文生成的确认字符。
结合第二方面及第二方面第一种至第二种可能的实施方式,在第二方面第三种可能的实施方式中,所述第二网络设备将所述MAC层报文映射为TCP层报文,具体包括:
所述第二网络设备生成所述TCP层报文和所述MAC层报文之间映射关系表;
所述第二网络设备依据所述映射关系表将所述MAC层报文映射为所述TCP层报 文。
结合第二方面及第二方面第一种至第三种可能的实施方式,在第二方面第四种可能的实施方式中,所述映射关系表通过TCP层报文特征和MAC层报文特征来生成,所述TCP报文特征包括TCP层报文序列号sequence ID,所述MAC层报文特征包括MAC层报文序列号sequence ID。
结合第二方面及第二方面第一种至第四种可能的实施方式,在第二方面第五种可能的实施方式中,所述TCP报文特征还包括TCP报文五元组信息和报文描述符,所述五元组信息包括源IP地址、源端口、目的IP地址、目的端口和传输层协议。
第三方面,本发明实施例提供了一种传输控制协议TCP第一加速装置,应用于TCP层和媒体介入控制MAC层,所述装置包括:
存储器,用于存储程序指令;
接收器,用于接收TCP层报文;
处理器,用于执行所述存储器中存储的所述程序指令以实现将所述TCP层报文映射为MAC层报文,所述MAC层报文数据帧格式为MAC协议数据单元MPDU;
发送器,用于将所述MAC层报文发送给第二网络设备;
所述接收器,还用于接收所述第二网络设备发送的MAC层确认字符ACK报文;
所述处理器,还用于执行所述存储器中存储的所述程序指令以实现将所述MAC层ACK报文映射为第一TCP层ACK报文;
所述发送器,还用于将所述第一TCP层ACK报文发送给TCP服务器。
在第三方面第一种可能的实施方式中,所述处理器将所述TCP层报文映射为MAC层报文,具体包括:
所述处理器生成所述TCP层报文和所述MAC层报文之间的映射关系表;
所述处理器依据所述映射关系表将所述TCP层报文映射为所述MAC层报文。
结合第三方面及第三方面第一种可能的实施方式,在第三方面第二种可能的实施方式中,所述处理器将所述MAC层ACK报文映射为第一TCP层ACK报文,具体包括:
所述处理器生成TCP层ACK报文和所述MAC层ACK报文之间的映射关系表;
所述处理器依据所述映射关系表将所述MAC层ACK报文映射为所述第一TCP层ACK报文。
结合第三方面及第三方面第一种至第二种可能的实施方式,在第三方面第三种可能的实施方式中,所述映射关系表通过TCP层报文特征和MAC层报文特征来生成,所述TCP报文特征包括TCP层报文序列号sequence ID,所述MAC层报文特征包括MAC层报文序列号sequence ID。
结合第三方面及第三方面第一种至第三种可能的实施方式,在第三方面第四种可能的实施方式中,所述TCP报文特征还包括TCP层报文五元组信息和报文描述符,所述五元组信息包括源IP地址、源端口、目的IP地址、目的端口和传输层协议。
结合第三方面及第三方面第一种至第四种可能的实施方式,在第三方面第五种可能的实施方式中,所述接收器,还用于接收所述第二网络设备发送的第二TCP层ACK报文,所述第二TCP层ACK报文为TCP客户端根据收到的所述TCP层报文生成的确认字符;所述处理器,还用于丢弃所述第二TCP层ACK报文。
结合第三方面及第三方面第一种至第五种可能的实施方式,在第三方面第六种可能的实施方式中,所述装置还包括:
检测器,用于检测MAC层和物理PHY层的链路质量参数和拥塞状况。
结合第三方面及第三方面第一种至第六种可能的实施方式,在第三方面第七种可能的实施方式中,所述链路质量参数包括信号强度参数、无线链路空口重传率、报文丢包率和无线协商速率。
结合第三方面及第三方面第一种至第七种可能的实施方式,在第三方面第八种可能的实施方式中,所述处理器,还用于:当所述检测器检测到没有发生链路拥塞,则所述处理器执行减少所述MAC层ACK报文或第一TCP层ACK报文的响应时间;当所述检测器,检测到发生了链路拥塞,则所述处理器提高所述MAC层ACK报文或第一TCP层ACK报文的响应时间。
第四方面,本发明实施例提供了一种传输控制协议TCP第二加速装置,应用于TCP层和媒体介入控制MAC层,所述装置包括:
存储器,用于存储程序指令;
接收器,用于接收第一网络设备发送的MAC层报文,所述MAC层报文数据帧格式为MAC协议数据单元MPDU;
发送器,用于发送与所述MAC层报文对应的MAC层确认字符ACK报文给第一网络设备;
处理器,用于执行所述存储器中存储的所述程序指令以实现将所述MAC层报文映射为TCP层报文;
所述发送器,还用于将所述TCP层报文发送给TCP客户端。
在第四方面第一种可能的实施方式中,所述接收器,还用于接收第二TCP层ACK报文,所述第二TCP层ACK报文为所述TCP客户端根据收到的所述TCP层报文生成的确认字符;所述发送器,还用于将所述第二TCP层ACK报文发送给所述第一网络设备。
结合第四方面及第四方面第一种可能的实施方式,在第四方面第二种可能的实施方式中,所述接收器,还用于接收第三TCP层ACK报文,所述第三TCP层ACK报文为所述TCP客户端根据收到的所述TCP层报文生成的确认字符;所述处理器,还用于丢弃所述第三TCP层ACK报文。
结合第四方面及第四方面第一种至第二种可能的实施方式,在第四方面第三种可能的实施方式中,处理器将所述MAC层报文映射为TCP层报文,具体包括:
所述处理器生成所述TCP层报文和所述MAC层报文之间映射关系表;
所述处理器依据所述映射关系表将所述MAC层报文映射为所述TCP层报文。
结合第四方面及第四方面第一种至第三种可能的实施方式,在第四方面第四种可能的实施方式中,所述映射关系表通过TCP层报文特征和MAC层报文特征来生成,所述TCP报文特征包括TCP层报文序列号sequence ID,所述MAC层报文特征包括MAC层报文序列号sequence ID。
结合第四方面及第四方面第一种至第四种可能的实施方式,在第四方面第五种可能的实施方式中,所述TCP报文特征还包括TCP报文五元组信息和报文描述符,所述五元组信息包括源IP地址、源端口、目的IP地址、目的端口和传输层协议。
第五方面,本发明实施例提供了一种传输控制协议TCP第一加速装置,应用于TCP层和媒体介入控制MAC层,所述装置包括:
接收单元,用于接收TCP层报文;
映射单元,用于将所述TCP层报文映射为MAC层报文,所述MAC层报文数据帧格式为MAC协议数据单元MPDU;
发送单元,用于将所述MAC层报文发送给第二网络设备;
所述接收单元,还用于接收所述第二网络设备发送的MAC层确认字符ACK报文;
所述映射单元,还用于将所述MAC层ACK报文映射为第一TCP层ACK报文;
所述发送单元,还用于将所述第一TCP层ACK报文发送给TCP服务器。
在第五方面第一种可能的实施方式中,所述映射单元将所述TCP层报文映射为MAC层报文,具体包括:
所述映射单元生成所述TCP层报文和所述MAC层报文之间的映射关系表;
所述映射单元依据所述映射关系表将所述TCP层报文映射为所述MAC层报文。
结合第五方面及第五方面第一种可能的实施方式,在第五方面第二种可能的实施方式中,所述映射单元将所述MAC层ACK报文映射为第一TCP层ACK报文,具体包括:
所述映射单元生成TCP层ACK报文和所述MAC层ACK报文之间的映射关系表;
所述映射单元依据所述映射关系表将所述MAC层ACK报文映射为所述第一TCP层ACK报文。
结合第五方面及第五方面第一种至第二种可能的实施方式,在第五方面第三种可能的实施方式中,所述映射关系表通过TCP层报文特征和MAC层报文特征来生成,所述TCP报文特征包括TCP层报文序列号sequence ID,所述MAC层报文特征包括MAC层报文序列号sequence ID。
结合第五方面及第五方面第一种至第三种可能的实施方式,在第五方面第四种可能的实施方式中,所述TCP报文特征还包括TCP层报文五元组信息和报文描述符,所述五元组信息包括源IP地址、源端口、目的IP地址、目的端口和传输层协议。
结合第五方面及第五方面第一种至第四种可能的实施方式,在第五方面第五种可能的实施方式中,所述装置还包括:
所述接收单元,还用于接收所述第二网络设备发送的第二TCP层ACK报文,所述第二TCP层ACK报文为TCP客户端根据收到的所述TCP层报文生成的确认字符
第一处理单元,还用于丢弃所述第二TCP层ACK报文。
结合第五方面及第五方面第一种至第五种可能的实施方式,在第五方面第六种可能的实施方式中,所述装置还包括:
检测单元,用于检测MAC层和物理PHY层的链路质量参数和拥塞状况。
结合第五方面及第五方面第一种至第六种可能的实施方式,在第五方面第七种可能的实施方式中,所述链路质量参数包括信号强度参数、无线链路空口重传率、报文丢包率和无线协商速率。
结合第五方面及第五方面第一种至第七种可能的实施方式,在第五方面第八种可能的实施方式中,所述装置还包括:
第二处理单元,还用于:当所述检测单元检测到没有发生链路拥塞,则所述第二处理单元执行减少所述MAC层ACK报文或第一TCP层ACK报文的响应时间;当所述检测单元,检测到发生了链路拥塞,则所述第二处理单元提高所述MAC层ACK报文或第一TCP层ACK报文的响应时间。
第六方面,本发明实施例提供了一种传输控制协议TCP第二加速装置,应用于TCP层和媒体介入控制MAC层,所述装置包括:
接收单元,用于接收第一网络设备发送的MAC层报文,所述MAC层报文数据帧格式为MAC协议数据单元MPDU;
发送单元,用于发送与所述MAC层报文对应的MAC层确认字符ACK报文给第一网络设备;
映射单元,用于将所述MAC层报文映射为TCP层报文;
所述发送单元,还用于将所述TCP层报文发送给TCP客户端。
在第六方面第一种可能的实施方式中,所述接收单元,还用于接收第二TCP层ACK报文,所述第二TCP层ACK报文为所述TCP客户端根据收到的所述TCP层报文生成的确认字符;所述发送单元,还用于将所述第二TCP层ACK报文发送给所述第一网络设备。
结合第六方面及第六方面第一种可能的实施方式,在第六方面第二种可能的实施方式中,所述接收单元,还用于接收第三TCP层ACK报文,所述第三TCP层ACK报文为所述TCP客户端根据收到的所述TCP层报文生成的确认字符;所述映射单元,还用于丢弃所述第三TCP层ACK报文。
结合第六方面及第六方面第一种至第二种可能的实施方式,在第六方面第三种可能的实施方式中,所述映射单元将所述MAC层报文映射为TCP层报文,具体包括:
所述映射单元生成所述TCP层报文和所述MAC层报文之间映射关系表;
所述映射单元依据所述映射关系表将所述MAC层报文映射为所述TCP层报文。
结合第六方面及第六方面第一种至第三种可能的实施方式,在第六方面第四种可能的实施方式中,所述映射关系表通过TCP层报文特征和MAC层报文特征来生成,所述TCP报文特征包括TCP层报文序列号sequence ID,所述MAC层报文特征包括MAC层报文序列号sequence ID。
结合第六方面及第六方面第一种至第四种可能的实施方式,在第六方面第五种可能的实施方式中,所述TCP报文特征还包括TCP报文五元组信息和报文描述符,所述五元组信息包括源IP地址、源端口、目的IP地址、目的端口和传输层协议。
第七方面,本发明实施例提供了一种传输控制协议TCP加速系统,包括:TCP第一加速装置和TCP第二加速装置:
所述TCP第一加速装置为上述第三方面所描述的TCP第一加速装置,所述TCP第二加速装置为上述第四方面所描述的TCP第二加速装置。
第八方面,本发明实施例提供了一种传输控制协议TCP加速系统,包括:TCP第一加速装置和TCP第二加速装置:
所述TCP第一加速装置为上述第五方面所描述的TCP第一加速装置,所述TCP第二加速装置为上述第六方面所描述的TCP第二加速装置。
第九方面,本发明实施例提供了一种芯片。该芯片包括处理器和存储器;存储器用于存放程序;所述处理器用于执行所述存储器存储的所述程序,以执行上述第一方面或第二方面中所述的方法。
第十方面,本发明第实施例提供了一种计算机可读存储介质,包括计算机可读指令,当计算机读取并执行所述计算机可读指令时,使得计算机执行上述第一方面或第二方面中所述的方法。
第十一方面,本发明实施例还提供了一种包含指令的计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行上述第一方面或第二方面中所述的方法。
本发明提供了一种TCP加速方法、装置和系统,第一网络设备接收TCP层报文并映射为MAC层报文,第一网络设备将MAC层报文发送给第二网络设备,并接收第二网络设备发送的MAC层确认字符ACK报文,第一网络设备将MAC层ACK报文映射为第一TCP层ACK报文并发送给TCP服务器。本发明提供的一种TCP加速方法、装置和系统将MAC层ACK报文与TCP层ACK报文协同转换,实现了ACK确认机制的快速响应,利用MAC层ACK报文在MAC层代替了TCP层ACK报文进行确认,从而可以实现TCP吞吐量的快速提升,大大减少了ACK报文的数量,同时避免了TCP层ACK报文确认机制和MAC层ACK报文确认机制波动叠加引起的长期的低通道的情况。
附图说明
为了更清楚地说明本发明的实施例或现有技术中的技术方案,下面将对描述背景技术和实施例时所使用的附图作简单的介绍。显而易见地,下面附图中描述的仅仅是本发明的一部分实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图和描述得到其他的附图或实施例,而本发明旨在涵盖所有这些衍生的附图或实施例。
图1是传统TCP的拥塞控制方法的原理示意图;
图2是现有Wi-Fi网络中Wi-Fi网关和接入STA之间的发送应答确认机制示意图;
图3是本发明第一实施例提供的一种TCP加速方案架构示意图;
图4是本发明第二实施例提供的一种TCP加速方法流程示意图;
图5是本发明第二实施例提供的一种具体的TCP报文的数据结构;
图6是本发明第三实施例提供的一种TCP加速方法流程图;
图7是本发明第四实施例提供的一种TCP加速方法流程图;
图8是本发明第五实施例提供的一种TCP第一加速装置示意图;
图9是本发明第六实施例提供的一种TCP第二加速装置示意图;
图10是本发明第七实施例提供的一种TCP第一加速装置示意图;
图11是本发明第八实施例提供的一种TCP第二加速装置示意图。
具体实施方式
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
基于TCP协议进行数据传输时,当某一传输时段内传输系统中可用的网络资源(例如:带宽或交换节点的缓存等网络资源)无法满足数据传输时所需的网络资源时,网络的性能就会变差,即网络出现拥塞现象。针对此,TCP协议中一般采用拥塞控制方法解决该问题,该拥塞控制方法通过控制拥塞窗口的大小,实现对注入网络的数据量的控制,以避免网络出现拥塞,并且,在控制拥塞窗口的大小时,其主要原则为:若网络未出现拥塞,则增大拥塞窗口的大小;若网络出现拥塞,则减小拥塞窗口的大小,其中,拥塞窗口用于限定数据发送端每次最多能发送的数据量。该拥塞控制方法主要包括:慢启动(也称慢开始)、拥塞避免、快速重传和快速恢复四个过程。
图1是传统TCP的拥塞控制方法的原理示意图,如图1所示,慢启动过程和拥塞避免过程的原理为:
当拥塞窗口的大小小于初始慢启动阈值时,执行慢启动过程,当拥塞窗口的大小大于初始慢启动阈值时,执行拥塞避免过程。其中,拥塞窗口的初始大小为1。在慢启动过程中,每经过一个传输轮次(即当把拥塞窗口所允许发送的数据报文均发送出去,且收到了对所有发送的数据报文的最后一个字节的确定信息),成倍地增加拥塞窗口的大小。当拥塞窗口大于或等于初始慢启动阈值时,开始执行拥塞避免过程,每经过一个传输轮次,该拥塞窗口的大小加1。并且,不管是在执行慢启动过程还是拥塞避免过程,只要网络出现拥塞现象,更新慢启动阈值,且更新后的慢启动阈值减小为出现拥塞现象时拥塞窗口的大小的一半,以及,拥塞窗口的大小更新为1,重新开始执行慢开始算法。
快重传过程和快速恢复过程的原理为:
在快重传过程中,当数据接收端收到失序的数据报文段时,即可向数据发送端发送重复确认信息,无需等待至所有数据报文接收完成后才发送重复确认信息,且当数据发送端接收到三个重复确认信息时,即可认为网络出现拥塞,同时,将更新后的慢启动阈值设置为当前拥塞窗口的大小的一半,并且将拥塞窗口的大小减小为当前拥塞窗口的大小的一半,然后执行拥塞避免算法。
在快速恢复过程中,在网络中传输的数据报文包数量恒定,只有当“旧”数据报文包离开网络后,才能发送“新”数据报文包进入网络,且如果数据发送端收到一个重复的确认报文,则认为有一个数据报文包离开了网络,并将拥塞窗口加1。
TCP的超时重传机制是TCP协议保证数据可靠性的另一个重要重传机制,其原理是在发送某一个数据之后就开启一个计时器,在一定时间内如果没有得到发送的数据包的ACK报文,那么就重新发送数据,直到发送成功为止。
目前TCP拥塞控制算法均是通过慢启动机制,拥塞窗口启动阶段是指数增长,接 收到ACK(Acknowledgement,确认字符)达到慢启动阈值后再进行下一次转发时采用线性增长,而不再采用指数增长,达到最大吞吐所需时间很长,对视频业务的载入时间影响较大。
TCP三次握手:在TCP协议中,两个设备需要通过三次握手(three-way handshake)机制建立TCP连接。例如,当设备A要和设备B建立连接时,设备A会向设备B发送SYN报文,并且设备A进入SYN_SENT状态,等待设备B确认,此为第一次握手。设备B接收到SYN报文后,会向设备A发送SYN-ACK报文,对设备A发出的SYN报文进行响应,同时设备B会进入SYN_RECV状态,此为第二次握手。设备A接收到设备B的SYN-ACK报文后,会向设备B发送确认(acknowledgment,ACK)报文,此为第三次握手。三次握手后,设备A和设备B建立起TCP连接,会进入TCP连接成功状态(established状态),然后设备A与设备B就可以开始传输TCP报文。
无线网络速率协商机制包括报文确认机制、报文重传机制和报文调速机制。
其中,报文确认机制是用于保证空口数据传输的可靠性。在报文传输过程中,发送方发送的每一个IEEE802.11报文,接收方在收到后均要进行ACK回复确认。当发送方接收到接收方收到的ACK确认后,才认定报文已经发送成功,从而发送下一帧数据,否则发送方重新进行报文发送。
报文重传机制是报文在发送失败后,在同样的速率下重新进行发送;此时发送方和接收方依旧使用报文确认机制进行可靠性确认。
报文调速机制是在当前环境下使用当前速率在报文确认机制、报文重传机制后依旧无法重传成功,在发送方进行降速操作,降速后对报文进行重传。直到协商到一个合适的速率,在该速率下,报文在此能够正常传输。
Wi-Fi和电力线介质的MAC层的上述协商机制可以完成Wi-Fi和电力线介质的MAC层报文丢弃后的快速重传。但是在实际在一些Wi-Fi和电力线介质空口恶劣情况下,如周边Wi-Fi和电力线介质的干扰、Wi-Fi和电力线介质空口丢包严重等,重传会加重空口的负担,还是会导致转发失败。
Wi-Fi和电力线介质空口发送协商速率实时波动变化,目前TCP协议无法感知实际Wi-Fi空口的转发状态,Wi-Fi空口速率实时波动性会影响到TCP协议的性能。目前的TCP协议还尚未针对Wi-Fi的这种现状做优化。
为了更好地理解本发明实施例公开的无线网络TCP加速方法,先对本发明实施例的应用场景进行介绍。请参阅图2,我们这里以Wi-Fi网络为例,实际电力线通信与此类似,本发明所提供的实施例同样可以应用于电力线通信领域。
图2是现有Wi-Fi网络中Wi-Fi网关和接入STA(Station,终端用户)之间的发送应答确认机制示意图。这里的Wi-Fi网关220包括通用的家庭网关路由器,如无线CPE(Customer Premise Equipment客户终端设备)、光猫ONT(Optical network terminal,光网络设备)、AP(Access point,访问接入点)等;终端用户STA(Station,终端用户)210包括手机、平板电脑等Wi-Fi类用户终端。图2中,网关220和STA210传输层次包括TCP层、MAC(Media access control,媒体介入控制)层、物理PHY层。 TCP server231在远端,是数据源;TCP client211从TCP server231中获取数据。在网关220上部署实现TCP代理,网关220包括TCP proxy221、网关WiFi MAC222和网关WiFi PHY223。在STA210上部署TCP客户端,STA210包括TCP client211、STA WiFi MAC212和STA WiFi PHY213。
TCP层和Wi-Fi的MAC层各自有单独的发送应答确认机制,TCP层和Wi-Fi MAC层的应答确认机制之间没有信息传递。在TCP层,TCP proxy221发送TCP报文给TCP client211,TCP client211发送ACK报文至TCP proxy221,TCP proxy221收到ACK确认信息后,TCP proxy221继续发送TCP报文给TCP client211;在MAC层,网关Wi-Fi MAC222发送MAC报文给STA Wi-Fi 212,STA Wi-Fi MAC212收到后发送确认ACK给网关Wi-Fi MAC222,然后网关Wi-Fi MAC 222继续发送MAC报文给STA Wi-Fi MAC 212。TCP层ACK确认机制和MAC层ACK确认机制互不干涉影响。
TCP代理又称为TCP性能增强,可以通过分裂确认(Acknowledgment,ACK)、复制DupACK、本地重传、上/下行数据包排序等处理在无线接入网(Radio Access Network,RAN)或不可靠传输介质网络(如电力线)中对TCP包进行优化处理的功能。
图3是本发明第一实施例提供的一种TCP加速方案架构示意图。如图3所示,网关320包括通用的家庭网关路由器,如无线CPE、光猫ONT、AP等;终端用户STA310包括手机、平板电脑等Wi-Fi类用户终端。图3中,网关320和STA310传输层次包括TCP层、MAC层、物理PHY层。TCP server331在远端,是数据源;TCP client311从TCP server331中获取数据。在网关320上部署实现TCP代理,网关320包括TCP proxy321、网关WiFi MAC322和网关WiFi PHY323。在STA310上部署TCP客户端,STA310包括TCP client311、STA WiFi MAC312和STA WiFi PHY313。在本实施例中,TCP连接分成TCP client311-TCP proxy321和TCP proxy321-TCP server331两段。本实施例中,TCP proxy321协议栈和WiFi MAC322转发模块实现协同。根据报文的五元组信息自动生成一个TCP和Wi-Fi MPDU(MAC Protocol Data Unit,MAC协议数据单元)映射表。根据MPDU映射表,可以实现传输层和WiFi的MAC层的通信。
五元组信息包括源IP地址、源端口、目的IP地址、目的端口和传输层协议;协议栈(Protocol stack),又称协议堆叠,是计算机网络协议套件的一个具体的软件实现。协议套件中的一个协议通常是只为一个目的而设计的,这样可以使得设计更容易。因为每个协议模块通常都要和上下两个其他协议模块通信,它们通常可以想象成是协议栈中的层。最低级的协议总是描述与硬件的物理交互。每个高级的层次增加更多的特性。用户应用程序只是处理最上层的协议。
本实施例中,在无线网络信息传输中,TCP层和MAC层只通过一层的ACK确认机制,将原有的TCP层和Wi-Fi的MAC层各自单独的发送应答确认机制统一起来。那么,TCP client311发送TCP ACK301后,不再需要单独再给TCP proxy321发送ACK;STA WiFi MAC312在收到TCP ACK301后,生成ACK302;网关WiFi MAC322在收到ACK302后,生成ACK203,传递通知给TCP proxy321,实现了MAC层的ACK代替了TCP层的ACK进行确认。
图4是本发明第二实施例提供的一种TCP加速方法流程示意图。如图4所示,展示了网关为路由器时的TCP加速方法流程,该方法可以应用于上述实施环境中,该实施例交互主体包括STA410、路由420和TCP server430,TCP server430在远端,是数据源。在路由420上部署实现TCP代理,路由420包括TCP proxy421、路由WiFi MAC422;在STA410上部署TCP客户端,STA410包括TCP client411、STA WiFi MAC412。TCP server331、TCP proxy321、TCP client在TCP层,WiFi MAC322、WiFi MAC312在链路层,WiFi PHY323、WiFi PHY313在物理层。在本实施例中,TCP连接分成TCP client411-TCP proxy421和TCP proxy421-TCP server430两段。TCP client411从TCP server430中获取数据。该TCP加速方法包括以下步骤:
步骤401、TCP Client与TCP proxy建立TCP会话,TCP proxy和TCP server建立TCP会话。
STA410作为客户端发出获取数据需求,TCP client411与TCP proxy421建立TCP会话。值得一提的是,这里的TCP会话相当于TCP client411与TCP proxy421之间传输的逻辑连接,TCP client411与TCP proxy421之间不一定有直接的物理接触。
步骤402、TCP Server构造TCP报文并发送到路由420中TCP proxy421。
TCP报头包含服务器的拥塞窗长度。优选的,该TCP报头的预留6比特可以用于承载拥塞窗长度。
此处,本实施例提供一种具体的TCP报文的数据结构,如图5所示,TCP报头可以包括:
16位源端口号,用于指示发送端;
16位目的端口号,用于指示接收端;
序号(英文:Sequence Number),用于指示TCP数据在发送的数据流中的位置;
确认序号(英文:Acknowledgment Number),用于指示接收端希望收到对方下次发送的数据的第一个字节的序号;
数据偏移量(英文:Data Offset),用于指示数据偏移,该字段的值是TCP报文(包括选项部分)长度除以4;
标识位,保留6比特,此处,该保留的6比特即可用于承载拥塞窗长度;
紧急标识(英文:Urgent,简称:URG),用于和紧急指针配合使用,当其为1时表示,此报文要尽快传送;
确认标识(ACK),用于确认号字段配合使用,当ACK位置1时,确认号字段有效;
推送标识(英文:Push,简称:PSH),置为1时,发送方将立即发送缓冲区中的数据;
复位标识(英文:Reset,简称:RST),置为1时,表明有严重差错,必须释放连接;
同步标识(英文:Synchronization,简称:SYN),置为1时,表示请求建立连接;
终止标识(英文:Finish,简称:FIN),置1时,表明数据已经发送完,请求释放连接;
窗口(英文:Windows),用于表示接收缓冲区的空闲空间,16位,用来告诉TCP连接对端自己能够接收的最大数据长度;
校验和(英文:Checksum),校验范围包括段首部、数据以及伪首部;
紧急指针(英文:Urgent Pointers),占16位,只有URG标志位被设置时该字段才有意义,表示紧急数据相对序列号(Sequence Number字段的值)的偏移。
步骤403、路由420中,生成TCP报文和WI-FI MPDU之间关键信息映射关系表,将TCP层的TCP报文映射为无线空口链路MAC层的MAC报文,MAC层通过路由WiFi MAC422发送该MAC报文。
WI-FI MPDU(MAC Protocol Data Unit,MAC协议数据单元)为WiFi数据帧格式,即MAC报文的数据帧格式。在无线网络安全中,MSDU(MAC Service Data Unit,MAC服务数据单元)经过添加完整性校验MIC、分帧、添加IV、加密、添加MAC头部后,成为MPDU(MAC Protocol Data Unit,MAC协议数据单元)。MSDU可以认为是Ethernet报文,而MPDU指经过802.11封装过的数据帧。
TCP报文和WI-FI MPDU之间关键信息映射关系表用于将TCP层的TCP报文映射为无线空口链路MAC层的MAC报文。
步骤404、STA WiFi MAC412接收到MAC报文,生成TCP报文和WI-FI MPDU之间映射关系表,将MAC报文映射为TCP报文,并转发该TCP报文至TCP client411。STA WiFi MAC412会针对这个接收成功的MAC报文自动发送一个第一MAC ACK报文转发给路由WiFi MAC422。
步骤405、TCP client411收到TCP报文后,生成第二TCP ACK报文进行确认,发送该第二TCP ACK报文至STA WiFi MAC412。
步骤406、STA WiFi MAC412收到第二TCP ACK报文后,依据TCP报文和WI-FI MPDU之间映射关系表,生成第二MAC ACK报文,并转发第二MAC ACK报文给路由WiFi MAC422,若路由WiFi MAC422已经响应了第一MAC ACK报文,则丢弃该第二MAC ACK报文。
步骤407、路由WiFi MAC422收到第一MAC ACK报文后,根据TCP报文和WI-FI MPDU之间映射关系表,生成第一TCP ACK报文并转发至TCP proxy421。
路由WiFi MAC422还根据WiFi MAC层和WiFi物理层的链路质量参数和拥塞信息决定响应第一MAC ACK报文的时间。链路质量参数包括信号强度、空口重传率、报文丢包率、无线协商速率等。
若路由WiFi MAC422检测到链路空口瞬间冲突丢包,实际链路未拥塞,不需要降低TCP滑动窗口,可以继续进行TCP ACK快速代答,这样可以维持一个较高的TCP吞吐量。
若路由WiFi MAC422检测到发生了链路拥塞,这个时候需要控制TCP ACK代答的响应时间,降低TCP滑动窗口,动态调整TCP的RTT(Round-Trip Time,往返时延)来降低TCP的吞吐量。通过上述机制可实现TCP的应用层和实际链路质量状况的自动感应。
RTT表示从发送端到接收端的一去一回需要的时间,TCP在数据传输过程中会对RTT进行采样(即对发送的数据包及其ACK的时间差进行测量,并根据测量值更新 RTT值),TCP根据得到的RTT值更新RTO(Retransmission Time Out,重传间隔)值,发送端对每个发出的数据包进行计时,如果在RTO时间内没有收到所发出的数据包的对应ACK,则任务数据包丢失,将重传数据。一般RTO值都比采样得到的RTT值要大。RTT由三个部分决定,即链路的传播时间、末端系统的处理时间以及路由器的缓存中的排队和处理时间。其中,链路的传播时间和末端系统的处理时间的值作为一个TCP连接相对固定,路由器的缓存中的排队和处理时间会随着整个网络拥塞程度的变化而变化。所以RTT的变化在一定程度上反映了网络拥塞程度的变化。
步骤408:TCP proxy421发送第一TCP ACK报文给TCP server430,从而实现TCP ACK机制快速应答。
步骤409:TCP server收到第一TCP ACK报文后,构造下一个TCP报文并转发给TCP proxy421,该步骤会提高TCP拥塞窗长度至4,增加发送TCP数据通量。其中,拥塞窗口的初始大小为1。当拥塞窗口的大小小于初始慢启动阈值时,执行慢启动过程,当拥塞窗口的大小大于初始慢启动阈值时,执行拥塞避免过程。在慢启动过程中,每经过一个传输轮次(即当把拥塞窗口所允许发送的数据报文均发送出去,且收到了对所有发送的数据报文的最后一个字节的确定信息),成倍地增加拥塞窗口的大小。当拥塞窗口大于或等于初始慢启动阈值时,开始执行拥塞避免过程,每经过一个传输轮次,该拥塞窗口的大小加1。并且,不管是在执行慢启动过程还是拥塞避免过程,只要网络出现拥塞现象,更新慢启动阈值,且更新后的慢启动阈值减小为出现拥塞现象时拥塞窗口的大小的一半,以及,拥塞窗口的大小更新为1,重新开始执行慢开始算法。
步骤4010:TCP proxy421继续转发收到新的TCP报文,并发送到TCP client411,然后后续步骤同403~409。
本实施例中,统一了无线网络信息传输中TCP层和MAC层ACK报文确认机制,在网关上实时感知硬件转发层的ACK报文响应情况,以及硬件线路拥塞状态,来实时调整TCP层的ACK报文确认机制,避免了TCP层和MAC层ACK报文确认机制波动叠加引起的长期的低通道的情况,同时MAC层ACK报文和TCP层ACK报文协同和相互转换,利用MAC层ACK报文的快速响应,在网关上用MAC层ACK报文代替了TCP层ACK报文进行确认,从而可以实现TCP吞吐量的快速提升。
图6是本发明第三实施例提供的一种TCP加速方法流程图。如图6所示,该方法涉及到第一网络设备、第二网络设备和TCP服务器,第一网络设备可以为CPE(Customer Premises Equipment,用户侧设备)、AP((Wireless)Access Point,(无线)访问接入点),例如为路由器、交换机、防火墙等。第二网络设备为客户端设备,包括但不限于浏览器、视频播放器、IM聊天软件和网络游戏等多种不同应用,通过TCP向TCP服务端请求数据,向用户提供网络浏览、视频播放、通信交流及娱乐休闲等功能。服务端设备,包括但不限于网络服务器(英文:Web Server)、视频服务器(英文:Video Server)、即时通信服务器(英文:IM Server)和游戏服务器(英文:Game Server)等,用于响应TCP客户端的请求,向TCP客户端提供网络页面、视频文件、IM交流和游戏等功能。互联网络:TCP客户端和TCP服务端之间的通信网 络,包括接入网络、核心网络及互联网络等。本发明实施例的实现,部署在TCP服务端的网元上。
本发明实施例提供的一种TCP加速方法,包括以下步骤:
步骤601、第一网络设备接收TCP层报文。
步骤602、第一网络设备将所述TCP层报文映射为MAC层报文,所述MAC层报文数据帧格式为MAC协议数据单元MPDU。
MPDU(MAC Protocol Data Unit,MAC协议数据单元)为MAC层报文的数据帧格式。在无线网络安全中,MSDU(MAC Service Data Unit,MAC服务数据单元)经过添加完整性校验MIC、分帧、添加IV、加密、添加MAC头部后,成为MPDU(MAC Protocol Data Unit,MAC协议数据单元)。MSDU可以认为是Ethernet报文,而MPDU指经过802.11封装过的数据帧。
其中,第一网络设备将TCP层报文映射为MAC层报文,具体包括:
第一网络设备生成TCP层报文和MAC层报文之间映射关系表;
第一网络设备依据所述映射关系表将所述TCP层报文映射为MAC层报文。
具体地,所述映射关系表通过TCP层报文特征和MAC层报文特征来生成,所述TCP报文特征包括TCP层报文序列号sequence ID,所述MAC层报文特征包括MAC层报文序列号sequence ID。
可选地,TCP报文特征还包括TCP层报文五元组信息和报文描述符,所述五元组信息包括源IP地址、源端口、目的IP地址、目的端口和传输层协议。
步骤603、第一网络设备将所述MAC层报文发送给第二网络设备。
步骤604、第一网络设备接收第二网络设备发送的MAC层确认字符ACK报文。
步骤605、第一网络设备将该MAC层ACK报文映射为第一TCP层ACK报文。
其中,第一网络设备检测MAC层和物理PHY层的链路质量参数和拥塞状况,并依据检测结果决定响应所述MAC层ACK报文的时间。链路质量参数包括信号强度参数、无线链路空口重传率、报文丢包率和无线协商速率。
若第一网络设备检测到链路空口瞬间冲突丢包,实际链路未拥塞,则第一网络设备执行减少所述MAC层ACK报文或所述第一TCP层ACK报文的响应时间,提高所述MAC层ACK报文或所述第一TCP层ACK报文的响应速度。
若第一网络设备检测到发生了链路拥塞,则第一网络设备提高所述MAC层ACK报文或所述第一TCP层ACK报文的响应时间,降低TCP滑动窗口,动态调整TCP的RTT(Round-Trip Time,往返时延)来降低TCP的通量。
RTT表示从发送端到接收端的一去一回需要的时间,TCP在数据传输过程中会对RTT进行采样(即对发送的数据包及其ACK的时间差进行测量,并根据测量值更新RTT值),TCP根据得到的RTT值更新RTO(Retransmission Time Out,重传间隔)值,发送端对每个发出的数据包进行计时,如果在RTO时间内没有收到所发出的数据包的对应ACK,则任务数据包丢失,将重传数据。一般RTO值都比采样得到的RTT值要大。RTT由三个部分决定,即链路的传播时间、末端系统的处理时间以及路由器的缓存中的排队和处理时间。其中,链路的传播时间和末端系统的处理时间的值作为一个TCP连接相对固定,路由器的缓存中的排队和处理时间会随着整个网络拥塞 程度的变化而变化。所以RTT的变化在一定程度上反映了网络拥塞程度的变化。
具体地,第一网络设备将MAC层ACK报文映射为第一TCP层ACK报文,具体包括:
第一网络设备生成TCP层ACK报文和MAC层ACK报文之间映射关系表;
第一网络设备依据所述映射关系表将所述MAC层ACK报文映射为第一TCP层ACK报文。
具体地,所述映射关系表通过TCP层报文特征和MAC层报文特征来生成,所述TCP报文特征包括TCP层报文序列号sequence ID,所述MAC层报文特征包括MAC层报文序列号sequence ID。
可选地,TCP报文特征还包括TCP层报文五元组信息和报文描述符,所述五元组信息包括源IP地址、源端口、目的IP地址、目的端口和传输层协议。
步骤606、第一网络设备将该第一TCP层ACK报文发送给TCP服务器。
可选地,该方法还包括:
步骤607、第一网络设备接收第二网络设备发送的第二TCP层ACK报文。
其中,第二TCP层ACK报文为TCP客户端根据收到的TCP层报文生成的确认字符。
步骤608、第一网络设备丢弃该第二TCP层ACK报文。
本实施例提供了一种TCP加速方法,第一网络设备接收TCP层报文并映射为MAC层报文,第一网络设备将MAC层报文发送给第二网络设备,并接收第二网络设备发送的MAC层确认字符ACK报文,第一网络设备将MAC层ACK报文映射为第一TCP层ACK报文并发送给TCP服务器。本实施例提供的一种TCP加速方法将MAC层ACK报文与TCP层ACK报文协同转换,实现了ACK确认机制的快速响应,利用MAC层ACK报文代替了TCP层ACK报文进行确认,从而可以实现TCP吞吐量的快速提升,同时避免了TCP层ACK报文确认机制和MAC层ACK报文确认机制波动叠加引起的长期的低通道的情况。
图7是本发明第四实施例提供的一种TCP加速方法流程图。如图6所示,该方法涉及到第一网络设备、第二网络设备和TCP客户端,第一网络设备可以为CPE(Customer Premises Equipment,用户侧设备)、AP((Wireless)Access Point,(无线)访问接入点),例如为路由器、交换机、防火墙等。第二网络设备为客户端设备,包括但不限于浏览器、视频播放器、IM聊天软件和网络游戏等多种不同应用,通过TCP向TCP服务端请求数据,向用户提供网络浏览、视频播放、通信交流及娱乐休闲等功能。服务端设备,包括但不限于网络服务器(英文:Web Server)、视频服务器(英文:Video Server)、即时通信服务器(英文:IM Server)和游戏服务器(英文:Game Server)等,用于响应TCP客户端的请求,向TCP客户端提供网络页面、视频文件、IM交流和游戏等功能。互联网络:TCP客户端和TCP服务端之间的通信网络,包括接入网络、核心网络及互联网络等。本发明实施例的实现,部署在TCP服务端的网元上。
本发明实施例提供的一种TCP加速方法,包括以下步骤:
步骤701、第二网络设备接收第一网络设备发送的MAC层报文,所述MAC层报文数据帧格式为MAC协议数据单元MPDU。
MPDU(MAC Protocol Data Unit,MAC协议数据单元)为MAC层报文的数据帧格式。在无线网络安全中,MSDU(MAC Service Data Unit,MAC服务数据单元)经过添加完整性校验MIC、分帧、添加IV、加密、添加MAC头部后,成为MPDU(MAC Protocol Data Unit,MAC协议数据单元)。MSDU可以认为是Ethernet报文,而MPDU指经过802.11封装过的数据帧。
步骤702、第二网络设备发送与MAC层报文对应的MAC层确认字符ACK报文给第一网络设备。
第二网络设备在收到MAC层报文后,发送一个MAC层ACK报文确认信息给第一网络设备。
步骤703、第二网络设备将MAC层报文映射为TCP层报文。
第二网络设备将所述MAC层报文映射为TCP层报文,具体包括:
第二网络设备生成TCP层报文和MAC层报文之间映射关系表;
第二网络设备依据该映射关系表将MAC层报文映射为TCP层报文。
具体地,映射关系表通过TCP层报文特征和MAC层报文特征来生成,所述TCP报文特征包括TCP层报文序列号sequence ID,所述MAC层报文特征包括MAC层报文序列号sequence ID。
可选地,TCP报文特征还包括TCP报文五元组信息和报文描述符,所述五元组信息包括源IP地址、源端口、目的IP地址、目的端口和传输层协议。
步骤704、第二网络设备将该TCP层报文发送给TCP客户端。
可选地,该方法还包括:
步骤705、第二网络设备接收TCP客户端发送的第二TCP层ACK报文。
其中,第二TCP层ACK报文为TCP客户端根据收到的TCP层报文生成的确认字符。
步骤706、第二网络设备丢弃或转发第二TCP层ACK报文。
具体地,第二网络设备可以直接丢弃第二TCP层ACK报文,或者将第二TCP层ACK报文转发给第一网络设备。
本发明实施例提供了一种TCP加速方法,第二网络设备接收第一网络设备发送的MAC层报文,第二网络设备发送MAC层确认字符ACK报文给第一网络设备,并将MAC层报文映射为TCP层报文,第二网络设备将TCP层报文发送给TCP客户端。本实施例提供的一种TCP加速方法直接在MAC层发送MAC层ACK报文,实现了ACK确认机制的快速响应,利用MAC层ACK报文在MAC层代替了TCP层ACK报文进行确认,从而可以实现TCP吞吐量的快速提升,同时避免了TCP层ACK报文确认机制和MAC层ACK报文确认机制波动叠加引起的长期的低通道的情况。
基于上述图6对应的实施例中所描述的TCP报文的传输方法,本发明实施例提供一种TCP第一加速装置,用于执行上述图6对应的实施例中所描述的TCP报文的传输方法,可以为CPE(Customer Premises Equipment,用户侧设备)、AP((Wireless) Access Point,(无线)访问接入点),例如为路由器、交换机、防火墙等。互联网络:TCP客户端和TCP服务端之间的通信网络,包括接入网络、核心网络及互联网络等。本发明实施例的实现,部署在TCP服务端的网元上。
图8是本发明第五实施例提供的一种TCP第一加速装置示意图,如图8所示,一种TCP第一加速装置80应用于TCP层和媒体介入控制MAC层,包括:接收单元801、映射单元802、发送单元803、第一处理单元804、检测单元805和第二处理单元806。
其中,接收单元801,用于接收TCP层报文;
映射单元802,用于将TCP层报文映射为MAC层报文,该MAC层报文数据帧格式为MAC协议数据单元MPDU;
发送单元803,用于将MAC层报文发送给第二网络设备;
接收单元801,还用于接收第二网络设备发送的MAC层确认字符ACK报文;
映射单元802,还用于将MAC层ACK报文映射为第一TCP层ACK报文;
发送单元803,还用于将第一TCP层ACK报文发送给TCP服务器。
具体地,映射单元802将TCP层报文映射为MAC层报文,具体包括:
映射单元802生成TCP层报文和MAC层报文之间映射关系表;
映射单元802依据该映射关系表将TCP层报文映射为MAC层报文。
具体地,映射单元802将MAC层ACK报文映射为第一TCP层ACK报文,具体包括:
映射单元802生成TCP层ACK报文和MAC层ACK报文之间映射关系表;
映射单元802依据该映射关系表将MAC层ACK报文映射为第一TCP层ACK报文。
进一步地,该映射关系表通过TCP层报文特征和MAC层报文特征来生成,TCP报文特征包括TCP层报文序列号sequence ID,MAC层报文特征包括MAC层报文序列号sequence ID。
进一步地,TCP报文特征还包括TCP层报文五元组信息和报文描述符,五元组信息包括源IP地址、源端口、目的IP地址、目的端口和传输层协议。
可选地,所述装置80还包括:
接收单元801,还用于接收第二网络设备发送的第二TCP层ACK报文,该第二TCP层ACK报文为TCP客户端根据收到的所述TCP层报文生成的确认字符
第一处理单元804,用于丢弃所述第二TCP层ACK报文。
可选地,所述装置80还包括:
检测单元805,用于检测MAC层和物理PHY层的链路质量参数和拥塞状况。
链路质量参数包括信号强度参数、无线链路空口重传率、报文丢包率和无线协商速率。
可选地,所述装置80还包括第二处理单元806,用于:当所述检测单元检测到链路空口瞬间冲突丢包,实际链路未拥塞,则所述第二处理单元执行减少所述MAC层ACK报文或第一TCP层ACK报文的响应时间;当所述检测单元,检测到发生了链路 拥塞,则所述第二处理单元提高所述MAC层ACK报文或第一TCP层ACK报文的响应时间。
基于上述图7对应的实施例中所描述的TCP报文的传输方法,本发明实施例提供一种TCP第二加速装置,用于执行上述图7对应的实施例中所描述的TCP报文的传输方法,可以为客户端设备,包括但不限于浏览器、视频播放器、IM聊天软件和网络游戏等多种不同应用,通过TCP向TCP服务端请求数据,向用户提供网络浏览、视频播放、通信交流及娱乐休闲等功能。服务端设备,包括但不限于网络服务器(英文:Web Server)、视频服务器(英文:Video Server)、即时通信服务器(英文:IM Server)和游戏服务器(英文:Game Server)等,用于响应TCP客户端的请求,向TCP客户端提供网络页面、视频文件、IM交流和游戏等功能。互联网络:TCP客户端和TCP服务端之间的通信网络,包括接入网络、核心网络及互联网络等。本发明实施例的实现,部署在TCP服务端的网元上。
图9是本发明第六实施例提供的一种TCP第二加速装置示意图,如图9所示,一种TCP第二加速装置90应用于TCP层和媒体介入控制MAC层,包括:接收单元901、发送单元902、映射单元903和处理单元904。
其中,接收单元901,用于接收第一网络设备发送的MAC层报文,所述MAC层报文数据帧格式为MAC协议数据单元MPDU;
发送单元902,用于发送与所述MAC层报文对应的MAC层确认字符ACK报文给第一网络设备;
映射单元903,用于将MAC层报文映射为TCP层报文;
发送单元901,还用于将所述TCP层报文发送给TCP客户端。
可选地,接收单元901,还用于接收第二TCP层ACK报文,该第二TCP层ACK报文为TCP客户端根据收到的TCP层报文生成的确认字符;
发送单元902,还用于将第二TCP层ACK报文发送给第一网络设备。
可选地,所述装置90还包括:
接收单元901,还用于接收第三TCP层ACK报文,该第三TCP层ACK报文为所述TCP客户端根据收到的所述TCP层报文生成的确认字符;
处理单元904,用于丢弃该第三TCP层ACK报文。
具体地,映射单元903将MAC层报文映射为TCP层报文,具体包括:
映射单元903生成所述TCP层报文和所述MAC层报文之间映射关系表;
映射单元903依据所述映射关系表将所述MAC层报文映射为所述TCP层报文。
进一步地,该映射关系表通过TCP层报文特征和MAC层报文特征来生成,TCP报文特征包括TCP层报文序列号sequence ID,MAC层报文特征包括MAC层报文序列号sequence ID。
进一步地,TCP报文特征还包括TCP报文五元组信息和报文描述符,所述五元组信息包括源IP地址、源端口、目的IP地址、目的端口和传输层协议。
基于上述图6对应的实施例中所描述的TCP报文的传输方法,本发明实施例提供一种TCP第一加速装置,用于执行上述图6对应的实施例中所描述的TCP报文的传输方法,可以为CPE(Customer Premises Equipment,用户侧设备)、AP((Wireless)Access Point,(无线)访问接入点),例如为路由器、交换机、防火墙等。互联网络:TCP客户端和TCP服务端之间的通信网络,包括接入网络、核心网络及互联网络等。本发明实施例的实现,部署在TCP服务端的网元上。
图10是本发明第七实施例提供的一种TCP第一加速装置示意图,如图10所示,一种TCP第一加速装置100应用于TCP层和媒体介入控制MAC层,包括:存储器1001、接收器1002、处理器1003、发送器1004和检测器1005。存储器1001、接收器1002、处理器1003、发送器1004和检测器1005之间通过总线1006相互连接。
该总线1006可以分为地址总线、数据总线、控制总线等。为便于表示,图10中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
本发明实施例所提供的发送器或接收器包括以太网接口等网络接口。
存储器1001可以包括易失性存储器,例如RAM;存储器1001也可以包括非易失性存储器,例如flash memory,HDD或SSD;存储器1001还可以包括上述种类的存储器的组合。
处理器1003可以是硬件芯片,直接实现为队列调度器,完成本申请实施例提供的数据传输方法中TCP加速装置的功能。上述硬件芯片可以是专用集成电路ASIC,PLD或其组合。上述PLD可以是复杂可编程逻辑器件CPLD,FPGA,GAL或其任意组合。
处理器1003也可以是通用处理器,例如,CPU,NP或者CPU和NP的组合。相应地,存储器1001还用于存储程序指令,处理器1003调用该存储器1001中存储的程序指令,可以执行本发明第三实施例提供的TCP加速方法中的一个或多个步骤,或其中可选的实施方式,使得所述TCP第一加速装置10实现上述TCP加速方法中的功能。
本发明实施例提供的一种TCP第一加速装置,应用于TCP层和媒体介入控制MAC层,包括:
存储器1001,用于存储程序指令;
接收器1002,用于接收TCP层报文;
处理器1003,用于执行所述存储器中存储的所述程序指令以实现将TCP层报文映射为MAC层报文,所述MAC层报文数据帧格式为MAC协议数据单元MPDU;
发送器1004,用于将MAC层报文发送给第二网络设备;
接收器1002,还用于接收第二网络设备发送的MAC层确认字符ACK报文;
处理器1003,还用于执行所述存储器中存储的所述程序指令以实现将所述MAC层ACK报文映射为第一TCP层ACK报文;
发送器1004,还用于将所述第一TCP层ACK报文发送给TCP服务器。
具体地,处理器1003将TCP层报文映射为MAC层报文,具体包括:
处理器1003生成TCP层报文和MAC层报文之间的映射关系表;
处理器1003依据映射关系表将所述TCP层报文映射为MAC层报文。
具体地,处理器1003将MAC层ACK报文映射为第一TCP层ACK报文,具体包括:
所述处理器生成TCP层ACK报文和所述MAC层ACK报文之间的映射关系表;
所述处理器依据该映射关系表将MAC层ACK报文映射为第一TCP层ACK报文。
映射关系表通过TCP层报文特征和MAC层报文特征来生成,TCP报文特征包括TCP层报文序列号sequence ID,MAC层报文特征包括MAC层报文序列号sequence ID。
TCP报文特征还包括TCP层报文五元组信息和报文描述符,所述五元组信息包括源IP地址、源端口、目的IP地址、目的端口和传输层协议。
可选地,接收器1002,还用于接收第二网络设备发送的第二TCP层ACK报文,该第二TCP层ACK报文为TCP客户端根据收到的TCP层报文生成的确认字符;
处理器1003,还用于丢弃第二TCP层ACK报文。
可选地,所述装置100还包括:
检测器1005,用于检测MAC层和物理PHY层的链路质量参数和拥塞状况。
链路质量参数包括信号强度参数、无线链路空口重传率、报文丢包率和无线协商速率。
可选地,处理器1003,还用于:当检测器1005检测到没有发生链路拥塞,则处理器1003执行减少MAC层ACK报文或第一TCP层ACK报文的响应时间;当检测器1005,检测到发生了链路拥塞,则处理器1003提高MAC层ACK报文或第一TCP层ACK报文的响应时间。
基于上述图7对应的实施例中所描述的TCP报文的传输方法,本发明实施例提供一种TCP第二加速装置,用于执行上述图7对应的实施例中所描述的TCP报文的传输方法,可以为客户端设备,包括但不限于浏览器、视频播放器、IM聊天软件和网络游戏等多种不同应用,通过TCP向TCP服务端请求数据,向用户提供网络浏览、视频播放、通信交流及娱乐休闲等功能。服务端设备,包括但不限于网络服务器(英文:Web Server)、视频服务器(英文:Video Server)、即时通信服务器(英文:IM Server)和游戏服务器(英文:Game Server)等,用于响应TCP客户端的请求,向TCP客户端提供网络页面、视频文件、IM交流和游戏等功能。互联网络:TCP客户端和TCP服务端之间的通信网络,包括接入网络、核心网络及互联网络等。本发明实施例的实现,部署在TCP服务端的网元上。
图11是本发明第八实施例提供的一种TCP第二加速装置示意图,如图11所示,一种TCP第二加速装置110应用于TCP层和媒体介入控制MAC层,包括:存储器1101、接收器1102、处理器1103和发送器1104。存储器1101、接收器1102、处理器1103和发送器1104之间通过总线1105相互连接。
该总线1105可以分为地址总线、数据总线、控制总线等。为便于表示,图11中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
存储器1101可以包括易失性存储器,例如RAM;存储器1101也可以包括非易失性存储器,例如flash memory,HDD或SSD;存储器1101还可以包括上述种类的存储器的组合。
处理器1103可以是硬件芯片,直接实现为队列调度器,完成本申请实施例提供的数据传输方法中TCP加速装置的功能。上述硬件芯片可以是专用集成电路ASIC,PLD或其组合。上述PLD可以是复杂可编程逻辑器件CPLD,FPGA,GAL或其任意组合。
处理器1103也可以是通用处理器,例如,CPU,NP或者CPU和NP的组合。相应地,存储器1101还用于存储程序指令,处理器1103调用该存储器1101中存储的程序指令,可以执行本发明第四实施例提供的TCP加速方法中的一个或多个步骤,或其中可选的实施方式,使得所述TCP第二加速装置110实现上述TCP加速方法中的功能。
本发明实施例提供的一种TCP第二加速装置,应用于TCP层和媒体介入控制MAC层,包括:
存储器1101,用于存储程序指令;
接收器1102,用于接收第一网络设备发送的MAC层报文,所述MAC层报文数据帧格式为MAC协议数据单元MPDU;
发送器1104,用于发送与MAC层报文对应的MAC层确认字符ACK报文给第一网络设备;
处理器1103,用于执行所述存储器中存储的所述程序指令以实现将所述MAC层报文映射为TCP层报文;
发送器1104,还用于将TCP层报文发送给TCP客户端。
可选地,接收器1102,还用于接收第二TCP层ACK报文,该第二TCP层ACK报文为TCP客户端根据收到的TCP层报文生成的确认字符;
发送器1104,还用于将该第二TCP层ACK报文发送给第一网络设备。
可选地,接收器1102,还用于接收第三TCP层ACK报文,该第三TCP层ACK报文为TCP客户端根据收到的所述TCP层报文生成的确认字符;
处理器1103,还用于丢弃该第三TCP层ACK报文。
具体地,处理器1103将MAC层报文映射为TCP层报文,具体包括:
处理器1103生成TCP层报文和MAC层报文之间映射关系表;
处理器1103依据该映射关系表将MAC层报文映射为TCP层报文。
该映射关系表通过TCP层报文特征和MAC层报文特征来生成,TCP报文特征包括TCP层报文序列号sequence ID,MAC层报文特征包括MAC层报文序列号sequence  ID。
TCP报文特征还包括TCP报文五元组信息和报文描述符,所述五元组信息包括源IP地址、源端口、目的IP地址、目的端口和传输层协议。
本发明第九实施例提供了一种传输控制协议TCP加速系统,包括:TCP第一加速装置和TCP第二加速装置,该TCP第一加速装置为图8对应的实施例中所描述的TCP第一加速装置,该TCP第二加速装置为图9对应的实施例中所描述的TCP第二加速装置。
本发明第十实施例提供了一种传输控制协议TCP加速系统,包括:TCP第一加速装置和TCP第二加速装置,该TCP第一加速装置为图10对应的实施例中所描述的TCP第一加速装置,该TCP第二加速装置为图11对应的实施例中所描述的TCP第二加速装置。
本发明第十一实施例提供了一种芯片。该芯片包括处理器和存储器;存储器用于存放程序;所述处理器用于执行所述存储器存储的所述程序,以执行上述方法实施例中所述的方法。
本发明第十二实施例提供了一种计算机可读存储介质,包括计算机可读指令,当计算机读取并执行所述计算机可读指令时,使得计算机执行上述方法实施例中所述的方法。
本发明第十三实施例还提供了一种包含指令的计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行上述方法实施例中所述的方法。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到 多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。

Claims (31)

  1. 一种传输控制协议TCP加速方法,其特征在于,应用于TCP层和媒体介入控制MAC层,所述方法包括:
    第一网络设备接收TCP层报文;
    所述第一网络设备将所述TCP层报文映射为MAC层报文,所述MAC层报文数据帧格式为MAC协议数据单元MPDU;
    所述第一网络设备将所述MAC层报文发送给第二网络设备;
    所述第一网络设备接收所述第二网络设备发送的MAC层确认字符ACK报文;
    所述第一网络设备将所述MAC层ACK报文映射为第一TCP层ACK报文;
    所述第一网络设备将所述第一TCP层ACK报文发送给TCP服务器。
  2. 如权利要求1所述的方法,其特征在于,所述第一网络设备将所述TCP层报文映射为MAC层报文,具体包括:
    所述第一网络设备生成所述TCP层报文和所述MAC层报文之间映射关系表;
    所述第一网络设备依据所述映射关系表将所述TCP层报文映射为所述MAC层报文。
  3. 如权利要求1所述的方法,其特征在于,所述第一网络设备将所述MAC层ACK报文映射为第一TCP层ACK报文,具体包括:
    所述第一网络设备生成所述TCP层ACK报文和所述MAC层ACK报文之间映射关系表;
    所述第一网络设备依据所述映射关系表将所述MAC层ACK报文映射为所述第一TCP层ACK报文。
  4. 如权利要求2、3所述的方法,其特征在于,所述映射关系表通过TCP层报文特征和MAC层报文特征来生成,所述TCP报文特征包括TCP层报文序列号sequence ID,所述MAC层报文特征包括MAC层报文序列号sequence ID。
  5. 如权利要求4所述的方法,其特征在于,所述TCP报文特征还包括TCP层报文五元组信息和报文描述符,所述五元组信息包括源IP地址、源端口、目的IP地址、目的端口和传输层协议。
  6. 如权利要求1所述的方法,其特征在于,所述方法还包括:
    所述第一网络设备接收所述第二网络设备发送的第二TCP层ACK报文,所述第二TCP层ACK报文为TCP客户端根据收到的所述TCP层报文生成的确认字符;
    所述第一网络设备丢弃所述第二TCP层ACK报文。
  7. 如权利要求1所述的方法,其特征在于,所述方法还包括:
    所述第一网络设备检测MAC层和物理PHY层的链路质量参数和拥塞状况,并决定响应所述MAC层ACK报文或所述第一TCP层ACK报文的时间。
  8. 如权利要求7所述的方法,其特征在于,所述链路质量参数包括信号强度参数、无线链路空口重传率、报文丢包率和无线协商速率。
  9. 如权利要求7所述的方法,其特征在于,所述方法还包括:
    所述第一网络设备检测到链路空口瞬间冲突丢包,实际链路未拥塞,则所述第一网络设备执行减少所述MAC层ACK报文或第一TCP层ACK报文的响应时间。
  10. 如权利要求7所述的方法,其特征在于,所述方法还包括:
    所述第一网络设备检测到发生了链路拥塞,则所述第一网络设备提高所述MAC层ACK报文或第一TCP层ACK报文的响应时间。
  11. 一种传输控制协议TCP加速方法,其特征在于,应用于TCP层和媒体介入控制MAC层,所述方法包括:
    第二网络设备接收第一网络设备发送的MAC层报文,所述MAC层报文数据帧格式为MAC协议数据单元MPDU;
    所述第二网络设备发送与所述MAC层报文对应的MAC层确认字符ACK报文给第一网络设备;
    所述第二网络设备将所述MAC层报文映射为TCP层报文;
    所述第二网络设备将所述TCP层报文发送给TCP客户端。
  12. 如权利要求11所述的方法,其特征在于,所述方法还包括:
    所述第二网络设备接收第二TCP层ACK报文,所述第二TCP层ACK报文为所述TCP客户端根据收到的所述TCP层报文生成的确认字符;
    所述第二网络设备将所述第二TCP层ACK报文发送给所述第一网络设备。
  13. 如权利要求11所述的方法,其特征在于,所述方法还包括:
    所述第二网络设备接收第三TCP层ACK报文,所述第三TCP层ACK报文为所述TCP客户端根据收到的所述TCP层报文生成的确认字符
    所述第二网络设备丢弃所述第三TCP层ACK报文。
  14. 如权利要求11所述的方法,其特征在于,所述第二网络设备将所述MAC层报文映射为TCP层报文,具体包括:
    所述第二网络设备生成所述TCP层报文和所述MAC层报文之间映射关系表;
    所述第二网络设备依据所述映射关系表将所述MAC层报文映射为所述TCP层报文。
  15. 如权利要求14所述的方法,其特征在于,所述映射关系表通过TCP层报文特征和MAC层报文特征来生成,所述TCP报文特征包括TCP层报文序列号sequence ID,所述MAC层报文特征包括MAC层报文序列号sequence ID。
  16. 如权利要求15所述的方法,其特征在于,所述TCP报文特征还包括TCP报文五元组信息和报文描述符,所述五元组信息包括源IP地址、源端口、目的IP地址、目的端口和传输层协议。
  17. 一种传输控制协议TCP加速装置,其特征在于,应用于TCP层和媒体介入控制MAC层,所述装置包括:
    存储器,用于存储程序指令;
    接收器,用于接收TCP层报文;
    处理器,用于执行所述存储器中存储的所述程序指令以实现将所述TCP层报文映射为MAC层报文,所述MAC层报文数据帧格式为MAC协议数据单元MPDU;
    发送器,用于将所述MAC层报文发送给第二网络设备;
    所述接收器,还用于接收所述第二网络设备发送的MAC层确认字符ACK报文;
    所述处理器,还用于执行所述存储器中存储的所述程序指令以实现将所述MAC层ACK报文映射为第一TCP层ACK报文;
    所述发送器,还用于将所述第一TCP层ACK报文发送给TCP服务器。
  18. 如权利要求17所述的装置,其特征在于,所述处理器将所述TCP层报文映射为MAC层报文,具体包括:
    所述处理器生成所述TCP层报文和所述MAC层报文之间的映射关系表;
    所述处理器依据所述映射关系表将所述TCP层报文映射为所述MAC层报文。
  19. 如权利要求17所述的装置,其特征在于,所述处理器将所述MAC层ACK报文映射为第一TCP层ACK报文,具体包括:
    所述处理器生成TCP层ACK报文和所述MAC层ACK报文之间的映射关系表;
    所述处理器依据所述映射关系表将所述MAC层ACK报文映射为所述第一TCP层ACK报文。
  20. 如权利要求19所述的装置,其特征在于,所述映射关系表通过TCP层报文特征和MAC层报文特征来生成,所述TCP报文特征包括TCP层报文序列号sequence ID,所述MAC层报文特征包括MAC层报文序列号sequence ID。
  21. 如权利要求20所述的装置,其特征在于,所述TCP报文特征还包括TCP层报文五元组信息和报文描述符,所述五元组信息包括源IP地址、源端口、目的IP地址、目的端口和传输层协议。
  22. 如权利要求17所述的装置,其特征在于:
    所述接收器,还用于接收所述第二网络设备发送的第二TCP层ACK报文,所述第二TCP层ACK报文为TCP客户端根据收到的所述TCP层报文生成的确认字符
    所述处理器,还用于丢弃所述第二TCP层ACK报文。
  23. 如权利要求17所述的装置,其特征在于,所述装置还包括:
    检测器,用于检测MAC层和物理PHY层的链路质量参数和拥塞状况。
  24. 如权利要求17所述的装置,其特征在于,所述链路质量参数包括信号强度参数、无线链路空口重传率、报文丢包率和无线协商速率。
  25. 如权利要求23所述的装置,其特征在于:
    所述处理器,还用于:当所述检测器检测到没有发生链路拥塞,则所述处理器执行减少所述MAC层ACK报文或第一TCP层ACK报文的响应时间;当所述检测器,检测到发生了链路拥塞,则所述处理器提高所述MAC层ACK报文或第一TCP层ACK报文的响应时间。
  26. 一种传输控制协议TCP加速装置,其特征在于,应用于TCP层和媒体介入控制MAC层,所述装置包括:
    存储器,用于存储程序指令;
    接收器,用于接收第一网络设备发送的MAC层报文,所述MAC层报文数据帧格式为MAC协议数据单元MPDU;
    发送器,用于发送与所述MAC层报文对应的MAC层确认字符ACK报文给第一网络设备;
    处理器,用于执行所述存储器中存储的所述程序指令以实现将所述MAC层报文映射为TCP层报文;
    所述发送器,还用于将所述TCP层报文发送给TCP客户端。
  27. 如权利要求26所述的装置,其特征在于:
    所述接收器,还用于接收第二TCP层ACK报文,所述第二TCP层ACK报文为所述TCP客户端根据收到的所述TCP层报文生成的确认字符;
    所述发送器,还用于将所述第二TCP层ACK报文发送给所述第一网络设备。
  28. 如权利要求26所述的装置,其特征在于:
    所述接收器,还用于接收第三TCP层ACK报文,所述第三TCP层ACK报文为所述TCP客户端根据收到的所述TCP层报文生成的确认字符;
    所述处理器,还用于丢弃所述第三TCP层ACK报文。
  29. 如权利要求26所述的装置,其特征在于,处理器将所述MAC层报文映射为 TCP层报文,具体包括:
    所述处理器生成所述TCP层报文和所述MAC层报文之间映射关系表;
    所述处理器依据所述映射关系表将所述MAC层报文映射为所述TCP层报文。
  30. 如权利要求29所述的装置,其特征在于,所述映射关系表通过TCP层报文特征和MAC层报文特征来生成,所述TCP报文特征包括TCP层报文序列号sequence ID,所述MAC层报文特征包括MAC层报文序列号sequence ID。
  31. 如权利要求30所述的装置,其特征在于,所述TCP报文特征还包括TCP报文五元组信息和报文描述符,所述五元组信息包括源IP地址、源端口、目的IP地址、目的端口和传输层协议。
PCT/CN2019/073564 2019-01-29 2019-01-29 一种传输控制协议加速方法和装置 WO2020154872A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2019/073564 WO2020154872A1 (zh) 2019-01-29 2019-01-29 一种传输控制协议加速方法和装置
CN201980090423.8A CN113424578B (zh) 2019-01-29 2019-01-29 一种传输控制协议加速方法和装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/073564 WO2020154872A1 (zh) 2019-01-29 2019-01-29 一种传输控制协议加速方法和装置

Publications (1)

Publication Number Publication Date
WO2020154872A1 true WO2020154872A1 (zh) 2020-08-06

Family

ID=71840644

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/073564 WO2020154872A1 (zh) 2019-01-29 2019-01-29 一种传输控制协议加速方法和装置

Country Status (2)

Country Link
CN (1) CN113424578B (zh)
WO (1) WO2020154872A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022173389A1 (en) * 2021-02-11 2022-08-18 Tayf Ileri Teknoloji Hizmetleri Anonim Sirketi Network management system for accelerating tcp traffic at transport layer level

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001078426A1 (en) * 2000-04-07 2001-10-18 Proxim, Inc. Improved asymmetric data traffic throughput in csma/ca networks
CN101534573A (zh) * 2008-11-20 2009-09-16 上海交通大学 无线自组织网络中链路层实现传输层确认的方法
CN102186207A (zh) * 2011-04-06 2011-09-14 重庆大学 一种无线局域网络下跨层减少tcp重复应答方法

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101583083B (zh) * 2009-06-01 2011-11-30 中兴通讯股份有限公司 一种实时数据业务的实现方法和实时数据业务系统
CN102970118B (zh) * 2012-12-04 2015-06-17 福建星网锐捷网络有限公司 一种tcp ack报文处理方法、装置及无线网络设备
CN106209325A (zh) * 2015-04-30 2016-12-07 中兴通讯股份有限公司 一种tcp ack报文处理方法及装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001078426A1 (en) * 2000-04-07 2001-10-18 Proxim, Inc. Improved asymmetric data traffic throughput in csma/ca networks
CN101534573A (zh) * 2008-11-20 2009-09-16 上海交通大学 无线自组织网络中链路层实现传输层确认的方法
CN102186207A (zh) * 2011-04-06 2011-09-14 重庆大学 一种无线局域网络下跨层减少tcp重复应答方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
A. HUSSAIN ; M.S. AKBAR ; M.A. CHEEMA: "A simple cross-layer approach to reduce duplicate acknowledgements for TCP over WLAN", IEEE INTERNATIONAL NETWORKING AND COMMUNICATIONS CONFERENCE, 2008 : INCC 2008 ; 1 - 3 MAY 2008, LAHORE UNIVERSITY OF MANAGEMENT SCIENCES, PAKISTAN, IEEE, PISCATAWAY, NJ, USA, 1 May 2008 (2008-05-01) - 3 May 2008 (2008-05-03), Piscataway, NJ, USA, pages 63 - 66, XP031285264, ISBN: 978-1-4244-2151-0, DOI: 10.1109/INCC.2008.4562693 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022173389A1 (en) * 2021-02-11 2022-08-18 Tayf Ileri Teknoloji Hizmetleri Anonim Sirketi Network management system for accelerating tcp traffic at transport layer level

Also Published As

Publication number Publication date
CN113424578A (zh) 2021-09-21
CN113424578B (zh) 2023-07-18

Similar Documents

Publication Publication Date Title
US10237153B2 (en) Packet retransmission method and apparatus
US8169911B2 (en) Method for transmitting a data stream with anticipation of acknowledgments, correspondence input device and computer-readable storage medium
US9325764B2 (en) Apparatus and method for transparent communication architecture in remote communication
JP4829896B2 (ja) データ破壊を避けることによる改善されたネットワーク性能のための方法、システム及び物品
US8122140B2 (en) Apparatus and method for accelerating streams through use of transparent proxy architecture
JP5005003B2 (ja) トンネルのトランスポートチャネル上のデータストリームの送信を管理する方法、対応するトンネル終点及びコンピュータ読み取り可能な記憶媒体
JP5020076B2 (ja) 低頻度ackのシステムに適した高性能tcp
Kumar et al. Survey on transport layer protocols: TCP & UDP
US20030131079A1 (en) Performance enhancing proxy techniques for internet protocol traffic
US9577791B2 (en) Notification by network element of packet drops
CN112436994B (zh) 一种数据传输方法及电子设备
JP2014143760A (ja) 通信装置、通信システム、およびデータ通信の中継方法
JP2014509483A (ja) ワイヤレスネットワークにおけるトランスミッション・コントロール・プロトコルの性能を改善する機構
US11671377B2 (en) System and method for reducing bandwidth usage of a network
WO2011100911A2 (zh) 探测处理方法、数据发送端、数据接收端以及通信系统
WO2020147453A1 (zh) 数据传输方法及相关装置
WO2017107148A1 (zh) 一种数据传输方法及网络侧设备
WO2020154872A1 (zh) 一种传输控制协议加速方法和装置
WO2020010511A1 (zh) 数据传输方法及基站
Buchholcz et al. Explicit loss notification to improve TCP performance over wireless networks
KR20050013777A (ko) 재전송 타임아웃 수를 줄이기 위한 전송 제어 프로토콜혼잡제어방법
KR101396785B1 (ko) 네트워크 장치에서 tcp 기능을 수행하는 방법
GB2447469A (en) Handling TCP transmissions by determination of a sending or receiving nodes congestion avoidance capabilities
Nishida Enhancing 802.11 DCF MAC for TCP/IP communication
Eddie Law Transport protocols for wireless mesh networks

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19912840

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19912840

Country of ref document: EP

Kind code of ref document: A1