WO2014015503A1 - Data transmission method, mobile terminal and proxy server - Google Patents

Data transmission method, mobile terminal and proxy server Download PDF

Info

Publication number
WO2014015503A1
WO2014015503A1 PCT/CN2012/079203 CN2012079203W WO2014015503A1 WO 2014015503 A1 WO2014015503 A1 WO 2014015503A1 CN 2012079203 W CN2012079203 W CN 2012079203W WO 2014015503 A1 WO2014015503 A1 WO 2014015503A1
Authority
WO
WIPO (PCT)
Prior art keywords
tcp connection
connection channel
client
single tcp
data transmission
Prior art date
Application number
PCT/CN2012/079203
Other languages
French (fr)
Chinese (zh)
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/CN2012/079203 priority Critical patent/WO2014015503A1/en
Priority to CN201280000890.5A priority patent/CN102907071B/en
Publication of WO2014015503A1 publication Critical patent/WO2014015503A1/en

Links

Classifications

    • 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
    • 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

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a data transmission method, a mobile terminal, and a proxy server. Background technique
  • the inventor found that the existing mobile terminal accesses the website page, and has the following technical problems:
  • TCP Transmission Control Protocol
  • each TCP connection can send and receive multiple HTTP requests/responses.
  • Embodiments of the present invention provide a data transmission method, a mobile terminal, and a proxy server for improving the efficiency of data transmission between a mobile terminal and a proxy server.
  • An embodiment of the present invention provides a data transmission method, including:
  • the client determines whether there is a single TCP connection channel identifier in the local area
  • Another embodiment of the present invention provides a data transmission method, including:
  • TCP connection response carrying a SYN flag and an ACK flag, where the TCP connection response carries the single TCP connection channel identifier
  • the client When the client accesses multiple domain names, the client performs data transmission with the SPDY protocol in the single TCP connection channel.
  • An embodiment of the present invention provides a mobile terminal for data transmission, including:
  • a judging module configured to determine whether a local TCP connection channel identifier exists in the locality
  • the transmission module is configured to perform data transmission by using the SPDY protocol in a single TCP connection channel corresponding to the single TCP connection channel identifier when the mobile terminal accesses multiple domain names when the single TCP connection channel identifier exists locally.
  • An embodiment of the present invention provides a proxy server, including:
  • a generating module configured to generate a single TCP connection channel identifier after receiving a TCP connection request sent by the client and carrying the SYN flag;
  • a sending module configured to send, to the client, a TCP connection response carrying a SYN flag and an ACK flag, where the TCP connection response carries the single TCP connection channel identifier;
  • a receiving module configured to receive a TCP connection response that is sent by the client and that carries an ACK flag, to complete establishment of a single TCP connection channel corresponding to the single TCP connection channel identifier;
  • a transmission module configured to: when the client accesses multiple domain names, with the client in the single
  • Data transmission is performed by the SPDY protocol in the TCP connection channel.
  • a client establishes a single TCP connection channel with a proxy server in a mobile terminal, and when the client performs multiple domain name accesses, data is performed in the single TCP connection channel.
  • the transmission saves the resources for the client to establish multiple TCP connection channels for multiple domain names, and simultaneously transmits data by using the SPDY protocol in the single TCP connection channel. – Since the SPDY protocol has the capability of concurrent data transmission, the ability of the client and the proxy server to transmit data in the mobile terminal is further improved.
  • FIG. 1 is a schematic structural diagram of data transmission according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of a data transmission method according to another embodiment of the present invention.
  • FIG. 4 is a signaling flowchart of data transmission according to an embodiment of the present invention.
  • FIG. 5 is a cross-sectional diagram of concurrent data transmission based on a single TCP connection channel according to an embodiment of the present invention.
  • FIG. 6 is a structural diagram of a mobile terminal for data transmission according to an embodiment of the present invention.
  • FIG. 7 is a structural diagram of a proxy server according to an embodiment of the present invention. detailed description
  • FIG. 1 is a diagram of a data transmission architecture provided by an embodiment of the present invention, including a client 101, a proxy server 102, and a web server 103.
  • the embodiment specifically includes:
  • the client 101 is a client on the mobile terminal, such as a browser, for requesting data content from the proxy server 102 to the web server 103 for data transmission.
  • the proxy server 102 is mainly used to establish a single TCP connection with the client 101 in the mobile terminal.
  • data transmission is performed on the single TCP connection channel based on the SPDY protocol.
  • the proxy server 102 may also collect the functions of the service, or deploy the proxy server on the service server, where the function of the service or the service server may be used to respond to the return of the web server 103 to the client 101.
  • the data is subjected to related processing, such as reformatting, compression, etc., thereby reducing the size of the response data, thereby improving the access speed of the client 101 when accessing the Web server 103, and improving the efficiency of data transmission.
  • the web server 103 is configured to provide the accessed data content to the client 101 through the proxy server 102.
  • the SPDY protocol is used for data transmission in the present invention.
  • SPDY is a TCP-based application layer protocol developed by Google.
  • the SPDY protocol is designed to reduce page load time and security by compressing, multiplexing, and prioritizing.
  • When using the SPDY protocol for data access there can be multiple parallel requests/responses within a TCP connection.
  • the HTTP protocol the HTTP protocol
  • the TCP connection cannot do multiple parallel requests/responses, between the client and the server in the mobile terminal.
  • Data transmission using the SPDY protocol is obviously more efficient than transmission using the HTTP protocol.
  • FIG. 2 illustrates a data transmission method according to an embodiment of the present invention.
  • a client on a mobile terminal is used as an execution entity.
  • the client determines whether there is a single TCP connection channel identifier in the local area.
  • the client and the proxy server perform data transmission by using the SPDY protocol in a single TCP connection channel corresponding to the single TCP connection channel identifier.
  • the client and the proxy server establish a single TCP connection channel through the "three-way handshake", which specifically includes: the client sends a TCP connection request carrying the SYN flag to the proxy server.
  • the client receives the TCP connection response returned by the proxy server carrying the SYN flag and the ACK flag, and the TCP connection response carries a single TCP connection channel identifier; the client sends a TCP connection response carrying the ACK flag to the proxy server to complete Establishing a single TCP connection channel corresponding to the single TCP connection channel identifier; wherein the single TCP – The connection channel identifier is carried by the extended SPDY header field in the TCP connection response sent by the proxy server described above.
  • the "three-way handshake" process of establishing a TCP connection channel is slightly different from the "three-way handshake" process of the TCP standard, and is represented by the extended SPDY in the TCP connection response sent by the proxy server.
  • the header field carries a single TCP connection channel identifier.
  • the client when the client determines that there is no data transmission in the single TCP connection channel within a preset threshold time, the client actively initiates a request to disconnect the single TCP connection channel from the proxy server to disconnect the single TCP connection channel, thereby saving the TCP connection. Resources. It should be noted that this is only a case of disconnecting a single TCP connection channel. The present invention does not limit other situations in which a single TCP connection channel is disconnected. For example, when the client stops, the single TCP connection channel is also The proxy server side initiates a disconnection.
  • FIG. 3 illustrates a data transmission method according to another embodiment of the present invention.
  • a proxy server is used as an execution host, and the embodiment specifically includes:
  • S302 Send a TCP connection response carrying the SYN flag and the ACK flag to the client, where the TCP connection response carries the single TCP connection channel identifier.
  • the single TCP connection channel identifier is implemented by extending the SPDY header field in the TCP connection response.
  • S303 Receive a TCP connection response that is sent by the client and that carries an ACK flag, to complete establishment of a single TCP connection channel corresponding to the single TCP connection channel identifier.
  • the client accesses multiple domain names
  • the client is in the single TCP connection channel. – Data transmission using the SPDY protocol.
  • FIG. 4 illustrates a signaling flow of data transmission provided by an embodiment of the present invention.
  • This embodiment describes a signaling interaction process between a client and a proxy server. Specifically, the embodiment includes:
  • the client determines that there is no single TCP connection channel identifier in the local area.
  • the client accesses the domain name, it first determines whether there is a single TCP connection channel identifier. If there is a single TCP connection channel identifier, it indicates that there is a single TCP connection channel, and the client does not need to establish a single TCP connection for accessing the domain name. The channel directly uses the single TCP connection channel for data transmission, thereby saving resources for establishing a single TCP connection channel. If there is no single TCP connection channel identifier, it means that there is no single TCP connection channel, and the client first needs to establish a single The TCP connects to the channel, and then uses the established single TCP connection channel for data transmission.
  • S401 takes the client's first access to the domain name as an example. Since there is no single TCP connection channel in the client at this time, the result of the client judgment in S401 is that there is no single TCP connection channel identifier locally.
  • the client sends a TCP connection request carrying a SYN flag to the proxy server.
  • the proxy server After receiving the TCP connection request sent by the client, the proxy server generates a single TCP connection channel identifier, which is used to identify a single TCP connection channel established by the client and the proxy server.
  • the client receives a TCP connection response that carries a SYN flag and an ACK flag, and the TCP connection response further includes a single TCP connection established by the proxy server.
  • the proxy server may extend the header field of the SPDY in the TCP connection response, and carry the generated single TCP connection channel identifier in the SPDY header field, and then send the packet to the client.
  • S405 The client sends a TCP connection response carrying the ACK flag to the proxy to complete the establishment of the single TCP connection channel.
  • the client uses the single TCP connection channel established above to perform data transmission with the proxy server, that is, the client is When accessing multiple domain names, the single TCP connection channel is used to transmit data with the proxy server, and then the data is transmitted with the web server.
  • the specific process is as follows:
  • the client determines that there is a single TCP connection channel identifier.
  • TCP connection channel identifier that is, whether there is a single TCP connection channel. Since the above has established a single TCP connection channel, there is a single at this time. TCP connection channel identifier.
  • the client sends a data access request based on the SPDY protocol to the proxy server in the single TCP connection channel corresponding to the single TCP connection channel identifier.
  • the client receives the SPDY protocol-based data access response sent by the proxy server in the single TCP connection channel corresponding to the single TCP connection channel identifier.
  • S407 and S408 describe a data transmission between the client and the proxy server based on the SPDY protocol.
  • the client and the proxy server are concurrent data transmission based on a single TCP connection channel, and concurrent data transmission.
  • the process is illustrated in Figure 5.
  • Figure 5 depicts the concurrent data transfer process between the client and the proxy server in a single TCP connection channel.
  • Figure 5 only shows four concurrent requests/responses exemplarily.
  • the client determines that the single TCP connection channel has no data transmission within a threshold time, wherein the threshold may be set in advance on the client.
  • the client disconnects the single TCP connection channel from the proxy server to save the TCP connection resource. — —
  • S410 is a case where a single TCP connection channel is disconnected.
  • the single TCP connection channel is disconnected to avoid wasting TCP connection resources.
  • the present invention does not limit other situations in which the single TCP connection channel can be disconnected, such as stopping at the client.
  • the TCP connection channel is actively disconnected by the proxy server.
  • the proxy server in the process of the complete client, the proxy server and the web server, there is an interaction process between the proxy server and the web server, since the interaction process between the proxy server and the web server adopts multiple TCP connection channels, and After obtaining the response data returned by the web server, the proxy server can rearrange and deepen the response data, reduce the amount of data returned to the client, thereby improving the transmission speed of the downlink data, and the interaction process between the proxy server and the web server. It can be implemented by using existing technology, and the present invention is not described in detail.
  • FIG. 6 illustrates a mobile terminal 600 that can be used for data transmission according to an embodiment of the present invention, which specifically includes:
  • the determining module 601 is configured to determine whether there is a single TCP connection channel identifier locally.
  • the first transmission module 602 is configured to: when the mobile terminal 600 accesses multiple domain names, when the mobile terminal 600 accesses multiple domain names, perform data with the SPDY protocol in the single TCP connection channel corresponding to the proxy server in the single TCP connection channel identifier. transmission.
  • the mobile terminal 600 further includes:
  • the first sending module 603 is configured to send a TCP connection request carrying the SYN flag to the proxy server.
  • the first receiving module 604 is configured to receive a TCP connection response that is sent by the proxy server and carries a SYN flag and an ACK flag, where the TCP connection response carries a single TCP connection channel identifier.
  • the first sending module 603 is further configured to send a TCP connection response carrying the ACK flag to the proxy server, to complete establishment of a single TCP connection channel corresponding to the single TCP connection channel identifier.
  • the mobile terminal 600 further includes:
  • the first disconnecting module 605 is configured to disconnect the single TCP connection channel from the proxy server when there is no data transmission in the single TCP connection channel within a preset threshold.
  • the single TCP connection channel is disconnected to avoid wasting TCP connection resources.
  • the present invention does not limit other situations in which the single TCP connection channel is disconnected. For example, when the client stops running, the single TCP connection channel is actively initiated by the proxy server. disconnect.
  • the client establishes a single TCP connection channel with the proxy server in the mobile terminal, and when the client performs multiple domain name accesses, data transmission is performed in the single TCP connection channel, which saves the client.
  • the domain name establishes resources of multiple TCP connection channels, and the data transmission is performed by the SPDY protocol in the single TCP connection channel. Since the SPDY protocol has the capability of concurrent data transmission, the data transmission between the client and the proxy server in the mobile terminal is further improved. Ability.
  • FIG. 7 illustrates a proxy server 700 according to an embodiment of the present invention, which specifically includes: a generating module 701, configured to generate a single TCP connection channel identifier after receiving a TCP connection request that carries a SYN flag sent by a client.
  • a generating module 701 configured to generate a single TCP connection channel identifier after receiving a TCP connection request that carries a SYN flag sent by a client.
  • the second sending module 702 is configured to send, to the client, a TCP connection response carrying a SYN flag and an ACK flag, where the TCP connection response carries the single TCP connection channel identifier.
  • the second receiving module 703 is configured to receive a TCP connection response that is sent by the client and that carries an ACK flag, so as to complete establishment of a single TCP connection channel corresponding to the single TCP connection channel identifier.
  • the second transmission module 704 is configured to perform data transmission with the SPDY protocol in the single TCP connection channel when the client accesses multiple domain names.
  • the proxy server 700 further includes: - a second disconnection module 705, configured to disconnect the single TCP connection channel from the client when there is no data transmission in the single TCP connection channel within a preset threshold.
  • the TCP connection channel is disconnected to avoid wasting TCP connection resources.
  • the present invention does not limit other disconnected TCP connection channels. For example, when the client stops running, the TCP connection channel is actively disconnected by the proxy server.
  • the client establishes a single TCP connection channel with the proxy server in the mobile terminal, and when the client performs multiple domain name accesses, data transmission is performed in the single TCP connection channel, which saves the client.
  • the domain name establishes resources of multiple TCP connection channels, and the data transmission is performed by the SPDY protocol in the single TCP connection channel. Since the SPDY protocol has the capability of concurrent data transmission, the data transmission between the client and the proxy server in the mobile terminal is further improved. Ability.
  • a person skilled in the art can understand that all or part of the process of implementing the above embodiments can be completed by a computer program to instruct related hardware, and the above program can be stored in a computer readable storage medium.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (RAM: Read-Only Memory), or a random access memory (RAM).
  • RAM Read-Only Memory
  • RAM random access memory

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Computer And Data Communications (AREA)

