[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN106210059A - A kind of FTP method for down loading based on TCP - Google Patents

A kind of FTP method for down loading based on TCP Download PDF

Info

Publication number
CN106210059A
CN106210059A CN201610553001.8A CN201610553001A CN106210059A CN 106210059 A CN106210059 A CN 106210059A CN 201610553001 A CN201610553001 A CN 201610553001A CN 106210059 A CN106210059 A CN 106210059A
Authority
CN
China
Prior art keywords
ftp
window
download
algorithm
tcp
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.)
Granted
Application number
CN201610553001.8A
Other languages
Chinese (zh)
Other versions
CN106210059B (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.)
Chipsea Technologies Shenzhen Co Ltd
Original Assignee
Chipsea Technologies Shenzhen 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 Chipsea Technologies Shenzhen Co Ltd filed Critical Chipsea Technologies Shenzhen Co Ltd
Priority to CN201610553001.8A priority Critical patent/CN106210059B/en
Publication of CN106210059A publication Critical patent/CN106210059A/en
Application granted granted Critical
Publication of CN106210059B publication Critical patent/CN106210059B/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
    • 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]

Landscapes

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

Abstract

The invention discloses a kind of FTP method for down loading based on TCP, described method, after FTP brings into operation, increases congestion window based on two kinds of algorithms, when steady statue, uses the linearly increasing congestion window of congestion avoidance algorithm;When transmission starts, or Retransmission timeout or idle long, use slowstart algorithm to increase congestion window.The present invention can be on the basis of not increasing caching and other hardware cost, it is achieved monitors downloading the real-time of network, improves speed of download by increasing congestion window, substantially increase the actual download speed of FTP.

Description

