CN105391712B - A kind of data rapid transmission method and device based on Transmission Control Protocol - Google Patents

A kind of data rapid transmission method and device based on Transmission Control Protocol Download PDF

Info

Publication number
CN105391712B
CN105391712B CN201510749741.4A CN201510749741A CN105391712B CN 105391712 B CN105391712 B CN 105391712B CN 201510749741 A CN201510749741 A CN 201510749741A CN 105391712 B CN105391712 B CN 105391712B
Authority
CN
China
Prior art keywords
transmission rate
address
file
transmission
database
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510749741.4A
Other languages
Chinese (zh)
Other versions
CN105391712A (en
Inventor
金峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Onething Technology Co Ltd
Original Assignee
Shenzhen Onething Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Onething Technology Co Ltd filed Critical Shenzhen Onething Technology Co Ltd
Priority to CN201510749741.4A priority Critical patent/CN105391712B/en
Publication of CN105391712A publication Critical patent/CN105391712A/en
Application granted granted Critical
Publication of CN105391712B publication Critical patent/CN105391712B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • 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]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present invention provides a kind of data rapid transmission method and device based on Transmission Control Protocol, this method comprises: responding terminal receives the file request that request end issues, responding terminal obtains the IP address of the request end according to the file request, judge the IP address that whether there is request end in database, if there is no, then start to transmit file to request end with the initial TCP window size of default, and saves the IP address and transmission rate of request end in the database;If there is the IP address of request end, then initial TCP window size is calculated according to the transmission rate of preservation and the two-way time RTT counted, starts to transmit file with initial TCP window size, and update transmission rate.This method determines initial TCP window size according to the bandwidth of different request ends, reduces the time of request end downloading file, improves the network resource utilization of request end.

Description

