CN101808080A - Data transmitting method and associated device - Google Patents

Data transmitting method and associated device Download PDF

Info

Publication number
CN101808080A
CN101808080A CN 200910238933 CN200910238933A CN101808080A CN 101808080 A CN101808080 A CN 101808080A CN 200910238933 CN200910238933 CN 200910238933 CN 200910238933 A CN200910238933 A CN 200910238933A CN 101808080 A CN101808080 A CN 101808080A
Authority
CN
China
Prior art keywords
described
tcp
tcp message
data
server
Prior art date
Application number
CN 200910238933
Other languages
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 CN 200910238933 priority Critical patent/CN101808080A/en
Publication of CN101808080A publication Critical patent/CN101808080A/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Application independent communication protocol aspects or techniques in packet data networks
    • H04L69/16Transmission control protocol/internet protocol [TCP/IP] or user datagram protocol [UDP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic regulation in packet switching networks
    • H04L47/10Flow control or congestion control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic regulation in packet switching networks
    • H04L47/10Flow control or congestion control
    • H04L47/19Flow control or congestion control at layers above network layer
    • H04L47/193Flow control or congestion control at layers above network layer at transport layer, e.g. TCP related
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Application independent communication protocol aspects or techniques in packet data networks
    • H04L69/16Transmission control protocol/internet protocol [TCP/IP] or user datagram protocol [UDP]
    • H04L69/163Adaptation of TCP data exchange control procedures

Abstract

The invention discloses a data transmitting method and an associated device. The method comprises the following steps that: a first TCP message with a SYN mark is transmitted from a customer terminal to a server; after receiving the first TCP message, the server returns a second TCP message with an ACK mark and a SYN mark to the customer terminal; after receiving the second TCP message, the customer terminal transmits a third TCP message with the ACK mark to the server so as to establish the TCP connection, and the data loading is comprised after the third TCP message; and the customer terminal continues to transmit the TCP message of other loads carrying the data to the server on the TCP connection. The data load is carried in the third handshake packet, so the data transmission efficiency is improved, the data transmission time is saved, and the user experience is improved.

Description

A kind of data transmission method for uplink and relevant device

Technical field

The present invention relates to communication field, relate in particular to a kind of data and send granting and relevant device.

Background technology

(Transport Control Protocol is a kind of connection-oriented TCP) to transmission control protocol, reliably transport layer protocol.Be meant once that towards connection normal TCP transmission need be connected and finishes by set up specific virtual circuit at TCP client and TCP server end, this TCP connects and can adopt " three-way handshake " process to realize.

" three-way handshake " process is respectively:

(1) client sends a TCP message of being with the SYN sign to server, and this is the message 1 in the three-way handshake process.

(2) server end is responded client and is with ACK sign and SYN sign message simultaneously, and this is the 2nd message in the three-way handshake.This message is represented the response of client SYN message just now; Simultaneously will indicate that again SYN sends to client, whether be ready for data communication with query user's end.

(3) client must be responded ACK message of server end once more, and this is a message segment 3.

Like this, just can set up corresponding TCP afterwards at " three-way handshake " and connect, client connects to server transmission data by this TCP again.And above-mentioned message segment 3 (or becoming the 3rd handshake message) does not have load, and promptly its loaded length is 0.

TCP three-way handshake packet capturing result as shown in Figure 1.

Wherein, the packet capturing of shaking hands for the first time is that 42:tcp connection originating end is that client (10.10.99.124) has sent a SYN bag to 192.168.99.254, awaits a response.Second handshake 43: service end (192.168.99.254) is accepted connection, sends SYN+ACK and wraps to client.Shake hands 44 for the third time: client is responded ACK and is given service end after receiving and wrapping for No. 43, and so far three-way handshake is finished, and TCP connects foundation.Afterwards 46 be to connect to set up later data interaction.As can be seen from Figure 1, the payload length in the handshake packet 44 is 0 for the third time.

Summary of the invention

Embodiment of the invention technical problem to be solved is, provides a kind of data to send and provides and relevant device, can improve the data transmission efficiency that TCP connects.

In order to solve the problems of the technologies described above, the embodiment of the invention provides a kind of data transmission method for uplink, comprising: user end to server sends a TCP message that has the SYN sign; After described server is received a described TCP message, return to described client and to have ACK sign and SYN indicates the 2nd TCP message; After described client is received described the 2nd TCP message, send the 3rd TCP message that has the ACK sign to described server and connect the described load that in the 3rd TCP message, also comprises described data to set up TCP.

Wherein, described method also comprises: if the load of the data in described the 3rd TCP message is a part of load of these data, then described client continues to send the described TCP message that carries other load of described data to server in described TCP connection.

Described method can be used in the browser application, and described server is a web page server, and when the described web page server of described client-access, described client is set up at least two TCP and connected.

Correspondingly, the embodiment of the invention also provides a kind of client, comprising: first transmitting element is used for sending a TCP message that has the SYN sign to server; Second receiving element is used to receive described server and has ACK sign and SYN indicates the 2nd TCP message to returning after receiving a described TCP message; The 3rd transmitting element is used for after receiving described the 2nd TCP message, and send the 3rd TCP message that has the ACK sign to described server and connect to set up TCP, wherein, the described load that in the 3rd TCP message, also comprises described data.Wherein, described client also can comprise data transmission unit, whether the load that is used for judging the data of described the 3rd TCP message is whole load of these data, and when judged result for not the time, connect to set up at described TCP and finish the back and connect to server by described TCP and continue the TCP message that transmission carries other load of described data.

The embodiment of the invention also provides a kind of server, comprising: first receiving element is used to receive the TCP message that has the SYN sign that client sends; Second transmitting element, be used to receive a described TCP message after, return to described client and to have ACK sign and SYN indicates the 2nd TCP message; The 3rd receiving element is used to receive the 3rd TCP message that has the ACK sign that described client sends after receiving described the 2nd TCP message, and sets up the TCP connection, wherein, and the described load that in the 3rd TCP message, also comprises described data.

Wherein, described server also can comprise the Data Receiving unit, with being used for when the load of the data of described the 3rd TCP message is this section data load, in described TCP connection, receive the TCP message that described client continues other load that carry described data of sending.Described server can be the web page server in the browser application, and when the described web page server of described client-access, described client is set up at least two TCP and connected.

In embodiments of the present invention, carry data load simultaneously in the 3rd handshake packet in " three-way handshake ", improved the efficient of transfer of data, saved the time of transfer of data, promoted user experience.

Description of drawings

In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, to do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art below, apparently, accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.

Fig. 1 is the schematic diagram of TCP three-way handshake packet capturing result in the prior art;

Fig. 2 is an idiographic flow schematic diagram of the data transmission method for uplink in the embodiment of the invention;

Fig. 3 is that the client in the embodiment of the invention initiatively initiates to set up the process schematic diagram that TCP connects;

Fig. 4 is a concrete schematic diagram of forming of the client in the embodiment of the invention;

Fig. 5 is a concrete schematic diagram of forming of the server in the embodiment of the invention.

Embodiment

Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that is obtained under the creative work prerequisite.

In the prior art: the loaded length of the 3rd handshake message when setting up the TCP connection is 0.Therefore, the embodiment of the invention is carried data in the 3rd handshake packet, not only can confirm but also can send data in passing handshaking information, saves download time, improves speed of download, promotes user experience.

As shown in Figure 2, be an idiographic flow schematic diagram of the data transmission method for uplink in the embodiment of the invention.This flow process comprises:

101, user end to server sends a TCP message that has the SYN sign.

102, after described server is received a described TCP message, return to described client and to have ACK sign and SYN indicates the 2nd TCP message.

103, after described client is received described the 2nd TCP message, send the 3rd TCP message that has the ACK sign to described server and connect to set up TCP, wherein, the described load that in the 3rd TCP message, also comprises described data.Wherein, the part or all of data load that sends in the TCP connection that the load of described data is meant in this foundation, and, if can sending in this step, the load of the data that will send finishes, then this flow process can not comprise following step 104; If the data that will send also comprise other load except comprising the load that sends in this step, then this flow process also comprises step 104, so that client continues to send follow-up data load in the TCP connection of having set up.

And the load of above-mentioned data can be placed on after the TCP head of the 3rd TCP message.

104, if the load of the data in described the 3rd TCP message is a part of load of these data, then described client continues to send the described TCP message that carries other load of described data to server in described TCP connection.Other load described herein are meant other load except that the load that step 103 has sent in the data that will send.

Like this, the 3rd TCP message is equivalent to both connection be confirmed, has carried the data that need transmission simultaneously again.

Said method can be used in the browser application, and then server is corresponding web page server.At this moment, webpage of client-access is set up tens TCP connections in the time of most to I haven't seen you for ages, behind the such scheme in the utilization embodiment of the invention, can accelerate the speed that webpage is opened greatly, and user experience is very good.Promptly the linking number of once setting up for needs is many more, the situation that network condition is not so good, and the advantage of the method is obvious more.

Realize describing above-mentioned steps below in conjunction with program:

In the prior art, the function prototype of TCP connection is:

int?connect(int?s,const?struct?sockaddr*name,int?namelen);

Function performance: be used for the socket of parameter s ockfd is connected to the network address of parameter s erv_addr appointment.

Parameter declaration:

S: socket descriptor

Name: the pointer that points to address structure body to be connected

Namelen: the length of structure sockaddr

And the function prototype that TCP in embodiments of the present invention connects is:

int?connect(int?s,const?struct?sockaddr*name,int?namelen,char*buffer,intbufferlen);

That is, increase a buffer than prior art, buffer is identical with former flow process when be sky, otherwise, in shaking hands the last time, the data of the Bufferlen length among the bufffer are placed in the handshake packet send.

Bufferlen: real data length

Accordingly, in the embodiment of the invention client initiatively initiate to set up the process that TCP connects can be referring to Fig. 3.

Accordingly, as shown in Figure 4 and Figure 5, the embodiment of the invention also provides a kind of client 4 and server 5.This client 4 comprises: first transmitting element 41 is used for sending a TCP message that has the SYN sign to server 5; Second receiving element 42 is used to receive described server 5 and has ACK sign and SYN indicates the 2nd TCP message to returning after receiving a described TCP message; The 3rd transmitting element 43 is used for after receiving described the 2nd TCP message, and send the 3rd TCP message that has the ACK sign to described server 5 and connect to set up TCP, wherein, the described load that also comprises described data after in the 3rd TCP message.Data transmission unit 44, whether the load that is used for judging the data of described the 3rd TCP message is whole load of these data, and when judged result for not the time, connect to set up at described TCP and finish the back and connect to server 5 by described TCP and continue the TCP message that transmissions carry other load of described data.

Wherein, if the data load that will send can once send finish, then this client 4 can not comprise data transmission unit 44; If the data load that will send needs to send in batches, then this client 4 comprises data transmission unit 44, so that client 4 continues to send data in the TCP connection of having set up.

Accordingly, this server 5 comprises: first receiving element 51 is used to receive the TCP message that has the SYN sign that client 4 sends; Second transmitting element 52, be used to receive a described TCP message after, return to described client 4 and to have ACK sign and SYN indicates the 2nd TCP message; The 3rd receiving element 53 is used to receive the 3rd TCP message that has the ACK sign that described client 4 sends after receiving described the 2nd TCP message, and sets up the TCP connection, wherein, and the described load that in the 3rd TCP message, also comprises described data.In certain embodiments, above-mentioned load can be placed on after the TCP head of the 3rd TCP message.

Data Receiving unit 54 is used for when the load of the data of described the 3rd TCP message is this section data load, receives the TCP message that described client 4 continues other load that carry described data of sending in described TCP connection.

Wherein, finish if the data load that will send can once send in the 3rd TCP message, then this server 5 can not comprise Data Receiving unit 54; If the data load that will send once can send Wan in the 3rd TCP message, then this server 5 comprises Data Receiving unit 54, so that client 4 continues to send data in the TCP connection of having set up.

Wherein, this server can be the web page server in the browser application, and when the described web page server of described client-access, described client is set up at least two TCP and connected.

By above-mentioned description to each embodiment as can be known, carry data load simultaneously in the 3rd handshake packet in " three-way handshake ", improved the efficient of transfer of data, saved the time of transfer of data, promoted user experience.

Through the above description of the embodiments, those skilled in the art can be well understood to each execution mode and can realize by the mode that software adds essential general hardware platform, can certainly pass through hardware.Based on such understanding, the part that technique scheme contributes to prior art in essence in other words can embody with the form of software product, this computer software product can be stored in the computer-readable recording medium, as ROM/RAM, magnetic disc, CD etc., comprise that some instructions are with so that a computer equipment (can be a personal computer, server, perhaps network equipment etc.) carry out the described method of some part of each embodiment or embodiment.

Above-described execution mode does not constitute the qualification to this technical scheme protection range.Any at above-mentioned execution mode spirit and principle within done modification, be equal to and replace and improvement etc., all should be included within the protection range of this technical scheme.

Claims (11)

1. a data transmission method for uplink is characterized in that, described method comprises:
User end to server sends a TCP message that has the SYN sign;
After described server is received a described TCP message, return to described client and to have ACK sign and SYN indicates the 2nd TCP message;
After described client is received described the 2nd TCP message, send the 3rd TCP message that has the ACK sign to described server and connect to set up TCP, wherein, the described load that in the 3rd TCP message, also comprises described data.
2. the method for claim 1 is characterized in that, described method also comprises:
If the load of the data in described the 3rd TCP message is a part of load of these data, then described client continues to send the TCP message of other load that carry described data to server in described TCP connection.
3. method as claimed in claim 1 or 2 is characterized in that described method is used for browser application, and described server is a web page server, and when the described web page server of described client-access, described client is set up at least two TCP and connected.
4. method as claimed in claim 1 or 2 is characterized in that, the load of described data is placed on after the TCP head of the 3rd TCP message.
5. a client is characterized in that, described client comprises:
First transmitting element is used for sending a TCP message that has the SYN sign to server;
Second receiving element is used to receive described server and has ACK sign and SYN indicates the 2nd TCP message to returning after receiving a described TCP message;
The 3rd transmitting element is used for after receiving described the 2nd TCP message, and send the 3rd TCP message that has the ACK sign to described server and connect to set up TCP, wherein, the described load that in the 3rd TCP message, also comprises described data.
6. as client as described in the claim 5, it is characterized in that described client also comprises:
Data transmission unit, whether the load that is used for judging the data of described the 3rd TCP message is whole load of these data, and when judged result for not the time, connect to set up at described TCP and finish the back and connect by described TCP and continue to continue the TCP message that transmission carries other load of described data to server.
7. as client as described in claim 5 or 6, it is characterized in that the load of described data is placed on after the TCP head of the 3rd TCP message.
8. a server is characterized in that, described server comprises:
First receiving element is used to receive the TCP message that has the SYN sign that client sends;
Second transmitting element, be used to receive a described TCP message after, return to described client and to have ACK sign and SYN indicates the 2nd TCP message;
The 3rd receiving element is used to receive the 3rd TCP message that has the ACK sign that described client sends after receiving described the 2nd TCP message, and sets up the TCP connection, wherein, and the described load that in the 3rd TCP message, also comprises described data.
9. server as claimed in claim 8 is characterized in that, described server also comprises:
The Data Receiving unit is used for when the load of the data of described the 3rd TCP message is this section data load, receives the TCP message that described client continues other load that carry described data of sending in described TCP connection.
10. server as claimed in claim 8 or 9 is characterized in that described server is the web page server in the browser application, and when the described web page server of described client-access, described client is set up at least two TCP and connected.
11., it is characterized in that the load of described data is placed on after the TCP head of the 3rd TCP message as client as described in claim 8 or 9.
CN 200910238933 2009-12-30 2009-12-30 Data transmitting method and associated device CN101808080A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200910238933 CN101808080A (en) 2009-12-30 2009-12-30 Data transmitting method and associated device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN 200910238933 CN101808080A (en) 2009-12-30 2009-12-30 Data transmitting method and associated device
PCT/CN2010/080158 WO2011079743A1 (en) 2009-12-30 2010-12-23 Data transmission method and associated devices

Publications (1)

Publication Number Publication Date
CN101808080A true CN101808080A (en) 2010-08-18

Family

ID=42609700

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200910238933 CN101808080A (en) 2009-12-30 2009-12-30 Data transmitting method and associated device

Country Status (2)

Country Link
CN (1) CN101808080A (en)
WO (1) WO2011079743A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011079743A1 (en) * 2009-12-30 2011-07-07 深圳市同洲电子股份有限公司 Data transmission method and associated devices
CN109462591A (en) * 2018-11-19 2019-03-12 中国科学院信息工程研究所 A kind of data transmission method, method of reseptance, apparatus and system

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104079571B (en) * 2014-06-27 2017-09-01 广州华多网络科技有限公司 A kind of method and device for recognizing Android simulator

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100505663C (en) * 2007-03-09 2009-06-24 中国科学院软件研究所 Reliable transfer method of short message in the ad hoc network
CN101114999B (en) * 2007-08-26 2010-08-04 上海华为技术有限公司 Data transmission control method and data transmission set
CN101547210A (en) * 2009-05-14 2009-09-30 福建星网锐捷网络有限公司 Method and device for processing TCP connection
CN101808080A (en) * 2009-12-30 2010-08-18 深圳市同洲电子股份有限公司 Data transmitting method and associated device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011079743A1 (en) * 2009-12-30 2011-07-07 深圳市同洲电子股份有限公司 Data transmission method and associated devices
CN109462591A (en) * 2018-11-19 2019-03-12 中国科学院信息工程研究所 A kind of data transmission method, method of reseptance, apparatus and system

Also Published As

Publication number Publication date
WO2011079743A1 (en) 2011-07-07

Similar Documents

Publication Publication Date Title
CN102571756B (en) Multichannel in file system session connects
CN102857579B (en) Information processing method, device, terminal and server
JP5038515B2 (en) Data transmission
CN102388648B (en) Header compression for IP relay nodes
TW448658B (en) Communication control method, communication method, server, terminal equipment, relay equipment and communication system
US9755977B2 (en) Transmission of delay tolerant data
CN1185841C (en) Method and device for performing of network operations
JP2802088B2 (en) Protocol selection switching method
KR100585781B1 (en) File transfer method for mobile instant messaging service
EP2538637A2 (en) Multi-path transmission control protocol proxy service
US6529516B1 (en) Gateway architecture for data communication over bandwidth-constrained and charge-by-use networks
CN1161942C (en) Directory server for registering user on internet-type network and/or method for locating user on said network
CN102640471B (en) Method and apparatus for multipath communication
CN102891890B (en) Exchange method between a kind of terminal and relevant device, system
JP2009087361A (en) System and method of creating and communicating with component-based wireless application
CN105100232B (en) A kind of method of the serve end program smooth upgrade of continual service
CN1238803C (en) Apparatus and method for synthesizing web browse business
CN102567125B (en) Method for realizing communication between browser pages
CN1172505C (en) Method for transferring data between Internet server and chip-contained card terminal
CN102546800B (en) Handshake and communication methods for gateway, gateway and Web communication system
CN101193089B (en) Stateful session system and its realization method
CN101931946B (en) Multi-access method of terminal in evolved packet system and system thereof
CN103716136B (en) A kind of data transferring method and system
DE60222455T2 (en) Creation of command and data scripts for use by a personal security device
KR20070110344A (en) Security protocols on incompatible transports

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 1147619

Country of ref document: HK

C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20100818

REG Reference to a national code

Ref country code: HK

Ref legal event code: WD

Ref document number: 1147619

Country of ref document: HK