A kind of FTP method for down loading based on TCP
Technical field
The invention belongs to the technical field of data transmission, particularly to FTP method for down loading based on TCP.
Background technology
FTP is one of agreement in ICP/IP protocol group.File Transfer Protocol includes two parts, and one is ftp server, and they are two years old For ftp client.As it is shown in figure 1, wherein ftp server is used for storing file, user can use ftp client to pass through FTP Protocol access is positioned at the resource on ftp server.Developing website when, generally utilize File Transfer Protocol that webpage or program are passed On Web server.Additionally, due to FTP efficiency of transmission is the highest, when the file that transmission over networks is big, typically it is also adopted by this Agreement.
But current FTP technology also has its shortcoming, and i.e. in the situation that network is the most congested, actual download speed reaches far away not To nominal rate.After installing network hardware equipment especially for client, enabling network based on File Transfer Protocol on network should With, found that the specification of the downloading rate of FTP and nominal there is a big difference.Traditional method is to pass through running into such problem Increase caching, but on the one hand the method increasing caching increases the cost of equipment, on the other hand also fails to elevator belt clearly Wide.
As patent application 201410764780.7 discloses a kind of method uploading data for File Transfer Protocol and download thereof The method of data, the method includes: S101, and ordinary node sends to key node and uploads request of data;S102, described crucial joint Request of data is uploaded in some reception, and sends confirmation transmission information to described ordinary node;S103, described ordinary node receives and confirms After transmission information, upload data to described key node;And S104, described key node receives described data, and by described Data upload onto the server.The method of this method uploading data being used for File Transfer Protocol and download data thereof is carried out greatly by FTP Amount small documents transmission, it is ensured that the quick transmission of file.The method is the biography by the judgement of file size controls data Defeated, still can't resolve the problems referred to above.
Summary of the invention
For solving the problems referred to above, it is an object of the invention to provide a kind of FTP method for down loading based on TCP, the method energy The enough actual download speed being greatly improved FTP on the basis of not increasing caching and hardware cost.
For achieving the above object, technical scheme is as follows.
A kind of FTP method for down loading based on TCP, it is characterised in that shown method is after FTP brings into operation, based on two kinds of calculations Method increases congestion window, when steady statue, uses the linearly increasing congestion window of congestion avoidance algorithm;When transmission starts, Or Retransmission timeout or idle long, at this moment use slowstart algorithm to increase congestion window.
Slowstart algorithm is:
cwndn+1=cwndn+MTU
Congestion avoidance algorithm:
cwnd n + 1 = cwnd n + MTU 2 cwnd n
Wherein, cwndnIt it is current window size.
Specifically comprise the following steps that
101, ftp server is started, it is intended that the data of download;
102, user side and ftp server set up TCP session;
103, download is started;In download, start the linearly increasing congestion window of congestion avoidance algorithm;When transmission starts, or Person's Retransmission timeout or idle long, use slowstart algorithm to increase congestion window;
104, download terminates.
In described 103 steps, ftp server and user side program constantly monitor real-time bandwidth and link Round-Trip time delay.
Further, in described 103 steps, include:
1031, judge that current network is the most congested, be, enter next step and start slowstart algorithm, otherwise enter startup and gather around Algorithm steps avoided by plug;
1032, starting slowstart algorithm, keep A value constant, or reduce A, slow down speed of windowing, and reduces download bandwidth;
1033, start congestion avoidance algorithm, increase A value, speed of accelerating to window, increase download bandwidth.
Further, after having judged that network is the most congested, also include: judge that current ink round trip delay time (RTT) is No excessive?If normal would keep A value constant, holding normally window and speed of download;If excessive, then increase A value, accelerate out Window speed, increases download bandwidth.
The present invention is with it, can cache and on the basis of other hardware cost not increasing, it is achieved to lower contained network The real-time monitoring of network, improves speed of download, in the case of not increasing caching by increasing congestion window, it is possible to be greatly improved The actual download speed of FTP.
Accompanying drawing explanation
Fig. 1 is the download hardware structure diagram that prior art is implemented.
Fig. 2 is the software control flow chart that the present invention is implemented.
Detailed description of the invention
In order to make the purpose of the present invention, technical scheme and advantage clearer, below in conjunction with drawings and Examples, right The present invention is further elaborated.Should be appreciated that specific embodiment described herein only in order to explain the present invention, and It is not used in the restriction present invention.
The method that the present invention is implemented, after FTP brings into operation, increases congestion window based on two kinds of algorithms.Stable During state, use the linearly increasing congestion window of congestion avoidance algorithm;Transmission start time, or Retransmission timeout or the free time the longest Time, slowstart algorithm is at this moment used to increase congestion window.The formula that the two process is used is as follows:
Slowstart algorithm is:
cwndn+1=cwndn+MTU (1)
Congestion avoidance algorithm:
cwnd n + 1 = cwnd n + MTU 2 cwnd n - - - ( 2 )
Wherein, cwndnIt it is current window size.
Because FTP is once after slow turn-on, will always be in congestion avoidance phase, therefore affect the main of speed In congestion avoidance phase, so only focusing on formula (2).Find out that this is an increasing function from formula (2), but increment can be increasingly Little, it should have individual ultimate value.
For ease of calculating into, formula (2) is made the general likeness in form of formula (3).
x t + Δ t = x t + A x t - - - ( 3 )
Wherein A=MTU2, simplify the most further,
x + Δ x = x + A x - - - ( 4 )
The right and left, with being multiplied by x, obtains
x2+x*Δ x=x2+A (5)
Abbreviation further,
x*Δ x=A (6)
Assume that from the time required for the half of initial maximized window is adjusted to maximized window be T.During due to Congestion Avoidance The size of window adjusts once at each RTT (network delay), then in T time, the number of times that window adjusts: M=T/RTT.In It is that formula (6) is sued for peace in the value in each moment,
x t 0 * Δx t 0 + x t 1 * Δx t 1 + x t 2 * Δx t 2 + ............ + x t M - 1 * Δx t M - 1 = A * M - - - ( 7 )
In the expression formula of formula (7) left side,Being a small quantity, therefore the summation operation of left side expression formula is equivalent to down The integral operation in face:
x t 0 * Δx t 0 + x t 1 * Δx t 1 + x t 2 * Δx t 2 + ............ + x t M - 1 * Δx t M - 1 ∫ X max / 2 X max x d x - - - ( 8 )
Wherein XmaxFor maximized window, obtain in conjunction with formula (7) and (8):
∫ X max / 2 X max x d x = A * M - - - ( 9 )
x 2 2 | X max / 2 X max = A * M - - - ( 10 )
3 * X max 2 8 = A * M - - - ( 11 )
It is re-introduced into a formula:
X max R T T = r max - - - ( 12 )
Wherein rmaxFor the maximum bandwidth of FTP, bring (12) and M=T/RTT into (11),
T = 3 * r max 2 * RTT 3 8 * A - - - ( 13 )
From formula (13) it can be seen that
1. the T on the left of formula represents that the half from initial maximized window is adjusted to maximized window required time.It is the biggest, Show that the time being adjusted to maximized window is the longest, also indicate that average bandwidth is the least.
2. it is positively related relation due to window size and actual bandwidth.rmaxThe biggest, T becomes 3 powers to increase, such window The adjustment time, T was the longest, and then average bandwidth is the biggest with the deviation of desired bandwidth.And rmaxTime smaller, average bandwidth and phase Hope the deviation of bandwidth inconspicuous.
3. in formula, RTT parameter is link Round-Trip time delay, can increase T equally, thus affect FTP and gulp down if this time delay is very big The amount of telling.Therefore to reduce network delay (as reduced data flow transmission route, use the transmission medium of low delay) as far as possible, add suitable When caching, prevent the too early packet loss of network, it is possible to reduce RTT, but if caching is too big, RTT can be increased.
Therefore by using bigger A value, or use adaptive A value in the protocol, i.e. make in little bandwidth applications By less A value, big bandwidth applications uses bigger A value.So at two-forty (rmax) and high time delay RTT (some place Its time delay of network the biggest, and be difficult to change), two-forty (r can be offset by Amax) and the shadow of high time delay RTT Ring, thus obtain less T, thus the bandwidth of FTP can be significantly improved.
Based on this, the method that the present invention is realized includes specifically comprising the following steps that
S101, startup ftp server, it is intended that the data of download.
S102, user side, open ftp downloaded software, inputs ftp server IP address, sets up TCP with ftp server Session.
After S103, session establishment, start and download.
S104, ftp server and user side program constantly monitor real-time bandwidth and link Round-Trip time delay.
S105, judge that current network is the most congested?It is to enter S106, otherwise enters S107 step.
S106, startup slowstart algorithm, keep A value constant, or reduce A, and slow down speed of windowing, and reduces download bandwidth.
S107, startup congestion avoidance algorithm, increase A value, and speed of accelerating to window increases download bandwidth.
S108, judge that current ink round trip delay time (RTT) is the most excessive?If normal would enter step S110, if mistake Greatly, then step S109 is entered.
S109, increase A value, speed of accelerating to window, increase download bandwidth.
S110, holding A value are constant, keep normally windowing and speed of download.
S111, download terminate.
The foregoing is only presently preferred embodiments of the present invention, not in order to limit the present invention, all essences in the present invention Any amendment, equivalent and the improvement etc. made within god and principle, should be included within the scope of the present invention.

