CN110545329B - Method for improving FTP file transmission speed - Google Patents
Method for improving FTP file transmission speed Download PDFInfo
- Publication number
- CN110545329B CN110545329B CN201910923953.8A CN201910923953A CN110545329B CN 110545329 B CN110545329 B CN 110545329B CN 201910923953 A CN201910923953 A CN 201910923953A CN 110545329 B CN110545329 B CN 110545329B
- Authority
- CN
- China
- Prior art keywords
- client
- server
- port
- connection
- file
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/143—Termination or inactivation of sessions, e.g. event-controlled end of session
- H04L67/145—Termination or inactivation of sessions, e.g. event-controlled end of session avoiding end of session, e.g. keep-alive, heartbeats, resumption message or wake-up for inactive or interrupted session
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Cardiology (AREA)
- General Health & Medical Sciences (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention discloses a method for improving the transmission speed of an FTP file, which comprises the following steps: a server monitors a request from a client; the client is connected to the port from an arbitrary non-privileged port N, and if the connection is successful, a command channel is established; after the client establishes the long connection, verifying whether the client is legal or not; if the HTTP port is legal, the server actively sends the HTTP port and the size of each suggested data packet to the client; the client side inspects the number and the size of files needing to be sent, determines whether multiple connections or single connection is needed to transmit the files, and merges file contents according to the size of a data packet suggested by the server side; the client reports the file to the server, and after reporting is finished each time, the HTTP connection is closed; the client closes the command channel with the server. The invention can transmit a plurality of files in parallel by improving the transmission mechanism of the FTP, thereby greatly improving the file transmission efficiency.
Description
Technical Field
The invention belongs to the technical field of computers, and particularly relates to a method for improving the transmission speed of an FTP file.
Background
In the process of developing a data security system, one difficulty to be solved is that a large amount of document files need to be transmitted from a document server to a security server, and the traditional FTP protocol communication process is divided into an active mode and a passive mode, wherein the active mode comprises the following processes: the client connects to the command port of the FTP server from an arbitrary non-privileged port N (N >; 1024), i.e. the 21 port opens the command channel. The client then starts listening to port N +1 and sends an FTP command "port N + 1" to the FTP server. The server will then open a data channel from its own data port (20) to the client-specified data port (N +1), see fig. 1.
The process of the passive mode is as follows: the client connects to the command port of the FTP server from an arbitrary non-privileged port N (N >1024), namely the 21-port open command channel. The client then starts listening to port N +1 and sends an FTP command "port N + 1" to the FTP server. The server will then connect from its own data port (20) to the client-specified data port (N +1), see fig. 2.
The conventional FTP described above has problems: the data channel adopts a TCP mode and only has one channel, so that queuing is needed for transmitting a large number of small files in the development process, and the working efficiency is low.
Disclosure of Invention
In order to solve the above problems, the present invention provides a method for increasing the transmission speed of an FTP file, which can overcome the defect that a plurality of files need to be queued when a large number of files are transmitted by the conventional FTP.
The technical scheme of the invention is as follows: a method for improving the transmission speed of an FTP file comprises the following steps:
s101, a server side monitors a 21 port by default and monitors a request from a client side;
s102, a client is connected to a 21 port from an arbitrary non-privileged port N, and if the connection is successful, a long connection is established, wherein the long connection is a command channel;
s103, after the client establishes long connection, verifying whether the client is legal;
s104, if the data packet is illegal, the server actively disconnects the command channel connection, and if the data packet is legal, the server actively sends the HTTP port and the size of each suggested data packet to the client;
s105, the client side inspects the number and the size of files needing to be sent, determines whether multiple connections or single connection is needed to transmit the files, and merges the file contents according to the size of a data packet suggested by the server side;
s106, the client reports the file to the server, and after the report is finished each time, the HTTP connection is closed;
s107, the client closes the command channel with the server.
Preferably, the N > 1024.
Preferably, in step S107, the command channel is closed by a DISCONNECT command.
Compared with the prior art, the invention has the beneficial effects that:
the invention improves the transmission mechanism of FTP, enables a plurality of files to be transmitted in parallel, the data channel of the invention adopts HTTP protocol, can transmit multi-channel data simultaneously and concurrently, and HTTP is allowed to pass by most firewall in the invention, does not need traditional FTP active and passive mode, in addition the client actively merges files to form a big packet through the end information of the server, promote the transmission efficiency, through testing, can promote the transmission rate of two times under the same hardware condition, can promote the transmission efficiency to more than 50%.
Drawings
Fig. 1 is a schematic diagram (active mode) of the FTP protocol communication process in the prior art.
Fig. 2 is a schematic diagram (passive mode) of the FTP protocol communication process in the prior art.
Fig. 3 is a flow chart of the FTP protocol operation of the present invention.
Detailed Description
The invention is described in further detail below with reference to the following detailed description and accompanying drawings:
example 1
The working flow of this embodiment 1 is shown in fig. 1, and includes the following steps:
step 101, a Server (Server) monitors a 21 port by default, and monitors a request from a Client (Client);
102, connecting a Client end to a 21 port from an arbitrary non-privileged port N (N is more than 1024), and establishing a long connection if the connection is successful, wherein the long connection is a command channel;
103, after the Client establishes the long connection, the Client is ensured to be legal through necessary verification, and if the Client is illegal, the Server actively disconnects the command channel connection;
104, after the Client passes the verification, the Server actively sends the HTTP port and the size of each proposed data packet to the Client;
The FTP comprises a Server end and a Client end, the FTP comprises a data channel and a command channel when transmitting files, in the embodiment, the FTP protocol is modified, the data channel adopts an HTTP protocol capable of transmitting multiple paths of data simultaneously, the Server end carries an HTTP Server to provide a data uploading protocol, and the Client end can actively merge the files through the Server end. In order to increase the FTP file transfer speed, the HTTP protocol can concurrently transfer multiple data. HTTP is allowed by most firewalls without the need for the traditional FTP active-passive mode; in order to improve the transmission speed of the FTP file, the Client actively combines the files to form a big packet through the Server information, and the transmission efficiency is improved.
Claims (3)
1. A method for improving the transmission speed of an FTP file is characterized by comprising the following steps:
s101, a server side monitors a 21 port by default and monitors a request from a client side;
s102, a client is connected to a 21 port from an arbitrary non-privileged port N, and if the connection is successful, a long connection is established, wherein the long connection is a command channel;
s103, after the client establishes long connection, verifying whether the client is legal;
s104, if the data packet is illegal, the server actively disconnects the command channel connection, and if the data packet is legal, the server actively sends the HTTP port and the size of each suggested data packet to the client;
s105, the client side inspects the number and the size of files needing to be sent, determines whether multiple connections or single connection is needed to transmit the files, and merges the file contents according to the size of a data packet suggested by the server side;
s106, the client reports the file to the server, and after the report is finished each time, the HTTP connection is closed;
s107, the client closes the command channel with the server.
2. The method for increasing the transfer speed of an FTP file as recited in claim 1 wherein said N > 1024.
3. The method for increasing the transmission speed of the FTP file as set forth in claim 1 or 2, wherein in step S107, the command channel is closed by a DISCONNECT command.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910923953.8A CN110545329B (en) | 2019-09-27 | 2019-09-27 | Method for improving FTP file transmission speed |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910923953.8A CN110545329B (en) | 2019-09-27 | 2019-09-27 | Method for improving FTP file transmission speed |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110545329A CN110545329A (en) | 2019-12-06 |
CN110545329B true CN110545329B (en) | 2022-04-29 |
Family
ID=68714811
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910923953.8A Active CN110545329B (en) | 2019-09-27 | 2019-09-27 | Method for improving FTP file transmission speed |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110545329B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114338122A (en) * | 2021-12-23 | 2022-04-12 | 广西东信数建信息科技有限公司 | Efficient and safe mass file transmission method |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003067277A (en) * | 2001-08-30 | 2003-03-07 | Hitachi Ltd | File transmission method and file transmission system |
CN1561029A (en) * | 2004-02-26 | 2005-01-05 | 中兴通讯股份有限公司 | Concurrent network file read-write method and device |
CN102035882A (en) * | 2010-11-29 | 2011-04-27 | 杭州思福迪信息技术有限公司 | FTP secondary logon system and method for transferring file and monitoring process |
CN102148845A (en) * | 2010-02-08 | 2011-08-10 | 中兴通讯股份有限公司 | File transfer protocol (FTP) data transmission method and system |
CN102325016A (en) * | 2011-10-18 | 2012-01-18 | 深圳市融创天下科技股份有限公司 | Data channel establishment requesting and responding method, system and terminal equipment |
CN105100230A (en) * | 2015-07-09 | 2015-11-25 | 无锡天脉聚源传媒科技有限公司 | File transmission method and device |
CN106657269A (en) * | 2016-11-16 | 2017-05-10 | 西安诺瓦电子科技有限公司 | File transmission method |
-
2019
- 2019-09-27 CN CN201910923953.8A patent/CN110545329B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003067277A (en) * | 2001-08-30 | 2003-03-07 | Hitachi Ltd | File transmission method and file transmission system |
CN1561029A (en) * | 2004-02-26 | 2005-01-05 | 中兴通讯股份有限公司 | Concurrent network file read-write method and device |
CN102148845A (en) * | 2010-02-08 | 2011-08-10 | 中兴通讯股份有限公司 | File transfer protocol (FTP) data transmission method and system |
CN102035882A (en) * | 2010-11-29 | 2011-04-27 | 杭州思福迪信息技术有限公司 | FTP secondary logon system and method for transferring file and monitoring process |
CN102325016A (en) * | 2011-10-18 | 2012-01-18 | 深圳市融创天下科技股份有限公司 | Data channel establishment requesting and responding method, system and terminal equipment |
CN105100230A (en) * | 2015-07-09 | 2015-11-25 | 无锡天脉聚源传媒科技有限公司 | File transmission method and device |
CN106657269A (en) * | 2016-11-16 | 2017-05-10 | 西安诺瓦电子科技有限公司 | File transmission method |
Also Published As
Publication number | Publication date |
---|---|
CN110545329A (en) | 2019-12-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2018133454A1 (en) | Method for controlling remote service access path, and relevant apparatus | |
CN106685992B (en) | Cross-network security switching and interactive application system and method based on unidirectional transmission technology | |
CN104065731B (en) | A kind of ftp file Transmission system and transmission method | |
EP1892887A1 (en) | Communication method between communication devices and communication apparatus | |
US20030014544A1 (en) | Infiniband TM work queue to TCP/IP translation | |
CN101729543B (en) | Method for improving performance of mobile SSL VPN by utilizing remote Socks5 technology | |
CN107395572B (en) | Data processing method and Internet of things gateway | |
EP2461524B1 (en) | Network proxy implementation method and apparatus | |
EP2647175A1 (en) | Facilitating device-to-device communication | |
CN108600376A (en) | Data transmission method, device, LoRa gateways, system based on LoRa and storage medium | |
CN106936875B (en) | Improvement TCP agent method based on wide area network data compression | |
CN112039722B (en) | MQTT protocol simulation method and simulation equipment | |
EP3135016B1 (en) | Managing sequence values with added headers in computing devices | |
CN102904959A (en) | Network accelerating method and gateway | |
CN105207949B (en) | A kind of TCP optimization methods and system, SP servers | |
CN100531067C (en) | System and method for realizing multiple link point-to-point silent interception by port image | |
CN104270344A (en) | Quintillion gatekeeper | |
CN110545329B (en) | Method for improving FTP file transmission speed | |
CN107154948A (en) | A kind of multi-protocol data exchange method applied to car launcher information control system | |
EP1482701B1 (en) | Method for transmitting packet-oriented data in a telecommunication network by converting in a proxy a connectionless transport protocol into a connection-oriented transport protocol and vice versa | |
AU2008213165B2 (en) | Methods, systems and apparatus for monitoring and/or generating communications in a communications network | |
CN105471718B (en) | A kind of implementation method of full duplex message queue | |
CN110572476B (en) | Remote control method, device and equipment | |
US7403519B2 (en) | Asymmetric ethernet network data transfer system and method | |
CN106899635B (en) | Method and device for realizing fixed communication port of file transfer protocol data link |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |