WO2015117393A1 - File transmission method, device and system - Google Patents

File transmission method, device and system Download PDF

Info

Publication number
WO2015117393A1
WO2015117393A1 PCT/CN2014/089098 CN2014089098W WO2015117393A1 WO 2015117393 A1 WO2015117393 A1 WO 2015117393A1 CN 2014089098 W CN2014089098 W CN 2014089098W WO 2015117393 A1 WO2015117393 A1 WO 2015117393A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
decoding
telnet
ssh
encoded
Prior art date
Application number
PCT/CN2014/089098
Other languages
French (fr)
Chinese (zh)
Inventor
阚江涛
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2015117393A1 publication Critical patent/WO2015117393A1/en

Links

Images

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]
    • 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/08Protocols specially adapted for terminal emulation, e.g. Telnet
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/565Conversion or adaptation of application format or content

Definitions

  • the present invention relates to the field of file transmission technologies, and in particular, to a file transmission method, device and system.
  • devices for file transfer are usually divided into multiple independent subnets.
  • the gateway devices of each subnet When file transfer is implemented through these subnets, the gateway devices of each subnet generally open relatively secure SSH (Secure). Shell, Secure Shell Protocol) Management port. Since the device and the device are not all connected, but only the adjacent two can communicate with each other, and the ftp/sftp/http/https file transfer protocol restricts the transfer of files across the network, how to provide one A method for enabling file transfer across different networks is a technical problem to be solved.
  • an object of embodiments of the present invention is to provide a file transmission method, apparatus, and system for implementing file transmission across different networks.
  • the local end encodes the file transmission acquisition request into the first request information that can be transmitted by the telnet/ssh, and sends the first request information to the peer end, where the file transmission acquisition request includes the target text selected by the local end from the file list.
  • the encoded file is obtained by compressing the encoded file that can be transmitted by telnet/ssh.
  • the method before performing the step of encoding the file transmission acquisition request into the first request information that can be transmitted by the telnet/ssh and sending the information to the peer end, the method further includes:
  • the encoded file transfer request that can be transmitted by the telnet/ssh, where the file transfer request includes a file name and a file path of the target file selected by the peer from the file list;
  • the local end After acquiring the target file according to the first decoding execution result, the local end encodes the target file into an encoded file that can be transmitted by telnet/ssh, and sends the encoded file to the opposite end, so that the opposite end encodes the encoded file. After the file performs the second decoding, the target file is restored.
  • the method further includes:
  • Determining whether the size of the encoded file exceeds a preset threshold Determining whether the size of the encoded file exceeds a preset threshold, and performing a compression process on the encoded file when determining that the size of the encoded file exceeds a preset threshold.
  • the method before the step of obtaining, by the peer end, the encoded file transmission request that can be transmitted by telnet/ssh, the method further includes:
  • Performing a third decoding on the file list obtaining request acquiring a target file list according to the third decoding execution result, and encoding the target file list into a file list file that can be transmitted by telnet/ssh and transmitting the file list file to the opposite end, so that After the peer performs the fourth decoding on the file list file, the file list is displayed.
  • a transmitting device configured to implement file transmission on a transmission network divided into different subnets, wherein the transmission device in the transmission network supports a telnet/ssh protocol, including a first coding unit and a first decoding unit, where:
  • the first encoding unit is configured to: encode a file transfer obtaining request into a first request information that can be transmitted by telnet/ssh, and the file transfer obtaining request includes a file name and a file of the target file selected from the file list. path;
  • the first decoding unit is configured to: perform a first decoding on the first request information on the receiving side, and encode the acquired target file corresponding to the first decoding execution result into an encoded file that can be transmitted by telnet/ssh and After returning the encoded file to the transmitting device, performing second decoding on the received encoded file to restore the target file.
  • the first coding unit is further configured to: encode the file list acquisition request into second request information that can be transmitted by telnet/ssh and send the same;
  • the first decoding unit is further configured to: perform a third decoding on the second request information by the receiver, and encode the obtained target file list corresponding to the third decoding execution result into a file that can be transmitted by telnet/ssh After the list file returns the encoded file list file to the transmitting device, a fourth decoding is performed on the obtained file list file to display the file list.
  • a receiving device configured to implement file transmission on a transmission network divided into different subnets, wherein the transmission device in the transmission network supports a telnet/ssh protocol, where the second decoding unit and the second coding unit are included, among them:
  • the second decoding unit is configured to: acquire a file transmission acquisition request that has been encoded to be telnet/ssh, and perform a first decoding on the file transmission acquisition request to obtain a first decoding execution result;
  • the file transfer request includes a file name and a file path of the target file selected by the peer from the file list, where the first decoding execution result includes a file name and a file path of the target file to be acquired;
  • the second encoding unit is configured to: acquire an object file according to a first decoding execution result, and encode the target file into an encoded file that can be transmitted by telnet/ssh, and send the encoded file to a sender, so as to send After performing the second decoding on the encoded file, the target file is restored.
  • the receiving device further includes a determining unit and a compressing unit, where:
  • the determining unit is configured to: after the second encoding unit encodes the target file into an encoded file that can be transmitted by telnet/ssh, determine whether the size of the encoded file exceeds a preset threshold, and determines that the preset threshold is exceeded. Sending a file compression command to the compression unit;
  • the compression unit is configured to perform a compression process on the encoded file according to the file compression command.
  • the second decoding unit is further configured to: obtain a file list acquisition request that has been encoded to be telnet/ssh, and perform a third decoding on the file list acquisition request;
  • the second coding unit is further configured to: obtain a target file list according to a third decoding execution result, and encode the target file list into a file list file that can be transmitted by telnet/ssh and encode the file
  • the subsequent file list file is sent to the sender so that after the sender performs the fourth decoding on the file list file, the file list is displayed.
  • a file transmission system for implementing file transmission on a transmission network divided into different subnets the transmission device in the transmission network supporting the telnet/ssh protocol, including a sender and a receiver, wherein:
  • the sender is configured to: encode a file transmission acquisition request into a first request information that can be transmitted by telnet/ssh, and the file transmission acquisition request includes a file of the target file selected by the sender from the file list. Name and file path; and performing a second decoding on the encoded file obtained from the recipient to restore the target file;
  • the receiving party is configured to: perform a first decoding on the first request information, and obtain a first decoding execution result, where the first decoding execution result includes a file name and a file path of the target file to be acquired;
  • the target file corresponding to the first decoding execution result is encoded, and the acquired object file is encoded into an encoded file that can be transmitted by telnet/ssh and returned to the sender.
  • the receiving party is further configured to: after performing the encoding on the acquired target file according to the first decoding execution result, determining whether the size of the encoded file exceeds a preset threshold, and when determining that the preset threshold is exceeded, The encoded file performs a compression process.
  • the sender is further configured to: encode the file list obtaining request into second request information that can be transmitted by telnet/ssh and send the fourth request decoding, and perform fourth decoding on the file list file obtained from the receiving party, and display The list of files;
  • the receiving side is further configured to: perform third decoding on the second request information, obtain a third decoding execution result, acquire an object file corresponding to the third decoding execution result, and encode the obtained target file list into a A file list file transmitted by telnet/ssh and returning the encoded file list file to the sender.
  • a computer program comprising program instructions that, when executed by a sender, cause The sender can execute the corresponding file transfer method.
  • a carrier carrying the computer program A carrier carrying the computer program.
  • a computer program comprising program instructions that, when executed by a recipient, cause the recipient to perform a corresponding file transfer method.
  • a carrier carrying the computer program A carrier carrying the computer program.
  • the technical solution of the present invention can realize the communication between the intranet and the b intranet, the communication between the intranet and the b outer network, and the communication between the outer network and the b outer network.
  • the intermediate device of the transmission only needs to support the standard telnet/ssh protocol.
  • the transmitting and receiving devices for transmission have the purpose of realizing file transmission across subnets by transmitting code and decoding functions by transmitting and decoding the telnet/ssh protocol.
  • the problem of copying files to the equipment site is needed, which improves work efficiency.
  • the technical solution of the present invention can not only transfer files, but also can transfer other data streams, thereby realizing the possibility of any data being transmitted through the telnet protocol.
  • FIG. 1 is a schematic flowchart of file downloading implemented by a file transmission method according to an embodiment of the present invention.
  • FIG. 2 is a schematic flowchart of an implementation process of a file transmission method according to an embodiment of the present invention.
  • FIG. 3 is a telnet/ssh multi-level login flowchart of a file transfer method according to an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of file downloading implemented by a file transfer method according to an embodiment of the present invention.
  • FIG. 5 is a flowchart of a file encoding process in a file transfer method according to an embodiment of the present invention.
  • FIG. 6 is a schematic diagram of a format of a message after file encoding according to an embodiment of the present invention.
  • FIG. 7 is a schematic diagram of a file decoding process in an embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of a transmitting apparatus according to an embodiment of the present invention.
  • FIG. 9 is a schematic structural diagram of a receiving apparatus according to an embodiment of the present invention.
  • a file transmission method for implementing file transmission on a transmission network divided into different subnets.
  • the transmission device in the transmission network supports the telnet/ssh protocol, and includes:
  • S20 Perform a first decoding on the first request information at the opposite end, and encode the obtained target file into an encoded file that can be transmitted by telnet/ssh according to the first decoding execution result, and return, and execute the acquired encoded file.
  • the second decoding is to restore the target file.
  • the obtained target file is encoded into an encoded file that can be transmitted by telnet/ssh according to the first decoding execution result, and compression processing is performed, and then Send to the peer.
  • the sender carries the command for compressing the requested file in the file transmission acquisition request, and the command is confirmed and executed after the receiver decodes the file transmission acquisition request, and the receiver performs the decoding according to the decoding.
  • the encoding process is performed on the encoded file, or in other embodiments, the receiving party has pre-customized the processing mode of the file transfer, such as performing file compression processing before the file is sent, which can greatly improve the efficiency of file transfer, especially for This is especially true for text files.
  • the request login information can be redirected multiple times on the intermediate transmission device in the transmission network, as shown in Figure 2 and Figure 3. For example, connect device 1 through telnet/ssh. After logging in to device 1, log in to device 2 through telnet/ssh. After logging in to device 2, log in to device 3 through telnet/ssh, and so on, and finally log in to the target device.
  • the encoded format includes: a transmission start flag, a data header line, a data body line, a transmission end flag, and a part. Due to the nature of the telnet/ssh transmission file, in this embodiment, the general transmission line does not exceed 120 characters, otherwise the telnet/ssh transmission process may be in error due to exceeding the single line content length limitation.
  • the file transmission method further includes:
  • S02 Perform third decoding on the second request information at the opposite end, and encode the obtained target file list into a file list file that can be transmitted by telnet/ssh according to the third decoding execution result, and return the obtained file.
  • the list file performs a fourth decoding and displays the list of files.
  • the sender when sending a file list acquisition request, the sender first encodes the file list acquisition request into a character type that can be transmitted by telnet/ssh through the telnet/ssh encoder, and after the encoding is completed, sends the telnet to the opposite end (receiver).
  • the /ssh decoder the receiver will interpret and execute the received file list request request command, such as obtaining a corresponding file list, and interpreting the execution result through the telnet/ssh encoder to perform encoding, and then sending the telnet/ssh to the sender.
  • the decoder completes the display of the file list after performing the decoding. In this way, the sender can know the corresponding file path through the file list to obtain the corresponding file.
  • the sender transmits the file transmission acquisition request again.
  • the file acquisition request is encoded by the telnet/ssh encoder into a character type that can be transmitted by telnet/ssh, and sent to the receiver's telnet/ssh decoder, which decodes and executes the received command, and the receiver will interpret the execution result. Its telnet/ssh encoder is encoded and returned to the sender.
  • the sender after acquiring the encoded file sent by the receiver, the sender performs second decoding on the encoded file acquired from the receiver to restore the target file.
  • the sender when the sender needs to upload the file, it is basically the same as the process of downloading the file.
  • the sender sends a file transfer request, and the file transfer request is encoded by the telnet/ssh encoder into a character type that can be transmitted by telnet/ssh, and then sent to the receiver's telnet/ssh decoder, which decodes the command and completes the file. Transfer request.
  • the present invention provides a file transmission method for implementing file transmission on a transmission network divided into different subnets, and the transmission device in the transmission network supports the telnet/ssh protocol, including :
  • step S40 optionally, after performing encoding on the acquired target file according to the fifth decoding execution result, determining whether the size of the encoded file exceeds a preset threshold, and when determining that the preset threshold is exceeded, The encoded file performs a compression process.
  • the file transmission method further includes:
  • the embodiment of the present invention further provides a sending apparatus, as shown in FIG. 8, for implementing file transmission on a transmission network divided into different subnets, and the transmission equipment in the transmission network supports telnet/
  • the ssh protocol includes:
  • the first encoding unit 801 is configured to: encode the file transmission acquisition request into the first request information that can be transmitted by telnet/ssh and send the same;
  • the first decoding unit 802 is configured to: after the receiver performs the first decoding on the first request information, and encodes the acquired target file into an encoded file that can be transmitted by telnet/ssh according to the first decoding execution result, and returns Performing a second decoding on the obtained encoded file to restore the target file.
  • the request login information can be redirected multiple times on the intermediate transmission device in the transmission network, as shown in Figure 2 and Figure 3.
  • the sending device connects to the device through telnet/ssh. 1. After successfully logging in to device 1, log in to device 2 through telnet/ssh. After successfully logging in to device 2, log in to device 3 through telnet/ssh, and so on, and finally log in to the target device.
  • the encoded format includes : Transfer start tag, data header line, data body line, transfer end tag, and part. Due to the nature of the telnet/ssh transmission file, in this embodiment, the general transmission line does not exceed 120 characters, otherwise the telnet/ssh transmission process may be in error due to exceeding the single line content length limitation.
  • the first encoding unit 801 is further configured to: encode the file list obtaining request into second request information that can be transmitted by telnet/ssh and send the second request information;
  • the 802 is further configured to perform a fourth decoding on the obtained file list file to display the file list.
  • the file list obtaining request is first encoded by the first encoding unit (telnet/ssh encoder) into a character type that can be transmitted by telnet/ssh, and after the encoding is completed, the sending is sent to the opposite end.
  • the receiver will interpret and execute the received file list acquisition request command, such as obtaining a corresponding file list, and interpreting the execution result through the telnet/ssh encoder to perform encoding, and then sending to
  • the first decoding unit (telnet/ssh decoder) of the transmitting device completes the display of the file list after performing the decoding.
  • the transmitting device transmits the file transfer acquisition request again.
  • the file acquisition request is encoded by the first coding unit into a character type that can be transmitted by telnet/ssh, and sent to the telnet/ssh decoder of the receiver, which decodes and executes the received command, and the receiver will interpret the execution result through it.
  • the telnet/ssh encoder is encoded and returned to the sender.
  • the first decoding unit 802 of the transmitting device performs second decoding on the encoded file acquired from the receiving side to restore the target file.
  • the transmitting device when the transmitting device wants to upload a file, it is basically the same as the process of downloading the file.
  • the sending device sends a file transfer obtaining request, and the file transfer obtaining request passes through the first encoding unit 801. After being encoded as a character type that can be transmitted by telnet/ssh, it is sent to the receiver's telnet/ssh decoder, which decodes the command and completes the file transfer request.
  • the embodiment of the present invention further provides a receiving apparatus, as shown in FIG. 9, for implementing file transmission on a transmission network divided into different subnets, and the transmission equipment in the transmission network supports telnet /ssh protocol, including:
  • the second decoding unit 901 is configured to: obtain a file transmission acquisition request that has been encoded into a telnet/ssh transmission, and perform a fifth decoding on the file transmission acquisition request;
  • the second encoding unit 902 is configured to: acquire an object file according to a fifth decoding execution result, and encode the target file into an encoded file that can be transmitted by telnet/ssh and send the encoded file to the sender, so that the sender pairs the encoding After the file performs the sixth decoding, the corresponding target file is restored.
  • the receiving device further includes:
  • the determining unit 903 is configured to: after the second encoding unit performs encoding on the acquired target file according to the fifth decoding execution result, determine whether the first decoding execution result includes a file compression command;
  • the compressing unit 904 is configured to: perform encoding processing on the encoded file according to the file compression command.
  • the second decoding unit 901 is further configured to: obtain a file list acquisition request that has been encoded to be telnet/ssh, and perform a seventh decoding on the file list acquisition request;
  • the second encoding unit 902 is further configured to: obtain a target file list according to the seventh decoding execution result, and encode the target file list into a file list file that can be transmitted by telnet/ssh and send the file to the sender, so as to send After performing the sixth decoding on the file list file, the file list is displayed.
  • the embodiment of the invention provides a file transmission system for implementing file transmission on a transmission network divided into different subnets, and the transmission device in the transmission network supports the telnet/ssh protocol, including:
  • the sender is configured to: encode the file transfer acquisition request into the first request information that can be transmitted by telnet/ssh and send the second request, and perform second decoding on the encoded file obtained from the receiver to restore the target file;
  • the receiving party is configured to: perform first decoding on the first request information, and encode the acquired target file into an encoded file that can be transmitted by telnet/ssh according to the first decoding execution result and return.
  • the receiving party is further configured to: after performing the encoding on the acquired target file according to the first decoding execution result, determining whether the size of the encoded file exceeds a preset threshold, and when determining that the preset threshold is exceeded, the encoding file is Perform compression processing.
  • the sender is further configured to: encode the file list acquisition request into the second request information that can be transmitted by telnet/ssh and send; further perform fourth decoding on the file list file acquired from the receiver, and display the file list ;
  • the receiving side is further configured to: perform third decoding on the second request information, and encode the obtained target file list into a file list file that can be transmitted by telnet/ssh according to the third decoding execution result and return.
  • the technical solution of the invention can realize the communication between the intranet and the b intranet, the communication between the intranet and the b outer network, and the communication between the external network and the b external network.
  • the intermediate device of the transmission only needs to support the standard telnet/ssh protocol.
  • the transmitting and receiving devices for transmission have the purpose of realizing file transmission across subnets by transmitting code and decoding functions by transmitting and decoding the telnet/ssh protocol.
  • the problem of copying files to the equipment site is needed, which improves work efficiency.
  • the technical solution of the present invention can not only transfer files, but also can transfer other data streams, thereby realizing the possibility of any data being transmitted through the telnet protocol. Therefore, the present invention has strong industrial applicability.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)
  • Computer And Data Communications (AREA)

