WO2014131153A1 - 数据传输方法、系统及代理设备 - Google Patents

数据传输方法、系统及代理设备 Download PDF

Info

Publication number
WO2014131153A1
WO2014131153A1 PCT/CN2013/071894 CN2013071894W WO2014131153A1 WO 2014131153 A1 WO2014131153 A1 WO 2014131153A1 CN 2013071894 W CN2013071894 W CN 2013071894W WO 2014131153 A1 WO2014131153 A1 WO 2014131153A1
Authority
WO
WIPO (PCT)
Prior art keywords
sequence number
data
client
response
proxy device
Prior art date
Application number
PCT/CN2013/071894
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/CN2013/071894 priority Critical patent/WO2014131153A1/zh
Priority to CN201380001851.1A priority patent/CN104170346B/zh
Priority to EP13876713.2A priority patent/EP2953310B1/en
Publication of WO2014131153A1 publication Critical patent/WO2014131153A1/zh
Priority to US14/836,610 priority patent/US10104179B2/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/143Termination or inactivation of sessions, e.g. event-controlled end of session
    • H04L67/145Termination or inactivation of sessions, e.g. event-controlled end of session avoiding end of session, e.g. keep-alive, heartbeats, resumption message or wake-up for inactive or interrupted session
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/163In-band adaptation of TCP data exchange; In-band control procedures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W80/00Wireless network protocols or protocol adaptations to wireless operation
    • H04W80/06Transport layer protocols, e.g. TCP [Transport Control Protocol] over wireless