A kind of data rapid transmission method and device based on Transmission Control Protocol
Technical field
The present invention relates to network technique field more particularly to a kind of data rapid transmission methods and dress based on Transmission Control Protocol It sets.
Background technique
In the epoch of internet prosperity, the download bandwidth of general user is relatively high, such as in 2M or more.However user is from clothes When business device download data, then the downloading rate most started slowly increases the rate of downloading since very little again.Different use Family, network bandwidth are different.User higher for network bandwidth, when downloading a file, downloading rate since very little again Slowly increase, so that speed of download is very slow, and the time for downloading file needs is relatively long, while the network of user Resource utilization is not high.Especially for more obvious for downloading small documents.
Summary of the invention
It is slow in order to solve transmission file speed, while the problem that the network resource utilization of user is not high, the present invention provide A kind of data express delivery transmission method and device based on Transmission Control Protocol.
The present invention provides a kind of data express delivery transmission method based on Transmission Control Protocol, the described method comprises the following steps:
Responding terminal receives the file request that request end issues, and the file request includes the IP address of the request end;
The responding terminal obtains the IP address of the request end according to the file request;
Whether in the database the responding terminal judges the IP address, and the database is for storing IP address and IP The corresponding transmission rate in location;
If the IP address is in the database, the responding terminal obtains the IP address in the database Corresponding transmission rate;
The responding terminal calculates window size according to the transmission rate;
The responding terminal transmits the file using the window size as initial window size to the request end;
When the file end of transmission, the responding terminal calculates the transmission rate for transmitting the file;
The responding terminal updates the transmission rate in the database, and the transmission rate is that the IP address is opposite The transmission rate answered.
Preferably, the responding terminal according to the transmission rate calculate window size include: the responding terminal calculate with Transmission two-way time RTT between the request end;It is big to calculate window according to the transmission rate and RTT for the responding terminal It is small.
Preferably, if the IP address not in the database, which comprises the database saves the request The IP address at end;The responding terminal starts to transmit the file with the initial window size defaulted;When the file end of transmission, The responding terminal calculates the transmission rate for transmitting the file;The responding terminal saves the transmission speed in the database Rate, the transmission rate are the corresponding transmission rate of the IP address.
Preferably, the transmission rate is the average transmission rate in the document transmission process.
Preferably, the transmission rate is the minimum transmission rate in the document transmission process.
The present invention also provides a kind of data quick transmission devices based on Transmission Control Protocol, described device include:
Receiving module, for receiving the file request of request end sending, the file request includes the IP of the request end Address;
First obtains module, and the IP address of the request end is obtained according to the file request;
Judgment module, for whether in the database judging the IP address, the database for store IP address and The corresponding transmission rate of IP address;
Second obtains module, if in the database for the IP address, obtaining institute in the database State the corresponding transmission rate of IP address;
First computing module, for calculating window size according to the transmission rate;
Transmission module, for transmitting the file using the window size as initial window size to the request end;
Second computing module, for working as the file end of transmission, the responding terminal calculates the transmission for transmitting the file Rate;
Preserving module, for updating the transmission rate in the database, the transmission rate is the IP address Corresponding transmission rate.
Preferably, first computing module of described device includes: the first computing unit, for calculating and the request Transmission two-way time RTT between end;Second computing unit, for it is big to calculate window according to the transmission rate and RTT It is small.
Preferably, if the preserving module of described device is also used to the IP address not in the database, the number The IP address is saved according to library;The transmission module is also used to start with the initial window size of default to transmit the file;Institute It states the second computing module to be also used to when the file end of transmission, the responding terminal calculates the transmission rate for transmitting the file; The preserving module is also used to save the transmission rate in the database, and the transmission rate is that the IP address is opposite The transmission rate answered.
Preferably, the transmission rate is the average transmission rate in the document transmission process.
Preferably, the transmission rate is the minimum transmission rate in the document transmission process.
The present invention provides a kind of data rapid transmission method and device based on Transmission Control Protocol, responding terminal receive request end The file request of sending, the responding terminal obtain the IP address of the request end according to the file request, judge in database With the presence or absence of the IP address of request end, if there is no the IP address of request end, then with the initial TCP window size of default to asking End transmission file is sought, and saves the IP address of request end in the database, calculated after file end of transmission and saves the IP address Corresponding transmission rate;If there is the IP address of request end, then according to the transmission rate of preservation and count it is round-trip when Between RTT calculate initial TCP window size, start to transmit file with initial TCP window size, calculate simultaneously after file end of transmission Update the corresponding transmission rate of the IP address.Present invention assumes that the corresponding network bandwidth of the same IP address whithin a period of time It is constant, transmission rate when downloading file is requested by last user terminal to calculate the initial TCP window of this downloading data Size realizes according to the bandwidth of different user and determines initial TCP window size, so that the initial speed of user terminal downloading file Rate is carried out with the rate for being most suitable for user terminal bandwidth, and the rate without since the rate of very little, accelerating file download is filled Divide the Internet resources that user is utilized.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other Attached drawing.
Fig. 1 is the flow chart of the data rapid transmission method based on Transmission Control Protocol.
Fig. 2 is the schematic diagram that responding terminal sends data to request end.
Fig. 3 is the functional block diagram of the data quick transmission devices based on Transmission Control Protocol.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to of the invention specific Embodiment is described in further detail.
Fig. 1 is the flow chart of the data rapid transmission method based on Transmission Control Protocol.This method comprises the following steps.
Step S01, responding terminal receive the file request that request end issues, and this document request includes the IP address of request end. Responding terminal can be any equipment that can send file, such as server.Request end can be used to issue the user of request Terminal device, for example, the user terminals such as computer, mobile phone, palm PC.Specifically, user terminal requests lower published article to server end Part, server end transmit this document to user terminal.This document includes but is not limited to picture, word document, pdf document, compression Document etc..
Step S02, responding terminal is according to the IP address of this document request request end.
In the database whether step S03, responding terminal judge the IP address.The data saved in database include request end IP address, the corresponding transmission rate of IP address.If so, executing step S04;If not, executing step S09.Database It can be located in responding terminal storage equipment, can also be located in the storage equipment of other equipment.
Step S04 obtains the corresponding transmission rate of the IP address in the database.
Step S05, responding terminal calculate window size according to transmission rate.Firstly, responding terminal calculates between request end Data transmit two-way time RTT.Wherein, two-way time RTT refers to that sender sends message to message pair transmitted by receiving The confirmation message the answered time experienced.The transmission rate of data packet passes through data volume transmitted in a two-way time RTT It calculates.Assuming that corresponding network bandwidth is constant whithin a period of time for the same IP address.Then according to transmission rate and RTT calculates TCP and sends window size.Specific calculation formula are as follows: window size=transmission rate/RTT.
Step S06, responding terminal transmit this document as initial window size to request end using window size.Responding terminal is in terms of The TCP of calculating sends the file that window size needs to download as initial window size to request end transmission.
Step S07, when this document end of transmission, responding terminal calculates the transmission rate of transmission this document.Transmission rate can be with For the average transmission rate in document transmission process, or the minimum transmission rate in document transmission process can also be Other suitable transmission rates of definition.
Step S08 updates the transmission rate in the database, which is the corresponding transmission speed of the IP address Rate, process terminate.
Step S09 saves the IP address of request end in the database.If there is no the IP address of request end in database, So database will save the IP address of request end.
Step S10, responding terminal start to transmit this document with the initial window size defaulted.When there is no request end in database IP address, that is, not the historic transmission rate of request end when, responding terminal with the initial TCP window size defaulted start to Transmit file in request end.In the present embodiment, the initial TCP window size of default is 10.
Step S11, when this document end of transmission, responding terminal calculates the transmission rate of transmission this document.Transmission rate can be with For the average transmission rate in document transmission process, or the minimum transmission rate in document transmission process can also be Other suitable transmission rates of definition.
Step S12, saves the transmission rate in the database, and process terminates.
Fig. 2 is the schematic diagram that responding terminal sends data to request end.Responding terminal 100 sends TCP word to a certain request end 200 Throttling 300.Wherein, the serial number of the digital representation byte to be sent in TCP byte stream 300, it is assumed that the byte to be sent at this time Serial number since 1.Window size 400 indicates the byte number that responding terminal can be sent, the byte that responding terminal can be sent in figure Number is 10, i.e., window size is 10.In the present invention, the size of initial transmission window is according to the transmission speed saved in database Rate is obtained divided by RTT.If without saving the corresponding transmission rate of request end IP address, initial transmission window in database The size of mouth is the initial TCP window size of default.
From above scheme as can be seen that first judging database when responding terminal receives the request of request end transmission file In whether there is request end IP address.If there is no the IP address of request end, then with the initial TCP window size of default to File is transmitted in request end, and saves the IP address of request end in the database, calculate after file end of transmission and save IP address Corresponding transmission rate;If there is the IP address of request end, then according to the transmission rate of preservation and count it is round-trip when Between RTT calculate initial TCP window size, start to transmit file with initial TCP window size, calculate simultaneously after file end of transmission The corresponding transmission rate of more new IP address.The method achieve determine that initial TCP window is big according to the bandwidth of different user It is small, so that the initial rate of user terminal downloading file is carried out with the rate for being most suitable for user terminal bandwidth, without the speed from very little Rate starts, to accelerate the rate of file download, takes full advantage of the Internet resources of user.
Fig. 3 is the functional block diagram of the data quick transmission devices based on Transmission Control Protocol.The device 20 includes receiving module 21, first module 22, the acquisition of judgment module 23, second module 24, the first computing module 25, the meter of transmission module 26, second are obtained Calculate module 27, preserving module 28.
Receiving module 21, the file request issued for receiving request end, IP of the file request comprising the request end Location.Responding terminal can be any equipment that can send file, such as server.Request end can be made to issue the user of request Terminal device, for example, the user terminals such as computer, mobile phone, palm PC.Specifically, user terminal requests to download to server end File, server end transmit this document to user terminal.This document includes but is not limited to picture, word document, pdf document, pressure The document of contracting.
First obtains module 22, for the IP address according to this document request request end.
Judgment module 23, for judging IP address whether in the database.The data saved in database include IP address, The corresponding transmission rate of IP address.Database can be located in responding terminal storage equipment, can also be located at depositing for other equipment It stores up in equipment.
Second obtains module 24, for obtaining the corresponding transmission rate of IP address in the database.
First computing module 25, for calculating window size according to transmission rate.First computing module 25 includes first Computing unit, for the transmission two-way time RTT between calculating and request end;Second computing unit, for according to transmission rate And RTT, calculate window size.Specific formula for calculation: window size=transmission rate/RTT.Wherein, two-way time RTT refers to Sender sends message to the message corresponding confirmation message time experienced transmitted by receiving.The transmission rate of data packet is logical Data volume transmitted in a two-way time RTT is crossed to calculate.
Transmission module 26 transmits this document to request end for starting using window size as initial window size.Response It holds using calculated TCP and sends the file that window size needs to download as initial window size to request end transmission.
Second computing module 27, for working as this document end of transmission, responding terminal calculates the transmission rate of transmission this document.It passes Defeated rate can be the average transmission rate in document transmission process, or the minimum transmission speed in document transmission process Rate can also be other suitable transmission rates of definition.
Preserving module 28, for updating the transmission rate in the database, which is the corresponding biography of IP address Defeated rate.
Preserving module 28 is also used to save the IP address of request end in the database.If there is no request end in database IP address, then database will save the IP address of request end.
Transmission module 26 is also used to start with the initial TCP window size of default transmission this document.When not having in database The IP address of request end, that is, not the historic transmission rate of request end when, initial TCP window size of the responding terminal to default Start to transmit file to request end.In the present embodiment, the initial TCP window size of default is 10.
Second computing module 27, for working as this document end of transmission, responding terminal calculates the transmission rate of transmission this document.It passes Defeated rate can be the average transmission rate in document transmission process, or the minimum transmission speed in document transmission process Rate can also be other suitable transmission rates of definition.
Preserving module 28 is also used to save the transmission rate in the database, which is that IP address is corresponding Transmission rate.
As can be seen that first judging data when responding terminal receives the request of request end transmission file from above-mentioned apparatus It whether there is the IP address of request end in library.If there is no the IP address of request end, then with the initial TCP window size of default File is transmitted to request end, and saves the IP address of request end in the database, is calculated after file end of transmission and with saving IP The corresponding transmission rate in location;If there is the IP address of request end, then according to the transmission rate of preservation and count it is round-trip Time RTT calculates initial TCP window size, starts to transmit file with initial TCP window size, calculate after file end of transmission And the corresponding transmission rate of more new IP address.The device determines initial TCP window size according to the bandwidth at different user end, The time for reducing user terminal downloading file, improve the network resource utilization of user.

