[go: up one dir, main page]

CN110703980A - A file transmission method and device - Google Patents

A file transmission method and device Download PDF

Info

Publication number
CN110703980A
CN110703980A CN201810745872.9A CN201810745872A CN110703980A CN 110703980 A CN110703980 A CN 110703980A CN 201810745872 A CN201810745872 A CN 201810745872A CN 110703980 A CN110703980 A CN 110703980A
Authority
CN
China
Prior art keywords
file
node server
target
cloud storage
storage device
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.)
Granted
Application number
CN201810745872.9A
Other languages
Chinese (zh)
Other versions
CN110703980B (en
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
Priority to CN201810745872.9A priority Critical patent/CN110703980B/en
Publication of CN110703980A publication Critical patent/CN110703980A/en
Application granted granted Critical
Publication of CN110703980B publication Critical patent/CN110703980B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • G06F3/0607Improving or facilitating administration, e.g. storage management by facilitating the process of upgrading existing storage systems, e.g. for improving compatibility between host and storage device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0643Management of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
    • 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]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明公开了一种文件传输方法及装置。所述方法包括:针对所述节点服务器集群中的任一节点服务器,该节点服务器可以先根据接收到的上传文件生成对应的元信息,然后将上传文件及元信息发送给云存储设备,以使云存储设备进行存储。如此,一方面,客户端集群中的多个客户端设备可以同时将上传文件发送给节点服务器集群,从而能够实现文件快速传输的目的,提高文件传输的速率;另一方面,各个节点服务器在接收到客户端设备发送的文件后,可以将文件同步存储到云存储设备中的同一存储位置,从而使得用户能够直接通过云存储设备对文件进行管理,便于用户对文件进行集中管理。

Figure 201810745872

The invention discloses a file transmission method and device. The method includes: for any node server in the node server cluster, the node server can first generate corresponding meta information according to the received upload file, and then send the upload file and meta information to the cloud storage device, so that the upload file and the meta information can be sent to the cloud storage device. Cloud storage device for storage. In this way, on the one hand, multiple client devices in the client cluster can send uploaded files to the node server cluster at the same time, so as to achieve the purpose of fast file transfer and improve the speed of file transfer; on the other hand, each node server is receiving After the file is sent to the client device, the file can be synchronously stored in the same storage location in the cloud storage device, so that the user can directly manage the file through the cloud storage device, which is convenient for the user to centrally manage the file.

Figure 201810745872

Description

一种文件传输方法及装置A file transmission method and device

技术领域technical field

本发明涉及通信技术领域,尤其涉及一种文件传输方法及装置。The present invention relates to the field of communication technologies, and in particular, to a file transmission method and device.

背景技术Background technique

随着互联网技术的快速发展,网络信息数据量也越来越大,企业存储海量数据的需求变得更加重要。传统意义上的文件存储系统存在着磁盘空间有限、处理能力不足等问题,无法满足用户大容量的存储需求。With the rapid development of Internet technology, the amount of network information data is also increasing, and the need for enterprises to store massive data has become more important. The file storage system in the traditional sense has problems such as limited disk space and insufficient processing power, which cannot meet the user's large-capacity storage requirements.

目前已有的一种解决方案是通过分布式存储的方式,将用户待存储的文件分布式地上传到多个节点服务器中,从而满足用户大容量的存储需要。比如,用户需要上传1TB的文件,若采用分布式的方法,可以将其中500GB的文件存储与节点服务器A,将另外500GB的文件存储与节点服务器B。然而,由于文件分布在不同的节点服务器中,用户对该文件进行管理时,需要同时对节点服务器A中存储的部分文件和节点服务器B中存储的文件进行管理,因此不能满足用户集中管理的需求。An existing solution is to upload the files to be stored by the user to multiple node servers in a distributed manner by means of distributed storage, so as to meet the user's large-capacity storage needs. For example, if a user needs to upload a 1TB file, if a distributed method is adopted, 500GB of the file can be stored with node server A, and the other 500GB of file can be stored with node server B. However, since files are distributed in different node servers, when users manage the files, they need to manage some files stored in node server A and files stored in node server B at the same time, so it cannot meet the needs of users for centralized management. .

另一种解决方案是采用集中式的云存储服务,将用户待存储的文件集中地上传到云存储设备中。然而,这种方式虽然能够满足用户对文件进行集中管理的需求,但是,由于云存储设备能够提供的上传速率是有限制的,因此,在文件的数据量超大的情况下,无法满足用户高并发地、快速地上传文件的需求。Another solution is to use a centralized cloud storage service to centrally upload files to be stored by users to a cloud storage device. However, although this method can meet the needs of users for centralized management of files, because the upload rate that the cloud storage device can provide is limited, when the data volume of the file is too large, it cannot meet the user's high concurrency. The need to upload files quickly and easily.

基于此,目前亟需一种文件传输方法,用于解决现有技术中在文件传输的过程中无法兼顾快速上传和集中管理的问题。Based on this, there is an urgent need for a file transfer method, which is used to solve the problem that fast upload and centralized management cannot be taken into account in the process of file transfer in the prior art.

发明内容SUMMARY OF THE INVENTION

本发明实施例提供一种文件传输方法及装置,以解决现有技术对数据进行分布式存储不能满足用户集中管理的需求的技术问题。Embodiments of the present invention provide a file transmission method and device to solve the technical problem that the distributed storage of data in the prior art cannot meet the needs of users for centralized management.

本发明实施例提供一种文件上传的方法,所述方法应用于分布式存储系统,所述分布式存储系统包括云存储设备、节点服务器集群以及客户端集群;所述节点服务器集群包括多个节点服务器,所述客户端集群包括多个客户端设备;所述方法包括:An embodiment of the present invention provides a method for uploading files, and the method is applied to a distributed storage system, where the distributed storage system includes a cloud storage device, a node server cluster, and a client cluster; the node server cluster includes multiple nodes A server, the client cluster includes multiple client devices; the method includes:

针对所述节点服务器集群中的任一节点服务器,所述节点服务器接收所述客户端集群中的任一客户端设备发送的上传文件;所述上传文件为所述客户端集群发送的上传文件集合中的文件,所述上传文件集合中各文件对应同一数据主体;For any node server in the node server cluster, the node server receives an upload file sent by any client device in the client cluster; the upload file is a set of upload files sent by the client cluster Each file in the uploaded file set corresponds to the same data subject;

所述节点服务器生成所述上传文件的元信息,所述元信息包括所述上传文件归属的数据主体;generating, by the node server, meta information of the uploaded file, where the meta information includes a data subject to which the uploaded file belongs;

所述节点服务器将所述上传文件以及所述元信息发送给所述云存储设备,以使所述云存储设备根据所述元信息确定目标存储区域,并将所述元信息和所述上传文件存储到所述目标存储区域;所述上传文件集合中的各上传文件均存储于所述目标存储区域。The node server sends the uploaded file and the meta information to the cloud storage device, so that the cloud storage device determines a target storage area according to the meta information, and sends the meta information and the uploaded file to the cloud storage device. are stored in the target storage area; each uploaded file in the uploaded file set is stored in the target storage area.

如此,针对数据量大且有传输时延要求的服务,一方面,客户端集群中的多个客户端设备可以同时将同一数据主体的上传文件集合发送给节点服务器集群,节点服务器集群中的多个节点服务器均提供可用带宽来接收客户端集群发送的上传文件集合,从而能够实现文件快速传输的目的,提高文件传输的速率;另一方面,为了保障该服务的数据在后期管理上的便捷,各个节点服务器在接收到客户端设备发送的上传文件后,可以将同一数据主体的上传文件同步存储到云存储设备中,相比于现有技术中多个客户端设备发送的文件分布式存储于多个节点服务器的方式而言,本发明实施例中用户能够直接通过云存储设备对文件进行管理,从而便于用户对文件进行集中管理。通过上述分析可以看出,可以为同一数据主体提供既能满足传输时延要求的数据上传服务,又可以满足集中存储的需求。In this way, for services with a large amount of data and transmission delay requirements, on the one hand, multiple client devices in the client cluster can send the uploaded file set of the same data subject to the node server cluster at the same time. Each node server provides available bandwidth to receive the uploaded file set sent by the client cluster, so as to achieve the purpose of fast file transfer and improve the file transfer rate; After each node server receives the upload file sent by the client device, it can synchronously store the upload file of the same data subject in the cloud storage device. In terms of the method of multiple node servers, in the embodiment of the present invention, the user can directly manage the files through the cloud storage device, thereby facilitating the centralized management of the files by the user. It can be seen from the above analysis that the same data subject can be provided with a data upload service that can not only meet the requirements of transmission delay, but also meet the needs of centralized storage.

在一种可能的实现方式中,所述节点服务器将所述上传文件以及所述元信息发送给所述云存储设备,包括:In a possible implementation manner, the node server sends the uploaded file and the meta information to the cloud storage device, including:

所述节点服务器向所述云存储设备发送同步请求,所述同步请求包括所述元信息;sending, by the node server, a synchronization request to the cloud storage device, where the synchronization request includes the meta information;

所述节点服务器接收到所述云存储设备返回的所述同步请求的响应消息后,向所述云存储设备发送所述上传文件;所述响应信息是所述云存储设备在对所述元信息进行存储后发送的确定接收到所述元信息后发送的。After receiving the response message of the synchronization request returned by the cloud storage device, the node server sends the uploaded file to the cloud storage device; the response information is that the cloud storage device is responding to the meta information. The determination of sending after storing is sent after receiving the meta-information.

如此,节点服务器可以先将元信息发送给云存储设备,由于元信息相较于上传文件而言,数据量较小,因此能够较为快速地传输到云存储设备中,并在带宽足够的情况下再传输上传文件,从而提高文件传输的效率。In this way, the node server can first send the meta information to the cloud storage device. Compared with the uploaded file, the meta information has a smaller amount of data, so it can be transferred to the cloud storage device relatively quickly, and when the bandwidth is sufficient Then transfer the uploaded file, thereby improving the efficiency of file transfer.

在一种可能的实现方式中,所述节点服务器将所述上传文件以及所述元信息发送给所述云存储设备之后,所述方法还包括:In a possible implementation manner, after the node server sends the uploaded file and the meta information to the cloud storage device, the method further includes:

所述节点服务器删除所述上传文件和所述元信息。如此,能够减轻节点服务器的存储负担,避免云存储设备和节点服务器中存储的文件内容重复的问题。The node server deletes the uploaded file and the meta information. In this way, the storage burden of the node server can be reduced, and the problem of duplication of file contents stored in the cloud storage device and the node server can be avoided.

本发明实施例提供一种文件下载的方法,所述方法应用于分布式存储系统,所述分布式存储系统包括云存储设备、节点服务器集群以及客户端集群;所述节点服务器集群包括多个节点服务器,所述客户端集群包括多个客户端设备;所述方法包括:An embodiment of the present invention provides a method for downloading files. The method is applied to a distributed storage system, where the distributed storage system includes a cloud storage device, a node server cluster, and a client cluster; the node server cluster includes multiple nodes A server, the client cluster includes multiple client devices; the method includes:

针对所述客户端集群中的任一客户端设备,所述客户端设备向所述云存储设备发送下载请求,所述下载请求包括目标文件标识;For any client device in the client cluster, the client device sends a download request to the cloud storage device, where the download request includes a target file identifier;

所述客户端设备接收所述云存储设备发送的所述下载请求的响应消息,并根据所述响应消息中包括的目标节点服务器的位置信息,从所述目标节点服务器中获取所述目标文件;The client device receives a response message of the download request sent by the cloud storage device, and acquires the target file from the target node server according to the location information of the target node server included in the response message;

其中,所述目标节点服务器的位置信息是所述云存储设备在确定未存储有与所述目标文件标识对应的目标文件后,根据文件标识与节点服务器的位置信息的对应关系确定的。The location information of the target node server is determined according to the correspondence between the file identifier and the location information of the node server after the cloud storage device determines that no target file corresponding to the target file identifier is stored.

如此,客户端设备在下载目标文件时,若该文件尚未同步存储到云存储设备中,客户端设备仍可以从对应的节点服务器中下载该目标文件,从而避免文件未同步或在文件同步过程中,客户端设备无法下载目标文件的情况。In this way, when the client device downloads the target file, if the file has not been synchronously stored in the cloud storage device, the client device can still download the target file from the corresponding node server, thereby preventing the file from being unsynchronized or during the file synchronization process. , the client device cannot download the target file.

在一种可能的实现方式中,所述方法还包括:In a possible implementation, the method further includes:

所述客户端设备接收所述云存储设备发送的目标文件,所述目标文件是所述云存储设备中存储的与所述目标文件标识对应的文件。The client device receives a target file sent by the cloud storage device, where the target file is a file stored in the cloud storage device and corresponding to the target file identifier.

如此,客户端设备在下载目标文件时,若该文件已同步存储到云存储设备中,则客户端设备可以直接获取目标文件。In this way, when the client device downloads the target file, if the file has been synchronously stored in the cloud storage device, the client device can directly obtain the target file.

本发明实施例提供一种文件上传的方法,所述方法应用于分布式存储系统,所述分布式存储系统包括云存储设备、节点服务器集群以及客户端集群;所述节点服务器集群包括多个节点服务器,所述客户端集群包括多个客户端设备;所述方法包括:An embodiment of the present invention provides a method for uploading files, and the method is applied to a distributed storage system, where the distributed storage system includes a cloud storage device, a node server cluster, and a client cluster; the node server cluster includes multiple nodes A server, the client cluster includes multiple client devices; the method includes:

所述云存储设备接收所述节点服务器集群中任一节点服务器发送的上传文件,以及所述上传文件的元信息;所述元信息包括所述上传文件归属的数据主体;所述上传文件为所述客户端集群发送的上传文件集合中的文件,所述上传文件集合中各文件对应同一数据主体;The cloud storage device receives the upload file sent by any node server in the node server cluster, and the meta information of the upload file; the meta information includes the data subject to which the upload file belongs; the upload file is all the files in the upload file set sent by the client cluster, and each file in the upload file set corresponds to the same data subject;

所述云存储设备根据所述元信息以及预设的数据实体和存储区域的对应关系,确定所述上传文件的目标存储区域;所述目标存储区域用于存储所述上传文件集合中的各上传文件;The cloud storage device determines the target storage area of the uploaded file according to the meta information and the preset correspondence between the data entity and the storage area; the target storage area is used to store each upload in the set of uploaded files. document;

所述云存储设备将所述上传文件和所述元信息存储至所述目标存储区域。The cloud storage device stores the uploaded file and the meta information in the target storage area.

如此,一方面,客户端集群中的多个客户端设备可以同时将上传文件发送给节点服务器集群,从而能够实现文件快速传输的目的,提高文件传输的速率;另一方面,各个节点服务器在接收到客户端设备发送的文件后,可以将文件同步存储到云存储设备中,相比于现有技术中多个客户端设备发送的文件分布式地存储于多个节点服务器的方式而言,本发明实施例中用户能够直接通过云存储设备中对文件进行管理,从而便于用户对文件进行集中管理。In this way, on the one hand, multiple client devices in the client cluster can send uploaded files to the node server cluster at the same time, so as to achieve the purpose of fast file transfer and improve the speed of file transfer; on the other hand, each node server is receiving After the files are sent to the client device, the files can be stored in the cloud storage device synchronously. Compared with the prior art, the files sent by multiple client devices are stored in multiple node servers in a distributed manner. In the embodiment of the invention, the user can directly manage the files in the cloud storage device, thereby facilitating the user to perform centralized management of the files.

在一种可能的实现方式中,所述云存储设备接收所述节点服务器集群中任一节点服务器发送的上传文件,以及所述上传文件的元信息,包括:In a possible implementation manner, the cloud storage device receives an uploaded file sent by any node server in the node server cluster, and meta information of the uploaded file, including:

所述云存储设备接收所述节点服务器发送的同步请求,所述同步请求包括所述元信息;receiving, by the cloud storage device, a synchronization request sent by the node server, where the synchronization request includes the meta information;

所述云存储设备在确定存在可用的传输带宽后,向所述节点服务器返回所述同步请求的响应消息,所述响应消息用于指示所述节点服务器向所述云存储设备发送所述上传文件;After determining that there is available transmission bandwidth, the cloud storage device returns a response message for the synchronization request to the node server, where the response message is used to instruct the node server to send the uploaded file to the cloud storage device ;

所述云储存设备接收所述节点服务器发送的所述上传文件。The cloud storage device receives the upload file sent by the node server.

如此,节点服务器可以先将元信息发送给云存储设备,由于元信息相较于上传文件而言,数据量较小,因此能够较为快速地传输到云存储设备中,并在带宽足够的情况下再传输上传文件,从而提高文件传输的效率。In this way, the node server can first send the meta information to the cloud storage device. Compared with the uploaded file, the meta information has a smaller amount of data, so it can be transferred to the cloud storage device relatively quickly, and when the bandwidth is sufficient Then transfer the uploaded file, thereby improving the efficiency of file transfer.

在一种可能的实现方式中,所述方法还包括:In a possible implementation, the method further includes:

所述云存储设备接收所述客户端集群中的任一客户端设备发送的下载请求,所述下载请求包括目标文件标识;receiving, by the cloud storage device, a download request sent by any client device in the client cluster, where the download request includes a target file identifier;

所述云存储设备若确定未存储有与所述目标文件标识对应的目标文件,则根据文件标识与节点服务器的位置信息的对应关系,确定目标节点服务器的位置信息;所述对应关系是根据元信息确定的;If the cloud storage device determines that the target file corresponding to the target file identifier is not stored, the location information of the target node server is determined according to the corresponding relationship between the file identifier and the location information of the node server; the corresponding relationship is based on the metadata. information determined;

所述云存储设备向所述客户端发送所述下载请求的响应消息,所述响应消息包括所述目标节点服务器的位置信息,所述响应消息用于指示所述客户端设备根据所述目标节点服务器的位置信息从所述目标节点服务器中获取所述目标文件。The cloud storage device sends a response message of the download request to the client, where the response message includes the location information of the target node server, and the response message is used to instruct the client device to The location information of the server obtains the target file from the target node server.

如此,客户端设备在下载目标文件时,若该文件尚未同步存储到云存储设备中,客户端设备仍可以从对应的节点服务器中下载该目标文件,从而避免文件未同步或在文件同步过程中,客户端设备无法下载目标文件的情况。In this way, when the client device downloads the target file, if the file has not been synchronously stored in the cloud storage device, the client device can still download the target file from the corresponding node server, thereby preventing the file from being unsynchronized or during the file synchronization process. , the client device cannot download the target file.

在一种可能的实现方式中,所述方法还包括:In a possible implementation, the method further includes:

所述云存储设备若确定存储有与所述目标文件标识对应的目标文件,则向所述客户端发送所述目标文件。If it is determined that a target file corresponding to the target file identifier is stored, the cloud storage device sends the target file to the client.

如此,客户端设备在下载目标文件时,若该文件已同步存储到云存储设备中,则客户端设备可以直接获取目标文件。In this way, when the client device downloads the target file, if the file has been synchronously stored in the cloud storage device, the client device can directly obtain the target file.

本发明实施例提供一种服务器,所述服务器包括:An embodiment of the present invention provides a server, and the server includes:

收发单元,用于接收所述客户端集群中的任一客户端设备发送的上传文件;所述上传文件为所述客户端集群发送的上传文件集合中的文件,所述上传文件集合中各文件对应同一数据主体;A transceiver unit, configured to receive an upload file sent by any client device in the client cluster; the upload file is a file in the upload file set sent by the client cluster, and each file in the upload file set correspond to the same data subject;

处理单元,用于生成所述上传文件的元信息,所述元信息包括所述上传文件归属的数据主体;a processing unit, configured to generate meta information of the uploaded file, where the meta information includes the data subject to which the uploaded file belongs;

所述收发单元,用于将所述上传文件以及所述元信息发送给所述云存储设备,以使所述云存储设备根据所述元信息确定目标存储区域,并将所述元信息和所述上传文件存储到所述目标存储区域;所述上传文件集合中的各上传文件均存储于所述目标存储区域。The transceiver unit is configured to send the uploaded file and the meta information to the cloud storage device, so that the cloud storage device determines a target storage area according to the meta information, and sends the meta information and the meta information to the cloud storage device. The uploaded file is stored in the target storage area; each uploaded file in the upload file set is stored in the target storage area.

在一种可能的实现方式中,所述收发单元具体用于:In a possible implementation manner, the transceiver unit is specifically used for:

向所述云存储设备发送同步请求,所述同步请求包括所述元信息;并在接收到所述云存储设备返回的所述同步请求的响应消息后,向所述云存储设备发送所述上传文件;所述响应信息是所述云存储设备确定存在可用的传输带宽时发送的。Send a synchronization request to the cloud storage device, where the synchronization request includes the meta information; and after receiving a response message for the synchronization request returned by the cloud storage device, send the upload to the cloud storage device file; the response information is sent when the cloud storage device determines that there is available transmission bandwidth.

在一种可能的实现方式中,所述处理单元还用于:In a possible implementation manner, the processing unit is further configured to:

删除所述上传文件和所述元信息。Delete the uploaded file and the meta information.

本发明实施例提供一种客户端设备,所述客户端设备包括:An embodiment of the present invention provides a client device, where the client device includes:

发送单元,用于向所述云存储设备发送下载请求,所述下载请求包括目标文件标识;a sending unit, configured to send a download request to the cloud storage device, where the download request includes a target file identifier;

接收单元,用于接收所述云存储设备发送的所述下载请求的响应消息,并根据所述响应消息中包括的目标节点服务器的位置信息,从所述目标节点服务器中获取所述目标文件;a receiving unit, configured to receive a response message of the download request sent by the cloud storage device, and obtain the target file from the target node server according to the location information of the target node server included in the response message;

其中,所述目标节点服务器的位置信息是所述云存储设备在确定未存储有与所述目标文件标识对应的目标文件后,根据文件标识与节点服务器的位置信息的对应关系确定的;所述对应关系是根据元信息确定的。The location information of the target node server is determined according to the correspondence between the file identifier and the location information of the node server after the cloud storage device determines that the target file corresponding to the target file identifier is not stored; the Correspondence is determined based on meta information.

在一种可能的实现方式中,所述接收单元还用于:In a possible implementation manner, the receiving unit is further configured to:

接收所述云存储设备发送的目标文件,所述目标文件是所述云存储设备中存储的与所述目标文件标识对应的文件。A target file sent by the cloud storage device is received, where the target file is a file stored in the cloud storage device and corresponding to the target file identifier.

本发明实施例提供一种云存储设备,所述云存储设备包括:An embodiment of the present invention provides a cloud storage device, and the cloud storage device includes:

收发单元,用于接收所述节点服务器集群中任一节点服务器发送的上传文件,以及所述上传文件的元信息;所述元信息包括所述上传文件归属的数据主体;所述上传文件为所述客户端集群发送的上传文件集合中的文件,所述上传文件集合中各文件对应同一数据主体;A transceiver unit, configured to receive an upload file sent by any node server in the node server cluster, and meta information of the upload file; the meta information includes the data subject to which the upload file belongs; the upload file is all the files in the upload file set sent by the client cluster, and each file in the upload file set corresponds to the same data subject;

处理单元,用于根据所述元信息以及预设的数据实体和存储区域的对应关系,确定所述上传文件的目标存储区域;所述目标存储区域用于存储所述上传文件集合中的各上传文件;以及将所述上传文件和所述元信息存储至所述目标存储区域。a processing unit, configured to determine the target storage area of the uploaded file according to the meta-information and the preset correspondence between the data entity and the storage area; the target storage area is used to store each uploaded file in the set of uploaded files file; and storing the uploaded file and the meta information to the target storage area.

在一种可能的实现方式中,所述收发单元具体用于:In a possible implementation manner, the transceiver unit is specifically used for:

接收所述节点服务器发送的同步请求,所述同步请求包括所述元信息;并在确定存在可用的传输带宽后,向所述节点服务器返回所述同步请求的响应消息,所述响应消息用于指示所述节点服务器向所述云存储设备发送所述上传文件;以及接收所述节点服务器发送的所述上传文件。Receive a synchronization request sent by the node server, where the synchronization request includes the meta information; and after determining that there is available transmission bandwidth, return a response message of the synchronization request to the node server, where the response message is used for instructing the node server to send the upload file to the cloud storage device; and receiving the upload file sent by the node server.

在一种可能的实现方式中,所述收发单元还用于:In a possible implementation manner, the transceiver unit is further used for:

接收所述客户端集群中的任一客户端设备发送的下载请求,所述下载请求包括目标文件标识;receiving a download request sent by any client device in the client cluster, where the download request includes a target file identifier;

所述处理单元还用于:The processing unit is also used to:

若确定未存储有与所述目标文件标识对应的目标文件,则根据文件标识与节点服务器的位置信息的对应关系,确定目标节点服务器的位置信息;所述对应关系是根据元信息确定的;If it is determined that the target file corresponding to the target file identifier is not stored, the location information of the target node server is determined according to the corresponding relationship between the file identifier and the location information of the node server; the corresponding relationship is determined according to the meta information;

所述收发单元,还用于向所述客户端发送所述下载请求的响应消息,所述响应消息包括所述目标节点服务器的位置信息,所述响应消息用于指示所述客户端设备根据所述目标节点服务器的位置信息从所述目标节点服务器中获取所述目标文件。The transceiver unit is further configured to send a response message of the download request to the client, where the response message includes the location information of the target node server, and the response message is used to instruct the client device to The target file is obtained from the target node server according to the location information of the target node server.

在一种可能的实现方式中,所述收发单元还用于:In a possible implementation manner, the transceiver unit is further used for:

若确定存储有与所述目标文件标识对应的目标文件,则向所述客户端发送所述目标文件。If it is determined that a target file corresponding to the target file identifier is stored, the target file is sent to the client.

本申请实施例的还提供一种装置,该装置具有实现上文所描述的文件传输方法的功能。该功能可以通过硬件执行相应的软件实现,在一种可能的设计中,该装置包括:处理器、收发器、存储器;该存储器用于存储计算机执行指令,该收发器用于实现该装置与其他通信实体进行通信,该处理器与该存储器通过该总线连接,当该装置运行时,该处理器执行该存储器存储的该计算机执行指令,以使该装置执行上文所描述的文件传输方法。An embodiment of the present application further provides an apparatus, which has the function of implementing the file transmission method described above. This function can be implemented by executing corresponding software in hardware. In a possible design, the device includes: a processor, a transceiver, and a memory; the memory is used to store computer-executed instructions, and the transceiver is used to realize the communication between the device and other devices The entity communicates, the processor is connected to the memory through the bus, and when the apparatus is running, the processor executes the computer-executable instructions stored in the memory to cause the apparatus to perform the file transfer method described above.

本发明实施例还提供一种计算机存储介质,所述存储介质中存储软件程序,该软件程序在被一个或多个处理器读取并执行时实现上述各种可能的实现方式中所描述的文件传输方法。An embodiment of the present invention further provides a computer storage medium, where a software program is stored in the storage medium, and when the software program is read and executed by one or more processors, the files described in the above various possible implementation manners are implemented transfer method.

本发明实施例还提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述各种可能的实现方式中所描述的文件传输方法。Embodiments of the present invention also provide a computer program product containing instructions, which, when executed on a computer, cause the computer to execute the file transfer method described in the various possible implementations above.

附图说明Description of drawings

为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简要介绍。In order to illustrate the technical solutions in the embodiments of the present invention more clearly, the following will briefly introduce the accompanying drawings used in the description of the embodiments.

图1为本发明实施例适用的一种系统架构示意图;1 is a schematic diagram of a system architecture to which an embodiment of the present invention is applicable;

图2为本发明实施例提供一种文件传输方法所对应的流程示意图;2 is a schematic flowchart corresponding to a file transmission method provided by an embodiment of the present invention;

图3为本发明实施例提供的一种客户端设备上传文件的方法所对应的流程示意图;3 is a schematic flowchart corresponding to a method for uploading a file by a client device according to an embodiment of the present invention;

图4为本发明实施例提供的另一种系统架构示意图;4 is a schematic diagram of another system architecture provided by an embodiment of the present invention;

图5为本发明实施例提供的一种节点服务器同步文件的方法对应的流程示意图;5 is a schematic flowchart corresponding to a method for synchronizing files by a node server according to an embodiment of the present invention;

图6为本发明实施例提供另一种文件传输方法所对应的流程示意图;6 is a schematic flowchart corresponding to another file transmission method provided by an embodiment of the present invention;

图7为本发明实施例二中所涉及到的整体性流程的示意图;7 is a schematic diagram of the overall flow involved in Embodiment 2 of the present invention;

图8为本发明实施例提供一种服务器的结构示意图;FIG. 8 is a schematic structural diagram of a server according to an embodiment of the present invention;

图9为本发明实施例提供一种客户端设备的结构示意图;FIG. 9 is a schematic structural diagram of a client device according to an embodiment of the present invention;

图10为本发明实施例提供一种云存储设备的结构示意图。FIG. 10 is a schematic structural diagram of a cloud storage device according to an embodiment of the present invention.

具体实施方式Detailed ways

下面结合说明书附图对本申请进行具体说明,方法实施例中的具体操作方法也可以应用于装置实施例中。The present application will be specifically described below with reference to the accompanying drawings, and the specific operation methods in the method embodiments can also be applied to the device embodiments.