Definitions

  • Embodiments of the present invention relate to communication technologies, and in particular, to a data transmission method, system, and proxy device. Background technique
  • the client establishes a Transmission Control Protocol (TCP) connection with the Internet server through the mobile communication network.
  • TCP Transmission Control Protocol
  • the client and the mobile communication network are connected by a wireless link, and the mobile communication network and the Internet server are generally connected through a wired network. Due to the obvious time-varying characteristics of the wireless link, the data transmission rate and packet loss rate between the client and the mobile communication network change drastically with time. At this time, the TCP congestion control method for the wired network is used to adjust the transmission strategy. . However, due to the difference in transmission characteristics between wireless networks and wired networks, the TCP congestion control method proposed for wired networks is not suitable for wireless networks.
  • the prior art proposes a network proxy technology, which divides the TCP connection between the client and the Internet server into two parts, and part is a TCP connection established between the client and the network proxy for the wireless network, part of It is a TCP connection established between the network proxy and the Internet server for the wired network.
  • the TCP congestion control method applicable to the wireless network can be used between the client and the network proxy, and the traditional TCP congestion control method can be used between the network proxy and the Internet server.
  • Existing network proxy technology may reduce the quality of service of wireless networks, so a new data transmission technology is needed. Summary of the invention
  • Embodiments of the present invention provide a data transmission method, system, and proxy device for providing a technology different from the prior art and still performing data transmission by a proxy device.
  • the first aspect provides a data transmission method, including:
  • a connection between the first device and the second device is established, where the first device is a client, the second device is an Internet server, or the first device is a mutual device. a networked server, the second device is a client; the proxy device interacts with the client wirelessly, and the proxy device interacts with the Internet server through a wired manner;
  • the proxy device acquires a first direction start sequence number corresponding to the first direction, a first direction response sequence number, and a second direction start sequence number corresponding to the second direction, where
  • the first direction is a direction in which the first device sends data to the second device
  • the second direction is a direction in which the second device sends data to the first device
  • the first The direction start sequence number is a start sequence number corresponding to the start data of the first direction, where the start data of the first direction is cached in the proxy device last time, and is in the first direction.
  • Transmitting the first data the first direction response sequence number is a termination sequence number corresponding to the termination data in the first direction, and the termination data in the first direction is the last time cached in the proxy device.
  • the second direction starting sequence number is a starting sequence number corresponding to the starting data in the second direction, and the starting data in the second direction
  • the proxy device receives the first data sent by the first device to the second device in the first direction, and updates the first direction response sequence number to a termination sequence number of the first data plus one
  • the proxy device sends a first acknowledgement response to the first device according to the updated first direction response sequence number and the second direction start sequence number; the proxy device forwards the first data Giving the second device, and updating the first direction starting sequence number to the first direction response sequence number.
  • the method further includes:
  • the proxy device acquires a second direction response sequence number corresponding to the second direction, where the second direction response sequence number is a termination sequence number corresponding to the termination data in the second direction, and the second direction is Terminating data is the last data cached in the proxy device last time and in the second direction;
  • the proxy device receives second data sent by the second device to the first device in the second direction, and updates the second direction response sequence number to a termination number of the second data plus one
  • the proxy device sends a second acknowledgement response to the second device according to the updated second direction response sequence number and the first sequence start sequence number; the proxy device uses the second data Forwarding to the first device, and updating the second direction starting sequence number to the second direction Answer the serial number.
  • the proxy device updates the second direction response sequence number to a termination number of the second data Before adding 1, the method further includes: the proxy device determining that the response sequence number in the second data is different from the second direction response sequence number.
  • the proxy device determines a response sequence number and the second direction response sequence in the second data The number is different, and the method includes: determining, by the proxy device, whether the first data is cached locally, and if the determination result is yes, determining that the response sequence number in the second data is different from the second direction response sequence number.
  • the method further includes: the proxy device recording a response sequence number in the first acknowledgement response;
  • Determining, by the proxy device, that the response sequence number in the second data is different from the second direction response sequence number includes: if the proxy device determines the response sequence number in the first acknowledgement response and the If the response sequence numbers in the second data are different, it is determined that the response sequence number in the second data is different from the second direction response sequence number.
  • the proxy device acquires a first direction start sequence number corresponding to the first direction, a first direction response sequence number, and a second direction start sequence number corresponding to the second direction.
  • the second direction response serial number including:
  • the proxy device When the client switches from the source network side device to the proxy device, the proxy device receives downlink data, and obtains the first direction start sequence number and the first direction response sequence from the downlink data.
  • the downlink data sent by the client, the source network side device is a network side device to which the client is attached before the handover occurs
  • the proxy device is a network side device to which the client is attached after the handover occurs.
  • the method further includes:
  • the proxy device sends the target network device to the target network device, and the Internet server sends the message to the client.
  • Downstream data so that the target network side device continues to forward the received downlink data to the client; wherein the proxy device is a network side device to which the client is attached before the handover occurs, and the target network The side device is a network side device to which the client is attached after the switchover occurs.
  • the second aspect provides a proxy device, including:
  • An acquiring module configured to acquire a first direction starting sequence number corresponding to the first direction, a first direction response sequence number, and a second direction starting sequence number corresponding to the second direction; where, between the first device and the second device Establishing a connection of the Transmission Control Protocol (TCP), the first device is a client, the second device is an Internet server, or the first device is an Internet server, and the second device is a client; Interacting with the client in a wireless manner, the proxy device interacts with the Internet server through a wired manner;
  • TCP Transmission Control Protocol
  • the first direction is a direction in which the first device sends data to the second device
  • the second direction is a direction in which the second device sends data to the first device
  • the first direction starting sequence number is a starting sequence number corresponding to the starting data of the first direction, and the starting data of the first direction is cached in the proxy device last time, and in the The first data transmitted in the first direction;
  • the first direction response sequence number is a termination sequence number corresponding to the termination data in the first direction, and the termination data in the first direction is cached in the proxy device last time, and is in the first The last data transmitted in the direction;
  • the second direction starting sequence number is a starting sequence number corresponding to the starting data in the second direction, and the starting data in the second direction is the last time cached in the proxy device, and in the The first data transmitted in the second direction;
  • a receiving module configured to receive first data that is sent by the first device to the second device in the first direction
  • An update module configured to update the first direction response serial number obtained by the acquiring module to The termination sequence number of the first data received by the receiving module is increased by 1;
  • a sending module configured to send a first confirmation response to the first device according to the first direction response sequence number updated by the update module and the second direction start sequence number obtained by the acquiring module;
  • the sending module is further configured to forward the first data received by the receiving module to the second device;
  • the update module is further configured to update the first direction start sequence number acquired by the acquiring module to the first direction response sequence number.
  • the acquiring module is further configured to obtain a second direction response sequence number corresponding to the second direction, where
  • the second direction response sequence number is a termination sequence number corresponding to the termination data in the second direction, and the termination data in the second direction is cached in the proxy device last time, and in the second The last data in the direction;
  • the receiving module is further configured to receive second data that is sent by the second device to the first device in the second direction;
  • the update module is further configured to update the second direction response sequence number acquired by the acquiring module to a termination sequence number of the second data received by the receiving module by one;
  • the sending module is further configured to send a second acknowledgement response to the second device according to the second direction response sequence number updated by the update module and the first direction start sequence number acquired by the acquiring module;
  • the sending module is further configured to forward the second data received by the receiving module to the first device;
  • the update module is further configured to update the second direction start sequence number acquired by the acquiring module to the second direction response sequence number.
  • the proxy device further includes: a determining module, configured to determine a response serial number in the second data Whether it is the same as the second direction response sequence number.
  • the determining module is specifically configured to determine whether the first data is cached locally, and if the determination result is yes Determining a response sequence number in the second data and the second direction response sequence The numbers are not the same.
  • the proxy device further includes: a recording module, configured to record a response sequence in the first acknowledgement response number;
  • the determining module is specifically configured to: if it is determined that the response sequence number in the first confirmation response recorded by the recording module is different from the response sequence number in the second data received by the receiving module, determine the second The response sequence number in the data is different from the second direction response sequence number.
  • the acquiring module is specifically configured to: obtain, when receiving, downlink data from the receiving module when the client switches from the source network side device to the proxy device The first direction start sequence number, the first direction response sequence number, the second direction start sequence number, and the second direction response sequence number, where the downlink data includes the source network side
  • the downlink data sent by the device to the client that is forwarded by the device to the source network side device, where the source network device is the network side device to which the client is attached before the handover occurs.
  • the proxy device is a network side device to which the client is attached after the handover occurs.
  • the sending module is further configured to switch from the proxy device to the target at the client And transmitting, by the network side device, the downlink data that is still cached in the proxy device and sent by the Internet server to the client, so that the target network side device continues to forward the received data.
  • Downlink data to the client; wherein the proxy device is a network side device to which the client is attached before the handover occurs, and the target network device is a network device attached to the client after the handover occurs.
  • the third aspect provides a data transmission system, including: a first device, a second device, and any proxy device provided by the second device.
  • the fourth aspect provides a proxy device, including:
  • a processor configured to acquire a first direction starting sequence number corresponding to the first direction, and a first direction response a sequence number and a second direction starting sequence number corresponding to the second direction; wherein, the connection between the first device and the second device is established, the first device is a client, and the second device is The Internet server, or the first device is an Internet server, the second device is a client; the proxy device interacts with the client wirelessly, and the proxy device interacts with the Internet server through a wired manner. ; among them,
  • the first direction is a direction in which the first device sends data to the second device
  • the second direction is a direction in which the second device sends data to the first device
  • the first direction starting sequence number is a starting sequence number corresponding to the starting data of the first direction, and the starting data of the first direction is cached in the proxy device last time, and in the The first data transmitted in the first direction;
  • the first direction response sequence number is a termination sequence number corresponding to the termination data in the first direction, and the termination data in the first direction is cached in the proxy device last time, and is in the first The last data transmitted in the direction;
  • the second direction starting sequence number is a starting sequence number corresponding to the starting data in the second direction, and the starting data in the second direction is the last time cached in the proxy device, and in the The first data transmitted in the second direction;
  • a receiver configured to receive first data that is sent by the first device to the second device in the first direction
  • the processor is further configured to update the first direction response sequence number to a termination number of the first data received by the receiver by one;
  • a transmitter configured to send a first acknowledgement response to the first device according to the updated first direction response sequence number of the processor and the second direction start sequence number obtained by the processor;
  • the transmitter is further configured to forward the first data received by the receiver to the second device, where the processor is further configured to update the first direction starting sequence number to the first Direction response serial number.
  • the processor is further configured to acquire a second direction response sequence number corresponding to the second direction, where
  • the second direction response sequence number is a termination sequence number corresponding to the termination data in the second direction, and the termination data in the second direction is cached in the proxy device last time, and in the second The last data in the direction;
  • the receiver is further configured to receive second data that is sent by the second device to the first device in the second direction;
  • the processor is further configured to update the acquired second direction response sequence number to a termination sequence number of the second data received by the receiver by one;
  • the transmitter is further configured to send a second acknowledgement response to the second device according to the updated second direction response sequence number and the first direction start sequence number of the processor;
  • the transmitter is further configured to forward the second data received by the receiver to the first device, where the processor is further configured to update the second direction starting sequence number to the second Direction response serial number.
  • the processor is further configured to determine a response sequence number and the second The direction response serial number is the same.
  • the processor is specifically configured to determine whether the first data is cached locally, if the determination result is yes Determining that the response sequence number in the second data is different from the second direction response sequence number.
  • the processor is further configured to record a response sequence number in the first acknowledgement response, The processor is specifically configured to: if it is determined that the response sequence number in the first acknowledgement response of the record is different from the response sequence number in the second data, determine a response sequence number and a location in the second data The second direction response sequence number is different.
  • the processor is specifically configured to acquire, in the received downlink data, when the receiver switches from the source network side device to the proxy device a first direction start sequence number, the first direction response sequence number, the second direction start sequence number, and the second direction response sequence number, where the downlink data includes the source network side device
  • the proxy device is a network side device to which the client is attached after the switchover occurs.
  • the transmitter is further configured to: switch from the proxy device to the target at the client Sending, by the network side device, downlink data that is still cached in the proxy device and sent by the Internet server to the client, so that the target network side device continues to forward the received data.
  • Downlink data to the client; wherein the proxy device is a network side device to which the client is attached before the handover occurs, and the target network device is a network device attached to the client after the handover occurs.
  • the data transmission method, system and proxy device provided by the embodiments of the present invention establish a TCP connection between the client and the Internet server, and the proxy device interacts with the client wirelessly, and the proxy device interacts with the Internet server through a wired manner.
  • the device obtains the starting sequence number and the answering sequence number in the direction in which the client sends data to the Internet server, and the starting sequence number in the direction in which the Internet server sends data to the client, or obtains the direction in which the Internet server sends data to the client.
  • the start sequence number and the reply sequence number and the starting sequence number in the direction in which the client sends data to the Internet server and send the Internet server to the client according to the obtained start sequence number and response sequence number in the corresponding direction.
  • the data of the end is forwarded to the client or the data sent by the client to the internet server is forwarded to the internet server, and the corresponding starting serial number and the answering serial number are updated to realize the forwarding of data between the internet server and the client, due to the proxy Assume
  • the TCP connection is not established with the client and the Internet server respectively.
  • the data transmission is based on the TCP connection between the client and the Internet server.
  • the interruption and re-establishment of the TCP connection are not involved in the data transmission process. Therefore, it will not affect the quality of service of the wireless network.
  • FIG. 1 is a schematic structural diagram of a network for a client to access Internet content through a mobile communication network according to embodiments of the present invention
  • FIG. 2A is a flowchart of a data transmission method according to an embodiment of the present invention
  • FIG. 2B is a flowchart of another data transmission method according to an embodiment of the present invention
  • FIG. 3 is a flowchart of still another data transmission method according to an embodiment of the present invention.
  • FIG. 5 is a flowchart of still another data transmission method according to an embodiment of the present invention.
  • FIG. 6 is a flowchart of still another data transmission method according to an embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of a proxy device according to an embodiment of the present disclosure.
  • FIG. 8 is a schematic structural diagram of another proxy device according to an embodiment of the present disclosure.
  • FIG. 9 is a schematic structural diagram of still another proxy device according to an embodiment of the present invention.
  • the technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention.
  • the embodiments are a part of the embodiments of the invention, and not all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
  • FIG. 1 is a schematic diagram of a network structure of a client accessing Internet content through a mobile communication network based on embodiments of the present invention.
  • 2A is a flow chart of a data transmission method according to an embodiment of the present invention.
  • the mobile communication network between the client and the Internet server establishes a TCP connection.
  • the first device and the second device are used to indicate that the client establishes a TCP connection with the Internet server, that is, the first device and the second device, where the first device For the client, the second device is an Internet server, or the first device is an Internet server, and the second device is a client.
  • the proxy device interacts with the client wirelessly, and the proxy device interacts with the Internet server by wire.
  • the method in this embodiment includes:
  • the proxy device acquires a first direction start sequence number corresponding to the first direction, a first direction response sequence number, and a second direction start sequence number corresponding to the second direction, where the first direction is the a direction in which the first device sends data to the second device, where the second direction is a direction in which the second device sends data to the first device.
  • the first direction starting sequence number is corresponding to the starting data of the first direction. a starting sequence number, where the starting data of the first direction is the first data that is last cached in the proxy device and transmitted in the first direction;
  • the first direction response sequence number is a termination sequence number corresponding to the termination data in the first direction, and the termination data in the first direction is cached in the proxy device last time, and is in the first The last data transmitted in the direction;
  • the second direction starting sequence number is a starting sequence number corresponding to the starting data in the second direction, and the starting data in the second direction is the last time cached in the proxy device, and in the The first data transmitted in the second direction.
  • the data sent by the first device to the second device or the data sent by the second device to the first device carries a start sequence number and a response sequence number.
  • the starting sequence number corresponding to the starting data in the first direction is referred to as the first direction starting sequence number; the terminating sequence number corresponding to the terminating data in the first direction is referred to as the first direction answering sequence number;
  • the starting sequence number corresponding to the start data of the direction is referred to as the second direction start sequence number.
  • the starting data of the first direction is the first data that is cached in the proxy device last time and transmitted in the first direction, and the termination of the first direction
  • the data is the last data that was last cached in the proxy device and transmitted in the first direction.
  • the first data to the last data in the first direction is cached in the proxy device and has not been sent to the second device.
  • the proxy device sends the first data to the last data in the first direction of the cache to the second device, and after being acknowledged by the second device through the TCP, the proxy device may delete the first one of the cached first directions. Data to the last data.
  • the starting data in the second direction is the first data that is cached in the proxy device last time and transmitted in the second direction, and correspondingly, The last data that was previously cached in the proxy device and transmitted in the second direction is referred to as the termination data in the second direction.
  • the first data to the last data in the second direction is cached in the proxy device and has not been sent to the first device.
  • the proxy device sends the first data to the last data in the second direction of the cache to the first device, and after being acknowledged by the first device through the TCP, the proxy device may delete the first of the cached second directions. Data to the last data.
  • the "cache" described in the various embodiments of the present invention includes a cache for a long time, and also includes a temporary cache.
  • the client accesses the Internet server in the Internet through the mobile communication network, and the TCP connection is established between the client and the Internet server; and the proxy device in the mobile communication network Interact with the client wirelessly and interact with the Internet server by wire.
  • the proxy device After the proxy device establishes a TCP connection between the client and the Internet server, it starts the TCP proxy function when starting or not starting data transmission. After determining to start the TCP proxy function, it will utilize the existing existence between the client and the Internet server.
  • the TCP connection communicates with the client and the Internet server, respectively, to complete the forwarding of data between the client and the Internet server.
  • the above mobile communication network may be a Long Term Evolution (LTE) network, a Universal Mobile Telecommunications System (UMTS) or a Worldwide Interoperability for Microwave Access (WiMax). ) Network, etc.
  • the proxy device may be a UMTS Terrestrial Radio Access Network (UTRAN) device or a Radio Network Controller (RNC).
  • the proxy device may be an evolved UTRAN (Evolved-UTRAN, E-UTRAN for short) device, a Serving Gateway (SGW) or a Packet Data Network Gateway (referred to as a Packet Data Network Gateway). PDN GW) and so on.
  • the proxy device receives first data that is sent by the first device to the second device in the first direction, and updates the first direction response sequence number to a termination sequence number of the first data. plus 1.
  • the first data may be uplink data sent by the client to the Internet server; or the first data may be downlink data sent by the Internet server to the client.
  • the proxy device After obtaining the first direction starting sequence number, the first direction answering sequence number, and the second direction starting sequence number, the proxy device receives the first data sent by the first device to the second device, and the first direction response sequence The number is updated to the end number of the first data plus one.
  • the proxy device after receiving the first data sent by the first device to the second device , the received first data can be cached locally.
  • the proxy device sends a first acknowledgement response to the first device according to the updated first direction response sequence number and the second direction start sequence number.
  • the proxy second device After the proxy device receives the first data sent by the first device to the second device, the proxy second device sends an acknowledgement response to the first device, and the acknowledgement response here is referred to as a first acknowledgement response.
  • the proxy device Since there is a proxy device between the client and the Internet server, the proxy device is responsible for the client and The data is cached and forwarded between the Internet servers. In the forwarding process, the proxy device divides the data transmission between the client and the Internet server into two processes, one is a process between the proxy device and the Internet server. One is the processing process between the proxy device and the client. In the above process, the proxy device also needs to return the confirmation response to the Internet server instead of the client, or return the confirmation response to the client instead of the Internet server, and the Internet server or client. An acknowledgment response is also sent to the proxy device. Since the confirmation response is the first data described in the interaction between the proxy device and the client or the second data involved later.
  • the proxy device forwards the first data to the second device, and updates the first direction starting sequence number to the first direction response sequence number.
  • the first direction response sequence number in step 204 refers to the first direction response sequence number before the update.
  • the proxy device completes forwarding of the data sent by the first device to the second device.
  • the data transmission method provided in this embodiment further includes:
  • the proxy device acquires a second direction response sequence number corresponding to the second direction, where the second direction response sequence number is a termination sequence number corresponding to the termination data in the second direction, and the second The termination data of the direction is the last data that was last cached in the proxy device and transmitted in the second direction.
  • the proxy device receives second data that is sent by the second device to the first device in the second direction, and updates the second direction response serial number to a termination number of the second data. plus 1.
  • the second data may be uplink data sent by the client to the Internet server; or the second data may be downlink data sent by the Internet server to the client.
  • the proxy device sends a second acknowledgement response to the second device according to the updated second direction response sequence number and the first direction start sequence number.
  • the proxy device forwards the second data to the first device, and updates the second direction starting sequence number to the second direction response sequence number.
  • the second direction response sequence number in step 208 refers to the second direction response sequence number before the update.
  • the proxy device receives the first data sent by the first device to the second device, and returns the first acknowledgement response to the first device instead of the second device, and receives the second device to send to the first device.
  • the second data returns an acknowledgement response to the second device, the acknowledgement response herein is referred to as a second acknowledgement response, and the second data is forwarded to the first device.
  • the process in which the proxy device receives and forwards the second data to the first device, and the process of receiving and forwarding the first data to the second device is a separate process.
  • the first device may not return an acknowledgement response to the proxy device.
  • the first device after receiving the second data sent by the proxy device, the first device returns an acknowledgement response to the proxy device, where the acknowledgement response is referred to as a third acknowledgement response.
  • the start sequence number in the third acknowledgement response is the first direction response sequence number
  • the response sequence number in the third acknowledgement response is the second direction start sequence number plus the length of the second data, that is, the updated second number.
  • Direction starting sequence number is the first direction response sequence number
  • the data transmission method provided in this embodiment may further include:
  • the proxy device needs to determine that the response sequence number in the second data is different from the second direction response sequence number before adding the second direction response sequence number to the termination number of the second data plus one.
  • the proxy device determines that the response sequence number in the second data is different from the second direction response sequence number, and includes:
  • the proxy device Determining, by the proxy device, whether the first data is cached locally (the first data herein refers to data that the first device needs to send to the second device); if the determination result is yes, determining the response in the second data The serial number is not the same as the second direction response serial number.
  • the data transmission method provided in this embodiment further includes:
  • the proxy device records the response sequence number in the first acknowledgement response. Based on this, the proxy device determines that the response sequence number in the second data is different from the second direction response sequence number, and includes:
  • the proxy device acquires a first direction start sequence number corresponding to the first direction, a first direction response sequence number, and a second direction start sequence number and a second direction corresponding to the second direction.
  • the way you reply to the serial number will vary.
  • the proxy device is the current and initially attached network side device of the first device, and the first device establishes a TCP connection with the second device through the proxy device, and the proxy device can record the TCP connection.
  • the process refers to a process in which a first device establishes a TCP connection with a second device through the proxy device.
  • the parameters recorded by the proxy device include, but are not limited to, the source IP address and the destination IP address corresponding to the TCP connection, and the starting sequence number of the data sent by the first device to the second device during the TCP connection establishment process, and the TCP connection establishment process The start sequence number of the data sent by the second device to the first device, the response sequence number of the first device in response to the second device transmitting data during the TCP connection establishment process, and the response sequence of the second device responding to the data sent by the first device during the TCP connection establishment process number.
  • the network side device initially attached by the client is the source network side device
  • the proxy device is the network side device attached after the client switchover, where the client can serve as the first device, and the second device
  • the Internet server, or the client can act as the second device
  • the Internet server is the first device.
  • the source network side device is the network side device to which the client is attached before the switching occurs
  • the proxy device is the client after the switching occurs.
  • the network side device to which the terminal is attached.
  • the source network side device sends the downlink data that is cached on the source network side device and sent by the Internet server to the client.
  • the source network side device caches downlink data sent by the Internet server to the client and has not been sent to the client before the switchover occurs.
  • the proxy device receives the source network side device forwarded and caches the source network side.
  • the proxy device may obtain the first direction starting sequence number and the first direction response sequence from the received downlink data. Number, second direction starting sequence number and second direction answering sequence number. That is, in the application scenario, the proxy device acquires a first direction start sequence number corresponding to the first direction, a first direction response sequence number, a second direction start sequence number corresponding to the second direction, and a second direction response sequence.
  • the number includes: when the client switches from the source network side device to the proxy device, the proxy device receives the Internet server that is forwarded by the source network side device and is cached in the source network side device Obtaining, by the third data sent by the client, the first direction starting sequence number, the first direction answering sequence number, and the second, from the third data forwarded by the source network side device a direction start sequence number and a termination sequence number of the second direction, where the source network side device is a network side device to which the client is attached before the handover occurs, and the proxy device is after the handover occurs.
  • the network side device to which the client is attached.
  • the source network side device may have a TCP proxy function or may not have a TCP proxy function; if the source network side device has a TCP proxy function, the source network side device may start the TCP proxy function. It is also possible to disable the TCP proxy function.
  • the TCP proxy function includes, but is not limited to, the following functions: receiving downlink data sent by the Internet server to the client, and after receiving the downlink data sent by the Internet server to the client, according to the received downlink data, the Internet server The response sequence number corresponding to the termination data sent to the client is updated to the termination sequence number of the received downlink data plus 1, and according to the updated response sequence number and the start corresponding to the start data sent by the client to the Internet server.
  • the serial number sends an acknowledgement response to the Internet server, forwards the received downlink data to the client, and updates the start sequence number corresponding to the start data sent by the Internet server to the client to the termination sequence number of the received downlink data plus 1 (ie The above updated response serial number).
  • the terminating sequence number of the received downlink data refers to the sequence number of the last byte in the downlink data.
  • the TCP proxy function includes, but is not limited to, the following functions: receiving first data sent by the first device to the second device in the first direction, and responding by using the first direction Updating the serial number to the termination number of the first data plus 1, and sending a first confirmation response to the first device according to the updated first direction response sequence number and the second direction start sequence number, Transmitting the first data to the second device, and updating the first direction starting sequence number to the first direction response sequence number.
  • the source network side device may obtain the first information on the proxy device in addition to forwarding the downlink data that has not been sent to the client to the proxy device.
  • the source network side device may obtain the first information on the proxy device in addition to forwarding the downlink data that has not been sent to the client to the proxy device.
  • sending a first boot agent indication to the proxy device the first boot agent The indication is used to instruct the proxy device to initiate the TCP proxy function.
  • the proxy device further receives the source network after acquiring the first direction starting sequence number, the first direction answering sequence number, and the second direction starting sequence number, and before receiving the first data sent by the Internet server to the client.
  • the first boot agent indication sent by the side device, and the TCP proxy function is started according to the first boot agent indication.
  • the proxy device may also be based on the QoS Class Identifier (QCI) corresponding to the TCP connection between the client and the Internet server.
  • QCI QoS Class Identifier
  • the proxy device determines the start of the TCP proxy function, for example, the proxy device only provides TCP proxy function for the TCP connection in the bearer of some QCI level, then the QCI level of the TCP connection between the client and the Internet server meets the start TCP
  • the proxy device determines to start the TCP proxy function.
  • the proxy device can directly activate the TCP proxy function, that is, the proxy device does not obtain an explicit indication of the startup TCP proxy from the source network side device, and does not need to view parameters such as QCI, and can switch to the client of the network where the proxy device is located.
  • the TCP proxy function is started immediately and unconditionally.
  • the data transmission method provided in this embodiment may further include:
  • the proxy device sends, to the client, the Internet server that is sent to the target network device and is still cached by the proxy device. Downstream data, so that the target network side device continues to forward the received downlink data to the client; wherein the proxy device is a network side device to which the client is attached before the handover occurs, and the target network The side device is a network side device to which the client is attached after the switchover occurs.
  • the TCP connection between the client and the Internet server can be established through the proxy device, and the client switches from the proxy device to the target network side device.
  • the target network side device may have a TCP proxy function or may not have a TCP proxy function. If the target network side device has a TCP proxy function, the target network side device may enable the TCP proxy function. The TCP proxy function may not be enabled. If the target network side device has the TCP proxy function enabled, the target network side device forwards the received downlink data after receiving the downlink data sent by the Internet server forwarded by the proxy device to the client, and the proxy device in this embodiment. The process of forwarding the first data or the second data is the same and will not be described here.
  • the target network side device can serve as the relay device, directly forward the received downlink data, and forward the client to the received downlink. A confirmation response returned by the data.
  • the proxy device may forward all the buffered uplink data to the Internet server before the handover occurs.
  • the process of forwarding the uplink data to the Internet server before the proxy device is switched. For details, refer to the process of forwarding the first data or the second data by the proxy device. I will not repeat them here.
  • the target network side device may be configured to have a TCP proxy function. For example, when the proxy device switches from the proxy device to the target network side device, the proxy device sends the cache to the target network side device.
  • the proxy device, and the downlink data sent by the Internet server to the client, may also send a second startup proxy indication to the target network side device, where the second startup proxy indication is used to indicate that the target network side device starts the TCP proxy function.
  • the proxy device in this embodiment maintains the first direction start sequence number, the first direction response sequence number, and the second direction start sequence corresponding to the second direction in the first direction; each time the proxy device receives a data or The first direction response sequence number and the second direction start sequence number corresponding to the second direction are updated each time a data packet is transmitted. Specifically, the proxy device receives the first data that is sent by the first device to the second device in the first direction, and updates a first direction response sequence number; the proxy device uses the first data. Forwarding to the second device, updating the first direction starting sequence number.
  • the proxy device further maintains a second direction response sequence number in the second direction, and the proxy device receives the second data that is sent by the second device to the first device in the second direction, and updates the The second direction acknowledges the sequence number, and the proxy device forwards the second data to the second device, and updates the second direction start sequence number.
  • a TCP connection is established between the client and the Internet server, the proxy device and the client interact wirelessly, and the proxy device interacts with the Internet server through a wired manner, and the proxy device acquires the client to send data to the Internet server.
  • the starting sequence number in the direction in which the client sends data to the Internet server and forwards the data sent by the Internet server to the client to the client or the client according to the obtained starting serial number and the response serial number in the corresponding direction.
  • FIG. 3 is a flowchart of still another data transmission method according to an embodiment of the present invention. As shown in FIG. 3, the method in this embodiment includes:
  • the client establishes a TCP connection with the Internet server through the proxy device, and the proxy device records the parameters in the process of establishing the TCP connection.
  • the TCP connection setup requires a three-way handshake process. Specifically, the client first sends a synchronization (SYN) request to the Internet server, randomly generates an initial sequence number m, sets the first response sequence number to 0, and the synchronization request occupies 1 byte.
  • the Internet server sends a synchronization acknowledgment (SYN ACK) response after receiving the synchronization request sent by the client, and the synchronization acknowledgment response also occupies 1 byte.
  • the Internet server randomly generates an initial sequence number n. Since the synchronization request already occupies 1 byte, the response sequence number in the synchronization confirmation response of the Internet server is set to m+1, which means that the data with the sequence number m has been successfully received. , I hope to receive the next byte.
  • the client answers the Internet server to complete the establishment of the TCP connection, which carries zero bytes of data.
  • the client has sent 1 byte of data to the Internet server, so the starting sequence number in the response is m+1.
  • the Internet server has sent 1 byte of data to the client.
  • the response sequence number is n+1, that is, the Internet server is notified that the serial number n data has been received, and it is desirable to receive the next data.
  • the three-way handshake process passes through the entity of the proxy device, and the proxy device records parameters in the process of establishing the TCP connection, such as the source IP address of the TCP connection (ie, the IP address of the client) and the destination IP address (ie, The IP address of the Internet server), the first direction start sequence number m, the first direction response sequence number 0, the second direction start sequence number n, and the second direction response sequence number m+1, and will answer the Internet at the client.
  • the server completes the response message for establishing the TCP connection, the first direction start sequence number m is updated to m+1, and the first direction response sequence number 0 is updated to n+1.
  • the proxy device only acts as a relay.
  • the proxy device After establishing a TCP connection between the client and the Internet server, the proxy device starts the TCP proxy function.
  • the TCP proxy function includes two parts, one part is that the proxy internet server maintains a TCP connection with the client, that is, the data sent by the proxy internet server to the client or receives data from the client, is sent or received. Keep the IP address of the Internet server, the TCP port number, and the starting sequence number and response sequence of the Internet server sending or receiving data during the process.
  • the other part is that the proxy client maintains a TCP connection with the Internet server, that is, the data sent by the proxy client to the Internet server or receives data from the Internet server, and maintains the client's IP address, TCP during transmission or reception.
  • the TCP proxy function of the proxy device is transparent to the client and the Internet server.
  • the TCP proxy function of this embodiment is initiated after a TCP connection is established between the client and the Internet server, and a separate TCP connection is not established between the client and the Internet server and the proxy device, in order to distinguish it from the prior art.
  • the proxy technology in the prior art can be referred to as the pre-TCP proxy technology
  • the proxy technology in this embodiment is referred to as the post-TCP proxy technology.
  • the Internet server sends the downlink data sent to the client to the proxy device.
  • the Internet server sends k bytes of downstream data to the client.
  • the proxy device caches the downlink data sent by the Internet server, and replaces the client to acknowledge the received downlink data according to the recorded parameters.
  • the proxy device receives the k-byte downlink data from the Internet server, buffers the k-byte downlink data, and sends an acknowledgement response to the Internet server, the acknowledgement response occupying zero bytes.
  • the proxy device receives k bytes of downlink data, the initial sequence number of the downlink data is n+1, and the response sequence number of the downlink data is m+1; then the initial sequence number in the acknowledgement response sent by the proxy device to the Internet server is set. For m+1, set its response sequence number to n+k+1, instead of the client notifying the Internet server that it has successfully received the k-byte data, and hopes to receive subsequent downlink data, and the proxy device will maintain the second direction.
  • the starting sequence number is n
  • the second direction response sequence number m+1 is updated to n+k+1.
  • the proxy device may perform an acknowledgement response every time a downlink data is received, or may perform an acknowledgement response after receiving multiple downlink data.
  • the proxy device Since the wireless air interface rate between the proxy device and the client may be smaller than the fixed network rate between the proxy device and the Internet server, network congestion may occur, and the proxy device in this embodiment caches the downlink data sent to the client by the Internet server. , is conducive to solving the problem of network congestion.
  • the proxy device sends the buffered downlink data to the client according to the recorded parameters. During the process of sending the buffered downlink data to the client, the proxy device also updates the recorded second direction starting sequence number n, and updates the second direction starting sequence number n to the sent downlink number. According to the termination sequence number plus 1.
  • the proxy device receives an acknowledgment response from the client.
  • the proxy device tends to cache a part of the downlink data sent by the Internet server to the client, and the proxy device has sent the confirmation response of the part of the downlink data to the Internet server instead of the client, so that the Internet server continues.
  • the starting sequence number of the transmitted downlink data does not correspond to the response sequence number of the acknowledgment response of the client to the downlink data sent by the proxy device, that is, the sequence number is out of synchronization.
  • the sequence number synchronization means that the initial sequence number used by the Internet server to send downlink data is consistent with the response sequence number used by the client to answer the Internet server, and the client sends the initial sequence number used by the uplink data to the Internet server to answer the client with the Internet server.
  • the response sequence numbers used by the end are the same. However, the starting sequence number of the downlink data that the Internet server continues to deliver corresponds to the response sequence number of the acknowledgment response sent by the proxy device to the Internet server for the downlink data, that is, the serial number synchronization is maintained; The start sequence number of the downlink data sent to the client corresponds to the response sequence number of the acknowledgment response of the client to the downlink data sent by the proxy device, that is, the sequence number is kept synchronized.
  • the proxy device After the proxy device delivers the buffered downlink data to the client, the downlink data sent by the Internet server is the same as the downlink data received by the client. At this time, the client restores the initial sequence number of the received row data. Relationship, that is, recovery of serial number synchronization between the client and the Internet server.
  • the wireless air interface rate between the proxy device and the client may be smaller than the fixed network rate between the proxy device and the Internet server, in addition, in some deployment situations or in some special
  • the wireless air interface rate between the proxy device and the client is greater than the fixed network rate between the proxy device and the Internet server.
  • the proxy device also needs to cache the upstream data sent by the client to the Internet server. Since the proxy device may cache some downlink data sent by the Internet server to the client, this may cause the client to send the uplink data using the response sequence number and the Internet server to send the downlink data starting sequence number temporarily out of step.
  • FIG. 4 is a flowchart of still another data transmission method according to an embodiment of the present invention. As shown in FIG. 4, the method in this embodiment includes:
  • the client establishes a TCP connection with the Internet server through the proxy device, and the proxy device records the parameters in the process of establishing the TCP connection.
  • the proxy device After establishing a TCP connection between the client and the Internet server, the proxy device starts the TCP proxy function.
  • steps 4a and 4b can be referred to steps 3a and 3b, and will not be described again.
  • the client sends the uplink data sent to the Internet server to the proxy device.
  • the proxy device determines whether the response sequence number in the uplink data sent by the client is the same as the second response sequence number. If not, the response sequence number in the uplink data sent by the client is modified to be the second response sequence number.
  • the second response sequence number refers to the termination sequence number of the last downlink data sent by the Internet server plus one, and the termination sequence number of the last downlink data may be reduced by the start sequence number of the last downlink data plus the length of the last downlink data. obtain.
  • the proxy device determines whether the response sequence number in the uplink data sent by the client is the same as the second response sequence number. For example, one method is: checking whether the proxy device locally caches the downlink data sent by the Internet server. If the downlink data is buffered, it may be determined that the response sequence number in the uplink data sent by the client is different from the second response sequence number. Another method is: checking whether the response sequence number in the acknowledgement response of the proxy device recorded by the proxy device for the last downlink data is consistent with the response sequence number in the uplink data sent by the client; if the sequence numbers are inconsistent, the client may be determined. The response sequence number in the transmitted uplink data is different from the second response sequence number.
  • the proxy device can directly forward the uplink data sent by the client to the Internet server without modification.
  • the proxy device sends the uplink data sent by the client or the uplink data of the modified response sequence number to the Internet server.
  • Figure 5 is an illustration of the embodiment of Figure 4.
  • the UESN indicates the starting sequence number of the uplink data sent by the client, and the starting sequence number of the client automatically increases by 1 for each uplink data of 1 byte;
  • the SrSN indicates that the Internet server sends the downlink data to the client.
  • the starting serial number, the initial serial number of the Internet server is automatically incremented by 1 for every 1 byte of downlink data sent.
  • the initial sequence number of the first downlink data sent by the Internet server to the client is Y, and the termination number is Y+al; the starting sequence number of the second downlink data is ⁇ +al+l, terminating The serial number is Y+a2; and so on, the starting sequence number of the last downlink data is Y+a6+l, and the ending sequence number is Y+a7.
  • the termination sequence number is the start sequence number added to the downlink data length minus 1.
  • the client after receiving the downlink data whose starting sequence number is Y+a4+1 (that is, the downlink data whose termination sequence number is Y+a5), the client sends a length of k bytes to the proxy device. Upstream data. At this time, the client does not receive the downlink data with the starting sequence number of Y+a5+l, Y+a6+l, so the client considers that the starting serial number of the Internet server side is Y+ a 5+l, in the Internet.
  • the server When the server sends the uplink data, it will respond to the downlink data of the starting sequence number Y+a4+l, that is, it carries the response sequence number Y+a5+l in the uplink data; and the Internet server has received the proxy device pair start.
  • the serial number is Y+a5+l, Y+a6+l, so the initial serial number considered by the Internet server has been updated to Y+a7+l. It can be seen that the client considers the start of the Internet server side. The serial number does not correspond to the starting sequence number considered by the Internet server side. Therefore, after receiving the uplink data sent by the client, the proxy device needs to modify the response sequence number Y+a5+l in the uplink data to Y+a7. +l.
  • the client may switch from the source network to the target network.
  • the network side device to which the client is attached in the source network is referred to as the source network side device
  • the network side device to which the client is attached in the target network is referred to as the target network side device.
  • the client switches from the source network to the target network, including the following four scenarios: 1) The source network side device supports and starts the TCP proxy function, and the target network side device supports and starts the TCP proxy function; 2) The network side device supports but does not enable the TCP proxy function. The target network side device supports and starts the TCP proxy function.
  • the source network side device supports and starts the TCP proxy function, and the target network side device does not support the TCP proxy function or is supported but Did not start TCP proxy function; 4) Dynamic TCP proxy function.
  • the embodiment of the present invention only focuses on the first three scenarios. The handover procedure based on the TCP proxy function will be described below through specific embodiments.
  • FIG. 6 is a flowchart of still another data transmission method according to an embodiment of the present invention. As shown in FIG. 6, the method in this embodiment includes:
  • An end-to-end TCP connection is established between the client and the Internet server, and the data is transmitted through the TCP connection.
  • the Internet server sends downlink data to the client as an example.
  • the source network side device may support and start the TCP proxy function, or may not support the TCP proxy function or support but does not enable the TCP proxy function. If the source network side device supports and starts the TCP proxy function, the source network side device can forward the data between the Internet server and the client according to the related processes in the embodiment shown in FIG. 1 to FIG. 3, and details are not described herein. If the source network side device does not support or support but does not enable the TCP proxy function, the source network side device can be responsible for data transmission between the Internet server and the client as in the prior art. In either case, the source network side device can cache data between the client and the Internet server.
  • the client negotiates with the source network side device to determine to switch to the target network side device.
  • the source network side device provides downlink data sent by the cached Internet server to the client to the target network side device.
  • the source network side device may not support the TCP proxy function, or support but does not enable the TCP proxy function. At this time, the source network side device may forward only the buffered downlink data to the target network side device.
  • the source network side device may also support and start the TCP proxy function, and the source network side device may forward only the buffered downlink data to the target network side device, or forward the buffered downlink data to the target network side device, and The target network side device sends a startup proxy indication to indicate that the target network side device starts the TCP proxy function.
  • the source network side device may send the buffered downlink data and the startup proxy indication to the target network side device by using a separate step, or the source network side device may send the cached downlink to the target network side device by using the same step. Data and start agent instructions.
  • the target network side device determines whether to enable the TCP proxy function.
  • the downlink data provided by the source network side device carries information such as a source IP address, a destination IP address, a source port number, a destination port number, a start sequence number, and a response sequence number, so that the target network side device can forward according to the source network side device.
  • Downstream data obtain the IP address and port number of the client, the IP address and port number of the Internet server, the starting sequence number of the data sent by the client, and the starting sequence number of the data sent by the Internet server.
  • the target network side device may determine to start the TCP proxy function according to the startup proxy indication sent by the source network side device.
  • the target network side device may determine to start the TCP proxy function according to parameters such as QCI corresponding to the TCP connection between the client and the Internet server.
  • the target network side device can learn parameters such as QCI corresponding to the TCP connection between the client and the Internet server.
  • the target network side device forwards the downlink data sent by the Internet server to the client to the client.
  • the client may send the IP address and port number of the client, the IP address and the port number of the Internet server according to the downlink data forwarded from the source network side device, and the client sends The starting sequence number of the data, the starting serial number of the data sent by the Internet server, and the like, forward the downlink data sent by the Internet server to the client to the client according to the related procedure in the embodiment shown in FIG. 2A to FIG.
  • the target network side device does not start the TCP proxy function
  • the downlink data sent by the Internet server to the client may be forwarded to the client through a TCP connection between the client and the Internet server; in the process, the target network side device only starts The role of the relay.
  • the client sends an acknowledgement response to the target network side device.
  • the target network side device Since the source network side device may activate the TCP proxy function, and the acknowledgment response has been sent to the Internet server in place of the downlink data forwarded to the target network side device by the client, the target network side device does not need to send the acknowledgment response to the Internet server again.
  • the target network side device continues to receive downlink data sent by the Internet server, and forwards the received downlink data to the client.
  • the target network side device starts the TCP proxy function
  • the downlink data sent by the Internet server can be forwarded to the client according to the process in the embodiment shown in FIG. 2A-4. And in place of the client to confirm to the Internet server.
  • the source network side device supports and starts the TCP proxy function
  • it can be implemented as a proxy device in the source network where the client is located in the foregoing embodiment
  • the target network side device supports and starts the TCP proxy function
  • it can be used as The proxy device in the target network where the client is located in the above embodiment is implemented.
  • the data transmission method provided by the embodiment of the present invention because the TCP connection is established between the client and the Internet server, and the proxy device interacts with the client wirelessly, the proxy device interacts with the Internet server through a wired manner, and the proxy device is based on the client. Between the end and the Internet server
  • the TCP connection implements the TCP proxy function, and there is no need to establish an independent TCP connection between the proxy device and the client and between the proxy device and the Internet server. Therefore, when the client switches over the network due to mobility, the client and the Internet server The TCP connection between the two ends is not interrupted, and the TCP connection does not need to be re-established, which solves the problem that the TCP connection between the client and the proxy device and the Internet server and the proxy device needs to be re-established due to the mobility of the client in the prior art.
  • a technique different from the prior art and still transmitting data through a proxy device is provided.
  • FIG. 7 is a schematic structural diagram of a proxy device according to an embodiment of the present invention. As shown in FIG. 7, the proxy device includes: an obtaining module 71, a receiving module 72, an updating module 73, and a sending module 74.
  • the obtaining module 71 is configured to acquire a first direction starting sequence number corresponding to the first direction, a first direction response sequence number, and a second direction starting sequence number corresponding to the second direction, where the first device and the second device Establishing a connection of the Transmission Control Protocol (TCP), the first device is a client, the second device is an Internet server, or the first device is an Internet server, and the second device is a client; The device interacts with the client in a wireless manner, and the proxy device interacts with the Internet server through a wired manner;
  • TCP Transmission Control Protocol
  • the first direction is a direction in which the first device sends data to the second device
  • the second direction is a direction in which the second device sends data to the first device
  • the first direction starting sequence number is a starting sequence number corresponding to the starting data of the first direction, and the starting data of the first direction is cached in the proxy device last time, and in the The first data transmitted in the first direction;
  • the first direction response sequence number is a termination sequence number corresponding to the termination data in the first direction, and the termination data in the first direction is cached in the proxy device last time, and in the The last data transmitted in the first direction;
  • the second direction starting sequence number is a starting sequence number corresponding to the starting data in the second direction, and the starting data in the second direction is the last time cached in the proxy device, and in the The first data transmitted in the second direction.
  • the receiving module 72 is connected to the obtaining module 71, and configured to receive the first direction start sequence number, the first direction response sequence number, and the second direction start sequence number after the obtaining module 71 acquires the first direction start sequence number, the first direction start sequence number, and the second direction start sequence number.
  • the first data may be uplink data sent by the client to the Internet server, or may be downlink data sent by the Internet server to the client.
  • the update module 73 is connected to the acquisition module 71 and the receiving module 72, and is configured to update the first direction response sequence number acquired by the obtaining module 71 to the termination sequence number of the first data received by the receiving module 72.
  • the sending module 74 is connected to the obtaining module 71 and the updating module 73, and configured to send, according to the first direction response serial number updated by the updating module 73 and the second direction starting sequence number acquired by the obtaining module 71, to the first device. Send the first confirmation response.
  • the sending module 74 is further connected to the receiving module 72, and is further configured to forward the first data received by the receiving module 72 to the second device.
  • the update module 73 is further configured to update the first direction start sequence number acquired by the obtaining module 71 to the first direction response sequence number.
  • the first direction response sequence number is the first direction response sequence number acquired by the acquisition module 71, instead of the updated first direction response sequence number.
  • the obtaining module 71 is further configured to acquire a second direction response sequence number corresponding to the second direction, where the second direction response sequence number is corresponding to the termination data of the second direction.
  • the termination sequence number is incremented by 1, and the termination data in the second direction is the last data that was last cached in the proxy device and in the second direction.
  • the receiving module 72 is further configured to: after the obtaining module 71 acquires the second direction response sequence number, receive the second data that is sent by the second device to the first device in the second direction.
  • the update module 73 is further configured to update the second direction response sequence number acquired by the obtaining module 71 to the termination sequence number of the second data received by the receiving module 72 by one.
  • the sending module 74 is further configured to send a second acknowledgement response to the second device according to the second direction response sequence number updated by the update module 73 and the first direction start sequence number acquired by the obtaining module 71.
  • the sending module 74 is also used to The second data received by the receiving module 72 is forwarded to the first device.
  • the update module 73 is further configured to update the second direction start sequence number acquired by the obtaining module 71 to the second direction response sequence number.
  • the second direction response sequence number here is the second direction response sequence number acquired by the obtaining module 71, instead of the updated second direction response sequence number.
  • the proxy device further includes: a determining module 75.
  • the judgment module
  • the updating module 73 is configured to update the second direction response sequence number acquired by the obtaining module 71 to the termination sequence number of the second data received by the receiving module 72, and the updating module 73 is specifically configured to determine in the determining module 75.
  • the second direction response sequence number is updated to be the termination number of the second data plus one.
  • the judging module 75 is connected to the receiving module 72, the obtaining module 71, and the updating module 73.
  • the determining module 75 is specifically configured to: determine whether the first data is cached locally, and if the determination result is yes, determine that the response sequence number in the second data is different from the second direction response sequence number. .
  • the proxy device further includes: a recording module 76.
  • the recording module 76 is configured to record the response sequence number in the first confirmation response.
  • the determining module 75 is specifically configured to: if it is determined that the response sequence number in the first confirmation response recorded by the recording module 76 is different from the response sequence number in the second data received by the receiving module 72, determine the second The response sequence number in the data is different from the second direction response sequence number.
  • the judging module 75 is also connected to the recording module 76.
  • the obtaining module 71 is specifically configured to: record a parameter in a TCP connection establishment process, and obtain, in the recorded parameter, the first direction starting sequence number, the first direction response sequence number, The second direction start sequence number and the second direction reply sequence number;
  • the TCP connection establishment process refers to a process in which the client establishes the TCP connection with the Internet server through the proxy device.
  • the client establishes a TCP connection with the Internet server through the proxy device.
  • the obtaining module 71 is specifically configured to: obtain, by the receiving module 72, the first direction start in the received downlink data when the client switches from the source network side device to the proxy device. a sequence number, the first direction response sequence number, the second direction start sequence number, and the second direction response sequence number, where the downlink data is sent by the Internet server to the client, And being forwarded by the source network side device and cached in the source network side
  • the receiving module 72 is further configured to: when the client switches from the source network side device to the proxy device, receive the foregoing that is forwarded by the source network side device and cached in the source network side device The downlink data sent by the Internet server to the client is provided to the obtaining module 71.
  • the sending module 74 is further configured to: when the client switches from the proxy device to the target network device, send, to the target network device, a cache that is still cached by the proxy device. And the downlink data sent by the Internet server to the client, so that the target network side device continues to forward the received downlink data to the client; where the proxy device is the client before the handover occurs.
  • the attached network side device where the target network side device is a network side device to which the client is attached after the handover occurs.
  • the function modules of the proxy device provided in this embodiment can be used to perform the process in the embodiment of the method shown in FIG. 2A to FIG. 6.
  • the specific working principle is not described here. For details, refer to the description of the method embodiment.
  • the proxy device provided in this embodiment interacts with the client in a wireless manner, and interacts with the Internet server through a wired manner, and the client establishes a TCP connection with the Internet server.
  • the proxy device in this embodiment acquires the client to the Internet server.
  • the starting sequence number and the answering sequence number of the sending data and the starting sequence number of the data sent by the Internet server to the client, or obtaining the starting sequence number and the answering sequence number of the data sent by the Internet server to the client, and the client sending the data to the Internet server The starting sequence number of the data, and forwarding the data sent by the Internet server to the client to the client or forwarding the data sent by the client to the Internet server to the Internet server according to the obtained starting sequence number and the response sequence number, and Updating the corresponding start sequence number and response sequence number to implement forwarding of data between the Internet server and the client.
  • the TCP connection between the client and the Internet server does not involve the interruption and re-establishment of the TCP connection caused by the mobility of the client during the data transmission process, so the data transmission will not cause an interruption, and will not Affect the quality of service of wireless networks.
  • FIG. 9 is a schematic structural diagram of still another proxy device according to an embodiment of the present invention.
  • the proxy device includes: a processor 91, a receiver 92, and a transmitter 93.
  • the processor 91 is configured to acquire a first direction start sequence number corresponding to the first direction, a first direction response sequence number, and a second direction start sequence number corresponding to the second direction, where the first device and the second device
  • the connection is established between the backup control protocol TCP, the first device is a client, the second device is an Internet server, or the first device is an Internet server, and the second device is a client;
  • the proxy device interacts with the client in a wireless manner, and the proxy device interacts with the Internet server through a wired manner;
  • the first direction is a direction in which the first device sends data to the second device
  • the second direction is a direction in which the second device sends data to the first device
  • the first direction starting sequence number is a starting sequence number corresponding to the starting data of the first direction, and the starting data of the first direction is cached in the proxy device last time, and in the The first data transmitted in the first direction;
  • the first direction response sequence number is a termination sequence number corresponding to the termination data in the first direction, and the termination data in the first direction is cached in the proxy device last time, and is in the first The last data transmitted in the direction;
  • the second direction starting sequence number is a starting sequence number corresponding to the starting data in the second direction, and the starting data in the second direction is the last time cached in the proxy device, and in the The first data transmitted in the second direction.
  • the receiver 92 is configured to receive first data that is sent by the first device to the second device in the first direction.
  • the processor 91 is further configured to update the first direction response sequence number to a termination sequence number of the first data received by the receiver by one.
  • a transmitter 93 configured to respond to the sequence number and processor in the first direction after the processor 91 is updated
  • the second direction starting sequence number obtained by the 91 sends a first acknowledgement response to the first device.
  • the transmitter 93 is further configured to forward the first data received by the receiver 92 to the second device.
  • the processor 91 is further configured to update the first direction start sequence number to the first direction response sequence number.
  • the first direction response sequence number is the first direction response sequence number acquired by the processor 91, instead of the updated first direction response sequence number.
  • the processor 91 is further configured to obtain a second direction response sequence number corresponding to the second direction, where the second direction response sequence number is a termination sequence number corresponding to the termination data in the second direction,
  • the termination data of the second direction is the last data that was last cached in the proxy device and in the second direction.
  • the receiver 92 is further configured to: after the processor 91 acquires the second direction response sequence number, receive the second device to send to the second direction in the second direction.
  • the second data of the first device is further configured to update the second direction response sequence number to a termination number of the second data plus one.
  • the transmitter 93 is further configured to send a second acknowledgement response to the second device according to the updated second direction response sequence number and the first direction start sequence number of the processor 91.
  • the transmitter 93 is further configured to forward the second data received by the receiver 92 to the first device.
  • the processor 91 is further configured to update the second direction starting sequence number to the second direction response sequence number.
  • the second direction response sequence number here is the second direction response sequence number acquired by the processor 91, instead of the updated second direction response sequence number.
  • the processor 91 is further configured to determine whether the response sequence number in the second data is the same as the second direction response sequence number.
  • the processor 91 is configured to update the second direction response sequence number to the termination sequence number of the second data, and the method includes: the processor 91 is specifically configured to determine the response sequence number in the second data, and the When the second direction response sequence numbers are different, the second direction response sequence number is updated to the termination number of the second data plus one.
  • the processor 91 is specifically configured to: determine whether the first data is cached locally, and if the determination result is yes, determine that the response sequence number in the second data is different from the second direction response sequence number. And updating the second direction response sequence number to the termination number of the second data plus one.
  • the processor 92 is further configured to record the response sequence number in the first acknowledgement response after the transmitter 93 sends the first determination response. Based on this, the processor 92 is specifically configured to: determine, if the response sequence number in the first acknowledgement response of the record is different from the response sequence number in the second data, determine the response in the second data The serial number is not the same as the second direction response serial number.
  • the processor 91 is configured to obtain a first direction start sequence number, a first direction response sequence number, a second direction start sequence number, and a second direction response sequence number, where: the processor 91 is specifically The method may be configured to record a parameter in a TCP connection establishment process, and obtain, in the recorded parameter, the first direction start sequence number, the first direction response sequence number, the second direction start sequence number, and the first The two-way response sequence number; the TCP connection establishment process refers to a process in which the client establishes the TCP connection with the Internet server through the proxy device. In this embodiment, the client establishes a TCP connection with the Internet server through the proxy device.
  • the processor 91 is configured to obtain a first direction start sequence number, a first direction response sequence number, a second direction start sequence number, and a second direction response sequence number, where: the processor 91 is specifically Can be used to switch from the receiver 92 at the client from the source network side device to the proxy device Obtaining, in the received downlink data, the first direction starting sequence number, the first direction response sequence number, the second direction starting sequence number, and the second direction response sequence number,
  • the downlink data is downlink data that is sent by the source network side device and is sent to the client by the Internet server that is cached by the source network side device, where the source network side device is before the switchover occurs.
  • the network side device to which the client is attached where the proxy device is a network side device to which the client is attached after the handover occurs.
  • the receiver 92 is further configured to: when the client switches from the source network side device to the proxy device, receive the Internet server that is forwarded by the source network side device and cached in the source network side device.
  • the downlink data sent by the client is provided to the processor 91.
  • the transmitter 92 is further configured to: when the client switches from the proxy device to the target network side device, send, to the target network side device, the cached device to the proxy device, and the Internet server Determining the downlink data sent by the client, so that the target network side device continues to forward the received downlink data to the client; where the proxy device is a network side device to which the client is attached before the handover occurs.
  • the target network side device is a network side device to which the client is attached after the handover occurs.
  • the proxy device further includes: a memory 94.
  • the memory 94 is used to store programs.
  • the program can include program code, the program code including computer operating instructions.
  • Memory 94 may include high speed RAM memory and may also include non-volatile memory, such as at least one disk storage device.
  • the processor 91, the receiver 92, the transmitter 93, and the memory 94 may be connected to each other through a bus and complete each other. Communication between.
  • the bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus, or an Extended Industry Standard Architecture (EISA). Bus, etc.
  • ISA Industry Standard Architecture
  • PCI Peripheral Component
  • EISA Extended Industry Standard Architecture
  • the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 9, but it does not mean that there is only one bus or one type of bus.
  • the processor 91, the receiver 92, the transmitter 93, and the memory 94 may pass through an internal interface. Complete the same communication.
  • the proxy device provided in this embodiment can be used to execute the flow in the method embodiment shown in FIG. 2A-6
  • the specific working principle of the process is not described here. For details, please refer to the description of the method embodiment.
  • the proxy device provided in this embodiment interacts with the client in a wireless manner, and interacts with the Internet server through a wired manner, and the client establishes a TCP connection with the Internet server.
  • the proxy device in this embodiment acquires the client to the Internet server.
  • the serial number and the starting sequence number in the direction in which the client sends data to the Internet server and forwards the data sent by the Internet server to the client to the client according to the obtained starting serial number and the response serial number in the corresponding direction.
  • An embodiment of the present invention provides a data transmission system, including: a first device, a second device, and a proxy device shown in FIG. 7 or FIG. 8.
  • the first device may be a client
  • the second device may be an Internet server
  • the first device may be an Internet server
  • the second device may be a client.
  • the data transmission system provided by this embodiment also does not affect the quality of service of the wireless network.
  • the method includes the steps of the foregoing method embodiments; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明实施例提供一种数据传输方法、系统及代理设备。传输方法包括:客户端与互联网服务器之间建立TCP的连接,代理设备与客户端通过无线方式交互,代理设备与互联网服务器之间通过有线方式交互,代理设备获取相应方向的起始序列号和应答序列号,并基于此完成客户端与互联网服务器之间数据的转发,且不需要分别与客户端和互联网服务器建立独立的TCP连接,不会影响无线网络的服务质量。

