[go: up one dir, main page]

CN116756108A - A file synchronization method, system, device and readable storage medium - Google Patents

A file synchronization method, system, device and readable storage medium Download PDF

Info

Publication number
CN116756108A
CN116756108A CN202310807296.7A CN202310807296A CN116756108A CN 116756108 A CN116756108 A CN 116756108A CN 202310807296 A CN202310807296 A CN 202310807296A CN 116756108 A CN116756108 A CN 116756108A
Authority
CN
China
Prior art keywords
server
file
synchronization
model information
identifier
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
CN202310807296.7A
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.)
Boc Financial Technology Co ltd
Original Assignee
Boc Financial Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Boc Financial Technology Co ltd filed Critical Boc Financial Technology Co ltd
Priority to CN202310807296.7A priority Critical patent/CN116756108A/en
Publication of CN116756108A publication Critical patent/CN116756108A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues

Landscapes

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

Abstract

本申请公开了一种文件同步方法、系统、装置及可读存储介质,可用于分布式领域或金融领域。第一服务器将第一服务器的文件模型信息发送至各个第二服务器;第一服务器的文件模型信息包括第一文件标识,第一文件标识包括第一服务器的本地文件的文件标识,因此,第二服务器接收第一服务器的文件模型信息,校验是否已同步各个第一文件标识指示的文件,得到同步校验结果,发送同步校验结果至第一服务器其中,第一服务器接收第二服务器发送的同步校验结果后,发送同步校验结果中的未同步文件至第二服务器。由于,第一服务器和第二服务器为分布式系统中的任意两个服务器,可见本方案并行实现分布式系统中多个服务器的文件同步,提高了文件同步效率。

This application discloses a file synchronization method, system, device and readable storage medium, which can be used in the distributed field or financial field. The first server sends the file model information of the first server to each second server; the file model information of the first server includes the first file identification, and the first file identification includes the file identification of the local file of the first server. Therefore, the second server The server receives the file model information of the first server, verifies whether the files indicated by each first file identifier have been synchronized, obtains the synchronization verification result, and sends the synchronization verification result to the first server. The first server receives the synchronization verification result sent by the second server. After synchronizing the verification results, the unsynchronized files in the synchronization verification results are sent to the second server. Since the first server and the second server are any two servers in the distributed system, it can be seen that this solution realizes file synchronization of multiple servers in the distributed system in parallel and improves the file synchronization efficiency.

Description

一种文件同步方法、系统、装置及可读存储介质A file synchronization method, system, device and readable storage medium

技术领域Technical field

本申请涉及分布式技术领域,尤其涉及一种文件同步方法、系统、装置及可读存储介质。The present application relates to the field of distributed technology, and in particular, to a file synchronization method, system, device and readable storage medium.

背景技术Background technique

部署分布式服务是银行系统的重点项目,而分布式服务中的文件同步是项目部署的重中之重,目前,分布式服务运行中普遍存在文件同步不及时的现象,文件同步不及时往往会导致一台服务器上传文件之后,在另外的(一台或多台)服务器无法下载文件的异常情况,这属于严重的系统缺陷,甚至会导致项目运行异常,因此,如何高效地实现分布式系统中文件同步是目前亟待解决的技术问题。Deployment of distributed services is a key project of the banking system, and file synchronization in distributed services is the top priority of project deployment. At present, there is a common phenomenon of untimely file synchronization in the operation of distributed services. Untimely file synchronization often causes problems. An abnormal situation that causes one server to upload a file and another (one or more) servers to be unable to download the file. This is a serious system defect and may even cause the project to run abnormally. Therefore, how to efficiently implement a distributed system File synchronization is a technical problem that needs to be solved urgently.

发明内容Contents of the invention

本申请提供了一种文件同步方法、系统、装置及可读存储介质,目的在于提高分布式系统中文件同步的效率,如下:This application provides a file synchronization method, system, device and readable storage medium, with the purpose of improving the efficiency of file synchronization in distributed systems, as follows:

一种文件同步方法,应用于分布式系统,所述分布式系统包括分布式构建的多台服务器,所述方法包括:A file synchronization method, applied to a distributed system, the distributed system includes multiple servers constructed in a distributed manner, the method includes:

第一服务器获取所述第一服务器的文件模型信息,并将所述第一服务器的文件模型信息发送至各个第二服务器;其中,所述第一服务器的文件模型信息包括第一文件标识,所述第一文件标识包括所述第一服务器的本地文件的文件标识,所述第一服务器包括所述多台服务器中的任一服务器,所述第二服务器包括所述多台服务器中除所述第一服务器以外的任一服务器;The first server obtains the file model information of the first server and sends the file model information of the first server to each second server; wherein the file model information of the first server includes a first file identifier, so The first file identification includes the file identification of the local file of the first server, the first server includes any one of the multiple servers, and the second server includes the multiple servers except the Any server other than the first server;

所述第二服务器接收所述第一服务器的文件模型信息,校验是否已同步各个所述第一文件标识指示的文件,得到同步校验结果,所述同步校验结果包括未同步文件的文件标识;The second server receives the file model information of the first server, verifies whether each file indicated by the first file identifier has been synchronized, and obtains a synchronization verification result. The synchronization verification result includes files of unsynchronized files. logo;

所述第二服务器发送所述同步校验结果至所述第一服务器;The second server sends the synchronization verification result to the first server;

所述第一服务器接收所述第二服务器发送的所述同步校验结果后,发送所述同步校验结果中的未同步文件至所述第二服务器。After receiving the synchronization verification result sent by the second server, the first server sends the unsynchronized files in the synchronization verification result to the second server.

可选地,第一服务器获取所述第一服务器的文件模型信息,包括:Optionally, the first server obtains the file model information of the first server, including:

所述第一服务器响应于达到预设的同步时机,获取所述第一服务器的文件模型信息;The first server acquires the file model information of the first server in response to reaching a preset synchronization opportunity;

其中,所述达到预设的同步时机包括:达到预设的同步周期的同步时间,和/或,检测到本地文件发生更新,所述更新包括删除和/或新增。Wherein, reaching the preset synchronization timing includes: reaching the synchronization time of the preset synchronization cycle, and/or detecting an update of the local file, and the update includes deletion and/or addition.

可选地,第一服务器获取所述第一服务器的文件模型信息,包括:Optionally, the first server obtains the file model information of the first server, including:

所述第一服务器获取各个第一文件的文件名称,所述第一文件包括所述第一服务器的本地文件;The first server obtains the file name of each first file, and the first file includes a local file of the first server;

所述第一服务器通过预设的信息摘要算法生成各个所述第一文件的文件名称的散列值,作为各个所述第一文件的文件标识,得到所述第一服务器的文件模型信息。The first server uses a preset information digest algorithm to generate a hash value of the file name of each first file as a file identifier of each first file to obtain the file model information of the first server.

可选地,第二服务器接收所述第一服务器的文件模型信息,校验是否已同步各个所述第一文件标识指示的文件,得到同步校验结果,包括:Optionally, the second server receives the file model information of the first server, verifies whether each file indicated by the first file identifier has been synchronized, and obtains a synchronization verification result, including:

所述第二服务器获取所述第二服务器的文件模型信息,所述第二服务器的文件模型信息包括第二文件标识,所述第二文件标识包括所述第二服务器的本地文件的文件标识;The second server obtains the file model information of the second server, the file model information of the second server includes a second file identifier, and the second file identifier includes a file identifier of a local file of the second server;

所述第二服务器基于所述第二服务器的文件模型信息和所述第一服务器的文件模型信息,获取满足第一预设条件的文件标识作为所述未同步文件的文件标识,所述第一预设条件包括:存在于所述第一服务器的文件模型信息中,且不存在于所述第二服务器的文件模型信息中;The second server obtains a file identifier that satisfies the first preset condition as the file identifier of the unsynchronized file based on the file model information of the second server and the file model information of the first server. The preset conditions include: existing in the file model information of the first server and not existing in the file model information of the second server;

所述第二服务器生成所述同步校验结果,所述同步校验结果包括各个所述未同步文件的文件标识。The second server generates the synchronization verification result, and the synchronization verification result includes the file identification of each of the unsynchronized files.

可选地,目标服务器的文件模型信息还包括各个文件标识的同步状态信息,所述同步状态信息包括服务器标识和对应的同步状态标识,所述服务器标识对应的同步状态标识用于指示所述服务器标识指代的服务器是否已同步文件标识指代的文件,所述目标服务器包括第一服务器和第二服务器;Optionally, the file model information of the target server also includes synchronization status information of each file identification. The synchronization status information includes a server identification and a corresponding synchronization status identification. The synchronization status identification corresponding to the server identification is used to indicate that the server Whether the server indicated by the identification has synchronized the file indicated by the file identification, and the target server includes a first server and a second server;

在所述第二服务器获取所述第二服务器的文件模型信息后,所述方法还包括:After the second server obtains the file model information of the second server, the method further includes:

所述第二服务器基于所述第二服务器的文件模型信息和所述第一服务器的文件模型信息,获取满足第二预设条件的文件标识作为差异同步文件的文件标识,所述第二预设条件包括:存在于所述第二服务器的文件模型信息中,且在所述第一服务器的文件模型信息中,所述第二服务器的服务器标识对应的同步状态标识为未同步;Based on the file model information of the second server and the file model information of the first server, the second server obtains a file identifier that satisfies a second preset condition as the file identifier of the differential synchronization file. The second preset The conditions include: existing in the file model information of the second server, and in the file model information of the first server, the synchronization status identifier corresponding to the server identifier of the second server is unsynchronized;

所述同步校验结果还包括各个所述差异同步文件的文件标识。The synchronization verification result also includes the file identification of each differential synchronization file.

可选地,第一服务器发送所述同步校验结果中的未同步文件至所述第二服务器,包括:Optionally, the first server sends the unsynchronized files in the synchronization verification result to the second server, including:

若所述同步校验结果包括所述未同步文件的文件标识,所述第一服务器发送所述未同步文件至所述第二服务器,并将所述未同步文件的文件标识的同步状态信息中,所述第二服务器的标识对应的同步状态标识更新为已同步;If the synchronization verification result includes the file identifier of the unsynchronized file, the first server sends the unsynchronized file to the second server, and adds the file identifier of the unsynchronized file to the synchronization status information. , the synchronization status identifier corresponding to the identifier of the second server is updated to synchronized;

所述方法还包括:The method also includes:

若所述同步校验结果包括所述差异同步文件的文件标识,所述第一服务器将所述差异同步文件的文件标识的同步状态信息中,所述第二服务器的标识对应的同步状态标识更新为已同步。If the synchronization verification result includes the file identification of the differential synchronization file, the first server updates the synchronization status identification corresponding to the identification of the second server in the synchronization status information of the file identification of the differential synchronization file. is synchronized.

可选地,多台服务器中每台服务器均各自预先构建第一发送队列、第二发送队列、第一接收队列、第二接收队列以及文件上传队列;Optionally, each server among the multiple servers pre-constructs a first sending queue, a second sending queue, a first receiving queue, a second receiving queue and a file upload queue;

所述第一服务器将所述第一服务器的文件模型信息发送至各个第二服务器,包括:The first server sends the file model information of the first server to each second server, including:

所述第一服务器通过第一发送队列,将所述第一服务器的文件模型信息发送至各个所述第二服务器;The first server sends the file model information of the first server to each of the second servers through the first sending queue;

所述第二服务器接收所述第一服务器的文件模型信息,包括:The second server receives the file model information of the first server, including:

所述第二服务器通过第一接收队列,接收所述第一服务器的文件模型信息;The second server receives the file model information of the first server through the first receiving queue;

所述第二服务器发送同步校验结果至所述第一服务器,包括:The second server sends the synchronization verification result to the first server, including:

所述第二服务器通过第二发送队列,发送所述同步校验结果至所述第一服务器;The second server sends the synchronization verification result to the first server through the second sending queue;

所述第一服务器接收所述第二服务器发送的所述同步校验结果,包括:The first server receives the synchronization verification result sent by the second server, including:

所述第一服务器通过第二接收队列,接收各个所述第二服务器发送的所述同步校验结果;The first server receives the synchronization verification results sent by each of the second servers through the second receiving queue;

所述第一服务器发送所述同步校验结果中的未同步文件至所述第二服务器,包括:The first server sends the unsynchronized files in the synchronization verification result to the second server, including:

所述第一服务器通过文件上传队列发送所述同步校验结果中的未同步文件至所述第二服务器。The first server sends the unsynchronized files in the synchronization verification result to the second server through the file upload queue.

一种文件同步系统,包括分布式构建的多台服务器;其中,目标服务器用于:A file synchronization system, including multiple servers built in a distributed manner; among them, the target server is used for:

获取所述目标服务器的文件模型信息;其中,所述目标服务器的文件模型信息包括目标文件标识,所述目标文件标识包括所述目标服务器的本地文件的文件标识,所述目标服务器包括所述多台服务器中的任一服务器;Obtain the file model information of the target server; wherein the file model information of the target server includes a target file identification, the target file identification includes a file identification of a local file of the target server, and the target server includes the multiple any server among the servers;

将所述目标服务器的文件模型信息发送至各个其他服务器,以使所述其他服务器接收所述目标服务器的文件模型信息,校验是否已同步各个所述目标文件标识指示的文件,得到同步校验结果,发送所述同步校验结果至所述目标服务器;其中,所述其他服务器包括所述多台服务器中除所述目标服务器以外的任一服务器,所述同步校验结果包括未同步文件的文件标识;Send the file model information of the target server to each other server, so that the other servers receive the file model information of the target server, verify whether the files indicated by each target file identifier have been synchronized, and obtain synchronization verification As a result, the synchronization verification result is sent to the target server; wherein the other servers include any server among the multiple servers except the target server, and the synchronization verification result includes the unsynchronized file. File identification;

接收所述其他服务器发送的所述同步校验结果后,发送所述同步校验结果中的未同步文件至所述其他服务器。After receiving the synchronization verification result sent by the other server, the unsynchronized files in the synchronization verification result are sent to the other server.

一种文件同步装置,应用于分布式系统中的目标服务器,所述分布式系统包括分布式构建的多台服务器,所述目标服务器包括所述多台服务器中的任一服务器;所述装置包括:A file synchronization device applied to a target server in a distributed system. The distributed system includes multiple servers constructed in a distributed manner. The target server includes any server among the multiple servers; the device includes :

文件信息获取单元,用于获取所述目标服务器的文件模型信息;其中,所述目标服务器的文件模型信息包括目标文件标识,所述目标文件标识包括所述目标服务器的本地文件的文件标识;A file information acquisition unit configured to acquire file model information of the target server; wherein the file model information of the target server includes a target file identifier, and the target file identifier includes a file identifier of a local file of the target server;

文件信息发送单元,用于将所述目标服务器的文件模型信息发送至各个其他服务器,以使所述其他服务器接收所述目标服务器的文件模型信息,校验是否已同步各个所述目标文件标识指示的文件,生成并发送同步校验结果至所述目标服务器;其中,所述其他服务器包括所述多台服务器中除所述目标服务器以外的任一服务器,所述同步校验结果包括未同步文件的文件标识;The file information sending unit is used to send the file model information of the target server to each other server, so that the other servers receive the file model information of the target server and verify whether each target file identification indication has been synchronized. files, generate and send synchronization verification results to the target server; wherein the other servers include any server among the multiple servers except the target server, and the synchronization verification results include unsynchronized files file identification;

文件上传单元,用于接收所述其他服务器发送的所述同步校验结果后,发送所述同步校验结果中的未同步文件至所述其他服务器。The file uploading unit is configured to send the unsynchronized files in the synchronization verification results to the other servers after receiving the synchronization verification results sent by the other servers.

一种可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时,实现文件同步方法的各个步骤。A readable storage medium on which a computer program is stored. When the computer program is executed by a processor, each step of the file synchronization method is implemented.

由上述技术方案可以看出,本申请实施例提供的文件同步方法、系统、装置及可读存储介质,第一服务器发送至各个第二服务器的文件模型信息包括第一服务器的本地文件的文件标识,各个第二服务器根据第二服务器的本地文件的文件标识,校验本地文件中是否已同步第一服务器的各个本地文件,并在存在未同步文件的情况下,反馈未同步文件的文件标识至第一服务器,第一服务器能够根据各个第二服务器反馈的未同步文件的文件标识,向各个第二服务器发送对应的未同步文件,第一服务器包括分布式构建的多台服务器中的任一服务器,第二服务器包括多台服务器中除第一服务器以外的任一服务器,可见本申请实现并行地将第一服务器中的本地文件同步至各个其他服务器,提高了文件同步的效率。It can be seen from the above technical solutions that in the file synchronization method, system, device and readable storage medium provided by the embodiments of the present application, the file model information sent by the first server to each second server includes the file identification of the local file of the first server. , each second server verifies whether each local file of the first server has been synchronized in the local file according to the file identification of the local file of the second server, and if there is an unsynchronized file, feeds back the file identification of the unsynchronized file to The first server can send corresponding unsynchronized files to each second server based on the file identifier of the unsynchronized file fed back by each second server. The first server includes any server among multiple servers constructed in a distributed manner. , the second server includes any server among multiple servers except the first server. It can be seen that this application realizes parallel synchronization of local files in the first server to various other servers, improving the efficiency of file synchronization.

附图说明Description of the drawings

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

图1为本申请实施例提供的一种文件同步系统的结构示意图;Figure 1 is a schematic structural diagram of a file synchronization system provided by an embodiment of the present application;

