CN103108051A - Synchronous file sharing method from cloud server - Google Patents

Synchronous file sharing method from cloud server Download PDF

Info

Publication number
CN103108051A
CN103108051A CN2013100609937A CN201310060993A CN103108051A CN 103108051 A CN103108051 A CN 103108051A CN 2013100609937 A CN2013100609937 A CN 2013100609937A CN 201310060993 A CN201310060993 A CN 201310060993A CN 103108051 A CN103108051 A CN 103108051A
Authority
CN
China
Prior art keywords
file
shared
data
user
cloud
Prior art date
Application number
CN2013100609937A
Other languages
Chinese (zh)
Inventor
蒋烁淼
Original Assignee
上海够快网络科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 上海够快网络科技有限公司 filed Critical 上海够快网络科技有限公司
Priority to CN2013100609937A priority Critical patent/CN103108051A/en
Publication of CN103108051A publication Critical patent/CN103108051A/en

Links

Abstract

The invention discloses a synchronous file sharing method from a cloud server. Firstly, roll polling that whether the cloud server has shared files which need to be synchronized or not is conducted by file sharing users in the same local area network, is the cloud server has the shared files which need to be synchronized, a file requiring data package is sent in the local area network; all the users in the local area network search whether data for sharing the files are contained or not after receiving the file requiring data package, if the data are contained, a response data package is sent, and if not, no response is given; and the users who sent the file requiring data package collect the response data package in the local area network and judge whether the local area network has data need to be downloaded of the shared file by the users or not, if users in the local area network have the data, the data of the shared file are obtained from the users who possess the data. The method greatly improves efficiency synchronous file sharing from the cloud server and reduces occupied network bandwidth.

Description

一种从云端服务器同步共享文件的方法 A method of synchronizing a shared file server from the cloud

技术领域 FIELD

[0001] 本发明涉及云存储技术领域,尤其涉及一种从云端服务器同步共享文件的方法。 [0001] The present invention relates to a cloud storage technology, and particularly relates to a method for synchronizing shared file servers from the cloud. 背景技术 Background technique

[0002] 随着互联网技术的发展,云计算和云存储正越来越受到IT业界的关注,其应用也逐渐推广,获得了广泛的好评。 [0002] With the development of Internet technology, cloud computing and cloud storage are more and more concerned about the IT industry, its application has gradually extended, received wide acclaim. 云存储是在云计算(cloud computing)概念上延伸和发展出来的一个新的概念,云计算是分布式处理(Distributed Computing)、并行处理(ParallelComputing)和网格计算(Grid Computing)的发展,是透过网络将庞大的计算处理程序自动分拆成无数个较小的子程序,再交由多部服务器所组成的庞大系统经计算分析之后将处理结果回传给用户。 Cloud storage is extended and a new concept developed in the cloud (cloud computing) the concept of distributed processing is cloud computing (Distributed Computing), Parallel Processing (ParallelComputing) and grid (Grid Computing) development, is through the vast network of computing processing program automatically split into numerous smaller subroutines, and then handed over multiple servers consisting of a large system analysis calculated after processing results back to the user. 通过云计算技术,网络服务提供者可以在数秒之内,处理数以千万计甚至亿计的信息,达到和”超级计算机”同样强大的网络服务。 Cloud computing technology, network service providers can in a matter of seconds, the information processing tens of millions or even billions of dollars, and to achieve "supercomputer" equally powerful network services. 云存储的概念与云计算类似,它是指通过集群应用、网格技术或分布式文件系统等功能,将网络中大量各种不同类型的存储设备通过应用软件集合起来协同工作,共同对外提供数据存储和业务访问功能的一个系统。 The concept of cloud storage and cloud computing is similar, it is through clustering applications, grid technology and distributed file systems and other functions, the network in a large variety of different types of storage devices through the set up and application software work together to jointly provide external data a system to store and access business functions. 云状存储系统中的所有设备对使用者来讲都是完全透明的,任何地方的任何一个经过授权的使用者都可以通过一根接入线缆与云存储连接,对云存储进行数据访问。 All devices in the cloud storage system in terms of completely transparent to the user, any place any authorized users can, cloud storage data access through an access cable is connected to the cloud storage.

[0003] 常用的云存储方案中,用户的数据存储在云端服务器,用户的任意设备接入互联网,都可以拿到存储在云端服务器中的数据,并且可以实现多台终端的灵活运用,不限制在哪一台终端。 [0003] Frequently cloud storage scheme, the user data stored in the cloud server, any device connected to the Internet user can get the data stored in the cloud server, and allows flexible use of multiple terminals, not limited Which in the end. 目前云存储逐渐扩展为工作组用户之间的云端数据共享,一个用户可以建立自己的工作组,并将云端数据共享给工作组成员,便于工作组成员之间基于共同的数据协同工作。 Currently cloud storage gradually extended to cloud data sharing between workgroup users, a user can create their own work group and shared cloud data to team members, to facilitate work together based on a common data among team members. 然而目前将云端服务器数据同步到工作组成员本地,一般都是采用直接从云端服务器下载数据,在发生需要大量文件数据需要从云端同步下载到本地时,会产生大数据流量传输,将占用非常多服务器端和本地网络的互联网接入带宽资源,甚至造成出口带宽拥塞现象。 However, there is a cloud-based server data synchronized to the local working group members, are generally used to download data directly from the cloud server, when you need a large number of files downloaded data has to be synchronized from the cloud to the local, will produce large data traffic transmission, will take up very much Internet server and local network access bandwidth resources and perhaps export bandwidth congestion. 例如2009年发生的“暴风影音”网络拥塞事故。 For example occurred in 2009, "STORM" Network congestion accident.