图1示例性示出了本发明实施例适用的一种系统架构示意图,如图1所示,本发明实施例适用的系统架构100包括云存储设备101、节点服务器集群102以及客户端集群103。其中,该系统100可以为分布式存储系统;节点服务器集群102可以包括多个节点服务器,例如图1中示出的节点服务器1021、节点服务器1022和节点服务器1023;客户端集群103也可以包括多个客户端设备,例如图1中示出的客户端设备1031、客户端设备1032和客户端设备1033。FIG. 1 schematically shows a schematic diagram of a system architecture to which an embodiment of the present invention is applicable. As shown in FIG. 1 , a system architecture 100 to which the embodiment of the present invention is applicable includes a cloud storage device 101 , a node server cluster 102 and a client cluster 103 . The system 100 may be a distributed storage system; the node server cluster 102 may include multiple node servers, such as the node server 1021, the node server 1022 and the node server 1023 shown in FIG. 1 ; the client cluster 103 may also include multiple node servers client devices, such as client device 1031 , client device 1032 , and client device 1033 shown in FIG. 1 .

需要说明的是,本申请中的客户端设备可以为多种类型的设备,例如,例如笔记本电脑、智能手机、平板电脑、智能电视等,具体不做限定。It should be noted that the client device in this application may be various types of devices, for example, a notebook computer, a smart phone, a tablet computer, a smart TV, etc., which are not specifically limited.

实施例一:Example 1:

基于图1所示的系统架构,图2示例性示出了本发明实施例提供一种文件传输方法所对应的流程示意图,具体包括以下步骤:Based on the system architecture shown in FIG. 1 , FIG. 2 exemplarily shows a schematic flowchart corresponding to a file transfer method provided by an embodiment of the present invention, which specifically includes the following steps:

步骤201,节点服务器接收客户端集群中的任一客户端设备发送的上传文件;上传文件为所述客户端集群发送的上传文件集合中的文件,所述上传文件集合中各文件对应同一数据主体。Step 201: The node server receives an upload file sent by any client device in the client cluster; the upload file is a file in the upload file set sent by the client cluster, and each file in the upload file set corresponds to the same data subject .

步骤202,节点服务器生成所述上传文件的元信息,所述元信息包括所述上传文件归属的数据主体。Step 202: The node server generates meta information of the uploaded file, where the meta information includes the data subject to which the uploaded file belongs.

步骤203,节点服务器将上传文件以及元信息发送给所述云存储设备。Step 203, the node server sends the uploaded file and meta information to the cloud storage device.

步骤204,云存储设备接收节点服务器发送的上传文件,以及所述上传文件的元信息。Step 204, the cloud storage device receives the uploaded file sent by the node server and the meta information of the uploaded file.

步骤205,云存储设备根据元信息以及预设的数据实体和存储区域的对应关系,确定所述上传文件的目标存储区域。Step 205, the cloud storage device determines the target storage area of the uploaded file according to the meta information and the preset correspondence between the data entity and the storage area.

步骤206,云存储设备将上传文件和元信息存储至目标存储区域。Step 206, the cloud storage device stores the uploaded file and meta information in the target storage area.

需要说明的是,上述步骤201至步骤203可以由图1中示出的节点服务器集群102中的任一节点服务器执行,比如,可以由图1中示出的节点服务器1021执行;上述步骤204至步骤206可以由图1中示出的云存储设备101执行。It should be noted that the above steps 201 to 203 can be executed by any node server in the node server cluster 102 shown in FIG. 1 , for example, can be executed by the node server 1021 shown in FIG. 1 ; Step 206 may be performed by the cloud storage device 101 shown in FIG. 1 .

如此,针对数据量大且有传输时延要求的服务,一方面,客户端集群中的多个客户端设备可以同时将同一数据主体的上传文件集合发送给节点服务器集群,节点服务器集群中的多个节点服务器均提供可用带宽来接收客户端集群发送的上传文件集合,从而能够实现文件快速传输的目的,提高文件传输的速率;另一方面,为了保障该服务的数据在后期管理上的便捷,各个节点服务器在接收到客户端设备发送的上传文件后,可以将同一数据主体的上传文件同步存储到云存储设备中,相比于现有技术中多个客户端设备发送的文件分布式存储于多个节点服务器的方式而言,本发明实施例中用户能够直接通过云存储设备对文件进行管理,从而便于用户对文件进行集中管理。通过上述分析可以看出,可以为同一数据主体提供既能满足传输时延要求的数据上传服务,又可以满足集中存储的需求。In this way, for services with a large amount of data and transmission delay requirements, on the one hand, multiple client devices in the client cluster can send the uploaded file set of the same data subject to the node server cluster at the same time. Each node server provides available bandwidth to receive the uploaded file set sent by the client cluster, so as to achieve the purpose of fast file transfer and improve the file transfer rate; After each node server receives the upload file sent by the client device, it can synchronously store the upload file of the same data subject in the cloud storage device. In terms of the method of multiple node servers, in the embodiment of the present invention, the user can directly manage the files through the cloud storage device, thereby facilitating the centralized management of the files by the user. It can be seen from the above analysis that the same data subject can be provided with a data upload service that can not only meet the requirements of transmission delay, but also meet the needs of centralized storage.

具体来说,在执行步骤201之前,客户端与节点服务器之间的通讯关系包括多种,如节点服务器可以接收客户端集群中的任一客户端设备发送的上传文件,一个示例中,节点服务器可以接收图1中示出的客户端设备1031发送的上传文件,也可以接收客户端设备1032发送的上传文件,还可以接收客户端设备1033发送的上传文件。Specifically, before step 201 is executed, there are various communication relationships between the client and the node server. For example, the node server can receive the uploaded file sent by any client device in the client cluster. In an example, the node server The upload file sent by the client device 1031 shown in FIG. 1 can be received, the upload file sent by the client device 1032 can also be received, and the upload file sent by the client device 1033 can also be received.

另一个示例中,节点服务器也可以接收图1中示出的客户端设备1031、客户端设备1032和客户端设备1033中指定的客户端设备发送的上传文件。比如,客户端设备可以根据自身的位置信息向指定的节点服务器发送上传文件。举个例子,如图3所示,为本发明实施例提供一种客户端设备确定上传文件对应的节点服务器的方法流程示意图,该方法可以由图1中示出的客户端设备1031执行,包括如下步骤:In another example, the node server may also receive upload files sent by the client devices specified in the client device 1031 , the client device 1032 , and the client device 1033 shown in FIG. 1 . For example, the client device can send the upload file to the designated node server according to its own location information. For example, as shown in FIG. 3, an embodiment of the present invention provides a schematic flowchart of a method for a client device to determine a node server corresponding to an uploaded file. The method can be executed by the client device 1031 shown in FIG. 1, including: Follow the steps below:

步骤301,客户端设备向DNS服务器发送上传请求,所述上传请求包括客户端设备的位置信息。Step 301: The client device sends an upload request to the DNS server, where the upload request includes location information of the client device.

其中,客户端设备的位置信息可以是指客户端设备的IP地址,或者,也可以是指客户端设备的地理位置。如表1所示,为客户端设备的位置信息的一种示例。从表1示出的内容可知,每个客户端设备都具有对应的地理位置,以表1示出的客户端设备1为例,客户端设备1对应的IP地址为:222.64.232.189,对应的地理位置为:上海市闵行区,其它的客户端设备的位置信息具体可参考表,在此不再具体描述。The location information of the client device may refer to the IP address of the client device, or may also refer to the geographic location of the client device. As shown in Table 1, it is an example of the location information of the client device. It can be seen from the content shown in Table 1 that each client device has a corresponding geographic location. Taking the client device 1 shown in Table 1 as an example, the corresponding IP address of the client device 1 is: 222.64.232.189, the corresponding The geographic location is: Minhang District, Shanghai. For the location information of other client devices, please refer to the table for details, which will not be described in detail here.

表1:客户端设备的位置信息的一种示例Table 1: An example of location information for a client device

客户端设备的变化Changes in client devices IP地址IP address 地理位置Geographical location 客户端设备1Client Device 1 222.64.232.189222.64.232.189 上海市闵行区Minhang District, Shanghai 客户端设备2Client Device 2 220.155.1.196220.155.1.196 北京市海淀区Haiding district, Beijing 客户端设备3Client Device 3 112.10.39.255112.10.39.255 杭州市萧山区Xiaoshan District, Hangzhou 客户端设备4Client Device 4 221.226.140.255221.226.140.255 南京市玄武区Xuanwu District, Nanjing 客户端设备5Client Device 5 218.82.20.255218.82.20.255 上海市静安区Jing'an District, Shanghai

步骤302,DNS服务器根据客户端设备的位置信息从节点服务器集群中确定出目标节点服务器。Step 302, the DNS server determines the target node server from the node server cluster according to the location information of the client device.