Abstract

A file transmission method, device and system, a corresponding program instruction, and a carrier storing the program instruction. The method comprises: encoding a file transmission acquisition request into first request information capable of being transmitted by telnet/ssh, and sending same; and after executing first decoding on the first request information at an opposite end, and encoding an acquired object file into an encoded file capable of being transmitted by telnet/ssh according to the result of the execution of the first decoding and returning same, executing second decoding on the acquired encoded file to restore the object file. The technical solution can not only transfer a file, but can also transfer other data streams, thereby realizing the possibility of transmitting any data via a telnet protocol.

Description

文件传输方法、装置及系统File transmission method, device and system 技术领域Technical field
本发明涉及文件传输技术领域,具体而言,涉及一种文件传输方法、装置及系统。The present invention relates to the field of file transmission technologies, and in particular, to a file transmission method, device and system.
背景技术Background technique
目前通常采用ftp(File Transfer Protocol,文件传输协议)/sftp(Secure File Transfer Protocol,安全文件传送协议)/http(Hypertext transfer protocol,超文本传输协议)/https(Hyper Text Transfer Protocol over Secure Socket Layer,具有安全性的ssl加密传输协议)等文件传输协议实现文件传输,但是这些协议无法实现跨越网络的文件传输,并且路径上的设备必须开放对应的传输端口和路由才能进行文件传输。Currently, ftp (File Transfer Protocol)/sftp (Secure File Transfer Protocol)/http (Hypertext Transfer Protocol)/https (Hyper Text Transfer Protocol over Secure Socket Layer) File transfer protocols such as the secure ssl encrypted transport protocol) implement file transfer, but these protocols cannot implement file transfer across the network, and devices on the path must open corresponding transport ports and routes for file transfer.
为了网络安全和管理方便,当前通常将用于文件传输的设备划分为多个独立的子网,在透过这些子网实现文件传输时,各个子网的网关设备一般开启相对安全的SSH(Secure Shell,安全外壳协议)管理端口。由于设备和设备之间并不是全部联网的,而是仅相邻的两两之间可以进行通讯,加之ftp/sftp/http/https文件传输协议在跨网络传输文件方面的限制,因此如何提供一种能够实现跨越不同的网络进行文件传输的方法是亟待解决的技术问题。For network security and management convenience, devices for file transfer are usually divided into multiple independent subnets. When file transfer is implemented through these subnets, the gateway devices of each subnet generally open relatively secure SSH (Secure). Shell, Secure Shell Protocol) Management port. Since the device and the device are not all connected, but only the adjacent two can communicate with each other, and the ftp/sftp/http/https file transfer protocol restricts the transfer of files across the network, how to provide one A method for enabling file transfer across different networks is a technical problem to be solved.
发明内容Summary of the invention
有鉴于此,本发明实施例的目的在于提供一种文件传输方法、装置及系统,以实现跨越不同的网络进行文件传输。In view of this, an object of embodiments of the present invention is to provide a file transmission method, apparatus, and system for implementing file transmission across different networks.
为解决上述技术问题,采用如下技术方案:In order to solve the above technical problems, the following technical solutions are adopted:
一种文件传输方法,用于在被划分为不同子网的传输网络上实现文件传输,所述传输网络中的传输设备支持telnet/ssh协议,该方法包括:A file transmission method for implementing file transmission on a transmission network divided into different subnets, wherein the transmission device in the transmission network supports the telnet/ssh protocol, and the method includes:
本端将文件传输获取请求编码成可以被telnet/ssh传输的第一请求信息并发送给对端,所述文件传输获取请求中包括本端从文件列表中选取的目标文 件的文件名和文件路径;The local end encodes the file transmission acquisition request into the first request information that can be transmitted by the telnet/ssh, and sends the first request information to the peer end, where the file transmission acquisition request includes the target text selected by the local end from the file list. File name and file path;
在对端对所述第一请求信息执行第一解码,将获取的与第一解码执行结果相应的目标文件编码成可以被telnet/ssh传输的编码文件并将该编码文件返回给本端后,本端对接收到的编码文件执行第二解码,以还原出目标文件。Performing a first decoding on the first request information at the opposite end, encoding the obtained target file corresponding to the first decoding execution result into an encoded file that can be transmitted by telnet/ssh, and returning the encoded file to the local end, The local end performs a second decoding on the received encoded file to restore the target file.
可选地,所述编码文件是对所述可以被telnet/ssh传输的编码文件进行压缩处理后得到的。Optionally, the encoded file is obtained by compressing the encoded file that can be transmitted by telnet/ssh.
可选地,在执行所述将文件传输获取请求编码成可以被telnet/ssh传输的第一请求信息并发送给对端的步骤之前,还包括:Optionally, before performing the step of encoding the file transmission acquisition request into the first request information that can be transmitted by the telnet/ssh and sending the information to the peer end, the method further includes:
将文件列表获取请求编码成可以被telnet/ssh传输的第二请求信息并发送给对端;Encoding the file list obtaining request into the second request information that can be transmitted by telnet/ssh and sending the request information to the peer end;
在对端对所述第二请求信息执行第三解码,并将获取的与第三解码执行结果相应的目标文件列表编码成可以被telnet/ssh传输的文件列表文件并将该编码后的文件列表文件返回本端后,本端对接收到的文件列表文件执行第四解码,并显示所述文件列表。Performing third decoding on the second request information at the opposite end, and encoding the obtained target file list corresponding to the third decoding execution result into a file list file that can be transmitted by telnet/ssh and listing the encoded file. After the file returns to the local end, the local end performs fourth decoding on the received file list file, and displays the file list.
一种文件传输方法,用于在被划分为不同子网的传输网络上实现文件传输,所述传输网络中的传输设备支持telnet/ssh协议,该方法包括:A file transmission method for implementing file transmission on a transmission network divided into different subnets, wherein the transmission device in the transmission network supports the telnet/ssh protocol, and the method includes:
从对端获取编码后的可以被telnet/ssh传输的文件传输获取请求,所述文件传输获取请求中包括对端从文件列表中选取的目标文件的文件名和文件路径;Obtaining, by the peer end, the encoded file transfer request that can be transmitted by the telnet/ssh, where the file transfer request includes a file name and a file path of the target file selected by the peer from the file list;
对所述文件传输获取请求执行第一解码,得到第一解码执行结果,所述第一解码执行结果中包括要获取的目标文件的文件名和文件路径;Performing a first decoding on the file transmission acquisition request to obtain a first decoding execution result, where the first decoding execution result includes a file name and a file path of the target file to be acquired;
本端依据所述第一解码执行结果获取目标文件后,将所述目标文件编码成可以被telnet/ssh传输的编码文件,并将该编码文件发送至对端,以使得对端对所述编码文件执行第二解码后,还原出所述目标文件。 After acquiring the target file according to the first decoding execution result, the local end encodes the target file into an encoded file that can be transmitted by telnet/ssh, and sends the encoded file to the opposite end, so that the opposite end encodes the encoded file. After the file performs the second decoding, the target file is restored.
可选地,所述将所述目标文件编码成可以被telnet/ssh传输的编码文件的步骤之后,还包括:Optionally, after the step of encoding the object file into an encoded file that can be transmitted by telnet/ssh, the method further includes:
判断所述编码文件的大小是否超过预设阈值,且在判断得出所述编码文件的大小超过预设阈值时,对所述编码文件执行压缩处理。Determining whether the size of the encoded file exceeds a preset threshold, and performing a compression process on the encoded file when determining that the size of the encoded file exceeds a preset threshold.
可选地,所述从对端获取编码后的可以被telnet/ssh传输的文件传输获取请求的步骤之前,还包括:Optionally, before the step of obtaining, by the peer end, the encoded file transmission request that can be transmitted by telnet/ssh, the method further includes:
获取编码后的可以被telnet/ssh传输的文件列表获取请求;Obtaining a coded list of files that can be transmitted by telnet/ssh to obtain a request;
对所述文件列表获取请求执行第三解码,依据第三解码执行结果获取目标文件列表,并将所述目标文件列表编码成可以被telnet/ssh传输的文件列表文件并发送至对端,以使得对端对所述文件列表文件执行第四解码后,显示所述文件列表。Performing a third decoding on the file list obtaining request, acquiring a target file list according to the third decoding execution result, and encoding the target file list into a file list file that can be transmitted by telnet/ssh and transmitting the file list file to the opposite end, so that After the peer performs the fourth decoding on the file list file, the file list is displayed.
一种发送装置,用于实现在被划分为不同子网的传输网络上的文件传输,所述传输网络中的传输设备支持telnet/ssh协议,包括第一编码单元和第一解码单元,其中:A transmitting device, configured to implement file transmission on a transmission network divided into different subnets, wherein the transmission device in the transmission network supports a telnet/ssh protocol, including a first coding unit and a first decoding unit, where:
所述第一编码单元设置成:将文件传输获取请求编码成可以被telnet/ssh传输的第一请求信息并发送,所述文件传输获取请求中包括从文件列表中选取的目标文件的文件名和文件路径;The first encoding unit is configured to: encode a file transfer obtaining request into a first request information that can be transmitted by telnet/ssh, and the file transfer obtaining request includes a file name and a file of the target file selected from the file list. path;
所述第一解码单元设置成:在接收方对所述第一请求信息执行第一解码,及将获取的与第一解码执行结果相应的目标文件编码成可以被telnet/ssh传输的编码文件并将该编码文件返回给所述发送装置后,对接收到的编码文件执行第二解码,以还原出目标文件。The first decoding unit is configured to: perform a first decoding on the first request information on the receiving side, and encode the acquired target file corresponding to the first decoding execution result into an encoded file that can be transmitted by telnet/ssh and After returning the encoded file to the transmitting device, performing second decoding on the received encoded file to restore the target file.
可选地,所述第一编码单元还设置成:将文件列表获取请求编码成可以被telnet/ssh传输的第二请求信息并发送; Optionally, the first coding unit is further configured to: encode the file list acquisition request into second request information that can be transmitted by telnet/ssh and send the same;
所述第一解码单元还设置成:在接收方对所述第二请求信息执行第三解码、及将获取的与第三解码执行结果相应的目标文件列表编码成可以被telnet/ssh传输的文件列表文件并将该编码后的文件列表文件返回所述发送装置后,对获取的文件列表文件执行第四解码,以显示所述文件列表。The first decoding unit is further configured to: perform a third decoding on the second request information by the receiver, and encode the obtained target file list corresponding to the third decoding execution result into a file that can be transmitted by telnet/ssh After the list file returns the encoded file list file to the transmitting device, a fourth decoding is performed on the obtained file list file to display the file list.
一种接收装置,用于实现在被划分为不同子网的传输网络上的文件传输,所述传输网络中的传输设备支持telnet/ssh协议,其中,包括第二解码单元和第二编码单元,其中:a receiving device, configured to implement file transmission on a transmission network divided into different subnets, wherein the transmission device in the transmission network supports a telnet/ssh protocol, where the second decoding unit and the second coding unit are included, among them:
所述第二解码单元设置成:获取已被编码成可以被telnet/ssh传输的文件传输获取请求,并对所述文件传输获取请求执行第一解码,得到第一解码执行结果;其中,所述文件传输获取请求中包括对端从文件列表中选取的目标文件的文件名和文件路径,所述第一解码执行结果中包括要获取的目标文件的文件名和文件路径;The second decoding unit is configured to: acquire a file transmission acquisition request that has been encoded to be telnet/ssh, and perform a first decoding on the file transmission acquisition request to obtain a first decoding execution result; The file transfer request includes a file name and a file path of the target file selected by the peer from the file list, where the first decoding execution result includes a file name and a file path of the target file to be acquired;
所述第二编码单元设置成:依据第一解码执行结果获取目标文件,并将所述目标文件编码成可以被telnet/ssh传输的编码文件,并将该编码文件发送至发送方,以使得发送方对所述编码文件执行第二解码后,还原出目标文件。The second encoding unit is configured to: acquire an object file according to a first decoding execution result, and encode the target file into an encoded file that can be transmitted by telnet/ssh, and send the encoded file to a sender, so as to send After performing the second decoding on the encoded file, the target file is restored.
可选地,该接收装置还包括判断单元和压缩单元,其中:Optionally, the receiving device further includes a determining unit and a compressing unit, where:
所述判断单元设置成:在第二编码单元将所述目标文件编码成可以被telnet/ssh传输的编码文件后,判断编码文件的大小是否超过预设阈值,且在判断得出超过预设阈值时,向所述压缩单元发送文件压缩命令;The determining unit is configured to: after the second encoding unit encodes the target file into an encoded file that can be transmitted by telnet/ssh, determine whether the size of the encoded file exceeds a preset threshold, and determines that the preset threshold is exceeded. Sending a file compression command to the compression unit;
所述压缩单元设置成:依据所述文件压缩命令对所述编码文件执行压缩处理。The compression unit is configured to perform a compression process on the encoded file according to the file compression command.
可选地,所述第二解码单元还设置成:获取已被编码成可以被telnet/ssh传输的文件列表获取请求,并对所述文件列表获取请求执行第三解码;Optionally, the second decoding unit is further configured to: obtain a file list acquisition request that has been encoded to be telnet/ssh, and perform a third decoding on the file list acquisition request;
所述第二编码单元还设置成:依据第三解码执行结果获取目标文件列表,并将所述目标文件列表编码成可以被telnet/ssh传输的文件列表文件并将编码 后的文件列表文件发送至发送方,以使得发送方对所述文件列表文件执行第四解码后,显示所述文件列表。The second coding unit is further configured to: obtain a target file list according to a third decoding execution result, and encode the target file list into a file list file that can be transmitted by telnet/ssh and encode the file The subsequent file list file is sent to the sender so that after the sender performs the fourth decoding on the file list file, the file list is displayed.
一种文件传输系统,用于实现在被划分为不同子网的传输网络上的文件传输,所述传输网络中的传输设备支持telnet/ssh协议,包括发送方和接收方,其中:A file transmission system for implementing file transmission on a transmission network divided into different subnets, the transmission device in the transmission network supporting the telnet/ssh protocol, including a sender and a receiver, wherein:
所述发送方设置成:将文件传输获取请求编码成可以被telnet/ssh传输的第一请求信息并发送,所述文件传输获取请求中包括所述发送方从文件列表中选取的目标文件的文件名和文件路径;以及对从接收方获取的编码文件执行第二解码,以还原出目标文件;The sender is configured to: encode a file transmission acquisition request into a first request information that can be transmitted by telnet/ssh, and the file transmission acquisition request includes a file of the target file selected by the sender from the file list. Name and file path; and performing a second decoding on the encoded file obtained from the recipient to restore the target file;
所述接收方设置成:对所述第一请求信息执行第一解码,得到第一解码执行结果,所述第一解码执行结果中包括要获取的目标文件的文件名和文件路径;还获取与所述第一解码执行结果相应的目标文件,并将获取的目标文件编码成可以被telnet/ssh传输的编码文件并将该编码文件返回给所述发送方。The receiving party is configured to: perform a first decoding on the first request information, and obtain a first decoding execution result, where the first decoding execution result includes a file name and a file path of the target file to be acquired; The target file corresponding to the first decoding execution result is encoded, and the acquired object file is encoded into an encoded file that can be transmitted by telnet/ssh and returned to the sender.
可选地,所述接收方还设置成:依据第一解码执行结果对获取的目标文件执行编码后,判断编码文件的大小是否超过预设阈值,且在判断得出超过预设阈值时,对所述编码文件执行压缩处理。Optionally, the receiving party is further configured to: after performing the encoding on the acquired target file according to the first decoding execution result, determining whether the size of the encoded file exceeds a preset threshold, and when determining that the preset threshold is exceeded, The encoded file performs a compression process.
可选地,所述发送方还设置成:将文件列表获取请求编码成可以被telnet/ssh传输的第二请求信息并发送;还对从接收方获取的文件列表文件执行第四解码,并显示所述文件列表;Optionally, the sender is further configured to: encode the file list obtaining request into second request information that can be transmitted by telnet/ssh and send the fourth request decoding, and perform fourth decoding on the file list file obtained from the receiving party, and display The list of files;
所述接收方还设置成:对所述第二请求信息执行第三解码,得到第三解码执行结果,获取与所述第三解码执行结果相应的目标文件,将获取的目标文件列表编码成可以被telnet/ssh传输的文件列表文件并将编码后的文件列表文件返回给所述发送方。The receiving side is further configured to: perform third decoding on the second request information, obtain a third decoding execution result, acquire an object file corresponding to the third decoding execution result, and encode the obtained target file list into a A file list file transmitted by telnet/ssh and returning the encoded file list file to the sender.
一种计算机程序,包括程序指令,当该程序指令被发送方执行时,使得 该发送方可执行相应的文件传输方法。A computer program comprising program instructions that, when executed by a sender, cause The sender can execute the corresponding file transfer method.
一种载有该计算机程序的载体。A carrier carrying the computer program.
一种计算机程序,包括程序指令,当该程序指令被接收方执行时,使得该接收方可执行相应的文件传输方法。A computer program comprising program instructions that, when executed by a recipient, cause the recipient to perform a corresponding file transfer method.
一种载有该计算机程序的载体。A carrier carrying the computer program.
与相关技术相比,采用本发明技术方案可以实现a内网与b内网的通讯、a内网与b外网的通讯,以及a外网与b外网的通讯。在具体实施时,传输的中间设备只要支持标准的telnet/ssh协议即可。用于传输的发送和接收设备通过具备编解码功能,通过在发送请求以及获取信息时,通过对其进行支持telnet/ssh协议的编解码处理,达到了跨子网实现文件传输的目的,解决了需要到设备现场去拷贝文件的问题,提高了工作效率。在某些其他实施例中,采用本发明技术方案不仅仅可以传递文件,同样可以传递其他数据流,从而实现任意数据通过telnet协议进行传输的可能性。Compared with the related art, the technical solution of the present invention can realize the communication between the intranet and the b intranet, the communication between the intranet and the b outer network, and the communication between the outer network and the b outer network. In the specific implementation, the intermediate device of the transmission only needs to support the standard telnet/ssh protocol. The transmitting and receiving devices for transmission have the purpose of realizing file transmission across subnets by transmitting code and decoding functions by transmitting and decoding the telnet/ssh protocol. The problem of copying files to the equipment site is needed, which improves work efficiency. In some other embodiments, the technical solution of the present invention can not only transfer files, but also can transfer other data streams, thereby realizing the possibility of any data being transmitted through the telnet protocol.
附图概述BRIEF abstract
图1是基于本发明实施例提供的文件传输方法实现文件下载的流程示意图。FIG. 1 is a schematic flowchart of file downloading implemented by a file transmission method according to an embodiment of the present invention.
图2是基于本发明实施例提供的文件传输方法实现流程示意图。2 is a schematic flowchart of an implementation process of a file transmission method according to an embodiment of the present invention.
图3是本发明实施例提供的文件传输方法的telnet/ssh多级登录流程图。FIG. 3 is a telnet/ssh multi-level login flowchart of a file transfer method according to an embodiment of the present invention.
图4是基于本发明实施例提供的文件传输方法实现文件下载的示意图FIG. 4 is a schematic diagram of file downloading implemented by a file transfer method according to an embodiment of the present invention; FIG.
图5是本发明实施例提供的文件传输方法中文件编码过程流程图。FIG. 5 is a flowchart of a file encoding process in a file transfer method according to an embodiment of the present invention.
图6是本发明实施例中文件编码后的报文格式示意图。FIG. 6 is a schematic diagram of a format of a message after file encoding according to an embodiment of the present invention.
图7是本发明实施例中文件解码流程示意图;7 is a schematic diagram of a file decoding process in an embodiment of the present invention;
图8为本发明实施例的发送装置结构示意图;FIG. 8 is a schematic structural diagram of a transmitting apparatus according to an embodiment of the present invention; FIG.
图9为本发明实施例的接收装置结构示意图。 FIG. 9 is a schematic structural diagram of a receiving apparatus according to an embodiment of the present invention.
本发明目的的实现、功能特点及优异效果,下面将结合具体实施例以及附图做进一步的说明。The implementation, functional features and excellent effects of the object of the present invention will be further described below in conjunction with the specific embodiments and the accompanying drawings.
本发明的较佳实施方式Preferred embodiment of the invention
下面结合附图和具体实施例对本发明所述技术方案作进一步的详细描述,以使本领域的技术人员可以更好的理解本发明并能予以实施,但所举实施例不作为对本发明的限定。The technical solutions of the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments to enable those skilled in the art to understand the invention. .
如图1所示,本发明实施例提供的文件传输方法,用于在被划分为不同子网的传输网络上实现文件传输,所述传输网络中的传输设备支持telnet/ssh协议,其包括:As shown in FIG. 1 , a file transmission method is provided for implementing file transmission on a transmission network divided into different subnets. The transmission device in the transmission network supports the telnet/ssh protocol, and includes:
S10、将文件传输获取请求编码成可以被telnet/ssh传输的第一请求信息并发送;S10. Encode the file transmission acquisition request into the first request information that can be transmitted by telnet/ssh and send the information.
S20、在对端对所述第一请求信息执行第一解码、及依据第一解码执行结果将获取的目标文件编码成可以被telnet/ssh传输的编码文件并返回后,对获取的编码文件执行第二解码,以还原出目标文件。可选地,在对端对所述第一请求信息执行第一解码后,依据第一解码执行结果将获取的目标文件编码成可以被telnet/ssh传输的编码文件并执行压缩处理,,之后再发送至对端。其中,在某一种具体实施方式中,发送方在文件传输获取请求中携带你了请求文件压缩的命令,该命令在接收方对文件传输获取请求解码后被确认并执行,接收方依据解码执行结果对编码文件执行压缩处理,或者在其他实施方式中,接收方已经预先定制了文件传输的处理方式,如对于文件发送前先行执行文件压缩处理,此举可大举提高文件传输的效率,尤其对于文本文件而言更是如此。S20: Perform a first decoding on the first request information at the opposite end, and encode the obtained target file into an encoded file that can be transmitted by telnet/ssh according to the first decoding execution result, and return, and execute the acquired encoded file. The second decoding is to restore the target file. Optionally, after the first decoding is performed on the first request information by the peer end, the obtained target file is encoded into an encoded file that can be transmitted by telnet/ssh according to the first decoding execution result, and compression processing is performed, and then Send to the peer. In a specific implementation manner, the sender carries the command for compressing the requested file in the file transmission acquisition request, and the command is confirmed and executed after the receiver decodes the file transmission acquisition request, and the receiver performs the decoding according to the decoding. As a result, the encoding process is performed on the encoded file, or in other embodiments, the receiving party has pre-customized the processing mode of the file transfer, such as performing file compression processing before the file is sent, which can greatly improve the efficiency of file transfer, especially for This is especially true for text files.
在使用telnet/ssh协议登录远端设备时,请求登陆信息在传输网络中的中间传输设备上可以经过多次跳转,如图2以及图3所示,例如,通过telnet/ssh连接设备1,在成功登录设备1后,通过telnet/ssh登录设备2,在成功登录设备2后,通过telnet/ssh登录设备3,以此类推,最终登录到目标设备。When logging in to the remote device using the telnet/ssh protocol, the request login information can be redirected multiple times on the intermediate transmission device in the transmission network, as shown in Figure 2 and Figure 3. For example, connect device 1 through telnet/ssh. After logging in to device 1, log in to device 2 through telnet/ssh. After logging in to device 2, log in to device 3 through telnet/ssh, and so on, and finally log in to the target device.
通常地,在本发明实施例中,对于发送方发送的各种请求命令以及接收 方发送的文件信息,其经telnet/ssh编码器编码之后,如图6所示,其编码后的格式中包括:传输开始标记、数据头行、数据体行、传输结束标记及部分。由于telnet/ssh传输文件的性质,在本实施例中,一般传输行不超过120个字符,否则在telnet/ssh传输过程中可能由于超过单行内容长度限制而出错。Generally, in the embodiment of the present invention, various request commands and receptions sent by the sender are received. After the file information is transmitted by the telnet/ssh encoder, as shown in FIG. 6, the encoded format includes: a transmission start flag, a data header line, a data body line, a transmission end flag, and a part. Due to the nature of the telnet/ssh transmission file, in this embodiment, the general transmission line does not exceed 120 characters, otherwise the telnet/ssh transmission process may be in error due to exceeding the single line content length limitation.
可选地,在执行所有步骤之前,所述文件传输方法还包括:Optionally, before performing all the steps, the file transmission method further includes:
S01、将文件列表获取请求编码成可以被telnet/ssh传输的第二请求信息并发送;S01. Encode the file list obtaining request into a second request information that can be transmitted by telnet/ssh and send the information.
S02、在对端对所述第二请求信息执行第三解码、及依据第三解码执行结果将获取的目标文件列表编码成可以被telnet/ssh传输的文件列表文件并返回后,对获取的文件列表文件执行第四解码,并显示所述文件列表。S02: Perform third decoding on the second request information at the opposite end, and encode the obtained target file list into a file list file that can be transmitted by telnet/ssh according to the third decoding execution result, and return the obtained file. The list file performs a fourth decoding and displays the list of files.
例如,发送方在发送文件列表获取请求时,先将文件列表获取请求经telnet/ssh编码器编码为可以被telnet/ssh传输的字符类型,编码完成后,发送到对端(接收方)的telnet/ssh解码器,接收方将接收到的文件列表获取请求命令解释执行,如获取相对应的文件列表,并将解释执行结果通过telnet/ssh编码器执行编码,再发送给发送方的telnet/ssh解码器,在执行解码之后,完成文件列表的显示。这样发送方就能通过文件列表知道相应的文件路径以获取对应的文件。For example, when sending a file list acquisition request, the sender first encodes the file list acquisition request into a character type that can be transmitted by telnet/ssh through the telnet/ssh encoder, and after the encoding is completed, sends the telnet to the opposite end (receiver). The /ssh decoder, the receiver will interpret and execute the received file list request request command, such as obtaining a corresponding file list, and interpreting the execution result through the telnet/ssh encoder to perform encoding, and then sending the telnet/ssh to the sender. The decoder completes the display of the file list after performing the decoding. In this way, the sender can know the corresponding file path through the file list to obtain the corresponding file.
如图4以及图5所示,在发送方发送文件列表获取请求并在发送方本地显示相对应的文件列表后,发送方再次发送文件传输获取请求。文件获取请求经过telnet/ssh编码器编码为可以被telnet/ssh传输的字符类型,发送到接收方的telnet/ssh解码器,其将接收到的命令予以解码并执行,接收方将解释执行结果通过其telnet/ssh编码器进行编码之后返回到发送方。As shown in FIG. 4 and FIG. 5, after the sender transmits the file list acquisition request and displays the corresponding file list locally on the sender, the sender transmits the file transmission acquisition request again. The file acquisition request is encoded by the telnet/ssh encoder into a character type that can be transmitted by telnet/ssh, and sent to the receiver's telnet/ssh decoder, which decodes and executes the received command, and the receiver will interpret the execution result. Its telnet/ssh encoder is encoded and returned to the sender.
如图7所示,发送方在获取到接收方发送的编码文件之后,对从接收方获取的编码文件执行第二解码,以还原出目标文件。As shown in FIG. 7, after acquiring the encoded file sent by the receiver, the sender performs second decoding on the encoded file acquired from the receiver to restore the target file.
除此之外,在发送方需要将文件上传时,其与下载文件的过程基本相同。发送方发送文件传输获取请求,文件传输获取请求经过telnet/ssh编码器编码为可以被telnet/ssh传输的字符类型后,发送到接收方的telnet/ssh解码器,其将命令解码后,完成文件的传输请求。 In addition, when the sender needs to upload the file, it is basically the same as the process of downloading the file. The sender sends a file transfer request, and the file transfer request is encoded by the telnet/ssh encoder into a character type that can be transmitted by telnet/ssh, and then sent to the receiver's telnet/ssh decoder, which decodes the command and completes the file. Transfer request.
在另一种实施例中,本发明提供的一种文件传输方法,用于在被划分为不同子网的传输网络上实现文件传输,所述传输网络中的传输设备支持telnet/ssh协议,包括:In another embodiment, the present invention provides a file transmission method for implementing file transmission on a transmission network divided into different subnets, and the transmission device in the transmission network supports the telnet/ssh protocol, including :
S30、获取已被编码成可以被telnet/ssh传输的文件传输获取请求;S30. Acquire a file transmission acquisition request that has been encoded into a telnet/ssh transmission;
S40、对所述文件传输获取请求执行第五解码,依据第五解码执行结果获取目标文件,并将所述目标文件编码成可以被telnet/ssh传输的编码文件并发送至对端,以使得对端对所述编码文件执行第六解码后,还原出相应的目标文件。S40. Perform a fifth decoding on the file transmission acquisition request, obtain an object file according to the fifth decoding execution result, and encode the target file into an encoded file that can be transmitted by telnet/ssh and send the encoded file to the peer end, so that After performing the sixth decoding on the encoded file, the corresponding target file is restored.
在所述步骤S40中,可选地,在依据第五解码执行结果对获取的目标文件执行编码后,判断编码文件的大小是否超过预设阈值,且在判断得出超过预设阈值时,对所述编码文件执行压缩处理。In the step S40, optionally, after performing encoding on the acquired target file according to the fifth decoding execution result, determining whether the size of the encoded file exceeds a preset threshold, and when determining that the preset threshold is exceeded, The encoded file performs a compression process.
可选地,在执行所有步骤之前,所述文件传输方法还包括:Optionally, before performing all the steps, the file transmission method further includes:
S03、获取已被编码成可以被telnet/ssh传输的文件列表获取请求;S03. Acquire a file list acquisition request that has been encoded into a telnet/ssh transmission;
S04、对所述文件列表获取请求执行第七解码,依据第七解码执行结果获取目标文件列表,并将所述目标文件列表编码成可以被telnet/ssh传输的文件列表文件并发送至对端,以使得对端对所述文件列表文件执行第六解码后,显示所述文件列表。S04. Perform a seventh decoding on the file list obtaining request, obtain a target file list according to the seventh decoding execution result, and encode the target file list into a file list file that can be transmitted by telnet/ssh and send the file list file to the peer end. After the peer performs the sixth decoding on the file list file, the file list is displayed.
相应地,本发明实施例还提供了一种发送装置,如图8所示,用于实现在被划分为不同子网的传输网络上的文件传输,所述传输网络中的传输设备支持telnet/ssh协议,包括:Correspondingly, the embodiment of the present invention further provides a sending apparatus, as shown in FIG. 8, for implementing file transmission on a transmission network divided into different subnets, and the transmission equipment in the transmission network supports telnet/ The ssh protocol includes:
第一编码单元801,设置成:将文件传输获取请求编码成可以被telnet/ssh传输的第一请求信息并发送;The first encoding unit 801 is configured to: encode the file transmission acquisition request into the first request information that can be transmitted by telnet/ssh and send the same;
第一解码单元802,设置成:在接收方对所述第一请求信息执行第一解码、及依据第一解码执行结果将获取的目标文件编码成可以被telnet/ssh传输的编码文件并返回后,对获取的编码文件执行第二解码,以还原出目标文件。The first decoding unit 802 is configured to: after the receiver performs the first decoding on the first request information, and encodes the acquired target file into an encoded file that can be transmitted by telnet/ssh according to the first decoding execution result, and returns Performing a second decoding on the obtained encoded file to restore the target file.
在使用telnet/ssh协议登录远端设备时,请求登陆信息在传输网络中的中间传输设备上可以经过多次跳转,如图2以及图3所示,例如,发送装置通过telnet/ssh连接设备1,在成功登录设备1后,通过telnet/ssh登录设备2, 在成功登录设备2后,通过telnet/ssh登录设备3,以此类推,最终登录到目标设备。When logging in to the remote device using the telnet/ssh protocol, the request login information can be redirected multiple times on the intermediate transmission device in the transmission network, as shown in Figure 2 and Figure 3. For example, the sending device connects to the device through telnet/ssh. 1. After successfully logging in to device 1, log in to device 2 through telnet/ssh. After successfully logging in to device 2, log in to device 3 through telnet/ssh, and so on, and finally log in to the target device.
通常地,在本发明实施例中,对于发送装置发送的各种请求命令以及接收方发送的文件信息,其经telnet/ssh编码器编码之后,如图6所示,其编码后的格式中包括:传输开始标记、数据头行、数据体行、传输结束标记及部分。由于telnet/ssh传输文件的性质,在本实施例中,一般传输行不超过120个字符,否则在telnet/ssh传输过程中可能由于超过单行内容长度限制而出错。Generally, in the embodiment of the present invention, after the various request commands sent by the transmitting device and the file information sent by the receiver are encoded by the telnet/ssh encoder, as shown in FIG. 6, the encoded format includes : Transfer start tag, data header line, data body line, transfer end tag, and part. Due to the nature of the telnet/ssh transmission file, in this embodiment, the general transmission line does not exceed 120 characters, otherwise the telnet/ssh transmission process may be in error due to exceeding the single line content length limitation.
可选地,所述第一编码单元801还设置成:将文件列表获取请求编码成可以被telnet/ssh传输的第二请求信息并发送;Optionally, the first encoding unit 801 is further configured to: encode the file list obtaining request into second request information that can be transmitted by telnet/ssh and send the second request information;
在接收方对所述第二请求信息执行第三解码、及依据第三解码执行结果将获取的目标文件列表编码成可以被telnet/ssh传输的文件列表文件并返回后,所述第一解码单元802还设置成:对获取的文件列表文件执行第四解码,以显示所述文件列表。After the third decoding of the second request information is performed by the receiver, and the target file list acquired according to the third decoding execution result is encoded into a file list file that can be transmitted by telnet/ssh and returned, the first decoding unit The 802 is further configured to perform a fourth decoding on the obtained file list file to display the file list.
例如,发送装置在发送文件列表获取请求时,先将文件列表获取请求经第一编码单元(telnet/ssh编码器)编码为可以被telnet/ssh传输的字符类型,编码完成后,发送到对端(接收方)的telnet/ssh解码器,接收方将接收到的文件列表获取请求命令解释执行,如获取相对应的文件列表,并将解释执行结果通过telnet/ssh编码器执行编码,再发送给发送装置的第一解码单元(telnet/ssh解码器),在执行解码之后,完成文件列表的显示。For example, when the sending device sends the file list obtaining request, the file list obtaining request is first encoded by the first encoding unit (telnet/ssh encoder) into a character type that can be transmitted by telnet/ssh, and after the encoding is completed, the sending is sent to the opposite end. (receiver) telnet/ssh decoder, the receiver will interpret and execute the received file list acquisition request command, such as obtaining a corresponding file list, and interpreting the execution result through the telnet/ssh encoder to perform encoding, and then sending to The first decoding unit (telnet/ssh decoder) of the transmitting device completes the display of the file list after performing the decoding.
如图4以及图5所示,在发送装置发送文件列表获取请求并在发送方本地显示相对应的文件列表后,发送装置再次发送文件传输获取请求。文件获取请求经过第一编码单元编码为可以被telnet/ssh传输的字符类型,发送到接收方的telnet/ssh解码器,其将接收到的命令予以解码并执行,接收方将解释执行结果通过其telnet/ssh编码器进行编码之后返回到发送方。As shown in FIGS. 4 and 5, after the transmitting device transmits the file list acquisition request and displays the corresponding file list locally on the sender, the transmitting device transmits the file transfer acquisition request again. The file acquisition request is encoded by the first coding unit into a character type that can be transmitted by telnet/ssh, and sent to the telnet/ssh decoder of the receiver, which decodes and executes the received command, and the receiver will interpret the execution result through it. The telnet/ssh encoder is encoded and returned to the sender.
如图7所示,发送装置的第一解码单元802在获取到接收方发送的编码文件之后,对从接收方获取的编码文件执行第二解码,以还原出目标文件。As shown in FIG. 7, after acquiring the encoded file transmitted by the receiver, the first decoding unit 802 of the transmitting device performs second decoding on the encoded file acquired from the receiving side to restore the target file.
除此之外,在发送装置要将文件上传时,其与下载文件的过程基本相同。发送装置发送文件传输获取请求,文件传输获取请求经过第一编码单元801 编码为可以被telnet/ssh传输的字符类型后,发送到接收方的telnet/ssh解码器,其将命令解码后,完成文件的传输请求。In addition, when the transmitting device wants to upload a file, it is basically the same as the process of downloading the file. The sending device sends a file transfer obtaining request, and the file transfer obtaining request passes through the first encoding unit 801. After being encoded as a character type that can be transmitted by telnet/ssh, it is sent to the receiver's telnet/ssh decoder, which decodes the command and completes the file transfer request.
相对应的,本发明实施例还提供了一种接收装置,如图9所示,用于实现在被划分为不同子网的传输网络上的文件传输,所述传输网络中的传输设备支持telnet/ssh协议,包括:Correspondingly, the embodiment of the present invention further provides a receiving apparatus, as shown in FIG. 9, for implementing file transmission on a transmission network divided into different subnets, and the transmission equipment in the transmission network supports telnet /ssh protocol, including:
第二解码单元901,设置成:获取已被编码成可以被telnet/ssh传输的文件传输获取请求,并对所述文件传输获取请求执行第五解码;The second decoding unit 901 is configured to: obtain a file transmission acquisition request that has been encoded into a telnet/ssh transmission, and perform a fifth decoding on the file transmission acquisition request;
第二编码单元902,设置成:依据第五解码执行结果获取目标文件,并将所述目标文件编码成可以被telnet/ssh传输的编码文件并发送至发送方,以使得发送方对所述编码文件执行第六解码后,还原出相应的目标文件。The second encoding unit 902 is configured to: acquire an object file according to a fifth decoding execution result, and encode the target file into an encoded file that can be transmitted by telnet/ssh and send the encoded file to the sender, so that the sender pairs the encoding After the file performs the sixth decoding, the corresponding target file is restored.
可选地,所述的接收装置还包括:Optionally, the receiving device further includes:
判断单元903,设置成:在第二编码单元依据第五解码执行结果对获取的目标文件执行编码后,判断第一解码执行结果中是否包含文件压缩命令;The determining unit 903 is configured to: after the second encoding unit performs encoding on the acquired target file according to the fifth decoding execution result, determine whether the first decoding execution result includes a file compression command;
压缩单元904,设置成:依据所述文件压缩命令对编码文件并执行压缩处理。The compressing unit 904 is configured to: perform encoding processing on the encoded file according to the file compression command.
可选地,所述第二解码单元901还设置成:获取已被编码成可以被telnet/ssh传输的文件列表获取请求,并对所述文件列表获取请求执行第七解码;Optionally, the second decoding unit 901 is further configured to: obtain a file list acquisition request that has been encoded to be telnet/ssh, and perform a seventh decoding on the file list acquisition request;
所述第二编码单元902还设置成:依据第七解码执行结果获取目标文件列表,并将所述目标文件列表编码成可以被telnet/ssh传输的文件列表文件并发送至发送方,以使得发送方对所述文件列表文件执行第六解码后,显示所述文件列表。The second encoding unit 902 is further configured to: obtain a target file list according to the seventh decoding execution result, and encode the target file list into a file list file that can be transmitted by telnet/ssh and send the file to the sender, so as to send After performing the sixth decoding on the file list file, the file list is displayed.
本发明实施例提供了一种文件传输系统,用于实现在被划分为不同子网的传输网络上的文件传输,所述传输网络中的传输设备支持telnet/ssh协议,包括:The embodiment of the invention provides a file transmission system for implementing file transmission on a transmission network divided into different subnets, and the transmission device in the transmission network supports the telnet/ssh protocol, including:
发送方,设置成:将文件传输获取请求编码成可以被telnet/ssh传输的第一请求信息并发送;还对从接收方获取的编码文件执行第二解码,以还原出目标文件; The sender is configured to: encode the file transfer acquisition request into the first request information that can be transmitted by telnet/ssh and send the second request, and perform second decoding on the encoded file obtained from the receiver to restore the target file;
接收方,设置成:对所述第一请求信息执行第一解码,及依据第一解码执行结果将获取的目标文件编码成可以被telnet/ssh传输的编码文件并返回。The receiving party is configured to: perform first decoding on the first request information, and encode the acquired target file into an encoded file that can be transmitted by telnet/ssh according to the first decoding execution result and return.
所述接收方还设置成:依据第一解码执行结果对获取的目标文件执行编码后,判断编码文件的大小是否超过预设阈值,且在判断得出超过预设阈值时,对所述编码文件执行压缩处理。The receiving party is further configured to: after performing the encoding on the acquired target file according to the first decoding execution result, determining whether the size of the encoded file exceeds a preset threshold, and when determining that the preset threshold is exceeded, the encoding file is Perform compression processing.
所述发送方还设置成:将文件列表获取请求编码成可以被telnet/ssh传输的第二请求信息并发送;还对从接收方获取的文件列表文件执行第四解码,并显示所述文件列表;The sender is further configured to: encode the file list acquisition request into the second request information that can be transmitted by telnet/ssh and send; further perform fourth decoding on the file list file acquired from the receiver, and display the file list ;
所述接收方还设置成:对所述第二请求信息执行第三解码,及依据第三解码执行结果将获取的目标文件列表编码成可以被telnet/ssh传输的文件列表文件并返回。The receiving side is further configured to: perform third decoding on the second request information, and encode the obtained target file list into a file list file that can be transmitted by telnet/ssh according to the third decoding execution result and return.
以上所述仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above is only the preferred embodiment of the present invention, and is not intended to limit the scope of the invention, and the equivalent structure or equivalent process transformations made by the description of the invention and the drawings are directly or indirectly applied to other related The technical field is equally included in the scope of patent protection of the present invention.
工业实用性Industrial applicability
采用本发明技术方案可以实现a内网与b内网的通讯、a内网与b外网的通讯,以及a外网与b外网的通讯。在具体实施时,传输的中间设备只要支持标准的telnet/ssh协议即可。用于传输的发送和接收设备通过具备编解码功能,通过在发送请求以及获取信息时,通过对其进行支持telnet/ssh协议的编解码处理,达到了跨子网实现文件传输的目的,解决了需要到设备现场去拷贝文件的问题,提高了工作效率。在某些其他实施例中,采用本发明技术方案不仅仅可以传递文件,同样可以传递其他数据流,从而实现任意数据通过telnet协议进行传输的可能性。因此本发明具有很强的工业实用性。 The technical solution of the invention can realize the communication between the intranet and the b intranet, the communication between the intranet and the b outer network, and the communication between the external network and the b external network. In the specific implementation, the intermediate device of the transmission only needs to support the standard telnet/ssh protocol. The transmitting and receiving devices for transmission have the purpose of realizing file transmission across subnets by transmitting code and decoding functions by transmitting and decoding the telnet/ssh protocol. The problem of copying files to the equipment site is needed, which improves work efficiency. In some other embodiments, the technical solution of the present invention can not only transfer files, but also can transfer other data streams, thereby realizing the possibility of any data being transmitted through the telnet protocol. Therefore, the present invention has strong industrial applicability.