[0004] 在用户共享云端数据给工作组成员时,很可能很多工作组成员都在同一局域网内,这是因为工作组建立通常在同一个单位成员之间,因而当同一个局域网内多用户进行云端数据的同步时,特别是当大量文件数据进行同步时,网络拥塞就是一个急需解决的问题。 [0004] When the cloud users to share data to team members, probably many team members are in the same LAN, this is usually because the working group established between members of the same unit, so that when the same LAN multi-user when the cloud data synchronization, especially when a large number of file data synchronization, network congestion is a problem need to be resolved.

发明内容 SUMMARY

[0005] 本发明的目的是解决同一局域网内共享用户从云端服务器同步共享文件时,特别是当大量文件数据进行同步时导致的网络拥塞问题,提出了一种从云端服务器同步共享文件的方法,能快速同步共享文件。 [0005] The object of the present invention is to solve the problem of network congestion while the shared user on a LAN server synchronization file sharing cloud from, especially when a large amount of file data when synchronizing the lead, a method for synchronizing a shared file server from the cloud, synchronization can quickly share files.

[0006] 一种从云端服务器同步共享文件的方法,用于同一局域网内的共享用户从云端服务器同步共享文件,包括步骤: [0006] A method for synchronizing a shared file server from the cloud, users share the same LAN to share a file from the cloud synchronization server, comprising the steps of:

[0007] (I)、同一局域网内的共享用户轮询检测云端服务器是否有需要进行同步的共享文件;[0008] (2)、当发现有需要进行同步的共享文件时,在局域网内发送文件请求数据包; [0007] (I), polling detection cloud server user sharing the same LAN whether it is necessary to share the file synchronization; [0008] (2), when found necessary to synchronize shared files, send files in the LAN request packet;

[0009] (3)、局域网内的其他共享用户接收到文件请求数据包后,在本地搜索是否拥有所述共享文件的数据,如果有则发送应答数据包,否则不回应; After [0009] (3), other shared LAN users receiving the file request packet, whether it has a data file in the shared local search, if a response packet is sent, otherwise it does not respond;

[0010] (4)、发送文件请求数据包的共享用户收集局域网内的应答数据包,如果接收到应答数据包,则根据应答数据包从发送该应答数据包的共享用户本地同步所述共享文件,否则进入下一步; [0010] (4), a file transmission request to share user data packets collected within the LAN a response packet, if the received response packet, the data packet according to the response from the synchronization of the shared file sharing user transmits the response local packet otherwise, the next step;

[0011] (5)、由至少一个共享用户从云端服务器直接同步所述共享文件。 [0011] (5), by at least one shared server directly from the cloud user synchronize the shared file.

[0012] 进一步地,所述步骤(I)包括步骤: [0012] Further, the step (I) comprises the steps of:

[0013] (1.1)、同一局域网内的共享用户轮询云端服务器,向云端服务器请求获取一份最新的共享文件信息; [0013] (1.1), shared LAN users in the same polling cloud server, the cloud server request to obtain a copy of the latest information to share files;

[0014] (1.2)、根据所述共享文件信息比较所述云端服务器中共享文件数据与本地存储的文件数据,若发现存在不同的文件,则表示此文件就是需要同步的共享文件。 [0014] (1.2), according to the shared data file information file comparing the first server to share files locally stored data, if found different file, then this file is the need to synchronize the shared file.

[0015] 其中,所述共享文件信息包括共享文件的文件名,文件大小,文件版本号和文件内容摘要。 [0015] wherein the shared information includes a file sharing file name, file size, file version number and document summary. 通过比较共享文件信息,就能判断出哪些文件是需要进行同步的共享文件。 By comparing the shared file information, you can determine which files need to share files synchronized.

[0016] 进一步地,所述文件请求数据包为UDP广播数据包,所述文件请求数据包包括所述共享文件的散列值以及数据包发送者的设备ID号。 [0016] Further, the file request UDP packet is a broadcast packet, the request packet includes the device file ID number and the hash value of the data packet's shared file. 文件请求数据包通过UDP广播的形式向局域网用户发送,任何局域网用户都能够收到,在收到文件请求数据包后会在本地查找是否有文件请求数据包中所请求的共享文件的数据,有则回复应答信息给发送者,否则不回应。 File request packet to the LAN users in the form of UDP broadcast any LAN users are able to receive, looks after the receipt of the documents in the local request packet if the file request data packets in a shared file requested, there the response message reply to the sender, or do not respond.

[0017] 进一步地,拥有所述共享文件的数据的其他共享用户在收到文件请求数据包后,建立HTTP服务器并生成可供访问的URL地址,将URL封装在应答数据包中发送到所述文件请求数据包的发送者。 URL address other sharing users [0017] Furthermore, of the shared data file has a file request packet is received, and generates an HTTP server to establish available for access, the URL in response to the transmitted encapsulated data packet file request sender of the packet. 所述文件请求数据包的发送者在接收到应答数据包后,解析应答数据包,访问所述的URL地址,从发送该应答数据包的共享用户本地同步所述共享文件。 The sender of the file request packet after receiving the response data packet, parses the response packet, the access URL address, the reply packet transmitted from the shared user synchronize the shared file locally.

[0018] 其中,所述应答数据包包括本机设备ID,URL地址以及本地该共享文件的数据信息,所述URL地址包括本机IP地址、下载端口和所述共享文件的散列值,所述数据信息包括本地已有的数据块在所述共享文件中的起始位置和大小。 [0018] wherein said response data packet includes data information of the client device ID, and the URL address of the shared file locally, the URL address comprises a local IP address, port, and the hash value of the shared downloading files, the said information data comprises a start position and size of the local data block existing in said shared file. 应答数据包也可以直接发送本机设备ID、本机IP地址、下载端口和所述共享文件的HASH值,及本地该共享文件的数据信息到文件请求数据包的发送者,文件请求数据包的发送者解析应答数据包,合成URL地址并访问,从发送该应答数据包的共享用户本地同步所述共享文件。 Reply packet may be transmitted directly to the local device ID, transmission of the data packets of the data the IP address information of the client, the HASH value of the download port and share files, and shared file to the local file requests, the file request packet resolution reply packet sender, and the synthesis of the URL address to access the shared local user reply packet transmitted from the synchronization of the shared file.

[0019] 进一步地,由至少一个共享用户从云端服务器直接同步所述共享文件包括步骤: [0019] Further, the synchronization directly from the cloud server shared by at least one user share files comprising the steps of:

[0020] 同一局域网内的共享用户根据接收的文件请求数据包,判断请求共享文件同步的共享用户数,设置从云端服务器直接下载的用户设备数量N ; Sharing user in the [0020] same LAN request packet based on the received document, if the request to synchronize the shared file sharing users, the number of user equipment is provided directly downloaded from the server cloud N;

[0021] 比较本机设备ID号与其他共享用户的设备ID号,若本机设备ID号在所有同一局域网内的共享用户中按照升序排序在前N个之内,则从云端服务器直接同步所述共享文件,否则继续发送文件请求数据包。 [0021] Comparative native device ID and other shared user device ID, if the number N of the local device to share user ID numbers in all the same LAN in the ascending order in the front, directly from the synchronization server cloud said shared files, or continue to send file request packet.

[0022] 通过设置直接从云端服务器下载共享文件的用户设备个数,可以有效提高大用户量时同步共享文件的速度和效率。 [0022] By providing the number of user devices to share files downloaded directly from the server cloud can effectively improve the speed and efficiency synchronize shared files is large amount of users.

[0023] 进一步地,本发明的从云端服务器同步共享文件的方法还包括步骤: [0023] Further, the synchronization method of sharing files from the cloud server of the invention further comprises the step of:

[0024] 在共享文件未同步完成前共享用户会定时发送文件请求数据包,直到共享文件同步完成。 [0024] Sharing before synchronization is completed the user is not a shared file will periodically send file request packets until the shared file synchronization is complete.

[0025] 本发明提出的从云端服务器同步共享文件的方法,使同一局域网内的共享用户不需要都从云端服务器下载共享文件,只需要一个或几个用户先从云端服务器下载共享文件,其他用户则从已经下载了共享文件的用户本地下载共享文件,大大提高了从云端服务器同步共享文件的效率,减少了占用的网络带宽。 [0025] A method for synchronizing a file from the cloud server shared by the present invention, so that users sharing the same LAN does not need to download from the cloud are shared file server, only one or several users to share files start with a cloud server to download other users It has been downloaded from a user's local file sharing to download shared files, greatly improving the efficiency synchronous shared files from the cloud server, reducing network bandwidth consumption.

附图说明 BRIEF DESCRIPTION

[0026] 图1为本发明实施例网络结构示意图; [0026] FIG. 1 is a schematic of a network configuration according to the present invention;

[0027] 图2为本发明从云端服务器同步共享文件的方法的流程图。 [0027] FIG 2 is a flowchart of a method of synchronizing a shared file server from the cloud to the invention.

具体实施方式 Detailed ways

[0028] 下面结合附图和实施例对本发明技术方案做进一步详细说明,以下实施例不构成对本发明的限定。 Drawings and embodiments described in detail further aspect of the invention [0028] below with reference to, the following examples are not intended to limit the present invention.

[0029] 如图1所示,有处于同一局域网内的A、B、C三个共享用户,云端服务器有一个新增文件同时共享给这三个同一局域网内的共享用户,新增的共享文件称为共享文件。 Shared File [0029] As shown in FIG 1, there is in the same LAN A, B, C share three users, a new file server cloud while sharing the same three users to share the LAN, the new called to share files.

[0030] 以图1为例,本发明从云端服务器同步共享文件的方法流程如图2所示,包括步骤: [0030] In an example of FIG. 1, the invention sharing files from the cloud synchronization server in Scheme 2, comprising the steps of:

[0031] 步骤21、同一局域网内的共享用户轮询检测云端服务器是否有需要进行同步的共享文件。 [0031] Step 21, the user polling detection share the same LAN cloud server whether it is necessary to share the file synchronization.

[0032] 同一局域网内的三个用户A、B、C通过轮询检测云端服务器是否有需要进行同步的共享文件,通常当共享文件夹中的文件有变动(增加,修改或者删除)时,就需要进行同步。 A three users in [0032] the same LAN, B, C is detected by polling whether it is necessary to share the cloud server file synchronization is usually shared folder when the file has changes (add, modify or delete), you We need to synchronize. 使用云存储共享的用户会安装一个客户端,用户A、B、C他们各自的本地客户端会每隔一定周期,例如60秒,向云端服务器请求获取一份这个时间间隔内云端服务器共享文件夹的共享文件信息清单,根据清单内的每个文件信息与本地存储的文件进行比较,文件信息包括文件名,文件大小,文件版本,文件内容摘要等信息,客户端会根据比较的结果判断是否有需要进行同步的共享文件,若发现存在不同的文件,则表示此文件就是需要同步的共享文件,并进行同步,即下载新的文件,覆盖修改的文件,删除多余的文件。 Cloud storage shared user installs a client, users A, B, C of their respective local client every predetermined period, for example 60 seconds, a request to acquire the cloud server cloud server to share files within a folder this time interval list of sharing files, each file is compared based on information stored locally in the manifest file, the file information includes a file name, file size, file version, file summary and other information, the client will be based on results of the comparison to determine whether there is share files need to be synchronized, if found different file, then this file is the need to share files synchronized, and synchronization, that download new files, overwriting the modified files, delete unnecessary files.

[0033] 需要说明的是,如何比较本地数据与云端服务器数据是否有不同,如何判断有哪些文件需要更新,不是本发明的重点,例如有根据文件的散列值进行判断等方法,这里不再赘述。 [0033] Incidentally, how to compare data with the local server cloud data is different, how to determine which files need to be updated, not the focus of the present invention, for example, a hash value based on the file to judge the like, where no repeat.

[0034] 步骤22、当发现有需要进行同步的共享文件时,在局域网内发送文件请求数据包。 [0034] Step 22, when found to be necessary to synchronize the shared file, the file transmission request in the LAN packets.

[0035] 同一局域网内的三个用户A、B、C,无论是谁发现有需要进行同步下载的共享文件时,都在局域网内发送文件请求UDP (User Datagram Protocol用户数据包协议)广播数据包。 When the user A in the three [0035] the same LAN, B, C, whoever needs to be found to synchronize the shared file is downloaded, are transmitted in the LAN file request UDP (User Datagram Protocol User Datagram Protocol) broadcast packets . 数据包中包含该共享文件的散列值(HASH值)、以及数据包发送者的设备ID号。 Packet contains a hash value of the shared files (the HASH value), and the device ID of the originator of the packet.

[0036] 用户A、B、C在经过轮询后,如果发现有需要同步的共享文件,那么就会分别发送文件请求数据包。 [0036] User A, B, C after polling, if found necessary to synchronize the shared file, sends a file request packet, respectively.

[0037] 步骤23、局域网内的所有用户接收到文件请求数据包后,在本地搜索是否拥有该共享文件的数据,如果有则发送应答数据包,否则不回应。 [0037] Step 23, all LAN users receiving the file request packet, whether it has the data to share files in a local search, if you send a reply packet, or do not respond.

[0038] 例如,如果用户A发送了文件请求数据包,那么用户B和用户C就会收到该文件请求数据包,收到后用户B和用户C就在本地搜索,若发现其本地拥有该共享文件数据(已下载整个或部分文件),则发送应答数据包给用户A,若本地无相关文件数据且没有从云端开始下载该共享文件则不回应。 [0038] For example, if user A sends a file request packet, then the user B and user C will receive the file request packet after receiving the User B and User C in the local search, if found to have the local shared data file (all or part of downloaded files), the user transmits the response data packet to A, if no related documents local data from the cloud and does not start the download file is not shared response.

[0039] 如果用户B本地拥有该共享文件数据,则在收到文件请求数据包后,建立HTTP服务器(http sever)并生成可供访问的URL地址,该URL包括用户B的主机IP地址、下载端口、及该共享文件hash值。 After the [0039] If a local user B owns the shared data file, the file is in receipt of a request packet, establish an HTTP server (http sever) and generate a URL address for access, the URL includes a host IP address of the user B, and downloads port, and the shared file hash value. 并向请求方用户A发送应答数据包,应答数据包包括用户B的本机设备ID,以及刚生成的URL地址和本地该共享文件的数据信息,向用户A反馈本机设备ID以及本机IP,下载端口,该共享文件hash值和本地该共享文件的数据信息。 A requesting user and sends a response packet, a data packet includes the response data information of the client device ID, and the URL address just created locally and the user B of the shared file, the feedback native and native IP device ID to the user A , data port to download the shared file hash value and the local share files. 用户C本地没有该共享文件数据,则不进行回应。 C local user does not share the data file, no response. 这里的数据信息是指本地已有的数据块在文件中的起始位置和大小。 Data herein refers to the starting position and size of the local data blocks existing in the file.

[0040] 需要说明的是,本发明的应答数据包可以包括由用户B生成的URL地址,直接发送到用户A,也可以在应答数据包中包括用户B的IP地址,下载端口和该共享文件的hash值,由用户A生成URL并访问,本发明不限于采用哪种方法。 [0040] Incidentally, the response packet according to the present invention may include the URL generated by the user B, is sent directly to the user A, it may also include the IP address of user B, the download port and the shared file in a response data packet the hash value, generates a URL and access by the user a, to which the present invention is not limited to the method employed.

[0041] 步骤24、发送文件请求数据包的共享用户收集局域网内的应答数据包,如果接收到应答数据包,则根据应答数据包从发送该应答数据包的共享用户本地同步该共享文件,否则进入下一步。 Sharing User [0041] Step 24, the transmission file request packet to collect response data packet on the LAN, if the received reply packet is in accordance with the response packet to the shared file from the shared user home transmits the reply packet synchronization, or the next step.

[0042] 发送请求数据包的用户A将会等待5秒,收集局域网内回复数据包。 [0042] The packet transmission request of user A will wait five seconds, to collect LAN reply packet. 分析回复数据包后,如果发现局域网内有用户本地拥有需要同步的共享文件的数据,则从该本地拥有数据的用户获取文件数据。 After analyzing the reply packet, if found to have LAN users need to share files locally owned data synchronization, and data from the local user has access to the file data.

[0043] 例如用户A收到用户B的应答数据包,则根据应答数据包中包含的信息,并访问该URL地址,从用户B本地同步下载数据。 [0043] A user, for example, user B receives the response packet, the response packet based on the information contained in the URL address and access, local synchronization data from the user B to download. 如果用户C也在本地有该共享文件的数据,则也发送应答数据包,此时用户A先接收到谁的应答信息就先从哪里同步该共享文件。 If the local user C also has the shared data file, it sends a response packet, then the user A who received the first acknowledgment information to synchronize the shared file where to start.

[0044] 步骤25、由至少一个共享用户从云端服务器直接同步共享文件。 [0044] Step 25, the user directly shared by at least one synchronization server share a file from the cloud.

[0045] 如果局域网内无人拥有该共享文件数据,即用户B和用户C在本地都没有需要同步的共享文件的数据,则不回应,这时候则优先由设备ID号小的用户从云端服务器下载。 [0045] If no data file has the shared LAN, i.e. users B and C are not in the local file need to share data synchronization, no response, then the priority of the device at this time a small number of user ID from the cloud server download.

[0046] 例如如果用户A、用户B和用户C都在本地没有该共享文件的数据,则都会发送文件请求数据包,各用户会比较自己与其他用户的设备ID号,如果自己的设备ID号最小,则去云端服务器同步数据。 [0046] For example, if a user A, user B and user C are no data of the shared file locally, it will send the file request packet, each user will compare themselves to other user device ID, if the own device ID number minimum, the cloud server to synchronize data. 用户A、用户B和用户C根据文件请求数据包来比较各自设备ID,设备ID号小的客户从云端服务器下载该共享文件,如果用户C通过比较后,发现自己的设备ID号最小,则从云端服务器下载该共享文件,用户C在收到其他用户的文件请求数据包后,则应答从云端服务器新下载的信息,该信息包括从云端下载的数据块在文件中的起始位置和大小,并供局域网内其他用户同步。 User A, user B and user C according to the file request packets to compare their device ID, the device ID number of small customers to download the shared file servers from the cloud, if the user C By comparison, find the minimum number of own device ID, from cloud server to download the shared file, the user after receiving another user C's file request packet, the new information downloaded from the server cloud is answered, the information downloaded from the cloud including the data block in the file starting position and size, and for other users to synchronize LAN.

[0047] 若同一局域网内的共享用户数超过额定值,当同步用户较多情况下,一般当同一文件有超过10个用户同时有同步需求时则判多,这时候可调节ID号排序在前的N个设备从云端服务器同步下载数据,其他用户向这些设备请求文件数据。 [0047] When the number of users sharing the same LAN exceeds the rated value, when the synchronization user in many cases, typically when the same file has the penalty if more than 10 multi-user synchronization requirement while, this time can be adjusted to sort ID of the previous N of simultaneous device server to download data from the cloud, the other user requests file data to these devices.