Abstract

The present invention relates to the technical field of communications, and particularly to a data transmission method, a mobile terminal and a proxy server. The data transmission method comprises: a client judging whether there is a single TCP connection channel identifier at the local site or not; and if there is a single TCP connection channel identifier at the local site, when the client accesses a plurality of domain names, the client and the proxy server conducting data transmission in a single TCP connection channel corresponding to the single TCP connection channel identifier using the SPDY protocol. It can be known from this solution that a single TCP connection channel is established between a client in a mobile terminal and a proxy server, and when the client accesses a plurality of domain names, all the data transmission is conducted in the single TCP connection channel. The resources for the client to establish a plurality of TCP connection channels for the plurality of domain names are saved, and at the same time, the capability for conducting data transmission between the client in the mobile terminal and the proxy server is further improved by conducting data transmission in the single TCP connection channel using the SPDY protocol.

Description

一种数据传输方法、 移动终端和代理 Ji 务器  Data transmission method, mobile terminal and proxy server
技术领域 Technical field
本发明涉及通信技术领域, 具体涉及数据传输方法、 移动终端和代理服 务器。 背景技术  The present invention relates to the field of communications technologies, and in particular, to a data transmission method, a mobile terminal, and a proxy server. Background technique
移动终端上用户通过浏览器进行网页浏览器过程中, 采用的仍然是传统 的在 PC 机器上主流的 TCP/I P 通信技术。 该技术经过实践的倕炼, 被证明是 有效和性能较高的。  In the process of web browser running through the browser on the mobile terminal, the traditional TCP/I P communication technology on the PC is still used. The practice of this technology has proven to be effective and high performance.
但是, 发明人发现现有的移动终端访问网站页面, 存在如下技术问题: 在移动终端基于 HTTP协议访问多个域名时, 移动终端会为每个域名建立传 输控制协议 (TCP: Transmission Control Protocol ) 连接, 在 HTTP 1.1版中, 每个 TCP连接可以发送和接收多个 HTTP请求 /应答, 由于移动终端的硬件限 制导致移动终端上的资源有限,而建立 TCP连接通道需要耗费比较多的资源, 因此在移动终端访问多个域名时,需要建立多个 TCP连接,消耗较多的资源, 并且由于移动网络的带宽较小,移动终端在每个域名上访问的数据量比较小, 因此每个 TCP连接通道的传输利用率不高。 发明内容  However, the inventor found that the existing mobile terminal accesses the website page, and has the following technical problems: When the mobile terminal accesses multiple domain names based on the HTTP protocol, the mobile terminal establishes a Transmission Control Protocol (TCP) connection for each domain name. In the HTTP 1.1 version, each TCP connection can send and receive multiple HTTP requests/responses. Due to the hardware limitations of the mobile terminal, the resources on the mobile terminal are limited, and establishing a TCP connection channel requires a relatively large amount of resources, so When a mobile terminal accesses multiple domain names, multiple TCP connections need to be established, which consumes more resources, and because the bandwidth of the mobile network is small, the amount of data accessed by the mobile terminal on each domain name is relatively small, so each TCP connection channel The transmission utilization rate is not high. Summary of the invention
本发明的实施例提供了数据传输方法、 移动终端和代理服务器, 用于提 高移动终端和代理服务器进行数据传输的效率。  Embodiments of the present invention provide a data transmission method, a mobile terminal, and a proxy server for improving the efficiency of data transmission between a mobile terminal and a proxy server.
本发明的一个实施例提供了一种数据传输方法, 包括:  An embodiment of the present invention provides a data transmission method, including:
客户端判断本地是否存在单 TCP连接通道标识;  The client determines whether there is a single TCP connection channel identifier in the local area;
在本地存在单 TCP连接通道标识时, 所述客户端访问多个域名时, 所述 客户端与代理服务器在所述单 TCP连接通道标识对应的单 TCP连接通道中以 SPDY协议进行数据传输。 — — 本发明的另一个实施例提供了一种数据传输方法, 包括: When a single TCP connection channel identifier exists locally, when the client accesses multiple domain names, the client and the proxy server perform data transmission by using the SPDY protocol in a single TCP connection channel corresponding to the single TCP connection channel identifier. - Another embodiment of the present invention provides a data transmission method, including:
在接收客户端发送的携带 SYN标志的 TCP连接请求之后, 生成单 TCP连 接通道标识;  After receiving the TCP connection request sent by the client and carrying the SYN flag, generating a single TCP connection channel identifier;
向所述客户端发送携带 SYN标志和 ACK标志的 TCP连接响应, 所述 TCP 连接响应携带所述单 TCP连接通道标识;  Sending, to the client, a TCP connection response carrying a SYN flag and an ACK flag, where the TCP connection response carries the single TCP connection channel identifier;
接收所述客户端发送的携带 ACK标志的 TCP连接响应,以完成所述单 TCP 连接通道标识对应的单 TCP连接通道的建立;  Receiving, by the client, a TCP connection response carrying an ACK flag, to complete establishment of a single TCP connection channel corresponding to the single TCP connection channel identifier;
在所述客户端访问多个域名时, 与所述客户端在所述单 TCP连接通道中 以 SPDY协议进行数据传输。  When the client accesses multiple domain names, the client performs data transmission with the SPDY protocol in the single TCP connection channel.
本发明的一个实施例提供了一种数据传输的移动终端, 包括:  An embodiment of the present invention provides a mobile terminal for data transmission, including:
判断模块, 用于判断本地是否存在单 TCP连接通道标识;  a judging module, configured to determine whether a local TCP connection channel identifier exists in the locality;
传输模块, 用于在本地存在单 TCP连接通道标识时, 所述移动终端访问 多个域名时, 与代理服务器在所述单 TCP连接通道标识对应的单 TCP连接通 道中以 SPDY协议进行数据传输。  The transmission module is configured to perform data transmission by using the SPDY protocol in a single TCP connection channel corresponding to the single TCP connection channel identifier when the mobile terminal accesses multiple domain names when the single TCP connection channel identifier exists locally.
本发明的一个实施例提供了一种代理服务器, 包括:  An embodiment of the present invention provides a proxy server, including:
生成模块,用于在接收客户端发送的携带 SYN标志的 TCP连接请求之后, 生成单 TCP连接通道标识;  a generating module, configured to generate a single TCP connection channel identifier after receiving a TCP connection request sent by the client and carrying the SYN flag;
发送模块,用于向所述客户端发送携带 SYN标志和 ACK标志的 TCP连接 响应, 所述 TCP连接响应携带所述单 TCP连接通道标识;  a sending module, configured to send, to the client, a TCP connection response carrying a SYN flag and an ACK flag, where the TCP connection response carries the single TCP connection channel identifier;
接收模块, 用于接收所述客户端发送的携带 ACK标志的 TCP连接响应, 以完成所述单 TCP连接通道标识对应的单 TCP连接通道的建立;  a receiving module, configured to receive a TCP connection response that is sent by the client and that carries an ACK flag, to complete establishment of a single TCP connection channel corresponding to the single TCP connection channel identifier;
传输模块, 用于在所述客户端访问多个域名时, 与所述客户端在所述单 a transmission module, configured to: when the client accesses multiple domain names, with the client in the single
TCP连接通道中以 SPDY协议进行数据传输。 Data transmission is performed by the SPDY protocol in the TCP connection channel.
从本发明实施例提供的以上技术方案可以看出, 移动终端中客户端与代 理服务器建立了单 TCP连接通道, 当该客户端进行多个域名访问时, 都会在 该单 TCP连接通道中进行数据传输, 节省了客户端为多个域名建立多个 TCP 连接通道的资源, 同时在该单 TCP连接通道中以 SPDY协议进行数据传输, — — 由于 SPDY协议具有并发数据传输的能力, 从而进一步提高移动终端中客户 端与代理服务器进行数据传输的能力。 附图说明 It can be seen from the above technical solution provided by the embodiment of the present invention that a client establishes a single TCP connection channel with a proxy server in a mobile terminal, and when the client performs multiple domain name accesses, data is performed in the single TCP connection channel. The transmission saves the resources for the client to establish multiple TCP connection channels for multiple domain names, and simultaneously transmits data by using the SPDY protocol in the single TCP connection channel. – Since the SPDY protocol has the capability of concurrent data transmission, the ability of the client and the proxy server to transmit data in the mobile terminal is further improved. DRAWINGS
为了更清楚地说明本发明实施例中的技术方案, 下面将实施例描述中所 需要使用的附图作筒单地介绍。 显而易见地, 下面描述中的附图仅仅是本发 明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动性的 前提下, 还可以根据这些附图获得其他的附图。  In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings to be used in the description of the embodiments will be briefly described below. Obviously, the drawings in the following description are only some of the embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings without any inventive labor.
图 1为本发明一个实施例提供的一种数据传输的架构图;  FIG. 1 is a schematic structural diagram of data transmission according to an embodiment of the present invention;
图 2为本发明一个实施例提供的一种数据传输的方法;  2 is a method for data transmission according to an embodiment of the present invention;
图 3为本发明另一个实施例提供的一种数据传输的方法;  FIG. 3 is a schematic diagram of a data transmission method according to another embodiment of the present invention; FIG.
图 4为本发明一个实施例提供的一种数据传输的信令流程图;  FIG. 4 is a signaling flowchart of data transmission according to an embodiment of the present invention;
图 5为本发明一个实施例提供的基于单 TCP连接通道的并发数据传输交 互图。  FIG. 5 is a cross-sectional diagram of concurrent data transmission based on a single TCP connection channel according to an embodiment of the present invention.
图 6为本发明一个实施例提供的一种数据传输的移动终端的结构图。 图 7为本发明一个实施例提供的 一种代理服务器的结构图。 具体实施方式  FIG. 6 is a structural diagram of a mobile terminal for data transmission according to an embodiment of the present invention. FIG. 7 is a structural diagram of a proxy server according to an embodiment of the present invention. detailed description
下面将结合本发明实施例中的附图, 对本发明实施例中的技术方案进行 清楚、 完整地描述。 显然, 所描述的实施例仅仅是本发明一部分实施例, 而 不是全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没有做 出创造性劳动前提下所获得的所有其他实施例, 都属于本发明保护的范围。  The technical solutions in the embodiments of the present invention will be clearly and completely described in the following with reference to the accompanying drawings in the embodiments. It is apparent that the described embodiments are only 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.
图 1描述了本发明实施例提供的数据传输的架构, 包括客户端 101、 代 理服务器 102和 Web服务器 103 , 该实施例具体包括:  FIG. 1 is a diagram of a data transmission architecture provided by an embodiment of the present invention, including a client 101, a proxy server 102, and a web server 103. The embodiment specifically includes:
客户端 101 , 为移动终端上的客户端, 比如浏览器, 用于通过代理服务 器 102向 Web服务器 103请求数据内容, 进行数据传输。  The client 101 is a client on the mobile terminal, such as a browser, for requesting data content from the proxy server 102 to the web server 103 for data transmission.
代理服务器 102 , 主要用于与移动终端中客户端 101建立单 TCP连接通 — — 道, 并且在客户端 101访问多个域名时, 基于 SPDY协议都在该单 TCP连接 通道上进行数据传输。 需要说明的是, 该代理服务器 102也可以集合业务的 功能, 或者将该代理服务器部署在业务服务器上, 其中, 该业务的功能或者 业务服务器可以用于对 Web服务器 103返回给客户端 101的响应数据进行相 关处理, 比如重新排版、 压缩等, 从而减少响应数据的大小, 进而提高客户 端 101访问 Web服务器 103时的访问速度, 提高数据传输的效率。 The proxy server 102 is mainly used to establish a single TCP connection with the client 101 in the mobile terminal. When the client 101 accesses multiple domain names, data transmission is performed on the single TCP connection channel based on the SPDY protocol. It should be noted that the proxy server 102 may also collect the functions of the service, or deploy the proxy server on the service server, where the function of the service or the service server may be used to respond to the return of the web server 103 to the client 101. The data is subjected to related processing, such as reformatting, compression, etc., thereby reducing the size of the response data, thereby improving the access speed of the client 101 when accessing the Web server 103, and improving the efficiency of data transmission.
Web服务器 103 , 用于通过代理服务器 102向客户端 101提供访问的数 据内容。  The web server 103 is configured to provide the accessed data content to the client 101 through the proxy server 102.
需要说明的是,本发明中采用 SPDY协议进行数据传输。 SPDY 是 Google 开发的基于 TCP 的应用层协议, SPDY 协议旨在通过压缩、 多路复用和优先 级来缩短网页的加载时间和提高安全性。 利用 SPDY协议进行数据访问时, 在一个 TCP 连接内可以有多个并行请求 /响应,相比于 HTTP协议中 TCP连接 不能做到多个并行的请求 /响应, 移动终端中客户端和服务器之间采用 SPDY 协议进行数据传输, 其效率显然要比采用 HTTP协议进行传输要高。 图 2描述了本发明一个实施例提供的数据传输方法, 该实施例中以移动 终端上的客户端作为执行主体, 该实施例具体包括:  It should be noted that the SPDY protocol is used for data transmission in the present invention. SPDY is a TCP-based application layer protocol developed by Google. The SPDY protocol is designed to reduce page load time and security by compressing, multiplexing, and prioritizing. When using the SPDY protocol for data access, there can be multiple parallel requests/responses within a TCP connection. Compared to the HTTP protocol, the TCP connection cannot do multiple parallel requests/responses, between the client and the server in the mobile terminal. Data transmission using the SPDY protocol is obviously more efficient than transmission using the HTTP protocol. FIG. 2 illustrates a data transmission method according to an embodiment of the present invention. In this embodiment, a client on a mobile terminal is used as an execution entity.
5201、 客户端判断本地是否存在单 TCP连接通道标识。  5201. The client determines whether there is a single TCP connection channel identifier in the local area.
5202、在本地存在单 TCP连接通道标识时,该客户端在访问多个域名时, 该客户端与代理服务器在该单 TCP连接通道标识对应的单 TCP连接通道中以 SPDY协议进行数据传输。  5202. When a single TCP connection channel identifier exists locally, when the client accesses multiple domain names, the client and the proxy server perform data transmission by using the SPDY protocol in a single TCP connection channel corresponding to the single TCP connection channel identifier.
另外, 如果客户端判断本地不存在单 TCP连接通道标识时, 则客户端与 代理服务器通过 "三次握手" 建立单 TCP连接通道, 具体包括: 客户端向该 代理服务器发送携带 SYN标志的 TCP连接请求; 客户端接收该代理服务器返 回的携带 SYN标志和 ACK标志的 TCP连接响应, 该 TCP连接响应携带单 TCP 连接通道标识; 客户端向该代理良务器发送携带 ACK标志的 TCP连接响应, 以完成该单 TCP连接通道标识对应的单 TCP连接通道的建立;其中,该单 TCP — — 连接通道标识由上述由代理服务器发送的 TCP连接响应中扩展的 SPDY头域 携带。 需要说明的是, 本发明中, 建立 TCP连接通道的 "三次握手" 过程与 TCP 标准的 "三次握手" 过程相比, 稍有不同, 表现在由代理服务器发送的 TCP连接响应中由扩展的 SPDY头域携带单 TCP连接通道标识。 In addition, if the client determines that there is no single TCP connection channel identifier in the local area, the client and the proxy server establish a single TCP connection channel through the "three-way handshake", which specifically includes: the client sends a TCP connection request carrying the SYN flag to the proxy server. The client receives the TCP connection response returned by the proxy server carrying the SYN flag and the ACK flag, and the TCP connection response carries a single TCP connection channel identifier; the client sends a TCP connection response carrying the ACK flag to the proxy server to complete Establishing a single TCP connection channel corresponding to the single TCP connection channel identifier; wherein the single TCP – The connection channel identifier is carried by the extended SPDY header field in the TCP connection response sent by the proxy server described above. It should be noted that, in the present invention, the "three-way handshake" process of establishing a TCP connection channel is slightly different from the "three-way handshake" process of the TCP standard, and is represented by the extended SPDY in the TCP connection response sent by the proxy server. The header field carries a single TCP connection channel identifier.
另外, 客户端在判断预先设置的阈值时间内该单 TCP连接通道没有数据 传输时, 客户端主动向代理服务器发起断开该单 TCP连接通道的请求以断开 该单 TCP连接通道, 节省 TCP连接资源。 需要说明的是, 这只是一种断开单 TCP连接通道的情况, 本发明对其他断开单 TCP连接通道的情况不做限制, 比如在客户端停止情况下, 该单 TCP连接通道也会由代理服务器侧主动发起 断开。  In addition, when the client determines that there is no data transmission in the single TCP connection channel within a preset threshold time, the client actively initiates a request to disconnect the single TCP connection channel from the proxy server to disconnect the single TCP connection channel, thereby saving the TCP connection. Resources. It should be noted that this is only a case of disconnecting a single TCP connection channel. The present invention does not limit other situations in which a single TCP connection channel is disconnected. For example, when the client stops, the single TCP connection channel is also The proxy server side initiates a disconnection.
由上述实施例可知, 移动终端中客户端与代理服务器建立了单 TCP连接 通道, 当该客户端进行多个域名访问时, 都会在该单 TCP连接通道中进行数 据传输, 节省了客户端为多个域名建立多个 TCP连接通道的资源, 同时在该 单 TCP连接通道中以 SPDY协议进行数据传输, 由于 SPDY协议具有并发数据 传输的能力, 从而进一步提高移动终端中客户端与代理服务器进行数据传输 的能力。 图 3描述了本发明另一个实施例提供的数据传输方法, 该实施例中以代 理服务器作为执行主体, 该实施例具体包括:  It can be seen from the above embodiment that the client establishes a single TCP connection channel with the proxy server in the mobile terminal, and when the client performs multiple domain name accesses, data transmission is performed in the single TCP connection channel, which saves the client. The domain name establishes resources of multiple TCP connection channels, and the data transmission is performed by the SPDY protocol in the single TCP connection channel. Since the SPDY protocol has the capability of concurrent data transmission, the data transmission between the client and the proxy server in the mobile terminal is further improved. Ability. FIG. 3 illustrates a data transmission method according to another embodiment of the present invention. In this embodiment, a proxy server is used as an execution host, and the embodiment specifically includes:
5301、 在接收客户端发送的携带 SYN标志的 TCP连接请求之后, 生成单 TCP连接通道标识。  S301. After receiving the TCP connection request sent by the client and carrying the SYN flag, generate a single TCP connection channel identifier.
5302、向该客户端发送携带 SYN标志和 ACK标志的 TCP连接响应,该 TCP 连接响应携带上述单 TCP连接通道标识。 其中, 该单 TCP连接通道标识是通 过扩展该 TCP连接响应中 SPDY头域实现。  S302: Send a TCP connection response carrying the SYN flag and the ACK flag to the client, where the TCP connection response carries the single TCP connection channel identifier. The single TCP connection channel identifier is implemented by extending the SPDY header field in the TCP connection response.
5303、 接收该客户端发送的携带 ACK标志的 TCP连接响应, 以完成该单 TCP连接通道标识对应的单 TCP连接通道的建立。  S303: Receive a TCP connection response that is sent by the client and that carries an ACK flag, to complete establishment of a single TCP connection channel corresponding to the single TCP connection channel identifier.
5304、 在该客户端访问多个域名时, 与该客户端在该单 TCP连接通道中 — — 以 SPDY协议进行数据传输。 5304. When the client accesses multiple domain names, the client is in the single TCP connection channel. – Data transmission using the SPDY protocol.
由上述实施例可知, 移动终端中客户端与代理服务器建立了单 TCP连接 通道, 当该客户端进行多个域名访问时, 都会在该单 TCP连接通道中进行数 据传输, 节省了客户端为多个域名建立多个 TCP连接通道的资源, 同时在该 单 TCP连接通道中以 SPDY协议进行数据传输, 由于 SPDY协议具有并发数据 传输的能力, 从而进一步提高移动终端中客户端与代理服务器进行数据传输 的能力。 图 4描述了本发明一个实施例提供的数据传输的信令流程, 本实施例描 述了客户端和代理服务器之间的信令交互过程, 具体的, 该实施例包括: It can be seen from the above embodiment that the client establishes a single TCP connection channel with the proxy server in the mobile terminal, and when the client performs multiple domain name accesses, data transmission is performed in the single TCP connection channel, which saves the client. The domain name establishes resources of multiple TCP connection channels, and the data transmission is performed by the SPDY protocol in the single TCP connection channel. Since the SPDY protocol has the capability of concurrent data transmission, the data transmission between the client and the proxy server in the mobile terminal is further improved. Ability. FIG. 4 illustrates a signaling flow of data transmission provided by an embodiment of the present invention. This embodiment describes a signaling interaction process between a client and a proxy server. Specifically, the embodiment includes:
5401、 客户端判断本地不存在单 TCP连接通道标识。 5401. The client determines that there is no single TCP connection channel identifier in the local area.
具体的, 客户端在访问域名之前, 首先判断是否存在单 TCP连接通道标 识, 如果存在单 TCP连接通道标识, 则表明存在单 TCP连接通道, 则客户端 不需要为了访问该域名而建立单 TCP连接通道, 直接利用该单 TCP连接通道 进行数据传输, 从而节省建立单 TCP连接通道所耗费的资源; 如果不存在单 TCP连接通道标识, 则表明不存在单 TCP连接通道, 则客户端首先需要建立 单 TCP连接通道, 然后再利用建立的单 TCP连接通道进行数据传输。  Specifically, before the client accesses the domain name, it first determines whether there is a single TCP connection channel identifier. If there is a single TCP connection channel identifier, it indicates that there is a single TCP connection channel, and the client does not need to establish a single TCP connection for accessing the domain name. The channel directly uses the single TCP connection channel for data transmission, thereby saving resources for establishing a single TCP connection channel. If there is no single TCP connection channel identifier, it means that there is no single TCP connection channel, and the client first needs to establish a single The TCP connects to the channel, and then uses the established single TCP connection channel for data transmission.
S401以客户端第一次访问域名为例, 由于此时客户端中还不存在单 TCP 连接通道,则 S401中客户端判断的结果是本地不存在单 TCP连接通道标识。  S401 takes the client's first access to the domain name as an example. Since there is no single TCP connection channel in the client at this time, the result of the client judgment in S401 is that there is no single TCP connection channel identifier locally.
在客户端判断不存在单 TCP连接通道标识时, 则客户端需要和代理服务 器建立 TCP连接, S402、 S404和 S405描述了建立 TCP连接的 "三次握手" 过程:  When the client determines that there is no single TCP connection channel identifier, the client needs to establish a TCP connection with the proxy server. S402, S404 and S405 describe the "three-way handshake" process of establishing a TCP connection:
5402、 客户端向代理服务器发送携带 SYN标志的 TCP连接请求。  5402. The client sends a TCP connection request carrying a SYN flag to the proxy server.
5403、代理服务器在接收客户端发送的 TCP连接请求后,生成一个单 TCP 连接通道标识, 用于标识本次客户端和代理月良务器建立的单 TCP连接通道。  After receiving the TCP connection request sent by the client, the proxy server generates a single TCP connection channel identifier, which is used to identify a single TCP connection channel established by the client and the proxy server.
5404、客户端接收代理良务器返回的携带 SYN标志和 ACK标志的 TCP连 接响应, 并且该 TCP连接响应还包括代理服务器为本次建立的单 TCP连接通 — — 道所生成的上述单 TCP连接通道标识。 S404: The client receives a TCP connection response that carries a SYN flag and an ACK flag, and the TCP connection response further includes a single TCP connection established by the proxy server. — The above single TCP connection channel identifier generated by the channel.
具体的, 代理服务器可以通过扩展该 TCP连接响应中 SPDY的头域, 将 生成的该单 TCP连接通道标识携带在 SPDY的头域, 进而发送给客户端。  Specifically, the proxy server may extend the header field of the SPDY in the TCP connection response, and carry the generated single TCP connection channel identifier in the SPDY header field, and then send the packet to the client.
5405、 客户端向代理 务器发送携带 ACK标志的 TCP连接响应, 以完成 本次单 TCP连接通道的建立。  S405: The client sends a TCP connection response carrying the ACK flag to the proxy to complete the establishment of the single TCP connection channel.
在完成单 TCP 连接通道的建立之后, 不论该客户端是继续访问该域名, 还是访问新的域名, 该客户端都利用上述建立的单 TCP连接通道与代理服务 器进行数据传输, 即该客户端在访问多个域名时, 都利用该单 TCP连接通道 与代理服务器进行数据传输, 进而与 Web服务器进行数据传输, 具体过程如 下:  After completing the establishment of the single TCP connection channel, whether the client continues to access the domain name or accesses the new domain name, the client uses the single TCP connection channel established above to perform data transmission with the proxy server, that is, the client is When accessing multiple domain names, the single TCP connection channel is used to transmit data with the proxy server, and then the data is transmitted with the web server. The specific process is as follows:
5406、 客户端判断存在单 TCP连接通道标识。  5406. The client determines that there is a single TCP connection channel identifier.
客户端在进行下一次访问, 假如针对新的域名进行访问, 需要判断是否 已经存在单 TCP连接通道标识, 即是否存在单 TCP连接通道, 由于上述已经 建立了单 TCP连接通道, 因此此时存在单 TCP连接通道标识。  The client is in the next access. If the access is made to the new domain name, it is necessary to determine whether there is a single TCP connection channel identifier, that is, whether there is a single TCP connection channel. Since the above has established a single TCP connection channel, there is a single at this time. TCP connection channel identifier.
5407、 客户端在该单 TCP连接通道标识对应的单 TCP连接通道中向代理 服务器发送基于 SPDY协议的数据访问请求。  S407. The client sends a data access request based on the SPDY protocol to the proxy server in the single TCP connection channel corresponding to the single TCP connection channel identifier.
5408、 客户端在该单 TCP连接通道标识对应的单 TCP连接通道中接收由 代理服务器发送的基于 SPDY协议的数据访问响应。  S408: The client receives the SPDY protocol-based data access response sent by the proxy server in the single TCP connection channel corresponding to the single TCP connection channel identifier.
需要说明的是, S407 和 S408 描述的是客户端和代理服务器之间基于 SPDY 协议进行的一次数据传输, 实际上客户端和代理服务器之间是基于单 TCP连接通道的并发数据传输, 并发数据传输过程见图 5所示, 图 5描述了 在单 TCP 连接通道中, 客户端和代理服务器之间并发的进行数据传输过程, 图 5仅示例性的给出了四个并发的请求 /响应。  It should be noted that S407 and S408 describe a data transmission between the client and the proxy server based on the SPDY protocol. In fact, the client and the proxy server are concurrent data transmission based on a single TCP connection channel, and concurrent data transmission. The process is illustrated in Figure 5. Figure 5 depicts the concurrent data transfer process between the client and the proxy server in a single TCP connection channel. Figure 5 only shows four concurrent requests/responses exemplarily.
5409、客户端判断在阈值时间内该单 TCP连接通道没有数据传输,其中, 该阈值可以预先在客户端设置。  5409. The client determines that the single TCP connection channel has no data transmission within a threshold time, wherein the threshold may be set in advance on the client.
5410、 客户端在判断阈值时间内该单 TCP 连接通道中没有数据传输时, 与代理服务器断开该单 TCP连接通道, 以节省 TCP连接资源 — — 5410. When the client does not have data transmission in the single TCP connection channel within the threshold time, the client disconnects the single TCP connection channel from the proxy server to save the TCP connection resource. — —
S410是单 TCP连接通道被断开的一种情况,单 TCP连接通道断开可以避 免浪费 TCP连接资源, 本发明对其他可以断开该单 TCP连接通道的情况不做 限制, 比如在客户端停止运行的情况下, 该 TCP连接通道由代理服务器发起 主动断开。 S410 is a case where a single TCP connection channel is disconnected. The single TCP connection channel is disconnected to avoid wasting TCP connection resources. The present invention does not limit other situations in which the single TCP connection channel can be disconnected, such as stopping at the client. In the case of operation, the TCP connection channel is actively disconnected by the proxy server.
需要说明的是, 在完整的客户端、 代理服务器和 Web服务器的流程中, 代理服务器和 Web服务器之间还有交互过程, 由于代理服务器和 Web服务 器的交互过程采用的是多 TCP连接通道,并且代理服务器在获取 Web服务器 返回的响应数据后, 可以对响应数据进行重新编排和深度压缩, 减少返回给 客户端的数据量, 进而提高下行数据的传输速度, 该代理服务器和 Web服务 器之间的交互过程可以利用现有的技术实现, 本发明没有给予详细描述。  It should be noted that in the process of the complete client, the proxy server and the web server, there is an interaction process between the proxy server and the web server, since the interaction process between the proxy server and the web server adopts multiple TCP connection channels, and After obtaining the response data returned by the web server, the proxy server can rearrange and deepen the response data, reduce the amount of data returned to the client, thereby improving the transmission speed of the downlink data, and the interaction process between the proxy server and the web server. It can be implemented by using existing technology, and the present invention is not described in detail.
由上述实施例可知, 移动终端中客户端与代理服务器建立了单 TCP连接 通道, 当该客户端进行多个域名访问时, 都会在该单 TCP连接通道中进行数 据传输, 节省了客户端为多个域名建立多个 TCP连接通道的资源, 同时在该 单 TCP连接通道中以 SPDY协议进行数据传输, 由于 SPDY协议具有并发数据 传输的能力, 从而进一步提高移动终端中客户端与代理服务器进行数据传输 的能力。 图 6描述了本发明一个实施例提供的可用于数据传输的移动终端 600, 具体包括:  It can be seen from the above embodiment that the client establishes a single TCP connection channel with the proxy server in the mobile terminal, and when the client performs multiple domain name accesses, data transmission is performed in the single TCP connection channel, which saves the client. The domain name establishes resources of multiple TCP connection channels, and the data transmission is performed by the SPDY protocol in the single TCP connection channel. Since the SPDY protocol has the capability of concurrent data transmission, the data transmission between the client and the proxy server in the mobile terminal is further improved. Ability. FIG. 6 illustrates a mobile terminal 600 that can be used for data transmission according to an embodiment of the present invention, which specifically includes:
判断模块 601 , 用于判断本地是否存在单 TCP连接通道标识。  The determining module 601 is configured to determine whether there is a single TCP connection channel identifier locally.
第一传输模块 602 , 用于在本地存在单 TCP连接通道标识时, 该移动终 端 600访问多个域名时,与代理服务器在该单 TCP连接通道标识对应的单 TCP 连接通道中以 SPDY协议进行数据传输。  The first transmission module 602 is configured to: when the mobile terminal 600 accesses multiple domain names, when the mobile terminal 600 accesses multiple domain names, perform data with the SPDY protocol in the single TCP connection channel corresponding to the proxy server in the single TCP connection channel identifier. transmission.
进一步, 在判断模块 601判断本地不存在单 TCP连接通道标识时, 移动 终端 600还包括:  Further, when the determining module 601 determines that there is no single TCP connection channel identifier in the local area, the mobile terminal 600 further includes:
第一发送模块 603 , 用于向该代理服务器发送携带 SYN标志的 TCP连接 请求。 — — 第一接收模块 604, 用于接收该代理服务器返回的携带 SYN标志和 ACK 标志的 TCP连接响应, 该 TCP连接响应携带单 TCP连接通道标识。 The first sending module 603 is configured to send a TCP connection request carrying the SYN flag to the proxy server. The first receiving module 604 is configured to receive a TCP connection response that is sent by the proxy server and carries a SYN flag and an ACK flag, where the TCP connection response carries a single TCP connection channel identifier.
该第一发送模块 603 , 还用于向该代理服务器发送携带 ACK标志的 TCP 连接响应, 以完成该单 TCP连接通道标识对应的单 TCP连接通道的建立。  The first sending module 603 is further configured to send a TCP connection response carrying the ACK flag to the proxy server, to complete establishment of a single TCP connection channel corresponding to the single TCP connection channel identifier.
进一步, 移动终端 600还包括:  Further, the mobile terminal 600 further includes:
第一断开模块 605 , 用于在预先设置的阈值内, 该单 TCP连接通道中没 有数据传输时, 与该代理服务器断开该单 TCP连接通道。 单 TCP连接通道断 开可以避免浪费 TCP连接资源, 本发明对其他断开该单 TCP连接通道的情况 不做限制, 比如在客户端停止运行的情况下, 该单 TCP连接通道由代理服务 器主动发起断开。  The first disconnecting module 605 is configured to disconnect the single TCP connection channel from the proxy server when there is no data transmission in the single TCP connection channel within a preset threshold. The single TCP connection channel is disconnected to avoid wasting TCP connection resources. The present invention does not limit other situations in which the single TCP connection channel is disconnected. For example, when the client stops running, the single TCP connection channel is actively initiated by the proxy server. disconnect.
由上述实施例可知, 移动终端中客户端与代理服务器建立了单 TCP连接 通道, 当该客户端进行多个域名访问时, 都会在该单 TCP连接通道中进行数 据传输, 节省了客户端为多个域名建立多个 TCP连接通道的资源, 同时在该 单 TCP连接通道中以 SPDY协议进行数据传输, 由于 SPDY协议具有并发数据 传输的能力, 从而进一步提高移动终端中客户端与代理服务器进行数据传输 的能力。 图 7描述了本发明一个实施例提供的代理服务器 700, 具体包括: 生成模块 701 , 用于在接收客户端发送的携带 SYN标志的 TCP连接请求 之后, 生成单 TCP连接通道标识。  It can be seen from the above embodiment that the client establishes a single TCP connection channel with the proxy server in the mobile terminal, and when the client performs multiple domain name accesses, data transmission is performed in the single TCP connection channel, which saves the client. The domain name establishes resources of multiple TCP connection channels, and the data transmission is performed by the SPDY protocol in the single TCP connection channel. Since the SPDY protocol has the capability of concurrent data transmission, the data transmission between the client and the proxy server in the mobile terminal is further improved. Ability. FIG. 7 illustrates a proxy server 700 according to an embodiment of the present invention, which specifically includes: a generating module 701, configured to generate a single TCP connection channel identifier after receiving a TCP connection request that carries a SYN flag sent by a client.
第二发送模块 702 ,用于向该客户端发送携带 SYN标志和 ACK标志的 TCP 连接响应, 该 TCP连接响应携带该单 TCP连接通道标识。  The second sending module 702 is configured to send, to the client, a TCP connection response carrying a SYN flag and an ACK flag, where the TCP connection response carries the single TCP connection channel identifier.
第二接收模块 703 , 用于接收该客户端发送的携带 ACK标志的 TCP连接 响应, 以完成该单 TCP连接通道标识对应的单 TCP连接通道的建立。  The second receiving module 703 is configured to receive a TCP connection response that is sent by the client and that carries an ACK flag, so as to complete establishment of a single TCP connection channel corresponding to the single TCP connection channel identifier.
第二传输模块 704, 用于在该客户端访问多个域名时, 与该客户端在该 单 TCP连接通道中以 SPDY协议进行数据传输。  The second transmission module 704 is configured to perform data transmission with the SPDY protocol in the single TCP connection channel when the client accesses multiple domain names.
进一步, 代理服务器 700还包括: — 一 第二断开模块 705 , 用于在预先设置的阈值内, 该单 TCP连接通道中没 有数据传输时, 与该客户端断开该单 TCP连接通道。 TCP连接通道断开可以 避免浪费 TCP连接资源, 本发明对其他断开 TCP连接通道的情况不做限制, 比如在客户端停止运行的情况下, 该 TCP连接通道由代理服务器主动发起断 开。 Further, the proxy server 700 further includes: - a second disconnection module 705, configured to disconnect the single TCP connection channel from the client when there is no data transmission in the single TCP connection channel within a preset threshold. The TCP connection channel is disconnected to avoid wasting TCP connection resources. The present invention does not limit other disconnected TCP connection channels. For example, when the client stops running, the TCP connection channel is actively disconnected by the proxy server.
由上述实施例可知, 移动终端中客户端与代理服务器建立了单 TCP连接 通道, 当该客户端进行多个域名访问时, 都会在该单 TCP连接通道中进行数 据传输, 节省了客户端为多个域名建立多个 TCP连接通道的资源, 同时在该 单 TCP连接通道中以 SPDY协议进行数据传输, 由于 SPDY协议具有并发数据 传输的能力, 从而进一步提高移动终端中客户端与代理服务器进行数据传输 的能力。 本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程, 是可以通过计算机程序来指令相关的硬件来完成, 上述的程序可存储于一计 算机可读取存储介质中, 该程序在执行时, 可包括如上述各方法的实施例的 流程。 其中, 上述的存储介质可为磁碟、 光盘、 只读存储记忆体 ( ROM : Read-Only Memory )或随机存储记忆体 ( RAM : Random Access Memory )等。 施例的说明只是用于帮助理解本发明的技术方案; 同时, 对于本领域的一般 技术人员, 依据本发明的思想, 在具体实施方式及应用范围上均会有改变之 处, 综上所述, 本说明书内容不应理解为对本发明的限制。  It can be seen from the above embodiment that the client establishes a single TCP connection channel with the proxy server in the mobile terminal, and when the client performs multiple domain name accesses, data transmission is performed in the single TCP connection channel, which saves the client. The domain name establishes resources of multiple TCP connection channels, and the data transmission is performed by the SPDY protocol in the single TCP connection channel. Since the SPDY protocol has the capability of concurrent data transmission, the data transmission between the client and the proxy server in the mobile terminal is further improved. Ability. A person skilled in the art can understand that all or part of the process of implementing the above embodiments can be completed by a computer program to instruct related hardware, and the above program can be stored in a computer readable storage medium. When executed, the flow of an embodiment of the methods as described above may be included. The storage medium may be a magnetic disk, an optical disk, a read-only memory (RAM: Read-Only Memory), or a random access memory (RAM). The description of the embodiment is only for helping to understand the technical solution of the present invention; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in specific embodiments and application scopes. The contents of this specification are not to be construed as limiting the invention.

