[go: up one dir, main page]

WO2018120397A1 - Reverse file uploading method and system - Google Patents

Reverse file uploading method and system Download PDF

Info

Publication number
WO2018120397A1
WO2018120397A1 PCT/CN2017/075003 CN2017075003W WO2018120397A1 WO 2018120397 A1 WO2018120397 A1 WO 2018120397A1 CN 2017075003 W CN2017075003 W CN 2017075003W WO 2018120397 A1 WO2018120397 A1 WO 2018120397A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
download
server
cache
target server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2017/075003
Other languages
French (fr)
Chinese (zh)
Inventor
洪培扬
邹宁勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wangsu Science and Technology Co Ltd
Original Assignee
Wangsu Science and Technology Co Ltd
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 Wangsu Science and Technology Co Ltd filed Critical Wangsu Science and Technology Co Ltd
Publication of WO2018120397A1 publication Critical patent/WO2018120397A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

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]

Definitions

  • the present invention relates to the field of computers, and in particular, to a file reverse upload method and system.
  • the main way to upload files is that users use their sending terminals to directly upload files to the target server.
  • the defects of this method include:
  • uploading is easily affected by the network environment, and in the case of poor network conditions, uploading often fails;
  • the current volume of files is getting bigger and bigger.
  • the size of files such as general movies, materials, and game clients are basically on the order of gigabytes (GB), or even larger, which leads to uploading. Slower;
  • an embodiment of the present invention provides a file reverse uploading method and system.
  • the technical solution is as follows:
  • a file reverse upload method includes the following steps:
  • the sending terminal sends the file information of the file to be sent to the target server;
  • the target server performs a download task allocation according to the file information, and generates a download task, and sends the download task to a cache server;
  • the cache server After receiving the download task, the cache server establishes a connection with the sending terminal, according to The download task downloads a corresponding file from the sending terminal, and sends the downloaded file to the target server to complete the upload.
  • the file information includes: a file size of the file to be sent and a uniform resource identifier of the file.
  • the step that the target server performs the download task allocation according to the file information, and generates a download task, and the step of sending the download task to the cache server includes:
  • the target server fragments the to-be-sent file according to the number of available cache servers and the file information, and generates the download task according to the fragment.
  • the target server sends the download task to the cache server.
  • the number of the cache servers is multiple, and the target server specifies to download different fragments to different cache servers.
  • the cache server establishes a connection with the sending terminal after receiving the download task, downloads a corresponding file from the sending terminal according to the download task, and sends the downloaded file to the target server.
  • the steps to complete the upload specifically include:
  • Each cache server establishes a connection with the sending terminal after receiving the respective download task
  • Each cache server sends a download request to the sending terminal according to a respective download task
  • Each cache server downloads a specified slice from the sending terminal according to a respective download task
  • the specified fragment downloaded to the target server is sent to the target server to complete the upload.
  • the method further includes the following steps:
  • the cache server If a connection interruption occurs during the downloading of the specified fragmentation by the cache server, the cache server re-establishes a connection with the transmitting terminal and continues to download the undownloaded portion of the specified fragment.
  • the method further includes the following steps:
  • the target server receives the specified fragment downloaded from each of the plurality of cache servers;
  • the method further includes the following steps:
  • the target server monitors an operating status of multiple cache servers
  • the target server sends the download task of the failed cache server to other available cache servers;
  • the other available cache servers re-download the specified shards according to the download task.
  • Another aspect is a file reverse uploading system, the system comprising a sending terminal, a target server, and a cache server, wherein
  • a sending terminal configured to send file information of the file to be sent to the target server
  • the target server is configured to perform a download task allocation according to the file information, and generate a download task, and send the download task to the cache server;
  • the cache server is configured to establish a connection with the sending terminal after receiving the download task, download a corresponding file from the sending terminal according to the download task, and send the downloaded file to the target server. To complete the upload.
  • the file information includes: a file size of the file to be sent and a uniform resource identifier of the file.
  • the target server includes an allocation module, where
  • the allocating module is configured to slice the to-be-sent file according to the number of available cache servers and the file information, generate the download task according to the fragment, and send the download task to the The cache server.
  • the allocation module is further configured to download different fragments to different cache servers.
  • the cache server includes:
  • connection module configured to establish a connection with the sending terminal after receiving a respective download task
  • a downloading module configured to send a download request to the sending terminal according to a respective download task, and download the specified fragment from the sending terminal;
  • the sending module is configured to send the downloaded specified fragment to the target server to complete the upload after the download is completed.
  • connection module is further configured to re-establish a connection with the sending terminal if a connection interruption occurs during downloading the specified fragmentation process by the downloading module;
  • the downloading module is further configured to continue downloading the undownloaded part of the specified fragment.
  • the target server further includes a combination module, where
  • the combination module is configured to form a plurality of specified fragments into a complete file when receiving the specified fragments downloaded from the plurality of cache servers.
  • the target server further includes a monitoring module, where the monitoring module is configured to monitor an operating status of the multiple cache servers;
  • the allocation module is further configured to send a download task of the failed cache server to another available cache server when any cache server fails;
  • the other available cache server is configured to re-download the specified fragment according to the download task.
  • the technical solution provided by the embodiment of the present invention has the beneficial effects that the reverse is implemented by changing the original uploading terminal to the method of downloading from the sending terminal by the cache server, and sending the downloaded file to the target server, thereby implementing the reverse Uploading, thereby avoiding the defect of directly uploading files to the target server in the prior art, and usually the network downloading speed is much faster than the uploading speed, and the device on the carrier side, such as the cache server, is less affected by downloading files from the sending terminal.
  • the limitation of the quotient therefore, the present invention greatly improves the speed and quality of file uploading in the network by means of this reverse uploading.
  • FIG. 1 is a flowchart of a method for uploading a file in reverse according to an embodiment of the present invention
  • step S2 is a flowchart of detailed sub-steps of step S2 shown in FIG. 1 according to an embodiment of the present invention
  • step S3 is a flowchart of detailed sub-steps of step S3 shown in FIG. 1 according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram showing the internal structure of a file reverse uploading system 10 according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram showing the internal structure of a file reverse uploading system 10 according to another embodiment of the present invention.
  • a file reverse upload method provided by the present invention will be described in detail below.
  • FIG. 1 is a flowchart of a method for uploading files in reverse according to an embodiment of the present invention.
  • the file reverse uploading method is applied to a file reverse uploading system, where the file reverse uploading system includes a sending terminal, a target server, and a cache server, and each user connects to the network through a respective sending terminal.
  • the sending terminal is mainly a device for the user side, for example, a user terminal device such as a mobile phone, a tablet computer, a palmtop computer, and the like.
  • the target server and the cache server are mainly devices on the network operator side, and the file transfer between the target server and the cache server does not restrict uploading.
  • step S1 the transmitting terminal transmits the file information of the file to be transmitted to the target server.
  • the file to be sent is stored in the sending terminal of the user, and is a file for uploading to the target server, where the file information includes: a file size of the file to be sent and a uniform resource identifier of the file.
  • Uniform Resource Identifier URI
  • step S2 the target server performs download task allocation according to the file information, and generates a download task, and sends the download task to the cache server.
  • the target server performs download task allocation according to the file information, and generates a download task
  • the step S2 of sending the download task to the cache server specifically includes two sub-steps of S21-S22, as shown in FIG. 2 Show.
  • step S2 shown in FIG. 1 a detailed sub-step flow of step S2 shown in FIG. 1 is shown in an embodiment of the present invention. Cheng Tu.
  • step S21 the target server performs fragmentation according to the number of available cache servers and file information to be sent, and then generates a download task according to the fragment.
  • the target server if there is only one cache server, the target server does not slice the file to be sent, but processes the file as a whole; if the number of cache servers includes multiple, it will be sent according to the number.
  • the file is fragmented. For example, if the number of cache servers includes five, the file to be sent is divided into five fragments. Of course, it can be divided into four fragments or six fragments, which is not limited herein.
  • the factor of the file information is also referred to. If the volume of the file to be sent is larger, the number of fragments is larger, if the volume of the file to be sent is larger. Smaller fragments will also be smaller. For example, a 10GB file to be sent can be divided into 50 fragments or 100 fragments. For a 100MB file to be sent, it can be divided into 2 fragments or 3 points. sheet.
  • the specific number of fragments to be sent depends on the number of available cache servers and the file information, and then different download tasks are generated according to the result of the fragmentation.
  • the target server considers the number of fragments according to the number of available cache servers, so as to avoid the number of fragments to be sent by the sending terminal in the prior art without knowing the number of available cache servers. Too much or how much, causing slow uploads or wasted resources.
  • step S22 the target server sends the download task to the cache server.
  • the target server sends the download task as a whole to the cache server for processing; if the number of cache servers includes multiple, the generated different download tasks are respectively sent. For different cache servers, one cache server handles at least one download task. Of course, if the network resources are sufficient, for example, the number of cache servers is sufficient, some cache servers are allowed to idle, that is, the download task is not performed.
  • step S3 the cache server establishes a connection with the sending terminal after receiving the download task, downloads a corresponding file from the sending terminal according to the download task, and downloads the file to be downloaded. Send to the target server to complete the upload.
  • the target server pairs are different.
  • the cache server specifies to download different shards as download tasks for each cache server. Among them, these cache servers will be placed in different places to form a distributed network. Each cache server can handle download tasks in the area as well as download tasks outside the area and cooperate with each other.
  • the cache server establishes a connection with the sending terminal after receiving the download task, downloads a corresponding file from the sending terminal according to the download task, and sends the downloaded file to the server.
  • the step S3 of describing the target server to complete the upload specifically includes four sub-steps of S31-S34, as shown in FIG.
  • step S3 shown in FIG. 1 a detailed sub-step flow chart of step S3 shown in FIG. 1 is shown in an embodiment of the present invention.
  • each cache server establishes a connection with the transmitting terminal after receiving the respective download task.
  • the fragmentation information is distributed to each cache server together with the URI of the file to be sent as a download task. After each cache server receives its own download task, it first establishes a connection with the sending terminal.
  • each cache server sends a download request to the transmitting terminal according to the respective download task.
  • the transmitting terminal after receiving the download request, transmits the requested fragment to the corresponding cache server.
  • each cache server downloads the specified slice from the transmitting terminal according to the respective download task.
  • each cache server downloads the specified fragment from the transmitting terminal according to the fragmentation information and the URI of the file to be transmitted.
  • step S34 after each cache server download is completed, the downloaded specified fragment is sent to the target server to complete the upload.
  • the file reverse upload method further includes the following steps:
  • the target server receives the specified shards downloaded from each of the plurality of cache servers;
  • the different cache servers finish downloading the specified shards, they will be uniformly sent to the target server for reorganization to form a complete file, which completes the process from the sending terminal to the target server.
  • Upload file action since the file transfer between the target server and the cache server does not restrict the uploading, the file transfer between the target server and the cache server is very smooth, and the file transfer speed is extremely fast. The quality of file transfer is guaranteed.
  • the file reverse upload method further includes the following steps:
  • the cache server If a connection interruption occurs during the downloading of the specified fragmentation by the cache server, the cache server re-establishes a connection with the transmitting terminal and continues to download the undownloaded portion of the specified fragment.
  • the invention has the advantage of setting the number of cache servers to multiple, which can ensure the integrity and smoothness of file uploading in the network.
  • the target server sends different download tasks to each cache server, the current working status of each cache server is monitored in real time. If the connection interruption occurs during the process of downloading the specified fragmentation by the cache server, the cache server is re-transmitted with the sending terminal. Establish a connection and continue to download the undownloaded portion of the specified shard without having to re-download the portion that was previously downloaded.
  • the file reverse upload method further includes the following steps:
  • the target server monitors the running status of multiple cache servers
  • the target server sends the download task of the failed cache server to other available cache servers;
  • the present invention has the advantage of setting the number of cache servers to multiple, which can share the pressure of file transfer in the network. For example, when any cache server fails, the target server can download the faulty cache server. Send to other available cache servers, which ensures that the file transfer pressure is not concentrated on a cache server or a few cache servers. This distributed network shares the file transfer pressure of some sites. .
  • the file reverse uploading method provided by the present invention realizes reverse uploading by changing the original uploading by the sending terminal to the method of downloading from the sending terminal by the cache server, and transmitting the downloaded file to the target server, thereby implementing reverse uploading.
  • the shortcomings of directly uploading files to the target server in the prior art are avoided, and usually the network download speed is much faster than the upload speed, and the device on the carrier side, such as the cache server, is less restricted by the operator to download files from the sending terminal. Therefore, the present invention greatly improves the speed and quality of file uploading in the network by utilizing such a reverse uploading method.
  • a file reverse upload system provided by the present invention will be described in detail below.
  • FIG. 4 an internal structure of a file reverse uploading system 10 according to an embodiment of the present invention is shown. schematic diagram.
  • the file reverse uploading system 10 includes a transmitting terminal 11, a target server 12, and a cache server 13, each of which connects to the network through a respective transmitting terminal 11, and performs an application for downloading files and uploading files, and transmitting the terminal.
  • 11 is mainly a device for the user side, for example, a user terminal device such as a mobile phone, a tablet computer, a palmtop computer, and the like.
  • the target server 12 and the cache server 13 are mainly devices facing the network operator side, and there is no limitation in uploading the file transfer between the target server 12 and the cache server 13.
  • the transmitting terminal 11 is configured to send file information of the file to be sent to the target server 12.
  • the file to be sent is stored in the sending terminal 11 of the user, and is a file for uploading to the target server 12, wherein the file information includes: a file size of the file to be sent and a URI of the file. .
  • the target server 12 is configured to perform a download task allocation according to the file information, and generate a download task, and send the download task to the cache server 13.
  • the cache server 13 is configured to establish a connection with the sending terminal 11 after receiving the download task, download a corresponding file from the sending terminal 11 according to the download task, and send the downloaded file to the target server 12 to complete the upload.
  • the target server 12 includes an allocation module 121, a combination module 122, and a monitoring module 123.
  • the distribution module 121 is configured to slice the file to be sent according to the number of available cache servers 13 and file information, generate a download task according to the fragment, and send the download task to the cache server 13.
  • the number of the cache servers 13 is multiple. As shown in FIG. 5, the cache servers 13 are placed in different places to form a distributed network, and each cache server 13 can handle the same in the area. The download task can also handle download tasks outside the region and work together.
  • the distribution module 121 is further configured to download different shards to different cache servers.
  • the cache server 13 includes a connection module 131, a download module 132, and a sending module 133.
  • the connection module 131 is configured to establish a connection with the sending terminal 11 after receiving the respective download task.
  • the downloading module 132 is configured to send a download request to the transmitting terminal 11 according to the respective download task, and download the specified fragment from the transmitting terminal 11.
  • the sending module 133 is configured to send the downloaded specified fragment to the target server after the download is completed. 12 to complete the upload.
  • connection module 131 is further configured to re-establish a connection with the sending terminal 11 if a connection interruption occurs during the downloading of the specified fragmentation by the downloading module 132.
  • the downloading module 132 is further configured to continue downloading the undownloaded portion of the specified fragment.
  • the combining module 122 is configured to, when receiving the specified shards downloaded from the plurality of cache servers 13, form a plurality of specified shards into a complete file.
  • the monitoring module 123 is configured to monitor the running status of one or more cache servers 13.
  • the distribution module 121 is further configured to send the download task of the failed cache server to another available cache server when any cache server fails.
  • the other available cache server is configured to re-download the specified fragment according to the download task.
  • the file reverse uploading system 10 realizes reverse upload by changing the original uploading terminal to the method of downloading from the sending terminal by the cache server, and sending the downloaded file to the target server. Further, the defect of directly uploading files to the target server in the prior art is avoided, and usually the speed of downloading the network is much faster than the uploading speed, and the device on the carrier side, such as the cache server, downloads files from the sending terminal, and is less affected by the operator. Limitation, therefore, the present invention greatly improves the speed and quality of file uploading in the network by utilizing this reverse uploading method.
  • the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, ie may be located A place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art can understand and implement without deliberate labor.

Landscapes

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

Abstract

Disclosed are a reverse file uploading method and system. The method comprises the following steps: a sending terminal sends file information of a file to be sent to a target server; the target server performs downloading task allocation according to the file information, generates a downloading task, and sends the downloading task to a cache server; the cache server establishes a connection with the sending terminal after receiving the downloading task, downloads a corresponding file from the sending terminal according to the downloading task, and sends the downloaded file to the target server to complete uploading. The technical solution of the present invention successfully solves a file uploading problem in the cases of poor network, a cache server fault, limitations of an operator and so on, improving the file uploading efficiency.

Description

一种文件反向上传方法和系统File reverse uploading method and system 技术领域Technical field

本发明涉及计算机领域,特别涉及一种文件反向上传方法和系统。The present invention relates to the field of computers, and in particular, to a file reverse upload method and system.

背景技术Background technique

近些年来,随着互联网技术的发展,文件传输在网络中的使用越来越多,主要分为下载文件和上传文件两大类。In recent years, with the development of Internet technology, file transmission has been used more and more in the network, mainly divided into two categories: download files and upload files.

在上传文件的应用过程中,目前,上传文件的主要方式是用户利用其发送终端直接向目标服务器上传文件,但是,这种方式的缺陷包括:In the application process of uploading files, at present, the main way to upload files is that users use their sending terminals to directly upload files to the target server. However, the defects of this method include:

第一,上传容易受到网络环境的影响,在网络差的情况下往往会导致上传失败;First, uploading is easily affected by the network environment, and in the case of poor network conditions, uploading often fails;

第二,目前文件的体量越来越大,例如一般的影片、资料、游戏客户端等文件的大小基本上都在千兆字节(GB)的数量级上,甚至更大,这就导致上传的速度较慢;Second, the current volume of files is getting bigger and bigger. For example, the size of files such as general movies, materials, and game clients are basically on the order of gigabytes (GB), or even larger, which leads to uploading. Slower;

第三,由于现实中有些运营商会限制上传,当目标服务器在运营商内部时,将导致无法快速上传,甚至无法成功上传。Third, because some operators will restrict uploading in reality, when the target server is inside the carrier, it will not be able to upload quickly or even upload successfully.

以上这些缺陷导致现有技术中直接向目标服务器上传文件的这种方式存在上传质量差和上传速度低的问题。These shortcomings lead to the problem of uploading files directly to the target server in the prior art, which has a problem of poor upload quality and low upload speed.

发明内容Summary of the invention

为了解决现有技术的问题,本发明实施例提供了一种文件反向上传方法和系统。所述技术方案如下:In order to solve the problem of the prior art, an embodiment of the present invention provides a file reverse uploading method and system. The technical solution is as follows:

一方面,一种文件反向上传方法,包括以下步骤:In one aspect, a file reverse upload method includes the following steps:

发送终端将待发送文件的文件信息发送至目标服务器;The sending terminal sends the file information of the file to be sent to the target server;

所述目标服务器根据所述文件信息进行下载任务分配,并生成下载任务,将所述下载任务发送至缓存服务器;The target server performs a download task allocation according to the file information, and generates a download task, and sends the download task to a cache server;

所述缓存服务器在接收到所述下载任务后与所述发送终端建立连接,根据 所述下载任务从所述发送终端下载对应的文件,并将下载到的文件发送至所述目标服务器以完成上传。After receiving the download task, the cache server establishes a connection with the sending terminal, according to The download task downloads a corresponding file from the sending terminal, and sends the downloaded file to the target server to complete the upload.

进一步的,所述文件信息包括:所述待发送文件的文件大小以及文件的统一资源标识符。Further, the file information includes: a file size of the file to be sent and a uniform resource identifier of the file.

进一步的,所述目标服务器根据所述文件信息进行下载任务分配,并生成下载任务,将所述下载任务发送至缓存服务器的步骤具体包括:Further, the step that the target server performs the download task allocation according to the file information, and generates a download task, and the step of sending the download task to the cache server includes:

所述目标服务器根据可用的缓存服务器的数量及所述文件信息对所述待发送文件进行分片,再根据所述分片生成所述下载任务;The target server fragments the to-be-sent file according to the number of available cache servers and the file information, and generates the download task according to the fragment.

所述目标服务器将所述下载任务发送至所述缓存服务器。The target server sends the download task to the cache server.

进一步的,所述缓存服务器的数量为多个,所述目标服务器对不同的缓存服务器指定下载不同的分片。Further, the number of the cache servers is multiple, and the target server specifies to download different fragments to different cache servers.

进一步的,所述缓存服务器在接收到所述下载任务后与所述发送终端建立连接,根据所述下载任务从所述发送终端下载对应的文件,并将下载到的文件发送至所述目标服务器以完成上传的步骤具体包括:Further, the cache server establishes a connection with the sending terminal after receiving the download task, downloads a corresponding file from the sending terminal according to the download task, and sends the downloaded file to the target server. The steps to complete the upload specifically include:

每个缓存服务器在接收到各自的下载任务后与所述发送终端建立连接;Each cache server establishes a connection with the sending terminal after receiving the respective download task;

每个缓存服务器根据各自的下载任务向所述发送终端发送下载请求;Each cache server sends a download request to the sending terminal according to a respective download task;

每个缓存服务器根据各自的下载任务从所述发送终端下载指定的分片;Each cache server downloads a specified slice from the sending terminal according to a respective download task;

每个缓存服务器下载完成后,将下载到的指定分片发送至所述目标服务器以完成上传。After each cache server download is completed, the specified fragment downloaded to the target server is sent to the target server to complete the upload.

进一步的,所述方法进一步包括以下步骤:Further, the method further includes the following steps:

若在缓存服务器下载指定的分片过程中发生连接中断,则所述缓存服务器重新与所述发送终端建立连接,继续下载指定的分片中未下载的部分。If a connection interruption occurs during the downloading of the specified fragmentation by the cache server, the cache server re-establishes a connection with the transmitting terminal and continues to download the undownloaded portion of the specified fragment.

进一步的,所述方法进一步包括以下步骤:Further, the method further includes the following steps:

所述目标服务器从多个缓存服务器中接收各自下载到的指定的分片; The target server receives the specified fragment downloaded from each of the plurality of cache servers;

将多个指定的分片组成完整的文件。Compose multiple specified shards into a complete file.

进一步的,所述方法进一步包括以下步骤:Further, the method further includes the following steps:

所述目标服务器监控多个缓存服务器的运行状态;The target server monitors an operating status of multiple cache servers;

在任一缓存服务器出现故障时,所述目标服务器将出现故障的缓存服务器的下载任务发送至其他可用的缓存服务器;When any cache server fails, the target server sends the download task of the failed cache server to other available cache servers;

所述其它可用的缓存服务器根据下载任务重新下载指定的分片。The other available cache servers re-download the specified shards according to the download task.

另一方面,一种文件反向上传系统,所述系统包括发送终端、目标服务器以及缓存服务器,其中,Another aspect is a file reverse uploading system, the system comprising a sending terminal, a target server, and a cache server, wherein

发送终端,用于将待发送文件的文件信息发送至所述目标服务器;a sending terminal, configured to send file information of the file to be sent to the target server;

所述目标服务器,用于根据所述文件信息进行下载任务分配,并生成下载任务,将所述下载任务发送至所述缓存服务器;The target server is configured to perform a download task allocation according to the file information, and generate a download task, and send the download task to the cache server;

所述缓存服务器,用于在接收到所述下载任务后与所述发送终端建立连接,根据所述下载任务从所述发送终端下载对应的文件,并将下载到的文件发送至所述目标服务器以完成上传。The cache server is configured to establish a connection with the sending terminal after receiving the download task, download a corresponding file from the sending terminal according to the download task, and send the downloaded file to the target server. To complete the upload.

进一步的,所述文件信息包括:所述待发送文件的文件大小以及文件的统一资源标识符。Further, the file information includes: a file size of the file to be sent and a uniform resource identifier of the file.

进一步的,所述目标服务器包括分配模块,其中,Further, the target server includes an allocation module, where

所述分配模块,用于根据可用的缓存服务器的数量及所述文件信息对所述待发送文件进行分片,再根据所述分片生成所述下载任务,并将所述下载任务发送至所述缓存服务器。The allocating module is configured to slice the to-be-sent file according to the number of available cache servers and the file information, generate the download task according to the fragment, and send the download task to the The cache server.

进一步的,所述缓存服务器的数量为多个,所述分配模块,还用于对不同的缓存服务器指定下载不同的分片。Further, the number of the cache servers is multiple, and the allocation module is further configured to download different fragments to different cache servers.

进一步的,缓存服务器包括:Further, the cache server includes:

连接模块,用于在接收到各自的下载任务后与所述发送终端建立连接; a connection module, configured to establish a connection with the sending terminal after receiving a respective download task;

下载模块,用于根据各自的下载任务向所述发送终端发送下载请求,并从所述发送终端下载指定的分片;a downloading module, configured to send a download request to the sending terminal according to a respective download task, and download the specified fragment from the sending terminal;

发送模块,用于在下载完成后,将下载到的指定分片发送至所述目标服务器以完成上传。The sending module is configured to send the downloaded specified fragment to the target server to complete the upload after the download is completed.

进一步的,所述连接模块,还用于若在所述下载模块下载指定的分片过程中发生连接中断,则重新与所述发送终端建立连接;Further, the connection module is further configured to re-establish a connection with the sending terminal if a connection interruption occurs during downloading the specified fragmentation process by the downloading module;

所述下载模块,还用于继续下载指定的分片中未下载的部分。The downloading module is further configured to continue downloading the undownloaded part of the specified fragment.

进一步的,所述目标服务器还包括组合模块,其中,Further, the target server further includes a combination module, where

所述组合模块,用于在从多个缓存服务器中接收各自下载到的指定的分片时,将多个指定的分片组成完整的文件。The combination module is configured to form a plurality of specified fragments into a complete file when receiving the specified fragments downloaded from the plurality of cache servers.

进一步的,所述目标服务器还包括监控模块,所述监控模块用于监控多个缓存服务器的运行状态;Further, the target server further includes a monitoring module, where the monitoring module is configured to monitor an operating status of the multiple cache servers;

其中,所述分配模块,还用于在任一缓存服务器出现故障时,将出现故障的缓存服务器的下载任务发送至其他可用的缓存服务器;The allocation module is further configured to send a download task of the failed cache server to another available cache server when any cache server fails;

其中,所述其它可用的缓存服务器,用于根据下载任务重新下载指定的分片。The other available cache server is configured to re-download the specified fragment according to the download task.

本发明实施例提供的技术方案带来的有益效果是:通过将原本由发送终端上传改成由缓存服务器从发送终端下载的方式,并将下载到的文件发送至目标服务器,进而实现了反向上传,进而避免了现有技术中直接向目标服务器上传文件的缺陷,而且通常网络下载的速度比上传的速度要快很多,运营商侧的设备如缓存服务器从发送终端下载文件也较少受到运营商的限制,因此,本发明利用这种反向上传的方式极大的提高了网络中文件上传的速度和质量。The technical solution provided by the embodiment of the present invention has the beneficial effects that the reverse is implemented by changing the original uploading terminal to the method of downloading from the sending terminal by the cache server, and sending the downloaded file to the target server, thereby implementing the reverse Uploading, thereby avoiding the defect of directly uploading files to the target server in the prior art, and usually the network downloading speed is much faster than the uploading speed, and the device on the carrier side, such as the cache server, is less affected by downloading files from the sending terminal. The limitation of the quotient, therefore, the present invention greatly improves the speed and quality of file uploading in the network by means of this reverse uploading.

附图说明DRAWINGS

为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明 的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are merely the present invention. Some of the embodiments can be obtained by those of ordinary skill in the art in view of the drawings without any inventive effort.

图1为本发明一实施方式中文件反向上传方法流程图;1 is a flowchart of a method for uploading a file in reverse according to an embodiment of the present invention;

图2为本发明一实施方式中图1所示步骤S2的详细子步骤流程图;2 is a flowchart of detailed sub-steps of step S2 shown in FIG. 1 according to an embodiment of the present invention;

图3为本发明一实施方式中图1所示步骤S3的详细子步骤流程图;3 is a flowchart of detailed sub-steps of step S3 shown in FIG. 1 according to an embodiment of the present invention;

图4为本发明一实施方式中文件反向上传系统10的内部结构示意图;4 is a schematic diagram showing the internal structure of a file reverse uploading system 10 according to an embodiment of the present invention;

图5为本发明另一实施方式中文件反向上传系统10的内部结构示意图。FIG. 5 is a schematic diagram showing the internal structure of a file reverse uploading system 10 according to another embodiment of the present invention.

具体实施方式detailed description

为使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明实施方式作进一步地详细描述。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。The embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

以下将对本发明所提供的一种文件反向上传方法进行详细说明。A file reverse upload method provided by the present invention will be described in detail below.

请参阅图1,为本发明一实施方式中文件反向上传方法流程图。Please refer to FIG. 1 , which is a flowchart of a method for uploading files in reverse according to an embodiment of the present invention.

在一实施方式中,该文件反向上传方法应用于文件反向上传系统,其中,所述文件反向上传系统包括发送终端、目标服务器以及缓存服务器,每个用户通过各自的发送终端连接网络,并进行着下载文件和上传文件的应用,发送终端主要是面向用户侧的设备,例如包括手机、平板电脑、掌上电脑等用户终端设备。目标服务器以及缓存服务器主要是面向网络运营商侧的设备,而且目标服务器与缓存服务器之间的文件传输不会存在限制上传的情况。In an embodiment, the file reverse uploading method is applied to a file reverse uploading system, where the file reverse uploading system includes a sending terminal, a target server, and a cache server, and each user connects to the network through a respective sending terminal. And the application for downloading files and uploading files, the sending terminal is mainly a device for the user side, for example, a user terminal device such as a mobile phone, a tablet computer, a palmtop computer, and the like. The target server and the cache server are mainly devices on the network operator side, and the file transfer between the target server and the cache server does not restrict uploading.

在步骤S1中,发送终端将待发送文件的文件信息发送至目标服务器。In step S1, the transmitting terminal transmits the file information of the file to be transmitted to the target server.

在一实施方式中,待发送文件存储于用户的发送终端中,而且是用于上传至目标服务器的文件,其中,所述文件信息包括:所述待发送文件的文件大小以及文件的统一资源标识符(Uniform Resource Identifier,URI)。In an embodiment, the file to be sent is stored in the sending terminal of the user, and is a file for uploading to the target server, where the file information includes: a file size of the file to be sent and a uniform resource identifier of the file. Uniform Resource Identifier (URI).

在步骤S2中,目标服务器根据文件信息进行下载任务分配,并生成下载任务,将下载任务发送至缓存服务器。In step S2, the target server performs download task allocation according to the file information, and generates a download task, and sends the download task to the cache server.

在一实施方式中,所述目标服务器根据所述文件信息进行下载任务分配,并生成下载任务,将所述下载任务发送至缓存服务器的步骤S2具体包括S21-S22两个子步骤,如图2所示。In an embodiment, the target server performs download task allocation according to the file information, and generates a download task, and the step S2 of sending the download task to the cache server specifically includes two sub-steps of S21-S22, as shown in FIG. 2 Show.

请参阅图2,所示为本发明一实施方式中图1所示步骤S2的详细子步骤流 程图。Referring to FIG. 2, a detailed sub-step flow of step S2 shown in FIG. 1 is shown in an embodiment of the present invention. Cheng Tu.

在步骤S21中,目标服务器根据可用的缓存服务器的数量及文件信息对待发送文件进行分片,再根据分片生成下载任务。In step S21, the target server performs fragmentation according to the number of available cache servers and file information to be sent, and then generates a download task according to the fragment.

在一实施方式中,如果缓存服务器的数量只有一个,则目标服务器不用对待发送文件进行分片,而是作为一个整体的文件进行处理;如果缓存服务器的数量包括多个,则根据数量将待发送文件进行分片,例如,如果缓存服务器的数量包括5个,则将待发送文件分成5个分片,当然,也可以分成4个分片或者6个分片,在此不做限定。In an embodiment, if there is only one cache server, the target server does not slice the file to be sent, but processes the file as a whole; if the number of cache servers includes multiple, it will be sent according to the number. The file is fragmented. For example, if the number of cache servers includes five, the file to be sent is divided into five fragments. Of course, it can be divided into four fragments or six fragments, which is not limited herein.

在一实施方式中,目标服务器对待发送文件进行分片时也会参考文件信息的因素,如果待发送文件的体量较大则分片的数量也会较多,如果待发送文件的体量较小则分片的数量也会较少,例如对一个10GB大小的待发送文件可以分成50个分片或者100个分片,对一个100MB大小的待发送文件可以分成2个分片或者3个分片。In an embodiment, when the target server performs fragmentation on the file to be sent, the factor of the file information is also referred to. If the volume of the file to be sent is larger, the number of fragments is larger, if the volume of the file to be sent is larger. Smaller fragments will also be smaller. For example, a 10GB file to be sent can be divided into 50 fragments or 100 fragments. For a 100MB file to be sent, it can be divided into 2 fragments or 3 points. sheet.

在一实施方式中,对待发送文件进行分片的具体数量取决于可用的缓存服务器的数量及文件信息这两个因素来综合决定,然后根据分片的结果生成不同的下载任务。并且,本实施方式中,由目标服务器根据可用的缓存服务器数量来考量分片数量,可避免现有技术中发送终端在无法获知可用缓存服务器数量的情况下,将待发送文件进行分片的数量过多或多少,造成上传过慢或资源浪费。In an embodiment, the specific number of fragments to be sent depends on the number of available cache servers and the file information, and then different download tasks are generated according to the result of the fragmentation. In this embodiment, the target server considers the number of fragments according to the number of available cache servers, so as to avoid the number of fragments to be sent by the sending terminal in the prior art without knowing the number of available cache servers. Too much or how much, causing slow uploads or wasted resources.

在步骤S22中,目标服务器将下载任务发送至缓存服务器。In step S22, the target server sends the download task to the cache server.

在一实施方式中,如果缓存服务器的数量只有一个,则目标服务器将下载任务作为一个整体发送至该缓存服务器进行行处理;如果缓存服务器的数量包括多个,则将生成的不同下载任务分别发送给不同的缓存服务器进行处理,一个缓存服务器至少处理一个下载任务,当然,如果在网络资源充足的情况之下,例如缓存服务器的数量足够多,也允许一些缓存服务器闲置,即不执行下载任务。In an embodiment, if there is only one cache server, the target server sends the download task as a whole to the cache server for processing; if the number of cache servers includes multiple, the generated different download tasks are respectively sent. For different cache servers, one cache server handles at least one download task. Of course, if the network resources are sufficient, for example, the number of cache servers is sufficient, some cache servers are allowed to idle, that is, the download task is not performed.

请继续参阅图1,在步骤S3中,缓存服务器在接收到所述下载任务后与所述发送终端建立连接,根据所述下载任务从所述发送终端下载对应的文件,并将下载到的文件发送至所述目标服务器以完成上传。Referring to FIG. 1 , in step S3, the cache server establishes a connection with the sending terminal after receiving the download task, downloads a corresponding file from the sending terminal according to the download task, and downloads the file to be downloaded. Send to the target server to complete the upload.

在一实施方式中,如果缓存服务器的数量为多个,则目标服务器对不同的 缓存服务器指定下载不同的分片,作为各个缓存服务器的下载任务。其中,这些缓存服务器将放置在不同的地方,形成一种分布式网络,每一个缓存服务器既可以处理本区域内的下载任务,也可以处理本区域外的下载任务,相互协同。In an embodiment, if the number of cache servers is multiple, the target server pairs are different. The cache server specifies to download different shards as download tasks for each cache server. Among them, these cache servers will be placed in different places to form a distributed network. Each cache server can handle download tasks in the area as well as download tasks outside the area and cooperate with each other.

在一实施方式中,所述缓存服务器在接收到所述下载任务后与所述发送终端建立连接,根据所述下载任务从所述发送终端下载对应的文件,并将下载到的文件发送至所述目标服务器以完成上传的步骤S3具体包括S31-S34这四个子步骤,如图3所示。In an embodiment, the cache server establishes a connection with the sending terminal after receiving the download task, downloads a corresponding file from the sending terminal according to the download task, and sends the downloaded file to the server. The step S3 of describing the target server to complete the upload specifically includes four sub-steps of S31-S34, as shown in FIG.

请参阅图3,所示为本发明一实施方式中图1所示步骤S3的详细子步骤流程图。Referring to FIG. 3, a detailed sub-step flow chart of step S3 shown in FIG. 1 is shown in an embodiment of the present invention.

在步骤S31中,每个缓存服务器在接收到各自的下载任务后与发送终端建立连接。In step S31, each cache server establishes a connection with the transmitting terminal after receiving the respective download task.

在一实施方式中,目标服务器根据可用的缓存服务器的数量及文件信息对待发送文件进行分片之后,将分片信息连同待发送文件的URI一起作为下载任务分发给各个缓存服务器。在每个缓存服务器在接收到各自的下载任务后,首先与发送终端建立连接。In an embodiment, after the target server fragments the file to be sent according to the number of available cache servers and file information, the fragmentation information is distributed to each cache server together with the URI of the file to be sent as a download task. After each cache server receives its own download task, it first establishes a connection with the sending terminal.

在步骤S32中,每个缓存服务器根据各自的下载任务向发送终端发送下载请求。In step S32, each cache server sends a download request to the transmitting terminal according to the respective download task.

在一实施方式中,发送终端在接收到下载请求后,将其要求的分片传给对应的缓存服务器。In an embodiment, after receiving the download request, the transmitting terminal transmits the requested fragment to the corresponding cache server.

在步骤S33中,每个缓存服务器根据各自的下载任务从发送终端下载指定的分片。In step S33, each cache server downloads the specified slice from the transmitting terminal according to the respective download task.

在一实施方式中,每个缓存服务器根据分片信息和待发送文件的URI从发送终端下载指定的分片。In an embodiment, each cache server downloads the specified fragment from the transmitting terminal according to the fragmentation information and the URI of the file to be transmitted.

在步骤S34中,每个缓存服务器下载完成后,将下载到的指定分片发送至目标服务器以完成上传。In step S34, after each cache server download is completed, the downloaded specified fragment is sent to the target server to complete the upload.

在一实施方式中,该文件反向上传方法进一步包括以下步骤:In an embodiment, the file reverse upload method further includes the following steps:

目标服务器从多个缓存服务器中接收各自下载到的指定的分片;The target server receives the specified shards downloaded from each of the plurality of cache servers;

将多个指定的分片组成完整的文件。Compose multiple specified shards into a complete file.

其中,当不同的缓存服务器完成下载各自指定的分片之后,将统一发送给目标服务器进行重组以形成完整的文件,这就完成了从发送终端至目标服务器 的上传文件动作。本发明的这种实施例由于目标服务器与缓存服务器之间的文件传输不会存在限制上传的情况,因此在目标服务器与缓存服务器之间的文件传输将十分的顺畅,而且文件传输速度极快,文件传输的质量有保障。After the different cache servers finish downloading the specified shards, they will be uniformly sent to the target server for reorganization to form a complete file, which completes the process from the sending terminal to the target server. Upload file action. In this embodiment of the present invention, since the file transfer between the target server and the cache server does not restrict the uploading, the file transfer between the target server and the cache server is very smooth, and the file transfer speed is extremely fast. The quality of file transfer is guaranteed.

在一实施方式中,该文件反向上传方法进一步包括以下步骤:In an embodiment, the file reverse upload method further includes the following steps:

若在缓存服务器下载指定的分片过程中发生连接中断,则所述缓存服务器重新与所述发送终端建立连接,继续下载指定的分片中未下载的部分。If a connection interruption occurs during the downloading of the specified fragmentation by the cache server, the cache server re-establishes a connection with the transmitting terminal and continues to download the undownloaded portion of the specified fragment.

其中,本发明将缓存服务器的数量设置为多个还有一个优点,则是可以保障网络中文件上传的完整性和顺畅性。当目标服务器将不同的下载任务发送至各个缓存服务器后,将对各个缓存服务器的当前工作状态进行实时监控,若在缓存服务器下载指定的分片过程中发生连接中断,则缓存服务器重新与发送终端建立连接,继续下载指定的分片中未下载的部分,而无需重新下载之前已经下载到的部分。Among them, the invention has the advantage of setting the number of cache servers to multiple, which can ensure the integrity and smoothness of file uploading in the network. After the target server sends different download tasks to each cache server, the current working status of each cache server is monitored in real time. If the connection interruption occurs during the process of downloading the specified fragmentation by the cache server, the cache server is re-transmitted with the sending terminal. Establish a connection and continue to download the undownloaded portion of the specified shard without having to re-download the portion that was previously downloaded.

在一实施方式中,该文件反向上传方法进一步包括以下步骤:In an embodiment, the file reverse upload method further includes the following steps:

目标服务器监控多个缓存服务器的运行状态;The target server monitors the running status of multiple cache servers;

在任一缓存服务器出现故障时,目标服务器将出现故障的缓存服务器的下载任务发送至其他可用的缓存服务器;When any cache server fails, the target server sends the download task of the failed cache server to other available cache servers;

其它可用的缓存服务器根据下载任务重新下载指定的分片。Other available cache servers re-download the specified shards based on the download task.

其中,本发明将缓存服务器的数量设置为多个还有一个优点,则是可以分担网络中文件传输的压力,例如在任一缓存服务器出现故障时,目标服务器可以将出现故障的缓存服务器的下载任务发送至其他可用的缓存服务器,这样一来就确保了文件传输的压力不会集中到某个缓存服务器或者少数几个缓存服务器的身上,利用这种分布式的网络分担了一些站点的文件传输压力。Wherein, the present invention has the advantage of setting the number of cache servers to multiple, which can share the pressure of file transfer in the network. For example, when any cache server fails, the target server can download the faulty cache server. Send to other available cache servers, which ensures that the file transfer pressure is not concentrated on a cache server or a few cache servers. This distributed network shares the file transfer pressure of some sites. .

本发明提供的一种文件反向上传方法,通过将原本由发送终端上传改成由缓存服务器从发送终端下载的方式,并将下载到的文件发送至目标服务器,进而实现了反向上传,进而避免了现有技术中直接向目标服务器上传文件的缺陷,而且通常网络下载的速度比上传的速度要快很多,运营商侧的设备如缓存服务器从发送终端下载文件也较少受到运营商的限制,因此,本发明利用这种反向上传的方式极大的提高了网络中文件上传的速度和质量。The file reverse uploading method provided by the present invention realizes reverse uploading by changing the original uploading by the sending terminal to the method of downloading from the sending terminal by the cache server, and transmitting the downloaded file to the target server, thereby implementing reverse uploading. The shortcomings of directly uploading files to the target server in the prior art are avoided, and usually the network download speed is much faster than the upload speed, and the device on the carrier side, such as the cache server, is less restricted by the operator to download files from the sending terminal. Therefore, the present invention greatly improves the speed and quality of file uploading in the network by utilizing such a reverse uploading method.

以下将对本发明所提供的一种文件反向上传系统进行详细说明。A file reverse upload system provided by the present invention will be described in detail below.

请参阅图4,所示为本发明一实施方式中文件反向上传系统10的内部结构 示意图。Referring to FIG. 4, an internal structure of a file reverse uploading system 10 according to an embodiment of the present invention is shown. schematic diagram.

在一实施方式中,文件反向上传系统10包括发送终端11、目标服务器12以及缓存服务器13,每个用户通过各自的发送终端11连接网络,并进行着下载文件和上传文件的应用,发送终端11主要是面向用户侧的设备,例如包括手机、平板电脑、掌上电脑等用户终端设备。目标服务器12以及缓存服务器13主要是面向网络运营商侧的设备,而且目标服务器12与缓存服务器13之间的文件传输不会存在限制上传的情况。In an embodiment, the file reverse uploading system 10 includes a transmitting terminal 11, a target server 12, and a cache server 13, each of which connects to the network through a respective transmitting terminal 11, and performs an application for downloading files and uploading files, and transmitting the terminal. 11 is mainly a device for the user side, for example, a user terminal device such as a mobile phone, a tablet computer, a palmtop computer, and the like. The target server 12 and the cache server 13 are mainly devices facing the network operator side, and there is no limitation in uploading the file transfer between the target server 12 and the cache server 13.

发送终端11,用于将待发送文件的文件信息发送至目标服务器12。The transmitting terminal 11 is configured to send file information of the file to be sent to the target server 12.

在一实施方式中,待发送文件存储于用户的发送终端11中,而且是用于上传至目标服务器12的文件,其中,所述文件信息包括:所述待发送文件的文件大小以及文件的URI。In an embodiment, the file to be sent is stored in the sending terminal 11 of the user, and is a file for uploading to the target server 12, wherein the file information includes: a file size of the file to be sent and a URI of the file. .

目标服务器12,用于根据所述文件信息进行下载任务分配,并生成下载任务,将所述下载任务发送至缓存服务器13。The target server 12 is configured to perform a download task allocation according to the file information, and generate a download task, and send the download task to the cache server 13.

缓存服务器13,用于在接收到所述下载任务后与发送终端11建立连接,根据下载任务从发送终端11下载对应的文件,并将下载到的文件发送至目标服务器12以完成上传。The cache server 13 is configured to establish a connection with the sending terminal 11 after receiving the download task, download a corresponding file from the sending terminal 11 according to the download task, and send the downloaded file to the target server 12 to complete the upload.

在一实施方式中,目标服务器12包括分配模块121、组合模块122以及监控模块123。In an embodiment, the target server 12 includes an allocation module 121, a combination module 122, and a monitoring module 123.

分配模块121,用于根据可用的缓存服务器13的数量及文件信息对待发送文件进行分片,再根据分片生成下载任务,并将下载任务发送至缓存服务器13。The distribution module 121 is configured to slice the file to be sent according to the number of available cache servers 13 and file information, generate a download task according to the fragment, and send the download task to the cache server 13.

在一实施方式中,缓存服务器13的数量为多个,如图5所示,这些缓存服务器13将放置在不同的地方,形成一种分布式网络,每一个缓存服务器13既可以处理本区域内的下载任务,也可以处理本区域外的下载任务,相互协同。其中,分配模块121,还用于对不同的缓存服务器指定下载不同的分片。In an embodiment, the number of the cache servers 13 is multiple. As shown in FIG. 5, the cache servers 13 are placed in different places to form a distributed network, and each cache server 13 can handle the same in the area. The download task can also handle download tasks outside the region and work together. The distribution module 121 is further configured to download different shards to different cache servers.

在一实施方式中,缓存服务器13包括连接模块131、下载模块132以及发送模块133。In an embodiment, the cache server 13 includes a connection module 131, a download module 132, and a sending module 133.

连接模块131,用于在接收到各自的下载任务后与发送终端11建立连接。The connection module 131 is configured to establish a connection with the sending terminal 11 after receiving the respective download task.

下载模块132,用于根据各自的下载任务向发送终端11发送下载请求,并从发送终端11下载指定的分片。The downloading module 132 is configured to send a download request to the transmitting terminal 11 according to the respective download task, and download the specified fragment from the transmitting terminal 11.

发送模块133,用于在下载完成后,将下载到的指定分片发送至目标服务器 12以完成上传。The sending module 133 is configured to send the downloaded specified fragment to the target server after the download is completed. 12 to complete the upload.

在一实施方式中,连接模块131,还用于若在下载模块132下载指定的分片过程中发生连接中断,则重新与发送终端11建立连接。In an embodiment, the connection module 131 is further configured to re-establish a connection with the sending terminal 11 if a connection interruption occurs during the downloading of the specified fragmentation by the downloading module 132.

在一实施方式中,下载模块132,还用于继续下载指定的分片中未下载的部分。In an embodiment, the downloading module 132 is further configured to continue downloading the undownloaded portion of the specified fragment.

在一实施方式中,组合模块122,用于在从多个缓存服务器13中接收各自下载到的指定的分片时,将多个指定的分片组成完整的文件。In an embodiment, the combining module 122 is configured to, when receiving the specified shards downloaded from the plurality of cache servers 13, form a plurality of specified shards into a complete file.

在一实施方式中,监控模块123,用于监控一个或者多个缓存服务器13的运行状态。In an embodiment, the monitoring module 123 is configured to monitor the running status of one or more cache servers 13.