Description

数据传输方法、 系统及代理设备
技术领域
本发明实施例涉及通信技术, 尤其涉及一种数据传输方法、 系统及代理 设备。 背景技术
客户端通过移动通信网络与互联网服务器建立传输控制协议 ( Transmission Control Protocol, 简称为 TCP )连接。 其中, 客户端与移动通 信网络之间是通过无线链路连接的, 而移动通信网络与互联网服务器之间一 般通过有线网络连接。 由于无线链路的时变特性明显, 客户端与移动通信网 络之间的数据传输速率、 丟包率等随时间变化较为剧烈, 此时会釆用针对有 线网络的 TCP拥塞控制方法, 调整传输策略。 但是由于无线网络与有线网络 传输特性的不同, 针对有线网络提出的 TCP拥塞控制方法不太适用于无线网 络。
针对上述问题, 现有技术提出一种网络代理技术, 将客户端与互联网服 务器之间的 TCP连接分为两部分, 一部分是客户端与网络代理之间建立的、 针对无线网络的 TCP连接, 一部分是网络代理与互联网服务器之间建立的、 针对有线网络的 TCP连接。 这样客户端到网络代理之间可以釆用适用于无线 网络的 TCP拥塞控制方法, 而在网络代理与互联网服务器之间可以釆用传统 的 TCP拥塞控制方法。 现有网络代理技术可能会降低无线网络的服务质量, 所以需要一种新的数据传输技术。 发明内容
本发明实施例提供一种数据传输方法、 系统及代理设备, 用以提供不同 于现有技术的、 且仍然通过代理设备进行数据传输的技术。
第一方面提供一种数据传输方法, 包括:
第一设备与第二设备之间建立传输控制协议 TCP的连接, 其中, 所述第 一设备为客户端, 所述第二设备为互联网服务器, 或者, 所述第一设备为互 联网服务器, 所述第二设备为客户端; 代理设备与所述客户端通过无线方式 交互, 所述代理设备与所述互联网服务器通过有线方式交互;
所述代理设备获取对应第一方向的第一方向起始序列号、 第一方向应答 序列号和对应第二方向的第二方向起始序列号, 其中,
所述第一方向为所述第一设备向所述第二设备发送数据的方向, 所述第 二方向为所述第二设备向所述第一设备发送数据的方向; 其中, 所述第一方 向起始序列号为所述第一方向的起始数据所对应的起始序号, 所述第一方向 的起始数据为上一次緩存在所述代理设备中、 且在所述第一方向上传输的第 一个数据; 所述第一方向应答序列号为所述第一方向的终止数据所对应的终 止序号加 1 , 所述第一方向的终止数据为上一次緩存在所述代理设备中、 且 在所述第一方向上传输的最后一个数据; 所述第二方向起始序列号为所述第 二方向的起始数据所对应的起始序号, 所述第二方向的起始数据为上一次緩 存在所述代理设备中、 且在所述第二方向上传输的第一个数据;
所述代理设备接收所述第一设备在所述第一方向上发送给所述第二设备 的第一数据, 将所述第一方向应答序列号更新为所述第一数据的终止序号加 1;所述代理设备根据所述更新后的第一方向应答序列号和所述第二方向起始 序列号向所述第一设备发送第一确认应答; 所述代理设备将所述第一数据转 发给所述第二设备, 并将所述第一方向起始序列号更新为所述第一方向应答 序列号。
结合第一方面, 在第一方面的第一种可能的实现方式中, 所述方法还包 括:
所述代理设备获取对应第二方向的第二方向应答序列号; 其中, 所述第 二方向应答序列号为所述第二方向的终止数据所对应的终止序号加 1 , 所述 第二方向的终止数据为上一次緩存在所述代理设备中、 且在所述第二方向上 的最后一个数据;
所述代理设备接收所述第二设备在所述第二方向上发送给所述第一设备 的第二数据, 将所述第二方向应答序列号更新为所述第二数据的终止序号加 1;所述代理设备根据所述更新后的第二方向应答序列号和所述第一方向的起 始序列号向所述第二设备发送第二确认应答; 所述代理设备将所述第二数据 转发给所述第一设备, 并将所述第二方向起始序列号更新为所述第二方向应 答序列号。
结合第一方面的第一种可能的实现方式, 在第一方面的第二种可能的实 现方式中, 所述代理设备将所述第二方向应答序列号更新为所述第二数据的 终止序号加 1之前, 还包括: 所述代理设备确定所述第二数据中的应答序列 号与所述第二方向应答序列号不相同。
结合第一方面的第二种可能的实现方式, 在第一方面的第三种可能的实 现方式中, 所述代理设备确定所述第二数据中的应答序列号与所述第二方向 应答序列号不相同, 包括: 所述代理设备判断本地是否緩存有所述第一数据, 如果判断结果为是, 确定所述第二数据中的应答序列号与所述第二方向应答 序列号不相同。
结合第一方面的第二种可能的实现方式, 在第一方面的第四种可能的实 现方式中, 所述方法还包括: 所述代理设备记录所述第一确认应答中的应答 序列号;
所述代理设备确定所述第二数据中的应答序列号与所述第二方向应答序 列号不相同, 包括: 如果所述代理设备确定出所述第一确认应答中的应答序 列号与所述第二数据中的应答序列号不相同, 则确定所述第二数据中的应答 序列号与所述第二方向应答序列号不相同。
结合第一方面的第一种可能的实现方式或第一方面的第二种可能的实现 方式或第一方面的第三种可能的实现方式或第一方面的第四种可能的实现方 式, 在第一方面的第五种可能的实现方式中, 所述代理设备获取对应第一方 向的第一方向起始序列号、 第一方向应答序列号、 对应第二方向的第二方向 起始序列号及第二方向应答序列号, 包括:
所述代理设备在所述客户端从源网络侧设备切换到所述代理设备时, 接 收下行数据, 从所述下行数据中获取所述第一方向起始序列号、 所述第一方 向应答序列号、 所述第二方向起始序列号和所述第二方向应答序列号, 其中, 所述下行数据包括源网络侧设备转发的、 且緩存于所述源网络侧设备的所述 互联网服务器向所述客户端发送的下行数据, 所述源网络侧设备是在发生切 换前所述客户端所附着的网络侧设备, 所述代理设备是发生切换后所述客户 端所附着的网络侧设备。
结合第一方面或第一方面的第一种可能的实现方式或第一方面的第二种 可能的实现方式或第一方面的第三种可能的实现方式或第一方面的第四种可 能的实现方式或第一方面的第五种可能的实现方式, 在第一方面的第六种可 能的实现方式中, 所述方法还包括:
所述代理设备在所述客户端从所述代理设备切换到目标网络侧设备时, 向所述目标网络侧设备发送尚緩存于所述代理设备的、 且所述互联网服务器 向所述客户端发送的下行数据, 以使所述目标网络侧设备继续转发所接收的 下行数据至所述客户端; 其中, 所述代理设备是发生切换前所述客户端所附 着的网络侧设备, 所述目标网络侧设备是发生切换后所述客户端所附着的网 络侧设备。
第二方面提供一种代理设备, 包括:
获取模块, 用于获取对应第一方向的第一方向起始序列号、 第一方向应 答序列号和对应第二方向的第二方向起始序列号; 其中, 第一设备与第二设 备之间建立传输控制协议 TCP的连接, 所述第一设备为客户端, 所述第二设 备为互联网服务器, 或者, 所述第一设备为互联网服务器, 所述第二设备为 客户端; 所述代理设备与所述客户端通过无线方式交互, 所述代理设备与所 述互联网服务器通过有线方式交互; 其中,
所述第一方向为所述第一设备向所述第二设备发送数据的方向, 所述第 二方向为所述第二设备向所述第一设备发送数据的方向;
所述第一方向起始序列号为所述第一方向的起始数据所对应的起始序 号, 所述第一方向的起始数据为上一次緩存在所述代理设备中、 且在所述第 一方向上传输的第一个数据;
所述第一方向应答序列号为所述第一方向的终止数据所对应的终止序号 加 1 , 所述第一方向的终止数据为上一次緩存在所述代理设备中、 且在所述 第一方向上传输的最后一个数据;
所述第二方向起始序列号为所述第二方向的起始数据所对应的起始序 号, 所述第二方向的起始数据为上一次緩存在所述代理设备中、 且在所述第 二方向上传输的第一个数据;
接收模块, 用于接收所述第一设备在所述第一方向上发送给所述第二设 备的第一数据;
更新模块: 用于将所述获取模块获取的所述第一方向应答序列号更新为 所述接收模块接收的第一数据的终止序号加 1 ;
发送模块, 用于根据所述更新模块更新后的第一方向应答序列号和所述 获取模块获取的所述第二方向起始序列号向所述第一设备发送第一确认应 答;
所述发送模块 , 还用于将所述接收模块接收的第一数据转发给所述第二 设备;
所述更新模块, 还用于将所述获取模块获取的第一方向起始序列号更新 为所述第一方向应答序列号。
结合第二方面, 在第二方面的第一种可能的实现方式中, 所述获取模块, 还用于获取对应第二方向的第二方向应答序列号; 其中,
所述第二方向应答序列号为所述第二方向的终止数据所对应的终止序号 加 1 , 所述第二方向的终止数据为上一次緩存在所述代理设备中、 且在所述 第二方向上的最后一个数据;
所述接收模块, 还用于接收所述第二设备在所述第二方向上发送给所述 第一设备的第二数据;
所述更新模块, 还用于将所述获取模块获取的第二方向应答序列号更新 为所述接收模块接收的第二数据的终止序号加 1 ;
所述发送模块, 还用于根据所述更新模块更新后的第二方向应答序列号 和所述获取模块获取的第一方向起始序列号向所述第二设备发送第二确认应 答;
所述发送模块 , 还用于将所述接收模块接收的第二数据转发给所述第 ― 设备;
所述更新模块, 还用于将所述获取模块获取的所述第二方向起始序列号 更新为所述第二方向应答序列号。
结合第二方面的第一种可能的实现方式, 在第二方面的第二种可能的实 现方式中, 所述代理设备还包括: 判断模块, 用于确定所述第二数据中的应 答序列号与所述第二方向应答序列号是否相同。
结合第二方面的第二种可能的实现方式, 在第二方面的第三种可能的实 现方式中, 所述判断模块具体用于判断本地是否緩存有所述第一数据, 如果 判断结果为是, 确定所述第二数据中的应答序列号与所述第二方向应答序列 号不相同。
结合第二方面的第二种可能的实现方式, 在第二方面的第四种可能的实 现方式中, 所述代理设备还包括: 记录模块, 用于记录所述第一确认应答中 的应答序列号;
所述判断模块具体用于: 如果确定出所述记录模块记录的第一确认应答 中的应答序列号与所述接收模块接收的第二数据中的应答序列号不相同, 则 确定所述第二数据中的应答序列号与所述第二方向应答序列号不相同。
结合第二方面的第一种可能的实现方式或第二方面的第二种可能的实现 方式或第二方面的第三种可能的实现方式或第二方面的第四种可能的实现方 式, 在第二方面的第五种可能的实现方式中, 所述获取模块具体用于: 从所 述接收模块在所述客户端从源网络侧设备切换到所述代理设备时, 接收的下 行数据中获取所述第一方向起始序列号、 所述第一方向应答序列号、 所述第 二方向起始序列号和所述第二方向应答序列号, 其中, 所述下行数据包括所 述源网络侧设备转发的、 且緩存于所述源网络侧设备的所述互联网服务器向 所述客户端发送的下行数据, 所述源网络侧设备是在发生切换前所述客户端 所附着的网络侧设备, 所述代理设备是发生切换后所述客户端所附着的网络 侧设备。
结合第二方面或第二方面的第一种可能的实现方式或第二方面的第二种 可能的实现方式或第二方面的第三种可能的实现方式或第二方面的第四种可 能的实现方式或第二方面的第五种可能的实现方式, 在第二方面的第六种可 能的实现方式中, 所述发送模块, 还用于在所述客户端从所述代理设备切换 到目标网络侧设备时,向所述目标网络侧设备发送尚緩存于所述代理设备的、 且所述互联网服务器向所述客户端发送的下行数据, 以使所述目标网络侧设 备继续转发所接收的下行数据至所述客户端; 其中, 所述代理设备是发生切 换前所述客户端所附着的网络侧设备, 所述目标网络侧设备是发生切换后所 述客户端所附着的网络侧设备。
第三方面提供一种数据传输系统, 包括: 第一设备、 第二设备及第二方 面提供的任一代理设备。
第四方面提供一种代理设备, 包括:
处理器, 用于获取对应第一方向的第一方向起始序列号、 第一方向应答 序列号和对应第二方向的第二方向起始序列号; 其中, 第一设备与第二设备 之间建立传输控制协议 TCP的连接, 所述第一设备为客户端, 所述第二设备 为互联网服务器, 或者, 所述第一设备为互联网服务器, 所述第二设备为客 户端; 所述代理设备与所述客户端通过无线方式交互, 所述代理设备与所述 互联网服务器通过有线方式交互; 其中,
所述第一方向为所述第一设备向所述第二设备发送数据的方向, 所述第 二方向为所述第二设备向所述第一设备发送数据的方向;
所述第一方向起始序列号为所述第一方向的起始数据所对应的起始序 号, 所述第一方向的起始数据为上一次緩存在所述代理设备中、 且在所述第 一方向上传输的第一个数据;
所述第一方向应答序列号为所述第一方向的终止数据所对应的终止序号 加 1 , 所述第一方向的终止数据为上一次緩存在所述代理设备中、 且在所述 第一方向上传输的最后一个数据;
所述第二方向起始序列号为所述第二方向的起始数据所对应的起始序 号, 所述第二方向的起始数据为上一次緩存在所述代理设备中、 且在所述第 二方向上传输的第一个数据;
接收器, 用于接收所述第一设备在所述第一方向上发送给所述第二设备 的第一数据;
所述处理器, 还用于将所述第一方向应答序列号更新为所述接收器接收 的第一数据的终止序号加 1 ;
发射器, 用于根据所述处理器更新后的第一方向应答序列号和所述处理 器获取的所述第二方向起始序列号向所述第一设备发送第一确认应答;
所述发射器,还用于将所述接收器接收的第一数据转发给所述第二设备; 所述处理器, 还用于将所述第一方向起始序列号更新为所述第一方向应 答序列号。
结合第四方面, 在第四方面的第一种可能的实现方式中, 所述处理器, 还用于获取对应第二方向的第二方向应答序列号; 其中,
所述第二方向应答序列号为所述第二方向的终止数据所对应的终止序号 加 1 , 所述第二方向的终止数据为上一次緩存在所述代理设备中、 且在所述 第二方向上的最后一个数据; 所述接收器, 还用于接收所述第二设备在所述第二方向上发送给所述第 一设备的第二数据;
所述处理器, 还用于将所述获取的第二方向应答序列号更新为所述接收 器接收的第二数据的终止序号加 1 ;
所述发射器, 还用于根据所述处理器更新后的第二方向应答序列号和所 述第一方向起始序列号向所述第二设备发送第二确认应答;
所述发射器,还用于将所述接收器接收的第二数据转发给所述第一设备; 所述处理器, 还用于将所述第二方向起始序列号更新为所述第二方向应 答序列号。
结合第四方面的第一种可能的实现方式, 在第四方面的第二种可能的实 现方式中, 所述处理器还用于确定所述第二数据中的应答序列号与所述第二 方向应答序列号是否相同。
结合第四方面的第二种可能的实现方式, 在第四方面的第三种可能的实 现方式中, 所述处理器具体用于判断本地是否緩存有所述第一数据, 如果判 断结果为是, 确定所述第二数据中的应答序列号与所述第二方向应答序列号 不相同。
结合第四方面的第二种可能的实现方式, 在第四方面的第四种可能的实 现方式中, 所述处理器, 还用于记录所述第一确认应答中的应答序列号; 所述处理器具体用于: 如果确定出所述记录的第一确认应答中的应答序 列号与所述第二数据中的应答序列号不相同, 则确定所述第二数据中的应答 序列号与所述第二方向应答序列号不相同。
结合第四方面的第一种可能的实现方式或第四方面的第二种可能的实现 方式或第四方面的第三种可能的实现方式或第四方面的第四种可能的实现方 式, 在第四方面的第五种可能的实现方式中, 所述处理器具体用于从所述接 收器在所述客户端从源网络侧设备切换到所述代理设备时, 接收的下行数据 中获取所述第一方向起始序列号、 所述第一方向应答序列号、 所述第二方向 起始序列号和所述第二方向应答序列号, 其中, 所述下行数据包括所述源网 络侧设备转发的、 且緩存于所述源网络侧设备的所述互联网服务器向所述客 户端发送的下行数据, 所述源网络侧设备是在发生切换前所述客户端所附着 的网络侧设备,所述代理设备是发生切换后所述客户端所附着的网络侧设备。 结合第四方面或第四方面的第一种可能的实现方式或第四方面的第二种 可能的实现方式或第四方面的第三种可能的实现方式或第四方面的第四种可 能的实现方式或第四方面的第五种可能的实现方式, 在第四方面的第六种可 能的实现方式中, 所述发送器还用于, 在所述客户端从所述代理设备切换到 目标网络侧设备时, 向所述目标网络侧设备发送尚緩存于所述代理设备的、 且所述互联网服务器向所述客户端发送的下行数据, 以使所述目标网络侧设 备继续转发所接收的下行数据至所述客户端; 其中, 所述代理设备是发生切 换前所述客户端所附着的网络侧设备, 所述目标网络侧设备是发生切换后所 述客户端所附着的网络侧设备。
本发明实施例提供的数据传输方法、 系统及代理设备, 客户端与互联网 服务器之间建立 TCP的连接, 代理设备与客户端通过无线方式交互, 代理设 备与互联网服务器之间通过有线方式交互, 代理设备获取客户端向互联网服 务器发送数据的方向上的起始序列号和应答序列号以及互联网服务器向客户 端发送数据的方向上的起始序列号, 或者获取互联网服务器向客户端发送数 据的方向上的起始序列号和应答序列号以及客户端向互联网服务器发送数据 的方向上的起始序列号, 并根据所获取的相应方向上的起始序列号和应答序 列号, 将互联网服务器发送给客户端的数据转发给客户端或者将客户端发送 给互联网服务器的数据转发给互联网服务器, 并更新相应的起始序列号和应 答序列号, 实现对互联网服务器与客户端之间的数据的转发, 由于代理设备 并未分别与客户端和互联网服务器真正建立 TCP的连接, 数据的传输都是基 于客户端与互联网服务器之间的 TCP连接进行的, 在数据传输过程中并未涉 及 TCP连接的中断与重新建立, 所以不会影响无线网络的服务质量。 附图说明 为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对实 施例或现有技术描述中所需要使用的附图作一简单地介绍, 显而易见地, 下 面描述中的附图是本发明的一些实施例, 对于本领域普通技术人员来讲, 在 不付出创造性劳动性的前提下, 还可以根据这些附图获得其他的附图。
图 1为本发明各实施例所基于的客户端通过移动通信网络访问互联网内 容的网络结构示意图; 图 2A为本发明实施例提供的一种数据传输方法的流程图; 图 2B为本发明实施例提供的另一种数据传输方法的流程图;
图 3为本发明实施例提供的又一种数据传输方法的流程图;
图 4为本发明实施例提供的又一种数据传输方法的流程图;
图 5为本发明实施例提供的又一种数据传输方法的流程图;
图 6为本发明实施例提供的又一种数据传输方法的流程图;
图 7为本发明实施例提供的一种代理设备的结构示意图;
图 8为本发明实施例提供的另一种代理设备的结构示意图;
图 9为本发明实施例提供的又一种代理设备的结构示意图。 具体实施方式 为使本发明实施例的目的、 技术方案和优点更加清楚, 下面将结合本发 明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描述, 显然, 所描述的实施例是本发明一部分实施例, 而不是全部的实施例。 基于 本发明中的实施例, 本领域普通技术人员在没有作出创造性劳动前提下所获 得的所有其他实施例, 都属于本发明保护的范围。
图 1为本发明各实施例所基于的客户端通过移动通信网络访问互联网内 容的网络结构示意图。 图 2A为本发明实施例提供的一种数据传输方法的流 程图。 如图 1所示, 客户端与互联网服务器之间移动通信网络建立 TCP的连 接。 在本实施例中, 为了不对上下行进行限制, 用第一设备和第二设备表示 客户端与互联网服务器,即第一设备与第二设备之间建立 TCP的连接,其中, 所述第一设备为客户端, 则所述第二设备为互联网服务器, 或者, 所述第一 设备为互联网服务器, 则所述第二设备为客户端。 另外, 代理设备与所述客 户端通过无线方式交互, 所述代理设备与所述互联网服务器通过有线方式交 互。 如图 2A所示, 本实施例的方法包括:
201、 所述代理设备获取对应第一方向的第一方向起始序列号、 第一方向 应答序列号和对应第二方向的第二方向起始序列号, 其中, 所述第一方向为 所述第一设备向所述第二设备发送数据的方向, 所述第二方向为所述第二设 备向所述第一设备发送数据的方向。
其中, 所述第一方向起始序列号为所述第一方向的起始数据所对应的起 始序号, 所述第一方向的起始数据为上一次緩存在所述代理设备中、 且在所 述第一方向上传输的第一个数据;
所述第一方向应答序列号为所述第一方向的终止数据所对应的终止序号 加 1 , 所述第一方向的终止数据为上一次緩存在所述代理设备中、 且在所述 第一方向上传输的最后一个数据;
所述第二方向起始序列号为所述第二方向的起始数据所对应的起始序 号, 所述第二方向的起始数据为上一次緩存在所述代理设备中、 且在所述第 二方向上传输的第一个数据。
第一设备向第二设备发送的数据或者第二设备向所述第一设备发送的数 据都携带一个起始序列号和一个应答序列号。 将第一方向的起始数据所对应 的起始序号称为第一方向起始序列号; 将第一方向的终止数据所对应的终止 序号加 1称为第一方向应答序列号; 将第二方向的起始数据所对应的起始序 号称为第二方向起始序列号。
在本发明各实施例中, 所述第一方向的起始数据为上一次緩存在所述代 理设备中、 且在所述第一方向上传输的第一个数据, 所述第一方向的终止数 据为上一次緩存在所述代理设备中、 且在所述第一方向上传输的最后一个数 据。 第一方向的第一个数据至最后一个数据緩存于该代理设备, 且尚未发送 至第二设备。 当代理设备将緩存的第一方向的第一个数据至最后一个数据发 送给第二设备, 并且被第二设备通过 TCP确认收到后, 代理设备可以删除所 緩存的第一方向的第一个数据至最后一个数据。
同理, 在本发明各实施例中, 所述第二方向的起始数据为上一次緩存在 所述代理设备中、 且在所述第二方向上传输的第一个数据, 相应的, 将上一 次緩存在所述代理设备中、 且在所述第二方向上传输的最后一个数据称为第 二方向的终止数据。 第二方向的第一个数据至最后一个数据緩存于该代理设 备, 尚未发送至第一设备。 当代理设备将緩存的第二方向的第一个数据至最 后一个数据发送给第一设备, 并且被第一设备通过 TCP确认收到后, 代理设 备可以删除所緩存的第二方向的第一个数据至最后一个数据。 在此说明, 本 发明各实施例中所述的 "緩存" 包括较长时间的緩存, 也包括临时的緩存。
在本实施例中,客户端通过移动通信网络访问互联网中的互联网服务器, 客户端与互联网服务器之间建立 TCP的连接; 而移动通信网络中的代理设备 与客户端通过无线方式交互, 并与互联网服务器通过有线方式交互。 代理设 备会在客户端与互联网服务器之间建立好 TCP连接后, 在开始或未开始传输 数据时启动 TCP代理功能,在确定启动 TCP代理功能后,会利用客户端与互 联网服务器之间已经存在的 TCP 连接分别与客户端和互联网服务器进行通 信, 进而完成对客户端与互联网服务器之间的数据的转发。
上述移动通信网络可以是长期演进 ( Long Term Evolution, 简称为 LTE ) 网络、 通用移动通信系统 ( Universal Mobile Telecommunications System, 简 称为 UMTS )或全球啟波互联接入 ( Worldwide Interoperability for Microwave Access, 简称为 WiMax ) 网络等。 以 UMTS 网络为例, 则代理设备可以是 UMTS 陆地无线接入网 (UMTS Terrestrial Radio Access Network, 简称为 UTRAN )设备或无线网络控制器( Radio Network Controller, 简称为 RNC ) 等。 以 LTE网络为例, 则代理设备可以是演进的 UTRAN ( Evolved-UTRAN, 简称为 E-UTRAN )设备、 服务网关(Serving Gateway, 简称为 SGW )或分 组数据网络网关( Packet Data Network Gateway , 简称为 PDN GW )等。
202、所述代理设备接收所述第一设备在所述第一方向上发送给所述第二 设备的第一数据, 将所述第一方向应答序列号更新为所述第一数据的终止序 号加 1。
其中, 第一数据可以为客户端向互联网服务器发送的上行数据; 或者第 一数据可以为互联网服务器向客户端发送的下行数据。
代理设备在获取第一方向起始序列号、 第一方向应答序列号和第二方向 起始序列号之后, 会接收第一设备发送给第二设备的第一数据, 并将第一方 向应答序列号更新为第一数据的终止序号加 1。
可选的, 如果第一设备向代理设备发送第一数据的速度大于代理设备向 第二设备转发第一数据的速度, 则代理设备在接收到第一设备发送给第二设 备的第一数据后, 可以将所接收的第一数据緩存在本地。
203、所述代理设备根据所述更新后的第一方向应答序列号和所述第二方 向起始序列号向所述第一设备发送第一确认应答。
代理设备接收到第一设备发送给第二设备的第一数据之后, 代理第二设 备向第一设备发送确认应答,为便于区分这里的确认应答称为第一确认应答。
由于客户端与互联网服务器之间存在代理设备, 代理设备负责客户端与 互联网服务器之间数据的緩存与转发, 在该转发过程中, 代理设备将客户端 与互联网服务器之间的数据发送切分为两个处理过程, 一个是代理设备与互 联网服务器之间的处理过程, 一个是代理设备与客户端之间的处理过程, 在 上述处理过程中, 代理设备还要代替客户端向互联网服务器返回确认应答, 或者代替互联网服务器向客户端返回确认应答, 另外互联网服务器或客户端 也会向代理设备发送确认应答。 由于确认应答是代理设备与客户端之间交互 施例所述的第一数据或后面涉及的第二数据。
204、 所述代理设备将所述第一数据转发给所述第二设备, 并将所述第一 方向起始序列号更新为所述第一方向应答序列号。
在此说明, 步骤 204中的第一方向应答序列号是指更新之前的第一方向 应答序列号。 至此, 代理设备完成了第一设备向第二设备发送的数据的转发。
进一步, 如图 2B所示, 该实施例提供的数据传输方法还包括:
205、 所述代理设备获取对应第二方向的第二方向应答序列号; 其中, 所 述第二方向应答序列号为所述第二方向的终止数据所对应的终止序号加 1 , 所述第二方向的终止数据为上一次緩存在所述代理设备中、 且在所述第二方 向上传输的最后一个数据。
206、所述代理设备接收所述第二设备在所述第二方向上发送给所述第 ― 设备的第二数据, 将所述第二方向应答序列号更新为所述第二数据的终止序 号加 1。
其中, 第二数据可以为客户端向互联网服务器发送的上行数据; 或者第 二数据可以为互联网服务器向客户端发送的下行数据。
207、所述代理设备根据所述更新后的第二方向应答序列号和所述第一方 向起始序列号向所述第二设备发送第二确认应答。
208、 所述代理设备将所述第二数据转发给所述第一设备, 并将所述第二 方向起始序列号更新为所述第二方向应答序列号。
同理, 步骤 208中的第二方向应答序列号是指更新之前的第二方向应答 序列号。
代理设备除了接收第一设备发送给第二设备的第一数据, 并代替第二设 备向第一设备返回第一确认应答之外, 还会接收第二设备发送给第一设备的 第二数据, 并代替第一设备向第二设备返回确认应答, 将这里的确认应答称 之为第二确认应答, 并将第二数据转发至第一设备。 代理设备接收并向第一 设备转发第二数据的过程, 与代理设备接收并向第二设备转发第一数据的过 程是独立的过程。
在一可选实施方式中, 第一设备接收到代理设备发送的第二数据之后, 可以不向代理设备返回确认应答。
在一可选实施方式中, 第一设备接收到代理设备发送的第二数据之后, 向代理设备返回确认应答, 这里的确认应答称为第三确认应答。 第三确认应 答中的起始序列号为第一方向应答序列号, 第三确认应答中的应答序列号为 第二方向起始序列号加上第二数据的长度, 即为更新后的第二方向起始序列 号。
进一步, 本实施例提供的数据传输方法还可以包括:
所述代理设备在将第二方向应答序列号更新为第二数据的终止序号加 1 之前, 需要确定所述第二数据中的应答序列号与所述第二方向应答序列号不 相同。
可选的, 代理设备确定第二数据中的应答序列号与所述第二方向应答序 列号不相同, 包括:
所述代理设备判断本地是否緩存有所述第一数据 (这里的第一数据是指 第一设备需要发送给第二设备的数据) ; 如果判断结果为是, 确定所述第二 数据中的应答序列号与所述第二方向应答序列号不相同。
进一步, 本实施例提供的数据传输方法还包括:
所述代理设备记录所述第一确认应答中的应答序列号。 基于此, 所述代 理设备确定所述第二数据中的应答序列号与所述第二方向应答序列号不相 同, 包括:
如果所述代理设备确定出所述第一确认应答中的应答序列号与所述第二 数据中的应答序列号不相同, 则确定所述第二数据中的应答序列号与所述第 二方向应答序列号不相同。
在此说明, 在不同的应用场景中, 代理设备获取对应第一方向的第一方 向起始序列号、 第一方向应答序列号和对应第二方向的第二方向起始序列号 和第二方向应答序列号的方式会有所不同。 例如, 在一种应用场景中, 代理设备作为第一设备当前的且初始所附着 的网络侧设备, 且第一设备与第二设备通过该代理设备建立 TCP连接, 则代 理设备可以通过记录 TCP连接建立过程中的参数, 从所记录的参数中获取第 一方向起始序列号、 第一方向应答序列号和第二方向起始序列号和第二方向 应答序列号, 这里所述的 TCP连接建立过程是指第一设备与第二设备通过该 代理设备建立 TCP连接的过程。代理设备所记录的参数包括但不限于:该 TCP 连接对应的源 IP地址和目的 IP地址, TCP连接建立过程中第一设备向第二 设备发送数据的起始序列号, TCP连接建立过程中第二设备向第一设备发送 数据的起始序列号, TCP连接建立过程中第一设备应答第二设备发送数据的 应答序列号以及 TCP连接建立过程中第二设备应答第一设备发送数据的应答 序列号。
在另一应用场景中, 以客户端初始附着的网络侧设备为源网络侧设备, 代理设备是客户端发生切换后附着的网络侧设备, 其中, 客户端可以作为第 一设备, 则第二设备为互联网服务器, 或者客户端可以作为第二设备, 则互 联网服务器为第一设备。 客户端从一个服务小区切换到另一个服务小区, 即 从源网络侧设备切换到代理设备, 则源网络侧设备是发生切换前客户端所附 着的网络侧设备, 而代理设备是发生切换后客户端所附着的网络侧设备。 在 发生切换时, 源网络侧设备向代理设备发送緩存于该源网络侧设备的、 且互 联网服务器向客户端发送的下行数据。 其中, 在发生切换之前, 源网络侧设 备会緩存互联网服务器向客户端发送的且尚未发送至客户端的下行数据, 在 发生切换时, 代理设备接收源网络侧设备转发的、 且緩存于源网络侧设备的 互联网服务器向客户端发送的下行数据, 代理设备接收到源网络侧设备转发 的下行数据之后, 代理设备可以从所接收的下行数据中获取第一方向起始序 列号、 第一方向应答序列号、 第二方向起始序列号和第二方向应答序列号。 即在该应用场景中,所述代理设备获取对应第一方向的第一方向起始序列号、 第一方向应答序列号、 对应第二方向的第二方向起始序列号及第二方向应答 序列号包括: 所述代理设备在所述客户端从源网络侧设备切换到所述代理设 备时, 接收所述源网络侧设备转发的、 且緩存于所述源网络侧设备的所述互 联网服务器向所述客户端发送的第三数据, 从所述源网络侧设备转发的第三 数据中获取所述第一方向起始序列号、 所述第一方向应答序列号、 所述第二 方向起始序列号和所述第二方向的终止序列号, 其中, 所述源网络侧设备是 在发生切换前所述客户端所附着的网络侧设备, 所述代理设备是发生切换后 所述客户端所附着的网络侧设备。
在此说明, 在该应用场景中, 源网络侧设备可以具有 TCP代理功能, 也 可以不具有 TCP代理功能;如果源网络侧设备具有 TCP代理功能,则源网络 侧设备可以启动了 TCP代理功能,也可以没有启动 TCP代理功能。在本应用 场景中, 所述 TCP代理功能包括但不限于以下功能: 接收互联网服务器发送 给客户端的下行数据, 在接收到互联网服务器发送给客户端的下行数据后, 根据所接收的下行数据将互联网服务器向客户端发送的终止数据所对应的应 答序列号更新为所接收的下行数据的终止序号加 1 , 并根据更新后的应答序 列号和客户端发送给互联网服务器的起始数据所对应的起始序号向互联网服 务器发送确认应答, 将所接收的下行数据转发给客户端, 并将互联网服务器 发送给客户端的起始数据所对应的起始序号更新为所接收的下行数据的终止 序号加 1 (即上述更新后的应答序列号) 。 在此说明, 上述所接收的下行数 据的终止序号是指该下行数据中最后一个字节的序号。
从广义角度来看, 所述 TCP代理功能包括但不限于以下功能: 接收所述 第一设备在所述第一方向上发送给所述第二设备的第一数据, 将所述第一方 向应答序列号更新为所述第一数据的终止序号加 1 , 根据所述更新后的第一 方向应答序列号和所述第二方向起始序列号向所述第一设备发送第一确认应 答, 将所述第一数据转发给所述第二设备, 并将所述第一方向起始序列号更 新为所述第一方向应答序列号。
进一步可选的,如果源网络侧设备具有 TCP代理功能且启动了 TCP代理 功能, 则源网络侧设备除了将尚未发送至客户端的下行数据转发给代理设备 之外, 还可以在代理设备获取第一方向起始序列号、 第一方向应答序列号、 第二方向起始序列号之后, 且在接收互联网服务器发送给客户端的第一数据 之前, 向代理设备发送第一启动代理指示, 第一启动代理指示用于指示代理 设备启动 TCP代理功能。基于此,代理设备还会在获取第一方向起始序列号、 第一方向应答序列号和第二方向起始序列号之后, 且在接收互联网服务器发 送给客户端的第一数据之前, 接收源网络侧设备发送的第一启动代理指示, 并根据第一启动代理指示启动 TCP代理功能。 代理设备除了根据源网络侧设备发送的第一启动代理指示启动 TCP代理 功能之外, 还可以根据客户端与互联网服务器之间的 TCP连接对应的服务质 量分类标识( QoS Class Identifier, 简称为 QCI )等参数, 确定启动 TCP代理 功能, 例如, 代理设备仅针对某些 QCI等级的承载中的 TCP连接提供 TCP 代理功能,则当客户端与互联网服务器之间的 TCP连接所在承载的 QCI等级 满足启动 TCP代理功能的要求时, 代理设备确定启动 TCP代理功能。 或者, 代理设备可以直接启动 TCP代理功能, 即代理设备在未获得来自源网络侧设 备的启动 TCP代理的明确指示, 同时也无需查看有关 QCI等参数, 可以对切 换到代理设备所在网络的客户端均立即、 无条件地启动 TCP代理功能。
进一步, 本实施例提供的数据传输方法还可以包括:
所述代理设备在所述客户端从所述代理设备切换到目标网络侧设备时, 向所述目标网络侧设备发送、 且尚緩存于所述代理设备的所述互联网服务器 向所述客户端发送的下行数据, 以使所述目标网络侧设备继续转发所接收的 下行数据至所述客户端; 其中, 所述代理设备是发生切换前所述客户端所附 着的网络侧设备, 所述目标网络侧设备是发生切换后所述客户端所附着的网 络侧设备。 例如, 客户端与互联网服务器之间的 TCP连接可以是通过代理设 备建立的, 客户端从代理设备切换到目标网络侧设备。
在该应用场景中, 对目标网络侧设备来说, 可以具有 TCP代理功能, 也 可以不具有 TCP代理功能,如果目标网络侧设备具有 TCP代理功能, 目标网 络侧设备可以开启了 TCP代理功能,也可以没有开启 TCP代理功能。如果目 标网络侧设备具有且开启了 TCP代理功能, 则目标网络侧设备接收到代理设 备转发的互联网服务器向客户端发送的下行数据后, 转发所接收的下行数据 的过程与本实施例中代理设备转发第一数据或第二数据的过程相同, 在此不 再赘述。如果目标网络侧设备不具有 TCP代理功能,或者具有 TCP代理功能 但未开启 TCP代理功能, 目标网络侧设备可以作为中继设备, 直接转发所接 收的下行数据, 并转发客户端针对所接收的下行数据返回的确认应答。
进一步, 如果在发生切换时, 代理设备上还緩存有客户端发送给互联网 服务器的上行数据, 则代理设备在发生切换之前, 可以将所緩存的上行数据 全部转发给互联网服务器。 其中, 代理设备在切换前向互联网服务器转发上 行数据的过程, 具体可参见上述代理设备转发第一数据或第二数据的过程, 在此不再赘述。
在一可选实施方式中,可以默认目标网络侧设备是具有 TCP代理功能的 , 例如, 代理设备在客户端从该代理设备切换到目标网络侧设备时, 除了向目 标网络侧设备发送尚緩存于代理设备, 且互联网服务器发送给客户端的下行 数据之外, 还可以向目标网络侧设备发送第二启动代理指示, 该第二启动代 理指示用于指示目标网络侧设备启动 TCP代理功能。
由上述可见 ,本实施例的代理设备维护第一方向的第一方向起始序列号、 第一方向应答序列号和对应第二方向的第二方向起始序列; 代理设备每接收 到一个数据或者每发送一个数据包就要更新第一方向应答序列号和对应第二 方向的第二方向起始序列号。 具体的, 所述代理设备接收所述第一设备在所 述第一方向上发送给所述第二设备的第一数据, 更新第一方向应答序列号; 所述代理设备将所述第一数据转发给所述第二设备, 更新所述第一方向起始 序列号。 进一步, 代理设备还维护第二方向的第二方向应答序列号, 所述代 理设备接收所述第二设备在所述第二方向上发送给所述第一设备的第二数 据, 更新所述第二方向应答序列号, 所述代理设备将所述第二数据转发给所 述第二设备, 更新所述第二方向起始序列号。
在本实施例中, 客户端与互联网服务器之间建立 TCP的连接, 代理设备 与客户端通过无线方式交互, 代理设备与互联网服务器之间通过有线方式交 互, 代理设备获取客户端向互联网服务器发送数据的方向上的起始序列号和 应答序列号以及互联网服务器向客户端发送数据的方向上的起始序列号, 或 者获取互联网服务器向客户端发送数据的方向上的起始序列号和应答序列号 以及客户端向互联网服务器发送数据的方向上的起始序列号, 并根据所获取 的相应方向上的起始序列号和应答序列号, 将互联网服务器发送给客户端的 数据转发给客户端或者将客户端发送给互联网服务器的数据转发给互联网服 务器, 并更新相应的起始序列号和应答序列号, 实现对互联网服务器与客户 端之间的数据的转发, 由于代理设备并未分别与客户端和互联网服务器真正 建立 TCP 的连接, 数据的传输都是基于客户端与互联网服务器之间的 TCP 连接进行的, 在数据传输过程中并未涉及到由于客户端的移动性引起的 TCP 连接的中断与重新建立, 所以数据传输不会造成中断, 不会影响无线网络的 服务质量。 图 3为本发明实施例提供的又一种数据传输方法的流程图。如图 3所示, 本实施例的方法包括:
3a、 客户端与互联网服务器通过代理设备建立 TCP连接, 代理设备记录 该 TCP连接建立过程中的参数。
TCP连接建立需要三次握手过程。 具体的, 客户端首先向互联网服务器 发送同步(SYN )请求, 随机生成一个初始序列号 m, 首次应答序列号置为 0, 同时同步请求占据 1个字节。 互联网服务器接收到客户端发送的同步请求 后发送同步确认(SYN ACK )应答, 该同步确认应答也占据 1个字节。 互联 网服务器随机生成一个初始序列号 n, 由于同步请求已经占了 1个字节, 所 以互联网服务器的同步确认应答中的应答序列号置为 m+1 , 即表示序列号为 m的数据已经成功接收, 希望接收到下一个字节。 客户端应答互联网服务器 完成 TCP连接的建立, 该应答携带有零字节的数据。 客户端已经向互联网服 务器发送了 1个字节的数据, 因此该应答中的起始序号为 m+1 , 另外, 互联 网服务器也已经向客户端发送了 1个字节的数据, 该应答中的应答序列号为 n+1 , 即通知互联网服务器序列号为 n的数据已经收到, 希望收到接下来的数 据。
在本实施例中, 上述三次握手过程均通过代理设备这个实体, 代理设备 记录该 TCP连接建立过程中的参数, 例如该 TCP连接的源 IP地址(即客户 端的 IP地址) 、 目的 IP地址 (即互联网服务器的 IP地址) 、 第一方向起始 序列号 m、 第一方向应答序列号 0、 第二方向起始序列号 n以及第二方向应 答序列号 m+1 , 并会在客户端应答互联网服务器完成 TCP连接的建立的应答 消息之后, 将第一方向起始序列号 m更新为 m+1 , 将第一方向应答序列号 0 更新为 n+l。
在上述三次握手过程中, 代理设备仅起到中继的作用。
3b、 客户端与互联网服务器之间建立 TCP连接之后, 代理设备启动 TCP 代理功能。
在本实施例中, 所述 TCP代理功能包括两部分, 一部分是代理互联网服 务器保持与客户端之间的 TCP连接, 即代理互联网服务器发送到客户端的数 据或者接收来自客户端的数据, 在发送或接收过程中保持互联网服务器的 IP 地址、 TCP端口号及互联网服务器发送或接收数据的起始序列号和应答序列 号; 另一部分是代理客户端保持与互联网服务器之间的 TCP连接, 即代理客 户端发送到互联网服务器的数据或者接收来自互联网服务器的数据, 并在发 送或接收过程中保持客户端的 IP地址、 TCP端口号及客户端发送或接收数据 的起始序列号和应答序列号。 其中, 代理设备的 TCP代理功能对于客户端和 互联网服务器是透明的。
由于本实施例的 TCP代理功能是在客户端与互联网服务器之间建立 TCP 连接之后才启动的, 且客户端和互联网服务器与代理设备之间并未建立独立 的 TCP连接, 为了区别于现有技术中的代理技术, 可以将现有技术中的代理 技术称为前 TCP代理技术, 而将本实施例的代理技术称为后 TCP代理技术。
3c、 互联网服务器将向客户端发送的下行数据发送给代理设备。
例如, 互联网服务器向客户端发送 k字节的下行数据。
3d、 代理设备緩存互联网服务器发送的下行数据, 并根据所记录的参数 代替客户端对收到的下行数据进行确认应答。
代理设备接收到了来自互联网服务器的 k字节的下行数据, 緩存 k字节 的下行数据, 并向互联网服务器发送确认应答, 该确认应答占据零字节。 代 理设备收到 k字节的下行数据, 下行数据的初始序列号为 n+1 , 下行数据的 应答序列号为 m+1 ; 则代理设备将向互联网服务器发送的确认应答中的初始 序列号置为 m+1 , 将其应答序列号置为 n+k+1 , 代替客户端通知互联网服务 器已经成功接收这 k字节的数据, 并希望接收后续的下行数据, 同时代理设 备会保持第二方向起始序列号为 n, 将第二方向应答序列号 m+1 更新为 n+k+1„
可选的, 代理设备可以每接收一个下行数据就进行一次确认应答, 也可 以在接收到多个下行数据后进行一次确认应答。
由于代理设备与客户端之间的无线空口速率可能小于代理设备与互联网 服务器之间的固网速率, 所以可能会出现网络拥塞, 而本实施例的代理设备 通过緩存互联网服务器发送给客户端的下行数据, 有利于解决网络拥塞的问 题。
3e、 代理设备根据所记录的参数, 将緩存的下行数据下发给客户端。 代理设备在将緩存的下行数据下发给客户端的过程中, 还会更新所记录 的第二方向起始序列号 n, 将第二方向起始序列号 n更新为所发送的下行数 据的终止序列号加 1。
3f、 代理设备接收来自客户端的确认应答。
在步骤 3d和 3e描述的通信过程中, 代理设备往往会緩存一部分互联网 服务器发送给客户端的下行数据, 同时代理设备已经代替客户端向互联网服 务器发送了这部分下行数据的确认应答, 这样互联网服务器继续发送的下行 数据的起始序列号与客户端针对代理设备发送的下行数据进行的确认应答的 应答序列号将不对应, 也即发生序列号失步。 所述序列号同步是指互联网服 务器发送下行数据使用的起始序列号与客户端应答互联网服务器使用的应答 序列号一致, 客户端向互联网服务器发送上行数据使用的起始序列号与互联 网服务器应答客户端使用的应答序列号一致。 但是, 互联网服务器继续下发 的下行数据的起始序列号与代理设备代替客户端针对该下行数据向互联网服 务器发送的确认应答的应答序列号之间是对应的, 即保持序列号同步; 代理 设备向客户端发送的下行数据的起始序列号与客户端针对代理设备发送的下 行数据进行的确认应答的应答序列号之间是对应的, 即保持序列号同步。
当代理设备将緩存的下行数据全部下发给客户端之后, 则互联网服务器 发送的下行数据与客户端收到的下行数据的数量相同, 此时客户端针对接收 行数据的起始序列号恢复对应关系, 即恢复客户端与互联网服务器之间的序 列号同步。
在上面实施例中提到代理设备与客户端之间的无线空口速率可能会小于 代理设备与互联网服务器之间的固网速率, 除此之外, 在某些部署情形下或 者在某些特殊的情形下, 还可能出现代理设备与客户端之间的无线空口速率 大于代理设备与互联网服务器之间的固网速率的情景, 例如, 可能是固网出 现了一定的拥塞。 在这种情景下, 代理设备也需要緩存客户端发送给互联网 服务器的上行数据。 由于代理设备可能会緩存一部分互联网服务器发送给客 户端的下行数据, 这可能会导致客户端发送上行数据使用的应答序列号与互 联网服务器发送下行数据的起始序列号暂时失步。 也就是说, 客户端发送的 上行数据携带的应答序列号仅能体现了客户端接收到的下行数据, 而不能体 现代理设备緩存的下行数据, 基于此, 代理设备将客户端发送的上行数据转 发给互联网服务器时需要修改该上行数据携带的应答序列号, 具体修改为代 理设备对互联网服务器发送的最后一个下行数据进行确认应答时使用的应答 图 4为本发明实施例提供的又一种数据传输方法的流程图。如图 4所示, 本实施例的方法包括:
4a、 客户端与互联网服务器通过代理设备建立 TCP连接, 代理设备记录 该 TCP连接建立过程中的参数。
4b、 客户端与互联网服务器之间建立 TCP连接之后, 代理设备启动 TCP 代理功能。
上述步骤 4a和 4b可参见步骤 3a和 3b, 在此不再赘述。
4c、 互联网服务器通过代理设备向客户端发送的下行数据。
步骤 4c的具体实现可参见上述步骤 3c-步骤 3f的描述, 在此不再赘述。 4d、 客户端将向互联网服务器发送的上行数据发送给代理设备。
4e、 代理设备判断客户端发送的上行数据中的应答序列号与第二应答序 列号是否相同, 若不相同, 则修改客户端发送的上行数据中的应答序列号为 第二应答序列号。 其中, 第二应答序列号是指互联网服务器发送的最后一个 下行数据的终止序号加 1 , 最后一个下行数据的终止序号可由最后一个下行 数据的起始序号加上最后一个下行数据的长度再减 1获得。
其中, 代理设备判断客户端发送的上行数据中的应答序列号与第二应答 序列号是否相同方法有多种。 例如, 一种方式是: 检查代理设备本地是否緩 存有互联网服务器发送的下行数据, 如果緩存有下行数据, 可以确定客户端 发送的上行数据中的应答序列号与第二应答序列号不相同。 另一种方法是: 检查代理设备记录的代理设备针对最后一个下行数据进行的确认应答中的应 答序列号与客户端发送的上行数据中的应答序列号是否一致;若序号不一致, 可以确定客户端发送的上行数据中的应答序列号与第二应答序列号不相同。
可选的, 如果代理设备本地没有緩存互联网服务器发送给客户端的下行 数据, 或者是代理设备针对最后一个下行数据进行的确认应答中的应答序列 号与客户端发送的上行数据中的应答序列号一致,则代理设备可以不作修改, 直接将客户端发送的上行数据转发给互联网服务器。
4f、 代理设备将客户端发送的上行数据或修改应答序列号的上行数据发 送给互联网服务器。 图 5是针对图 4所示实施例的举例说明。 在图 5中, UESN表示客户端 发送上行数据的起始序列号, 客户端每发送 1个字节的上行数据该起始序列 号自动增加 1 ; SrSN表示互联网服务器向客户端发送下行数据的起始序列号, 互联网服务器每发送 1 个字节的下行数据该起始序列号自动增加 1。 如图 5 所示, 互联网服务器向客户端发送的首个下行数据的起始序列号是 Y, 终止 编号是 Y+al ;第二个下行数据的起始序列号是 Υ+al+l ,终止序列号是 Y+a2; 依次类推, 最后一个下行数据的起始序列号是 Y+a6+l , 终止序列号是 Y+a7。 终止序列号是起始序列号与下行数据长度相加再减去 1。
从图 5中可以看出,客户端接收到起始序列号为 Y+a4+l的下行数据(即 终止序列号为 Y+a5的下行数据)后向代理设备发送了一个长度为 k字节的 上行数据。 此时客户端未收到起始序列号为 Y+a5+l、 Y+a6+l的下行数据, 所以客户端认为互联网服务器一侧的起始序列号为 Y+a5+l ,在向互联网服务 器发送上行数据时会针对该起始序列号 Y+a4+l 的下行数据进行应答, 即会 在上行数据中携带应答序列号 Y+a5+l ;而互联网服务器已经收到代理设备对 起始序列号为 Y+a5+l、 Y+a6+l的确认应答, 因此互联网服务器认为的起始 序列号已经更新为 Y+a7+l , 由此可见, 客户端认为互联网服务器一侧的起始 序列号与互联网服务器一侧认为的起始序列号不再对应, 所以代理设备在接 收到客户端发送的上行数据后, 需要将上行数据中的应答序列号 Y+a5+l 修 改为 Y+a7+l。 显然, 客户端成功接收到起始序列号为 Y+a5+l、 Y+a6+l的两 个下行数据后客户端针对互联网服务器的下行数据进行应答的应答序列号与 互联网服务器认为的起始序列号将保持一致。
由于客户端的移动性, 客户端可能会从源网络切换到目标网络。 在发生 切换的情景下,将客户端在源网络中所附着的网络侧设备称为源网络侧设备, 将客户端在目标网络中所附着的网络侧设备称为目标网络侧设备。 从 TCP代 理功能来看, 客户端从源网络切换到目标网络包括以下四种情形: 1 )源网络 侧设备支持并启动了 TCP代理功能,目标网络侧设备支持并启动 TCP代理功 能; 2 ) 源网络侧设备支持但没有启动 TCP代理功能, 目标网络侧设备支持 并启动了 TCP代理功能; 3 ) 源网络侧设备支持并启动了 TCP代理功能, 目 标网络侧设备不支持 TCP代理功能或者是支持但没有启动 TCP代理功能; 4 ) 动 TCP代理功能。 在上述四种情形中, 本发明实施例仅关注前三种情形, 下 面将通过具体实施例说明基于 TCP代理功能的切换流程。
图 6为本发明实施例提供的又一种数据传输方法的流程图。如图 6所示, 本实施例的方法包括:
6a、 客户端与互联网服务器之间建立端到端的 TCP连接, 并通过该 TCP 连接进行数据传输, 本实施例以互联网服务器向客户端发送下行数据为例进 行说明。
具体的, 源网络侧设备可能支持并启动了 TCP代理功能, 也可能不支持 TCP代理功能或者支持但没有启动 TCP代理功能。如果源网络侧设备支持并 启动了 TCP代理功能, 则源网络侧设备可以按照图 1-图 3所示实施例中的有 关流程负责转发互联网服务器与客户端之间的数据, 具体不再赘述。 如果源 网络侧设备不支持或者支持但没有启动 TCP代理功能, 则源网络侧设备可以 像现有技术那样负责互联网服务器与客户端之间的数据传输。 无论是哪种情 况, 源网络侧设备都可以緩存客户端与互联网服务器之间的数据。
在此说明, 源网络侧设备是否启动 TCP代理功能对客户端与互联网服务 器来说是透明的。
6b、 客户端与源网络侧设备进行协商, 确定切换到目标网络侧设备上。 6c、 源网络侧设备将緩存的互联网服务器发送给客户端的下行数据提供 给目标网络侧设备。
在该步骤中, 源网络侧设备可能不支持 TCP代理功能, 或者支持但没有 启动 TCP代理功能, 此时, 源网络侧设备可以仅将緩存的下行数据转发给目 标网络侧设备。
或者, 源网络侧设备也可能支持并启动了 TCP代理功能, 则源网络侧设 备可以仅将緩存的下行数据转发给目标网络侧设备, 或者将緩存的下行数据 转发给目标网络侧设备, 并向目标网络侧设备发送启动代理指示, 以指示目 标网络侧设备启动 TCP代理功能。 可选的, 源网络侧设备可以通过独立的步 骤分别向目标网络侧设备发送緩存的下行数据和启动代理指示, 或者, 源网 络侧设备也可以通过同一步骤向目标网络侧设备发送所緩存的下行数据和启 动代理指示。
6d、 目标网络侧设备确定是否启动 TCP代理功能。 源网络侧设备提供的下行数据携带有源 IP地址、 目的 IP地址、 源端口 号、 目的端口号、 起始序列号以及应答序列号等信息, 故目标网络侧设备可 以根据源网络侧设备转发的下行数据, 获得客户端的 IP地址与端口号、 互联 网服务器的 IP地址与端口号, 客户端发送数据的起始序列号, 互联网服务器 发送数据的起始序号等参数。
可选的, 如果源网络侧设备向目标网络侧设备发送启动代理指示, 则目 标网络侧设备可以根据源网络侧设备下发的启动代理指示, 确定启动 TCP代 理功能。 或者, 目标网络侧设备可以根据客户端与互联网服务器之间的 TCP 连接对应的 QCI等参数, 确定启动 TCP代理功能。 目标网络侧设备可以获知 客户端与互联网服务器之间的 TCP连接对应的 QCI等参数。 或者,预先约定 目标网络侧设备对切换到其所在网络的客户端无条件启动 TCP代理功能, 则 目标网络侧设备可以直接确定启动 TCP代理功能。
6e、 目标网络侧设备转发互联网服务器发送给客户端的下行数据至客户 端。
具体的, 如果目标网络侧设备确定启动 TCP代理功能, 则可以根据从源 网络侧设备转发过来的下行数据中获取的客户端的 IP地址与端口号、 互联网 服务器的 IP地址与端口号, 客户端发送数据的起始序列号, 互联网服务器发 送数据的起始序号等参数, 按照图 2A-图 4所示实施例中的有关流程, 将互 联网服务器发送给客户端的下行数据转发至客户端。 如果目标网络侧设备不 启动 TCP代理功能,则可以通过客户端与互联网服务器之间的 TCP连接,将 互联网服务器发送给客户端的下行数据转发给客户端; 在该过程中, 目标网 络侧设备仅起到中继的作用。
6f、 客户端向目标网络侧设备发送确认应答。
由于源网络侧设备可能启动了 TCP代理功能, 并且已经代替客户端对转 发给目标网络侧设备的下行数据向互联网服务器发送了确认应答, 此时目标 网络侧设备无需再次向互联网服务器发送确认应答。
6g、 目标网络侧设备继续接收互联网服务器发送的下行数据, 并将接收 到的下行数据转发客户端。
在该步骤中, 如果目标网络侧设备启动了 TCP代理功能, 则可以按照图 2A-图 4所示实施例中的流程,将互联网服务器发送的下行数据转发至客户端 并代替客户端向互联网服务器进行确认等。
在此说明, 如果源网络侧设备支持并启动了 TCP代理功能, 可以作为上 述实施例中的客户端所在源网络中的代理设备实现; 如果目标网络侧设备支 持并启动了 TCP代理功能, 可以作为上述实施例中的客户端所在目标网络中 的代理设备实现。
本发明实施例提供的数据传输方法, 由于客户端与互联网服务器之间建 立 TCP的连接, 且代理设备与客户端通过无线方式交互, 代理设备与互联网 服务器之间通过有线方式交互, 代理设备基于客户端与互联网服务器之间的
TCP连接实现 TCP代理功能,代理设备与客户端之间以及代理设备与互联网 服务器之间均不需要建立独立的 TCP连接, 因此, 在客户端因为移动性发生 网络切换时, 客户端与互联网服务器之间的 TCP连接不会中断, 不需要重新 建立 TCP连接, 解决了现有技术中由于客户端的移动性造成客户端与代理设 备以及互联网服务器与代理设备之间的 TCP 连接需要中断后重新建立的问 题, 提供了一种不同于现有技术的、 且仍然通过代理设备进行数据传输的技 术。
图 7为本发明一实施例提供的代理设备的结构示意图。 如图 7所示, 所 述代理设备包括: 获取模块 71、 接收模块 72、 更新模块 73和发送模块 74。
获取模块 71 , 用于获取对应第一方向的第一方向起始序列号、 第一方向 应答序列号和对应第二方向的第二方向起始序列号; 其中, 第一设备与第二 设备之间建立传输控制协议 TCP的连接, 所述第一设备为客户端, 所述第二 设备为互联网服务器, 或者, 所述第一设备为互联网服务器, 所述第二设备 为客户端; 所述代理设备与所述客户端通过无线方式交互, 所述代理设备与 所述互联网服务器通过有线方式交互; 其中,
所述第一方向为所述第一设备向所述第二设备发送数据的方向, 所述第 二方向为所述第二设备向所述第一设备发送数据的方向; 其中,
所述第一方向起始序列号为所述第一方向的起始数据所对应的起始序 号, 所述第一方向的起始数据为上一次緩存在所述代理设备中、 且在所述第 一方向上传输的第一个数据;
所述第一方向应答序列号为所述第一方向的终止数据所对应的终止序号 加 1 , 所述第一方向的终止数据为上一次緩存在所述代理设备中、 且在所述 第一方向上传输的最后一个数据;
所述第二方向起始序列号为所述第二方向的起始数据所对应的起始序 号, 所述第二方向的起始数据为上一次緩存在所述代理设备中、 且在所述第 二方向上传输的第一个数据。
接收模块 72, 与获取模块 71连接, 用于在获取模块 71获取所述第一方 向起始序列号、 所述第一方向应答序列号和所述第二方向起始序列号之后, 接收所述第一设备在所述第一方向上发送给所述第二设备的第一数据。其中 , 所述第一数据可以是客户端发送给互联网服务器的上行数据, 或者可以是互 联网服务器发送给客户端的下行数据。
更新模块 73 , 与获取模块 71和接收模块 72连接, 用于将获取模块 71 获取的所述第一方向应答序列号更新为接收模块 72接收的所述第一数据的 终止序号加 1。
发送模块 74, 与获取模块 71和更新模块 73连接, 用于根据更新模块 73 更新后的第一方向应答序列号和获取模块 71 获取的所述第二方向起始序列 号向所述第一设备发送第一确认应答。
发送模块 74, 还与接收模块 72连接, 还用于将接收模块 72接收的所述 第一数据转发给所述第二设备。
更新模块 73 , 还用于将获取模块 71获取的所述第一方向起始序列号更 新为所述第一方向应答序列号。这里的第一方向应答序列号是获取模块 71所 获取的第一方向应答序列号, 而不是更新后的第一方向应答序列号。
在一可选实施方式中, 获取模块 71 , 还用于获取对应第二方向的第二方 向应答序列号; 其中, 所述第二方向应答序列号为所述第二方向的终止数据 所对应的终止序号加 1 , 所述第二方向的终止数据为上一次緩存在所述代理 设备中、 且在所述第二方向上的最后一个数据。
基于此, 接收模块 72, 还用于在获取模块 71获取所述第二方向应答序 列号之后, 接收所述第二设备在所述第二方向上发送给所述第一设备的第二 数据。 更新模块 73 , 还用于将获取模块 71获取的所述第二方向应答序列号 更新为接收模块 72接收的所述第二数据的终止序号加 1。 发送模块 74还用 于根据更新模块 73更新后的第二方向应答序列号和获取模块 71获取的所述 第一方向起始序列号向所述第二设备发送第二确认应答。发送模块 74还用于 将接收模块 72接收的第二数据转发给所述第一设备。 更新模块 73还用于将 获取模块 71 获取的所述第二方向起始序列号更新为所述第二方向应答序列 号。 这里的第二方向应答序列号是获取模块 71 所获取的第二方向应答序列 号, 而不是更新后的第二方向应答序列号。
进一步, 如图 8所示, 所述代理设备还包括: 判断模块 75。 该判断模块
75 , 用于确定所述第二数据中的应答序列号与所述第二方向应答序列号是否 相同。 更新模块 73用于将获取模块 71获取的所述第二方向应答序列号更新 为接收模块 72接收的所述第二数据的终止序号加 1 , 包括: 更新模块 73具 体用于在判断模块 75 确定所述第二数据中的应答序列号与所述第二方向应 答序列号不相同时, 将所述第二方向应答序列号更新为所述第二数据的终止 序号加 1。 判断模块 75与接收模块 72、 获取模块 71以及更新模块 73连接。
可选的, 判断模块 75具体可用于: 判断本地是否緩存有所述第一数据, 如果判断结果为是, 确定所述第二数据中的应答序列号与所述第二方向应答 序列号不相同。
进一步,如图 8所示, 所述代理设备还包括: 记录模块 76。记录模块 76, 用于记录所述第一确认应答中的应答序列号。基于此, 判断模块 75具体可用 于:如果确定出记录模块 76记录的第一确认应答中的应答序列号与接收模块 72接收的第二数据中的应答序列号不相同, 则确定所述第二数据中的应答序 列号与所述第二方向应答序列号不相同。判断模块 75还与记录模块 76连接。
在一可选实施方式中, 获取模块 71具体可用于: 记录 TCP连接建立过 程中的参数, 从所记录的参数中获取所述第一方向起始序列号、 所述第一方 向应答序列号、 所述第二方向起始序列号和所述第二方向应答序列号; 所述 TCP连接建立过程是指所述客户端与所述互联网服务器通过所述代理设备建 立所述 TCP连接的过程。 在该实施方式中, 客户端与互联网服务器通过所述 代理设备建立 TCP连接。
在一可选实施方式中, 获取模块 71具体可用于: 从接收模块 72在所述 客户端从源网络侧设备切换到所述代理设备时, 接收的下行数据中获取所述 第一方向起始序列号、 所述第一方向应答序列号、 所述第二方向起始序列号 和所述第二方向应答序列号, 其中, 所述下行数据是所述互联网服务器向所 述客户端发送的、 且通过所述源网络侧设备转发的并緩存于所述源网络侧设 备中的下行数据, 所述源网络侧设备是在发生切换前所述客户端所附着的网 络侧设备, 所述代理设备是发生切换后所述客户端所附着的网络侧设备。 相 应地, 接收模块 72, 还用于在所述客户端从源网络侧设备切换到所述代理设 备时, 接收所述源网络侧设备转发的、 且緩存于所述源网络侧设备的所述互 联网服务器向所述客户端发送的下行数据, 并提供给获取模块 71。
在一可选实施方式中, 发送模块 74, 还用于在所述客户端从所述代理设 备切换到目标网络侧设备时, 向所述目标网络侧设备发送尚緩存于所述代理 设备的、 且所述互联网服务器向所述客户端发送的下行数据, 以使所述目标 网络侧设备继续转发所接收的下行数据至所述客户端; 其中, 所述代理设备 是发生切换前所述客户端所附着的网络侧设备, 所述目标网络侧设备是发生 切换后所述客户端所附着的网络侧设备。
本实施例提供的代理设备的各功能模块可用于执行图 2A-图 6所示方法 实施例中的流程, 其具体工作原理不再赘述, 详见方法实施例的描述。
本实施例提供的代理设备, 与客户端通过无线方式交互, 与互联网服务 器之间通过有线方式交互, 客户端与互联网服务器之间建立 TCP的连接, 本 实施例的代理设备获取客户端向互联网服务器发送数据的起始序列号和应答 序列号以及互联网服务器向客户端发送数据的起始序列号, 或者获取互联网 服务器向客户端发送数据的起始序列号和应答序列号以及客户端向互联网服 务器发送数据的起始序列号,并根据所获取的相应起始序列号和应答序列号, 将互联网服务器发送给客户端的数据转发给客户端或者将客户端发送给互联 网服务器的数据转发给互联网服务器, 并更新相应的起始序列号和应答序列 号, 实现对互联网服务器与客户端之间的数据的转发, 由于本实施例的代理 设备并未分别与客户端和互联网服务器真正建立 TCP的连接, 数据的传输都 ^^于客户端与互联网服务器之间的 TCP连接进行的, 在数据传输过程中并 未涉及到由于客户端的移动性引起的 TCP连接的中断与重新建立, 所以数据 传输不会造成中断, 不会影响无线网络的服务质量。
图 9为本发明实施例提供的又一种代理设备的结构示意图。如图 9所示, 所述代理设备包括: 处理器 91、 接收器 92和发射器 93。
处理器 91 , 用于获取对应第一方向的第一方向起始序列号、 第一方向应 答序列号和对应第二方向的第二方向起始序列号; 其中, 第一设备与第二设 备之间建立传输控制协议 TCP的连接, 所述第一设备为客户端, 所述第二设 备为互联网服务器, 或者, 所述第一设备为互联网服务器, 所述第二设备为 客户端; 所述代理设备与所述客户端通过无线方式交互, 所述代理设备与所 述互联网服务器通过有线方式交互; 其中,
所述第一方向为所述第一设备向所述第二设备发送数据的方向, 所述第 二方向为所述第二设备向所述第一设备发送数据的方向; 其中,
所述第一方向起始序列号为所述第一方向的起始数据所对应的起始序 号, 所述第一方向的起始数据为上一次緩存在所述代理设备中、 且在所述第 一方向上传输的第一个数据;
所述第一方向应答序列号为所述第一方向的终止数据所对应的终止序号 加 1 , 所述第一方向的终止数据为上一次緩存在所述代理设备中、 且在所述 第一方向上传输的最后一个数据;
所述第二方向起始序列号为所述第二方向的起始数据所对应的起始序 号, 所述第二方向的起始数据为上一次緩存在所述代理设备中、 且在所述第 二方向上传输的第一个数据。
接收器 92, 用于接收所述第一设备在所述第一方向上发送给所述第二设 备的第一数据。
处理器 91 , 还用于将所述第一方向应答序列号更新为所述接收器接收的 第一数据的终止序号加 1。
发射器 93 , 用于根据处理器 91 更新后的第一方向应答序列号和处理器
91获取的所述第二方向起始序列号向所述第一设备发送第一确认应答。
发射器 93 , 还用于将接收器 92接收的第一数据转发给所述第二设备。 处理器 91 , 还用于将所述第一方向起始序列号更新为所述第一方向应答 序列号。这里的第一方向应答序列号是处理器 91所获取的第一方向应答序列 号, 而不是更新后的第一方向应答序列号。
可选的, 处理器 91还用于获取对应第二方向的第二方向应答序列号; 其 中, 所述第二方向应答序列号为所述第二方向的终止数据所对应的终止序号 加 1 , 所述第二方向的终止数据为上一次緩存在所述代理设备中、 且在所述 第二方向上的最后一个数据。 基于此, 接收器 92还用于在处理器 91获取所 述第二方向应答序列号之后, 接收所述第二设备在所述第二方向上发送给所 述第一设备的第二数据。 处理器 91 , 还用于将所述第二方向应答序列号更新 为所述第二数据的终止序号加 1。 发射器 93 , 还用于根据处理器 91更新后的 第二方向应答序列号和所述第一方向起始序列号向所述第二设备发送第二确 认应答。 发射器 93 , 还用于将接收器 92所接收的第二数据转发给所述第一 设备。 处理器 91 , 还用于将所述第二方向起始序列号更新为所述第二方向应 答序列号。这里的第二方向应答序列号是处理器 91所获取的第二方向应答序 列号, 而不是更新后的第二方向应答序列号。
可选的, 处理器 91 , 还用于确定所述第二数据中的应答序列号与所述第 二方向应答序列号是否相同。处理器 91用于将所述第二方向应答序列号更新 为所述第二数据的终止序号加 1 , 包括: 处理器 91具体用于在确定所述第二 数据中的应答序列号与所述第二方向应答序列号不相同时, 将所述第二方向 应答序列号更新为所述第二数据的终止序号加 1。
可选的, 处理器 91具体可用于: 判断本地是否緩存有所述第一数据, 如 果判断结果为是, 确定所述第二数据中的应答序列号与所述第二方向应答序 列号不相同, 然后将所述第二方向应答序列号更新为所述第二数据的终止序 号加 1。 或者,
处理器 92还用于在发射器 93发送所述第一确定应答之后, 记录所述第 一确认应答中的应答序列号。 基于此, 处理器 92具体可用于: 如果确定出所 述记录的第一确认应答中的应答序列号与所述第二数据中的应答序列号不相 同,则确定所述第二数据中的应答序列号与所述第二方向应答序列号不相同。
在一可选实施方式中, 处理器 91用于获取第一方向起始序列号、 第一方 向应答序列号、 第二方向起始序列号和第二方向应答序列号, 包括: 处理器 91具体可用于记录 TCP连接建立过程中的参数,从所记录的参数中获取所述 第一方向起始序列号、 所述第一方向应答序列号、 所述第二方向起始序列号 和所述第二方向应答序列号; 所述 TCP连接建立过程是指所述客户端与所述 互联网服务器通过所述代理设备建立所述 TCP连接的过程。在该实施方式中, 客户端与互联网服务器通过所述代理设备建立 TCP连接。
在一可选实施方式中, 处理器 91用于获取第一方向起始序列号、 第一方 向应答序列号、 第二方向起始序列号和第二方向应答序列号, 包括: 处理器 91 具体可用于从接收器 92在所述客户端从源网络侧设备切换到所述代理设 备时, 所接收的下行数据中获取所述第一方向起始序列号、 所述第一方向应 答序列号、 所述第二方向起始序列号和所述第二方向应答序列号, 所述下行 数据为所述源网络侧设备转发的、 且緩存于所述源网络侧设备的所述互联网 服务器向所述客户端发送的下行数据, 其中, 所述源网络侧设备是在发生切 换前所述客户端所附着的网络侧设备, 所述代理设备是发生切换后所述客户 端所附着的网络侧设备。接收器 92还用于在所述客户端从源网络侧设备切换 到所述代理设备时, 接收所述源网络侧设备转发的、 且緩存于所述源网络侧 设备的所述互联网服务器向所述客户端发送的下行数据,并提供给处理器 91。
进一步,发送器 92还用于在所述客户端从所述代理设备切换到目标网络 侧设备时, 向所述目标网络侧设备发送尚緩存于所述代理设备的、 且所述互 联网服务器向所述客户端发送的下行数据, 以使所述目标网络侧设备继续转 发所接收的下行数据至所述客户端; 其中, 所述代理设备是发生切换前所述 客户端所附着的网络侧设备, 所述目标网络侧设备是发生切换后所述客户端 所附着的网络侧设备。
进一步, 如图 9所示, 所述代理设备还包括: 存储器 94。 存储器 94, 用 于存储程序。 具体地, 程序可以包括程序代码, 所述程序代码包括计算机操 作指令。 存储器 94可能包含高速 RAM存储器, 也可能还包括非易失性存储 器 ( non- volatile memory ) , 例如至少一个磁盘存 4诸器。
可选的, 在具体实现上, 如果处理器 91、 接收器 92、 发射器 93和存储 器 94独立实现, 则处理器 91、 接收器 92、 发射器 93和存储器 94可以通过 总线相互连接并完成相互间的通信。 所述总线可以是工业标准体系结构 ( Industry Standard Architecture,简称为 ISA )总线、夕卜部设备互连 ( Peripheral Component, 简称为 PCI ) 总线或扩展工业标准体系结构 (Extended Industry Standard Architecture, 简称为 EISA ) 总线等。 所述总线可以分为地址总线、 数据总线、 控制总线等。 为便于表示, 图 9中仅用一条粗线表示, 但并不表 示仅有一根总线或一种类型的总线。
可选的, 在具体实现上, 如果处理器 91、 接收器 92、 发射器 93和存储 器 94集成在一块芯片上实现, 则处理器 91、 接收器 92、 发射器 93和存储器 94可以通过内部接口完成相同间的通信。
本实施例提供的代理设备可用于执行图 2A-图 6所示方法实施例中的流 程, 其具体工作原理不再赘述, 详见方法实施例的描述。
本实施例提供的代理设备, 与客户端通过无线方式交互, 与互联网服务 器之间通过有线方式交互, 客户端与互联网服务器之间建立 TCP的连接, 本 实施例的代理设备获取客户端向互联网服务器发送数据的方向上的起始序列 号和应答序列号以及互联网服务器向客户端发送数据的方向上的起始序列 号, 或者获取互联网服务器向客户端发送数据的方向上的起始序列号和应答 序列号以及客户端向互联网服务器发送数据的方向上的起始序列号, 并根据 所获取的相应方向上的起始序列号和应答序列号, 将互联网服务器发送给客 户端的数据转发给客户端或者将客户端发送给互联网服务器的数据转发给互 联网服务器, 并更新相应的起始序列号和应答序列号, 实现对互联网服务器 与客户端之间的数据的转发, 由于本实施例的代理设备并未分别与客户端和 互联网服务器真正建立 TCP的连接, 数据的传输都^^于客户端与互联网服 务器之间的 TCP连接进行的, 在数据传输过程中并未涉及到由于客户端的移 动性引起的 TCP连接的中断与重新建立, 所以数据传输不会造成中断, 不会 影响无线网络的服务质量。
本发明实施例提供一种数据传输系统, 包括: 第一设备、 第二设备、 以 及图 7或图 8所示的代理设备。
进一步, 所述第一设备可以是客户端, 所述第二设备可以是互联网服务 器, 或者所述第一设备可以是互联网服务器, 则所述第二设备可以是客户端。 关于客户端、 服务器以及代理设备相互配合进行数据传输的过程可参见上述 方法实施例的描述, 在此不再赘述。 本实施例提供的数据传输系统同样不会 影响无线网络的服务质量。
本领域普通技术人员可以理解: 实现上述方法实施例的全部或部分步骤 可以通过程序指令相关的硬件来完成, 前述的程序可以存储于一计算机可读 取存储介质中, 该程序在执行时, 执行包括上述方法实施例的步骤; 而前述 的存储介质包括: ROM, RAM, 磁碟或者光盘等各种可以存储程序代码的介 质。
最后应说明的是: 以上各实施例仅用以说明本发明的技术方案, 而非对 其限制; 尽管参照前述各实施例对本发明进行了详细的说明, 本领域的普通 技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改, 或者对其中部分或者全部技术特征进行等同替换; 而这些修改或者替换, 并 不使相应技术方案的本质脱离本发明各实施例技术方案的范围。