Claims (8)

1. a kind of data rapid transmission method based on Transmission Control Protocol, it is characterised in that: the described method comprises the following steps:
Responding terminal receives the file request that request end issues, and the file request includes the IP address of the request end;
The responding terminal obtains the IP address of the request end according to the file request;
Whether in the database the responding terminal judges the IP address, and the database is for storing IP address and IP address phase Corresponding transmission rate;
If the IP address is in the database, it is opposite that the responding terminal obtains the IP address in the database The transmission rate answered;
The responding terminal calculates window size according to the transmission rate;
The responding terminal transmits the file using the window size as initial window size to the request end;
When the file end of transmission, the responding terminal calculates the transmission rate for transmitting the file;
The responding terminal updates the transmission rate in the database, and the transmission rate is that the IP address is corresponding Transmission rate;
If not in the database, the database saves the IP address of the request end to the IP address;
The responding terminal starts to transmit the file with the initial window size defaulted;
When the file end of transmission, the responding terminal calculates the transmission rate for transmitting the file;
The responding terminal saves the transmission rate in the database, and the transmission rate is that the IP address is corresponding Transmission rate.
2. the method as described in claim 1, which is characterized in that it is big that the responding terminal according to the transmission rate calculates window It is small to include:
The responding terminal calculates the transmission two-way time RTT between the request end;
The responding terminal calculates window size according to the transmission rate and RTT.
3. the method as described in claim 1-2 any one, which is characterized in that the transmission rate is that the file is transmitted across Average transmission rate in journey.
4. the method as described in claim 1-2 any one, which is characterized in that the transmission rate is that the file is transmitted across Minimum transmission rate in journey.
5. a kind of data quick transmission devices based on Transmission Control Protocol, it is characterised in that: described device includes:
Receiving module, for receiving the file request of request end sending, the file request includes the IP address of the request end;
First obtains module, and the IP address of the request end is obtained according to the file request;
Judgment module, for whether in the database to judge the IP address, the database is for storing IP address and IP The corresponding transmission rate in location;
Second obtains module, if in the database for the IP address, obtaining the IP in the database The corresponding transmission rate in address;
First computing module, for calculating window size according to the transmission rate;
Transmission module, for transmitting the file using the window size as initial window size to the request end;
Second computing module, for working as the file end of transmission, responding terminal calculates the transmission rate for transmitting the file;
Preserving module, for updating the transmission rate in the database, the transmission rate is that the IP address is opposite The transmission rate answered;
If the preserving module is also used to the IP address not in the database, the database saves the IP address;
The transmission module is also used to start with the initial window size of default to transmit the file;
Second computing module is also used to when the file end of transmission, and the responding terminal calculates the transmission for transmitting the file Rate;
The preserving module is also used to save the transmission rate in the database, and the transmission rate is the IP address Corresponding transmission rate.
6. device as claimed in claim 5, which is characterized in that first computing module includes:
First computing unit, for calculating the transmission two-way time RTT between the request end;
Second computing unit, for calculating window size according to the transmission rate and RTT.
7. such as device as claimed in any one of claims 5 to 6, which is characterized in that the transmission rate is that the file is transmitted across Average transmission rate in journey.
8. such as device as claimed in any one of claims 5 to 6, which is characterized in that the transmission rate is that the file is transmitted across Minimum transmission rate in journey.
CN201510749741.4A 2015-11-05 2015-11-05 A kind of data rapid transmission method and device based on Transmission Control Protocol Active CN105391712B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510749741.4A CN105391712B (en) 2015-11-05 2015-11-05 A kind of data rapid transmission method and device based on Transmission Control Protocol

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510749741.4A CN105391712B (en) 2015-11-05 2015-11-05 A kind of data rapid transmission method and device based on Transmission Control Protocol