Claims (6)

1. a FTP method for down loading based on TCP, it is characterised in that described method is after FTP brings into operation, based on two kinds of algorithms Increase congestion window, when steady statue, use the linearly increasing congestion window of congestion avoidance algorithm;When transmission starts, or Person's Retransmission timeout or idle long, at this moment use slowstart algorithm to increase congestion window.
2. FTP method for down loading based on TCP as claimed in claim 1, it is characterised in that slowstart algorithm is:
cwndn+1=cwndn+MTU
Congestion avoidance algorithm:
cwnd m 1 = cwnd n + MTU 2 cwnd n
Wherein, cwndnIt it is current window size.
3. FTP method for down loading based on TCP as claimed in claim 1, it is characterised in that specifically comprise the following steps that
101, ftp server is started, it is intended that the data of download;
102, user side and ftp server set up TCP session;
103, download is started;In download, start the linearly increasing congestion window of congestion avoidance algorithm;When transmission starts or super Shi Chongchuan or idle long, use slowstart algorithm to increase congestion window;
104, download terminates.
4. FTP method for down loading based on TCP as claimed in claim 3, it is characterised in that in described 103 steps, ftp server Real-time bandwidth and link Round-Trip time delay is constantly monitored with user side program.
5. FTP method for down loading based on TCP as claimed in claim 4, it is characterised in that in described 103 steps, include:
1031, judge that current network is the most congested, be, enter next step and start slowstart algorithm, otherwise enter and start congested keeping away Exempt from algorithm steps;
1032, starting slowstart algorithm, keep A value constant, or reduce A, slow down speed of windowing, and reduces download bandwidth;
1033, start congestion avoidance algorithm, increase A value, speed of accelerating to window, increase download bandwidth.
6. FTP method for down loading based on TCP as claimed in claim 5, it is characterised in that after having judged that network is the most congested, Also include: judge that current ink round trip delay time is the most excessive?If normal would keep A value constant, holding normally window and under Carry speed;If excessive, then increase A value, speed of accelerating to window, increase download bandwidth.
CN201610553001.8A 2016-07-14 2016-07-14 A kind of FTP method for down loading based on TCP Active CN106210059B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610553001.8A CN106210059B (en) 2016-07-14 2016-07-14 A kind of FTP method for down loading based on TCP

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610553001.8A CN106210059B (en) 2016-07-14 2016-07-14 A kind of FTP method for down loading based on TCP

