[go: up one dir, main page]

CN108228733A - A kind of file syn chronizing system and method - Google Patents

A kind of file syn chronizing system and method Download PDF

Info

Publication number
CN108228733A
CN108228733A CN201711318173.8A CN201711318173A CN108228733A CN 108228733 A CN108228733 A CN 108228733A CN 201711318173 A CN201711318173 A CN 201711318173A CN 108228733 A CN108228733 A CN 108228733A
Authority
CN
China
Prior art keywords
file
service platform
change information
message service
cloud
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.)
Pending
Application number
CN201711318173.8A
Other languages
Chinese (zh)
Inventor
李朝铭
刘瑞功
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Software Co Ltd
Original Assignee
Inspur Software 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 Inspur Software Co Ltd filed Critical Inspur Software Co Ltd
Priority to CN201711318173.8A priority Critical patent/CN108228733A/en
Publication of CN108228733A publication Critical patent/CN108228733A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/122File system administration, e.g. details of archiving or snapshots using management policies
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/178Techniques for file synchronisation in file systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明提供了一种文件同步系统及方法,该系统可包括:文件同步检测模块、第一云消息服务平台、第二云消息服务平台以及文件接收更新模块,其中,文件同步检测模块和第一云消息服务平台部署在第一系统端;文件接收更新模块和第二云消息服务平台部署在第二系统端;文件同步检测模块,用于检测第一系统端中的各个文件,并确定本次检测到的各个文件与上一次检测到的各个文件是否有变化,如果有,则将变化信息存储至第一云消息服务平台;第一云消息服务平台,用于将变化信息发送给第二云消息服务平台;文件接收更新模块,用于从第二云消息服务平台获取变化信息,并根据变化信息对第二系统端中的文件进行同步更新。本方案能够自动实现文件的同步。

The present invention provides a file synchronization system and method. The system may include: a file synchronization detection module, a first cloud message service platform, a second cloud message service platform, and a file receiving and updating module, wherein the file synchronization detection module and the first The cloud message service platform is deployed on the first system side; the file receiving and updating module and the second cloud message service platform are deployed on the second system side; the file synchronization detection module is used to detect each file in the first system side and determine the Whether each file detected has changed with each file detected last time, if so, store the change information to the first cloud message service platform; the first cloud message service platform is used to send the change information to the second cloud The message service platform; the file receiving and updating module, used to obtain change information from the second cloud message service platform, and update the files in the second system end synchronously according to the change information. This program can automatically realize the synchronization of files.

Description

一种文件同步系统及方法A file synchronization system and method

技术领域technical field

本发明涉及计算机技术领域,特别涉及一种文件同步系统及方法。The invention relates to the field of computer technology, in particular to a file synchronization system and method.

背景技术Background technique

在部分场景下,两个系统之间经常需要同步文件,也即,当一个系统中的文件发生变化时,另一个系统中的文件也需要发生同样的变化。目前,主要是通过人工参与的方式来实现两个系统间的文件同步,如通过人工拷贝等方式。但是,若需要进行文件同步的系统较多,或者是同步文件的次数较多,那么人工参与实现文件同步的方式将会耗费大量时间。因此,如何能够自动实现文件的同步则至关重要。In some scenarios, files often need to be synchronized between the two systems, that is, when a file in one system changes, the file in the other system also needs to undergo the same change. At present, file synchronization between the two systems is mainly realized through manual participation, such as manual copying. However, if there are many systems that need to synchronize files, or if the number of times to synchronize files is large, then the method of manually participating in file synchronization will consume a lot of time. Therefore, how to automatically realize the synchronization of files is very important.

发明内容Contents of the invention

本发明实施例提供了一种文件同步系统及方法,能够自动实现文件的同步。The embodiment of the present invention provides a file synchronization system and method, which can automatically realize file synchronization.

第一方面,本发明实施例提供了一种文件同步系统,包括:In a first aspect, an embodiment of the present invention provides a file synchronization system, including:

文件同步检测模块、第一云消息服务平台、第二云消息服务平台以及文件接收更新模块,其中,The file synchronization detection module, the first cloud message service platform, the second cloud message service platform and the file receiving and updating module, wherein,

所述文件同步检测模块和所述第一云消息服务平台部署在第一系统端;The file synchronization detection module and the first cloud message service platform are deployed on the first system side;

所述文件接收更新模块和所述第二云消息服务平台部署在第二系统端;The file receiving and updating module and the second cloud message service platform are deployed on the second system side;

所述文件同步检测模块,用于检测所述第一系统端中的各个文件,并确定本次检测到的各个文件与上一次检测到的各个文件是否有变化,如果有,则将变化信息存储至所述第一云消息服务平台;The file synchronization detection module is used to detect each file in the first system end, and determine whether each file detected this time has changed from each file detected last time, and if so, store the change information to the first cloud message service platform;

所述第一云消息服务平台,用于将所述变化信息发送给所述第二云消息服务平台;The first cloud message service platform is configured to send the change information to the second cloud message service platform;

所述文件接收更新模块,用于从所述第二云消息服务平台获取所述变化信息,并根据所述变化信息对所述第二系统端中的文件进行同步更新。The file receiving and updating module is configured to obtain the change information from the second cloud message service platform, and synchronously update the files in the second system terminal according to the change information.

优选地,Preferably,

所述第一云消息服务平台,包括:第一消息队列和消息发送节点;The first cloud message service platform includes: a first message queue and a message sending node;

所述第二云消息服务平台,包括:第二消息队列和消息接收节点;The second cloud message service platform includes: a second message queue and a message receiving node;