图2为本申请实施例提供的一种文件同步方法的具体实施方式的流程示意图;Figure 2 is a schematic flowchart of a specific implementation of a file synchronization method provided by an embodiment of the present application;

图3为本申请实施例提供的一种文件同步方法的流程示意图;Figure 3 is a schematic flow chart of a file synchronization method provided by an embodiment of the present application;

图4为本申请实施例提供的一种文件同步装置的结构示意图。Figure 4 is a schematic structural diagram of a file synchronization device provided by an embodiment of the present application.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of this application.

本申请实施例提供的文件同步方法可以应用于文件同步系统,如图1所示,本申请实施例提供的文件同步系统包括分布式构建的多台服务器即服务器1~服务器n,每台服务器均各自存储有本地文件,本系统中的任意一台服务器也即目标服务器均用于:The file synchronization method provided by the embodiment of the present application can be applied to the file synchronization system. As shown in Figure 1, the file synchronization system provided by the embodiment of the present application includes multiple servers constructed in a distributed manner, namely server 1 to server n. Each server Each has its own local file stored. Any server in this system, that is, the target server, is used for:

获取目标服务器的文件模型信息,将目标服务器的文件模型信息发送至各个其他服务器,以使其他服务器接收目标服务器的文件模型信息,校验是否已同步各个目标文件标识指示的文件,生成并发送同步校验结果至目标服务器。接收其他服务器发送的同步校验结果后,发送同步校验结果中的未同步文件至其他服务器。其中,目标服务器的文件模型信息包括目标文件标识,目标文件标识包括目标服务器的本地文件的文件标识,同步校验结果包括未同步文件的文件标识。Obtain the file model information of the target server, send the file model information of the target server to each other server, so that the other servers receive the file model information of the target server, verify whether the files indicated by each target file identifier have been synchronized, and generate and send synchronization Verify the results to the target server. After receiving the synchronization verification results sent by other servers, send the unsynchronized files in the synchronization verification results to other servers. The file model information of the target server includes the target file identifier, the target file identifier includes the file identifier of the local file of the target server, and the synchronization verification result includes the file identifier of the unsynchronized file.

可见,本系统中任一目标服务器发送至各个其他服务器的文件模型信息包括目标服务器的本地文件的文件标识,因此,使得各个其他服务器能够根据目标服务器的本地文件的文件标识,校验其他服务器的本地文件中是否已同步目标服务器的各个本地文件,并在存在未同步文件的情况下,反馈未同步文件的文件标识至目标服务器,进一步目标服务器能够根据各个其他服务器反馈的未同步文件的文件标识,向各个其他服务器发送对应的未同步文件,从而实现分布式系统中各个服务器的文件同步,由于,目标服务器为分布式系统中的任意服务器,可见,本方法提供的文件同步方法可以并行实现各个服务器的文件同步,从而提高了文件同步的效率。It can be seen that the file model information sent by any target server to each other server in this system includes the file identification of the local file of the target server. Therefore, each other server can verify the file identification of other servers based on the file identification of the local file of the target server. Whether each local file of the target server has been synchronized in the local file, and if there are unsynchronized files, the file ID of the unsynchronized file is fed back to the target server. Further, the target server can further use the file ID of the unsynchronized file fed back by other servers. , sending corresponding unsynchronized files to each other server, thereby realizing file synchronization of each server in the distributed system. Since the target server is any server in the distributed system, it can be seen that the file synchronization method provided by this method can realize each server in parallel. Server file synchronization, thus improving the efficiency of file synchronization.

以分布式系统包括第一服务器和多个第二服务器为例,图2为本申请实施例提供的文件同步方法的一种具体实现方法的流程图,如图2所示,本方法包括:Taking a distributed system including a first server and multiple second servers as an example, Figure 2 is a flow chart of a specific implementation method of the file synchronization method provided by the embodiment of the present application. As shown in Figure 2, this method includes:

S201、第一服务器响应于达到预设的同步周期的同步时间,获取第一服务器的文件模型信息。S201. The first server acquires the file model information of the first server in response to the synchronization time reaching the preset synchronization cycle.

本实施例中,同步周期可以被预先配置,例如,同步周期为24小时,同步周期的同步时间为上午10点,也即,第一服务器于每天的上午10点获取第一服务器的文件模型信息,开始文件同步流程。In this embodiment, the synchronization period can be pre-configured. For example, the synchronization period is 24 hours, and the synchronization time of the synchronization period is 10 a.m., that is, the first server obtains the file model information of the first server at 10 a.m. every day. , start the file synchronization process.

本实施例中,分布式系统中的目标服务器(包括第一服务器和各个第二服务器)的文件模型信息包括目标文件标识以及各个目标文件标识的同步状态信息,其中,同步状态信息包括服务器标识和对应的同步状态标识,服务器标识对应的同步状态标识用于指示服务器标识指代的服务器是否已同步文件标识指代的文件,可选地,服务器标识包括服务器IP地址。In this embodiment, the file model information of the target server (including the first server and each second server) in the distributed system includes the target file identification and the synchronization status information of each target file identification, where the synchronization status information includes the server identification and The corresponding synchronization status identifier. The synchronization status identifier corresponding to the server identifier is used to indicate whether the server referred to by the server identifier has synchronized the file referred to by the file identifier. Optionally, the server identifier includes the server IP address.

例如,第一服务器的文件模型信息包括第一文件标识以及各个第一文件标识的同步状态信息,其中,第一文件标识包括第一服务器的本地文件的文件标识,任意一个第一文件标识的同步状态信息中包括各个第二服务器的服务器标识以及对应的同步状态标识,该同步状态标识包括未同步和已同步,若第一文件标识A1的同步状态信息中,第二服务器S2的服务器标识对应的同步状态标识为未同步,则指示S2未同步A1。For example, the file model information of the first server includes the first file identifier and the synchronization status information of each first file identifier, where the first file identifier includes the file identifier of the local file of the first server, and the synchronization status information of any first file identifier. The status information includes the server identification of each second server and the corresponding synchronization status identification. The synchronization status identification includes unsynchronized and synchronized. If in the synchronization status information of the first file identification A1, the server identification corresponding to the second server S2 If the synchronization status is marked as unsynchronized, it indicates that S2 has not synchronized with A1.

本实施例中,第一服务器获取第一服务器的文件模型信息的方法具体包括:In this embodiment, the method for the first server to obtain the file model information of the first server specifically includes:

首先,第一服务器获取各个第一文件的文件名称。First, the first server obtains the file name of each first file.

其中,第一文件包括第一服务器的本地文件,获取本地文件的文件名称的具体方法可以参见现有技术。Wherein, the first file includes a local file of the first server, and the specific method of obtaining the file name of the local file can be found in the prior art.

然后,第一服务器通过预设的信息摘要算法生成各个第一文件的文件名称的散列值,作为各个第一文件的文件标识。Then, the first server uses a preset information digest algorithm to generate a hash value of the file name of each first file as a file identification of each first file.

本实施例中,信息摘要算法包括MD5(Message Digest Algorithm MD5,消息摘要算法第五版)。In this embodiment, the message digest algorithm includes MD5 (Message Digest Algorithm MD5, message digest algorithm version 5).

最后,第一服务器通过历史信息获取各个第二服务器的服务器标识以及各个第二服务器标识对应的同步状态标识。Finally, the first server obtains the server identification of each second server and the synchronization status identification corresponding to each second server identification through historical information.

需要说明的是,历史信息包括上一个同步周期触发的文件同步流程结束后,第一服务器存储的文件模型信息。若不存在第二服务器的服务器标识对应的同步状态标识,则默认同步状态标识为未同步。It should be noted that the historical information includes the file model information stored by the first server after the file synchronization process triggered by the previous synchronization cycle ends. If there is no synchronization status identification corresponding to the server identification of the second server, the default synchronization status identification is unsynchronized.

可以理解的是,通过MD5算法生成的文件名称的散列值,大小16个字节,较文件名称占用的存储空间小,提高信息传输效率,单次网络请求可以发送更多的文件信息。服务器IP地址和同步状态标识的对应关系可以便于校验各个文件是否完全同步到每台服务器,也便于定位未同步文件对应的服务器。It is understandable that the hash value of the file name generated by the MD5 algorithm is 16 bytes in size, which takes up less storage space than the file name, improves information transmission efficiency, and can send more file information in a single network request. The corresponding relationship between the server IP address and the synchronization status identifier can make it easy to verify whether each file is completely synchronized to each server, and also facilitate the location of the server corresponding to the unsynchronized file.

S202、第一服务器将第一服务器的文件模型信息发送至各个第二服务器。S203、第二服务器接收第一服务器的文件模型信息后,获取第二服务器的文件模型信息。S202. The first server sends the file model information of the first server to each second server. S203. After receiving the file model information of the first server, the second server obtains the file model information of the second server.