Publications (2)

Publication Number Publication Date
CN105391712A CN105391712A (en) 2016-03-09
CN105391712B true CN105391712B (en) 2019-04-12

Family

ID=55423548

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510749741.4A Active CN105391712B (en) 2015-11-05 2015-11-05 A kind of data rapid transmission method and device based on Transmission Control Protocol

Country Status (1)

Country Link
CN (1) CN105391712B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106550019B (en) * 2016-10-20 2020-01-31 福建天泉教育科技有限公司 Browser request processing method and system
CN112235322A (en) * 2020-12-11 2021-01-15 广东睿江云计算股份有限公司 Tcp transmission method and system thereof
CN112822230B (en) * 2020-12-28 2022-03-25 南京大学 Method and system for setting initial rate of sending end based on probability

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101729589A (en) * 2008-10-14 2010-06-09 北京大学 Method and system for improving end-to-end data transmission rate
CN102307216A (en) * 2011-03-15 2012-01-04 陈建国 Peer-to-peer (P2P) stream media broadcast method and system for multimedia telephone
CN103532868A (en) * 2013-11-01 2014-01-22 国网上海市电力公司 Method for controlling network bandwidth and flow of electrical power system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9160810B2 (en) * 2012-10-25 2015-10-13 Red Hat Israel, Ltd. Partitioning of a transmission control protocol window in a virtual system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101729589A (en) * 2008-10-14 2010-06-09 北京大学 Method and system for improving end-to-end data transmission rate
CN102307216A (en) * 2011-03-15 2012-01-04 陈建国 Peer-to-peer (P2P) stream media broadcast method and system for multimedia telephone
CN103532868A (en) * 2013-11-01 2014-01-22 国网上海市电力公司 Method for controlling network bandwidth and flow of electrical power system