[0048] 即根据接收的文件请求数据包,判断请求共享文件同步的共享用户数,设置从云端服务器直接下载的用户设备数量N ;比较本机设备ID号与其他共享用户的设备ID号,若本机设备ID号在所有同一局域网内的共享用户中按照升序排序在前N个之内,则从云端服务器直接同步所述共享文件,否则继续发送文件请求数据包。 [0048] That request based on the received file data packet, if the request to share files synchronized sharing users, N number set to download directly from the cloud server user equipment; Comparative native device ID number and other shared user device ID, if the machine sharing user device ID in the same local area network for all of the front in the ascending order of the number N, from the first server is directly synchronized with the shared files, or continue to send file request packet. [0049] 需要说明的是,用户本地都安装有客户端,上述步骤都通过客户端来执行,也可以通过客户端的设置来确定当用户较多的情况下由几个用户从云端服务器下载共享文件。 [0049] Incidentally, the local users are attached to the client, the above steps are performed by the client, or may be determined by the settings of the client when several users share the cloud downloaded from the server when the user more files . 设置的方法可以根据需求同步的用户数除以10取整的值作为从云端服务器同步的设备数,设备ID号按照降序或者升序排序不影响本发明的效果,即可以选择设备ID号大的用户去从云端服务器直接同步共享文件,也可以选择设备ID号小的用户去从云端服务器直接同步共享文件,这里不再赘述。 The method may be set by the value rounded 10 as the number of users demand synchronization does not affect the present invention in descending or ascending order from the cloud server device number, device ID number synchronization effect that the user can select a large device ID go directly from the cloud sync shared file server, you can also select the device ID number of smaller users to share files directly from the cloud sync server, not repeat them here. 同时在文件未同步完成前请求数据包会定时发送,持续向局域网内其他用户索取文件数据,而其他用户在收到请求数据包后进行相应的回应。 Simultaneously request file unsynchronized before completion packet sent periodically, continuously request file data to other users within the LAN, while other users in the corresponding response packet after receiving the request.

[0050] 以上实施例仅用以说明本发明的技术方案而非对其进行限制,在不背离本发明精神及其实质的情况下,熟悉本领域的技术人员当可根据本发明作出各种相应的改变和变形,但这些相应的改变和变形都应属于本发明所附的权利要求的保护范围。 [0050] The above embodiments are intended to illustrate the present invention but not intended to be limiting, without departing from the spirit and essence of the present invention, those skilled in the art can make various corresponding according to the present invention changes and modifications, but these modifications and variations should fall within the scope of the appended claims.

Claims (10)

1.一种从云端服务器同步共享文件的方法,用于使用云存储的同一局域网内的共享用户从云端服务器同步共享文件,其特征在于,包括步骤: (1)、同一局域网内的共享用户轮询检测云端服务器是否有需要进行同步的共享文件; (2)、当发现有需要进行同步的共享文件时,在局域网内发送文件请求数据包; (3)、局域网内的其他共享用户接收到文件请求数据包后,在本地搜索是否拥有所述共享文件的数据,如果有则发送应答数据包,否则不回应; (4)、发送文件请求数据包的共享用户收集局域网内的应答数据包,如果接收到应答数据包,则根据应答数据包从发送该应答数据包的共享用户本地同步所述共享文件,否则进入下一步; (5)、由至少一个共享用户从云端服务器直接同步所述共享文件。 A method for synchronizing shared files from the cloud server for sharing users within the same local area network cloud storage server synchronization file sharing from the cloud, which is characterized by comprising the steps of: (1) sharing the same LAN user wheel Inquiry detect cloud server whether it is necessary to share synchronizing files; (2), when found necessary to share file synchronization, the transmission in the LAN file request packet; (3), other shared LAN users receiving the file after the request packet, whether in local search data has the shared file, if you send a reply packet, or do not respond; (4), send the file request to share user data packets collected response data packets on the LAN, if receives the response data packet, the data packet according to the response from the synchronization of the shared shared local user transmits the reply packet file, otherwise the next step; (5), by at least one shared user directly from the cloud synchronizing the shared file server .
2.根据权利要求1所述的从云端服务器同步共享文件的方法,其特征在于,所述步骤(I)包括步骤: (1.1)、同一局域网内的共享用户轮询云端服务器,向云端服务器请求获取一份最新的共享文件信息; (1.2)、根据所述共享文件信息比较所述云端服务器中共享文件数据与本地存储的文件数据,若发现存在不同的文件,则表示此文件就是需要同步的共享文件。 2. The method for synchronizing shared files from the server to the cloud as claimed in claim 1, wherein said step (I) comprises the steps of: (1.1), the cloud server polls the user to share the same LAN, the request to the first server Get information about an updated shared file; (1.2), the file sharing data information of the file stored locally in accordance with the comparison in the first server the shared data file, if found different file, then the file is to be synchronized shared documents.
3.根据权利要求2所述的从云`端服务器同步共享文件的方法,其特征在于,所述共享文件信息包括共享文件的文件名,文件大小,文件版本号和文件内容摘要。 3. The method of synchronizing a file from the shared server terminal according to the cloud `according to claim 2, wherein the shared information includes a file sharing file name, file size, file version number and document summary.
4.根据权利要求1所述的从云端服务器同步共享文件的方法,其特征在于,所述文件请求数据包为UDP广播数据包。 4. The method of synchronizing a shared file from the cloud server according to claim 1, wherein said file request packet is a UDP broadcast packets.
5.根据权利要求4所述的从云端服务器同步共享文件的方法,其特征在于,所述文件请求数据包包括所述共享文件的散列值以及文件请求数据包发送者的设备ID号。 5. The method of synchronizing a shared file from the cloud server according to claim 4, wherein said request packet includes a file and file hash value of the shared file device ID request data packet sender.
6.根据权利要求1所述的从云端服务器同步共享文件的方法,其特征在于,拥有所述共享文件的数据的其他共享用户在收到文件请求数据包后,还包括步骤: 建立HTTP服务器并生成可供访问的URL地址,将URL封装在应答数据包中发送到所述文件请求数据包的发送者。 6. The method of synchronizing a shared file from the cloud server according to claim 1, characterized in that the other users have to share the shared file data request packet is received in the document, further comprising the step of: establishing an HTTP server and generating an address for accessing the URL, the URL is sent to the sender of the encapsulated file request packet in the response packet.
7.根据权利要求6所述的从云端服务器同步共享文件的方法,其特征在于,所述文件请求数据包的发送者在接收到应答数据包后,解析应答数据包,访问所述的URL地址,从发送该应答数据包的共享用户本地同步所述共享文件。 The synchronization method of sharing files from the cloud server according to claim 6, characterized in that the sender of the file request packet after receiving the response data packet, parses the response data packet, accessing the URL address , the sharing user from the synchronization reply packet to transmit the local shared file.
8.根据权利要求6或7所述的从云端服务器同步共享文件的方法,其特征在于,所述应答数据包包括本机设备ID,URL地址以及本地该共享文件的数据信息,所述URL地址包括本机IP地址、下载端口和所述共享文件的散列值,所述数据信息包括本地已有的数据块在所述共享文件中的起始位置和大小。 8. A method of synchronizing a shared file from the cloud server 6 or claim 7, wherein said response data packet includes information native device ID, and the URL address of the shared file locally, the URL address includes a hash value of the local IP address, port, and the shared file downloading, the data information comprises a starting position and size of the local data block existing in said shared file.
9.根据权利要求5所述的从云端服务器同步共享文件的方法,其特征在于,由至少一个共享用户从云端服务器直接同步所述共享文件包括步骤: 同一局域网内的共享用户根据接收的文件请求数据包,判断请求共享文件同步的共享用户数,设置从云端服务器直接下载的用户设备数量N ; 比较本机设备ID号与其他共享用户的设备ID号,若本机设备ID号在所有同一局域网内的共享用户中按照升序排序在前N个之内,则从云端服务器直接同步所述共享文件,否则继续发送文件请求数据包。 9. A method of synchronizing a shared file server from the cloud as claimed in claim 5, wherein the at least one shared by the user directly from the cloud synchronize the shared file server comprising the steps of: sharing the same LAN users within the file according to the received request packet, if the request to share files synchronized sharing users, N number set to download directly from the cloud server user equipment; Comparative native device ID number and other shared user device ID, if the local device ID number in all the same LAN shared user in the ascending order in the front of the N number, from the first server synchronize the shared file directly, or continue to send file request packet.
10.根据权利要求1所述的从云端服务器同步共享文件的方法,其特征在于,还包括步骤: 在共享文件未同步完成前共享用户会定时发送文件请求数据包。 10. A method of synchronizing a shared file from the cloud server according to claim 1, characterized in that, further comprising the step of: sharing the shared file before the user has not completed the synchronization file will periodically send request packet.
CN2013100609937A 2013-02-27 2013-02-27 Synchronous file sharing method from cloud server CN103108051A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2013100609937A CN103108051A (en) 2013-02-27 2013-02-27 Synchronous file sharing method from cloud server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2013100609937A CN103108051A (en) 2013-02-27 2013-02-27 Synchronous file sharing method from cloud server

Publications (1)

Publication Number Publication Date
CN103108051A true CN103108051A (en) 2013-05-15

Family

ID=48315618

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2013100609937A CN103108051A (en) 2013-02-27 2013-02-27 Synchronous file sharing method from cloud server

Country Status (1)