本实施例中,第二服务器的文件模型信息包括第二文件标识以及各个第二文件标识的同步状态信息。In this embodiment, the file model information of the second server includes the second file identifier and the synchronization status information of each second file identifier.

S204、第二服务器基于第二服务器的文件模型信息和第一服务器的文件模型信息,获取满足第一预设条件的文件标识作为未同步文件的文件标识。S204. Based on the file model information of the second server and the file model information of the first server, the second server obtains the file identifier that satisfies the first preset condition as the file identifier of the unsynchronized file.

本实施例中,第一预设条件包括:存在于第一服务器的文件模型信息中,且不存在于第二服务器的文件模型信息中。In this embodiment, the first preset condition includes: it exists in the file model information of the first server and does not exist in the file model information of the second server.

可以理解的是,满足第一预设条件的文件标识指示的文件为存在于第一服务器的本地文件,但是第二服务器的本地文件中不存在的文件,也即,未同步至第二服务器的文件。It can be understood that the file indicated by the file identification that meets the first preset condition is a local file that exists on the first server, but does not exist in the local file of the second server, that is, it is not synchronized to the second server. document.

S205、第二服务器基于第二服务器的文件模型信息和第一服务器的文件模型信息,获取满足第二预设条件的文件标识作为差异同步文件的文件标识。S205. Based on the file model information of the second server and the file model information of the first server, the second server obtains the file identifier that satisfies the second preset condition as the file identifier of the differential synchronization file.

本实施例中,第二预设条件包括:存在于第二服务器的文件模型信息中,且在第一服务器的文件模型信息中,第二服务器的服务器标识对应的同步状态标识为未同步。In this embodiment, the second preset condition includes: it exists in the file model information of the second server, and in the file model information of the first server, the synchronization status identifier corresponding to the server identifier of the second server is unsynchronized.

可以理解的是,满足第二预设条件的文件标识指示的文件同时存在于第一服务器和第二服务器的本地文件中,但是,在第一服务器的文件模型信息中,第二服务器的服务器标识对应的同步状态标识仍为未同步,也即,在第一服务器的文件模型信息中,默认第二服务器仍未同步该文件,显然,第一服务器的文件模型信息出现错误,需要被更新。It can be understood that the file indicated by the file identification that meets the second preset condition exists in the local files of the first server and the second server at the same time. However, in the file model information of the first server, the server identification of the second server The corresponding synchronization status indicator is still unsynchronized, that is, in the file model information of the first server, the second server has not synchronized the file by default. Obviously, the file model information of the first server is wrong and needs to be updated.

S206、第二服务器生成同步校验结果,并发送同步校验结果至第一服务器。S206. The second server generates a synchronization verification result and sends the synchronization verification result to the first server.

本实施例中,同步校验结果包括各个未同步文件的文件标识以及各个差异同步文件的文件标识。In this embodiment, the synchronization verification result includes the file identification of each unsynchronized file and the file identification of each differential synchronization file.

S207、第一服务器接收各个第二服务器发送的同步校验结果,判断同步校验结果中是否存在未同步文件的文件标识或差异同步文件的文件标识。本实施例中,服务器之间按照预先配置的类型标识规则记录不同类型的文件标识,例如,未同步文件的文件标识携带预设的未同步标识,差异同步文件的文件标识携带预设的差异标识,通过查找类型标识确定是否存在未同步文件的文件标识或差异同步文件的文件标识。S207. The first server receives the synchronization verification results sent by each second server, and determines whether the synchronization verification results include the file identification of the unsynchronized file or the file identification of the differential synchronization file. In this embodiment, different types of file identifiers are recorded between servers according to preconfigured type identification rules. For example, the file identifier of an unsynchronized file carries a preset unsynchronized identifier, and the file identifier of a differentially synchronized file carries a preset difference identifier. , determine whether there is a file ID of an unsynchronized file or a file ID of a differentially synchronized file by looking for the type ID.

进一步,若存在未同步文件的文件标识,执行S208,若存在差异同步文件的文件标识,执行S209,需要说明的是,同步校验结果中可能同时存在未同步文件的文件标识和差异同步文件的文件标识,那么S208和S209可以并行执行或按照预设的执行规则串行执行,本实施例对此不做限定。Further, if there is a file identifier of an unsynchronized file, execute S208. If there is a file identifier of a differentially synchronized file, execute S209. It should be noted that the synchronization verification result may contain both the file identifier of the unsynchronized file and the identifier of the differentially synchronized file. file identification, then S208 and S209 can be executed in parallel or serially according to preset execution rules, which is not limited in this embodiment.

S208、第一服务器发送同步校验结果中的未同步文件至第二服务器后,将未同步文件的文件标识的同步状态信息中,第二服务器的标识对应的同步状态标识更新为已同步。S208. After sending the unsynchronized file in the synchronization verification result to the second server, the first server updates the synchronization status identifier corresponding to the identifier of the second server in the synchronization status information of the file identifier of the unsynchronized file to synchronized.

需要说明的是,第一服务器发送同步校验结果中的未同步文件至第二服务器后,可以直接将未同步文件的文件标识的同步状态信息中,第二服务器的标识对应的同步状态标识更新为已同步,也可以等待第二服务器同步完成未同步文件后,反馈同步完成通知后,再将未同步文件的文件标识的同步状态信息中,第二服务器的标识对应的同步状态标识更新为已同步,本实施例对此不做限定。It should be noted that after the first server sends the unsynchronized file in the synchronization verification result to the second server, it can directly update the synchronization status identifier corresponding to the identifier of the second server in the synchronization status information of the file identifier of the unsynchronized file. If the file has been synchronized, you can also wait for the second server to complete the synchronization of the unsynchronized file and feedback the synchronization completion notification, and then update the synchronization status identifier corresponding to the second server's identifier in the synchronization status information of the file identifier of the unsynchronized file to "synchronized". Synchronization, this embodiment does not limit this.

S209、第一服务器将差异同步文件的文件标识的同步状态信息中,第二服务器的标识对应的同步状态标识更新为已同步。S209. The first server updates the synchronization status identification corresponding to the identification of the second server in the synchronization status information of the file identification of the differential synchronization file to synchronized.

由上述技术方案可以看出,本申请实施例提供的一种文件同步方法,第一服务器发送至各个第二服务器的文件模型信息包括第一服务器的本地文件的文件标识,各个第二服务器根据第二服务器的本地文件的文件标识,校验本地文件中是否已同步第一服务器的各个本地文件,并在存在未同步文件的情况下,反馈未同步文件的文件标识至第一服务器,第一服务器能够根据各个第二服务器反馈的未同步文件的文件标识,向各个第二服务器发送对应的未同步文件,从而实现并行地将第一服务器中的本地文件同步至各个其他服务器,提高了文件同步的效率。It can be seen from the above technical solution that in the file synchronization method provided by the embodiment of the present application, the file model information sent by the first server to each second server includes the file identification of the local file of the first server. The file identifier of the local file of the second server verifies whether each local file of the first server has been synchronized in the local file, and if there are unsynchronized files, feeds back the file identifier of the unsynchronized file to the first server. The first server According to the file identification of the unsynchronized files fed back by each second server, the corresponding unsynchronized files can be sent to each second server, thereby achieving parallel synchronization of local files in the first server to each other server, improving the efficiency of file synchronization. efficiency.

进一步,文件模型信息还包括各个文件标识的同步状态信息,一方面,第一服务器可以通过各个文件标识的同步状态信息定位未同步文件对应的服务器,并向该服务器发送对应的未同步文件,另一方面,第二服务器可以通过接收到文件模型信息校验得到未同步文件以及差异同步文件,实现文件同步的同时,能够实现各个服务器之间的文件同步状态的一致性。Furthermore, the file model information also includes synchronization status information of each file identifier. On the one hand, the first server can locate the server corresponding to the unsynchronized file through the synchronization status information of each file identifier, and send the corresponding unsynchronized file to the server. On the one hand, the second server can obtain unsynchronized files and differential synchronization files by receiving file model information verification, thereby achieving file synchronization while achieving consistency in file synchronization status between servers.

进一步,本申请提供的文件同步方法应用于各个服务器时,具有零侵入性,不涉及修改任务原有代码,摒弃了传统第三方框架实现文件同步造成的系统臃肿,信息冗余等缺点。Furthermore, the file synchronization method provided by this application is zero-invasive when applied to each server, does not involve modifying the original code of the task, and abandons the shortcomings of system bloat and information redundancy caused by traditional third-party frameworks to achieve file synchronization.

需要说明的是,图2所示的文件同步方法仅为一种可选的具体实现方法,本申请提供的文件同步方法还可以通过其他可选的实现方式执行:It should be noted that the file synchronization method shown in Figure 2 is only an optional specific implementation method. The file synchronization method provided by this application can also be executed through other optional implementation methods:

例如,达到同步周期的同步时间仅为一种可选的同步时机,在一种可选的实现方式中,第一服务器检测到本地文件发生更新后,获取第一服务器的文件模型信息,其中,更新包括删除和/或新增。也即,通过监控本地文件目录实时获取发生更新的文件名称,并获取文件模型信息。For example, the synchronization time to reach the synchronization cycle is only an optional synchronization opportunity. In an optional implementation, after the first server detects that the local file is updated, the first server obtains the file model information, where, Updates include deletions and/or additions. That is, by monitoring the local file directory, the updated file names are obtained in real time, and the file model information is obtained.

再例如,达到同步时间的情况下,获取文件模型信息的具体方法可以为获取已存储的历史文件模型信息,检测到本地文件发生更新后,获取文件模型信息的具体方法可以为获取已存储的历史文件模型信息,并基于文件更新情况,更新历史文件模型信息。For another example, when the synchronization time is reached, the specific method of obtaining the file model information may be to obtain the stored historical file model information. After detecting that the local file is updated, the specific method of obtaining the file model information may be to obtain the stored historical file model information. File model information, and updates historical file model information based on file update status.

再例如,在一种可选的实现方式中,每台服务器均各自预先构建用于发送文件模型信息的第一发送队列、用于反馈同步校验结果的第二发送队列、用于接收文件模型信息的第一接收队列、用于接收同步校验结果的第二接收队列以及用于发送未同步文件的文件上传队列。For another example, in an optional implementation, each server pre-constructs a first sending queue for sending file model information, a second sending queue for feeding back synchronization verification results, and a second sending queue for receiving file model information. A first receiving queue for information, a second receiving queue for receiving synchronization verification results, and a file upload queue for sending unsynchronized files.

具体地,第一服务器通过第一发送队列,将第一服务器的文件模型信息发送至各个第二服务器。第二服务器通过第一接收队列,接收第一服务器的文件模型信息。第二服务器通过第二发送队列,发送同步校验结果至第一服务器。第一服务器通过第二接收队列,接收各个第二服务器发送的同步校验结果。第一服务器通过文件上传队列发送同步校验结果中的未同步文件至第二服务器。Specifically, the first server sends the file model information of the first server to each second server through the first sending queue. The second server receives the file model information of the first server through the first receiving queue. The second server sends the synchronization verification result to the first server through the second sending queue. The first server receives the synchronization verification results sent by each second server through the second receiving queue. The first server sends the unsynchronized files in the synchronization verification result to the second server through the file upload queue.

可见,各个服务器通过预先构建的队列实现文件模型信息的发送和接收、同步校验结果的发送和接收、以及未同步文件的发送的同步有序进行,有效解决大量文件同步时系统运行不稳定、信息传输缓慢的问题。It can be seen that each server realizes the orderly synchronization of sending and receiving file model information, sending and receiving synchronization verification results, and sending unsynchronized files through pre-built queues, effectively solving the problem of unstable system operation and problems when synchronizing a large number of files. The problem of slow information transfer.

再例如,在一种可选的实施例中,第一服务器通过第一发送队列,将第一服务器的文件模型信息发送至各个第二服务器时,可以通过预设的发送规则,将第一服务器的文件模型信息中的批量数据分批次发送至第二服务器,具体地,第一服务器的文件模型信息包括N条目标文件标识以及目标文件标识的同步状态信息,由于N的数量庞大,第一服务器可以按照预设的时间间隔,每次发送给第二服务器n条目标文件标识以及目标文件标识的同步状态信息,直至将全部的第一服务器的文件模型信息发送至第二服务器。For another example, in an optional embodiment, when the first server sends the file model information of the first server to each second server through the first sending queue, the first server can send the file model information of the first server to each second server through the preset sending rule. The batch data in the file model information is sent to the second server in batches. Specifically, the file model information of the first server includes N target file identifiers and synchronization status information of the target file identifier. Due to the large number of N, the first server The server may send n pieces of target file identification and synchronization status information of the target file identification to the second server at a preset time interval until all the file model information of the first server is sent to the second server.

再例如,在一种可选的实施例中,第一服务器将同步完成信息持久化。同步完成信息包括第一服务器的文件模型信息中的已同步信息,已同步信息包括文件标识、服务器标识以及已同步标识。基于此,第一服务器响应于达到预设的同步周期的同步时间,获取的第一服务器的文件模型信息包括未被持久化的文件模型信息。For another example, in an optional embodiment, the first server persists the synchronization completion information. The synchronization completion information includes synchronized information in the file model information of the first server, and the synchronized information includes a file identifier, a server identifier, and a synchronized identifier. Based on this, in response to reaching the synchronization time of the preset synchronization cycle, the file model information of the first server obtained by the first server includes file model information that has not been persisted.

综上,将本申请实施例提供的一种文件同步方法总结概括为图3所示的流程,如图3所示,本方法具体包括:In summary, a file synchronization method provided by the embodiment of the present application is summarized as a process shown in Figure 3. As shown in Figure 3, this method specifically includes:

S301、第一服务器获取第一服务器的文件模型信息,并将第一服务器的文件模型信息发送至各个第二服务器。S301. The first server obtains the file model information of the first server, and sends the file model information of the first server to each second server.

其中,第一服务器的文件模型信息包括第一文件标识,第一文件标识包括第一服务器的本地文件的文件标识。Wherein, the file model information of the first server includes a first file identification, and the first file identification includes a file identification of a local file of the first server.

S302、第二服务器接收第一服务器的文件模型信息,校验是否已同步各个第一文件标识指示的文件,得到同步校验结果。S302. The second server receives the file model information of the first server, verifies whether the files indicated by each first file identifier have been synchronized, and obtains the synchronization verification result.

其中,同步校验结果包括未同步文件的文件标识。Among them, the synchronization verification result includes the file identifier of the unsynchronized file.

S303、第二服务器发送同步校验结果至第一服务器。S303. The second server sends the synchronization verification result to the first server.

S304、第一服务器接收第二服务器发送的同步校验结果后,发送同步校验结果中的未同步文件至第二服务器。S304. After receiving the synchronization verification result sent by the second server, the first server sends the unsynchronized file in the synchronization verification result to the second server.

由上述技术方案可以看出,本申请实施例提供的一种文件同步方法,第一服务器发送至各个第二服务器的文件模型信息包括第一服务器的本地文件的文件标识,各个第二服务器根据第二服务器的本地文件的文件标识,校验本地文件中是否已同步第一服务器的各个本地文件,并在存在未同步文件的情况下,反馈未同步文件的文件标识至第一服务器,第一服务器能够根据各个第二服务器反馈的未同步文件的文件标识,向各个第二服务器发送对应的未同步文件,第一服务器包括分布式构建的多台服务器中的任一服务器,第二服务器包括多台服务器中除第一服务器以外的任一服务器,可见本申请实现并行地将第一服务器中的本地文件同步至各个其他服务器,提高了文件同步的效率。It can be seen from the above technical solution that in the file synchronization method provided by the embodiment of the present application, the file model information sent by the first server to each second server includes the file identification of the local file of the first server. The file identifier of the local file of the second server verifies whether each local file of the first server has been synchronized in the local file, and if there are unsynchronized files, feeds back the file identifier of the unsynchronized file to the first server. The first server The corresponding unsynchronized file can be sent to each second server according to the file identification of the unsynchronized file fed back by each second server. The first server includes any one of multiple servers constructed in a distributed manner, and the second server includes multiple servers. For any server among the servers except the first server, it can be seen that this application synchronizes local files in the first server to various other servers in parallel, thereby improving the efficiency of file synchronization.

本申请还提供了一种文件同步装置,该装置可应用于分布式构建的多台服务器中的任意一台,图4示出了该文件同步装置的结构示意图,该装置包括:This application also provides a file synchronization device, which can be applied to any one of multiple distributed servers. Figure 4 shows a schematic structural diagram of the file synchronization device. The device includes:

文件信息获取单元401,用于获取所述目标服务器的文件模型信息;其中,所述目标服务器的文件模型信息包括目标文件标识,所述目标文件标识包括所述目标服务器的本地文件的文件标识;The file information obtaining unit 401 is used to obtain the file model information of the target server; wherein the file model information of the target server includes a target file identification, and the target file identification includes a file identification of a local file of the target server;

文件信息发送单元402,用于将所述目标服务器的文件模型信息发送至各个其他服务器,以使所述其他服务器接收所述目标服务器的文件模型信息,校验是否已同步各个所述目标文件标识指示的文件,生成并发送同步校验结果至所述目标服务器;其中,所述其他服务器包括所述多台服务器中除所述目标服务器以外的任一服务器,所述同步校验结果包括未同步文件的文件标识;The file information sending unit 402 is used to send the file model information of the target server to each other server, so that the other servers receive the file model information of the target server and verify whether each target file identifier has been synchronized. The indicated file generates and sends synchronization verification results to the target server; wherein, the other servers include any server among the multiple servers except the target server, and the synchronization verification results include unsynchronized The file identifier of the file;