Claims

权 利 要 求 书 claims
1、 一种数据传输方法, 其特征在于, 包括: 1. A data transmission method, characterized by including:
客户端判断本地是否存在单 TCP连接通道标识; The client determines whether there is a single TCP connection channel identifier locally;
在本地存在单 TCP连接通道标识时, 所述客户端访问多个域名时, 所述 客户端与代理服务器在所述单 TCP连接通道标识对应的单 TCP连接通道中以 SPDY协议进行数据传输。 When a single TCP connection channel identifier exists locally and the client accesses multiple domain names, the client and the proxy server use the SPDY protocol to transmit data in the single TCP connection channel corresponding to the single TCP connection channel identifier.
2、 如权利要求 1所述的数据传输方法, 其特征在于, 还包括: 2. The data transmission method as claimed in claim 1, further comprising:
在本地不存在单 TCP连接通道标识时, 所述客户端向所述代理良务器发 送携带 SYN标志的 TCP连接请求; When there is no single TCP connection channel identifier locally, the client sends a TCP connection request carrying the SYN flag to the proxy server;
所述客户端接收所述代理良务器返回的携带 SYN标志和 ACK标志的 TCP 连接响应, 所述 TCP连接响应携带单 TCP连接通道标识; The client receives a TCP connection response carrying a SYN flag and an ACK flag returned by the proxy server, and the TCP connection response carries a single TCP connection channel identifier;
客户端向所述代理服务器发送携带 ACK标志的 TCP连接响应, 以完成所 述单 TCP连接通道标识对应的单 TCP连接通道的建立。 The client sends a TCP connection response carrying an ACK flag to the proxy server to complete the establishment of a single TCP connection channel corresponding to the single TCP connection channel identifier.
3、 如权利要求 2所述的数据传输方法, 其特征在于, 所述单 TCP连接 通道标识由所述代理服务器返回的 TCP连接响应中扩展的 SPDY头域携带。 3. The data transmission method according to claim 2, characterized in that the single TCP connection channel identification is carried by the extended SPDY header field in the TCP connection response returned by the proxy server.
4如权利要求 1-3任一所述的数据传输方法, 其特征在于, 还包括: 在预先设置的阈值内, 所述单 TCP连接通道中没有数据传输时, 所述客 户端与所述代理服务器断开所述单 TCP连接通道。 4. The data transmission method according to any one of claims 1 to 3, further comprising: within a preset threshold, when there is no data transmission in the single TCP connection channel, the client and the agent The server disconnects the single TCP connection channel.
5、 一种数据传输方法, 其特征在于, 包括: 5. A data transmission method, characterized by including:
在接收客户端发送的携带 SYN标志的 TCP连接请求之后, 生成单 TCP连 接通道标识; After receiving the TCP connection request carrying the SYN flag sent by the client, generate a single TCP connection channel identifier;
向所述客户端发送携带 SYN标志和 ACK标志的 TCP连接响应, 所述 TCP 连接响应携带所述单 TCP连接通道标识; Send a TCP connection response carrying a SYN flag and an ACK flag to the client, where the TCP connection response carries the single TCP connection channel identifier;
接收所述客户端发送的携带 ACK标志的 TCP连接响应,以完成所述单 TCP 连接通道标识对应的单 TCP连接通道的建立; Receive the TCP connection response carrying the ACK flag sent by the client to complete the establishment of a single TCP connection channel corresponding to the single TCP connection channel identifier;
在所述客户端访问多个域名时, 与所述客户端在所述单 TCP连接通道中 以 SPDY协议进行数据传输。 When the client accesses multiple domain names, in the single TCP connection channel with the client Data transmission is performed using SPDY protocol.
6、 如权利要求 5所述的数据传输方法, 其特征在于, 所述单 TCP连接 通道标识由所述向所述客户端发送的 TCP连接响应中扩展的 SPDY头域携带。 6. The data transmission method according to claim 5, characterized in that the single TCP connection channel identifier is carried by the extended SPDY header field in the TCP connection response sent to the client.
7、 如权利要求 5或 6所述的数据传输方法, 其特征在于, 还包括: 在预先设置的阈值内, 所述单 TCP连接通道中没有数据传输时, 与所述 客户端断开所述单 TCP连接通道。 7. The data transmission method according to claim 5 or 6, further comprising: within a preset threshold, when there is no data transmission in the single TCP connection channel, disconnecting the data from the client. Single TCP connection channel.
8、 一种数据传输的移动终端, 其特征在于, 包括: 8. A mobile terminal for data transmission, characterized by including:
判断模块, 用于判断本地是否存在单 TCP连接通道标识; Determination module, used to determine whether there is a single TCP connection channel identifier locally;
第一传输模块, 用于在本地存在单 TCP连接通道标识时, 所述移动终端 访问多个域名时, 与代理服务器在所述单 TCP连接通道标识对应的单 TCP连 接通道中以 SPDY协议进行数据传输。 The first transmission module is used to transmit data with the proxy server using the SPDY protocol in the single TCP connection channel corresponding to the single TCP connection channel identifier when the mobile terminal accesses multiple domain names when a single TCP connection channel identifier exists locally. transmission.
9、 如权利要求 8所述的移动终端, 其特征在于, 还包括: 9. The mobile terminal according to claim 8, further comprising:
第一发送模块, 用于在本地不存在单 TCP连接通道标识时, 向所述代理 服务器发送携带 SYN标志的 TCP连接请求; The first sending module is used to send a TCP connection request carrying a SYN flag to the proxy server when a single TCP connection channel identifier does not exist locally;
第一接收模块, 用于接收所述代理服务器返回的携带 SYN标志和 ACK标 志的 TCP连接响应, 所述 TCP连接响应携带单 TCP连接通道标识; The first receiving module is configured to receive a TCP connection response carrying a SYN flag and an ACK flag returned by the proxy server, where the TCP connection response carries a single TCP connection channel identifier;
所述第一发送模块, 还用于向所述代理服务器发送携带 ACK标志的 TCP 连接响应, 以完成所述单 TCP连接通道标识对应的单 TCP连接通道的建立。 The first sending module is also configured to send a TCP connection response carrying an ACK flag to the proxy server to complete the establishment of a single TCP connection channel corresponding to the single TCP connection channel identifier.
10、 如权利要求 8或 9所述的移动终端, 其特征在于, 还包括: 第一断开模块, 用于在预先设置的阈值内, 所述单 TCP连接通道中没有 数据传输时, 与所述代理服务器断开所述单 TCP连接通道。 10. The mobile terminal according to claim 8 or 9, further comprising: a first disconnection module, configured to connect to the mobile terminal when there is no data transmission in the single TCP connection channel within a preset threshold. The proxy server disconnects the single TCP connection channel.
11、 一种代理服务器, 其特征在于, 包括: 11. A proxy server, characterized by including:
生成模块,用于在接收客户端发送的携带 SYN标志的 TCP连接请求之后, 生成单 TCP连接通道标识; The generation module is used to generate a single TCP connection channel identifier after receiving the TCP connection request carrying the SYN flag sent by the client;
第二发送模块, 用于向所述客户端发送携带 SYN标志和 ACK标志的 TCP 连接响应, 所述 TCP连接响应携带所述单 TC P连接通道标识; The second sending module is configured to send a TCP connection response carrying a SYN flag and an ACK flag to the client, where the TCP connection response carries the single TCP connection channel identifier;
第二接收模块, 用于接收所述客户端发送的携带 ACK标志的 TCP连接响 应, 以完成所述单 TCP连接通道标识对应的单 TCP连接通道的建立; 第二传输模块, 用于在所述客户端访问多个域名时, 与所述客户端在所 述单 TCP连接通道中以 SPDY协议进行数据传输。 The second receiving module is configured to receive the TCP connection response carrying the ACK flag sent by the client. to complete the establishment of a single TCP connection channel corresponding to the single TCP connection channel identifier; the second transmission module is used to communicate with the client on the single TCP connection channel when the client accesses multiple domain names. The SPDY protocol is used for data transmission.
12、 如权利要求 11所述的代理服务器, 其特征在于, 还包括: 第二断开模块, 用于在预先设置的阈值内, 所述单 TCP连接通道中没有 数据传输时, 与所述客户端断开所述单 TCP连接通道。 12. The proxy server according to claim 11, further comprising: a second disconnect module, configured to communicate with the client when there is no data transmission in the single TCP connection channel within a preset threshold. The end disconnects the single TCP connection channel.
PCT/CN2012/079203 2012-07-26 2012-07-26 Data transmission method, mobile terminal and proxy server WO2014015503A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2012/079203 WO2014015503A1 (en) 2012-07-26 2012-07-26 Data transmission method, mobile terminal and proxy server
CN201280000890.5A CN102907071B (en) 2012-07-26 2012-07-26 Data transmission method, mobile terminal, proxy server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2012/079203 WO2014015503A1 (en) 2012-07-26 2012-07-26 Data transmission method, mobile terminal and proxy server