Publications (2)

Publication Number Publication Date
CN106210059A true CN106210059A (en) 2016-12-07
CN106210059B CN106210059B (en) 2019-11-12

Family

ID=57474915

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610553001.8A Active CN106210059B (en) 2016-07-14 2016-07-14 A kind of FTP method for down loading based on TCP

Country Status (1)

Country Link
CN (1) CN106210059B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7058723B2 (en) * 2000-03-14 2006-06-06 Adaptec, Inc. Congestion control for internet protocol storage
CN102420676A (en) * 2011-11-30 2012-04-18 中国人民解放军西安通信学院 Efficient interactive transmission method suitable for deep space interplanetary satellite network

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7058723B2 (en) * 2000-03-14 2006-06-06 Adaptec, Inc. Congestion control for internet protocol storage
CN102420676A (en) * 2011-11-30 2012-04-18 中国人民解放军西安通信学院 Efficient interactive transmission method suitable for deep space interplanetary satellite network

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
刘永华: "《计算机网络原理、技术及应用》", 31 May 2012, 清华大学出版社 *
韩鹏: "SCTP拥塞控制机制的研究与改进", 《中国优秀硕士论文全文数据库 信息科技辑》 *

Also Published As

Publication number Publication date
CN106210059B (en) 2019-11-12

Similar Documents

Publication Publication Date Title
US7609640B2 (en) Methods and applications for avoiding slow-start restart in transmission control protocol network communications
JP5753318B2 (en) Bearer control based on probing
EP1376944B1 (en) Receiver-initiated transmission rate increment
EP3761591B1 (en) Tcp link configuration method, apparatus, and computer program product
JP2006528871A (en) Live Nespin protocol to control device pin load
EP3226507A1 (en) Data transmission method and apparatus
Zhang et al. Performance analysis of BBR congestion control protocol based on NS3
JP4328794B2 (en) COMMUNICATION SYSTEM, COMMUNICATION DEVICE, AND TRANSMISSION CONTROL METHOD
US20140325064A1 (en) Controlling Establishment of Multiple TCP Connections
Guo et al. Stateful-TCP—A new approach to accelerate TCP slow-start
Hong et al. Self-tuning PI TCP flow controller for AQM routers with interval gain and phase margin assignment
Kharat et al. Modified QUIC protocol for improved network performance and comparison with QUIC and TCP
Rathod et al. Effective RTO estimation using EIFEL retransmission timer in COAP
Chen et al. Fluid-flow Analysis of TCP Westwood with RED
US10880413B2 (en) Method and server for establishing a TCP connection
Volodina et al. Impact of ack scaling policies on QUIC performance
CN106210059A (en) A kind of FTP method for down loading based on TCP
Mishra et al. Comparative Analysis of Transport Layer Congestion Control Algorithms
Moller et al. Using radio network feedback to improve TCP performance over cellular networks
Tode et al. A Novel Transport Protocol Suitable for Bufferless Optical Packet Switching Networks
Hotchi et al. Active queue management supporting TCP flows using dynamically controlled target queue length
Dangi et al. A new congestion control algorithm for high speed networks
De Vleeschauwer et al. Application-driven traffic differentiation
Nithya et al. Performance analysis of pluggable congestion control in QUIC protocol
Gupta et al. An adaptive congestion control algorithm

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