Claims (18)

  1. 一种文件传输方法,用于在被划分为不同子网的传输网络上实现文件传输,所述传输网络中的传输设备支持telnet/ssh协议,该方法包括:A file transmission method for implementing file transmission on a transmission network divided into different subnets, wherein the transmission device in the transmission network supports the telnet/ssh protocol, and the method includes:
    本端将文件传输获取请求编码成可以被telnet/ssh传输的第一请求信息并发送给对端,所述文件传输获取请求中包括本端从文件列表中选取的目标文件的文件名和文件路径;The local end encodes the file transmission acquisition request into the first request information that can be transmitted by the telnet/ssh, and sends the first request information to the peer end, where the file transmission acquisition request includes the file name and the file path of the target file selected by the local end from the file list;
    在对端对所述第一请求信息执行第一解码,将获取的与第一解码执行结果相应的目标文件编码成可以被telnet/ssh传输的编码文件并将该编码文件返回给本端后,本端对接收到的编码文件执行第二解码,以还原出目标文件。Performing a first decoding on the first request information at the opposite end, encoding the obtained target file corresponding to the first decoding execution result into an encoded file that can be transmitted by telnet/ssh, and returning the encoded file to the local end, The local end performs a second decoding on the received encoded file to restore the target file.
  2. 如权利要求1所述的文件传输方法,其中,所述编码文件是对所述可以被telnet/ssh传输的编码文件进行压缩处理后得到的。The file transfer method according to claim 1, wherein said encoded file is obtained by compressing said encoded file that can be transmitted by telnet/ssh.
  3. 如权利要求1所述的文件传输方法,其中,在执行所述将文件传输获取请求编码成可以被telnet/ssh传输的第一请求信息并发送给对端的步骤之前,还包括:The file transmission method according to claim 1, wherein before the step of encoding the file transmission acquisition request into the first request information that can be transmitted by the telnet/ssh and transmitting the information to the peer end, the method further includes:
    将文件列表获取请求编码成可以被telnet/ssh传输的第二请求信息并发送给对端;Encoding the file list obtaining request into the second request information that can be transmitted by telnet/ssh and sending the request information to the peer end;
    在对端对所述第二请求信息执行第三解码,并将获取的与第三解码执行结果相应的目标文件列表编码成可以被telnet/ssh传输的文件列表文件并将该编码后的文件列表文件返回本端后,本端对接收到的文件列表文件执行第四解码,并显示所述文件列表。Performing third decoding on the second request information at the opposite end, and encoding the obtained target file list corresponding to the third decoding execution result into a file list file that can be transmitted by telnet/ssh and listing the encoded file. After the file returns to the local end, the local end performs fourth decoding on the received file list file, and displays the file list.
  4. 一种文件传输方法,用于在被划分为不同子网的传输网络上实现文件传输,所述传输网络中的传输设备支持telnet/ssh协议,该方法包括:A file transmission method for implementing file transmission on a transmission network divided into different subnets, wherein the transmission device in the transmission network supports the telnet/ssh protocol, and the method includes:
    从对端获取编码后的可以被telnet/ssh传输的文件传输获取请求,所述文件传输获取请求中包括对端从文件列表中选取的目标文件的文件名和文件路径;Obtaining, by the peer end, the encoded file transfer request that can be transmitted by the telnet/ssh, where the file transfer request includes a file name and a file path of the target file selected by the peer from the file list;
    对所述文件传输获取请求执行第一解码,得到第一解码执行结果,所述第一解码执行结果中包括要获取的目标文件的文件名和文件路径; Performing a first decoding on the file transmission acquisition request to obtain a first decoding execution result, where the first decoding execution result includes a file name and a file path of the target file to be acquired;
    本端依据所述第一解码执行结果获取目标文件后,将所述目标文件编码成可以被telnet/ssh传输的编码文件,并将该编码文件发送至对端,以使得对端对所述编码文件执行第二解码后,还原出所述目标文件。After acquiring the target file according to the first decoding execution result, the local end encodes the target file into an encoded file that can be transmitted by telnet/ssh, and sends the encoded file to the opposite end, so that the opposite end encodes the encoded file. After the file performs the second decoding, the target file is restored.
  5. 如权利要求4所述的文件传输方法,其中,所述将所述目标文件编码成可以被telnet/ssh传输的编码文件的步骤之后,还包括:The file transfer method according to claim 4, wherein after the step of encoding the object file into an encoded file that can be transmitted by telnet/ssh, the method further comprises:
    判断所述编码文件的大小是否超过预设阈值,且在判断得出所述编码文件的大小超过预设阈值时,对所述编码文件执行压缩处理。Determining whether the size of the encoded file exceeds a preset threshold, and performing a compression process on the encoded file when determining that the size of the encoded file exceeds a preset threshold.
  6. 如权利要求4所述的文件传输方法,其中,所述从对端获取编码后的可以被telnet/ssh传输的文件传输获取请求的步骤之前,还包括:The file transfer method according to claim 4, wherein the step of obtaining the encoded file transfer request that can be transmitted by the telnet/ssh from the peer end further comprises:
    获取编码后的可以被telnet/ssh传输的文件列表获取请求;Obtaining a coded list of files that can be transmitted by telnet/ssh to obtain a request;
    对所述文件列表获取请求执行第三解码,依据第三解码执行结果获取目标文件列表,并将所述目标文件列表编码成可以被telnet/ssh传输的文件列表文件并发送至对端,以使得对端对所述文件列表文件执行第四解码后,显示所述文件列表。Performing a third decoding on the file list obtaining request, acquiring a target file list according to the third decoding execution result, and encoding the target file list into a file list file that can be transmitted by telnet/ssh and transmitting the file list file to the opposite end, so that After the peer performs the fourth decoding on the file list file, the file list is displayed.
  7. 一种发送装置,用于实现在被划分为不同子网的传输网络上的文件传输,所述传输网络中的传输设备支持telnet/ssh协议,包括第一编码单元和第一解码单元,其中:A transmitting device, configured to implement file transmission on a transmission network divided into different subnets, wherein the transmission device in the transmission network supports a telnet/ssh protocol, including a first coding unit and a first decoding unit, where:
    所述第一编码单元设置成:将文件传输获取请求编码成可以被telnet/ssh传输的第一请求信息并发送,所述文件传输获取请求中包括从文件列表中选取的目标文件的文件名和文件路径;The first encoding unit is configured to: encode a file transfer obtaining request into a first request information that can be transmitted by telnet/ssh, and the file transfer obtaining request includes a file name and a file of the target file selected from the file list. path;
    所述第一解码单元设置成:在接收方对所述第一请求信息执行第一解码,及将获取的与第一解码执行结果相应的目标文件编码成可以被telnet/ssh传输的编码文件并将该编码文件返回给所述发送装置后,对接收到的编码文件执行第二解码,以还原出目标文件。The first decoding unit is configured to: perform a first decoding on the first request information on the receiving side, and encode the acquired target file corresponding to the first decoding execution result into an encoded file that can be transmitted by telnet/ssh and After returning the encoded file to the transmitting device, performing second decoding on the received encoded file to restore the target file.
  8. 如权利要求7所述的发送装置,其中,The transmitting device according to claim 7, wherein
    所述第一编码单元还设置成:将文件列表获取请求编码成可以被 telnet/ssh传输的第二请求信息并发送;The first encoding unit is further configured to: encode the file list acquisition request into a The second request information transmitted by telnet/ssh is sent;
    所述第一解码单元还设置成:在接收方对所述第二请求信息执行第三解码、及将获取的与第三解码执行结果相应的目标文件列表编码成可以被telnet/ssh传输的文件列表文件并将该编码后的文件列表文件返回所述发送装置后,对获取的文件列表文件执行第四解码,以显示所述文件列表。The first decoding unit is further configured to: perform a third decoding on the second request information by the receiver, and encode the obtained target file list corresponding to the third decoding execution result into a file that can be transmitted by telnet/ssh After the list file returns the encoded file list file to the transmitting device, a fourth decoding is performed on the obtained file list file to display the file list.
  9. 一种接收装置,用于实现在被划分为不同子网的传输网络上的文件传输,所述传输网络中的传输设备支持telnet/ssh协议,其中,包括第二解码单元和第二编码单元,其中:a receiving device, configured to implement file transmission on a transmission network divided into different subnets, wherein the transmission device in the transmission network supports a telnet/ssh protocol, where the second decoding unit and the second coding unit are included, among them:
    所述第二解码单元设置成:获取已被编码成可以被telnet/ssh传输的文件传输获取请求,并对所述文件传输获取请求执行第一解码,得到第一解码执行结果;其中,所述文件传输获取请求中包括对端从文件列表中选取的目标文件的文件名和文件路径,所述第一解码执行结果中包括要获取的目标文件的文件名和文件路径;The second decoding unit is configured to: acquire a file transmission acquisition request that has been encoded to be telnet/ssh, and perform a first decoding on the file transmission acquisition request to obtain a first decoding execution result; The file transfer request includes a file name and a file path of the target file selected by the peer from the file list, where the first decoding execution result includes a file name and a file path of the target file to be acquired;
    所述第二编码单元设置成:依据第一解码执行结果获取目标文件,并将所述目标文件编码成可以被telnet/ssh传输的编码文件,并将该编码文件发送至发送方,以使得发送方对所述编码文件执行第二解码后,还原出目标文件。The second encoding unit is configured to: acquire an object file according to a first decoding execution result, and encode the target file into an encoded file that can be transmitted by telnet/ssh, and send the encoded file to a sender, so as to send After performing the second decoding on the encoded file, the target file is restored.
  10. 如权利要求9所述的接收装置,该接收装置还包括判断单元和压缩单元,其中:The receiving device according to claim 9, further comprising a judging unit and a compressing unit, wherein:
    所述判断单元设置成:在第二编码单元将所述目标文件编码成可以被telnet/ssh传输的编码文件后,判断编码文件的大小是否超过预设阈值,且在判断得出超过预设阈值时,向所述压缩单元发送文件压缩命令;The determining unit is configured to: after the second encoding unit encodes the target file into an encoded file that can be transmitted by telnet/ssh, determine whether the size of the encoded file exceeds a preset threshold, and determines that the preset threshold is exceeded. Sending a file compression command to the compression unit;
    所述压缩单元设置成:依据所述文件压缩命令对所述编码文件执行压缩处理。The compression unit is configured to perform a compression process on the encoded file according to the file compression command.
  11. 如权利要求9所述的接收装置,其中,The receiving device according to claim 9, wherein
    所述第二解码单元还设置成:获取已被编码成可以被telnet/ssh传输的文件列表获取请求,并对所述文件列表获取请求执行第三解码;The second decoding unit is further configured to: obtain a file list acquisition request that has been encoded into a telnet/ssh transmission, and perform a third decoding on the file list acquisition request;
    所述第二编码单元还设置成:依据第三解码执行结果获取目标文件列表, 并将所述目标文件列表编码成可以被telnet/ssh传输的文件列表文件并将编码后的文件列表文件发送至发送方,以使得发送方对所述文件列表文件执行第四解码后,显示所述文件列表。The second coding unit is further configured to: obtain a target file list according to the third decoding execution result, And encoding the target file list into a file list file that can be transmitted by telnet/ssh and sending the encoded file list file to the sender, so that the sender performs the fourth decoding on the file list file, and displays the A list of files.
  12. 一种文件传输系统,用于实现在被划分为不同子网的传输网络上的文件传输,所述传输网络中的传输设备支持telnet/ssh协议,包括发送方和接收方,其中:A file transmission system for implementing file transmission on a transmission network divided into different subnets, the transmission device in the transmission network supporting the telnet/ssh protocol, including a sender and a receiver, wherein:
    所述发送方设置成:将文件传输获取请求编码成可以被telnet/ssh传输的第一请求信息并发送,所述文件传输获取请求中包括所述发送方从文件列表中选取的目标文件的文件名和文件路径;以及对从接收方获取的编码文件执行第二解码,以还原出目标文件;The sender is configured to: encode a file transmission acquisition request into a first request information that can be transmitted by telnet/ssh, and the file transmission acquisition request includes a file of the target file selected by the sender from the file list. Name and file path; and performing a second decoding on the encoded file obtained from the recipient to restore the target file;
    所述接收方设置成:对所述第一请求信息执行第一解码,得到第一解码执行结果,所述第一解码执行结果中包括要获取的目标文件的文件名和文件路径;还获取与所述第一解码执行结果相应的目标文件,并将获取的目标文件编码成可以被telnet/ssh传输的编码文件并将该编码文件返回给所述发送方。The receiving party is configured to: perform a first decoding on the first request information, and obtain a first decoding execution result, where the first decoding execution result includes a file name and a file path of the target file to be acquired; The target file corresponding to the first decoding execution result is encoded, and the acquired object file is encoded into an encoded file that can be transmitted by telnet/ssh and returned to the sender.
  13. 如权利要求12所述的文件传输系统,其中,所述接收方还设置成:依据第一解码执行结果对获取的目标文件执行编码后,判断编码文件的大小是否超过预设阈值,且在判断得出超过预设阈值时,对所述编码文件执行压缩处理。The file transmission system according to claim 12, wherein the receiving party is further configured to: after performing encoding on the acquired target file according to the first decoding execution result, determining whether the size of the encoded file exceeds a preset threshold, and determining When the predetermined threshold is exceeded, a compression process is performed on the encoded file.
  14. 如权利要求12所述的文件传输系统,其中,A file transmission system according to claim 12, wherein
    所述发送方还设置成:将文件列表获取请求编码成可以被telnet/ssh传输的第二请求信息并发送;还对从接收方获取的文件列表文件执行第四解码,并显示所述文件列表;The sender is further configured to: encode the file list acquisition request into the second request information that can be transmitted by telnet/ssh and send; further perform fourth decoding on the file list file acquired from the receiver, and display the file list ;
    所述接收方还设置成:对所述第二请求信息执行第三解码,得到第三解码执行结果,获取与所述第三解码执行结果相应的目标文件,将获取的目标文件列表编码成可以被telnet/ssh传输的文件列表文件并将编码后的文件列表文件返回给所述发送方。 The receiving side is further configured to: perform third decoding on the second request information, obtain a third decoding execution result, acquire an object file corresponding to the third decoding execution result, and encode the obtained target file list into a A file list file transmitted by telnet/ssh and returning the encoded file list file to the sender.
  15. 一种计算机程序,包括程序指令,当该程序指令被发送方执行时,使得该发送方可执行权利要求1-3中任一项所述的文件传输方法。A computer program comprising program instructions that, when executed by a sender, cause the sender to perform the file transfer method of any of claims 1-3.
  16. 一种载有权利要求15所述计算机程序的载体。A carrier carrying the computer program of claim 15.
  17. 一种计算机程序,包括程序指令,当该程序指令被接收方执行时,使得该接收方可执行权利要求4-6中任一项所述的文件传输方法。A computer program comprising program instructions that, when executed by a recipient, cause the recipient to perform the file transfer method of any of claims 4-6.
  18. 一种载有权利要求17所述计算机程序的载体。 A carrier carrying the computer program of claim 17.