Claims

权 利 要求 书
1、 一种数据传输方法, 其特征在于, 包括:
第一设备与第二设备之间建立传输控制协议 TCP的连接, 其中, 所述第 一设备为客户端, 所述第二设备为互联网服务器, 或者, 所述第一设备为互 联网服务器, 所述第二设备为客户端;
代理设备与所述客户端通过无线方式交互, 所述代理设备与所述互联网 服务器通过有线方式交互;
所述代理设备获取对应第一方向的第一方向起始序列号、 第一方向应答 序列号和对应第二方向的第二方向起始序列号, 其中, 所述第一方向为所述 第一设备向所述第二设备发送数据的方向, 所述第二方向为所述第二设备向 所述第一设备发送数据的方向; 其中,
所述第一方向起始序列号为所述第一方向的起始数据所对应的起始序 号, 所述第一方向的起始数据为上一次緩存在所述代理设备中、 且在所述第 一方向上传输的第一个数据;
所述第一方向应答序列号为所述第一方向的终止数据所对应的终止序号 加 1 , 所述第一方向的终止数据为上一次緩存在所述代理设备中、 且在所述 第一方向上传输的最后一个数据;
所述第二方向起始序列号为所述第二方向的起始数据所对应的起始序 号, 所述第二方向的起始数据为上一次緩存在所述代理设备中、 且在所述第 二方向上传输的第一个数据;
所述代理设备接收所述第一设备在所述第一方向上发送给所述第二设备 的第一数据, 将所述第一方向应答序列号更新为所述第一数据的终止序号加 1 ;
所述代理设备根据所述更新后的第一方向应答序列号和所述第二方向起 始序列号向所述第一设备发送第一确认应答;
所述代理设备将所述第一数据转发给所述第二设备, 并将所述第一方向 起始序列号更新为所述第一方向应答序列号。
2、根据权利要求 1所述的数据传输方法,其特征在于,所述方法还包括: 所述代理设备获取对应第二方向的第二方向应答序列号; 其中, 所述第二方向应答序列号为所述第二方向的终止数据所对应的终止序号 加 1 , 所述第二方向的终止数据为上一次緩存在所述代理设备中、 且在所述 第二方向上的最后一个数据;
所述代理设备接收所述第二设备在所述第二方向上发送给所述第一设备 的第二数据, 将所述第二方向应答序列号更新为所述第二数据的终止序号加 1 ;
所述代理设备根据所述更新后的第二方向应答序列号和所述第一方向的 起始序列号向所述第二设备发送第二确认应答;
所述代理设备将所述第二数据转发给所述第一设备, 并将所述第二方向 起始序列号更新为所述第二方向应答序列号。
3、 根据权利要求 2所述的数据传输方法, 其特征在于, 所述代理设备将 所述第二方向应答序列号更新为所述第二数据的终止序号加 1之前,还包括: 所述代理设备确定所述第二数据中的应答序列号与所述第二方向应答序 列号不相同。
4、 根据权利要求 3所述的数据传输方法, 其特征在于, 所述代理设备确 定所述第二数据中的应答序列号与所述第二方向应答序列号不相同, 包括: 所述代理设备判断本地是否緩存有所述第一数据, 如果判断结果为是, 确定所述第二数据中的应答序列号与所述第二方向应答序列号不相同。
5、根据权利要求 3所述的数据传输方法,其特征在于,所述方法还包括: 所述代理设备记录所述第一确认应答中的应答序列号;
所述代理设备确定所述第二数据中的应答序列号与所述第二方向应答序 列号不相同, 包括:
如果所述代理设备确定出所述第一确认应答中的应答序列号与所述第二 数据中的应答序列号不相同, 则确定所述第二数据中的应答序列号与所述第 二方向应答序列号不相同。
6、 根据权利要求 2-5任一项所述的数据传输方法, 其特征在于, 所述代 理设备获取对应第一方向的第一方向起始序列号、 第一方向应答序列号、 对 应第二方向的第二方向起始序列号及第二方向应答序列号, 包括:
所述代理设备在所述客户端从源网络侧设备切换到所述代理设备时, 接 收下行数据, 从所述下行数据中获取所述第一方向起始序列号、 所述第一方 向应答序列号、 所述第二方向起始序列号和所述第二方向应答序列号, 其中, 所述下行数据是源网络侧设备转发的、 且緩存于所述源网络侧设备的所述互 联网服务器向所述客户端发送的的下行数据, 所述源网络侧设备是在发生切 换前所述客户端所附着的网络侧设备, 所述代理设备是发生切换后所述客户 端所附着的网络侧设备。
7、 根据权利要求 1-5任一项所述的数据传输方法, 其特征在于, 所述方 法还包括:
所述代理设备在所述客户端从所述代理设备切换到目标网络侧设备时, 向所述目标网络侧设备发送尚緩存于所述代理设备的、 且所述互联网服务器 向所述客户端发送的下行数据, 以使所述目标网络侧设备继续转发所接收的 下行数据至所述客户端; 其中, 所述代理设备是发生切换前所述客户端所附 着的网络侧设备, 所述目标网络侧设备是发生切换后所述客户端所附着的网 络侧设备。
8、 一种代理设备, 其特征在于, 包括:
获取模块, 用于获取对应第一方向的第一方向起始序列号、 第一方向应 答序列号和对应第二方向的第二方向起始序列号; 其中, 第一设备与第二设 备之间建立传输控制协议 TCP的连接, 所述第一设备为客户端, 所述第二设 备为互联网服务器, 或者, 所述第一设备为互联网服务器, 所述第二设备为 客户端; 所述代理设备与所述客户端通过无线方式交互, 所述代理设备与所 述互联网服务器通过有线方式交互; 其中,
所述第一方向为所述第一设备向所述第二设备发送数据的方向, 所述第 二方向为所述第二设备向所述第一设备发送数据的方向;
所述第一方向起始序列号为所述第一方向的起始数据所对应的起始序 号, 所述第一方向的起始数据为上一次緩存在所述代理设备中、 且在所述第 一方向上传输的第一个数据;
所述第一方向应答序列号为所述第一方向的终止数据所对应的终止序号 加 1 , 所述第一方向的终止数据为上一次緩存在所述代理设备中、 且在所述 第一方向上传输的最后一个数据;
所述第二方向起始序列号为所述第二方向的起始数据所对应的起始序 号, 所述第二方向的起始数据为上一次緩存在所述代理设备中、 且在所述第 二方向上传输的第一个数据; 接收模块, 用于接收所述第一设备在所述第一方向上发送给所述第二设 备的第一数据;
更新模块: 用于将所述获取模块获取的所述第一方向应答序列号更新为 所述接收模块接收的第一数据的终止序号加 1 ;
发送模块, 用于根据所述更新模块更新后的第一方向应答序列号和所述 获取模块获取的所述第二方向起始序列号向所述第一设备发送第一确认应 答;
所述发送模块 , 还用于将所述接收模块接收的第一数据转发给所述第二 设备;
所述更新模块, 还用于将所述获取模块获取的第一方向起始序列号更新 为所述第一方向应答序列号。
9、 根据权利要求 8所述的代理设备, 其特征在于,
所述获取模块, 还用于获取对应第二方向的第二方向应答序列号; 其中, 所述第二方向应答序列号为所述第二方向的终止数据所对应的终止序号 加 1 , 所述第二方向的终止数据为上一次緩存在所述代理设备中、 且在所述 第二方向上的最后一个数据;
所述接收模块, 还用于接收所述第二设备在所述第二方向上发送给所述 第一设备的第二数据;
所述更新模块, 还用于将所述获取模块获取的第二方向应答序列号更新 为所述接收模块接收的第二数据的终止序号加 1;
所述发送模块, 还用于根据所述更新模块更新后的第二方向应答序列号 和所述获取模块获取的第一方向起始序列号向所述第二设备发送第二确认应 答;
所述发送模块 , 还用于将所述接收模块接收的第二数据转发给所述第 ― 设备;
所述更新模块, 还用于将所述获取模块获取的所述第二方向起始序列号 更新为所述第二方向应答序列号。
10、 根据权利要求 9所述的代理设备, 其特征在于, 所述代理设备还包 括:
判断模块, 用于确定所述接收模块接收的第二数据中的应答序列号与所 述第二方向应答序列号是否相同。
11、 根据权利要求 10所述的代理设备, 其特征在于, 所述判断模块具体 用于判断本地是否緩存有所述第一数据, 如果判断结果为是, 确定所述第二 数据中的应答序列号与所述第二方向应答序列号不相同。
12、 根据权利要求 10所述的代理设备, 其特征在于, 所述代理设备还包 括:
记录模块, 用于记录所述第一确认应答中的应答序列号;
所述判断模块具体用于:
如果确定出所述记录模块记录的第一确认应答中的应答序列号与所述接 收模块接收的第二数据中的应答序列号不相同, 则确定所述第二数据中的应 答序列号与所述第二方向应答序列号不相同。
13、 根据权利要求 9-12任一项所述的代理设备, 其特征在于, 所述获取 模块具体用于:
从所述接收模块在所述客户端从源网络侧设备切换到所述代理设备时, 接收的下行数据中获取所述第一方向起始序列号、所述第一方向应答序列号、 所述第二方向起始序列号和所述第二方向应答序列号, 其中, 所述下行数据 包括所述源网络侧设备转发的、 且緩存于所述源网络侧设备的所述互联网服 务器向所述客户端发送的下行数据, 所述源网络侧设备是在发生切换前所述 客户端所附着的网络侧设备, 所述代理设备是发生切换后所述客户端所附着 的网络侧设备。
14、 根据权利要求 8-13任一项所述的代理设备, 其特征在于, 所述发送 模块, 还用于在所述客户端从所述代理设备切换到目标网络侧设备时, 向所 述目标网络侧设备发送尚緩存于所述代理设备的、 且所述互联网服务器向所 述客户端发送的下行数据, 以使所述目标网络侧设备继续转发所接收的下行 数据至所述客户端; 其中, 所述代理设备是发生切换前所述客户端所附着的 网络侧设备, 所述目标网络侧设备是发生切换后所述客户端所附着的网络侧 设备。
15、 一种数据传输系统, 其特征在于, 包括第一设备、 第二设备及权利 要求 8-14任一项所述的代理设备。
16、 一种代理设备, 其特征在于, 包括: 处理器, 用于获取对应第一方向的第一方向起始序列号、 第一方向应答 序列号和对应第二方向的第二方向起始序列号; 其中, 第一设备与第二设备 之间建立传输控制协议 TCP的连接, 所述第一设备为客户端, 所述第二设备 为互联网服务器, 或者, 所述第一设备为互联网服务器, 所述第二设备为客 户端; 所述代理设备与所述客户端通过无线方式交互, 所述代理设备与所述 互联网服务器通过有线方式交互; 其中,
所述第一方向为所述第一设备向所述第二设备发送数据的方向, 所述第 二方向为所述第二设备向所述第一设备发送数据的方向;
所述第一方向起始序列号为所述第一方向的起始数据所对应的起始序 号, 所述第一方向的起始数据为上一次緩存在所述代理设备中、 且在所述第 一方向上传输的第一个数据;
所述第一方向应答序列号为所述第一方向的终止数据所对应的终止序号 加 1 , 所述第一方向的终止数据为上一次緩存在所述代理设备中、 且在所述 第一方向上传输的最后一个数据;
所述第二方向起始序列号为所述第二方向的起始数据所对应的起始序 号, 所述第二方向的起始数据为上一次緩存在所述代理设备中、 且在所述第 二方向上传输的第一个数据;
接收器, 用于接收所述第一设备在所述第一方向上发送给所述第二设备 的第一数据;
所述处理器, 还用于将所述第一方向应答序列号更新为所述接收器接收 的第一数据的终止序号加 1 ;
发射器, 用于根据所述处理器更新后的第一方向应答序列号和所述处理 器获取的所述第二方向起始序列号向所述第一设备发送第一确认应答;
所述发射器,还用于将所述接收器接收的第一数据转发给所述第二设备; 所述处理器, 还用于将所述第一方向起始序列号更新为所述第一方向应 答序列号。
17、 根据权利要求 16所述的代理设备, 其特征在于,
所述处理器, 还用于获取对应第二方向的第二方向应答序列号; 其中, 所述第二方向应答序列号为所述第二方向的终止数据所对应的终止序号 加 1 , 所述第二方向的终止数据为上一次緩存在所述代理设备中、 且在所述 第二方向上的最后一个数据;
所述接收器, 还用于接收所述第二设备在所述第二方向上发送给所述第 一设备的第二数据;
所述处理器, 还用于将所述获取的第二方向应答序列号更新为所述接收 器接收的第二数据的终止序号加 1 ;
所述发射器, 还用于根据所述处理器更新后的第二方向应答序列号和所 述第一方向起始序列号向所述第二设备发送第二确认应答;
所述发射器,还用于将所述接收器接收的第二数据转发给所述第一设备; 所述处理器, 还用于将所述第二方向起始序列号更新为所述第二方向应 答序列号。
18、 根据权利要求 17所述的代理设备, 其特征在于, 所述处理器还用于 确定所述第二数据中的应答序列号与所述第二方向应答序列号是否相同。
19、 根据权利要求 18所述的代理设备, 其特征在于, 所述处理器具体用 于判断本地是否緩存有所述第一数据, 如果判断结果为是, 确定所述第二数 据中的应答序列号与所述第二方向应答序列号不相同。
20、 根据权利要求 17所述代理设备, 其特征在于,
所述处理器, 还用于记录所述第一确认应答中的应答序列号;
所述处理器具体用于:
如果确定出所述记录的第一确认应答中的应答序列号与所述第二数据中 的应答序列号不相同, 则确定所述第二数据中的应答序列号与所述第二方向 应答序列号不相同。
21、 根据权利要求 17-20任一项所述的代理设备, 其特征在于, 所述处 理器具体用于从所述接收器在所述客户端从源网络侧设备切换到所述代理设 备时, 接收的下行数据中获取所述第一方向起始序列号、 所述第一方向应答 序列号、 所述第二方向起始序列号和所述第二方向应答序列号, 其中, 所述 下行数据包括所述源网络侧设备转发的、 且緩存于所述源网络侧设备的所述 互联网服务器向所述客户端发送的下行数据, 所述源网络侧设备是在发生切 换前所述客户端所附着的网络侧设备, 所述代理设备是发生切换后所述客户 端所附着的网络侧设备。
22、 根据权利要求 16-21 任一项所述的代理设备, 其特征在于, 所述发 送器还用于, 在所述客户端从所述代理设备切换到目标网络侧设备时, 向所 述目标网络侧设备发送尚緩存于所述代理设备的、 且所述互联网服务器向所 述客户端发送的下行数据, 以使所述目标网络侧设备继续转发所接收的下行 数据至所述客户端; 其中, 所述代理设备是发生切换前所述客户端所附着的 网络侧设备, 所述目标网络侧设备是发生切换后所述客户端所附着的网络侧 设备。
PCT/CN2013/071894 2013-02-26 2013-02-26 数据传输方法、系统及代理设备 WO2014131153A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
PCT/CN2013/071894 WO2014131153A1 (zh) 2013-02-26 2013-02-26 数据传输方法、系统及代理设备
CN201380001851.1A CN104170346B (zh) 2013-02-26 2013-02-26 数据传输方法、系统及代理设备
EP13876713.2A EP2953310B1 (en) 2013-02-26 2013-02-26 Method, system, and proxy device for data transmission
US14/836,610 US10104179B2 (en) 2013-02-26 2015-08-26 Data transmission method and system, and proxy device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2013/071894 WO2014131153A1 (zh) 2013-02-26 2013-02-26 数据传输方法、系统及代理设备

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/836,610 Continuation US10104179B2 (en) 2013-02-26 2015-08-26 Data transmission method and system, and proxy device

Publications (1)

Publication Number Publication Date
WO2014131153A1 true WO2014131153A1 (zh) 2014-09-04

Family

ID=51427458

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/071894 WO2014131153A1 (zh) 2013-02-26 2013-02-26 数据传输方法、系统及代理设备

Country Status (4)

Country Link
US (1) US10104179B2 (zh)
EP (1) EP2953310B1 (zh)
CN (1) CN104170346B (zh)
WO (1) WO2014131153A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3229552A4 (en) * 2014-12-01 2017-10-25 Samsung Electronics Co., Ltd. Method and apparatus for configuring disconnected tcp connection in communication system, handover support method and apparatus therefor
CN109474537A (zh) * 2017-09-08 2019-03-15 中兴通讯股份有限公司 数据传输方法、电子设备及计算机可读存储介质
US10425868B2 (en) 2014-12-19 2019-09-24 Huawei Technologies Co., Ltd. Apparatus, system, and method for preventing TCP connection interruption
US11088957B2 (en) * 2016-10-28 2021-08-10 Telefonaktiebolaget Lm Ericsson (Publ) Handling of data packet transfer via a proxy

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104753980B (zh) * 2013-12-26 2018-04-27 腾讯科技(深圳)有限公司 数据传输方法及相关装置和通信系统
US20160262205A1 (en) * 2015-03-06 2016-09-08 Apple Inc. Cloud support for discovery and data transfer for mobile client devices
CN107431965B (zh) * 2015-03-28 2020-06-26 华为技术有限公司 一种实现传输控制协议tcp传输的方法及装置
KR102358232B1 (ko) * 2015-05-15 2022-02-04 삼성전자주식회사 무선 통신 시스템에서 초기 윈도우 값을 설정하는 방법 및 장치
EP3383092A4 (en) * 2015-12-24 2018-11-21 Huawei Technologies Co., Ltd. Method of transmitting data and network equipment
WO2018176336A1 (zh) 2017-03-30 2018-10-04 华为技术有限公司 数据传输方法和通信设备
CN107682123A (zh) * 2017-10-23 2018-02-09 蒋丁贵 一种通信系统和方法
CN109274530B (zh) * 2018-09-05 2022-03-22 杭州安恒信息技术股份有限公司 基于tcp协议的网络数据包零误差场景再现方法和装置
CN111294859B (zh) * 2019-05-24 2021-09-07 展讯通信(上海)有限公司 数据分组的传输方法及装置、存储介质、终端
US11552898B2 (en) * 2019-09-27 2023-01-10 Amazon Technologies, Inc. Managing data throughput in a distributed endpoint network
US11425042B2 (en) 2019-09-27 2022-08-23 Amazon Technologies, Inc. Managing data throughput in a distributed endpoint network
CN112073206B (zh) * 2020-10-26 2022-08-16 上交所技术有限责任公司 一种基于可编程网络硬件设备实现面向可靠组播的数据包过滤方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007095967A1 (en) * 2006-02-27 2007-08-30 Telefonaktiebolaget Lm Ericsson (Publ) Flow control mechanism using local and global acknowledgements
JP2008172521A (ja) * 2007-01-11 2008-07-24 Mitsubishi Electric Corp 通信装置および通信システム
CN102026281A (zh) * 2010-12-21 2011-04-20 大唐移动通信设备有限公司 基于rnc实现tcp代理的方法及装置
CN102355462A (zh) * 2011-10-09 2012-02-15 大唐移动通信设备有限公司 一种实现tcp传输的方法及装置

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030110279A1 (en) * 2001-12-06 2003-06-12 International Business Machines Corporation Apparatus and method of generating an XML schema to validate an XML document used to describe network protocol packet exchanges
US7076555B1 (en) * 2002-01-23 2006-07-11 Novell, Inc. System and method for transparent takeover of TCP connections between servers
JP4710549B2 (ja) * 2005-10-28 2011-06-29 沖電気工業株式会社 アクセスポイント装置、通信システム、アクセスポイント装置の制御方法及び通信制御方法
US7921282B1 (en) * 2007-08-20 2011-04-05 F5 Networks, Inc. Using SYN-ACK cookies within a TCP/IP protocol
CN101114999B (zh) * 2007-08-26 2010-08-04 上海华为技术有限公司 数据发送控制方法及数据传输设备
US8364812B2 (en) * 2010-08-27 2013-01-29 Sandvine Incorporated Ulc Method and system for network data flow management
CN102130910B (zh) * 2011-02-28 2015-04-29 华为技术有限公司 Tcp代理插入和卸载方法及业务网关设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007095967A1 (en) * 2006-02-27 2007-08-30 Telefonaktiebolaget Lm Ericsson (Publ) Flow control mechanism using local and global acknowledgements
JP2008172521A (ja) * 2007-01-11 2008-07-24 Mitsubishi Electric Corp 通信装置および通信システム
CN102026281A (zh) * 2010-12-21 2011-04-20 大唐移动通信设备有限公司 基于rnc实现tcp代理的方法及装置
CN102355462A (zh) * 2011-10-09 2012-02-15 大唐移动通信设备有限公司 一种实现tcp传输的方法及装置

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3229552A4 (en) * 2014-12-01 2017-10-25 Samsung Electronics Co., Ltd. Method and apparatus for configuring disconnected tcp connection in communication system, handover support method and apparatus therefor
US10299181B2 (en) 2014-12-01 2019-05-21 Samsung Electronics Co., Ltd. Method and apparatus for configuring disconnected TCP connection in communication system, handover support method and apparatus therefor
US10425868B2 (en) 2014-12-19 2019-09-24 Huawei Technologies Co., Ltd. Apparatus, system, and method for preventing TCP connection interruption
US11088957B2 (en) * 2016-10-28 2021-08-10 Telefonaktiebolaget Lm Ericsson (Publ) Handling of data packet transfer via a proxy
CN109474537A (zh) * 2017-09-08 2019-03-15 中兴通讯股份有限公司 数据传输方法、电子设备及计算机可读存储介质

