CN106911811A - A kind of method based on ftp file high efficiency of transmission - Google Patents
A kind of method based on ftp file high efficiency of transmission Download PDFInfo
- Publication number
- CN106911811A CN106911811A CN201710308332.XA CN201710308332A CN106911811A CN 106911811 A CN106911811 A CN 106911811A CN 201710308332 A CN201710308332 A CN 201710308332A CN 106911811 A CN106911811 A CN 106911811A
- Authority
- CN
- China
- Prior art keywords
- thread
- file
- transmission
- ftp
- server
- 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.)
- Pending
Links
Classifications
-
- 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]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a kind of method based on ftp file high efficiency of transmission, belong to network technology, the technical problem to be solved in the present invention is that FTP uses transmitting file in single thread, causes uploading speed slow and can only be uploaded again after interrupting, cause transfer efficiency low, the technical scheme for using for:The method comprises the following steps:(1), check whether there is the corresponding provisional configuration file of specified file:1., if it does not exist, then performing step(2);2., if it is present redirecting execution step(3);(2), first, obtain user set upload number of threads N, file to be uploaded in the path of server end, the progress of files passe and file transformat(It is defaulted as binary format);Then, according to number of threads N, original is divided into N blocks(Logical division, only obtains the side-play amount of each BOB(beginning of block) and end position).
Description
Technical field
The present invention relates to network technology, specifically a kind of method based on ftp file high efficiency of transmission.
Background technology
FTP is a kind of widely used network service, and it is the important communication mode of data transfer, most of files passes
With downloading completed by FTP, it realizes the function of reliably and effectively transmitting data;Meanwhile, as long as carrying out file biography
Defeated system all supports File Transfer Protocol, it is possible to which, in the enterprising style of writing part transmission of different types of computer, transmitting file will not be because
Each Hosts file, storage, the difference of system and influence.Therefore, FTP is always widely used service on Internet.
Traditional FTP under conditions of network broadband is limited, dominance is robbed to bandwidth using transmitting file in single thread
It is small, cause uploading speed slow;Meanwhile, once there is accidental interruption, it is necessary to the total data of transmitting file, great shadow are gone up again
Ring the efficiency that data are uploaded.
The content of the invention
Technical assignment of the invention is to provide a kind of method based on ftp file high efficiency of transmission and uses single line solving FTP
Transmitting file in journey, causes uploading speed slow and can only be uploaded again after interrupting, and causes the problem that transfer efficiency is low.
Technical assignment of the invention realizes in the following manner, a kind of method based on ftp file high efficiency of transmission, and it is special
Levy and be:The method comprises the following steps:
(1), check whether there is the corresponding provisional configuration file of specified file:
1., if it does not exist, then performing step(2);
2., if it is present redirecting execution step(3);
(2), first, obtain user set upload number of threads N, file to be uploaded in the path of server end, files passe
Progress and file transformat(It is defaulted as binary format);Then, according to number of threads N, original is divided into N blocks
(Logical division, only obtains the side-play amount of each BOB(beginning of block) and end position);A thread is specially opened, for setting up and managing
Corresponding provisional configuration file, by each thread completion task situation real time record to provisional configuration file(It is defaulted as:Every
Six seconds records are once), used when facilitating breakpoint transmission, redirect execution step(4);
(3), first, read provisional configuration file, data transmission format before acquisition, upload number of threads N and each thread
Upload progress, be that each thread redistributes task, then before breakpoint location upload;A thread is specially opened, is used
To manage corresponding provisional configuration file, by each thread completion task situation real time record to provisional configuration file(Acquiescence
For:Every six seconds records once), used when facilitating breakpoint transmission;
(4), open N number of thread, be respectively created local socket, set up N number of control using ICP/IP protocol and destination server
Connection;
(5), N number of thread send respectively USER xxx r n and PASSyyy r n orders by user name(xxx)And password
(yyy)Ftp server is sent to, ftp server is logged in;
(6), after Successful login, N number of thread uses the data transmission format that TYPE orders setting is unified respectively;
(7), N number of thread send respectively PASV r n orders, the order response comprising server just monitor host address end
Port address, client obtains the IP address of ftp server from return information and opens temporarily for setting up data cube computation
Port numbers, N number of data cube computation is set up for N number of thread and ftp server;
(8), N number of thread send respectively RSET xxx r n orders, set file transmission start offset amount, wherein, xxx is
The numerical value of start offset amount, the side-play amount of each thread is different;
(9), N number of thread send respectively APPE xxx r n orders, to ftp server initiate files passe ask, wherein, xxx
It is the filename to create on the server, N number of thread uses identical filename;
(10), N number of thread and ftp server set up data cube computation respectively, each thread distributes a blocks of files, starts on parallel
Pass each file block data;
(11), main thread every ten seconds task performances of once each thread of inquiry, when the transmission for having thread to distribute is appointed
It is that the most thread of remaining task amount shares fractional transmission task using RDT algorithms after the completion of business;
(12)If, occur accidental interruption again, repeat step(1)To step(11);Extremely all gone up to All Files block
Biography is finished, then close all of data cube computation and control is connected;
(13), delete provisional configuration file, one time files passe process terminates.
Preferably, the step(1)If in there is the corresponding provisional configuration file of specified file, illustrate this document will
Carry out breakpoint transmission.
Preferably, the step(2)Middle file transformat is defaulted as binary format.
Preferably, the step(2)Middle source file segmentation uses logical division, only obtains each BOB(beginning of block) and end is
Side-play amount only.
Preferably, the step(6)When middle data transmission format is binary format, the life of a ftp server is sent
Make for TYPE I r n.
Preferably, the ftp server supports the breakpoint transmission of file.
Method based on ftp file high efficiency of transmission of the invention has advantages below:The present invention passes through multithreading, breaks
Point resumes technology etc., effectively solves the problems, such as to exist in tradition FTP upload operations that uploading speed is slow and file transmission efficiency is low.
Therefore the present invention is the features such as have reasonable in design, easy to use, one-object-many-purposes, thus, with promoting the use of well
Value.
Brief description of the drawings
The present invention is further described below in conjunction with the accompanying drawings.
Accompanying drawing 1 is the FB(flow block) of the method based on ftp file high efficiency of transmission.
Specific embodiment
Following detailed is made to the method based on ftp file high efficiency of transmission of the invention with reference to Figure of description and specific embodiment
Carefully illustrate.
Embodiment:
As shown in Figure 1, the method based on ftp file high efficiency of transmission of the invention, the method comprises the following steps:
(1), check whether there is the corresponding provisional configuration file of specified file:
1., if it does not exist, then performing step(2);
2., if there is(Illustrate the breakpoint transmission that will be carried out), then execution step is redirected(3);
(2), first, obtain user set upload number of threads N, file to be uploaded in the path of server end, files passe
Progress and file transformat(It is defaulted as binary format);Then, according to number of threads N, original is divided into N blocks
(Logical division, only obtains the side-play amount of each BOB(beginning of block) and end position);A thread is specially opened, for setting up and managing
Corresponding provisional configuration file, by each thread completion task situation real time record to provisional configuration file(It is defaulted as:Every
Six seconds records are once), used when facilitating breakpoint transmission, redirect execution step(4);
(3), first, read provisional configuration file, data transmission format before acquisition, upload number of threads N and each thread
Upload progress, be that each thread redistributes task, then before breakpoint location upload;A thread is specially opened, is used
To manage corresponding provisional configuration file, by each thread completion task situation real time record to provisional configuration file(Acquiescence
For:Every six seconds records once), used when facilitating breakpoint transmission;
(4), open N number of thread, be respectively created local socket, set up N number of control using ICP/IP protocol and destination server
Connection;
(5), N number of thread send respectively USER xxx r n and PASSyyy r n orders by user name(xxx)And password
(yyy)Ftp server is sent to, ftp server is logged in;
(6), after Successful login, N number of thread respectively using the data transmission format that TYPE orders setting is unified, for example:Data are passed
When transport format is binary format, send the order of ftp server for TYPE I r n;
(7), N number of thread send respectively PASV r n orders, the order response comprising server just monitor host address end
Port address, client obtains the IP address of ftp server from return information and opens temporarily for setting up data cube computation
Port numbers, N number of data cube computation is set up for N number of thread and ftp server;
(8), N number of thread send respectively RSET xxx r n orders, set file transmission start offset amount, wherein, xxx is
The numerical value of start offset amount, the side-play amount of each thread is different;
(9), N number of thread send respectively APPE xxx r n orders, to ftp server initiate files passe ask, wherein, xxx
It is the filename to create on the server, N number of thread uses identical filename(Ftp server supports that the breakpoint of file continues
Pass);
(10), N number of thread and ftp server set up data cube computation respectively, each thread distributes a blocks of files, starts on parallel
Pass each file block data;
(11), main thread every ten seconds task performances of once each thread of inquiry, when the transmission for having thread to distribute is appointed
It is that the most thread of remaining task amount shares fractional transmission task using RDT algorithms after the completion of business;
(12)If, occur accidental interruption again, repeat step(1)To step(11);Extremely all gone up to All Files block
Biography is finished, then close all of data cube computation and control is connected;
(13), delete provisional configuration file, one time files passe process terminates.
By specific embodiment above, the those skilled in the art can readily realize the present invention.But should
Work as understanding, the present invention is not limited to above-mentioned kind specific embodiment.On the basis of disclosed embodiment, the technology neck
The technical staff in domain can be combined different technical characteristics, so as to realize different technical schemes.For example by embodiment 2 to reality
Example 6 is applied, is arbitrarily combined two-by-two or any three kinds of combinations or any four combination or five kinds of modes for all combining, so as to be formed
Various other technical schemes.
In addition to the technical characteristic described in specification, the known technology of those skilled in the art is.
Claims (6)
1. a kind of method based on ftp file high efficiency of transmission, it is characterised in that:The method comprises the following steps:
(1), check whether there is the corresponding provisional configuration file of specified file:
1., if it does not exist, then performing step(2);
2., if it is present redirecting execution step(3);
(2), first, obtain user set upload number of threads N, file to be uploaded in the path of server end, files passe
Progress and file transformat(It is defaulted as binary format);Then, according to number of threads N, original is divided into N blocks
(Logical division, only obtains the side-play amount of each BOB(beginning of block) and end position);A thread is specially opened, for setting up and managing
Corresponding provisional configuration file, by each thread completion task situation real time record to provisional configuration file, facilitates breakpoint to continue
Used during biography, redirect execution step(4);
(3), first, read provisional configuration file, data transmission format before acquisition, upload number of threads N and each thread
Upload progress, be that each thread redistributes task, then before breakpoint location upload;A thread is specially opened, is used
To manage corresponding provisional configuration file, by each thread completion task situation real time record to provisional configuration file, facilitate
Used during breakpoint transmission;
(4), open N number of thread, be respectively created local socket, set up N number of control using ICP/IP protocol and destination server
Connection;
(5), N number of thread send respectively USER xxx r n and PASSyyy r n orders username and password is sent to FTP
Server, logs in ftp server;
(6), after Successful login, N number of thread uses the data transmission format that TYPE orders setting is unified respectively;
(7), N number of thread send respectively PASV r n orders, the order response comprising server just monitor host address end
Port address, client obtains the IP address of ftp server from return information and opens temporarily for setting up data cube computation
Port numbers, N number of data cube computation is set up for N number of thread and ftp server;
(8), N number of thread send respectively RSET xxx r n orders, set file transmission start offset amount, wherein, xxx is
The numerical value of start offset amount, the side-play amount of each thread is different;
(9), N number of thread send respectively APPE xxx r n orders, to ftp server initiate files passe ask, wherein, xxx
It is the filename to create on the server, N number of thread uses identical filename;
(10), N number of thread and ftp server set up data cube computation respectively, each thread distributes a blocks of files, starts on parallel
Pass each file block data;
(11), main thread every ten seconds task performances of once each thread of inquiry, when the transmission for having thread to distribute is appointed
It is that the most thread of remaining task amount shares fractional transmission task using RDT algorithms after the completion of business;
(12)If, occur accidental interruption again, repeat step(1)To step(11);Extremely all gone up to All Files block
Biography is finished, then close all of data cube computation and control is connected;
(13), delete provisional configuration file, one time files passe process terminates.
2. the method based on ftp file high efficiency of transmission according to claim 1, it is characterised in that:The step(1)If in
There is the corresponding provisional configuration file of specified file, then illustrate that this document will carry out breakpoint transmission.
3. the method based on ftp file high efficiency of transmission according to claim 1, it is characterised in that:The step(2)Chinese
Part transformat is defaulted as binary format.
4. the method based on ftp file high efficiency of transmission according to claim 1, it is characterised in that:The step(2)Middle source
File division uses logical division, the side-play amount untill only obtaining each BOB(beginning of block) and terminating.
5. the method based on ftp file high efficiency of transmission according to claim 1, it is characterised in that:The step(6)Middle number
When according to transformat being binary format, send the order of ftp server for TYPE I r n.
6. the method based on ftp file high efficiency of transmission according to claim 1, it is characterised in that:The ftp server branch
Hold the breakpoint transmission of file.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710308332.XA CN106911811A (en) | 2017-05-04 | 2017-05-04 | A kind of method based on ftp file high efficiency of transmission |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710308332.XA CN106911811A (en) | 2017-05-04 | 2017-05-04 | A kind of method based on ftp file high efficiency of transmission |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106911811A true CN106911811A (en) | 2017-06-30 |
Family
ID=59210841
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710308332.XA Pending CN106911811A (en) | 2017-05-04 | 2017-05-04 | A kind of method based on ftp file high efficiency of transmission |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106911811A (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107465745A (en) * | 2017-08-10 | 2017-12-12 | 安徽声讯信息技术有限公司 | A kind of breakpoint transmission control system based on big sharing files |
CN107704567A (en) * | 2017-09-29 | 2018-02-16 | 郑州云海信息技术有限公司 | A kind of analytic method of binary file, device, equipment and storage medium |
CN108182197A (en) * | 2017-11-29 | 2018-06-19 | 商派软件有限公司 | A kind of method imported and exported by FTP progress big data batches |
CN108810172A (en) * | 2018-07-26 | 2018-11-13 | Oppo(重庆)智能科技有限公司 | Judgment method, device and the electronic equipment of file integrality |
CN109286677A (en) * | 2018-10-25 | 2019-01-29 | 北京北信源信息安全技术有限公司 | A kind of method and device of the file transmission based on FTP |
CN109391694A (en) * | 2018-10-26 | 2019-02-26 | 深圳壹账通智能科技有限公司 | Document transmission method and relevant device based on SFTP |
CN111600945A (en) * | 2020-05-13 | 2020-08-28 | 上海英方软件股份有限公司 | FTP server breakpoint downloading method and device based on block transmission |
CN113766006A (en) * | 2021-07-29 | 2021-12-07 | 北京思特奇信息技术股份有限公司 | Real-time file transmission method and system based on FTP (file transfer protocol) |
CN113824760A (en) * | 2021-08-03 | 2021-12-21 | 中债金科信息技术有限公司 | File concurrent block uploading method and device, electronic equipment and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103442037A (en) * | 2013-08-09 | 2013-12-11 | 华南理工大学 | Method for achieving multithreading breakpoint upload of oversized file based on FTP |
CN104065731A (en) * | 2014-06-30 | 2014-09-24 | 江苏华大天益电力科技有限公司 | FTP file transfer system and transfer method |
-
2017
- 2017-05-04 CN CN201710308332.XA patent/CN106911811A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103442037A (en) * | 2013-08-09 | 2013-12-11 | 华南理工大学 | Method for achieving multithreading breakpoint upload of oversized file based on FTP |
CN104065731A (en) * | 2014-06-30 | 2014-09-24 | 江苏华大天益电力科技有限公司 | FTP file transfer system and transfer method |
Non-Patent Citations (1)
Title |
---|
孟欣: "基于 FTP文件的高效上传方法的研究与实现", 《中国优秀硕士学位论文全文数据库信息科技辑》 * |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107465745A (en) * | 2017-08-10 | 2017-12-12 | 安徽声讯信息技术有限公司 | A kind of breakpoint transmission control system based on big sharing files |
CN107704567A (en) * | 2017-09-29 | 2018-02-16 | 郑州云海信息技术有限公司 | A kind of analytic method of binary file, device, equipment and storage medium |
CN108182197A (en) * | 2017-11-29 | 2018-06-19 | 商派软件有限公司 | A kind of method imported and exported by FTP progress big data batches |
CN108810172A (en) * | 2018-07-26 | 2018-11-13 | Oppo(重庆)智能科技有限公司 | Judgment method, device and the electronic equipment of file integrality |
CN109286677A (en) * | 2018-10-25 | 2019-01-29 | 北京北信源信息安全技术有限公司 | A kind of method and device of the file transmission based on FTP |
CN109391694A (en) * | 2018-10-26 | 2019-02-26 | 深圳壹账通智能科技有限公司 | Document transmission method and relevant device based on SFTP |
CN109391694B (en) * | 2018-10-26 | 2022-07-26 | 深圳壹账通智能科技有限公司 | SFTP-based file transmission method and related equipment |
CN111600945A (en) * | 2020-05-13 | 2020-08-28 | 上海英方软件股份有限公司 | FTP server breakpoint downloading method and device based on block transmission |
CN113766006A (en) * | 2021-07-29 | 2021-12-07 | 北京思特奇信息技术股份有限公司 | Real-time file transmission method and system based on FTP (file transfer protocol) |
CN113766006B (en) * | 2021-07-29 | 2024-02-23 | 北京思特奇信息技术股份有限公司 | Real-time file transmission method and system based on FTP protocol |
CN113824760A (en) * | 2021-08-03 | 2021-12-21 | 中债金科信息技术有限公司 | File concurrent block uploading method and device, electronic equipment and storage medium |
CN113824760B (en) * | 2021-08-03 | 2024-01-30 | 中债金科信息技术有限公司 | File concurrency block uploading method and device, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106911811A (en) | A kind of method based on ftp file high efficiency of transmission | |
US10331501B2 (en) | USB device redirection for remote systems | |
US20170302575A1 (en) | Content delivery from home networks | |
US8090790B2 (en) | Method and system for splicing remote direct memory access (RDMA) transactions in an RDMA-aware system | |
US8537837B2 (en) | Switch with virtual network identifier re-write capability | |
US9253028B2 (en) | Software-defined networking tunneling extensions | |
US8625595B2 (en) | Fiber channel identifier mobility for fiber channel and fiber channel over ethernet networks | |
CN103442037A (en) | Method for achieving multithreading breakpoint upload of oversized file based on FTP | |
US11553014B2 (en) | Downloading of server-based content through peer-to-peer networks | |
US9723069B1 (en) | Redistributing a connection | |
CN100505745C (en) | Quality of service for iSCSI | |
WO2018076765A1 (en) | Content distribution method and device for cloud computing system, computing node and system | |
CN103731451A (en) | Method and system for uploading file | |
US20060221824A1 (en) | Storage system and data processing method | |
CN103475682A (en) | File transfer method and file transfer equipment | |
CN108881034B (en) | Request response method, device and system applied to BT system | |
KR101240552B1 (en) | System and method for managing media keys and for transmitting/receiving peer-to-peer messages using the media keys | |
CN105408871A (en) | Method and apparatus for providing redundant data access | |
US20160259836A1 (en) | Parallel asynchronous data replication | |
US8650313B2 (en) | Endpoint discriminator in network transport protocol startup packets | |
US20130339486A1 (en) | Scalable Storage with Programmable Networks | |
KR100521361B1 (en) | a method of collaborating in transferring a file in a networking environment | |
WO2013153694A1 (en) | Communication device, method, and system for relaying communication between client and server | |
US20090248845A1 (en) | Network bandwidth control for network storage | |
US20030028657A1 (en) | Directly addressed multicast protocol |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170630 |
|
RJ01 | Rejection of invention patent application after publication |