PCT/CN2014/089098 2014-07-25 2014-10-21 File transmission method, device and system WO2015117393A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410361455.6 2014-07-25
CN201410361455.6A CN105306512B (en) 2014-07-25 2014-07-25 Document transmission method, apparatus and system

Publications (1)

Publication Number Publication Date
WO2015117393A1 true WO2015117393A1 (en) 2015-08-13

Family

ID=53777211

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/089098 WO2015117393A1 (en) 2014-07-25 2014-10-21 File transmission method, device and system

Country Status (2)

Country Link
CN (1) CN105306512B (en)
WO (1) WO2015117393A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1581869A (en) * 2003-08-01 2005-02-16 联想(北京)有限公司 Dual-status-based multi-party communication method
CN101072163A (en) * 2007-03-31 2007-11-14 腾讯科技(深圳)有限公司 Network file automatic dump method and system
CN101316226A (en) * 2007-06-01 2008-12-03 阿里巴巴集团控股有限公司 Method, device and system for acquiring resources
US20100082738A1 (en) * 2008-10-01 2010-04-01 Avermedia Technologies, Inc. Network Communication Method, Dispatch Server and Server
CN102082816A (en) * 2010-11-23 2011-06-01 中兴通讯股份有限公司 File transmission method and transmission engines and network elements

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101068163A (en) * 2007-06-29 2007-11-07 华为技术有限公司 Method, device and network management system for realizing document transmission
CN103841143A (en) * 2012-11-23 2014-06-04 华为技术有限公司 File sending method, receiving method, system and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1581869A (en) * 2003-08-01 2005-02-16 联想(北京)有限公司 Dual-status-based multi-party communication method
CN101072163A (en) * 2007-03-31 2007-11-14 腾讯科技(深圳)有限公司 Network file automatic dump method and system
CN101316226A (en) * 2007-06-01 2008-12-03 阿里巴巴集团控股有限公司 Method, device and system for acquiring resources
US20100082738A1 (en) * 2008-10-01 2010-04-01 Avermedia Technologies, Inc. Network Communication Method, Dispatch Server and Server
CN102082816A (en) * 2010-11-23 2011-06-01 中兴通讯股份有限公司 File transmission method and transmission engines and network elements