其中,分配模块121,还用于在任一缓存服务器出现故障时,将出现故障的缓存服务器的下载任务发送至其他可用的缓存服务器。其中,所述其它可用的缓存服务器,用于根据下载任务重新下载指定的分片。The distribution module 121 is further configured to send the download task of the failed cache server to another available cache server when any cache server fails. The other available cache server is configured to re-download the specified fragment according to the download task.

本发明提供的一种文件反向上传系统10,通过将原本由发送终端上传改成由缓存服务器从发送终端下载的方式,并将下载到的文件发送至目标服务器,进而实现了反向上传,进而避免了现有技术中直接向目标服务器上传文件的缺陷,而且通常网络下载的速度比上传的速度要快很多,运营商侧的设备如缓存服务器从发送终端下载文件也较少受到运营商的限制,因此,本发明利用这种反向上传的方式极大的提高了网络中文件上传的速度和质量。The file reverse uploading system 10 provided by the present invention realizes reverse upload by changing the original uploading terminal to the method of downloading from the sending terminal by the cache server, and sending the downloaded file to the target server. Further, the defect of directly uploading files to the target server in the prior art is avoided, and usually the speed of downloading the network is much faster than the uploading speed, and the device on the carrier side, such as the cache server, downloads files from the sending terminal, and is less affected by the operator. Limitation, therefore, the present invention greatly improves the speed and quality of file uploading in the network by utilizing this reverse uploading method.

以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, ie may be located A place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art can understand and implement without deliberate labor.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。 Through the description of the above embodiments, those skilled in the art can clearly understand that the various embodiments can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware. Based on such understanding, the above-described technical solutions may be embodied in the form of software products in essence or in the form of software products, which may be stored in a computer readable storage medium such as ROM/RAM, magnetic Discs, optical discs, etc., include instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform the methods described in various embodiments or portions of the embodiments.

以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。 The above are only the preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalents, improvements, etc., which are within the spirit and scope of the present invention, should be included in the protection of the present invention. Within the scope.

Claims (16)

一种文件反向上传方法,其特征在于,所述方法包括以下步骤:A file reverse upload method, characterized in that the method comprises the following steps: 发送终端将待发送文件的文件信息发送至目标服务器;The sending terminal sends the file information of the file to be sent to the target server; 所述目标服务器根据所述文件信息进行下载任务分配,并生成下载任务,将所述下载任务发送至缓存服务器;The target server performs a download task allocation according to the file information, and generates a download task, and sends the download task to a cache server; 所述缓存服务器在接收到所述下载任务后与所述发送终端建立连接,根据所述下载任务从所述发送终端下载对应的文件,并将下载到的文件发送至所述目标服务器以完成上传。After receiving the download task, the cache server establishes a connection with the sending terminal, downloads a corresponding file from the sending terminal according to the download task, and sends the downloaded file to the target server to complete the uploading. . 如权利要求1所述的文件反向上传方法,其特征在于,所述文件信息包括:所述待发送文件的文件大小以及文件的统一资源标识符。The file reverse uploading method according to claim 1, wherein the file information comprises: a file size of the file to be sent and a uniform resource identifier of the file. 如权利要求2所述的文件反向上传方法,其特征在于,所述目标服务器根据所述文件信息进行下载任务分配,并生成下载任务,将所述下载任务发送至缓存服务器的步骤具体包括:The file reverse uploading method according to claim 2, wherein the step of the target server to perform a download task assignment according to the file information, and generate a download task, and the sending the download task to the cache server comprises: 所述目标服务器根据可用的缓存服务器的数量及所述文件信息对所述待发送文件进行分片,再根据所述分片生成所述下载任务;The target server fragments the to-be-sent file according to the number of available cache servers and the file information, and generates the download task according to the fragment. 所述目标服务器将所述下载任务发送至所述缓存服务器。The target server sends the download task to the cache server. 如权利要求3所述的文件反向上传方法,其特征在于,所述缓存服务器的数量为多个,所述目标服务器对不同的缓存服务器指定下载不同的分片。The file reverse uploading method according to claim 3, wherein the number of the cache servers is plural, and the target server specifies to download different shards to different cache servers. 如权利要求4所述的文件反向上传方法,其特征在于,所述缓存服务器在接收到所述下载任务后与所述发送终端建立连接,根据所述下载任务从所述发送终端下载对应的文件,并将下载到的文件发送至所述目标服务器以完成上传的步骤具体包括:The file reverse uploading method according to claim 4, wherein the cache server establishes a connection with the sending terminal after receiving the downloading task, and downloads a corresponding one from the sending terminal according to the downloading task. The steps of sending the downloaded file to the target server to complete the upload include: 每个缓存服务器在接收到各自的下载任务后与所述发送终端建立连接;Each cache server establishes a connection with the sending terminal after receiving the respective download task; 每个缓存服务器根据各自的下载任务向所述发送终端发送下载请求;Each cache server sends a download request to the sending terminal according to a respective download task; 每个缓存服务器根据各自的下载任务从所述发送终端下载指定的分片; Each cache server downloads a specified slice from the sending terminal according to a respective download task; 每个缓存服务器下载完成后,将下载到的指定分片发送至所述目标服务器以完成上传。After each cache server download is completed, the specified fragment downloaded to the target server is sent to the target server to complete the upload. 如权利要求5所述的文件反向上传方法,其特征在于,所述方法进一步包括以下步骤:The file reverse upload method according to claim 5, wherein the method further comprises the following steps: 若在缓存服务器下载指定的分片过程中发生连接中断,则所述缓存服务器重新与所述发送终端建立连接,继续下载指定的分片中未下载的部分。If a connection interruption occurs during the downloading of the specified fragmentation by the cache server, the cache server re-establishes a connection with the transmitting terminal and continues to download the undownloaded portion of the specified fragment. 如权利要求4或5所述的文件反向上传方法,其特征在于,所述方法进一步包括以下步骤:The file reverse upload method according to claim 4 or 5, wherein the method further comprises the following steps: 所述目标服务器从多个缓存服务器中接收各自下载到的指定的分片;The target server receives the specified fragment downloaded from each of the plurality of cache servers; 将多个指定的分片组成完整的文件。Compose multiple specified shards into a complete file. 如权利要求4所述的文件反向上传方法,其特征在于,所述方法进一步包括以下步骤:The file reverse upload method according to claim 4, wherein the method further comprises the following steps: 所述目标服务器监控多个缓存服务器的运行状态;The target server monitors an operating status of multiple cache servers; 在任一缓存服务器出现故障时,所述目标服务器将出现故障的缓存服务器的下载任务发送至其他可用的缓存服务器;When any cache server fails, the target server sends the download task of the failed cache server to other available cache servers; 所述其它可用的缓存服务器根据下载任务重新下载指定的分片。The other available cache servers re-download the specified shards according to the download task. 一种文件反向上传系统,其特征在于,所述系统包括发送终端、目标服务器以及缓存服务器,其中,A file reverse uploading system, wherein the system includes a sending terminal, a target server, and a cache server, where 发送终端,用于将待发送文件的文件信息发送至所述目标服务器;a sending terminal, configured to send file information of the file to be sent to the target server; 所述目标服务器,用于根据所述文件信息进行下载任务分配,并生成下载任务,将所述下载任务发送至所述缓存服务器;The target server is configured to perform a download task allocation according to the file information, and generate a download task, and send the download task to the cache server; 所述缓存服务器,用于在接收到所述下载任务后与所述发送终端建立连接,根据所述下载任务从所述发送终端下载对应的文件,并将下载到的文件发送至所述目标服务器以完成上传。The cache server is configured to establish a connection with the sending terminal after receiving the download task, download a corresponding file from the sending terminal according to the download task, and send the downloaded file to the target server. To complete the upload. 如权利要求9所述的文件反向上传系统,其特征在于,所述文件信息 包括:所述待发送文件的文件大小以及文件的统一资源标识符。A file reverse upload system according to claim 9, wherein said file information The file size of the file to be sent and the uniform resource identifier of the file are included. 如权利要求10所述的文件反向上传系统,其特征在于,所述目标服务器包括分配模块,其中,The file reverse uploading system according to claim 10, wherein said target server comprises an allocation module, wherein 所述分配模块,用于根据可用的缓存服务器的数量及所述文件信息对所述待发送文件进行分片,再根据所述分片生成所述下载任务,并将所述下载任务发送至所述缓存服务器。The allocating module is configured to slice the to-be-sent file according to the number of available cache servers and the file information, generate the download task according to the fragment, and send the download task to the The cache server. 如权利要求11所述的文件反向上传系统,其特征在于,所述缓存服务器的数量为多个,所述分配模块,还用于对不同的缓存服务器指定下载不同的分片。The file reverse uploading system of claim 11, wherein the number of the cache servers is plural, and the allocating module is further configured to download different shards to different cache servers. 如权利要求12所述的文件反向上传系统,其特征在于,缓存服务器包括:The file reverse uploading system of claim 12, wherein the cache server comprises: 连接模块,用于在接收到各自的下载任务后与所述发送终端建立连接;a connection module, configured to establish a connection with the sending terminal after receiving a respective download task; 下载模块,用于根据各自的下载任务向所述发送终端发送下载请求,并从所述发送终端下载指定的分片;a downloading module, configured to send a download request to the sending terminal according to a respective download task, and download the specified fragment from the sending terminal; 发送模块,用于在下载完成后,将下载到的指定分片发送至所述目标服务器以完成上传。The sending module is configured to send the downloaded specified fragment to the target server to complete the upload after the download is completed. 如权利要求13所述的文件反向上传系统,其特征在于,所述连接模块,还用于若在所述下载模块下载指定的分片过程中发生连接中断,则重新与所述发送终端建立连接;The file reverse uploading system according to claim 13, wherein the connection module is further configured to re-establish the connection with the transmitting terminal if a connection interruption occurs during the downloading of the specified fragmentation by the downloading module. connection; 所述下载模块,还用于继续下载指定的分片中未下载的部分。The downloading module is further configured to continue downloading the undownloaded part of the specified fragment. 如权利要求12或13所述的文件反向上传系统,其特征在于,所述目标服务器还包括组合模块,其中,The file reverse uploading system according to claim 12 or 13, wherein the target server further comprises a combination module, wherein 所述组合模块,用于在从多个缓存服务器中接收各自下载到的指定的分片时,将多个指定的分片组成完整的文件。 The combination module is configured to form a plurality of specified fragments into a complete file when receiving the specified fragments downloaded from the plurality of cache servers. 如权利要求12所述的文件反向上传系统,其特征在于,所述目标服务器还包括监控模块,所述监控模块用于监控多个缓存服务器的运行状态;The file reverse uploading system of claim 12, wherein the target server further comprises a monitoring module, wherein the monitoring module is configured to monitor an operating state of the plurality of cache servers; 其中,所述分配模块,还用于在任一缓存服务器出现故障时,将出现故障的缓存服务器的下载任务发送至其他可用的缓存服务器;The allocation module is further configured to send a download task of the failed cache server to another available cache server when any cache server fails; 其中,所述其它可用的缓存服务器,用于根据下载任务重新下载指定的分片。 The other available cache server is configured to re-download the specified fragment according to the download task.
PCT/CN2017/075003 2016-12-26 2017-02-27 Reverse file uploading method and system Ceased WO2018120397A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611214534.X 2016-12-26
CN201611214534.XA CN106453668A (en) 2016-12-26 2016-12-26 Reverse file uploading method and system