Country Link
CN (1) CN103108051A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103414796A (en) * 2013-07-24 2013-11-27 清华大学 Supporting platform of internet universal address based on formalized description
CN103747032A (en) * 2013-12-12 2014-04-23 北京奇虎科技有限公司 File transmission method, device and system
CN104135518A (en) * 2014-07-29 2014-11-05 深圳市金立通信设备有限公司 A method for sharing data
CN104702578A (en) * 2013-12-09 2015-06-10 中兴通讯股份有限公司 Terminal communication method and terminal
CN104750723A (en) * 2013-12-30 2015-07-01 腾讯科技(深圳)有限公司 File sharing method, system, browser and server
CN105933393A (en) * 2016-04-12 2016-09-07 乐视控股(北京)有限公司 Intra-local area network data synchronization method, device and user terminal
CN106899639A (en) * 2015-12-21 2017-06-27 北京奇虎科技有限公司 Data resource obtaining method, index server and communication system
CN106911709A (en) * 2017-03-24 2017-06-30 华东师范大学 Information transmission method and system based on cloud service

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102143000A (en) * 2011-03-31 2011-08-03 中兴通讯股份有限公司 Method for controlling data recovery, node, control device and disaster-recovery system
CN102413185A (en) * 2011-11-25 2012-04-11 广州杰赛科技股份有限公司 Cloud platform automatic updating system based on BT technology
CN102624932A (en) * 2012-04-23 2012-08-01 网经科技(苏州)有限公司 Index-based remote cloud data synchronizing method
US20120233117A1 (en) * 2011-03-08 2012-09-13 Rackspace Us, Inc. Higher Efficiency Storage Replication Using Compression

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120233117A1 (en) * 2011-03-08 2012-09-13 Rackspace Us, Inc. Higher Efficiency Storage Replication Using Compression
CN102143000A (en) * 2011-03-31 2011-08-03 中兴通讯股份有限公司 Method for controlling data recovery, node, control device and disaster-recovery system
CN102413185A (en) * 2011-11-25 2012-04-11 广州杰赛科技股份有限公司 Cloud platform automatic updating system based on BT technology
CN102624932A (en) * 2012-04-23 2012-08-01 网经科技(苏州)有限公司 Index-based remote cloud data synchronizing method

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103414796A (en) * 2013-07-24 2013-11-27 清华大学 Supporting platform of internet universal address based on formalized description
CN104702578A (en) * 2013-12-09 2015-06-10 中兴通讯股份有限公司 Terminal communication method and terminal
CN103747032A (en) * 2013-12-12 2014-04-23 北京奇虎科技有限公司 File transmission method, device and system
CN103747032B (en) * 2013-12-12 2016-09-28 北京奇虎科技有限公司 A document transmission method, apparatus and system
CN104750723A (en) * 2013-12-30 2015-07-01 腾讯科技(深圳)有限公司 File sharing method, system, browser and server
WO2015101302A1 (en) * 2013-12-30 2015-07-09 腾讯科技(深圳)有限公司 Data sharing method, system, user end and background server
CN104750723B (en) * 2013-12-30 2018-12-07 腾讯科技(深圳)有限公司 File sharing method, system, browser and server
CN104135518A (en) * 2014-07-29 2014-11-05 深圳市金立通信设备有限公司 A method for sharing data
CN106899639A (en) * 2015-12-21 2017-06-27 北京奇虎科技有限公司 Data resource obtaining method, index server and communication system
CN105933393A (en) * 2016-04-12 2016-09-07 乐视控股(北京)有限公司 Intra-local area network data synchronization method, device and user terminal
WO2017177621A1 (en) * 2016-04-12 2017-10-19 乐视控股(北京)有限公司 Data synchronization method in local area network, and apparatus and user terminal therefor
CN106911709A (en) * 2017-03-24 2017-06-30 华东师范大学 Information transmission method and system based on cloud service

Similar Documents

Publication Publication Date Title
EP2263163B1 (en) Content management
CN1132113C (en) Performance optimizations for computer networks using HTTP
US10157135B2 (en) Cache optimization
US9210235B2 (en) Client side cache management
US7716306B2 (en) Data caching based on data contents
JP5855663B2 (en) System and method to balance the server based on server load state
CN101409706B (en) Method, system and relevant equipment for distributing data of edge network
WO2008016694A2 (en) Improved distribution of content on a network
CN102833294A (en) File processing method and system based on cloud storage, and server cluster system
CN101051980A (en) File data distributing method and relative device
CN101997924A (en) Cloud storage file transfer protocol (CFTP)
EP2721506A2 (en) Efficient state reconciliation
JP5792850B2 (en) File folder transmission on the network
CN101356769B (en) Method for forming group on one node of equivalence content distribution cloud
CN100473008C (en) Single-node-to-multi-node concurrent download system and method
JP6086871B2 (en) Method and system for caching data communications by a computer network
IL219196D0 (en) System and mehod for providing faster and more efficient data communication
US9729657B2 (en) Method and apparatus for reducing network resource transmission size using delta compression
CN101340371B (en) Session keeping method and load balance apparatus
CN103051740B (en) DNS method, dns server and Domain Name System
US10110429B2 (en) Enabling planned upgrade/downgrade of network devices without impacting network sessions
RU2010151959A (en) The method and system use a supported local host node cache and cryptographic hash functions to reduce network traffic
CN101316226B (en) Method, device and system for acquiring resources
CN102882985B (en) File sharing method based on cloud storage
CN102223411B (en) Method and system for downloading file by adopting P2P (Peer-to-Peer) technology and client side

Legal Events

Date Code Title Description
C06 Publication
C10 Entry into substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)