本发明实施例中,DNS服务器可以用于为客户端集群中的任一客户端设备提供对应的节点服务器。如图4所示,为本发明实施例提供的另一种系统架构示意图,该系统架构100包括云存储设备101、节点服务器集群102、客户端集群103和DNS服务器104。其中,DNS服务器104与客户端集群103和节点服务器集群102连接,从而使得DNS服务器104可以根据客户端集群103中的任一客户端设备(如客户端设备1031)的位置信息,从节点服务器集群102中确定出对应的节点服务器(如节点服务器1021),进而使得客户端设备1031可以与节点服务器1021进行通信。In this embodiment of the present invention, the DNS server may be used to provide a corresponding node server for any client device in the client cluster. As shown in FIG. 4 , which is a schematic diagram of another system architecture provided by an embodiment of the present invention, the system architecture 100 includes a cloud storage device 101 , a node server cluster 102 , a client cluster 103 , and a DNS server 104 . The DNS server 104 is connected to the client cluster 103 and the node server cluster 102, so that the DNS server 104 can, according to the location information of any client device in the client cluster 103 (eg The corresponding node server (eg, the node server 1021 ) is determined in 102 , so that the client device 1031 can communicate with the node server 1021 .

举个例子,以表1中示出的客户端设备1为例,客户端设备对应的位置信息为上海市闵行区,则DNS服务器可以从节点服务器集群中筛选出位置信息同为上海市闵行区的节点服务器,并将这一节点服务器作为客户端设备1对应的节点服务器。For example, taking the client device 1 shown in Table 1 as an example, the location information corresponding to the client device is Minhang District, Shanghai, then the DNS server can filter out the location information from the node server cluster, which is also Minhang District, Shanghai. the node server, and use this node server as the node server corresponding to the client device 1.

步骤303,DNS服务器向客户端设备发送上传请求的响应消息,所述响应消息包括所述目标节点服务器的位置信息。Step 303: The DNS server sends a response message of the upload request to the client device, where the response message includes the location information of the target node server.

步骤304,客户端设备接收DNS服务器发送的上传请求的响应消息。Step 304, the client device receives the response message of the upload request sent by the DNS server.

步骤305,客户端设备根据目标节点服务器的位置信息,向目标节点服务器发送上传文件。Step 305, the client device sends the upload file to the target node server according to the location information of the target node server.

需要说明的是,步骤301至步骤305所描述的方法仅为一种示例,在其它可能的示例中,本领域技术人员也可以根据经验和实际情况来确定目标节点服务器,比如,可以根据节点服务器集群中的节点服务器的负载信息来确定目标节点服务器,具体不做限定。It should be noted that the method described in steps 301 to 305 is only an example, and in other possible examples, those skilled in the art can also determine the target node server according to experience and actual conditions. The load information of the node servers in the cluster is used to determine the target node server, which is not specifically limited.

步骤201中,对于客户端集群而言,客户端集群上传的所有文件可以看作是上传文件集合,客户端集群中的每个客户端上传的文件即为上传文件集合中的文件,且,上传文件集合中的各文件对应同一数据主体。In step 201, for the client cluster, all files uploaded by the client cluster can be regarded as a set of uploaded files, and the files uploaded by each client in the client cluster are the files in the set of uploaded files, and the upload Each file in the file collection corresponds to the same data subject.

其中,数据主体可以是指每个文件对应的类型,比如公司类型、行业类型等,本领域技术人员可以根据实际情况来确定。比如,上传文件1是A公司的文件,则上传文件1对应的数据实体可以为A公司;上传文件2是B领域的文件,则上传文件2对应的数据实体可以为B领域。The data subject may refer to the type corresponding to each file, such as company type, industry type, etc., which can be determined by those skilled in the art according to the actual situation. For example, if uploaded file 1 is a file of company A, the data entity corresponding to uploaded file 1 can be company A; uploaded file 2 is a file in domain B, then the data entity corresponding to uploaded file 2 can be domain B.

步骤202中,元信息是根据上传文件生成的,元信息可以包括上传文件归属的数据主体,也可以包括上传文件标识,还可以包括节点服务器的位置信息,具体不做限定。In step 202, the meta information is generated according to the uploaded file, and the meta information may include the data subject to which the uploaded file belongs, the uploaded file identifier, and the location information of the node server, which is not specifically limited.

具体实施过程中,节点服务器可以直接将上传文件归属的数据主体、上传文件标识和节点服务器的位置信息作为元信息;或者,节点服务器也可以对上传文件归属的数据主体、上传文件标识和节点服务器的位置信息进行加密,并将加密后的信息作为元信息,具体不做限定。In the specific implementation process, the node server can directly use the data subject to which the uploaded file belongs, the uploaded file identifier and the location information of the node server as meta information; The location information is encrypted, and the encrypted information is used as meta information, which is not specifically limited.

步骤203中,节点服务器可以直接将上传文件以及元信息一起发送给云存储设备;或者,节点服务器也可以先将元信息发送给云存储设备,再将上传文件发送给云存储设备;节点服务器也可以是收到上传文件后设定时间内将上传文件发送给云存储设备。具体如图5所示,为本发明实施例提供的一种节点服务器同步文件的方法对应的流程示意图,包括如下步骤:In step 203, the node server may directly send the uploaded file and the meta information to the cloud storage device; alternatively, the node server may first send the meta information to the cloud storage device, and then send the uploaded file to the cloud storage device; the node server may also send the meta information to the cloud storage device. It can be to send the uploaded file to the cloud storage device within a set time after receiving the uploaded file. Specifically, as shown in FIG. 5 , a schematic flowchart corresponding to a method for synchronizing files by a node server provided by an embodiment of the present invention includes the following steps:

步骤501,节点服务器向云存储设备发送同步请求,所述同步请求包括元信息。Step 501: The node server sends a synchronization request to a cloud storage device, where the synchronization request includes meta information.

步骤502,云存储设备接收节点服务器发送的同步请求。Step 502, the cloud storage device receives the synchronization request sent by the node server.

步骤503,云存储设备在确定存在可用的传输带宽后,向节点服务器返回同步请求的响应消息。Step 503, after determining that there is available transmission bandwidth, the cloud storage device returns a response message of the synchronization request to the node server.

其中,云存储设备在向节点服务器返回同步请求的响应消息之前,还可以先判断是否存在可用的传输带宽,并在确定存在可用的传输带宽的情况下,向节点服务器返回响应消息,从而能够提高节点服务器向云存储设备发送上传文件的速率。The cloud storage device can also determine whether there is available transmission bandwidth before returning a response message for the synchronization request to the node server, and return a response message to the node server when it is determined that there is an available transmission bandwidth, thereby improving the performance of the node server. The rate at which the node server sends uploaded files to the cloud storage device.

步骤504,节点服务器接收到同步请求的响应消息后,向云存储设备发送上传文件。Step 504: After receiving the response message of the synchronization request, the node server sends the upload file to the cloud storage device.

如此,节点服务器可以先将元信息发送给云存储设备,由于元信息相较于上传文件而言,数据量较小,因此能够较为快速地传输到云存储设备中,并在带宽足够的情况下再传输上传文件,从而提高文件传输的效率。In this way, the node server can first send the meta information to the cloud storage device. Compared with the uploaded file, the meta information has a smaller amount of data, so it can be transferred to the cloud storage device relatively quickly, and when the bandwidth is sufficient Then transfer the uploaded file, thereby improving the efficiency of file transfer.

在执行步骤204之后,节点服务器还可以删除上传文件和元信息,从而能够减轻节点服务器的存储负担,避免云存储设备和节点服务器中存储的文件内容重复的问题。After step 204 is executed, the node server may also delete the uploaded file and meta information, thereby reducing the storage burden of the node server and avoiding the problem of duplication of file contents stored in the cloud storage device and the node server.

实施例二:Embodiment 2:

基于图1所示的系统架构,图6示例性示出了本发明实施例提供另一种文件传输方法所对应的流程示意图,具体包括以下步骤:Based on the system architecture shown in FIG. 1 , FIG. 6 exemplarily shows a schematic flowchart corresponding to another file transfer method provided by an embodiment of the present invention, which specifically includes the following steps:

步骤601,客户端设备向云存储设备发送下载请求,下载请求包括目标文件标识。Step 601, the client device sends a download request to the cloud storage device, where the download request includes the target file identifier.

步骤602,云存储设备接收客户端设备发送的下载请求。Step 602, the cloud storage device receives the download request sent by the client device.

步骤603,云存储设备若确定未存储有与目标文件标识对应的目标文件,则根据文件标识与节点服务器的位置信息的对应关系,确定目标节点服务器的位置信息。Step 603: If the cloud storage device determines that the target file corresponding to the target file identifier is not stored, the cloud storage device determines the location information of the target node server according to the corresponding relationship between the file identifier and the location information of the node server.

步骤604,云存储设备向客户端发送下载请求的响应消息,响应消息包括目标节点服务器的位置信息。Step 604, the cloud storage device sends a response message to the client for the download request, where the response message includes the location information of the target node server.

步骤605,客户端设备接收云存储设备发送的下载请求的响应消息,并根据响应消息中包括的目标节点服务器的位置信息,从目标节点服务器中获取所述目标文件。Step 605: The client device receives the response message of the download request sent by the cloud storage device, and obtains the target file from the target node server according to the location information of the target node server included in the response message.

需要说明的是,上述步骤601和步骤605可以由图1中示出的客户端集群103中的任一客户端设备执行,比如,可以由图1中示出的客户端设备1031执行;上述步骤602至步骤604可以由图1中示出的云存储设备101执行。It should be noted that the above steps 601 and 605 may be performed by any client device in the client cluster 103 shown in FIG. 1 , for example, may be performed by the client device 1031 shown in FIG. 1 ; the above steps Steps 602 to 604 may be performed by the cloud storage device 101 shown in FIG. 1 .

如此,客户端设备在下载目标文件时,若该文件尚未同步存储到云存储设备中,客户端设备仍可以从对应的节点服务器中下载该目标文件,从而避免文件未同步或在文件同步过程中,客户端设备无法下载目标文件的情况。In this way, when the client device downloads the target file, if the file has not been synchronously stored in the cloud storage device, the client device can still download the target file from the corresponding node server, thereby preventing the file from being unsynchronized or during the file synchronization process. , the client device cannot download the target file.

具体来说,步骤603和步骤604中,云存储设备若确定存储有与目标文件标识对应的目标文件,则可以直接向客户端发送目标文件,如此,如此,客户端设备在下载目标文件时,若该文件已同步存储到云存储设备中,则客户端设备可以直接获取目标文件。Specifically, in step 603 and step 604, if the cloud storage device determines that the target file corresponding to the target file identifier is stored, it can directly send the target file to the client. In this way, when the client device downloads the target file, If the file has been synchronously stored in the cloud storage device, the client device can directly obtain the target file.

在其它可能的实施例中,云存储设备中也可能并未存储有与目标文件标识有关的任何信息,换言之,云存储设备中即没有目标文件标识对应的目标文件,也没有目标文件标识对应的节点服务器,则可以向客户端设备返回文件不存在的信息。In other possible embodiments, the cloud storage device may not store any information related to the target file identifier. In other words, the cloud storage device has neither the target file corresponding to the target file identifier nor the target file identifier. The node server can return information that the file does not exist to the client device.

具体实现过程中,可以设定客户端在启动下载功能时,直接与云存储设备连接;云存储设备在确定未存储目标文件时,也可以通过管理服务器确定目标文件对应的目标节点服务器的位置信息。In the specific implementation process, the client can be set to directly connect to the cloud storage device when starting the download function; when the cloud storage device determines that the target file is not stored, the management server can also determine the location information of the target node server corresponding to the target file. .

为了更清楚地介绍上述文件传输的方法,下面结合图7,对本发明实施例二中所涉及到的流程进行整体性说明。如图7所示,可以包括以下步骤:In order to introduce the above-mentioned file transmission method more clearly, the following describes the process involved in the second embodiment of the present invention as a whole with reference to FIG. 7 . As shown in Figure 7, the following steps can be included:

步骤701,客户端设备向云存储设备发送下载请求,下载请求包括目标文件标识。Step 701: The client device sends a download request to the cloud storage device, where the download request includes the target file identifier.

步骤702,云存储设备接收客户端设备发送的下载请求。Step 702: The cloud storage device receives the download request sent by the client device.

步骤703,云存储设备根据目标文件标识,判断是否存储有与目标文件标识对应的目标文件,若有,则执行步骤704;若没有,则执行步骤706。Step 703 , the cloud storage device determines whether a target file corresponding to the target file ID is stored according to the target file ID, and if so, executes step 704 ; if not, executes step 706 .

步骤704,云存储设备向客户端发送目标文件。Step 704, the cloud storage device sends the target file to the client.

步骤705,客户端设备接收云存储设备发送的目标文件。Step 705: The client device receives the target file sent by the cloud storage device.

步骤706,云存储设备根据文件标识与节点服务器的位置信息的对应关系,判断是否有与目标文件标识对应的目标节点服务器,若有,则执行步骤707;若没有,则执行步骤710。Step 706: The cloud storage device determines whether there is a target node server corresponding to the target file ID according to the correspondence between the file ID and the location information of the node server. If so, go to Step 707; if not, go to Step 710.

步骤707,云存储设备确定目标节点服务器的位置信息。Step 707, the cloud storage device determines the location information of the target node server.

步骤708,云存储设备向客户端发送下载请求的响应消息,响应消息包括所述目标节点服务器的位置信息。Step 708: The cloud storage device sends a response message to the client for the download request, where the response message includes the location information of the target node server.

步骤709,客户端设备接收云存储设备发送的下载请求的响应消息,并根据响应消息中包括的目标节点服务器的位置信息,从目标节点服务器中获取所述目标文件。Step 709: The client device receives the response message of the download request sent by the cloud storage device, and obtains the target file from the target node server according to the location information of the target node server included in the response message.

步骤710,云存储设备向客户端设备返回文件不存在的信息。Step 710, the cloud storage device returns information that the file does not exist to the client device.

需要说明的是,上述步骤编号仅为一种执行流程的示例性表示,本申请对各个步骤的先后顺序不做具体限定。例如,上述步骤703和步骤706中,云存储设备也可以先根据文件标识与节点服务器的位置信息的对应关系,判断是否有与目标文件标识对应的目标节点服务器,再根据目标文件标识,判断是否存储有与目标文件标识对应的目标文件,具体不做限定。It should be noted that the above step numbering is only an exemplary representation of an execution flow, and the present application does not specifically limit the sequence of each step. For example, in the above steps 703 and 706, the cloud storage device may first determine whether there is a target node server corresponding to the target file identifier according to the corresponding relationship between the file identifier and the location information of the node server, and then determine whether there is a target node server corresponding to the target file identifier according to the target file identifier. A target file corresponding to the target file identifier is stored, which is not specifically limited.

实施例三:Embodiment three:

基于同样的发明构思,图8示例性示出了本发明实施例提供一种服务器的结构示意图,如图8所示,所述服务器800包括收发单元801和处理单元802。Based on the same inventive concept, FIG. 8 exemplarily shows a schematic structural diagram of a server provided by an embodiment of the present invention. As shown in FIG. 8 , the server 800 includes a transceiver unit 801 and a processing unit 802 .

收发单元801,用于接收所述客户端集群中的任一客户端设备发送的上传文件;所述上传文件为所述客户端集群发送的上传文件集合中的文件,所述上传文件集合中各文件对应同一数据主体;The transceiver unit 801 is configured to receive an upload file sent by any client device in the client cluster; the upload file is a file in the upload file set sent by the client cluster, and each upload file set in the upload file set The files correspond to the same data subject;

处理单元802,用于生成所述上传文件的元信息,所述元信息包括所述上传文件归属的数据主体;a processing unit 802, configured to generate meta information of the uploaded file, where the meta information includes the data subject to which the uploaded file belongs;

所述收发单元801,用于将所述上传文件以及所述元信息发送给所述云存储设备,以使所述云存储设备根据所述元信息确定目标存储区域,并将所述元信息和所述上传文件存储到所述目标存储区域;所述上传文件集合中的各上传文件均存储于所述目标存储区域。The transceiver unit 801 is configured to send the uploaded file and the meta information to the cloud storage device, so that the cloud storage device determines a target storage area according to the meta information, and sends the meta information to the cloud storage device. The uploaded file is stored in the target storage area; each uploaded file in the upload file set is stored in the target storage area.

在一种可能的实现方式中,所述收发单元801具体用于:In a possible implementation manner, the transceiver unit 801 is specifically used for:

向所述云存储设备发送同步请求,所述同步请求包括所述元信息;并在接收到所述云存储设备返回的所述同步请求的响应消息后,向所述云存储设备发送所述上传文件;所述响应信息是所述云存储设备确定存在可用的传输带宽时发送的。Send a synchronization request to the cloud storage device, where the synchronization request includes the meta information; and after receiving a response message for the synchronization request returned by the cloud storage device, send the upload to the cloud storage device file; the response information is sent when the cloud storage device determines that there is available transmission bandwidth.

在一种可能的实现方式中,所述处理单元802还用于:In a possible implementation manner, the processing unit 802 is further configured to:

删除所述上传文件和所述元信息。Delete the uploaded file and the meta information.

实施例四:Embodiment 4:

基于同样的发明构思,图9示例性示出了本发明实施例提供一种客户端设备的结构示意图,如图9所示,所述客户端设备900包括发送单元901和接收单元902。Based on the same inventive concept, FIG. 9 exemplarily shows a schematic structural diagram of a client device provided by an embodiment of the present invention. As shown in FIG. 9 , the client device 900 includes a sending unit 901 and a receiving unit 902 .

发送单元901,用于向所述云存储设备发送下载请求,所述下载请求包括目标文件标识;A sending unit 901, configured to send a download request to the cloud storage device, where the download request includes a target file identifier;

接收单元902,用于接收所述云存储设备发送的所述下载请求的响应消息,并根据所述响应消息中包括的目标节点服务器的位置信息,从所述目标节点服务器中获取所述目标文件;A receiving unit 902, configured to receive a response message of the download request sent by the cloud storage device, and obtain the target file from the target node server according to the location information of the target node server included in the response message ;

其中,所述目标节点服务器的位置信息是所述云存储设备在确定未存储有与所述目标文件标识对应的目标文件后,根据文件标识与节点服务器的位置信息的对应关系确定的;所述对应关系是根据元信息确定的。The location information of the target node server is determined according to the correspondence between the file identifier and the location information of the node server after the cloud storage device determines that the target file corresponding to the target file identifier is not stored; the Correspondence is determined based on meta information.

在一种可能的实现方式中,所述接收单元902还用于:In a possible implementation manner, the receiving unit 902 is further configured to:

接收所述云存储设备发送的目标文件,所述目标文件是所述云存储设备中存储的与所述目标文件标识对应的文件。A target file sent by the cloud storage device is received, where the target file is a file stored in the cloud storage device and corresponding to the target file identifier.

实施例五:Embodiment 5:

基于同样的发明构思,图10示例性示出了本发明实施例提供一种云存储设备的结构示意图,如图10所示,所述云存储设备1000包括收发单元1001和处理单元1002。Based on the same inventive concept, FIG. 10 exemplarily shows a schematic structural diagram of a cloud storage device provided by an embodiment of the present invention. As shown in FIG. 10 , the cloud storage device 1000 includes a transceiver unit 1001 and a processing unit 1002 .

收发单元1001,用于接收所述节点服务器集群中任一节点服务器发送的上传文件,以及所述上传文件的元信息;所述元信息包括所述上传文件归属的数据主体;所述上传文件为所述客户端集群发送的上传文件集合中的文件,所述上传文件集合中各文件对应同一数据主体;A transceiver unit 1001, configured to receive an upload file sent by any node server in the node server cluster, and meta information of the upload file; the meta information includes the data subject to which the upload file belongs; the upload file is The files in the uploaded file set sent by the client cluster, each file in the uploaded file set corresponds to the same data subject;

处理单元1002,用于根据所述元信息以及预设的数据实体和存储区域的对应关系,确定所述上传文件的目标存储区域;所述目标存储区域用于存储所述上传文件集合中的各上传文件;以及将所述上传文件和所述元信息存储至所述目标存储区域。The processing unit 1002 is configured to determine the target storage area of the uploaded file according to the meta-information and the preset correspondence between the data entity and the storage area; the target storage area is used to store each item in the uploaded file set. uploading a file; and storing the uploaded file and the meta information to the target storage area.

在一种可能的实现方式中,所述收发单元1001具体用于:In a possible implementation manner, the transceiver unit 1001 is specifically used for:

接收所述节点服务器发送的同步请求,所述同步请求包括所述元信息;并在确定存在可用的传输带宽后,向所述节点服务器返回所述同步请求的响应消息,所述响应消息用于指示所述节点服务器向所述云存储设备发送所述上传文件;以及接收所述节点服务器发送的所述上传文件。Receive a synchronization request sent by the node server, where the synchronization request includes the meta information; and after determining that there is available transmission bandwidth, return a response message of the synchronization request to the node server, where the response message is used for instructing the node server to send the upload file to the cloud storage device; and receiving the upload file sent by the node server.

在一种可能的实现方式中,所述收发单元1001还用于:In a possible implementation manner, the transceiver unit 1001 is further configured to:

接收所述客户端集群中的任一客户端设备发送的下载请求,所述下载请求包括目标文件标识;receiving a download request sent by any client device in the client cluster, where the download request includes a target file identifier;

所述处理单元1002还用于:The processing unit 1002 is also used for:

若确定未存储有与所述目标文件标识对应的目标文件,则根据文件标识与节点服务器的位置信息的对应关系,确定目标节点服务器的位置信息;所述对应关系是根据元信息确定的;If it is determined that the target file corresponding to the target file identifier is not stored, the location information of the target node server is determined according to the corresponding relationship between the file identifier and the location information of the node server; the corresponding relationship is determined according to the meta information;

所述收发单元1001,还用于向所述客户端发送所述下载请求的响应消息,所述响应消息包括所述目标节点服务器的位置信息,所述响应消息用于指示所述客户端设备根据所述目标节点服务器的位置信息从所述目标节点服务器中获取所述目标文件。The transceiver unit 1001 is further configured to send a response message of the download request to the client, where the response message includes the location information of the target node server, and the response message is used to instruct the client device according to the The location information of the target node server obtains the target file from the target node server.

在一种可能的实现方式中,所述收发单元1001还用于:In a possible implementation manner, the transceiver unit 1001 is further configured to:

若确定存储有与所述目标文件标识对应的目标文件,则向所述客户端发送所述目标文件。If it is determined that a target file corresponding to the target file identifier is stored, the target file is sent to the client.

本申请实施例的还提供一种装置,该装置具有实现上文所描述的文件传输方法的功能。该功能可以通过硬件执行相应的软件实现,在一种可能的设计中,该装置包括:处理器、收发器、存储器;该存储器用于存储计算机执行指令,该收发器用于实现该装置与其他通信实体进行通信,该处理器与该存储器通过该总线连接,当该装置运行时,该处理器执行该存储器存储的该计算机执行指令,以使该装置执行上文所描述的文件传输方法。An embodiment of the present application further provides an apparatus, which has the function of implementing the file transmission method described above. This function can be implemented by executing corresponding software in hardware. In a possible design, the device includes: a processor, a transceiver, and a memory; the memory is used to store computer-executed instructions, and the transceiver is used to realize the communication between the device and other devices The entity communicates, the processor is connected to the memory through the bus, and when the apparatus is running, the processor executes the computer-executable instructions stored in the memory to cause the apparatus to perform the file transfer method described above.

本发明实施例还提供一种计算机存储介质,所述存储介质中存储软件程序,该软件程序在被一个或多个处理器读取并执行时实现上述各种可能的实现方式中所描述的文件传输方法。An embodiment of the present invention further provides a computer storage medium, where a software program is stored in the storage medium, and when the software program is read and executed by one or more processors, the files described in the above various possible implementation manners are implemented transfer method.

本发明实施例还提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述各种可能的实现方式中所描述的文件传输方法。Embodiments of the present invention also provide a computer program product containing instructions, which, when executed on a computer, cause the computer to execute the file transfer method described in the various possible implementations above.

本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.

基于上文所描述的内容,本发明实施例中所适用的系统中包括的节点服务器集群中具有多个节点服务器,如此,客户端集群中的多个客户端设备可以同时将同一数据主体的上传文件集合发送给节点服务器集群,节点服务器集群中的多个节点服务器均可以提供可用带宽来接收客户端集群发送的上传文件集合,从而能够实现文件快速传输的目的,提高文件传输的速率;进一步地,任一节点服务器在接收到客户端设备发送的文件后,可以将文件同步存储到云存储设备中的同一存储位置,从而使得用户能够直接通过云存储设备对文件进行管理,便于用户对文件进行集中管理。由此可见,采用本发明实施例提供数据的方法,既可以为大容量的数据提供能够满足传输时延要求的上传服务,又可以使得该大容量的数据能够被集中存储,从而实现对大容量的数据进行集中管理的需求。本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。Based on the content described above, the node server cluster included in the system to which the embodiment of the present invention is applicable includes multiple node servers, so that multiple client devices in the client cluster can upload the same data subject at the same time. The file set is sent to the node server cluster, and multiple node servers in the node server cluster can provide available bandwidth to receive the uploaded file set sent by the client cluster, so as to achieve the purpose of fast file transfer and improve the speed of file transfer; further , after receiving the file sent by the client device, any node server can synchronously store the file to the same storage location in the cloud storage device, so that the user can directly manage the file through the cloud storage device, which is convenient for the user to process the file. Centralized management. It can be seen from this that the method for providing data according to the embodiment of the present invention can not only provide an upload service that can meet the transmission delay requirement for large-capacity data, but also enable the large-capacity data to be centrally stored, thereby realizing the large-capacity data. The need for centralized management of data. The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block in the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to the processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing device to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing device produce Means for implementing the functions specified in a flow or flow of a flowchart and/or a block or blocks of a block diagram.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising instruction means, the instructions The apparatus implements the functions specified in the flow or flow of the flowcharts and/or the block or blocks of the block diagrams.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process such that The instructions provide steps for implementing the functions specified in the flow or blocks of the flowcharts and/or the block or blocks of the block diagrams.

尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。Although preferred embodiments of the present invention have been described, additional changes and modifications to these embodiments may occur to those skilled in the art once the basic inventive concepts are known. Therefore, the appended claims are intended to be construed to include the preferred embodiment and all changes and modifications that fall within the scope of the present invention.

显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。It will be apparent to those skilled in the art that various modifications and variations can be made in the present invention without departing from the spirit and scope of the invention. Thus, provided that these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims (20)

1. The file transmission method is applied to a distributed storage system, wherein the distributed storage system comprises cloud storage equipment, a node server cluster and a client cluster; the node server cluster comprises a plurality of node servers, and the client cluster comprises a plurality of client devices; the method comprises the following steps:
aiming at any node server in the node server cluster, the node server receives an upload file sent by any client device in the client cluster; the uploaded files are files in an uploaded file set sent by the client cluster, and each file in the uploaded file set corresponds to the same data main body;
the node server generates meta information of the uploaded file, wherein the meta information comprises a data main body to which the uploaded file belongs;
the node server sends the uploaded file and the meta information to the cloud storage device, so that the cloud storage device determines a target storage area according to the meta information and stores the meta information and the uploaded file in the target storage area; and each uploading file in the uploading file set is stored in the target storage area.
2. The method of claim 1, wherein the node server sends the upload file and the meta information to the cloud storage device, and wherein the sending comprises:
the node server sends a synchronization request to the cloud storage device, wherein the synchronization request comprises the meta information;
after receiving a response message of the synchronization request returned by the cloud storage device, the node server sends the upload file to the cloud storage device; the response information is sent when the cloud storage device determines that available transmission bandwidth exists.
3. The method according to claim 1 or 2, wherein after the node server sends the upload file and the meta information to the cloud storage device, the method further comprises:
and the node server deletes the uploaded file and the meta information.
4. The file transmission method is applied to a distributed storage system, wherein the distributed storage system comprises cloud storage equipment, a node server cluster and a client cluster; the node server cluster comprises a plurality of node servers, and the client cluster comprises a plurality of client devices; the method comprises the following steps:
for any client device in the client cluster, the client device sends a download request to the cloud storage device, wherein the download request comprises a target file identifier;
the client device receives a response message of the downloading request sent by the cloud storage device, and acquires the target file from a target node server according to the position information of the target node server included in the response message;
the position information of the target node server is determined according to the corresponding relation between the file identifier and the position information of the node server after the cloud storage equipment determines that the target file corresponding to the target file identifier is not stored; the correspondence is determined from the meta-information.
5. The method of claim 4, further comprising:
and the client device receives a target file sent by the cloud storage device, wherein the target file is a file stored in the cloud storage device and corresponding to the target file identifier.
6. The file transmission method is applied to a distributed storage system, wherein the distributed storage system comprises cloud storage equipment, a node server cluster and a client cluster; the node server cluster comprises a plurality of node servers, and the client cluster comprises a plurality of client devices; the method comprises the following steps:
the cloud storage equipment receives an uploaded file sent by any node server in the node server cluster and meta information of the uploaded file; the meta information comprises a data main body to which the uploading file belongs; the uploaded files are files in an uploaded file set sent by the client cluster, and each file in the uploaded file set corresponds to the same data main body;
the cloud storage equipment determines a target storage area of the uploaded file according to the meta information and a preset corresponding relation between a data entity and the storage area; the target storage area is used for storing each uploading file in the uploading file set;
and the cloud storage equipment stores the uploaded file and the meta information to the target storage area.
7. The method according to claim 6, wherein the receiving, by the cloud storage device, the uploaded file sent by any node server in the node server cluster and the meta information of the uploaded file comprises:
the cloud storage device receives a synchronization request sent by the node server, wherein the synchronization request comprises the meta information;
after determining that the available transmission bandwidth exists, the cloud storage device returns a response message of the synchronization request to the node server, wherein the response message is used for indicating the node server to send the upload file to the cloud storage device;
and the cloud storage equipment receives the uploaded file sent by the node server.
8. The method of claim 6, further comprising:
the cloud storage device receives a downloading request sent by any client device in the client cluster, wherein the downloading request comprises a target file identifier;
if the cloud storage equipment determines that the target file corresponding to the target file identifier is not stored, determining the position information of the target node server according to the corresponding relation between the file identifier and the position information of the node server; the corresponding relation is determined according to the meta information;
the cloud storage device sends a response message of the downloading request to the client, the response message comprises the position information of the target node server, and the response message is used for indicating the client device to acquire the target file from the target node server according to the position information of the target node server.
9. The method of claim 8, further comprising:
and if the cloud storage equipment determines that the target file corresponding to the target file identifier is stored, sending the target file to the client.
10. A server, characterized in that the server comprises:
the receiving and sending unit is used for receiving the uploading file sent by any client device in the client cluster; the uploaded files are files in an uploaded file set sent by the client cluster, and each file in the uploaded file set corresponds to the same data main body;
the processing unit is used for generating meta information of the uploaded file, and the meta information comprises a data main body to which the uploaded file belongs;
the receiving and sending unit is configured to send the upload file and the meta information to the cloud storage device, so that the cloud storage device determines a target storage area according to the meta information, and stores the meta information and the upload file in the target storage area; and each uploading file in the uploading file set is stored in the target storage area.
11. The server according to claim 10, wherein the transceiver unit is specifically configured to:
sending a synchronization request to the cloud storage device, the synchronization request including the meta information; after receiving a response message of the synchronization request returned by the cloud storage device, sending the upload file to the cloud storage device; the response information is sent when the cloud storage device determines that available transmission bandwidth exists.
12. The server according to claim 10 or 11, wherein the processing unit is further configured to:
and deleting the uploaded file and the meta information.
13. A client device, the client device comprising:
a sending unit, configured to send a download request to the cloud storage device, where the download request includes a target file identifier;
a receiving unit, configured to receive a response message of the download request sent by the cloud storage device, and obtain the target file from a target node server according to location information of the target node server included in the response message;
the position information of the target node server is determined according to the corresponding relation between the file identifier and the position information of the node server after the cloud storage equipment determines that the target file corresponding to the target file identifier is not stored; the correspondence is determined from the meta-information.
14. The client device of claim 13, wherein the receiving unit is further configured to:
and receiving a target file sent by the cloud storage equipment, wherein the target file is a file stored in the cloud storage equipment and corresponding to the target file identifier.
15. A cloud storage device, the cloud storage device comprising:
the receiving and sending unit is used for receiving an uploading file sent by any node server in the node server cluster and meta information of the uploading file; the meta information comprises a data main body to which the uploading file belongs; the uploaded files are files in an uploaded file set sent by the client cluster, and each file in the uploaded file set corresponds to the same data main body;
the processing unit is used for determining a target storage area of the uploaded file according to the meta information and a preset corresponding relation between a data entity and the storage area; the target storage area is used for storing each uploading file in the uploading file set; and storing the uploaded file and the meta information to the target storage area.
16. The cloud storage device of claim 15, wherein the transceiver unit is specifically configured to:
receiving a synchronization request sent by the node server, wherein the synchronization request comprises the meta information; after determining that the available transmission bandwidth exists, returning a response message of the synchronization request to the node server, wherein the response message is used for indicating the node server to send the uploaded file to the cloud storage device; and receiving the uploading file sent by the node server.
17. The cloud storage device of claim 15, wherein the transceiving unit is further configured to:
receiving a downloading request sent by any client device in the client cluster, wherein the downloading request comprises a target file identifier;
the processing unit is further to:
if the target file corresponding to the target file identifier is determined not to be stored, determining the position information of the target node server according to the corresponding relation between the file identifier and the position information of the node server; the corresponding relation is determined according to the meta information;
the receiving and sending unit is further configured to send a response message of the download request to the client, where the response message includes location information of the target node server, and the response message is used to instruct the client device to acquire the target file from the target node server according to the location information of the target node server.
18. The cloud storage device of claim 17, wherein the transceiving unit is further configured to:
and if the target file corresponding to the target file identifier is determined to be stored, sending the target file to the client.
19. A computer-readable storage medium, characterized in that the storage medium stores instructions that, when executed on a computer, cause the computer to carry out performing the method of any one of claims 1 to 3, or the method of claim 4 or 5, or the method of any one of claims 6 to 9.
20. A computer device, comprising:
a memory for storing program instructions;
a processor for calling program instructions stored in said memory to execute the method of any one of the claims in accordance with the obtained program.
CN201810745872.9A 2018-07-09 2018-07-09 A file transmission method and device Active CN110703980B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810745872.9A CN110703980B (en) 2018-07-09 2018-07-09 A file transmission method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810745872.9A CN110703980B (en) 2018-07-09 2018-07-09 A file transmission method and device

Publications (2)

Publication Number Publication Date
CN110703980A true CN110703980A (en) 2020-01-17
CN110703980B CN110703980B (en) 2024-03-22

Family

ID=69192909

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810745872.9A Active CN110703980B (en) 2018-07-09 2018-07-09 A file transmission method and device

Country Status (1)

Country Link
CN (1) CN110703980B (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111291009A (en) * 2020-03-25 2020-06-16 上海飞旗网络技术股份有限公司 File block storage method and device
CN111478951A (en) * 2020-03-26 2020-07-31 深圳市鸿合创新信息技术有限责任公司 File issuing method and device
CN111723062A (en) * 2020-06-28 2020-09-29 天津联想协同科技有限公司 File synchronization method, device and storage medium
CN112328174A (en) * 2020-10-29 2021-02-05 北京京东尚科信息技术有限公司 Data push method, device, system and medium for cloud computing platform
CN112328560A (en) * 2020-11-25 2021-02-05 北京无线电测量研究所 File scheduling method and system
CN112671918A (en) * 2020-12-29 2021-04-16 平安普惠企业管理有限公司 Binary-based distributed data downloading method, device, equipment and medium
CN113810454A (en) * 2021-01-15 2021-12-17 北京沃东天骏信息技术有限公司 File transmission method and device, electronic equipment and storage medium
CN114124981A (en) * 2021-11-19 2022-03-01 天翼数字生活科技有限公司 Cloud storage data direct transmission management method, cloud transmission management platform and system
CN114338694A (en) * 2022-03-04 2022-04-12 广州鹏捷科技股份有限公司 One-stop cloud data center server scheduling method and system
CN114374683A (en) * 2021-12-20 2022-04-19 上海金仕达软件科技有限公司 An archive file management method, system and computer-readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102420854A (en) * 2011-11-14 2012-04-18 西安电子科技大学 Distributed file system for cloud storage
CN105025106A (en) * 2015-07-28 2015-11-04 焦点科技股份有限公司 Breakpoint resuming method based on segmentation and meta-information
CN105812391A (en) * 2016-05-16 2016-07-27 广州鼎鼎信息科技有限公司 Safe cloud storage system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102420854A (en) * 2011-11-14 2012-04-18 西安电子科技大学 Distributed file system for cloud storage
CN105025106A (en) * 2015-07-28 2015-11-04 焦点科技股份有限公司 Breakpoint resuming method based on segmentation and meta-information
CN105812391A (en) * 2016-05-16 2016-07-27 广州鼎鼎信息科技有限公司 Safe cloud storage system

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111291009B (en) * 2020-03-25 2023-05-09 上海飞旗网络技术股份有限公司 File block storage method and device
CN111291009A (en) * 2020-03-25 2020-06-16 上海飞旗网络技术股份有限公司 File block storage method and device
CN111478951A (en) * 2020-03-26 2020-07-31 深圳市鸿合创新信息技术有限责任公司 File issuing method and device
CN111478951B (en) * 2020-03-26 2023-08-08 深圳市鸿合创新信息技术有限责任公司 File issuing method and device
CN111723062A (en) * 2020-06-28 2020-09-29 天津联想协同科技有限公司 File synchronization method, device and storage medium
CN112328174A (en) * 2020-10-29 2021-02-05 北京京东尚科信息技术有限公司 Data push method, device, system and medium for cloud computing platform
CN112328560A (en) * 2020-11-25 2021-02-05 北京无线电测量研究所 File scheduling method and system
CN112328560B (en) * 2020-11-25 2024-06-18 北京无线电测量研究所 File scheduling method and system
CN112671918A (en) * 2020-12-29 2021-04-16 平安普惠企业管理有限公司 Binary-based distributed data downloading method, device, equipment and medium
CN112671918B (en) * 2020-12-29 2024-03-05 平安普惠企业管理有限公司 Binary system-based distributed data downloading method, device, equipment and medium
CN113810454A (en) * 2021-01-15 2021-12-17 北京沃东天骏信息技术有限公司 File transmission method and device, electronic equipment and storage medium
CN113810454B (en) * 2021-01-15 2025-01-17 北京沃东天骏信息技术有限公司 File transmission method and device, electronic equipment and storage medium
CN114124981A (en) * 2021-11-19 2022-03-01 天翼数字生活科技有限公司 Cloud storage data direct transmission management method, cloud transmission management platform and system
CN114124981B (en) * 2021-11-19 2024-04-12 天翼视联科技有限公司 Cloud storage data direct transmission management method, cloud transmission management platform and system
CN114374683A (en) * 2021-12-20 2022-04-19 上海金仕达软件科技有限公司 An archive file management method, system and computer-readable storage medium
CN114374683B (en) * 2021-12-20 2024-09-10 上海金仕达软件科技股份有限公司 A method and system for managing archive files and a computer-readable storage medium
CN114338694A (en) * 2022-03-04 2022-04-12 广州鹏捷科技股份有限公司 One-stop cloud data center server scheduling method and system
CN114338694B (en) * 2022-03-04 2022-05-31 广州鹏捷科技股份有限公司 One-stop cloud data center server scheduling method and system

Also Published As

Publication number Publication date
CN110703980B (en) 2024-03-22

Similar Documents

Publication Publication Date Title
CN110703980B (en) A file transmission method and device
TWI528191B (en) File Handling Method Based on Cloud Storage, System and Server Cluster System
CN111447248A (en) File transmission method and device
CN109040337B (en) Information query method, edge server and information query system
CN106294585A (en) A kind of storage method under cloud computing platform
CN107391629A (en) Data migration method, system, server and computer-readable storage medium between cluster
TW201405324A (en) Cloud storage system and data storage and sharing method based on the system
CN108833610B (en) An information update method, device and system
CN103685385A (en) Method, system and device for file synchronization
CN103902410A (en) Data backup acceleration method for cloud storage system
CN103369002B (en) A kind of method and system of resource downloading
CN105653209A (en) Object storage data transmitting method and device
CN102982116A (en) Multi-media transfer method and system based on cloud
CN108076078A (en) A kind of cloud host creation method, device and cloud service system
CN110324406B (en) A method and cloud service system for acquiring business data
CN105446794A (en) Disc operation method, apparatus and system based on virtual machine
CN103248674B (en) The shared file management method of cross-domain cloud platform
CN101150593A (en) A method and system for uploading data
CN111124589A (en) A service discovery system, method, apparatus and device
CN108540510B (en) A cloud host creation method, device and cloud service system
CN106155566A (en) For storing method, the Apparatus and system of data
CN107426288A (en) A kind of resource-sharing schedule method and apparatus based on storage network
WO2016101759A1 (en) Data routing method, data management device and distributed storage system
CN101146130A (en) A method and system for transmitting data between clients
CN103118019B (en) A kind of file network clone method based on duplicate removal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant