Fast file transmission method
By introducing the QUIC protocol into the FTP/SFTP negotiation mechanism, combined with file compression, packaging and priority processing, the problem of low transmission efficiency of traditional protocols in high-latency network environments is solved, and the speed and reliability of file transmission are improved. It is applicable in various network environments.
Patent Information
- Application Number
- CN202410820342.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-24
- Publication Date
- 2024-09-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional FTP and SFTP protocols have low transmission efficiency in high-latency and unstable network environments. They lack compression and priority processing functions, resulting in the inability to guarantee the transmission speed and efficiency of large files and high-priority files.
Adopt a fast file transfer method based on the QUIC protocol. By introducing the use judgment of the QUIC protocol in the FTP/SFTP negotiation mechanism, combined with file compression, packaged transmission and priority processing, the QUIC protocol's fast connection and multi-stream processing capabilities are used to optimize transmission. process.
Significantly improves the speed, reliability and flexibility of file transfer, is suitable for various network environments, ensures fast transfer of high-priority files, and maintains compatibility with existing firewalls and network security policies.
Smart Images

Figure CN118714128A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer networks, and in particular to a method for fast file transmission. Background Art
[0002] With the rapid development of the Internet and cloud computing, data transmission technology has become a key component of modern information technology. In application scenarios such as file sharing, remote backup, and real-time data synchronization, the efficiency and reliability of file transfer directly affect user experience and system performance. At present, FTP (File Transfer Protocol) and SFTP (Secure File Transfer Protocol) are widely used file transfer protocols. However, traditional FTP and SFTP protocols have some limitations, which are particularly prominent in scenarios such as large file transfer, high-latency network environment, and multiple file transfer.
[0003] The traditional FTP protocol is based on TCP (Transmission Control Protocol), which achieves file transfer by separating the control channel and the data channel. FTP has high reliability in connection establishment, data transmission and connection closing, but in high-latency and unstable network environments, TCP's congestion control and flow control mechanisms will cause a significant decrease in transmission efficiency. In addition, the FTP protocol itself does not have advanced features such as compressed transmission and priority processing, which makes it impossible to effectively guarantee transmission speed and efficiency when processing large files and high-priority files.
[0004] The SFTP protocol is a file transfer protocol based on SSH (Secure Shell Protocol) and has higher security and reliability. However, like FTP, SFTP is also based on the TCP protocol, so its transmission efficiency is also challenged in high-latency and unstable network environments. In addition, although the encryption and authentication mechanism of SFTP improves the security of transmission, it also increases the overhead and complexity of transmission, especially when transferring large files and multiple files in batches. This overhead is particularly obvious.
[0005] In response to these problems, some improvement measures have emerged in recent years. For example, in 2009, Ai Haojun of Wuhan University proposed a method of using UDP (User Datagram Protocol) to transfer files in a TCP network. However, although the UDP protocol has advantages in transmission speed and efficiency, it lacks reliability and order control, which can easily lead to packet loss and disorder problems. This method can improve transmission efficiency in certain specific scenarios, but it still has certain limitations in widespread application.
[0006] Therefore, how to provide a method for fast file transmission is a problem that those skilled in the art need to solve urgently. Summary of the invention
[0007] One object of the present invention is to propose a method for fast file transmission. The present invention provides a method for fast file transmission based on the QUIC protocol, which effectively improves transmission speed, reliability and flexibility by optimizing compression, packaging and priority processing, and is suitable for various network environments.
[0008] A method for fast file transmission according to an embodiment of the present invention comprises the following steps:
[0009] S1. The client initiates an FTP establishment request to the server;
[0010] S2. The client enters the username and password for identity authentication. After the server verifies that the username and password are correct, an FTP connection is established.
[0011] S3. Add QUIC protocol usage judgment to FTP / SFTP negotiation mechanism;
[0012] S4. During the FTP / SFTP negotiation process, for the transmission files that need to be compressed, the compression transmission is determined according to the compression rate generated by QUIC;
[0013] S5. During FTP / SFTP negotiation, small files are transferred using folder packaging technology;
[0014] S6. During the FTP / SFTP negotiation process, the files with high priority are sent first;
[0015] S7. Use QUIC protocol to transfer files;
[0016] S8. When the firewall does not allow the client to drag files from the server, the QUIC Server model is established on the client, and the server pushes files to the client.
[0017] Optionally, the S1 specifically includes:
[0018] S11. The client automatically sends a QUIC channel query command to confirm whether the server supports QUIC Server;
[0019] S12, the server replies to the client, including support, support and command error and cannot be recognized;
[0020] S13. When the client replies that it supports it, it indicates that the server has pre-installed QUIC Server and issued a designated port, and chooses to use the fast file transfer method of QUIC;
[0021] S14. When the client replies that it is not supported or the command error cannot be recognized, choose to use the FTP traditional file transfer method.
[0022] Optionally, the compression ratio judgment specifically includes the file compression ratio zipratio, the file compression time zipduration and the file expected delivery duration deliveryduration:
[0023] Ratio=(zipratio÷zipduration)×deliveryduration
[0024] Ratio indicates the compression ratio. That is, the longer the transmission time is, the higher the compression ratio is. The shorter the compression time is, the more necessary it is to compress the file and the more it needs to be compressed for transmission. When the compression ratio Ratio is higher than the threshold, the file is compressed for transmission.
[0025] Optionally, the high-priority files specifically include: real-time data files, emergency processing files and key business files.
[0026] Optionally, the S5 specifically includes:
[0027] S51, the client queries the QUIC transmission mode, which is represented by a binary number, the highest bit indicates compressed transmission, the second highest bit indicates folder package transmission, and the lowest bit indicates large files are given priority;
[0028] S52, the client sends an ls command to list files;
[0029] S53, the client specifies the file and folder to start the transfer, and uses the qget request to obtain the file and folder;
[0030] S54, for the file, determine whether compressed transmission is allowed, and perform compressed transmission when the compression rate is higher than a threshold;
[0031] S55, for the folder, determine whether to allow package transmission, and package transmission when the compression rate is higher than the threshold;
[0032] S56. The server uses the QUIC protocol to transfer files and folders to the client.
[0033] Optionally, the port for transmitting files through the QUIC protocol remains unchanged, maintaining compatibility with the original firewall policy, and there is no need to change the original firewall policy.
[0034] The beneficial effects of the present invention are:
[0035] The present invention provides a method for fast file transmission based on the QUIC protocol. By introducing the use judgment of the QUIC protocol into the FTP / SFTP negotiation mechanism and combining the technologies of file compression, package transmission and priority processing, the efficiency and flexibility of file transmission are significantly improved. The specific beneficial effects are as follows:
[0036] 1. Improve transmission speed: By introducing the QUIC protocol and utilizing its fast connection establishment and multi-stream processing capabilities, the present invention can significantly reduce transmission delays and improve transmission speeds compared to the traditional TCP protocol, especially in high-latency and unstable network environments, where transmission efficiency is significantly improved.
[0037] 2. Enhanced transmission reliability: The QUIC protocol has better congestion control and error recovery mechanisms, which can effectively deal with packet loss and disorder during transmission, and improve transmission reliability and stability. In addition, through the judgment of the QUIC protocol in the FTP / SFTP negotiation mechanism, it is ensured that when the QUIC protocol is not supported, it can fall back to the traditional FTP / SFTP protocol for transmission, ensuring the compatibility of transmission.
[0038] 3. Optimize bandwidth utilization: The present invention introduces file compression and packaging technology in the transmission process. For files that need to be compressed, they are compressed and transmitted based on the compression rate generated by QUIC, reducing the amount of data transmitted; for small files, folder packaging technology is used for transmission, reducing the transmission cost and time. These measures can effectively optimize bandwidth utilization and improve transmission efficiency.
[0039] 4. Priority processing: By giving priority to sending high-priority files during the FTP / SFTP negotiation process, it can ensure that high-priority files such as real-time data files, emergency processing files and key business files are transmitted first, meeting users' needs for important data transmission and improving the quality and response speed of transmission services.
[0040] 5. Compatibility and security: The method of the present invention is improved on the basis of traditional FTP / SFTP, maintaining compatibility with existing firewalls and network security policies, without changing the original firewall policies, and is convenient for users to implement in the existing network environment. In addition, by establishing the QUIC Server mode on the client, the server can push files to the client when the firewall does not allow the client to drag files from the server, thereby enhancing the flexibility and security of transmission.
[0041] 6. Dynamic adaptability: The method of the present invention can dynamically judge and process file compression, packaging and priority issues according to the specific situation of the transferred files, providing a flexible and efficient file transfer solution. The client queries the QUIC transfer mode, uses binary numbers to represent different modes of compressed transmission, folder packaging transmission and large file priority, and optimizes the transmission according to the actual situation, further improving the transmission efficiency and user experience.
[0042] In summary, the fast file transmission method of the present invention effectively solves the limitations of the traditional FTP / SFTP protocol in scenarios such as large file transmission, high-latency network environment and multi-file transmission by comprehensively utilizing the advantages of the QUIC protocol and a variety of transmission optimization technologies, and significantly improves the speed, efficiency and reliability of file transmission. It has broad application prospects and significant practical value. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0044] Figure 1 A flowchart of a method for rapid file transmission proposed by the present invention;
[0045] Figure 2 A transmission judgment schematic diagram of a method for rapid file transmission proposed by the present invention;
[0046] Figure 3 A schematic diagram of a priority sending process of a method for rapid file transmission proposed by the present invention. DETAILED DESCRIPTION
[0047] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.
[0048] refer to Figure 1-3 , a method for fast file transmission, comprising the following steps:
[0049] S1. The client initiates an FTP establishment request to the server;
[0050] S2. The client enters the username and password for identity authentication. After the server verifies that the username and password are correct, an FTP connection is established.
[0051] S3. Add QUIC protocol usage judgment to FTP / SFTP negotiation mechanism;
[0052] S4. During the FTP / SFTP negotiation process, for the transmission files that need to be compressed, the compression transmission is determined according to the compression rate generated by QUIC;
[0053] S5. During FTP / SFTP negotiation, small files are transferred using folder packaging technology;
[0054] S6. During the FTP / SFTP negotiation process, the files with high priority are sent first;
[0055] S7. Use QUIC protocol to transfer files;
[0056] S8. When the firewall does not allow the client to drag files from the server, the QUIC Server model is established on the client, and the server pushes files to the client.
[0057] In this implementation, S1 specifically includes:
[0058] S11. The client automatically sends a QUIC channel query command to confirm whether the server supports QUIC Server;
[0059] S12, the server replies to the client, including support, support and command error and cannot be recognized;
[0060] S13. When the client replies that it supports it, it indicates that the server has pre-installed QUIC Server and issued a designated port, and chooses to use the fast file transfer method of QUIC;
[0061] S14. When the client replies that it is not supported or the command error cannot be recognized, choose to use the FTP traditional file transfer method.
[0062] In this implementation, the compression ratio judgment specifically includes the file compression ratio zipratio, the file compression time zipduration and the file expected delivery duration deliveryduration:
[0063] Ratio=(zipratio÷zipduration)×deliveryduration
[0064] Ratio indicates the compression ratio. That is, the longer the transmission time is, the higher the compression ratio is. The shorter the compression time is, the more necessary it is to compress the file and the more it needs to be compressed for transmission. When the compression ratio Ratio is higher than the threshold, the file is compressed for transmission.
[0065] In this implementation manner, the high-priority files specifically include: real-time data files, emergency processing files, and key business files.
[0066] In this implementation manner, S5 specifically includes:
[0067] S51, the client queries the QUIC transmission mode, which is represented by a binary number, the highest bit indicates compressed transmission, the second highest bit indicates folder package transmission, and the lowest bit indicates large files are given priority;
[0068] S52, the client sends an ls command to list files;
[0069] S53, the client specifies the file and folder to start the transfer, and uses the qget request to obtain the file and folder;
[0070] S54, for the file, determine whether compressed transmission is allowed, and perform compressed transmission when the compression rate is higher than a threshold;
[0071] S55, for the folder, determine whether to allow package transmission, and package transmission when the compression rate is higher than the threshold;
[0072] S56. The server uses the QUIC protocol to transfer files and folders to the client.
[0073] In this implementation, the port for transmitting files using the QUIC protocol remains unchanged, maintaining compatibility with the original firewall policy, and there is no need to change the original firewall policy.
[0074] Embodiment 1:
[0075] In order to verify the feasibility of the present invention in implementation, the present invention is applied to a global enterprise. The enterprise needs to frequently transfer a large number of files between different data centers, including real-time data files, emergency processing files and key business files. These files may be large data sets, database backups, real-time log files, etc. During peak transmission periods, traditional FTP / SFTP file transfer methods are less efficient when processing high latency and unstable network environments, resulting in slow file transfer speeds, high packet loss rates, and unstable transmission processes, which cannot meet the enterprise's efficient and secure data transmission needs.
[0076] In order to optimize the file transfer speed and improve the transmission reliability, the enterprise decided to adopt the QUIC protocol-based file fast transmission method of the present invention. In the specific application, the following is a detailed description of the implementation steps of the present invention:
[0077] First, the client initiates an FTP establishment request. After entering the username and password for identity authentication, the server verifies the information and successfully establishes an FTP connection. At this point, the client automatically sends a QUIC channel query command to confirm whether the server supports QUIC Server. The server replies to confirm that it supports the QUIC protocol and opens the specified port.
[0078] During the transmission process, the client queries the QUIC transmission mode and uses a binary number to represent the transmission mode, where the highest bit indicates compressed transmission, the second highest bit indicates folder package transmission, and the lowest bit indicates that large files are given priority. Subsequently, the client lists the files, selects the files or folders to be transferred, and uses a qget request to transfer them. During the file transfer process, for files that need to be compressed, the server determines the compression rate based on the pre-generated compression rate for compression transmission; for small files, folder packaging technology is used for transmission; for high-priority files, priority is given to transmission.
[0079] In addition, in order to ensure that file transfers can be carried out smoothly when the firewall does not allow the client to drag files from the server, the client also establishes the QUIC Server mode, where the server pushes files to the client. Through these optimization measures, the enterprise effectively improves the speed and reliability of file transfers.
[0080] Table 1 Data comparison between traditional method and fast file transfer method
[0081]
[0082] From the analysis of the above table, it can be concluded that the method of the present invention has significant advantages in file transfer efficiency and reliability. In terms of transmission time improvement, the method of the present invention significantly reduces file transfer time, database backup file transfer time is reduced by 44%, real-time log file transfer time is reduced by 40%, and key business file transfer time is reduced by 33%. In terms of packet loss rate improvement, the method of the present invention reduces the packet loss rate by 80%, from 5% of the traditional FTP method to 1%. In terms of transmission failure rate improvement, the method of the present invention reduces the transmission failure rate by 75%, from 8% of the traditional FTP method to 2%.
[0083] In summary, the above experimental data fully demonstrates the significant advantages of the present invention in solving the problems of low transmission efficiency, high packet loss rate, unstable transmission process, etc. of traditional FTP / SFTP. Especially in a high-latency, unstable network environment, the method of the present invention can provide a more efficient and reliable file transfer service, which is suitable for data transmission needs of various types and scales. By adopting the method of the present invention, enterprises not only improve the efficiency and reliability of data transmission, but also significantly improve user experience and system performance, providing a strong guarantee for efficient collaboration between data centers.
[0084] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A method for fast file transmission, characterized in that: The steps include: S1. The client initiates an FTP establishment request to the server; S2. The client enters the username and password for identity authentication. After the server verifies that the username and password are correct, an FTP connection is established. S3. Add QUIC protocol usage judgment to FTP / SFTP negotiation mechanism; S4. During the FTP / SFTP negotiation process, for the transmission files that need to be compressed, the compression transmission is determined according to the compression rate generated by QUIC; S5. During FTP / SFTP negotiation, small files are transferred using folder packaging technology; S6. During the FTP / SFTP negotiation process, the files with high priority are sent first; S7. Use QUIC protocol to transfer files; S8. When the firewall does not allow the client to drag files from the server, the QUIC Server model is established on the client, and the server pushes files to the client.
2. A method for fast file transmission according to claim 1, characterized in that: The S1 specifically includes: S11. The client automatically sends a QUIC channel query command to confirm whether the server supports QUIC Server; S12, the server replies to the client, including support, support and command error and cannot be recognized; S13. When the client replies that it supports it, it indicates that the server has pre-installed QUIC Server and issued a designated port, and chooses to use the fast file transfer method of QUIC; S14. When the client replies that it is not supported or the command error cannot be recognized, choose to use the FTP traditional file transfer method.
3. A method for fast file transmission according to claim 1, characterized in that: The compression ratio judgment specifically includes the file compression ratio zipratio, the file compression time zipduration and the file expected delivery duration deliveryduration: Ratio=(zipratio÷zipduration)×deliveryduration Here, Ratio represents the compression ratio.
4. A method for rapid file transmission according to claim 1, characterized in that: The high-priority files specifically include: real-time data files, emergency processing files and key business files.
5. A method for rapid file transmission according to claim 1, characterized in that: The S5 specifically includes: S51, the client queries the QUIC transmission mode, which is represented by a binary number, the highest bit indicates compressed transmission, the second highest bit indicates folder package transmission, and the lowest bit indicates large files are given priority; S52, the client sends an ls command to list files; S53, the client specifies the file and folder to start the transfer, and uses the qget request to obtain the file and folder; S54, for the file, determine whether compressed transmission is allowed, and perform compressed transmission when the compression rate is higher than a threshold; S55, for the folder, determine whether to allow package transmission, and package transmission when the compression rate is higher than the threshold; S56. The server uses the QUIC protocol to transfer files and folders to the client.
6. A method for rapid file transmission according to claim 1, characterized in that: The port for transmitting files through the QUIC protocol remains unchanged, maintaining compatibility with the original firewall policy, and there is no need to change the original firewall policy.