Publications (1)

Publication Number Publication Date
WO2018120397A1 true WO2018120397A1 (en) 2018-07-05

Family

ID=58215340

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/075003 Ceased WO2018120397A1 (en) 2016-12-26 2017-02-27 Reverse file uploading method and system

Country Status (2)

Country Link
CN (1) CN106453668A (en)
WO (1) WO2018120397A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113395332A (en) * 2021-05-25 2021-09-14 北京猿力教育科技有限公司 Data assembling method and related equipment
CN113726842A (en) * 2021-07-09 2021-11-30 北京房江湖科技有限公司 File uploading method and device, electronic equipment and storage medium
CN119299449A (en) * 2024-12-09 2025-01-10 杭州优云科技股份有限公司 A file downloading method, device, equipment and storage medium

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106453668A (en) * 2016-12-26 2017-02-22 网宿科技股份有限公司 Reverse file uploading method and system
CN109922142B (en) * 2019-02-21 2022-04-19 创新先进技术有限公司 File downloading method, device and system
CN112039932B (en) * 2019-06-03 2023-10-20 北京国电通网络技术有限公司 File transmission method and device
CN110855736B (en) * 2019-09-20 2023-04-18 深圳市有方科技股份有限公司 File transfer method, file transfer apparatus, and computer-readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101997924A (en) * 2010-11-22 2011-03-30 杨文军 Cloud storage file transfer protocol (CFTP)
CN104994131A (en) * 2015-05-19 2015-10-21 中国互联网络信息中心 Adaptive uploading acceleration method based on distributed agent servers
CN106453668A (en) * 2016-12-26 2017-02-22 网宿科技股份有限公司 Reverse file uploading method and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102651861B (en) * 2011-02-24 2014-08-20 腾讯科技(深圳)有限公司 Download method for mobile terminal, mobile terminal and proxy download server

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101997924A (en) * 2010-11-22 2011-03-30 杨文军 Cloud storage file transfer protocol (CFTP)
CN104994131A (en) * 2015-05-19 2015-10-21 中国互联网络信息中心 Adaptive uploading acceleration method based on distributed agent servers
CN106453668A (en) * 2016-12-26 2017-02-22 网宿科技股份有限公司 Reverse file uploading method and system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113395332A (en) * 2021-05-25 2021-09-14 北京猿力教育科技有限公司 Data assembling method and related equipment
CN113395332B (en) * 2021-05-25 2023-04-18 北京猿力教育科技有限公司 Data assembling method and related equipment
CN113726842A (en) * 2021-07-09 2021-11-30 北京房江湖科技有限公司 File uploading method and device, electronic equipment and storage medium
CN119299449A (en) * 2024-12-09 2025-01-10 杭州优云科技股份有限公司 A file downloading method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN106453668A (en) 2017-02-22

Similar Documents

Publication Publication Date Title
WO2018120397A1 (en) Reverse file uploading method and system
US20210281444A1 (en) Intelligent and dynamic overlay tunnel formation via automatic discovery of citrivity/sdwan peer in the datapath in a pure plug and play environment with zero networking configuration
US11611545B2 (en) RDP proxy support in presence of RDP server farm with session directory or broker
CN111448788B (en) Method for tracking SSL session state for SSL optimization of SAAS-based applications
US20200169394A1 (en) Systems and methods for secured web application data traffic
CN102833337B (en) A kind of ftp file is uploaded, method for down loading and device
WO2015165395A1 (en) Video playback method and apparatus
WO2017088384A1 (en) Method, apparatus and system for uploading live video
US20150363340A1 (en) Providing multiple synchronous serial console sessions using data buffering
US20140280768A1 (en) Migration of network connection under mobility
CN104010001B (en) In mobile terminal, the method and system connecting communication is carried out in similar networking request
US10129722B2 (en) Service processing method and network device
WO2018107387A1 (en) Data transmission method, device, system, electronic device, and computer program product
US11323529B2 (en) TCP fast open hardware support in proxy devices
CN102420863B (en) Rapid file distribution system, method thereof and apparatus thereof
US20220012110A1 (en) Networking-related system call interception and modification
CN106230992A (en) A kind of load-balancing method and load balancing node
WO2022166593A1 (en) Pont-to-point network scheduling method and system
WO2023197666A1 (en) Service scheduling method, system, vtep, storage medium, and computer program product
CN113949631B (en) Client disaster recovery processing method, system and electronic equipment
CN105681266B (en) A kind of communication cluster method and device of mediaphone MMTel
CN110351319B (en) Request message transmission method, device and transmission equipment
TW201644249A (en) Apparatus and method for performing transmission control protocol handshake
WO2018156789A1 (en) Channel management in scalable messaging system
CN105230074B (en) Video cache switching handling method, device and system

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: 17888842

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: 17888842

Country of ref document: EP

Kind code of ref document: A1