基于FTP的文件高效上傳方法的研究與實現(xiàn)
發(fā)布時間:2018-09-18 17:07
【摘要】:FTP是一種廣泛使用的網(wǎng)絡服務,它是數(shù)據(jù)傳輸?shù)闹匾ㄐ欧绞剑蠖鄶?shù)的文件上傳和下載任務都是靠FTP完成的,它實現(xiàn)了可靠且有效傳輸數(shù)據(jù)的功能;同時,只要進行文件傳輸?shù)牟僮飨到y(tǒng)都支持FTP協(xié)議,就可以方便地在不同類型的計算機之間進行文件傳輸,使文件傳輸操作不會因為各類主機文件存儲系統(tǒng)的差異而受影響。因此,F(xiàn)TP一直是Internet上廣泛使用的服務。 FTP服務器為客戶提供文件上傳和下載的雙向服務,而當前的應用及研究更多地側(cè)重在FTP下載技術上,對于上傳技術的研究則涉及甚少,尤其是對單個大文件有效上傳技術的研究則更少。然而,現(xiàn)在網(wǎng)絡實際使用中,經(jīng)常需要傳輸以GB為單位的大文件,如多媒體文件共享等應用。大文件上傳效率的高低對于多媒體文件的網(wǎng)絡共享等應用顯得越來越重要。但是,,由于這些文件容量巨大,使用傳統(tǒng)單線程FTP上傳的方式耗時長,上傳過程最容易發(fā)生意外中斷,導致文件重新上傳的操作頻繁,極大影響了數(shù)據(jù)共享的效率。再如:利用某超算中心進行高性能相關的計算時,客戶端的用戶需通過VPN網(wǎng)絡上傳大量的計算數(shù)據(jù),經(jīng)過超級計算機計算后取得結(jié)果,如果使用傳統(tǒng)FTP上傳,效率會很低,而采用多線程斷點上傳技術可以發(fā)揮顯著的優(yōu)勢。由此可見,大文件上傳技術的研究對于促進網(wǎng)絡應用發(fā)展有著重大的意義。 傳統(tǒng)FTP采用單線程上傳文件,在網(wǎng)絡帶寬有限的條件下,對帶寬的搶占優(yōu)勢小,導致上傳速度慢;同時,一旦發(fā)生意外中斷,就需要重新上傳文件的全部數(shù)據(jù),極大地影響了數(shù)據(jù)上傳的效率。本文提出了根據(jù)實際情況對文件合理分塊、智能為每個線程分配傳輸任務等一系列技術,通過多線程并行作業(yè)和斷點恢復上傳的方法,可以有效解決傳統(tǒng)FTP上傳操作中存在的問題。 同時,由于Linux操作系統(tǒng)具有開放性、高效性、良好的可移植性和豐富的網(wǎng)絡功能等諸多優(yōu)勢,因此,在設計實現(xiàn)階段選擇了基于Linux操作系統(tǒng),使用C++編程語言開發(fā)一套FTP客戶端軟件。經(jīng)過大量對比試驗和測試數(shù)據(jù)的全面分析,充分證明本技術方法的可行性與有效性,證明本論文提出的技術方案可以大幅度提高大文件上傳的效率,尤其對單個大文件的上傳效率的提升效果明顯。
[Abstract]:FTP is a widely used network service, it is an important communication mode of data transmission. Most of the tasks of file upload and download are accomplished by FTP, which realizes the function of reliable and effective data transmission. As long as the operating system for file transfer supports FTP protocol, it can easily transfer files between different types of computers, so that file transfer operations will not be affected by the differences of file storage systems in all kinds of hosts. Therefore, FTP server has always been a widely used service on Internet. FTP server provides bidirectional service for file upload and download to clients, and the current application and research focus more on FTP download technology. There are few researches on upload technology, especially on single large file efficient upload technology. However, it is often necessary to transfer large files based on GB, such as multimedia file sharing and so on. The efficiency of large file upload is becoming more and more important for the network sharing of multimedia files. However, because of the huge capacity of these files, the traditional single-threaded FTP upload mode takes a long time, and the uploading process is most likely to be interrupted by accident, which leads to frequent file re-upload operations, which greatly affect the efficiency of data sharing. For example, when making use of a supercomputing center for high performance related calculations, the client users need to upload a large amount of computing data through the VPN network, and the results are obtained after the supercomputer calculation. If the traditional FTP is used to upload, the efficiency will be very low. The use of multi-thread breakpoint upload technology can play a significant advantage. It can be seen that the research of large file upload technology is of great significance to promote the development of network applications. Under the condition of limited network bandwidth, the traditional FTP uses single thread to upload files. Under the condition of limited network bandwidth, the preemptive advantage of bandwidth is small, which results in slow uploading speed. At the same time, once unexpected interruption occurs, all the data of the file need to be uploaded again. It greatly affects the efficiency of data upload. In this paper, according to the actual situation, a series of techniques, such as reasonably dividing files into blocks and intelligently assigning transmission tasks to each thread, are put forward to restore uploading by multi-thread parallel jobs and breakpoints. It can effectively solve the problems existing in the traditional FTP upload operation. At the same time, because the Linux operating system has many advantages, such as openness, high efficiency, good portability and rich network function, so in the stage of design and implementation, the Linux operating system is chosen. Use C programming language to develop a set of FTP client software. The feasibility and effectiveness of this technical method are fully proved through a large number of comparative experiments and comprehensive analysis of test data. It is proved that the technical scheme proposed in this paper can greatly improve the efficiency of large file uploading. Especially for a single large file upload efficiency effect is obvious.
【學位授予單位】:華南理工大學
【學位級別】:碩士
【學位授予年份】:2014
【分類號】:TP393.09
本文編號:2248566
[Abstract]:FTP is a widely used network service, it is an important communication mode of data transmission. Most of the tasks of file upload and download are accomplished by FTP, which realizes the function of reliable and effective data transmission. As long as the operating system for file transfer supports FTP protocol, it can easily transfer files between different types of computers, so that file transfer operations will not be affected by the differences of file storage systems in all kinds of hosts. Therefore, FTP server has always been a widely used service on Internet. FTP server provides bidirectional service for file upload and download to clients, and the current application and research focus more on FTP download technology. There are few researches on upload technology, especially on single large file efficient upload technology. However, it is often necessary to transfer large files based on GB, such as multimedia file sharing and so on. The efficiency of large file upload is becoming more and more important for the network sharing of multimedia files. However, because of the huge capacity of these files, the traditional single-threaded FTP upload mode takes a long time, and the uploading process is most likely to be interrupted by accident, which leads to frequent file re-upload operations, which greatly affect the efficiency of data sharing. For example, when making use of a supercomputing center for high performance related calculations, the client users need to upload a large amount of computing data through the VPN network, and the results are obtained after the supercomputer calculation. If the traditional FTP is used to upload, the efficiency will be very low. The use of multi-thread breakpoint upload technology can play a significant advantage. It can be seen that the research of large file upload technology is of great significance to promote the development of network applications. Under the condition of limited network bandwidth, the traditional FTP uses single thread to upload files. Under the condition of limited network bandwidth, the preemptive advantage of bandwidth is small, which results in slow uploading speed. At the same time, once unexpected interruption occurs, all the data of the file need to be uploaded again. It greatly affects the efficiency of data upload. In this paper, according to the actual situation, a series of techniques, such as reasonably dividing files into blocks and intelligently assigning transmission tasks to each thread, are put forward to restore uploading by multi-thread parallel jobs and breakpoints. It can effectively solve the problems existing in the traditional FTP upload operation. At the same time, because the Linux operating system has many advantages, such as openness, high efficiency, good portability and rich network function, so in the stage of design and implementation, the Linux operating system is chosen. Use C programming language to develop a set of FTP client software. The feasibility and effectiveness of this technical method are fully proved through a large number of comparative experiments and comprehensive analysis of test data. It is proved that the technical scheme proposed in this paper can greatly improve the efficiency of large file uploading. Especially for a single large file upload efficiency effect is obvious.
【學位授予單位】:華南理工大學
【學位級別】:碩士
【學位授予年份】:2014
【分類號】:TP393.09
【參考文獻】
相關期刊論文 前7條
1 黎苑文;程明智;徐秀花;楊義先;;斷點續(xù)傳及多線程機制在遠程傳版中的應用研究[J];北京印刷學院學報;2012年06期
2 駱斌,費翔林;多線程技術的研究與應用[J];計算機研究與發(fā)展;2000年04期
3 劉軼,鄭守淇,錢德沛;一種分布式共享存儲系統(tǒng)的線程分配算法[J];計算機研究與發(fā)展;2000年05期
4 鄭燕飛,余海燕;Linux的多線程機制探討與實踐[J];計算機應用;2001年01期
5 黃珍生;;一種基于帶寬的文件分塊動態(tài)下載模型[J];計算機應用與軟件;2010年10期
6 廖樂林;;斷點續(xù)傳的原理探討和編程應用[J];科技信息(科學教研);2007年23期
7 王魁生;盧夢僑;王曉波;;一種基于網(wǎng)絡狀況的多線程下載調(diào)度算法[J];軟件導刊;2011年04期
本文編號:2248566
本文鏈接:http://sikaile.net/guanlilunwen/ydhl/2248566.html
最近更新
教材專著