Publications (1)

Publication Number Publication Date
WO2014015503A1 true WO2014015503A1 (en) 2014-01-30

Family

ID=47577507

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/079203 WO2014015503A1 (en) 2012-07-26 2012-07-26 Data transmission method, mobile terminal and proxy server

Country Status (2)

Country Link
CN (1) CN102907071B (en)
WO (1) WO2014015503A1 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103220278A (en) * 2013-04-01 2013-07-24 深信服网络科技(深圳)有限公司 Method for controlling access connection request of webpage and gateway
CN104113564A (en) * 2013-04-17 2014-10-22 中国移动通信集团公司 Hyper text transfer protocol connection multiplexing method, device, system, and terminal
CN107979592B (en) * 2013-09-30 2020-06-30 腾讯科技(深圳)有限公司 Method and device for sending service request message
CN104253821B (en) * 2014-10-17 2018-04-17 北京太一星晨信息技术有限公司 A kind of SPDY protocol agent methods and agency plant
WO2017131645A1 (en) 2016-01-27 2017-08-03 Aruba Networks, Inc. Detecting malware on spdy connections
CN108055263B (en) * 2017-12-11 2020-07-24 北京理工大学 Entity authentication authority management system and method in satellite communication network
CN112104744B (en) * 2020-03-30 2022-09-09 厦门网宿有限公司 Traffic proxy method, server and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011071850A2 (en) * 2009-12-07 2011-06-16 Coach Wei System and method for website performance optimization and internet traffic processing
WO2011075738A1 (en) * 2009-12-18 2011-06-23 Qualcomm Incorporated Http optimization, multi-homing, mobility and priority
CN102457573A (en) * 2010-10-27 2012-05-16 索尼公司 Data communication method and information processing device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101997673B (en) * 2009-08-17 2012-11-21 成都市华为赛门铁克科技有限公司 Network agent implementation method and device
CN101945141B (en) * 2010-09-17 2014-02-19 北京神州泰岳软件股份有限公司 TCP-based method and system for traversing NAT devices

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011071850A2 (en) * 2009-12-07 2011-06-16 Coach Wei System and method for website performance optimization and internet traffic processing
WO2011075738A1 (en) * 2009-12-18 2011-06-23 Qualcomm Incorporated Http optimization, multi-homing, mobility and priority
CN102457573A (en) * 2010-10-27 2012-05-16 索尼公司 Data communication method and information processing device