文件上传单元403,用于接收所述其他服务器发送的所述同步校验结果后,发送所述同步校验结果中的未同步文件至所述其他服务器。The file upload unit 403 is configured to send the unsynchronized files in the synchronization verification result to the other server after receiving the synchronization verification result sent by the other server.

作为示例,本申请还提供了一文件同步方法的应用场景以及具体实施方式,如下:As an example, this application also provides application scenarios and specific implementation methods of a file synchronization method, as follows:

目前,很多项目都存在需要部署分布式服务的场景,而文件服务一般也都是必备的,但是文件服务在分布式的场景中,不得不考虑文件同步问题,因为经常会出现上传文件之后,在另外一台服务器下载不到文件的异常情况,这属于严重的系统缺陷,具体需要克服的技术问题如下:Currently, many projects have scenarios that require the deployment of distributed services, and file services are generally necessary. However, in distributed scenarios, file services have to consider file synchronization issues, because after uploading files, The abnormal situation that the file cannot be downloaded from another server is a serious system defect. The specific technical problems that need to be overcome are as follows:

1、文件同步的实时性。1. Real-time file synchronization.

2.、集成三方框架会造成项目臃肿,破坏项目代码的版本管理。2. Integrating third-party frameworks will cause the project to become bloated and destroy the version management of the project code.

3、减少对已有项目代码的侵入性。3. Reduce the intrusiveness of existing project code.

4、多服务器环境下,文件同步效率较低。4. In a multi-server environment, file synchronization efficiency is low.

5、大量文件下,文件同步的复杂度上升。5. With a large number of files, the complexity of file synchronization increases.

目前常用的文件同步方式包括通过集成第三方框架实现分布式文件存储,但是,集成三方框架不仅造成项目代码臃肿,并且对已有项目代码的改动量较大,进而影响项目代码的版本管理。Currently, commonly used file synchronization methods include integrating third-party frameworks to achieve distributed file storage. However, integrating third-party frameworks not only results in bloated project code, but also requires a large amount of changes to existing project codes, which in turn affects the version management of the project code.

为了克服上述技术问题,本申请提供了一种具体地应用于每个服务器的文件同步装置的结构,包括:In order to overcome the above technical problems, this application provides a structure of a file synchronization device specifically applied to each server, including:

文件模型,用于构建文件模型信息,通过文件模型信息的构建,简化文件参数信息的定义,具体地,散列值为文件名通过md5算法生成的值,大小16个字节,一般来说较文件名占用存储空间小,一定程度上提高文件传输效率,单次网络请求,可以发送更多的文件信息,IP集合和完成标识用于校验文件是否完全同步到每台服务器,也用于同步策略中,向指定服务器发送文件模型信息,或上送文件。File model is used to construct file model information. Through the construction of file model information, the definition of file parameter information is simplified. Specifically, the hash value is the value generated by the md5 algorithm for the file name. The size is 16 bytes. Generally speaking, it is relatively large. The file name occupies a small storage space, which improves file transmission efficiency to a certain extent. More file information can be sent with a single network request. The IP set and completion identifier are used to verify whether the file is completely synchronized to each server and are also used for synchronization. In the policy, send file model information to the specified server or upload files.

文件监听模块,用于监听指定文件目录是否发生文件变化,通过监听模块,实现文件的实时同步。The file monitoring module is used to monitor whether file changes occur in the specified file directory. Through the monitoring module, real-time synchronization of files is achieved.

文件接收模块,用于接收文件。File receiving module, used to receive files.

文件上传模块,用于上传文件。File upload module, used to upload files.

通过文件队列,实现文件同步和接收的有序并行处理,有效应对大量文件同步不稳定、缓慢的问题。Through the file queue, orderly parallel processing of file synchronization and reception is realized, effectively dealing with the problem of unstable and slow synchronization of a large number of files.

文件校验模块,用于更新服务器对应的文件模型信息,校验文件同步完成状态,并将成功信息持久化到本地,通过校验模块,更新服务器对应的文件模型信息,校验文件同步完成状态,并将成功信息持久化本地。The file verification module is used to update the file model information corresponding to the server, verify the file synchronization completion status, and persist the success information locally. Through the verification module, it updates the file model information corresponding to the server and verifies the file synchronization completion status. , and persist the success information locally.

文件同步模块,用于使用文件队列,运用同步策略,实现文件的并行同步处理。通过文件同步模块,多对多的同步策略,多台服务器之间,每台服务器同时向其他服务器批量发送本地文件模型信息,获取比对结果,后续由校验模块、同步模块处理,实现文件同步。如果多台服务器之间按照串行的顺序进行同步,效率会大大降低,多台服务器并行工作,减少空闲时间,提升效率。同步模块在程序启动后会进行初始化文件同步,也有定时同步策略,保证了在系统异常的情况下,仍能完全同步。The file synchronization module is used to use file queues and synchronization strategies to achieve parallel synchronization processing of files. Through the file synchronization module and the many-to-many synchronization strategy, between multiple servers, each server sends local file model information in batches to other servers at the same time to obtain the comparison results, which are subsequently processed by the verification module and synchronization module to achieve file synchronization. . If multiple servers are synchronized in a serial order, the efficiency will be greatly reduced. Multiple servers work in parallel, reducing idle time and improving efficiency. The synchronization module will perform initial file synchronization after the program is started, and also has a scheduled synchronization strategy to ensure complete synchronization in the event of system abnormalities.

其中,各个模块相互独立,又一一衔接,保证分布式系统文件的全量高效同步。已有项目作为单独模块集成,零侵入性,不涉及修改任务原有代码。Among them, each module is independent of each other and connected one by one to ensure full and efficient synchronization of distributed system files. Existing projects are integrated as separate modules, with zero intrusion and no modification of the original code of the task.

综上,本方案至少具备以下技术效果:To sum up, this solution has at least the following technical effects:

1.实现文件模型定义,规范化定义:散列值、服务器IP和完成标识集合,有利于数据批量传输,优化代码逻辑处理。1. Implement file model definition and standardized definition: hash value, server IP and completion identification set, which is conducive to data batch transmission and optimizes code logic processing.

2.实现文件队列,实现文件有序发送和接收,对于大量多文件的场景,通过设置队列阈值,也能够很好的处理。2. Implement file queues to achieve orderly sending and receiving of files. For scenarios with a large number of files, setting the queue threshold can also be well handled.

3.实现文件同步策略,采用多对多的同步策略,要求多个服务器之间同时进行数据交互。3. Implement the file synchronization strategy and adopt a many-to-many synchronization strategy, which requires simultaneous data interaction between multiple servers.

4.文件校验,用于更新服务器对应的文件模型信息,校验文件同步完成状态,并将成功信息持久化本地。4. File verification, used to update the file model information corresponding to the server, verify the file synchronization completion status, and persist the successful information locally.

本申请实施例还提供一种可读存储介质,该可读存储介质可存储有适于处理器执行的计算机程序,计算机程序被处理器执行时,实现本申请实施例提供的一种文件同步方法的各个步骤,如下:Embodiments of the present application also provide a readable storage medium that can store a computer program suitable for execution by a processor. When the computer program is executed by the processor, a file synchronization method provided by an embodiment of the present application is implemented. The various steps are as follows:

第一服务器获取所述第一服务器的文件模型信息,并将所述第一服务器的文件模型信息发送至各个第二服务器;其中,所述第一服务器的文件模型信息包括第一文件标识,所述第一文件标识包括所述第一服务器的本地文件的文件标识,所述第一服务器包括所述多台服务器中的任一服务器,所述第二服务器包括所述多台服务器中除所述第一服务器以外的任一服务器;The first server obtains the file model information of the first server and sends the file model information of the first server to each second server; wherein the file model information of the first server includes a first file identifier, so The first file identification includes the file identification of the local file of the first server, the first server includes any one of the multiple servers, and the second server includes the multiple servers except the Any server other than the first server;

所述第二服务器接收所述第一服务器的文件模型信息,校验是否已同步各个所述第一文件标识指示的文件,得到同步校验结果,所述同步校验结果包括未同步文件的文件标识;The second server receives the file model information of the first server, verifies whether each file indicated by the first file identifier has been synchronized, and obtains a synchronization verification result. The synchronization verification result includes files of unsynchronized files. logo;

所述第二服务器发送所述同步校验结果至所述第一服务器;The second server sends the synchronization verification result to the first server;

所述第一服务器接收所述第二服务器发送的所述同步校验结果后,发送所述同步校验结果中的未同步文件至所述第二服务器。After receiving the synchronization verification result sent by the second server, the first server sends the unsynchronized files in the synchronization verification result to the second server.

需要说明的是,本发明提供的一种文件同步方法、系统、装置及可读存储介质可用于分布式领域或金融领域。上述仅为示例,并不对本发明提供的一种文件同步方法、系统、装置及可读存储介质的应用领域进行限定。It should be noted that the file synchronization method, system, device and readable storage medium provided by the present invention can be used in the distributed field or the financial field. The above are only examples and do not limit the application fields of the file synchronization method, system, device and readable storage medium provided by the present invention.

最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。Finally, 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 these entities or any such actual relationship or sequence between operations. Furthermore, the terms "comprises," "comprises," or any other variations thereof are intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus that includes a list of elements includes not only those elements, but also those not expressly listed other elements, or elements inherent to the process, method, article or equipment. Without further limitation, an element defined by the statement "comprises a..." does not exclude the presence of additional identical elements in a process, method, article, or apparatus that includes the stated element.

本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。Each embodiment in this specification is described in a progressive manner. Each embodiment focuses on its differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other.

对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本申请。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本申请的精神或范围的情况下,在其它实施例中实现。因此,本申请将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be practiced in other embodiments without departing from the spirit or scope of the application. Therefore, the present application is not to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1.一种文件同步方法,其特征在于,应用于分布式系统,所述分布式系统包括分布式构建的多台服务器,所述方法包括:1. A file synchronization method, characterized in that it is applied to a distributed system, the distributed system includes multiple servers constructed in a distributed manner, and the method includes: 第一服务器获取所述第一服务器的文件模型信息,并将所述第一服务器的文件模型信息发送至各个第二服务器;其中,所述第一服务器的文件模型信息包括第一文件标识,所述第一文件标识包括所述第一服务器的本地文件的文件标识,所述第一服务器包括所述多台服务器中的任一服务器,所述第二服务器包括所述多台服务器中除所述第一服务器以外的任一服务器;The first server obtains the file model information of the first server and sends the file model information of the first server to each second server; wherein the file model information of the first server includes a first file identifier, so The first file identification includes the file identification of the local file of the first server, the first server includes any one of the multiple servers, and the second server includes the multiple servers except the Any server other than the first server; 所述第二服务器接收所述第一服务器的文件模型信息,校验是否已同步各个所述第一文件标识指示的文件,得到同步校验结果,所述同步校验结果包括未同步文件的文件标识;The second server receives the file model information of the first server, verifies whether each file indicated by the first file identifier has been synchronized, and obtains a synchronization verification result. The synchronization verification result includes files of unsynchronized files. logo; 所述第二服务器发送所述同步校验结果至所述第一服务器;The second server sends the synchronization verification result to the first server; 所述第一服务器接收所述第二服务器发送的所述同步校验结果后,发送所述同步校验结果中的未同步文件至所述第二服务器。After receiving the synchronization verification result sent by the second server, the first server sends the unsynchronized files in the synchronization verification result to the second server. 2.根据权利要求1所述的方法,其特征在于,所述第一服务器获取所述第一服务器的文件模型信息,包括:2. The method according to claim 1, wherein the first server obtains the file model information of the first server, including: 所述第一服务器响应于达到预设的同步时机,获取所述第一服务器的文件模型信息;The first server acquires the file model information of the first server in response to reaching a preset synchronization opportunity; 其中,所述达到预设的同步时机包括:达到预设的同步周期的同步时间,和/或,检测到本地文件发生更新,所述更新包括删除和/或新增。Wherein, reaching the preset synchronization timing includes: reaching the synchronization time of the preset synchronization cycle, and/or detecting an update of the local file, and the update includes deletion and/or addition. 3.根据权利要求1所述的方法,其特征在于,所述第一服务器获取所述第一服务器的文件模型信息,包括:3. The method according to claim 1, wherein the first server obtains the file model information of the first server, including: 所述第一服务器获取各个第一文件的文件名称,所述第一文件包括所述第一服务器的本地文件;The first server obtains the file name of each first file, and the first file includes a local file of the first server; 所述第一服务器通过预设的信息摘要算法生成各个所述第一文件的文件名称的散列值,作为各个所述第一文件的文件标识,得到所述第一服务器的文件模型信息。The first server uses a preset information digest algorithm to generate a hash value of the file name of each first file as a file identifier of each first file to obtain the file model information of the first server. 4.根据权利要求1所述的方法,其特征在于,所述第二服务器接收所述第一服务器的文件模型信息,校验是否已同步各个所述第一文件标识指示的文件,得到同步校验结果,包括:4. The method according to claim 1, characterized in that the second server receives the file model information of the first server, verifies whether the files indicated by each of the first file identifiers have been synchronized, and obtains the synchronized calibration. Test results include: 所述第二服务器获取所述第二服务器的文件模型信息,所述第二服务器的文件模型信息包括第二文件标识,所述第二文件标识包括所述第二服务器的本地文件的文件标识;The second server obtains the file model information of the second server, the file model information of the second server includes a second file identifier, and the second file identifier includes a file identifier of a local file of the second server; 所述第二服务器基于所述第二服务器的文件模型信息和所述第一服务器的文件模型信息,获取满足第一预设条件的文件标识作为所述未同步文件的文件标识,所述第一预设条件包括:存在于所述第一服务器的文件模型信息中,且不存在于所述第二服务器的文件模型信息中;The second server obtains a file identifier that satisfies the first preset condition as the file identifier of the unsynchronized file based on the file model information of the second server and the file model information of the first server. The preset conditions include: existing in the file model information of the first server and not existing in the file model information of the second server; 所述第二服务器生成所述同步校验结果,所述同步校验结果包括各个所述未同步文件的文件标识。The second server generates the synchronization verification result, and the synchronization verification result includes the file identification of each of the unsynchronized files. 5.根据权利要求4所述的方法,其特征在于,目标服务器的文件模型信息还包括各个文件标识的同步状态信息,所述同步状态信息包括服务器标识和对应的同步状态标识,所述服务器标识对应的同步状态标识用于指示所述服务器标识指代的服务器是否已同步文件标识指代的文件,所述目标服务器包括第一服务器和第二服务器;5. The method according to claim 4, characterized in that the file model information of the target server also includes synchronization status information of each file identification, and the synchronization status information includes a server identification and a corresponding synchronization status identification, and the server identification The corresponding synchronization status identifier is used to indicate whether the server referred to by the server identifier has synchronized the file referred to by the file identifier, and the target server includes a first server and a second server; 在所述第二服务器获取所述第二服务器的文件模型信息后,所述方法还包括:After the second server obtains the file model information of the second server, the method further includes: 所述第二服务器基于所述第二服务器的文件模型信息和所述第一服务器的文件模型信息,获取满足第二预设条件的文件标识作为差异同步文件的文件标识,所述第二预设条件包括:存在于所述第二服务器的文件模型信息中,且在所述第一服务器的文件模型信息中,所述第二服务器的服务器标识对应的同步状态标识为未同步;Based on the file model information of the second server and the file model information of the first server, the second server obtains a file identifier that satisfies a second preset condition as the file identifier of the differential synchronization file. The second preset The conditions include: existing in the file model information of the second server, and in the file model information of the first server, the synchronization status identifier corresponding to the server identifier of the second server is unsynchronized; 所述同步校验结果还包括各个所述差异同步文件的文件标识。The synchronization verification result also includes the file identification of each differential synchronization file. 6.根据权利要求5所述的方法,其特征在于,所述第一服务器发送所述同步校验结果中的未同步文件至所述第二服务器,包括:6. The method of claim 5, wherein the first server sends the unsynchronized files in the synchronization verification result to the second server, including: 若所述同步校验结果包括所述未同步文件的文件标识,所述第一服务器发送所述未同步文件至所述第二服务器,并将所述未同步文件的文件标识的同步状态信息中,所述第二服务器的标识对应的同步状态标识更新为已同步;If the synchronization verification result includes the file identifier of the unsynchronized file, the first server sends the unsynchronized file to the second server, and adds the file identifier of the unsynchronized file to the synchronization status information. , the synchronization status identifier corresponding to the identifier of the second server is updated to synchronized; 所述方法还包括:The method also includes: 若所述同步校验结果包括所述差异同步文件的文件标识,所述第一服务器将所述差异同步文件的文件标识的同步状态信息中,所述第二服务器的标识对应的同步状态标识更新为已同步。If the synchronization verification result includes the file identification of the differential synchronization file, the first server updates the synchronization status identification corresponding to the identification of the second server in the synchronization status information of the file identification of the differential synchronization file. is synchronized. 7.根据权利要求1所述的方法,其特征在于,所述多台服务器中每台服务器均各自预先构建第一发送队列、第二发送队列、第一接收队列、第二接收队列以及文件上传队列;7. The method according to claim 1, characterized in that each of the plurality of servers has a first sending queue, a second sending queue, a first receiving queue, a second receiving queue and a file upload in advance. queue; 所述第一服务器将所述第一服务器的文件模型信息发送至各个第二服务器,包括:The first server sends the file model information of the first server to each second server, including: 所述第一服务器通过第一发送队列,将所述第一服务器的文件模型信息发送至各个所述第二服务器;The first server sends the file model information of the first server to each of the second servers through the first sending queue; 所述第二服务器接收所述第一服务器的文件模型信息,包括:The second server receives the file model information of the first server, including: 所述第二服务器通过第一接收队列,接收所述第一服务器的文件模型信息;The second server receives the file model information of the first server through the first receiving queue; 所述第二服务器发送同步校验结果至所述第一服务器,包括:The second server sends the synchronization verification result to the first server, including: 所述第二服务器通过第二发送队列,发送所述同步校验结果至所述第一服务器;The second server sends the synchronization verification result to the first server through the second sending queue; 所述第一服务器接收所述第二服务器发送的所述同步校验结果,包括:The first server receives the synchronization verification result sent by the second server, including: 所述第一服务器通过第二接收队列,接收各个所述第二服务器发送的所述同步校验结果;The first server receives the synchronization verification results sent by each of the second servers through the second receiving queue; 所述第一服务器发送所述同步校验结果中的未同步文件至所述第二服务器,包括:The first server sends the unsynchronized files in the synchronization verification result to the second server, including: 所述第一服务器通过文件上传队列发送所述同步校验结果中的未同步文件至所述第二服务器。The first server sends the unsynchronized files in the synchronization verification result to the second server through the file upload queue. 8.一种文件同步系统,其特征在于,包括分布式构建的多台服务器;其中,目标服务器用于:8. A file synchronization system, characterized by including multiple servers constructed in a distributed manner; wherein the target server is used for: 获取所述目标服务器的文件模型信息;其中,所述目标服务器的文件模型信息包括目标文件标识,所述目标文件标识包括所述目标服务器的本地文件的文件标识,所述目标服务器包括所述多台服务器中的任一服务器;Obtain the file model information of the target server; wherein the file model information of the target server includes a target file identification, the target file identification includes a file identification of a local file of the target server, and the target server includes the multiple any server among the servers; 将所述目标服务器的文件模型信息发送至各个其他服务器,以使所述其他服务器接收所述目标服务器的文件模型信息,校验是否已同步各个所述目标文件标识指示的文件,得到同步校验结果,发送所述同步校验结果至所述目标服务器;其中,所述其他服务器包括所述多台服务器中除所述目标服务器以外的任一服务器,所述同步校验结果包括未同步文件的文件标识;Send the file model information of the target server to each other server, so that the other servers receive the file model information of the target server, verify whether the files indicated by each target file identifier have been synchronized, and obtain synchronization verification As a result, the synchronization verification result is sent to the target server; wherein the other servers include any server among the multiple servers except the target server, and the synchronization verification result includes the unsynchronized file. File identification; 接收所述其他服务器发送的所述同步校验结果后,发送所述同步校验结果中的未同步文件至所述其他服务器。After receiving the synchronization verification result sent by the other server, the unsynchronized files in the synchronization verification result are sent to the other server. 9.一种文件同步装置,其特征在于,应用于分布式系统中的目标服务器,所述分布式系统包括分布式构建的多台服务器,所述目标服务器包括所述多台服务器中的任一服务器;所述装置包括:9. A file synchronization device, characterized in that it is applied to a target server in a distributed system, the distributed system includes multiple servers constructed in a distributed manner, and the target server includes any one of the multiple servers. Server; the device includes: 文件信息获取单元,用于获取所述目标服务器的文件模型信息;其中,所述目标服务器的文件模型信息包括目标文件标识,所述目标文件标识包括所述目标服务器的本地文件的文件标识;A file information acquisition unit configured to acquire file model information of the target server; wherein the file model information of the target server includes a target file identifier, and the target file identifier includes a file identifier of a local file of the target server; 文件信息发送单元,用于将所述目标服务器的文件模型信息发送至各个其他服务器,以使所述其他服务器接收所述目标服务器的文件模型信息,校验是否已同步各个所述目标文件标识指示的文件,生成并发送同步校验结果至所述目标服务器;其中,所述其他服务器包括所述多台服务器中除所述目标服务器以外的任一服务器,所述同步校验结果包括未同步文件的文件标识;The file information sending unit is used to send the file model information of the target server to each other server, so that the other servers receive the file model information of the target server and verify whether each target file identification indication has been synchronized. files, generate and send synchronization verification results to the target server; wherein the other servers include any server among the multiple servers except the target server, and the synchronization verification results include unsynchronized files file identification; 文件上传单元,用于接收所述其他服务器发送的所述同步校验结果后,发送所述同步校验结果中的未同步文件至所述其他服务器。The file uploading unit is configured to send the unsynchronized files in the synchronization verification results to the other servers after receiving the synchronization verification results sent by the other servers. 10.一种可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时,实现如权利要求1~7中任一项所述的文件同步方法的各个步骤。10. A readable storage medium with a computer program stored thereon, characterized in that when the computer program is executed by a processor, each step of the file synchronization method as claimed in any one of claims 1 to 7 is implemented. .
CN202310807296.7A 2023-07-03 2023-07-03 A file synchronization method, system, device and readable storage medium Pending CN116756108A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310807296.7A CN116756108A (en) 2023-07-03 2023-07-03 A file synchronization method, system, device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310807296.7A CN116756108A (en) 2023-07-03 2023-07-03 A file synchronization method, system, device and readable storage medium