Also Published As

Publication number Publication date
EP2953310A1 (en) 2015-12-09
EP2953310A4 (en) 2016-02-17
US10104179B2 (en) 2018-10-16
US20150365483A1 (en) 2015-12-17
CN104170346B (zh) 2018-03-09
EP2953310B1 (en) 2018-09-05
CN104170346A (zh) 2014-11-26

Similar Documents

Publication Publication Date Title
WO2014131153A1 (zh) 数据传输方法、系统及代理设备
US11617072B2 (en) Reliable data delivery over non-access stratum
EP2225902B1 (en) Mobile communication system and method for processing handover procedure thereof
US7773628B2 (en) Methods and apparatus for media independent messaging over the internet
US20170311371A1 (en) Method and nodes for handling connections in a communications system
KR101983617B1 (ko) 사용자 플레인 베어러 확립을 제어하는 방법 및 장치
WO2014127515A1 (zh) 业务提供系统、方法、移动边缘应用服务器及支持节点
JP2017503434A5 (zh)
US10425868B2 (en) Apparatus, system, and method for preventing TCP connection interruption
KR20160002240A (ko) 저전력 단말의 통신 효과를 높이는 방법 및 장치
US9961045B2 (en) Service path changing method and apparatus
JP2008098757A (ja) 無線通信システム及び無線基地局及び無線通信制御方法
WO2013086949A1 (zh) 一种通信方法及设备
JP2005217626A (ja) 無線アクセスネットワークを介するパケットデータ交換ノード、端末及びそのプログラム
WO2016154831A1 (zh) 一种实现传输控制协议tcp传输的方法及装置
US11997547B2 (en) Mobility management in information centric networking
US20240147524A1 (en) Managing data communication before and after a state transition
US20240179783A1 (en) Communication device triggered aggregation operations
US20240031861A1 (en) Communication method and device
WO2022205253A1 (zh) 发送和接收信号的方法、装置和通信系统
JP2011259313A (ja) 無線制御装置及び通信制御方法
WO2015196419A1 (zh) 基于tcp代理的状态同步方法和设备
US20140254557A1 (en) Mobile communication system and content provision method in mobile communication system
WO2014121503A1 (zh) 一种数据传输方法以及接入网设备

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: 13876713

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2013876713

Country of ref document: EP