Also Published As

Publication number Publication date
CN102907071B (en) 2015-04-29
CN102907071A (en) 2013-01-30

Similar Documents

Publication Publication Date Title
WO2014015503A1 (en) Data transmission method, mobile terminal and proxy server
US10021191B2 (en) Method and apparatus for multipath communication
US9392081B2 (en) Method and device for sending requests
EP1892887B1 (en) Communication method between communication devices and communication apparatus
US9774704B2 (en) Home gateway, cloud server, and method for communication therebetween
US9036517B2 (en) Methods and apparatus for establishing a tunneled direct link setup (TDLS) session between devices in a wireless network
CN106851782B (en) Data transmission method and device
US9516114B2 (en) Data packet transmission method and related device and system
US10367893B1 (en) Method and apparatus of performing peer-to-peer communication establishment
US20140082180A1 (en) Information processor apparatus, information processing method, and recording medium
KR101898492B1 (en) Electronic device and method for controlling electronic device
WO2014201697A1 (en) Method and device for establishing rrc connection
TWI595765B (en) Method and communication device for network address translation traversal
WO2012151994A1 (en) Resource downloading method, device and system
JPWO2007039942A1 (en) Terminal device, server device, and command device
CA2790409A1 (en) Method and apparatus for detecting active and orphan session-based connections
KR20190108371A (en) Communication method for selecting a network slice / service and a communication device performing the same
CN104660550B (en) A method of conversate migration between multiserver
WO2013120325A1 (en) Browser-to-browser direct communication method, device and communication system
CN112165449B (en) Control method of real-time authority of web application, electronic device and storage medium
Jiang et al. Design of real time multimedia platform and protocol to the internet of things
US8924520B2 (en) Method, remote access server and system for configuring a quality of service parameter
EP3079328B1 (en) Media resource sharing method, shared server and shared system
Zheng et al. Research on multi-path network in cloud computing based on sctp
JP5586689B2 (en) Home network, device information sharing method between home networks, and home network system

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201280000890.5

Country of ref document: CN

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

Ref document number: 12881933

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12881933

Country of ref document: EP

Kind code of ref document: A1