所述文件同步检测模块,用于将所述变化信息存储至所述第一消息队列中;The file synchronization detection module is configured to store the change information in the first message queue;

所述消息发送节点,用于从所述第一消息队列中获取所述变化信息,并将所述变化信息发送至所述消息接收节点;The message sending node is configured to acquire the change information from the first message queue, and send the change information to the message receiving node;

所述消息接收节点,用于将接收到的所述变化信息存储至所述第二消息队列中;The message receiving node is configured to store the received change information in the second message queue;

所述文件接收更新模块,用于从所述第二消息队列中获取所述变化信息。The file receiving and updating module is configured to obtain the change information from the second message queue.

优选地,Preferably,

当有文件被删除时,所述变化信息,包括:被删除文件的全路径和删除标识;When a file is deleted, the change information includes: the full path of the deleted file and the deletion identifier;

优选地,Preferably,

当有文件被修改时,所述变化信息,包括:被修改文件的全路径、修改标识和被修改文件的内容;When a file is modified, the change information includes: the full path of the modified file, the modification identifier and the content of the modified file;

优选地,Preferably,

当有新增的文件时,所述变化信息,包括:新增文件的全路径、新增标识和新增文件的内容。When there is a new file, the change information includes: the full path of the new file, the new logo and the content of the new file.

第二方面,本发明实施例提供了一种文件同步方法,包括:In a second aspect, the embodiment of the present invention provides a file synchronization method, including:

文件同步检测模块检测第一系统端中的各个文件,并确定本次检测到的各个文件与上一次检测到的各个文件是否有变化;The file synchronization detection module detects each file in the first system end, and determines whether each file detected this time has changed with each file detected last time;

所述文件同步检测模块当确定有变化时,将变化信息存储至第一云消息服务平台,其中,所述文件同步检测模块和所述第一云消息服务平台均部署在所述第一系统端;When the file synchronization detection module determines that there is a change, the change information is stored in the first cloud message service platform, wherein the file synchronization detection module and the first cloud message service platform are both deployed on the first system end ;

所述第一云消息服务平台将所述变化信息发送给第二云消息服务平台;The first cloud message service platform sends the change information to the second cloud message service platform;

文件接收更新模块从所述第二云消息服务平台获取所述变化信息,并根据所述变化信息对第二系统端中的文件进行同步更新,其中,所述文件接收更新模块和所述第二云消息服务平台部署在所述第二系统端。The file receiving and updating module acquires the change information from the second cloud message service platform, and synchronously updates the files in the second system end according to the changing information, wherein the file receiving and updating module and the second The cloud message service platform is deployed on the second system side.

优选地,Preferably,

所述文件同步检测模块当确定有变化时,将变化信息存储至第一云消息服务平台,包括:When the file synchronization detection module determines that there is a change, the change information is stored to the first cloud message service platform, including:

所述文件同步检测模块将所述变化信息存储至所述第一云消息服务平台中的第一消息队列中;The file synchronization detection module stores the change information in the first message queue in the first cloud message service platform;

所述第一云消息服务平台将所述变化信息发送给第二云消息服务平台,包括:The first cloud message service platform sends the change information to the second cloud message service platform, including:

所述第一云消息服务平台中的消息发送节点从所述第一消息队列中获取所述变化信息,并将所述变化信息发送至所述第二云消息服务平台中的消息接收节点;The message sending node in the first cloud message service platform obtains the change information from the first message queue, and sends the change information to the message receiving node in the second cloud message service platform;

所述消息接收节点将接收到的所述变化信息存储至所述第二云消息服务平台中的第二消息队列中;The message receiving node stores the received change information in a second message queue in the second cloud message service platform;

所述文件接收更新模块从所述第二云消息服务平台获取所述变化信息,包括:The file receiving and updating module obtains the change information from the second cloud message service platform, including:

所述文件接收更新模块从所述第二消息队列中获取所述变化信息。The file receiving and updating module obtains the change information from the second message queue.

优选地,Preferably,

当有文件被删除时,所述变化信息,包括:被删除文件的全路径和删除标识;When a file is deleted, the change information includes: the full path of the deleted file and the deletion identifier;

优选地,Preferably,

当有文件被修改时,所述变化信息,包括:被修改文件的全路径、修改标识和被修改文件的内容;When a file is modified, the change information includes: the full path of the modified file, the modification identifier and the content of the modified file;

优选地,Preferably,

当有新增的文件时,所述变化信息,包括:新增文件的全路径、新增标识和新增文件的内容。When there is a new file, the change information includes: the full path of the new file, the new logo and the content of the new file.

第三方面,本发明实施例提供了一种计算机可读介质,包括计算机执行指令,当存储控制器的处理器执行所述计算机执行指令时,所述存储控制器执行上述任一实施例所述的文件同步方法。In a third aspect, an embodiment of the present invention provides a computer-readable medium, including computer-executable instructions. When a processor of a storage controller executes the computer-executable instructions, the storage controller executes any of the above-mentioned embodiments. file synchronization method.

第四方面,本发明实施例提供了存储控制器,包括:处理器、存储器和总线;In a fourth aspect, an embodiment of the present invention provides a storage controller, including: a processor, a memory, and a bus;

所述存储器用于存储计算机执行指令,所述处理器与所述存储器通过所述总线连接,当所述存储控制器运行时,所述处理器执行所述存储器存储的所述计算机执行指令,以使所述存储控制器执行上述任一实施例所述的文件同步。The memory is used to store computer-executable instructions, the processor is connected to the memory through the bus, and when the memory controller is running, the processor executes the computer-executable instructions stored in the memory to The storage controller is made to execute the file synchronization described in any one of the above embodiments.

本发明实施例提供了一种文件同步系统及方法,该系统包括:部署在第一系统端的文件同步检测模块以及第一云消息服务平台,以及部署在第二系统端的文件接收更新模块以及第二云消息服务平台,其中,文件同步检测模块能够自动检测所在的第一系统端中的文件是否有变化,如果是,那么则会将相应的变化信息自动存储至第一云消息服务平台,然后第一云消息服务平台将会自动将变化信息发送给第二系统端中部署的第二云消息服务平台,之后文件接收更新模块则将会从第二云消息服务平台中获取到变化信息,并根据变化信息对所在的第二系统端中的文件进行同步更新。整个过程无需人工参与,通过部署的模块和平台自动完成。因此,本方案能够自动实现文件同步。The embodiment of the present invention provides a file synchronization system and method, the system includes: a file synchronization detection module deployed on the first system side and a first cloud message service platform, and a file receiving and updating module deployed on the second system side and the second The cloud message service platform, wherein the file synchronization detection module can automatically detect whether the files in the first system end where it is located have changed, and if so, the corresponding change information will be automatically stored in the first cloud message service platform, and then the The first cloud message service platform will automatically send the change information to the second cloud message service platform deployed in the second system, and then the file receiving and updating module will obtain the change information from the second cloud message service platform, and according to The change information is updated synchronously to the files in the second system. The whole process does not require manual participation, and is automatically completed through deployed modules and platforms. Therefore, this solution can automatically realize file synchronization.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are For some embodiments of the present invention, those skilled in the art can also obtain other drawings based on these drawings without creative work.

图1是本发明一个实施例提供的一种文件同步系统的结构示意图;Fig. 1 is a schematic structural diagram of a file synchronization system provided by an embodiment of the present invention;

图2是本发明另一个实施例提供的一种文件同步系统的结构示意图;FIG. 2 is a schematic structural diagram of a file synchronization system provided by another embodiment of the present invention;

图3是本发明一个实施例提供的一种文件同步方法的流程图。Fig. 3 is a flowchart of a file synchronization method provided by an embodiment of the present invention.

具体实施方式Detailed ways

为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例,基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work belong to the protection of the present invention. scope.

如图1所示,本发明实施例提供了一种文件同步系统,该系统可以包括:文件同步检测模块101、第一云消息服务平台102、第二云消息服务平台103以及文件接收更新模块104,其中,As shown in Figure 1, the embodiment of the present invention provides a kind of file synchronous system, and this system can comprise: file synchronous detection module 101, the first cloud message service platform 102, the second cloud message service platform 103 and file receiving and updating module 104 ,in,

所述文件同步检测模块101和所述第一云消息服务平台102部署在第一系统端;The file synchronization detection module 101 and the first cloud message service platform 102 are deployed on the first system side;

所述文件接收更新模块104和所述第二云消息服务平台103部署在第二系统端;The file receiving and updating module 104 and the second cloud message service platform 103 are deployed on the second system side;

所述文件同步检测模块104,用于检测所述第一系统端中的各个文件,并确定本次检测到的各个文件与上一次检测到的各个文件是否有变化,如果有,则将变化信息存储至所述第一云消息服务平台102;The file synchronization detection module 104 is used to detect each file in the first system end, and determine whether each file detected this time has changed from each file detected last time, and if so, change information Stored in the first cloud message service platform 102;

所述第一云消息服务平台102,用于将所述变化信息发送给所述第二云消息服务平台103;The first cloud message service platform 102 is configured to send the change information to the second cloud message service platform 103;

所述文件接收更新模块104,用于从所述第二云消息服务平台103获取所述变化信息,并根据所述变化信息对所述第二系统端中的文件进行同步更新。The file receiving and updating module 104 is configured to obtain the change information from the second cloud message service platform 103, and update the files in the second system end synchronously according to the change information.

本发明实施例提供了一种文件同步系统,该系统包括:部署在第一系统端的文件同步检测模块以及第一云消息服务平台,以及部署在第二系统端的文件接收更新模块以及第二云消息服务平台,其中,文件同步检测模块能够自动检测所在的第一系统端中的文件是否有变化,如果是,那么则会将相应的变化信息自动存储至第一云消息服务平台,然后第一云消息服务平台将会自动将变化信息发送给第二系统端中部署的第二云消息服务平台,之后文件接收更新模块则将会从第二云消息服务平台中获取到变化信息,并根据变化信息对所在的第二系统端中的文件进行同步更新。整个过程无需人工参与,通过部署的模块和平台自动完成。因此,本方案能够自动实现文件同步。An embodiment of the present invention provides a file synchronization system, which includes: a file synchronization detection module deployed on the first system side and a first cloud message service platform, and a file receiving and updating module deployed on the second system side and a second cloud message service platform The service platform, wherein the file synchronization detection module can automatically detect whether the files in the first system end where it is located have changed, and if so, the corresponding change information will be automatically stored in the first cloud message service platform, and then the first cloud The message service platform will automatically send the change information to the second cloud message service platform deployed in the second system, and then the file receiving and updating module will obtain the change information from the second cloud message service platform, and based on the change information Synchronously update the files in the second system where it is located. The whole process does not require manual participation, and is automatically completed through deployed modules and platforms. Therefore, this solution can automatically realize file synchronization.

在本发明实施例中,不仅可以同步小文件,也可以同步大文件和大于4GB的超大文件。In the embodiment of the present invention, not only small files can be synchronized, but also large files and very large files larger than 4GB can be synchronized.

本发明实施例中,第一云消息服务平台和第二云消息服务平台可以均采用CMSP。In the embodiment of the present invention, both the first cloud message service platform and the second cloud message service platform may use CMSP.

在本发明一个实施例中,如图2所示,所述第一云消息服务平台102,包括:第一消息队列1021和消息发送节点1022;In one embodiment of the present invention, as shown in FIG. 2, the first cloud message service platform 102 includes: a first message queue 1021 and a message sending node 1022;

所述第二云消息服务平台103,包括:第二消息队列1031和消息接收节点1032;The second cloud message service platform 103 includes: a second message queue 1031 and a message receiving node 1032;

所述文件同步检测模块104,用于将所述变化信息存储至所述第一消息队列1021中;The file synchronization detection module 104 is configured to store the change information in the first message queue 1021;

所述消息发送节点1022,用于从所述第一消息队列1021中获取所述变化信息,并将所述变化信息发送至所述消息接收节点1032;The message sending node 1022 is configured to acquire the change information from the first message queue 1021, and send the change information to the message receiving node 1032;

所述消息接收节点1032,用于将接收到的所述变化信息存储至所述第二消息队列中1031;The message receiving node 1032 is configured to store the received change information in the second message queue 1031;

所述文件接收更新模块104,用于从所述第二消息队列1031中获取所述变化信息。The file receiving and updating module 104 is configured to obtain the change information from the second message queue 1031 .

通过在第一系统端部署第一云消息服务平台,以及在第二系统端部署第二云消息服务平台,其中,第一云消息服务平台包括第一消息队列和消息发送节点,第二云消息服务平台包括第二消息队列和消息接收节点,从而使得变化信息能够实时的被消息发送节点发送至消息接收节点,从而能够文件同步的实时性以及可靠性。By deploying the first cloud message service platform on the first system side and deploying the second cloud message service platform on the second system side, wherein the first cloud message service platform includes a first message queue and a message sending node, the second cloud message The service platform includes a second message queue and a message receiving node, so that the change information can be sent to the message receiving node by the message sending node in real time, thereby ensuring real-time and reliability of file synchronization.

在本发明一个实施例中,当有文件被删除时,所述变化信息,包括:被删除文件的全路径和删除标识。In an embodiment of the present invention, when a file is deleted, the change information includes: the full path of the deleted file and the deletion identifier.

在本发明实施例中,以第一系统端为A,第二系统端为B为例,假设系统A中的某文件被删除,那么当系统B中的文件接收更新模块获取到变化信息后,可通过预设的A系统中目录和B系统中目录的映射关系,以及根据获取到的被删除文件的全路径,从而能够找到所在的B系统中相应的目录,从而接下来可将相应的目录中的相应文件进行删除,以此实现系统A与所在的系统B中的文件同步。In the embodiment of the present invention, taking the first system end as A and the second system end as B as an example, assuming that a certain file in system A is deleted, then when the file receiving and updating module in system B obtains the change information, Through the preset mapping relationship between the directory in system A and the directory in system B, and according to the obtained full path of the deleted file, you can find the corresponding directory in system B, and then you can save the corresponding directory Delete the corresponding files in the system, so as to realize the synchronization of the files in the system A and the system B where it is located.

在本发明一个实施例中,当有文件被修改时,所述变化信息,包括:被修改文件的全路径、修改标识和被修改文件的内容。In an embodiment of the present invention, when a file is modified, the change information includes: the full path of the modified file, the modification identifier, and the content of the modified file.

针对被修改文件的同步与被删除文件的同步过程大致类似,但变化信息中却多包括了一个被修改文件的内容,这样,能够使得文件接收更新模块根据该内容对所在系统端中相应目录下的相应文件进行同样的修改,以实现两个系统间的文件同步。The synchronization process for the modified file is roughly similar to the synchronization process for the deleted file, but the change information includes one more content of the modified file, so that the file receiving and updating module can update the file in the corresponding directory of the system according to the content. Make the same modification to the corresponding files of the system to achieve file synchronization between the two systems.

在本发明一个实施例中,当有新增的文件时,所述变化信息,包括:新增文件的全路径、新增标识和新增文件的内容。In an embodiment of the present invention, when there is a new file, the change information includes: the full path of the new file, the new logo and the content of the new file.

针对新增的文件的同步与被修改文件的同步过程类似,此处不再过多赘述。The synchronization process for newly added files is similar to the synchronization process for modified files, and will not be repeated here.

本发明实施例提供了一种文件同步方法,如图3所示,该方法可以包括如下步骤:The embodiment of the present invention provides a file synchronization method, as shown in Figure 3, the method may include the following steps:

步骤301:文件同步检测模块检测第一系统端中的各个文件,并确定本次检测到的各个文件与上一次检测到的各个文件是否有变化。Step 301: The file synchronization detection module detects each file in the first system end, and determines whether each file detected this time has changed from each file detected last time.

步骤302:所述文件同步检测模块当确定有变化时,将变化信息存储至第一云消息服务平台,其中,所述文件同步检测模块和所述第一云消息服务平台均部署在所述第一系统端。Step 302: When the file synchronization detection module determines that there is a change, it stores the change information on the first cloud message service platform, wherein both the file synchronization detection module and the first cloud message service platform are deployed on the first cloud message service platform. One system side.

步骤303:所述第一云消息服务平台将所述变化信息发送给第二云消息服务平台。Step 303: The first cloud message service platform sends the change information to the second cloud message service platform.

步骤304:文件接收更新模块从所述第二云消息服务平台获取所述变化信息,并根据所述变化信息对第二系统端中的文件进行同步更新,其中,所述文件接收更新模块和所述第二云消息服务平台部署在所述第二系统端。Step 304: The file receiving and updating module acquires the change information from the second cloud message service platform, and synchronously updates the files in the second system end according to the changing information, wherein the file receiving and updating module and the The second cloud message service platform is deployed on the second system side.

在本发明一个实施例中,所述步骤302的具体实施方式,可包括:所述文件同步检测模块将所述变化信息存储至所述第一云消息服务平台中的第一消息队列中;所述步骤303的具体实施方式,可包括:所述第一云消息服务平台中的消息发送节点从所述第一消息队列中获取所述变化信息,并将所述变化信息发送至所述第二云消息服务平台中的消息接收节点;所述消息接收节点将接收到的所述变化信息存储至所述第二云消息服务平台中的第二消息队列中;所述步骤304的具体实施方式,可包括:所述文件接收更新模块从所述第二消息队列中获取所述变化信息。In an embodiment of the present invention, the specific implementation of step 302 may include: the file synchronization detection module stores the change information in the first message queue in the first cloud message service platform; The specific implementation of step 303 may include: the message sending node in the first cloud message service platform obtains the change information from the first message queue, and sends the change information to the second The message receiving node in the cloud message service platform; the message receiving node stores the received change information in the second message queue in the second cloud message service platform; the specific implementation manner of the step 304, The method may include: the file receiving and updating module acquires the change information from the second message queue.

在本发明一个实施例中,当有文件被删除时,所述变化信息,包括:被删除文件的全路径和删除标识。In an embodiment of the present invention, when a file is deleted, the change information includes: the full path of the deleted file and the deletion identifier.

在本发明一个实施例中,当有文件被修改时,所述变化信息,包括:被修改文件的全路径、修改标识和被修改文件的内容。In an embodiment of the present invention, when a file is modified, the change information includes: the full path of the modified file, the modification identifier, and the content of the modified file.

在本发明一个实施例中,当有新增的文件时,所述变化信息,包括:新增文件的全路径、新增标识和新增文件的内容。In an embodiment of the present invention, when there is a new file, the change information includes: the full path of the new file, the new logo and the content of the new file.

上述装置内的各单元之间的信息交互、执行过程等内容,由于与本发明方法实施例基于同一构思,具体内容可参见本发明方法实施例中的叙述,此处不再赘述。The information exchange and execution process among the units in the above-mentioned device are based on the same concept as the method embodiment of the present invention, and the specific content can refer to the description in the method embodiment of the present invention, and will not be repeated here.

本发明实施例提供了一种计算机可读介质,包括计算机执行指令,当存储控制器的处理器执行所述计算机执行指令时,所述存储控制器执行上述任一实施例所述的文件同步方法。An embodiment of the present invention provides a computer-readable medium, including computer-executable instructions. When the processor of the storage controller executes the computer-executable instructions, the storage controller executes the file synchronization method described in any of the above-mentioned embodiments. .

本发明实施例提供了存储控制器,包括:处理器、存储器和总线;An embodiment of the present invention provides a storage controller, including: a processor, a memory, and a bus;

所述存储器用于存储计算机执行指令,所述处理器与所述存储器通过所述总线连接,当所述存储控制器运行时,所述处理器执行所述存储器存储的所述计算机执行指令,以使所述存储控制器执行上述任一实施例所述的文件同步。The memory is used to store computer-executable instructions, the processor is connected to the memory through the bus, and when the memory controller is running, the processor executes the computer-executable instructions stored in the memory to The storage controller is made to execute the file synchronization described in any one of the above embodiments.

综上,本发明各个实施例至少具有如下有益效果:To sum up, each embodiment of the present invention has at least the following beneficial effects:

1、在本发明实施例中,该系统包括:部署在第一系统端的文件同步检测模块以及第一云消息服务平台,以及部署在第二系统端的文件接收更新模块以及第二云消息服务平台,其中,文件同步检测模块能够自动检测所在的第一系统端中的文件是否有变化,如果是,那么则会将相应的变化信息自动存储至第一云消息服务平台,然后第一云消息服务平台将会自动将变化信息发送给第二系统端中部署的第二云消息服务平台,之后文件接收更新模块则将会从第二云消息服务平台中获取到变化信息,并根据变化信息对所在的第二系统端中的文件进行同步更新。整个过程无需人工参与,通过部署的模块和平台自动完成。因此,本方案能够自动实现文件同步。1. In the embodiment of the present invention, the system includes: a file synchronization detection module deployed on the first system side and a first cloud message service platform, and a file receiving and updating module deployed on the second system side and a second cloud message service platform, Among them, the file synchronization detection module can automatically detect whether the files in the first system end where it is located have changed, and if so, the corresponding change information will be automatically stored in the first cloud message service platform, and then the first cloud message service platform The change information will be automatically sent to the second cloud message service platform deployed in the second system end, and then the file receiving and updating module will obtain the change information from the second cloud message service platform, and update the location based on the change information The files in the second system end are updated synchronously. The whole process does not require manual participation, and is automatically completed through deployed modules and platforms. Therefore, this solution can automatically realize file synchronization.

2、在本发明实施例中,通过在第一系统端部署第一云消息服务平台,以及在第二系统端部署第二云消息服务平台,其中,第一云消息服务平台包括第一消息队列和消息发送节点,第二云消息服务平台包括第二消息队列和消息接收节点,从而使得变化信息能够实时的被消息发送节点发送至消息接收节点,从而能够文件同步的实时性以及可靠性。2. In the embodiment of the present invention, the first cloud message service platform is deployed on the first system side, and the second cloud message service platform is deployed on the second system side, wherein the first cloud message service platform includes a first message queue and the message sending node, the second cloud message service platform includes a second message queue and a message receiving node, so that the change information can be sent to the message receiving node by the message sending node in real time, thereby ensuring real-time and reliability of file synchronization.

需要说明的是,在本文中,诸如第一和第二之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个〃····〃”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同因素。It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is a relationship between these entities or operations. There is no such actual relationship or sequence. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or device. Without further limitations, an element defined by the phrase "comprising a "..." does not exclude the presence of additional same elements in the process, method, article or apparatus comprising said element.

本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储在计算机可读取的存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质中。Those of ordinary skill in the art can understand that all or part of the steps to realize the above method embodiments can be completed by program instructions related hardware, and the aforementioned programs can be stored in a computer-readable storage medium. When the program is executed, the It includes the steps of the above method embodiments; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other various media that can store program codes.

最后需要说明的是:以上所述仅为本发明的较佳实施例,仅用于说明本发明的技术方案,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内所做的任何修改、等同替换、改进等,均包含在本发明的保护范围内。Finally, it should be noted that the above descriptions are only preferred embodiments of the present invention, and are only used to illustrate the technical solution of the present invention, and are not used to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present invention are included in the protection scope of the present invention.

Claims (8)

1.一种文件同步系统,其特征在于,包括:文件同步检测模块、第一云消息服务平台、第二云消息服务平台以及文件接收更新模块,其中,1. A file synchronization system, comprising: a file synchronization detection module, a first cloud message service platform, a second cloud message service platform and a file receiving and updating module, wherein, 所述文件同步检测模块和所述第一云消息服务平台部署在第一系统端;The file synchronization detection module and the first cloud message service platform are deployed on the first system side; 所述文件接收更新模块和所述第二云消息服务平台部署在第二系统端;The file receiving and updating module and the second cloud message service platform are deployed on the second system side; 所述文件同步检测模块,用于检测所述第一系统端中的各个文件,并确定本次检测到的各个文件与上一次检测到的各个文件是否有变化,如果有,则将变化信息存储至所述第一云消息服务平台;The file synchronization detection module is used to detect each file in the first system end, and determine whether each file detected this time has changed from each file detected last time, and if so, store the change information to the first cloud message service platform; 所述第一云消息服务平台,用于将所述变化信息发送给所述第二云消息服务平台;The first cloud message service platform is configured to send the change information to the second cloud message service platform; 所述文件接收更新模块,用于从所述第二云消息服务平台获取所述变化信息,并根据所述变化信息对所述第二系统端中的文件进行同步更新。The file receiving and updating module is configured to obtain the change information from the second cloud message service platform, and synchronously update the files in the second system terminal according to the change information. 2.根据权利要求1所述的系统,其特征在于,2. The system of claim 1, wherein: 所述第一云消息服务平台,包括:第一消息队列和消息发送节点;The first cloud message service platform includes: a first message queue and a message sending node; 所述第二云消息服务平台,包括:第二消息队列和消息接收节点;The second cloud message service platform includes: a second message queue and a message receiving node; 所述文件同步检测模块,用于将所述变化信息存储至所述第一消息队列中;The file synchronization detection module is configured to store the change information in the first message queue; 所述消息发送节点,用于从所述第一消息队列中获取所述变化信息,并将所述变化信息发送至所述消息接收节点;The message sending node is configured to acquire the change information from the first message queue, and send the change information to the message receiving node; 所述消息接收节点,用于将接收到的所述变化信息存储至所述第二消息队列中;The message receiving node is configured to store the received change information in the second message queue; 所述文件接收更新模块,用于从所述第二消息队列中获取所述变化信息。The file receiving and updating module is configured to obtain the change information from the second message queue. 3.根据权利要求1至2任一所述的系统,其特征在于,3. The system according to any one of claims 1 to 2, characterized in that, 当有文件被删除时,所述变化信息,包括:被删除文件的全路径和删除标识;When a file is deleted, the change information includes: the full path of the deleted file and the deletion identifier; 和/或,and / or, 当有文件被修改时,所述变化信息,包括:被修改文件的全路径、修改标识和被修改文件的内容;When a file is modified, the change information includes: the full path of the modified file, the modification identifier and the content of the modified file; 和/或,and / or, 当有新增的文件时,所述变化信息,包括:新增文件的全路径、新增标识和新增文件的内容。When there is a new file, the change information includes: the full path of the new file, the new logo and the content of the new file. 4.一种文件同步方法,其特征在于,包括:4. A file synchronization method, characterized in that, comprising: 文件同步检测模块检测第一系统端中的各个文件,并确定本次检测到的各个文件与上一次检测到的各个文件是否有变化;The file synchronization detection module detects each file in the first system end, and determines whether each file detected this time has changed with each file detected last time; 所述文件同步检测模块当确定有变化时,将变化信息存储至第一云消息服务平台,其中,所述文件同步检测模块和所述第一云消息服务平台均部署在所述第一系统端;When the file synchronization detection module determines that there is a change, the change information is stored in the first cloud message service platform, wherein the file synchronization detection module and the first cloud message service platform are both deployed on the first system end ; 所述第一云消息服务平台将所述变化信息发送给第二云消息服务平台;The first cloud message service platform sends the change information to the second cloud message service platform; 文件接收更新模块从所述第二云消息服务平台获取所述变化信息,并根据所述变化信息对第二系统端中的文件进行同步更新,其中,所述文件接收更新模块和所述第二云消息服务平台部署在所述第二系统端。The file receiving and updating module acquires the change information from the second cloud message service platform, and synchronously updates the files in the second system end according to the changing information, wherein the file receiving and updating module and the second The cloud message service platform is deployed on the second system side. 5.根据权利要求4所述的方法,其特征在于,5. The method of claim 4, wherein, 所述文件同步检测模块当确定有变化时,将变化信息存储至第一云消息服务平台,包括:When the file synchronization detection module determines that there is a change, the change information is stored to the first cloud message service platform, including: 所述文件同步检测模块将所述变化信息存储至所述第一云消息服务平台中的第一消息队列中;The file synchronization detection module stores the change information in the first message queue in the first cloud message service platform; 所述第一云消息服务平台将所述变化信息发送给第二云消息服务平台,包括:The first cloud message service platform sends the change information to the second cloud message service platform, including: 所述第一云消息服务平台中的消息发送节点从所述第一消息队列中获取所述变化信息,并将所述变化信息发送至所述第二云消息服务平台中的消息接收节点;The message sending node in the first cloud message service platform obtains the change information from the first message queue, and sends the change information to the message receiving node in the second cloud message service platform; 所述消息接收节点将接收到的所述变化信息存储至所述第二云消息服务平台中的第二消息队列中;The message receiving node stores the received change information in a second message queue in the second cloud message service platform; 所述文件接收更新模块从所述第二云消息服务平台获取所述变化信息,包括:The file receiving and updating module obtains the change information from the second cloud message service platform, including: 所述文件接收更新模块从所述第二消息队列中获取所述变化信息。The file receiving and updating module obtains the change information from the second message queue. 6.根据权利要求4至5任一所述的方法,其特征在于,6. The method according to any one of claims 4 to 5, characterized in that, 当有文件被删除时,所述变化信息,包括:被删除文件的全路径和删除标识;When a file is deleted, the change information includes: the full path of the deleted file and the deletion identifier; 和/或,and / or, 当有文件被修改时,所述变化信息,包括:被修改文件的全路径、修改标识和被修改文件的内容;When a file is modified, the change information includes: the full path of the modified file, the modification identifier and the content of the modified file; 和/或,and / or, 当有新增的文件时,所述变化信息,包括:新增文件的全路径、新增标识和新增文件的内容。When there is a new file, the change information includes: the full path of the new file, the new logo and the content of the new file. 7.一种计算机可读介质,其特征在于,包括计算机执行指令,当存储控制器的处理器执行所述计算机执行指令时,所述存储控制器执行权利要求4至6任一项所述的方法。7. A computer-readable medium, comprising computer-executable instructions, when the processor of the storage controller executes the computer-executable instructions, the storage controller executes the method described in any one of claims 4 to 6. method. 8.一种存储控制器,其特征在于,包括:处理器、存储器和总线;8. A storage controller, characterized in that, comprising: a processor, a memory, and a bus; 所述存储器用于存储计算机执行指令,所述处理器与所述存储器通过所述总线连接,当所述存储控制器运行时,所述处理器执行所述存储器存储的所述计算机执行指令,以使所述存储控制器执行权利要求4至6任一项所述的方法。The memory is used to store computer-executable instructions, the processor is connected to the memory through the bus, and when the memory controller is running, the processor executes the computer-executable instructions stored in the memory to making the storage controller execute the method according to any one of claims 4 to 6.
CN201711318173.8A 2017-12-12 2017-12-12 A kind of file syn chronizing system and method Pending CN108228733A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711318173.8A CN108228733A (en) 2017-12-12 2017-12-12 A kind of file syn chronizing system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711318173.8A CN108228733A (en) 2017-12-12 2017-12-12 A kind of file syn chronizing system and method

Publications (1)

Publication Number Publication Date
CN108228733A true CN108228733A (en) 2018-06-29

Family

ID=62651979

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711318173.8A Pending CN108228733A (en) 2017-12-12 2017-12-12 A kind of file syn chronizing system and method

Country Status (1)

Country Link
CN (1) CN108228733A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109005218A (en) * 2018-07-12 2018-12-14 浪潮软件集团有限公司 Method and device for cross-gatekeeper ordered data transmission of cloud message service platform
CN109325072A (en) * 2018-07-12 2019-02-12 浪潮软件集团有限公司 Method and device for realizing cross-gatekeeper Oracle database synchronization based on CMSP
CN109710584A (en) * 2018-12-20 2019-05-03 浪潮软件集团有限公司 A method and device for realizing two-way synchronization of files by using a cloud message service platform
CN109767834A (en) * 2019-01-04 2019-05-17 浪潮软件集团有限公司 A medical image data sharing service method and system based on cloud message service platform and object storage
CN111262883A (en) * 2020-02-28 2020-06-09 浪潮软件股份有限公司 CMSP-based file synchronization system, synchronization method and file system
CN111291011A (en) * 2020-02-19 2020-06-16 北京百度网讯科技有限公司 File synchronization method and device, electronic device and readable storage medium
CN114168554A (en) * 2022-02-14 2022-03-11 山东信通电子股份有限公司 Point cloud annotation file synchronization method and device based on power transmission line
CN114629900A (en) * 2020-12-11 2022-06-14 中国移动通信有限公司研究院 Information processing method, device and equipment
WO2025107623A1 (en) * 2023-11-22 2025-05-30 南京南瑞继保电气有限公司 File updating method and apparatus in redundant environment, electronic device, and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100174690A1 (en) * 2009-01-08 2010-07-08 International Business Machines Corporation Method, Apparatus and Computer Program Product for Maintaining File System Client Directory Caches with Parallel Directory Writes
CN102360410A (en) * 2011-09-30 2012-02-22 许式伟 User operation discovery method of file system and synchronous system utilizing the same
CN105740418A (en) * 2016-01-29 2016-07-06 杭州亿方云网络科技有限公司 File monitoring and message pushing based real-time synchronization system
CN105824865A (en) * 2015-12-09 2016-08-03 广东亿迅科技有限公司 Distributed type database data synchronization system
CN106055723A (en) * 2016-08-17 2016-10-26 浪潮软件股份有限公司 Database data synchronization device, system and method
CN106095957A (en) * 2016-06-16 2016-11-09 北京航空航天大学 Cross-domain many wave files synchronous method of distributed file system and device
CN106385382A (en) * 2016-09-05 2017-02-08 努比亚技术有限公司 Data synchronization method, device and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100174690A1 (en) * 2009-01-08 2010-07-08 International Business Machines Corporation Method, Apparatus and Computer Program Product for Maintaining File System Client Directory Caches with Parallel Directory Writes
CN102360410A (en) * 2011-09-30 2012-02-22 许式伟 User operation discovery method of file system and synchronous system utilizing the same
CN105824865A (en) * 2015-12-09 2016-08-03 广东亿迅科技有限公司 Distributed type database data synchronization system
CN105740418A (en) * 2016-01-29 2016-07-06 杭州亿方云网络科技有限公司 File monitoring and message pushing based real-time synchronization system
CN106095957A (en) * 2016-06-16 2016-11-09 北京航空航天大学 Cross-domain many wave files synchronous method of distributed file system and device
CN106055723A (en) * 2016-08-17 2016-10-26 浪潮软件股份有限公司 Database data synchronization device, system and method
CN106385382A (en) * 2016-09-05 2017-02-08 努比亚技术有限公司 Data synchronization method, device and system

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109005218A (en) * 2018-07-12 2018-12-14 浪潮软件集团有限公司 Method and device for cross-gatekeeper ordered data transmission of cloud message service platform
CN109325072A (en) * 2018-07-12 2019-02-12 浪潮软件集团有限公司 Method and device for realizing cross-gatekeeper Oracle database synchronization based on CMSP
CN109710584A (en) * 2018-12-20 2019-05-03 浪潮软件集团有限公司 A method and device for realizing two-way synchronization of files by using a cloud message service platform
CN109767834A (en) * 2019-01-04 2019-05-17 浪潮软件集团有限公司 A medical image data sharing service method and system based on cloud message service platform and object storage
CN109767834B (en) * 2019-01-04 2023-04-07 浪潮软件集团有限公司 Medical image data sharing service method and system
CN111291011A (en) * 2020-02-19 2020-06-16 北京百度网讯科技有限公司 File synchronization method and device, electronic device and readable storage medium
CN111291011B (en) * 2020-02-19 2023-10-20 北京百度网讯科技有限公司 File synchronization method and device, electronic equipment and readable storage medium
CN111262883A (en) * 2020-02-28 2020-06-09 浪潮软件股份有限公司 CMSP-based file synchronization system, synchronization method and file system
CN114629900A (en) * 2020-12-11 2022-06-14 中国移动通信有限公司研究院 Information processing method, device and equipment
CN114168554A (en) * 2022-02-14 2022-03-11 山东信通电子股份有限公司 Point cloud annotation file synchronization method and device based on power transmission line
CN114168554B (en) * 2022-02-14 2022-05-20 山东信通电子股份有限公司 Point cloud annotation file synchronization method and device based on power transmission line
WO2025107623A1 (en) * 2023-11-22 2025-05-30 南京南瑞继保电气有限公司 File updating method and apparatus in redundant environment, electronic device, and storage medium

Similar Documents

Publication Publication Date Title
CN108228733A (en) A kind of file syn chronizing system and method
CN102982141B (en) A kind of method and device realizing distributed data base agency
CN103491192B (en) The Namenode changing method of a kind of distributed system and system
CN104376127B (en) A kind of data manipulation method and device
CN105550229A (en) Method and device for repairing data of distributed storage system
CN103546572B (en) A kind of cloudy storing networking system and method
JP6700308B2 (en) Data copy method and device
CN105187464A (en) Data synchronization method, device and system in distributed storage system
WO2017113694A1 (en) File synchronizing method, device and system
WO2017107984A1 (en) Data recovery method and device
CN103312489B (en) A kind of terminal carries out synchronize method and apparatus with server
CN105550306A (en) Multi-copy data reading/writing method and system
CN113535384B (en) Cloning method and device for application
CN105159691A (en) Method and device for updating metadata
WO2016107443A1 (en) Snapshot processing method and related device
CN108234057A (en) Method for synchronizing time, device and the storage medium of server based on BMC
WO2015127850A1 (en) Data upgrading method and central server
CN105162879A (en) Method, device and system for realizing data consistency among plurality of machine rooms
CN105704241A (en) Client terminal program updating method and system and a service platform
CN105959078A (en) Cluster time synchronization method, cluster and time synchronization system
CN103580918B (en) A kind of configuration data processing method and device
CN105550230A (en) Method and device for detecting failure of node of distributed storage system
CN107483238A (en) A log management method, cluster management node and system
CN117667944A (en) Copy capacity expansion method, device and system for distributed graph database
WO2011143851A1 (en) Database server operation control system, method and equipment

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180629