Also Published As

Publication number Publication date
CN105391712A (en) 2016-03-09

Similar Documents

Publication Publication Date Title
CN105488837B (en) Real-time off screen rendering method based on cloud computing, apparatus and system
CN105391712B (en) A kind of data rapid transmission method and device based on Transmission Control Protocol
CN102394880B (en) Method and device for processing jump response in content delivery network
CN110703980A (en) File transmission method and device
CN108540400A (en) A kind of data transfer control method, control device, terminal and readable storage medium storing program for executing
CN102739717A (en) Downloading method, downloading proxy server and network system
WO2016197727A1 (en) Data transmission method and device
CN111064771A (en) Network request processing method and system
CN107707594B (en) It is a kind of to realize the document transmission method and device accelerated on demand
CN104954497A (en) Data transmission method and system for cloud storage system
CN104753813B (en) The method that DMA transmits message
CN114205762A (en) Short message flow control method, equipment and storage medium
CN103095785A (en) Remote procedure call method and system, client and server
CN110213330B (en) Pre-push system, method, device, electronic equipment and computer readable medium
CN113242185B (en) Map data transmission method, cleaning robot, equipment and storage medium
CN109063140A (en) A kind of data query method, transfer server and computer readable storage medium
CN109756464B (en) Communication method, server and client
CN111698275A (en) Data processing method, device and equipment
US10728291B1 (en) Persistent duplex connections and communication protocol for content distribution
CN117082073A (en) File storage method, file downloading method, device, equipment and storage medium
CN104410721A (en) Method and system for supporting automatic caching according to update content
CN104683260A (en) Flow control method and flow control system
US8966070B1 (en) System and method of reducing network latency
CN107612831B (en) Transmission method and device for data message of access source station
CN112968939B (en) Mobile terminal resource loading method and device

Legal Events

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