WO2017101426A1 - 用于文件同步的方法、接收方设备及系统 - Google Patents
用于文件同步的方法、接收方设备及系统 Download PDFInfo
- Publication number
- WO2017101426A1 WO2017101426A1 PCT/CN2016/089557 CN2016089557W WO2017101426A1 WO 2017101426 A1 WO2017101426 A1 WO 2017101426A1 CN 2016089557 W CN2016089557 W CN 2016089557W WO 2017101426 A1 WO2017101426 A1 WO 2017101426A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- file
- storage area
- blocks
- unique identifier
- file blocks
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1095—Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/40—Support for services or applications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
Definitions
- the present application relates to the field of file synchronization, and in particular to a method, a receiver device and a system for file synchronization.
- the transmission of documents is inseparable.
- the file to be transmitted is generally transmitted from the transmitting end to the destination receiving end as a separate transmission part.
- the existing file transfer method may not only have a poor transmission efficiency, but also may cause a problem that the file transfer is unstable and the file transfer fails.
- the time for file transfer increases accordingly, and the probability of successful transmission is also affected, thereby failing to ensure efficient and stable transmission of large files.
- an embodiment of the present invention provides a method for file synchronization, where the method includes: receiving a file synchronization request from a sender device; sending a response message to the sender device based on the request, the response message includes receiving a plurality of storage area addresses of the party device; receiving a plurality of file blocks sent by the sender device based on the response message, the plurality of file blocks being obtained by blocking the files to be transferred, and each of the plurality of file blocks including the unique identifier And with the unique identifier a storage area address of the corresponding recipient device; and assigning each file block to the corresponding storage area according to the unique identifier of each file block and the storage area address of the recipient device corresponding to the unique identifier, and storing each of the file blocks Multiple file blocks in the storage area are assembled in real time to obtain files to be transferred.
- An embodiment of the present invention further provides a receiver device for file synchronization, where the receiver device includes: means for receiving a file synchronization request from a sender device; and sending a response message to the request based on the request
- the device of the sender device, the response message includes a plurality of storage area addresses of the receiver device, and means for receiving the plurality of file blocks sent by the sender device based on the response message, the plurality of files Blocks are obtained by blocking the files to be transferred, and each of the plurality of file blocks includes a storage area address uniquely identifying and a recipient device corresponding to the unique identifier; and for each file block
- the storage area address uniquely identifying and the recipient device corresponding to the unique identifier allocates each file block to the corresponding storage area, and assembles a plurality of file blocks stored in the respective storage areas in real time to obtain the to-be-transmitted File device.
- An embodiment of the present invention further provides a method for file synchronization, where the method includes: a sender device sends a file synchronization request; a receiver device receives the file synchronization request; and the receiver device sends the file synchronization request. a response message, the response message including a plurality of storage area addresses of the recipient device; the sender device transmitting a plurality of file blocks based on the response message, the plurality of file blocks being obtained by blocking the file to be transmitted, and Each of the plurality of file blocks includes a storage area address that uniquely identifies and a recipient device corresponding to the unique identifier; the recipient device receives the plurality of file blocks; and the recipient device is A unique identifier of each file block and a storage area address of the recipient device corresponding to the unique identifier allocate each file block to a corresponding storage area, and assemble a plurality of file blocks stored in each storage area in real time. To obtain the file to be transmitted.
- the embodiment of the invention further provides a system for file synchronization, the system comprising a sender setting And a receiver device, wherein the sender device is configured to send a file synchronization request; the receiver device is configured to receive the file synchronization request; and the receiver device is further configured to send a response message according to the request,
- the response message includes a plurality of storage area addresses of the receiver device, and the sender device is further configured to send, according to the response message, a plurality of file blocks, where the plurality of file blocks are obtained by blocking the files to be transmitted, and
- Each of the plurality of file blocks includes a storage area address uniquely identifying and a recipient device corresponding to the unique identifier; the recipient device is further configured to receive the plurality of file blocks; and the receiving
- the party device is further configured to allocate each file block to a corresponding storage area according to a unique identifier of each file block and a storage area address of the receiver device corresponding to the unique identifier, and store the plurality of file blocks in
- a plurality of file blocks obtained by the sender device by performing block segmentation on the file to be transmitted may be received, and the unique identifier of each file block and the storage area address of the receiver device corresponding to the unique identifier may be used.
- Each file block is allocated to a storage area corresponding to the receiving device, and a plurality of file blocks stored in the respective storage areas are assembled in real time to obtain a file to be transmitted.
- the synchronization process of the file to be transmitted from the sender device to the receiver device can be realized.
- the file to be transmitted is divided into a plurality of file blocks for transmission, the problem that the file is large and the transmission error occurs is avoided, the stable synchronous transmission of the file is realized, and the transmission success rate is improved.
- FIG. 1 is a flow chart of a method for file synchronization in accordance with an embodiment of the present invention
- FIG. 2 is a flow chart of a method for file synchronization according to another embodiment of the present invention.
- FIG. 3 is a block diagram of a system for file synchronization in accordance with an embodiment of the present invention.
- FIG. 1 is a flow chart of a method for file synchronization in accordance with an embodiment of the present invention.
- a method for file synchronization provided by an embodiment of the present invention includes:
- S104 Receive a plurality of file blocks sent by the sender device according to the response message, where the plurality of file blocks are obtained by blocking a file to be transmitted, and each of the plurality of file blocks includes a unique file block. Identifying a storage area address of the recipient device corresponding to the unique identifier;
- the memory in the receiver device can obtain a plurality of storage areas as described above by area division, and each area is used to store one file block.
- each file block by receiving a plurality of file blocks obtained by the sender device by blocking the file to be transferred, and using the unique identifier of each file block and the storage area address of the receiver device corresponding to the unique identifier
- the storage area corresponding to the receiving device is allocated, and a plurality of file blocks stored in the respective storage areas are assembled in real time to obtain a file to be transmitted.
- the synchronization process of the file to be transmitted from the sender device to the receiver device is implemented.
- the file to be transmitted is divided into a plurality of file blocks for transmission, the problem that the file is large and the transmission error occurs is avoided, the stable synchronous transmission of the file is realized, and the transmission success rate is improved.
- the method may further include:
- S108 Receive verification information of each of the plurality of file blocks from the sender device.
- the correctness of the received file block can be judged by the verification information, and the response is sent according to the judgment result, so that the sender device can know whether the transmitted file block is the correct file block.
- the sender device can resend the correct file block to replace the erroneous file block to ensure the correctness of the file synchronization.
- steps S108-S114 are performed after step S106, the present invention is not limited thereto.
- steps S108-S114 may be performed prior to real-time assembly of a plurality of file blocks stored in respective storage areas, so that the correct file blocks may be sent to replace the erroneous file blocks before the file blocks are assembled.
- the plurality of file blocks may be received in parallel. Thereby, the time taken for file synchronization can be shortened, and efficiency can be improved.
- the transmitted content and the received content may be encrypted.
- An embodiment of the present invention further provides a receiver device for file synchronization, where the receiver device includes: means for receiving a file synchronization request from a sender device; and sending a response message to the request based on the request
- the device of the sender device, the response message includes a plurality of storage area addresses of the receiver device, and means for receiving the plurality of file blocks sent by the sender device based on the response message, the plurality of files Blocks are obtained by blocking the files to be transferred, and each of the plurality of file blocks includes a storage area address uniquely identifying and a recipient device corresponding to the unique identifier; and for each file block
- the storage area address uniquely identifying and the recipient device corresponding to the unique identifier allocates each file block to the corresponding storage area, and assembles a plurality of file blocks stored in the respective storage areas in real time to obtain the to-be-transmitted File device.
- each file block by receiving a plurality of file blocks obtained by the sender device by blocking the file to be transferred, and using the unique identifier of each file block and the storage area address of the receiver device corresponding to the unique identifier
- the storage area corresponding to the receiving device is allocated, and a plurality of file blocks stored in the respective storage areas are assembled in real time to obtain a file to be transmitted.
- the synchronization process of the file to be transmitted from the sender device to the receiver device can be realized.
- the file to be transmitted is divided into a plurality of file blocks for transmission, the problem that the file is large and the transmission error occurs is avoided, the stable synchronous transmission of the file is realized, and the transmission success rate is improved.
- the receiver device may further include: means for receiving respective verification information of the plurality of file blocks from the sender device; for receiving the plurality of Means for comparing the respective verification information of the file block with the verification information carried by the corresponding file block in the storage area; and for transmitting, in the case of a comparison result, a device indicating that the file block transmission is correct; A device that transmits a response indicating a file block transmission error is transmitted if the comparison result is a mismatch.
- the correctness of the received file block can be judged by the verification information, and the root is determined. According to the judgment result, the response is sent, so that the sender device can know whether the sent file block is the correct file block, and if the response sent is a response indicating a file block error, the correct file block can be resent to be replaced. Incorrect file blocks to ensure the correctness of file synchronization.
- the transmitted content and the received content may be encrypted.
- FIG. 2 is a flow chart of a method for file synchronization in accordance with another embodiment of the present invention.
- a method for file synchronization provided by another embodiment of the present invention includes:
- the sender device sends a file synchronization request.
- the receiver device receives the file synchronization request.
- the receiver device sends a response message according to the request, where the response message includes multiple storage area addresses of the receiver device.
- the sender device sends, according to the response message, a plurality of file blocks, where the plurality of file blocks are obtained by blocking a file to be transmitted, and each of the plurality of file blocks includes a unique identifier and a storage area address of the recipient device corresponding to the unique identifier;
- the receiver device receives the plurality of file blocks
- the receiver device allocates each file block to a corresponding storage area according to a unique identifier of each file block and a storage area address of the receiver device corresponding to the unique identifier, and stores the file blocks in the respective storage areas.
- a plurality of file blocks are assembled in real time to obtain the file to be transmitted.
- the file blocks are allocated to the storage area corresponding to the receiving device, and the plurality of file blocks stored in the respective storage areas are assembled in real time to obtain a file to be transmitted.
- the synchronization process of the file to be transmitted from the sender device to the receiver device can be realized.
- the file to be transmitted is divided into a plurality of file blocks for transmission, the file is prevented from being large The problem of transmission error is realized, and the stable synchronous transmission of the file is realized, and the transmission success rate is improved.
- the method may further include:
- the sender device sends verification information of each of the multiple file blocks.
- the receiving device compares the received verification information of each of the plurality of file blocks with the verification information carried by the corresponding file block in the storage area.
- the receiver device sends a response indicating a file block transmission error if the comparison result is a mismatch.
- the sender device can resend the correct file block to the recipient device to replace the erroneous file block to ensure the correctness of the file synchronization.
- the recipient device receives the plurality of file blocks in a parallel manner. Thereby, the time taken for file synchronization can be shortened, and efficiency can be improved.
- the transmitted content and the received content may be encrypted.
- FIG. 3 is a block diagram of a system for file synchronization in accordance with an embodiment of the present invention.
- the sender device 30 is configured to send a file synchronization request
- the receiver device 32 is further configured to send a response message according to the request, where the response message includes multiple storage area addresses of the receiver device;
- the sender device 30 is further configured to send, according to the response message, a plurality of file blocks, where the plurality of file blocks are obtained by blocking a file to be transferred, and each of the plurality of file blocks includes a unique Identifying a storage area address of the recipient device corresponding to the unique identifier;
- the sender device 30 is further configured to send verification information of each of the plurality of file blocks;
- the receiver device 32 is further configured to receive verification information of each of the plurality of file blocks;
- the receiving device 32 is further configured to compare the received verification information of each of the plurality of file blocks with the verification information carried by the corresponding file block in the storage area.
- the receiver device 32 is further configured to send a response indicating a file block transmission error if the comparison result is a mismatch.
- the receiver device 32 can judge the correctness of the received file block by using the verification information, and send a response to the sender device 30 according to the judgment result, so that the sender device 30 can know the transmitted file block. Is it the correct file block?
- the sender device 30 can resend the correct file block to the recipient device 32 to replace the erroneous file block to ensure the correctness of the file synchronization.
- the sender device 30 and the receiver device 32 may both be clients or servers, or one may be a client and the other a server.
- the specific situation may be set by a person skilled in the art according to actual conditions, and the present invention does not limit this.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Multimedia (AREA)
- Information Transfer Between Computers (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本发明实施例涉及文件同步领域,公开了一种用于文件同步的方法、接收方设备及系统。其中该方法包括:接收来自发送方设备的文件同步请求;基于请求发送响应消息,响应消息包括接收方设备的多个存储区域地址;接收发送方设备基于响应消息发送的多个文件块,多个文件块通过对待传输文件进行分块得到,并且多个文件块中的每个文件块包括唯一标识和与该唯一标识对应的接收方设备的存储区域地址;以及根据每个文件块的唯一标识和与该唯一标识对应的接收方设备的存储区域地址将每个文件块分配至对应的存储区域,并对存储在各个存储区域中的多个文件块进行实时组装,以得到待传输文件。由此,即便待传输文件较大,也可以确保文件稳定传输,提高同步成功率。
Description
交叉引用
本申请引用于2015年12月14日递交的第201510925149.5号中国专利申请,其通过引用被全部并入本申请。
本申请涉及文件同步领域,具体地,涉及一种用于文件同步的方法、接收方设备及系统。
在当今的信息时代,已然离不开文件的传输。在现有的文件传输过程中,通常都是将待传输的文件整体作为一个独立的传输部分从发送端传输到目的接收端。然而,当待传输的文件较大时,现有的文件传输方法不仅会出现传输效率差的情况,还可能出现文件传输不稳定而导致文件传输失败的问题。并且,随着文件的大小不断变大,文件传输的时间相应地就会增加,同时成功传输的几率也会受到影响,从而无法保证较大文件的高效稳定传输。
发明内容
本发明实施例的目的是提供一种用于文件同步的方法、接收方设备及系统,以解决上述现有技术中的问题。
为了实现上述目的,本发明实施例提供一种用于文件同步的方法,其中该方法包括:接收来自发送方设备的文件同步请求;基于请求发送响应消息至所述发送方设备,响应消息包括接收方设备的多个存储区域地址;接收发送方设备基于响应消息发送的多个文件块,多个文件块通过对待传输文件进行分块得到,并且多个文件块中的每个文件块包括唯一标识和与该唯一标识
对应的接收方设备的存储区域地址;以及根据每个文件块的唯一标识和与该唯一标识对应的接收方设备的存储区域地址将每个文件块分配至对应的存储区域,并对存储在各个存储区域中的多个文件块进行实时组装,以得到待传输文件。
本发明实施例还提供了一种用于文件同步的接收方设备,其中,该接收方设备包括:用于接收来自发送方设备的文件同步请求的装置;用于基于所述请求发送响应消息至所述发送方设备的装置,所述响应消息包括接收方设备的多个存储区域地址;用于接收所述发送方设备基于所述响应消息发送的多个文件块的装置,所述多个文件块通过对待传输文件进行分块得到,并且所述多个文件块中的每个文件块包括唯一标识和与该唯一标识对应的接收方设备的存储区域地址;以及用于根据每个文件块的唯一标识和与该唯一标识对应的接收方设备的存储区域地址将每个文件块分配至对应的存储区域、并对存储在各个存储区域中的多个文件块进行实时组装以得到所述待传输文件的装置。
本发明实施例还提供了一种用于文件同步的方法,其中,该方法包括:发送方设备发送文件同步请求;接收方设备接收所述文件同步请求;所述接收方设备基于所述请求发送响应消息,所述响应消息包括接收方设备的多个存储区域地址;所述发送方设备基于所述响应消息发送多个文件块,所述多个文件块通过对待传输文件进行分块得到,并且所述多个文件块中的每个文件块包括唯一标识和与该唯一标识对应的接收方设备的存储区域地址;所述接收方设备接收所述多个文件块;以及所述接收方设备根据每个文件块的唯一标识和与该唯一标识对应的接收方设备的存储区域地址将每个文件块分配至对应的存储区域,并对存储在各个存储区域中的多个文件块进行实时组装,以得到所述待传输文件。
本发明实施例还提供了一种用于文件同步的系统,该系统包括发送方设
备和接收方设备,其中,所述发送方设备用于发送文件同步请求;所述接收方设备用于接收所述文件同步请求;所述接收方设备还用于基于所述请求发送响应消息,所述响应消息包括接收方设备的多个存储区域地址;所述发送方设备还用于基于所述响应消息发送多个文件块,所述多个文件块通过对待传输文件进行分块得到,并且所述多个文件块中的每个文件块包括唯一标识和与该唯一标识对应的接收方设备的存储区域地址;所述接收方设备还用于接收所述多个文件块;以及所述接收方设备还用于根据每个文件块的唯一标识和与该唯一标识对应的接收方设备的存储区域地址将每个文件块分配至对应的存储区域,并对存储在各个存储区域中的多个文件块进行实时组装,以得到所述待传输文件。
通过上述技术方案,可以接收发送方设备发送的通过对待传输文件进行分块得到的多个文件块,并利用每个文件块的唯一标识和与该唯一标识对应的接收方设备的存储区域地址,将每个文件块分配至接收方设备对应的存储区域,并对存储在各个存储区域中的多个文件块进行实时组装,以得到待传输文件。由此,可以实现待传输文件从发送方设备到接收方设备的同步过程。并且,由于待传输文件被分为多个文件块进行传输,所以避免了文件较大而出现传输错误的问题,实现了文件的稳定同步传输,提高了传输成功率。
本发明的其它特征和优点将在随后的具体实施方式部分予以详细说明。
附图是用来提供对本发明的进一步理解,并且构成说明书的一部分,与下面的具体实施方式一起用于解释本发明,但并不构成对本发明的限制。在附图中:
图1是根据本发明一种实施方式的用于文件同步的方法的流程图;
图2是根据本发明另一种实施方式的用于文件同步的方法的流程图;以
及
图3是根据本发明一种实施方式的用于文件同步的系统的方框图。
以下结合附图对本发明的具体实施方式进行详细说明。应当理解的是,此处所描述的具体实施方式仅用于说明和解释本发明,并不用于限制本发明。
图1是根据本发明一种实施方式的用于文件同步的方法的流程图。
如图1所示,本发明一种实施方式提供的用于文件同步的方法包括:
S100,接收来自发送方设备的文件同步请求;
S102,基于所述请求发送响应消息至所述发送方设备,所述响应消息包括接收方设备的多个存储区域地址;
S104,接收所述发送方设备基于所述响应消息发送的多个文件块,所述多个文件块通过对待传输文件进行分块得到,并且所述多个文件块中的每个文件块包括唯一标识和与该唯一标识对应的接收方设备的存储区域地址;以及
S106,根据每个文件块的唯一标识和与该唯一标识对应的接收方设备的存储区域地址将每个文件块分配至对应的存储区域,并对存储在各个存储区域中的多个文件块进行实时组装,以得到所述待传输文件。
其中,接收方设备中的存储器可以通过区域划分得到如上所述的多个存储区域,每个区域用于存储一个文件块。
通过接收发送方设备发送的通过对待传输文件进行分块得到的多个文件块,并利用每个文件块的唯一标识和与该唯一标识对应的接收方设备的存储区域地址,将每个文件块分配至接收方设备对应的存储区域,并对存储在各个存储区域中的多个文件块进行实时组装,以得到待传输文件。由此,可
以实现待传输文件从发送方设备到接收方设备的同步过程。并且,由于待传输文件被分为多个文件块进行传输,所以避免了文件较大而出现传输错误的问题,实现了文件的稳定同步传输,提高了传输成功率。
并且,在该方法中,该方法还可以包括:
S108,接收来自所述发送方设备的所述多个文件块各自的校验信息;
S110,将所接收的所述多个文件块各自的校验信息分别与存储区域中对应的文件块所携带的校验信息进行比较;
S112,在比较结果为匹配的情况下发送表示文件块传输正确的响应;
S114,在比较结果为不匹配的情况下发送表示文件块传输错误的响应。
由此,可以通过校验信息对所接收的文件块的正确与否加以判断,并根据判断结果发送响应,从而发送方设备就可以获知所发送的文件块是否为正确的文件块。
此外,在发送的响应为表示文件块错误的响应的情况下,发送方设备可以重新发送正确的文件块以替换错误的文件块,以确保文件同步的正确性。
在图1中,虽然示出的是步骤S108-S114在步骤S106之后执行,但本发明不限于此。例如,可以在对存储在各个存储区域中的多个文件块进行实时组装之前执行步骤S108-S114,从而可以在对文件块进行组装之前发送正确的文件块来替换错误的文件块。
根据本发明一种实施方式,可以通过并行方式接收所述多个文件块。由此,可以缩短文件同步所花费的时间,提高效率。
根据本发明一种实施方式,所发送的内容以及接收的内容可以被加密。
通过对所发送的内容以及接收的内容进行加密,可以确保同步传输过程中文件传输的安全性。
其中,对于具体的加密过程,本领域技术人员可以采用现有技术中已有的加密方式来实现,并可以采用相应的解密过程进行解密,本发明在此不再
赘述。
本发明实施例还提供了一种用于文件同步的接收方设备,其中,该接收方设备包括:用于接收来自发送方设备的文件同步请求的装置;用于基于所述请求发送响应消息至所述发送方设备的装置,所述响应消息包括接收方设备的多个存储区域地址;用于接收所述发送方设备基于所述响应消息发送的多个文件块的装置,所述多个文件块通过对待传输文件进行分块得到,并且所述多个文件块中的每个文件块包括唯一标识和与该唯一标识对应的接收方设备的存储区域地址;以及用于根据每个文件块的唯一标识和与该唯一标识对应的接收方设备的存储区域地址将每个文件块分配至对应的存储区域、并对存储在各个存储区域中的多个文件块进行实时组装以得到所述待传输文件的装置。
通过接收发送方设备发送的通过对待传输文件进行分块得到的多个文件块,并利用每个文件块的唯一标识和与该唯一标识对应的接收方设备的存储区域地址,将每个文件块分配至接收方设备对应的存储区域,并对存储在各个存储区域中的多个文件块进行实时组装,以得到待传输文件。由此,可以实现待传输文件从发送方设备到接收方设备的同步过程。并且,由于待传输文件被分为多个文件块进行传输,所以避免了文件较大而出现传输错误的问题,实现了文件的稳定同步传输,提高了传输成功率。
根据本发明一种实施方式,该接收方设备还可以包括:用于接收来自所述发送方设备的所述多个文件块各自的校验信息的装置;用于将所接收的所述多个文件块各自的校验信息分别与存储区域中对应的文件块所携带的校验信息进行比较的装置;用于在比较结果为匹配的情况下发送表示文件块传输正确的响应的装置;用于在比较结果为不匹配的情况下发送表示文件块传输错误的响应的装置。
由此,可以通过校验信息对所接收的文件块的正确与否加以判断,并根
据判断结果发送响应,从而发送方设备就可以获知所发送的文件块是否为正确的文件块,并在发送的响应为表示文件块错误的响应的情况下,可以重新发送正确的文件块以替换错误的文件块,以确保文件同步的正确性。
根据本发明一种实施方式,所发送的内容以及接收的内容可以被加密。
通过对所发送的内容以及接收的内容进行加密,可以确保同步传输过程中文件传输的安全性。
图2是根据本发明另一种实施方式的用于文件同步的方法的流程图。
如图2所示,本发明另一种实施方式提供的用于文件同步的方法包括:
S200,发送方设备发送文件同步请求;
S202,接收方设备接收所述文件同步请求;
S204,所述接收方设备基于所述请求发送响应消息,所述响应消息包括接收方设备的多个存储区域地址;
S206,所述发送方设备基于所述响应消息发送多个文件块,所述多个文件块通过对待传输文件进行分块得到,并且所述多个文件块中的每个文件块包括唯一标识和与该唯一标识对应的接收方设备的存储区域地址;
S208,所述接收方设备接收所述多个文件块;以及
S210,所述接收方设备根据每个文件块的唯一标识和与该唯一标识对应的接收方设备的存储区域地址将每个文件块分配至对应的存储区域,并对存储在各个存储区域中的多个文件块进行实时组装,以得到所述待传输文件。
通过接收方设备接收发送方设备发送的通过对待传输文件进行分块得到的多个文件块,并利用每个文件块的唯一标识和与该唯一标识对应的接收方设备的存储区域地址,将每个文件块分配至接收方设备对应的存储区域,并对存储在各个存储区域中的多个文件块进行实时组装,以得到待传输文件。由此,可以实现待传输文件从发送方设备到接收方设备的同步过程。并且,由于待传输文件被分为多个文件块进行传输,所以避免了文件较大而出
现传输错误的问题,实现了文件的稳定同步传输,提高了传输成功率。
在该方法中,该方法还可以包括:
S212,所述发送方设备发送所述多个文件块各自的校验信息;
S214,所述接收方设备接收所述多个文件块各自的校验信息;
S216,所述接收方设备将所接收的所述多个文件块各自的校验信息分别与存储区域中对应的文件块所携带的校验信息进行比较;
S218,所述接收方设备在比较结果为匹配的情况下发送表示文件块传输正确的响应;
S220,所述接收方设备在比较结果为不匹配的情况下发送表示文件块传输错误的响应。
由此,接收方设备可以通过校验信息对所接收的文件块的正确与否加以判断,并根据判断结果发送响应至发送方设备,从而发送方设备就可以获知所发送的文件块是否为正确的文件块。
此外,在发送的响应为表示文件块错误的响应的情况下,发送方设备可以向接收方设备重新发送正确的文件块以替换错误的文件块,以确保文件同步的正确性。
在图2中,虽然示出的是步骤S212-S220在步骤S210之后执行,但本发明不限于此。例如,可以在对存储在各个存储区域中的多个文件块进行实时组装之前执行步骤S212-S220,从而可以在对文件块进行组装之前发送正确的文件块来替换错误的文件块。
根据本发明一种实施方式,所述接收方设备通过并行方式接收所述多个文件块。由此,可以缩短文件同步所花费的时间,提高效率。
根据本发明一种实施方式,所发送的内容以及接收的内容可以被加密。
通过对所发送的内容以及接收的内容进行加密,可以确保同步传输过程中文件传输的安全性。
图3是根据本发明一种实施方式的用于文件同步的系统的方框图。
如图3所示,本发明一种实施方式提供的用于文件同步的系统包括发送方设备30和接收方设备32,其中,
所述发送方设备30用于发送文件同步请求;
所述接收方设备32用于接收所述文件同步请求;
所述接收方设备32还用于基于所述请求发送响应消息,所述响应消息包括接收方设备的多个存储区域地址;
所述发送方设备30还用于基于所述响应消息发送多个文件块,所述多个文件块通过对待传输文件进行分块得到,并且所述多个文件块中的每个文件块包括唯一标识和与该唯一标识对应的接收方设备的存储区域地址;
所述接收方设备32还用于接收所述多个文件块;以及
所述接收方设备32还用于根据每个文件块的唯一标识和与该唯一标识对应的接收方设备的存储区域地址将每个文件块分配至对应的存储区域,并对存储在各个存储区域中的多个文件块进行实时组装,以得到所述待传输文件。
通过接收方设备接收发送方设备发送的通过对待传输文件进行分块得到的多个文件块,并利用每个文件块的唯一标识和与该唯一标识对应的接收方设备的存储区域地址,将每个文件块分配至接收方设备对应的存储区域,并对存储在各个存储区域中的多个文件块进行实时组装,以得到待传输文件。由此,可以实现待传输文件从发送方设备到接收方设备的同步过程。并且,由于待传输文件被分为多个文件块进行传输,所以避免了文件较大而出现传输错误的问题,实现了文件的稳定同步传输,提高了传输成功率。
根据本发明一种实施方式,在该系统中:
所述发送方设备30还用于发送所述多个文件块各自的校验信息;
所述接收方设备32还用于接收所述多个文件块各自的校验信息;
所述接收方设备32还用于将所接收的所述多个文件块各自的校验信息分别与存储区域中对应的文件块所携带的校验信息进行比较;
所述接收方设备32还用于在比较结果为匹配的情况下发送表示文件块传输正确的响应;
所述接收方设备32还用于在比较结果为不匹配的情况下发送表示文件块传输错误的响应。
由此,接收方设备32可以通过校验信息对所接收的文件块的正确与否加以判断,并根据判断结果发送响应至发送方设备30,从而发送方设备30就可以获知所发送的文件块是否为正确的文件块。
此外,在发送的响应为表示文件块错误的响应的情况下,发送方设备30可以向接收方设备32重新发送正确的文件块以替换错误的文件块,以确保文件同步的正确性。
在本发明中,发送方设备30和接收方设备32可以均为客户端或服务器,也可以一者为客户端,而另一者为服务器。具体情况本领域技术人员可以根据实际情况进行设定,本发明不对此进行限定。
根据本发明一种实施方式,所发送的内容以及接收的内容可以被加密。
通过对所发送的内容以及接收的内容进行加密,可以确保同步传输过程中文件传输的安全性。
以上结合附图详细描述了本发明的优选实施方式,但是,本发明并不限于上述实施方式中的具体细节,在本发明的技术构思范围内,可以对本发明的技术方案进行多种简单变型,这些简单变型均属于本发明的保护范围。
另外需要说明的是,在上述具体实施方式中所描述的各个具体技术特征,在不矛盾的情况下,可以通过任何合适的方式进行组合。为了避免不必要的重复,本发明对各种可能的组合方式不再另行说明。
此外,本发明的各种不同的实施方式之间也可以进行任意组合,只要其
不违背本发明的思想,其同样应当视为本发明所公开的内容。
Claims (10)
- 一种用于文件同步的方法,其中,所述方法包括:接收来自发送方设备的文件同步请求;基于所述请求发送响应消息至所述发送方设备,所述响应消息包括接收方设备的多个存储区域地址;接收所述发送方设备基于所述响应消息发送的多个文件块,所述多个文件块通过对待传输文件进行分块得到,并且所述多个文件块中的每个文件块包括唯一标识和与所述唯一标识对应的接收方设备的存储区域地址;以及根据所述每个文件块的唯一标识和与所述唯一标识对应的接收方设备的存储区域地址将所述每个文件块分配至对应的存储区域,并对存储在各个存储区域中的所述多个文件块进行实时组装,以得到所述待传输文件。
- 根据权利要求1所述的方法,其中,所述方法还包括:接收来自所述发送方设备的所述多个文件块各自的校验信息;将所接收的所述多个文件块各自的校验信息分别与存储区域中对应的文件块所携带的校验信息进行比较;在比较结果为匹配的情况下发送表示文件块传输正确的响应;在比较结果为不匹配的情况下发送表示文件块传输错误的响应。
- 根据权利要求1或2所述的方法,其中,通过并行方式接收所述多个文件块。
- 根据权利要求1-3中任一项所述的方法,其中,所发送的内容以及接收的内容被加密。
- 一种用于文件同步的接收方设备,其中,所述接收方设备包括:用于接收来自发送方设备的文件同步请求的装置;用于基于所述请求发送响应消息至所述发送方设备的装置,所述响应消息包括接收方设备的多个存储区域地址;用于接收所述发送方设备基于所述响应消息发送的多个文件块的装置,所述多个文件块通过对待传输文件进行分块得到,并且所述多个文件块中的每个文件块包括唯一标识和与所述唯一标识对应的接收方设备的存储区域地址;以及用于根据所述每个文件块的唯一标识和与所述唯一标识对应的接收方设备的存储区域地址将所述每个文件块分配至对应的存储区域,并对存储在各个存储区域中的所述多个文件块进行实时组装,以得到所述待传输文件的装置。
- 根据权利要求5所述的接收方设备,其中,所述接收方设备还包括:用于接收来自所述发送方设备的所述多个文件块各自的校验信息的装置;用于将所接收的所述多个文件块各自的校验信息分别与存储区域中对应的文件块所携带的校验信息进行比较的装置;用于在比较结果为匹配的情况下发送表示文件块传输正确的响应的装置;用于在比较结果为不匹配的情况下发送表示文件块传输错误的响应的装置。
- 根据权利要求5或6所述的接收方设备,其中,所发送的内容以及接收的内容被加密。
- 一种用于文件同步的系统,所述系统包括发送方设备和接收方设备,其中,所述发送方设备用于发送文件同步请求;所述接收方设备用于接收所述文件同步请求;所述接收方设备还用于基于所述请求发送响应消息,所述响应消息包括接收方设备的多个存储区域地址;所述发送方设备还用于基于所述响应消息发送多个文件块,所述多个文件块通过对待传输文件进行分块得到,并且所述多个文件块中的每个文件块包括唯一标识和与所述唯一标识对应的接收方设备的存储区域地址;所述接收方设备还用于接收所述多个文件块;以及所述接收方设备还用于根据所述每个文件块的唯一标识和与所述唯一标识对应的接收方设备的存储区域地址将所述每个文件块分配至对应的存储区域,并对存储在各个存储区域中的所述多个文件块进行实时组装,以得到所述待传输文件。
- 根据权利要求8所述的系统,其中,所述发送方设备还用于发送所述多个文件块各自的校验信息;所述接收方设备还用于接收所述多个文件块各自的校验信息;所述接收方设备还用于将所接收的所述多个文件块各自的校验信息分别与存储区域中对应的文件块所携带的校验信息进行比较;所述接收方设备还用于在比较结果为匹配的情况下发送表示文件块传输正确的响应;所述接收方设备还用于在比较结果为不匹配的情况下发送表示文件块传输错误的响应。
- 根据权利要求8或9所述的系统,其中,所发送的内容以及接收的 内容被加密。
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US15/242,196 US20170169239A1 (en) | 2015-12-14 | 2016-08-19 | Method for file synchronization, the receiver equipment and systems |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510925149.5A CN105915574A (zh) | 2015-12-14 | 2015-12-14 | 用于文件同步的方法、接收方设备及系统 |
| CN201510925149.5 | 2015-12-14 |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US15/242,196 Continuation US20170169239A1 (en) | 2015-12-14 | 2016-08-19 | Method for file synchronization, the receiver equipment and systems |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2017101426A1 true WO2017101426A1 (zh) | 2017-06-22 |
Family
ID=56744250
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2016/089557 Ceased WO2017101426A1 (zh) | 2015-12-14 | 2016-07-10 | 用于文件同步的方法、接收方设备及系统 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN105915574A (zh) |
| WO (1) | WO2017101426A1 (zh) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114039967A (zh) * | 2021-10-29 | 2022-02-11 | 广州中爆数字信息科技股份有限公司 | 一种文件传输方法、装置、设备及存储介质 |
Families Citing this family (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107977581A (zh) * | 2017-11-06 | 2018-05-01 | 北京明华联盟科技有限公司 | 数据处理方法、装置及计算机可读存储介质 |
| CN109672718A (zh) * | 2018-09-26 | 2019-04-23 | 深圳平安财富宝投资咨询有限公司 | 系统间的文件传递方法、服务器、存储介质及装置 |
| CN109561145B (zh) * | 2018-11-27 | 2022-04-05 | 泰康保险集团股份有限公司 | 文件处理方法、装置、电子设备及存储介质 |
| CN114880299A (zh) * | 2021-02-05 | 2022-08-09 | 北京字跳网络技术有限公司 | 多媒体草稿文件同步方法、装置、设备和介质 |
| CN116527691B (zh) * | 2023-06-27 | 2023-11-03 | 天津中远海运散运数字科技有限公司 | 一种船岸数据的同步方法、装置、设备和介质 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20080294646A1 (en) * | 2007-05-24 | 2008-11-27 | Via Technologies, Inc. | Data distributing and accessing method and system |
| CN101504670A (zh) * | 2009-03-04 | 2009-08-12 | 成都市华为赛门铁克科技有限公司 | 数据操作方法、系统、客户端和数据服务器 |
| CN101729593A (zh) * | 2008-11-03 | 2010-06-09 | 北大方正集团有限公司 | 一种上传和接收文件的方法、系统及装置 |
| CN104967663A (zh) * | 2015-05-12 | 2015-10-07 | 无锡天脉聚源传媒科技有限公司 | 一种文件传输方法及系统、文件发送装置与文件接收装置 |
| CN105007322A (zh) * | 2015-07-21 | 2015-10-28 | 陈丹 | 一种文件传输方法及系统 |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101710901B (zh) * | 2009-10-22 | 2012-12-05 | 乐视网信息技术(北京)股份有限公司 | 一种具有p2p功能的分布式存储系统和方法 |
| CN103065096B (zh) * | 2012-12-18 | 2016-06-08 | 华为技术有限公司 | 一种数据保护方法、装置及系统 |
-
2015
- 2015-12-14 CN CN201510925149.5A patent/CN105915574A/zh active Pending
-
2016
- 2016-07-10 WO PCT/CN2016/089557 patent/WO2017101426A1/zh not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20080294646A1 (en) * | 2007-05-24 | 2008-11-27 | Via Technologies, Inc. | Data distributing and accessing method and system |
| CN101729593A (zh) * | 2008-11-03 | 2010-06-09 | 北大方正集团有限公司 | 一种上传和接收文件的方法、系统及装置 |
| CN101504670A (zh) * | 2009-03-04 | 2009-08-12 | 成都市华为赛门铁克科技有限公司 | 数据操作方法、系统、客户端和数据服务器 |
| CN104967663A (zh) * | 2015-05-12 | 2015-10-07 | 无锡天脉聚源传媒科技有限公司 | 一种文件传输方法及系统、文件发送装置与文件接收装置 |
| CN105007322A (zh) * | 2015-07-21 | 2015-10-28 | 陈丹 | 一种文件传输方法及系统 |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114039967A (zh) * | 2021-10-29 | 2022-02-11 | 广州中爆数字信息科技股份有限公司 | 一种文件传输方法、装置、设备及存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN105915574A (zh) | 2016-08-31 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11330008B2 (en) | Network addresses with encoded DNS-level information | |
| WO2017101426A1 (zh) | 用于文件同步的方法、接收方设备及系统 | |
| US10616243B2 (en) | Route updating method, communication system, and relevant devices | |
| WO2019040963A1 (en) | METHOD FOR PROTECTING TERMINAL IDENTITY IN A COMMUNICATION SYSTEM | |
| US20170264590A1 (en) | Preventing dns cache poisoning | |
| JP2018528679A (ja) | 負荷平衡システムにおいて接続を確立するデバイス及び方法 | |
| US20190166042A1 (en) | Method for data transmitting, centralized controller, forwarding plane device and communication apparatus | |
| US10911581B2 (en) | Packet parsing method and device | |
| US9332053B2 (en) | Methods, systems, and computer readable media for load balancing stream control transmission protocol (SCTP) messages | |
| CN105827605A (zh) | 文件分享方法和文件分享系统 | |
| WO2022267977A1 (zh) | 信息处理方法、中间解析器、网络设备及存储介质 | |
| CN104038490B (zh) | 一种通信安全校验方法及其装置 | |
| CN108933804A (zh) | 一种对等网络构建方法和装置 | |
| CN110463146A (zh) | 用于发射信号的发送器和用于接收信号的接收器 | |
| CN101471878A (zh) | 对等会话起始协议网络的安全路由方法、网络系统及设备 | |
| CN114142995A (zh) | 面向区块链中继通信网络的密钥安全分发方法及装置 | |
| CN110213230B (zh) | 一种用于分布式通信的网络安全验证方法及装置 | |
| CN104981791A (zh) | 移动发送方控制的数据访问和数据删除方法和系统 | |
| US10530765B2 (en) | Securing connections to unsecure internet resources | |
| CN107819888A (zh) | 一种分配中继地址的方法、装置以及网元 | |
| CN109327475B (zh) | 一种多层身份认证方法、装置、设备及存储介质 | |
| US20060095765A1 (en) | On-machine communication verification | |
| US10841283B2 (en) | Smart sender anonymization in identity enabled networks | |
| CN114143038A (zh) | 面向区块链中继通信网络的密钥安全分发方法及装置 | |
| CN115134765A (zh) | 消息处理方法、消息处理装置、分发控制装置及存储介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 16874487 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 16874487 Country of ref document: EP Kind code of ref document: A1 |