Publications (1)

Publication Number Publication Date
CN116756108A true CN116756108A (en) 2023-09-15

Family

ID=87947795

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310807296.7A Pending CN116756108A (en) 2023-07-03 2023-07-03 A file synchronization method, system, device and readable storage medium

Country Status (1)

Country Link
CN (1) CN116756108A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117827779A (en) * 2023-12-13 2024-04-05 北京度友信息技术有限公司 File synchronization result verification method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108337303A (en) * 2018-01-24 2018-07-27 中国银联股份有限公司 A kind of method of data synchronization and distributed system
CN110071964A (en) * 2019-03-26 2019-07-30 罗克佳华科技集团股份有限公司 File synchronisation method, device, file sharing network, file are total to system and storage medium
CN110865987A (en) * 2019-11-18 2020-03-06 杭州安恒信息技术股份有限公司 File synchronization method, device, equipment and medium
CN115277681A (en) * 2022-07-29 2022-11-01 山石网科通信技术股份有限公司 File synchronization method and device for avoiding synchronization process conflict

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108337303A (en) * 2018-01-24 2018-07-27 中国银联股份有限公司 A kind of method of data synchronization and distributed system
CN110071964A (en) * 2019-03-26 2019-07-30 罗克佳华科技集团股份有限公司 File synchronisation method, device, file sharing network, file are total to system and storage medium
CN110865987A (en) * 2019-11-18 2020-03-06 杭州安恒信息技术股份有限公司 File synchronization method, device, equipment and medium
CN115277681A (en) * 2022-07-29 2022-11-01 山石网科通信技术股份有限公司 File synchronization method and device for avoiding synchronization process conflict

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117827779A (en) * 2023-12-13 2024-04-05 北京度友信息技术有限公司 File synchronization result verification method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN107465767B (en) Data synchronization method and system
CN107729366B (en) Universal multi-source heterogeneous large-scale data synchronization system
CN108600029B (en) A configuration file updating method, device, terminal device and storage medium
US11385830B2 (en) Data storage method, apparatus and system, and server, control node and medium
CA2896865C (en) Method and system for using a recursive event listener on a node in hierarchical data structure
CN113761001B (en) A cross-system data synchronization method and device
WO2017181872A1 (en) Data processing system and method
CN112035472B (en) Data processing method, device, computer equipment and storage medium
CN107231435B (en) Data synchronization monitoring method and system
WO2017107984A1 (en) Data recovery method and device
WO2020232892A1 (en) Method and apparatus for key management for blockchain, device, and storage medium
CN114900449A (en) Resource information management method, system and device
CN116756108A (en) A file synchronization method, system, device and readable storage medium
CN116662035A (en) Method and device for processing transaction message of message queue
CN105933379A (en) Business processing method, device and system
CN113094211B (en) Backup data processing method and device
CN113742376B (en) A method for synchronizing data, a first server, and a system for synchronizing data
CN111708835B (en) Blockchain data storage method and device
CN115905116A (en) File directory operation method and device
CN112732728A (en) Data synchronization method and system
CN112463889B (en) Blockchain data storage method, device, equipment and medium
CN108206823A (en) A kind of method and the network equipment for handling message
CN115550222B (en) Method, system, terminal and storage medium for detecting abnormal state of equipment
CN115630120B (en) Data synchronization method, device, equipment and storage medium
CN111382060A (en) File release record processing method, electronic device and computer storage medium

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