Also Published As

Publication number Publication date
CN105306512B (en) 2019-12-03
CN105306512A (en) 2016-02-03

Similar Documents

Publication Publication Date Title
US9037735B1 (en) Establishing websocket protocol extensions
CN104410619B (en) Instant communicating method and system
CN109845214B (en) Method, device and system for transmitting data
CN104144186A (en) Data uploading method and system based on Web browser in cloud computing environment
JP6906498B2 (en) Message transmission and reception methods and devices
JP2012502532A5 (en)
CN105337935A (en) Method of establishing long connection of client and server and apparatus thereof
CN104580097A (en) Data processing method, device and system
CN103108037A (en) Communication method, Web server and Web communication system
US20170272404A1 (en) Secure virtual machine
WO2016077835A1 (en) Adding a device to a protected network without data entry on the device
JP2010114885A5 (en)
JP2019041541A5 (en)
CN110740300B (en) Multimedia data transmission method, system, client and video monitoring equipment
CN105354505A (en) Image adaption method and electronic device
CN109639703A (en) A kind of radio station remote control method and system based on B/S framework
US20180083777A1 (en) Methods, systems, apparatuses, and devices for securing network communications using multiple security protocols
US20120284417A1 (en) Endpoint Discriminator in Network Transport Protocol Startup Packets
CN110581847A (en) Input foreknowledge system
CN110720205B (en) Electronic device communicating via a user service platform
US8493985B2 (en) Network message transformation device and methods thereof
WO2015117393A1 (en) File transmission method, device and system
KR101971995B1 (en) Method for decryping secure sockets layer for security
WO2021082945A1 (en) Remote management method and system, terminal device and server
JP2008219591A5 (en)

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14881897

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14881897

Country of ref document: EP

Kind code of ref document: A1