[go: up one dir, main page]

CN104506643A - Server of distributed storage system and data synchronizing method between servers - Google Patents

Server of distributed storage system and data synchronizing method between servers Download PDF

Info

Publication number
CN104506643A
CN104506643A CN201410843521.3A CN201410843521A CN104506643A CN 104506643 A CN104506643 A CN 104506643A CN 201410843521 A CN201410843521 A CN 201410843521A CN 104506643 A CN104506643 A CN 104506643A
Authority
CN
China
Prior art keywords
server
data
request
daily record
update
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
CN201410843521.3A
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.)
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing 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 Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201410843521.3A priority Critical patent/CN104506643A/en
Publication of CN104506643A publication Critical patent/CN104506643A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明实施例提供了分布式存储系统的服务器及服务器之间的数据同步方法,所述方法包括:第一服务器接收到数据更新请求,查找与数据更新请求中的关键字信息相对应的数据分片;根据数据更新请求中的更新数据,更新数据分片;若检测到设置有与数据分片名称相同的其他数据分片的第二服务器离线,将更新数据的更新操作记录到第一服务器的第一日志中,其中,第一服务器与第二服务器中均设置有相同名称的数据分片;响应于第二服务器发送的日志同步请求,向第二服务器返回第一日志。本发明的技术方案中,第二服务器只需根据第一日志进行数据同步,大大提高了数据同步效率,服务器可以尽快为用户提供数据服务,可以减少服务器离线导致的用户等待时间。

An embodiment of the present invention provides a server of a distributed storage system and a method for synchronizing data between servers. The method includes: the first server receives a data update request, and searches for the data component corresponding to the keyword information in the data update request. According to the update data in the data update request, the data fragment is updated; if it is detected that the second server with other data fragments with the same name as the data fragment is offline, the update operation of the updated data is recorded in the first server's In the first log, the first server and the second server both have data fragments with the same name; in response to the log synchronization request sent by the second server, return the first log to the second server. In the technical solution of the present invention, the second server only needs to perform data synchronization according to the first log, which greatly improves the efficiency of data synchronization, the server can provide data services to users as soon as possible, and the user waiting time caused by the server being offline can be reduced.

Description

分布式存储系统的服务器及服务器之间的数据同步方法Server of distributed storage system and data synchronization method between servers

技术领域technical field

本发明涉及分布式存储服务器端的技术领域,具体而言,本发明涉及一种分布式存储系统的服务器及服务器之间的数据同步方法。The present invention relates to the technical field of distributed storage servers, in particular, the present invention relates to a server of a distributed storage system and a method for synchronizing data between servers.

背景技术Background technique

随着大数据时代的来临,基于互联网或者基于通信网络的服务提供者需要存储海量的数据,以支持其运营,同时,服务提供者通过对海量数据的分析,可向用户提供更便利且更具有个性化的服务,从而达到提高其服务水平的目的。With the advent of the era of big data, service providers based on the Internet or communication networks need to store massive amounts of data to support their operations. At the same time, service providers can provide users with more convenient and Personalized service, so as to achieve the purpose of improving its service level.

目前,通常由分布式存储系统来存储海量的数据。例如,技术人员将服务器集群分散布置,将海量的数据按照某些规则分散存储在不同的服务器中;这些服务器通常可以根据用户的请求,为用户提供数据查询、数据更新等服务。为了提高数据的安全性和可靠性,分布式存储系统通常还设置有一定数量的备份服务器,以用于备份数据。At present, massive amounts of data are usually stored by distributed storage systems. For example, technicians distribute server clusters and store massive data in different servers according to certain rules; these servers can usually provide users with services such as data query and data update according to user requests. In order to improve data security and reliability, a distributed storage system is usually provided with a certain number of backup servers for backing up data.

然而,现有的分布式存储系统的数据同步方法中,备份服务器通常不向用户提供服务,而只是依据规定的时间间隔,将当前服务器的硬盘中的数据复制到备份服务器中;当当前服务器发生故障重启后,通常是将整个备份服务器中的数据都传输恢复到当前服务器中,传输的数据较多,导致数据恢复所花费的时间较长。也就是说,当前服务器从发生故障到设备恢复的时间间隔内,都无法响应涉及当前服务器中任何数据操作请求,这样会导致用户请求服务后的等待时间较长,降低了用户体验。此外,现有的数据同步方法也容易导致服务器与备份服务器所在的局域网网络堵塞,影响其他服务器或者备份服务器的正常运行。However, in the existing data synchronization methods of distributed storage systems, the backup server usually does not provide services to users, but only copies the data in the hard disk of the current server to the backup server according to the specified time interval; After a fault restarts, the data in the entire backup server is usually transferred and restored to the current server, and more data is transferred, resulting in a longer time for data restoration. That is to say, the current server cannot respond to any data operation request related to the current server during the time interval from the failure to the device recovery, which will cause the user to wait for a long time after requesting the service and reduce the user experience. In addition, the existing data synchronization method is also likely to cause congestion of the local area network where the server and the backup server are located, affecting the normal operation of other servers or the backup server.

因此,现有的分布式存储系统的数据同步方法具有数据同步耗时较长且花费较高网络资源的缺陷,进一步地,会产生不能及时响应用户的请求的情况发生,导致用户长时间的等待,降低用户的体验。Therefore, the existing data synchronization methods of distributed storage systems have the defects that data synchronization takes a long time and consumes high network resources. Further, it may not be able to respond to user requests in time, causing users to wait for a long time , reducing the user experience.

发明内容Contents of the invention

本发明针对现有的分布式存储系统的数据同步方法的缺点,提出一种分布式存储系统的服务器及服务器之间的数据同步方法,用以解决现有的数字同步方法存在的效率较低的问题。Aiming at the shortcomings of the existing data synchronization method of the distributed storage system, the present invention proposes a data synchronization method between the servers of the distributed storage system and the servers to solve the problem of low efficiency existing in the existing digital synchronization method question.

本发明的技术方案根据一个方面,提供了一种分布式存储系统中第一服务器端的数据同步方法,包括:According to one aspect, the technical solution of the present invention provides a data synchronization method for a first server in a distributed storage system, including:

第一服务器接收到数据更新请求,查找与所述数据更新请求中的关键字信息相对应的数据分片;The first server receives the data update request, and searches for data fragments corresponding to the keyword information in the data update request;

根据所述数据更新请求中的更新数据,更新所述数据分片;update the data fragments according to the update data in the data update request;

若检测到设置有与所述数据分片名称相同的其他数据分片的第二服务器离线,将所述更新数据的更新操作记录到所述第一服务器的第一日志中,其中,所述第一服务器与第二服务器互为兄弟服务器,其中均设置有相同名称的数据分片;If it is detected that the second server configured with other data fragments with the same name as the data fragment is offline, the update operation of the updated data is recorded in the first log of the first server, wherein the second The first server and the second server are sibling servers, both of which have data fragments with the same name;

响应于所述第二服务器发送的日志同步请求,向第二服务器返回第一日志。In response to the log synchronization request sent by the second server, return the first log to the second server.

进一步,所述向第二服务器返回第一日志之后,还包括:Further, after returning the first log to the second server, it also includes:

接收第二服务器发送的数据同步请求,从中解析出关键字信息;receiving the data synchronization request sent by the second server, and parsing the keyword information;

查找本地与解析出的关键字信息相应的数据分片;Find the local data fragment corresponding to the parsed keyword information;

将查找到的数据分片中的数据返回至第二服务器。Return the found data in the data fragments to the second server.

较佳地,所述第一服务器接收到数据更新请求,具体包括:Preferably, the first server receives a data update request, which specifically includes:

所述第一服务器预先创建的主控制进程接收多个客户端发送的数据更新请求;The master control process pre-created by the first server receives data update requests sent by multiple clients;

基于接收到的每个数据更新请求,生成该数据更新请求的工作信道;Based on each data update request received, generate a working channel for the data update request;

所述主控制进程将接收的数据更新请求及相应的工作信道,均匀分配给所述第一服务器预先创建的多个工作进程;The main control process evenly distributes the received data update requests and corresponding working channels to multiple working processes pre-created by the first server;

所述工作进程根据分配到的数据更新请求中的关键字信息,查找对应的数据分片。The working process searches for corresponding data fragments according to the keyword information in the assigned data update request.

较佳地,所述主控制进程接收多个客户端发送的数据更新请求,具体包括:Preferably, the main control process receives data update requests sent by multiple clients, specifically including:

所述主控制进程利用HTTP协议监听网络端口;The main control process utilizes the HTTP protocol to monitor the network port;

利用HTTP协议转换监听到的数据更新请求的格式,将转换格式后的数据更新请求作为接收到的数据更新请求。The HTTP protocol is used to convert the format of the monitored data update request, and the converted data update request is used as the received data update request.

本发明的技术方案根据另一个方面,还提供了一种分布式存储系统中第二服务器端的数据同步方法,包括:According to another aspect, the technical solution of the present invention also provides a second server-side data synchronization method in a distributed storage system, including:

向第一服务器发送日志同步请求;Send a log synchronization request to the first server;

根据接收到的所述第一服务器返回的第一日志,进行数据同步操作,其中,所述第一服务器与第二服务器互为兄弟服务器,其中均设置有相同名称的数据分片。According to the received first log returned by the first server, a data synchronization operation is performed, wherein the first server and the second server are sibling servers, and data fragments with the same name are both set therein.

较佳地,向第一服务器发送日志同步请求,包括:Preferably, a log synchronization request is sent to the first server, including:

当所述第二服务器在上线状态下,周期性向第一服务器发送日志同步请求;或When the second server is online, periodically sending a log synchronization request to the first server; or

当所述第二服务器从离线状态变更至在线状态时,向第一服务器发送日志同步请求。When the second server changes from an offline state to an online state, a log synchronization request is sent to the first server.

较佳地,根据接收到的所述第一服务器返回的第一日志,进行数据同步操作,具体包括:Preferably, the data synchronization operation is performed according to the received first log returned by the first server, which specifically includes:

将接收到的第一服务器返回的第一日志与本地第二日志相比较,以确定更新操作列表;Comparing the received first log returned by the first server with the local second log to determine an update operation list;

根据所述更新操作列表,更新本地相应的数据分片。According to the update operation list, update the corresponding local data fragments.

较佳地,所述更新操作列表中具体包括多个更新数据的更新操作;以及Preferably, the update operation list specifically includes a plurality of update operations for updating data; and

根据所述更新操作列表,更新本地相应的数据分片,具体包括:According to the update operation list, update the corresponding local data fragments, specifically including:

依照多个更新操作在所述更新操作列表中的时间顺序,依次对本地相应的数据分片进行更新。According to the chronological sequence of multiple update operations in the update operation list, the corresponding local data fragments are updated sequentially.

较佳地,根据一个更新操作,对本地相应的数据分片进行更新,具体包括:Preferably, according to an update operation, update the corresponding local data fragments, specifically including:

基于所述第一日志,确定与该更新操作对应记录的关键字信息;Based on the first log, determine keyword information recorded corresponding to the update operation;

将确定出的关键字信息携带于数据同步请求中发送至所述第一服务器;carrying the determined keyword information in the data synchronization request and sending it to the first server;

查找本地与所述关键字信息相应的数据分片;Finding local data fragments corresponding to the keyword information;

根据接收到的所述第一服务器返回的数据,更新查找到的本地的数据分片。Update the found local data fragments according to the received data returned by the first server.

本发明的技术方案根据另一个方面,还提供了一种分布式存储系统中的第一服务器,包括:According to another aspect of the technical solution of the present invention, a first server in a distributed storage system is also provided, including:

数据分片确定模块,用于接收到数据更新请求,查找与所述数据更新请求中的关键字信息相对应的数据分片;A data fragment determination module, configured to receive a data update request, and search for data fragments corresponding to the keyword information in the data update request;

数据更新模块,用于根据所述数据更新请求中的更新数据,更新所述数据分片;A data update module, configured to update the data fragments according to the update data in the data update request;

更新操作记录模块,用于若检测到设置有与所述数据分片名称相同的其他数据分片的第二服务器离线,将所述更新数据的更新操作记录到所述第一服务器的第一日志中,其中,所述第一服务器与第二服务器互为兄弟服务器,其均设置有相同名称的数据分片;An update operation recording module, configured to record the update operation of the update data in the first log of the first server if it is detected that the second server configured with other data fragments with the same name as the data fragment is offline In, wherein, the first server and the second server are sibling servers, both of which are provided with data fragments with the same name;

同步请求响应模块,用于响应于所述第二服务器发送的日志同步请求,向第二服务器返回第一日志。A synchronization request response module, configured to return the first log to the second server in response to the log synchronization request sent by the second server.

进一步,同步请求响应模块还用于接收第二服务器发送的数据同步请求,从中解析出关键字信息;查找本地与解析出的关键字信息相应的数据分片;将查找到的数据分片中的数据返回至第二服务器。Further, the synchronization request response module is also used for receiving the data synchronization request sent by the second server, and analyzing the keyword information therefrom; searching for local data fragments corresponding to the parsed keyword information; The data is returned to the second server.

较佳地,所述数据分片确定模块具体包括:Preferably, the data fragmentation determining module specifically includes:

数据更新请求接收单元,用于由预先创建的主控制进程接收多个客户端发送的数据更新请求;基于接收到的每个数据更新请求,生成该数据更新请求的工作信道;所述主控制进程将接收的数据更新请求及相应的工作信道,均匀分配给所述第一服务器预先创建的多个工作进程;The data update request receiving unit is used to receive the data update requests sent by multiple clients by the pre-created main control process; based on each data update request received, generate the working channel of the data update request; the main control process Evenly distribute the received data update request and the corresponding working channel to multiple working processes pre-created by the first server;

数据分片确定单元,用于由所述工作进程根据分配到的数据更新请求中的关键字信息,查找对应的数据分片。The data fragment determination unit is configured to use the working process to search for corresponding data fragments according to the assigned keyword information in the data update request.

较佳地,所述数据更新请求接收单元具体用于由所述主控制进程利用HTTP协议监听网络端口;利用HTTP协议转换监听到的数据更新请求的格式,将转换格式后的数据更新请求作为接收到的数据更新请求。Preferably, the data update request receiving unit is specifically configured to monitor the network port by the main control process using the HTTP protocol; use the HTTP protocol to convert the format of the monitored data update request, and receive the converted data update request as received data update requests.

本发明的技术方案根据另一个方面,还提供了一种分布式存储系统中的第二服务器,包括:According to another aspect of the technical solution of the present invention, a second server in a distributed storage system is also provided, including:

同步请求发送模块,用于向第一服务器发送日志同步请求;A synchronization request sending module, configured to send a log synchronization request to the first server;

数据同步模块,用于根据接收到的所述第一服务器返回的第一日志,进行数据同步操作;其中,所述第一服务器与第二服务器互为兄弟服务器,其均设置有相同名称的数据分片。A data synchronization module, configured to perform a data synchronization operation according to the received first log returned by the first server; wherein, the first server and the second server are sibling servers to each other, and both of them are provided with data with the same name Fragmentation.

较佳地,同步请求发送模块具体用于当所述第二服务器在上线状态下,周期性向第一服务器发送日志同步请求;或者当所述第二服务器从离线状态变更至在线状态时,向第一服务器发送日志同步请求。Preferably, the synchronization request sending module is specifically configured to periodically send a log synchronization request to the first server when the second server is in an online state; or send a log synchronization request to the first server when the second server changes from an offline state to an online state. A server sends a log synchronization request.

较佳地,所述数据同步模块具体包括:Preferably, the data synchronization module specifically includes:

更新操作列表确定单元,用于将接收到的第一服务器返回的第一日志与本地第二日志相比较,以确定更新操作列表;An update operation list determining unit, configured to compare the received first log returned by the first server with the local second log to determine an update operation list;

数据更新单元,用于根据所述更新操作列表,更新本地相应的数据分片。A data update unit, configured to update the corresponding local data fragments according to the update operation list.

较佳地,所述更新操作列表中具体包括多个更新数据的更新操作;以及Preferably, the update operation list specifically includes a plurality of update operations for updating data; and

所述数据更新单元具体用于依照多个更新操作在所述更新操作列表中的时间顺序,依次对本地相应的数据分片进行更新。The data update unit is specifically configured to sequentially update corresponding local data fragments according to the time sequence of multiple update operations in the update operation list.

较佳地,所述数据更新单元进一步用于基于所述第一日志,确定与该更新操作对应记录的关键字信息;将确定出的关键字信息携带于数据同步请求中发送至所述第一服务器;查找本地与所述关键字信息相应的数据分片;根据接收到的所述第一服务器返回的数据,更新查找到的本地的数据分片。Preferably, the data update unit is further configured to determine the keyword information recorded corresponding to the update operation based on the first log; carry the determined keyword information in the data synchronization request and send it to the first The server; searching for local data fragments corresponding to the keyword information; updating the found local data fragments according to the received data returned by the first server.

本发明的技术方案中,分布式存储系统的第一服务器将在第二服务器离线期间的数据更新操作记录到日志,第二服务器上线后,根据该日志将本地的数据与第一服务器的数据进行同步;与现有技术中将全部备份数据更新第二服务器中所有数据的数据同步方法相比,本方案的数据同步方法,大大减少了第二服务器需要同步的数据量,缩短了数据同步所需的时间,提高数据同步的效率,进一步地,使得在故障事件发生后,第二服务器可以在尽量短的时间内为用户提供数据服务,可以减少服务器离线导致的用户等待时间,提高用户体验。In the technical solution of the present invention, the first server of the distributed storage system records the data update operation during the offline period of the second server into a log, and after the second server goes online, it compares the local data with the data of the first server according to the log. Synchronization; compared with the data synchronization method of updating all data in the second server with all backup data in the prior art, the data synchronization method of this program greatly reduces the amount of data that the second server needs to synchronize, and shortens the time required for data synchronization. time, improve the efficiency of data synchronization, and further enable the second server to provide data services to users in the shortest possible time after a fault event occurs, which can reduce user waiting time caused by server offline and improve user experience.

而且,本发明实施例的技术方案中,服务器中创建有主控制进程和工作进程;由主控制进程专门负责接收用户的请求,将接收的请求均匀分配给多个工作进程,由工作进程对请求进行响应;本方案所述的方式由于更充分高效地利用服务器的资源,可达到大大提高服务器的负载均衡性,提高服务器对用户请求的响应速度的目的,从而提高用户的使用体验。Moreover, in the technical solution of the embodiment of the present invention, a main control process and a work process are created in the server; the main control process is specially responsible for receiving the user's request, and evenly distributes the received request to a plurality of work processes, and the work process processes the request Response; the method described in this solution can achieve the purpose of greatly improving the load balance of the server and improving the response speed of the server to user requests due to more fully and efficiently utilizing server resources, thereby improving user experience.

进一步,本发明实施例的技术方案中,无需在服务器的进程、以及客户端中添加协议或格式转换的源代码,进程可以直接利用HTTP协议与客户端进行交互,提高了接收用户请求等互交操作的效率。Further, in the technical solution of the embodiment of the present invention, there is no need to add source codes for protocol or format conversion in the process of the server and the client, and the process can directly use the HTTP protocol to interact with the client, which improves the interaction between receiving user requests and the like. operational efficiency.

本发明附加的方面和优点将在下面的描述中部分给出,这些将从下面的描述中变得明显,或通过本发明的实践了解到。Additional aspects and advantages of the invention will be set forth in part in the description which follows, and will become apparent from the description, or may be learned by practice of the invention.

附图说明Description of drawings

本发明上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the present invention will become apparent and easy to understand from the following description of the embodiments in conjunction with the accompanying drawings, wherein:

图1a为本发明实施例的分布式存储系统的服务器之间的数据同步方法的流程示意图;FIG. 1a is a schematic flow diagram of a method for synchronizing data between servers in a distributed storage system according to an embodiment of the present invention;

图1b为本发明实施例的数据同步方法的一个实例的原理示意图;FIG. 1b is a schematic diagram of an example of a data synchronization method according to an embodiment of the present invention;

图2a为本发明实施例的第二服务器依照更新操作列表,对本地的数据分片进行更新的方法流程示意图;Fig. 2a is a schematic flowchart of a method for updating local data fragments by a second server according to an update operation list according to an embodiment of the present invention;

图2b为本发明实施例的数据获取方法的原理示意图;Fig. 2b is a schematic diagram of the principle of a data acquisition method according to an embodiment of the present invention;

图3为本发明实施例的分布式存储系统的服务器内部结构的框架示意图;FIG. 3 is a schematic framework diagram of a server internal structure of a distributed storage system according to an embodiment of the present invention;

图4为本发明实施例的数据分片确定模块的内部结构的框架示意图;FIG. 4 is a schematic framework diagram of the internal structure of the data fragmentation determination module according to an embodiment of the present invention;

图5为本发明实施例的数据同步模块的内部结构的框架示意图。FIG. 5 is a schematic framework diagram of an internal structure of a data synchronization module according to an embodiment of the present invention.

具体实施方式Detailed ways

本技术领域技术人员可以理解,除非特意声明,这里使用的单数形式“一”、“一个”、“所述”和“该”也可包括复数形式。应该进一步理解的是,本发明的说明书中使用的措辞“包括”是指存在所述特征、整数、步骤、操作、元件和/或组件,但是并不排除存在或添加一个或多个其他特征、整数、步骤、操作、元件、组件和/或它们的组。应该理解,当我们称元件被“连接”或“耦接”到另一元件时,它可以直接连接或耦接到其他元件,或者也可以存在中间元件。此外,这里使用的“连接”或“耦接”可以包括无线连接或无线耦接。这里使用的措辞“和/或”包括一个或更多个相关联的列出项的全部或任一单元和全部组合。Those skilled in the art will understand that unless otherwise stated, the singular forms "a", "an", "said" and "the" used herein may also include plural forms. It should be further understood that the word "comprising" used in the description of the present invention refers to the presence of said features, integers, steps, operations, elements and/or components, but does not exclude the presence or addition of one or more other features, Integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Additionally, "connected" or "coupled" as used herein may include wireless connection or wireless coupling. The expression "and/or" used herein includes all or any elements and all combinations of one or more associated listed items.

本技术领域技术人员可以理解,除非另外定义,这里使用的所有术语(包括技术术语和科学术语),具有与本发明所属领域中的普通技术人员的一般理解相同的意义。还应该理解的是,诸如通用字典中定义的那些术语,应该被理解为具有与现有技术的上下文中的意义一致的意义,并且除非像这里一样被特定定义,否则不会用理想化或过于正式的含义来解释。Those skilled in the art can understand that, unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art to which this invention belongs. It should also be understood that terms, such as those defined in commonly used dictionaries, should be understood to have meanings consistent with their meaning in the context of the prior art, and unless specifically defined as herein, are not intended to be idealized or overly Formal meaning to explain.

本技术领域技术人员可以理解,这里所使用的“终端”、“终端设备”既包括无线信号接收器的设备,其仅具备无发射能力的无线信号接收器的设备,又包括接收和发射硬件的设备,其具有能够在双向通信链路上,执行双向通信的接收和发射硬件的设备。这种设备可以包括:蜂窝或其他通信设备,其具有单线路显示器或多线路显示器或没有多线路显示器的蜂窝或其他通信设备;PCS(Personal Communications Service,个人通信系统),其可以组合语音、数据处理、传真和/或数据通信能力;PDA(PersonalDigital Assistant,个人数字助理),其可以包括射频接收器、寻呼机、互联网/内联网访问、网络浏览器、记事本、日历和/或GPS(Global PositioningSystem,全球定位系统)接收器;常规膝上型和/或掌上型计算机或其他设备,其具有和/或包括射频接收器的常规膝上型和/或掌上型计算机或其他设备。这里所使用的“终端”、“终端设备”可以是便携式、可运输、安装在交通工具(航空、海运和/或陆地)中的,或者适合于和/或配置为在本地运行,和/或以分布形式,运行在地球和/或空间的任何其他位置运行。这里所使用的“终端”、“终端设备”还可以是通信终端、上网终端、音乐/视频播放终端,例如可以是PDA、MID(Mobile Internet Device,移动互联网设备)和/或具有音乐/视频播放功能的移动电话,也可以是智能电视、机顶盒等设备。Those skilled in the art can understand that the "terminal" and "terminal equipment" used here not only include wireless signal receiver equipment, which only has wireless signal receiver equipment without transmission capabilities, but also include receiving and transmitting hardware. A device having receiving and transmitting hardware capable of performing bi-directional communication over a bi-directional communication link. Such equipment may include: cellular or other communication equipment, which has a single-line display or a multi-line display or a cellular or other communication equipment without a multi-line display; PCS (Personal Communications Service, personal communication system), which can combine voice, data Processing, facsimile and/or data communication capabilities; PDA (Personal Digital Assistant, Personal Digital Assistant), which may include radio frequency receiver, pager, Internet/Intranet access, web browser, notepad, calendar and/or GPS (Global Positioning System , Global Positioning System) receiver; a conventional laptop and/or palmtop computer or other device having and/or including a radio frequency receiver. As used herein, a "terminal", "terminal device" may be portable, transportable, installed in a vehicle (air, sea, and/or land), or adapted and/or configured to operate locally, and/or In distributed form, the operation operates at any other location on Earth and/or in space. The "terminal" and "terminal device" used here can also be a communication terminal, an Internet terminal, a music/video player terminal, such as a PDA, a MID (Mobile Internet Device, a mobile Internet device) and/or a music/video player Functional mobile phones, smart TVs, set-top boxes and other devices.

本领域技术人员应当理解,本发明所称的“应用”、“应用程序”、“应用软件”以及类似表述的概念,是业内技术人员所公知的相同概念,是指由一系列计算机指令及相关数据资源有机构造的适于电子运行的计算机软件。除非特别指定,这种命名本身不受编程语言种类、级别,也不受其赖以运行的操作系统或平台所限制。理所当然地,此类概念也不受任何形式的终端所限制。同理,本发明所称的“目标应用”、“安装包”之间存在对应关系,安装包为目标应用的文件存在形式。Those skilled in the art should understand that the concepts of "application", "application program", "application software" and similar expressions referred to in the present invention are the same concepts well known to those skilled in the art, and refer to a series of computer instructions and related Computer software that is organically constructed from data resources and suitable for electronic operation. Unless otherwise specified, this naming itself is not limited by the type of programming language, level, or the operating system or platform on which it runs. Naturally, such concepts are also not limited by any form of terminal. Similarly, there is a corresponding relationship between the "target application" and "installation package" mentioned in the present invention, and the installation package is the file existence form of the target application.

下面详细描述本发明的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本发明,而不能解释为对本发明的限制。Embodiments of the present invention are described in detail below, examples of which are shown in the drawings, wherein the same or similar reference numerals designate the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the figures are exemplary only for explaining the present invention and should not be construed as limiting the present invention.

本发明的发明人考虑到,可以将相同数据分别存储到分布式存储系统的第一、二服务器的同名的数据分片中。当第一服务器更新该数据分片中的数据后,若检测到第二服务器离线,可以将第一服务器的数据更新操作记录到第一日志中;第二服务器上线后从第一服务器获取第一日志,并根据第一日志中所记载的在其离线期间的数据更新操作,进行数据同步。与现有技术中将全部备份数据更新第二服务器所有数据的同步方式相比,本方案所述的数据同步方法,大大减少了需要更新的数据量,缩短了数据同步所需的时间,提高了数据同步的效率,进一步地,使得在故障事件发生后,第二服务器可以在尽量短的时间内为用户提供数据服务,减少服务器离线导致的用户等待时间,提高用户体验。The inventors of the present invention consider that the same data can be stored in data fragments with the same name in the first and second servers of the distributed storage system respectively. After the first server updates the data in the data fragment, if it detects that the second server is offline, it can record the data update operation of the first server in the first log; log, and perform data synchronization according to the data update operation recorded in the first log during its offline period. Compared with the synchronization method in which all backup data is updated to all data on the second server in the prior art, the data synchronization method described in this solution greatly reduces the amount of data that needs to be updated, shortens the time required for data synchronization, and improves The efficiency of data synchronization further enables the second server to provide data services to users in the shortest possible time after a fault event occurs, reducing user waiting time caused by the server being offline and improving user experience.

本发明的发明人还发现,现有的分布式存储系统中的线程,通常同时具备接收数据更新等请求、以及查找数据分片等操作的功能;这些线程的负载均衡的方法通常为:某一线程接收了设定数量的请求后,停止接收请求并生成交接通知,由接收到交接通知的线程继续接收请求;这种方法容易导致先接收请求的线程负载较高,而后接收请求的线程负载交低,从而造成服务器的负载不均衡。The inventors of the present invention have also found that the threads in the existing distributed storage systems usually have the functions of receiving data update requests and searching for data fragments at the same time; the load balancing method of these threads is usually: a certain After a thread receives a set number of requests, it stops receiving requests and generates a handover notification, and the thread that receives the handover notification continues to receive requests; this method can easily lead to a high load on the thread that receives the request first, and then the load on the thread that receives the request is handed over. low, resulting in unbalanced server load.

本发明的发明人考虑到,可以将进程以功能划分为主控制进程和工作进程;由主控制进程专门负责接收用户的请求,将接收的请求均匀分配给多个工作进程,由工作进程对请求进行响应;本方案所述的方式由于更充分高效地利用服务器资源,可达到大大提高服务器的负载均衡性,提高服务器对用户请求的响应速度的目的,从而提高用户的使用体验。The inventor of the present invention considers that the process can be divided into a main control process and a work process by function; the main control process is specially responsible for receiving the user's request, and the received request is evenly distributed to a plurality of work processes, and the work process processes the request Response; the method described in this solution can achieve the purpose of greatly improving the load balance of the server and improving the response speed of the server to user requests due to more fully and efficiently utilizing server resources, thereby improving user experience.

基于上述考虑,下面结合附图具体介绍本发明实施例的技术方案。Based on the above considerations, the technical solutions of the embodiments of the present invention will be specifically introduced below in conjunction with the accompanying drawings.

本发明实施例的分布式存储系统中包括分布于多个地点的服务器。The distributed storage system in the embodiment of the present invention includes servers distributed in multiple locations.

位于同一地点的服务器之间可以通过局域网相通信;位于不同地点的服务器之间可以通过广域网相通信。Servers at the same location can communicate with each other through a local area network; servers at different locations can communicate with each other through a wide area network.

分布式存储系统中的每个服务器中划分有多个数据分片,以用于存储数据;同一服务器的不同数据分片的名称都不同;设置有相同名称的数据分片的服务器互为兄弟服务器。较佳地,本发明实施例的分布式存储系统中的每个服务器采用硬盘等非易失性存储器存储数据。Each server in the distributed storage system is divided into multiple data shards for storing data; different data shards of the same server have different names; servers with data shards with the same name are sibling servers . Preferably, each server in the distributed storage system in the embodiment of the present invention uses a non-volatile memory such as a hard disk to store data.

分布式存储系统对于待存储的数据,可以根据指定的备份数量,生成指定数量的该数据的备份;随后,将该数据分配到分布式存储系统中的一个服务器中的数据分片进行存储;同时,将该数据的备份分配到该服务器的兄弟服务器的同名数据分片进行存储;并记录该数据的内容、该数据的关键字信息以及存储该数据的数据分片的名称之间的对应关系。数据的关键字信息可以是该数据的摘要信息;较佳地,分布式存储系统可以利用摘要算法对该数据的内容进行摘要计算得到的该数据的摘要信息。摘要算法可以是MD5(Message Digest algorithm 5,消息摘要算法第5版)。For the data to be stored, the distributed storage system can generate a specified number of backups of the data according to the specified number of backups; then, the data is allocated to a data fragment in a server in the distributed storage system for storage; at the same time , allocate the backup of the data to the same-named data fragment of the sibling server of the server for storage; and record the correspondence between the content of the data, the keyword information of the data, and the name of the data fragment storing the data. The keyword information of the data may be summary information of the data; preferably, the distributed storage system may obtain the summary information of the data by using a summary algorithm to perform summary calculation on the content of the data. The digest algorithm can be MD5 (Message Digest algorithm 5, message digest algorithm version 5).

例如,分布式存储系统对于待存储的数据,根据指定的备份数量2,复制出该数据的一个备份;将该数据分配到分布式存储系统中的第一服务器的某一数据分片进行存储;将该数据的备份分配到第二服务器(即第一服务器的兄弟服务器)的同名数据分片进行存储;并记录该数据的内容、该数据的关键字信息以及存储该数据的数据分片的名称之间的对应关系,将该对应关系分别存储到第一、二服务器中。For example, for the data to be stored, the distributed storage system copies a backup of the data according to the specified backup number 2; assigns the data to a certain data fragment of the first server in the distributed storage system for storage; Assign the backup of the data to the same-named data fragment of the second server (that is, the brother server of the first server) for storage; and record the content of the data, the keyword information of the data, and the name of the data fragment that stores the data The corresponding relationship between them is stored in the first server and the second server respectively.

更优的,本发明实施例的分布式存储系统中包括Leveldb。Leveldb是google(谷歌)开发的较为高效的开源数据库。具体地,LevelDB通常是一个C/C++编程语言的库,本身不含网络层。本发明实施例的分布式存储系统的服务器中包含封装有网络层的leveldb。More preferably, the distributed storage system in the embodiment of the present invention includes Leveldb. Leveldb is a relatively efficient open source database developed by Google. Specifically, LevelDB is usually a C/C++ programming language library, which does not contain a network layer itself. The server of the distributed storage system in the embodiment of the present invention includes the leveldb encapsulated with the network layer.

LevelDB通常提供单进程的服务,读写性能较高;例如,在一台4核Q6600的CPU机器上,每秒钟写数据超过400000TPS(Transaction PerSecond,每秒事务处理量),而随机读的性能每秒钟超过100000TPS。LevelDB usually provides single-process services with high read and write performance; for example, on a 4-core Q6600 CPU machine, data writes per second exceed 400,000TPS (Transaction PerSecond, transaction processing volume per second), while random read performance More than 100000TPS per second.

下面以第一服务器与第二服务器为例,具体介绍本发明实施例的分布式存储系统中服务器之间的数据同步方法,该方法的流程示意图如图1a所示,包括如下步骤:Taking the first server and the second server as examples, the method for synchronizing data between servers in the distributed storage system according to the embodiment of the present invention will be described in detail below. The schematic flow diagram of the method is shown in Figure 1a, and includes the following steps:

S101:第一服务器接收到数据更新请求,查找与数据更新请求中的关键字信息相对应的数据分片。S101: The first server receives the data update request, and searches for data fragments corresponding to the keyword information in the data update request.

具体地,第一服务器接收到客户端发送的数据更新请求之后,从中解析出关键字信息;从预先记录的关键字信息与数据分片的名称对应关系中,查找出与解析出的关键字信息相对应的数据分片。数据更新请求可以是数据替换请求或者数据删除请求。Specifically, after receiving the data update request sent by the client, the first server parses out the keyword information; finds and parses out the keyword information from the pre-recorded correspondence between the keyword information and the name of the data slice Corresponding data fragmentation. The data update request may be a data replacement request or a data deletion request.

较佳地,第一服务器预先创建的主控制进程接收多个客户端发送的数据更新请求,可以包括:主控制进程利用HTTP(HyperText TransferProtocol,超文本传送协议)协议监听网络端口;利用HTTP协议转换监听到的数据更新请求的格式,将转换格式后的数据更新请求作为接收到的数据更新请求。Preferably, the master control process created in advance by the first server receives the data update requests sent by multiple clients, which may include: the master control process utilizes HTTP (HyperText Transfer Protocol, hypertext transfer protocol) protocol to monitor the network port; utilizes HTTP protocol conversion The format of the monitored data update request, and the converted data update request is used as the received data update request.

HTTP协议包含了多种数据协议或格式之间的转换信息,与采用二进制协议相比,无需在主控制进程、以及客户端中添加协议或格式转换的源代码,用户可以直接通过作为客户端的浏览器发送请求,服务器可以直接通过网络端口,例如TCP(Transmission Control Protocol,传输控制协议)的8360端口,直接监听并接收用户发送的请求;提高了接收用户请求的效率。而且,HTTP协议具有良好的扩展性,本发明实施例的分布式存储系统的服务器可以根据HTTP协议,方便地扩展出更多的功能。The HTTP protocol contains conversion information between multiple data protocols or formats. Compared with the binary protocol, there is no need to add source codes for protocol or format conversion in the main control process and the client. Users can directly browse through the When the server sends a request, the server can directly monitor and receive the request sent by the user through a network port, such as port 8360 of TCP (Transmission Control Protocol), which improves the efficiency of receiving user requests. Moreover, the HTTP protocol has good scalability, and the server of the distributed storage system in the embodiment of the present invention can conveniently expand more functions according to the HTTP protocol.

主控制进程基于接收到的每个数据更新请求,生成该数据更新请求的工作信道;将接收的数据更新请求及相应的工作信道,均匀分配给第一服务器预先创建的多个工作进程。工作信道可以是文件描述符,例如Unix系统中的FD。一个工作进程可以处理百万级别数量的工作信道。Based on each received data update request, the main control process generates a working channel for the data update request; and evenly distributes the received data update request and the corresponding working channel to multiple working processes pre-created by the first server. The working channel can be a file descriptor, such as FD in Unix systems. A worker process can handle millions of work channels.

本实施例中,多个工作进程根据各种分配到的数据更新请求中的关键字信息,分别查找对应的数据分片。由于工作进程之间的负载较为平均,因此有利于更充分高效地利用服务器的资源,从而提高服务器对用户请求的响应速度。In this embodiment, multiple working processes respectively search for corresponding data fragments according to the keyword information in various assigned data update requests. Since the load among the working processes is relatively average, it is beneficial to use the resources of the server more fully and efficiently, thereby improving the response speed of the server to user requests.

较佳地,工作进程从其分配到的数据更新请求中解析出关键字信息;从第一服务器中预先存储的关键字信息与数据分片的名称的对应关系中,查找出与解析出的关键字信息相对应的数据分片。Preferably, the working process parses out the keyword information from the data update request assigned to it; finds out and parses out the key The data fragment corresponding to the word information.

例如,如图1b所示的数据同步原理示意图中,ServerB可以为第一服务器,ServerC可以为第二服务器,Client为客户端;ServerB接收到Client发送的数据更新请求put query kv3,从中解析出关键字信息;查找到与关键字信息相对应的名为shard3的数据分片。For example, in the schematic diagram of the data synchronization principle shown in Figure 1b, ServerB can be the first server, ServerC can be the second server, and Client is the client; ServerB receives the data update request put query kv3 sent by the Client, and parses out the key Word information; find the data shard named shard3 corresponding to the keyword information.

S102:第一服务器根据数据更新请求中的更新数据,更新数据分片。S102: The first server updates the data fragments according to the update data in the data update request.

较佳地,对于第一服务器中的每个工作线程,该工作线程从其分配到的数据更新请求中解析出更新数据,根据解析出的更新数据,更新该工作线程在步骤S101中确定出的数据分片。Preferably, for each worker thread in the first server, the worker thread parses the update data from the data update request assigned to it, and updates the data determined by the worker thread in step S101 according to the parsed update data. Data sharding.

例如,如图1b所示的数据同步原理示意图中,第一服务器ServerB从接收的数据更新请求put query kv3中解析出更新数据kv3的内容,将解析出的kv3的内容,更新到数据分片shard3中。For example, in the schematic diagram of the data synchronization principle shown in Figure 1b, the first server ServerB parses the content of the updated data kv3 from the received data update request put query kv3, and updates the content of the parsed kv3 to the data fragment shard3 middle.

较佳地,若工作线程接收的数据更新请求为数据替换请求,则将从数据替换请求中解析出的替换数据,替换掉该工作线程在步骤S101中确定出的数据分片中相应的数据。Preferably, if the data update request received by the worker thread is a data replacement request, the replacement data parsed from the data replacement request will replace the corresponding data in the data slice determined by the worker thread in step S101.

较佳地,若工作线程接收的数据更新请求为数据删除请求,则根据从数据替换请求中解析出的待删除数据,删除该工作线程在步骤S101中确定出的数据分片中相应的数据。Preferably, if the data update request received by the working thread is a data deletion request, then according to the data to be deleted parsed from the data replacement request, the corresponding data in the data slice determined by the working thread in step S101 is deleted.

更优的,工作线程在数据更新完毕后,通过其分配到的工作信道,向客户端返回数据更新成功的消息。More preferably, after the data update is completed, the worker thread returns a message of successful data update to the client through its assigned work channel.

S103:第一服务器若检测到设置有与步骤S101中确定的数据分片名称相同的其他数据分片的第二服务器离线,将更新数据的更新操作记录到第一服务器的第一日志中。S103: If the first server detects that the second server configured with another data fragment with the same name as the data fragment determined in step S101 is offline, record the update operation of updating data in the first log of the first server.

具体地,第一服务器对于设置有与上述步骤S101中确定的数据分片名称相同的其他数据分片的第二服务器,利用心跳线程检测第二服务器是否离线:若是,将上述步骤S102中的更新数据的更新操作记录到第一服务器的第一日志中。Specifically, the first server uses the heartbeat thread to detect whether the second server is offline for the second server that is configured with other data fragments with the same name as the data fragment determined in the above step S101: if so, the update in the above step S102 The data update operation is recorded in the first log of the first server.

较佳地,第一日志可以是格式日志。第一日志中对应更新数据的更新操作,还记载有更新数据及其关键字信息。Preferably, the first log may be a format log. The update operation corresponding to the update data in the first log also records the update data and its keyword information.

较佳地,第一服务器在检测到第二服务器离线期间,将第一服务器的多个更新数据的更新操作,依照时间顺序记录到第一服务器的第一日志中。Preferably, when the first server detects that the second server is offline, it records the update operations of the plurality of update data of the first server into the first log of the first server in chronological order.

例如,如图1b所示的数据同步原理示意图中,第一服务器ServerB在检测到第二服务器ServerC离线期间,将替换数据分片shard3中的数据kv3的替换操作,记录到第一日志,即ServerB的binlog restore中。For example, in the schematic diagram of the data synchronization principle shown in Figure 1b, when the first server ServerB detects that the second server ServerC is offline, the replacement operation of replacing the data kv3 in the data fragment shard3 is recorded in the first log, that is, ServerB In the binlog restore.

S104:第二服务器向第一服务器发送日志同步请求。S104: The second server sends a log synchronization request to the first server.

具体地,当第二服务器从离线状态变更至在线状态时,向第一服务器发送日志同步请求。较佳地,第二服务器上线后,利用第二服务器中的心跳线程向第一服务器发送日志同步请求。Specifically, when the second server changes from an offline state to an online state, a log synchronization request is sent to the first server. Preferably, after the second server goes online, use the heartbeat thread in the second server to send a log synchronization request to the first server.

或者,当第二服务器在上线状态下,周期性向第一服务器发送日志同步请求。Or, when the second server is in the online state, it periodically sends a log synchronization request to the first server.

S105:第一服务器响应于第二服务器发送的日志同步请求,向第二服务器返回第一日志。S105: The first server returns the first log to the second server in response to the log synchronization request sent by the second server.

具体地,第一服务器接收到第二服务器发送的日志同步请求后,将本服务器中存储的第一日志向第二服务器返回。Specifically, after receiving the log synchronization request sent by the second server, the first server returns the first log stored in the server to the second server.

S106:第二服务器根据接收到的第一服务器返回的第一日志,进行数据同步操作。S106: The second server performs a data synchronization operation according to the received first log returned by the first server.

具体地,第二服务器将接收到的第一服务器返回的第一日志,与第二服务器中预存的第二日志相比较,以确定更新操作列表。Specifically, the second server compares the received first log returned by the first server with the second log prestored in the second server to determine the update operation list.

第二服务器根据确定出的更新操作列表,更新本地相应的数据分片。The second server updates the corresponding local data fragments according to the determined update operation list.

较佳地,更新操作列表中具体包括多个更新数据的更新操作。Preferably, the update operation list specifically includes a plurality of update operations for updating data.

第二服务器可以依照多个更新操作在更新操作列表中的时间顺序,依次对本地相应的数据分片进行更新,具体方法将在后续进行详细介绍。The second server may sequentially update corresponding local data fragments according to the chronological sequence of multiple update operations in the update operation list, and the specific method will be described in detail later.

上述步骤S106中,第二服务器依照多个更新操作在更新操作列表中的时间顺序,依次对本地相应的数据分片进行更新的具体方法,其流程图如图2a所示,包括如下步骤:In the above step S106, the specific method for the second server to sequentially update the corresponding local data fragments according to the time sequence of multiple update operations in the update operation list, the flow chart of which is shown in Figure 2a, includes the following steps:

S201:第二服务器基于第一日志的更新操作列表中的每个更新操作,确定与该更新操作对应记录的关键字信息。S201: Based on each update operation in the update operation list of the first log, the second server determines keyword information recorded corresponding to the update operation.

具体地,第二服务器基于上述步骤S106中确定出更新操作列表中的每个更新操作,从接收的第一日志中,确定与该更新操作对应记录的关键字信息。Specifically, based on each update operation in the update operation list determined in the above step S106, the second server determines the keyword information recorded corresponding to the update operation from the received first log.

S202:第二服务器将确定出的关键字信息携带于数据同步请求中发送至第一服务器,并查找本地与确定出的关键字信息相应的数据分片。S202: The second server carries the determined keyword information in a data synchronization request and sends it to the first server, and searches for local data fragments corresponding to the determined keyword information.

具体地,第二服务器将上述步骤S202中确定出的关键字信息携带于数据同步请求中发送至第一服务器。Specifically, the second server sends the keyword information determined in step S202 to the first server in the data synchronization request.

第二服务器从本服务器中预存的关键字信息与数据分片的名称的对应关系中,查找出与上述步骤S202中确定出的关键字信息相对应的数据分片。The second server finds out the data fragments corresponding to the keyword information determined in the above step S202 from the correspondence between the keyword information and the names of the data fragments pre-stored in the server.

例如,如图1b所示的数据同步原理示意图中,如图1b所示的的数据同步原理示意图中,第二服务器ServerC在ServerC中查找出与关键字信息相对应的数据分片shard3。For example, in the schematic diagram of the principle of data synchronization shown in FIG. 1b, the second server ServerC finds the data shard shard3 corresponding to the keyword information in ServerC.

S203:第一服务器接收第二服务器发送的数据同步请求,从中解析出关键字信息;查找本地与解析出的关键字信息相应的数据分片。S203: The first server receives the data synchronization request sent by the second server, and parses keyword information from it; searches for a local data fragment corresponding to the parsed keyword information.

具体地,第一服务器接收第二服务器发送的数据同步请求,从中解析出上述步骤S201中确定出的关键字信息;从第一服务器中预存的关键字信息与数据分片的名称的对应关系中,查找出与解析出的关键字信息相应的数据分片。Specifically, the first server receives the data synchronization request sent by the second server, and parses out the keyword information determined in step S201; , find out the data fragments corresponding to the parsed keyword information.

例如,如图1b所示的数据同步原理示意图中,第一服务器ServerB从接收的第二服务器ServerC发送的数据同步请求中解析出关键字信息,在第一服务器ServerB中查找出与关键字信息相对应的数据分片shard3。For example, in the schematic diagram of the principle of data synchronization shown in Figure 1b, the first server ServerB parses the keyword information from the received data synchronization request sent by the second server ServerC, and finds out the information corresponding to the keyword information in the first server ServerB. The corresponding data shard shard3.

S204:第一服务器将查找到的数据分片中的数据返回至第二服务器。S204: The first server returns the found data in the data fragments to the second server.

具体地,第一服务器对于上述步骤S203中查找到的数据分片,从该数据分片中获取上述步骤S201确定出的关键字信息相对应的数据,将获取的数据返回至第二服务器。Specifically, the first server obtains the data corresponding to the keyword information determined in the above step S201 from the data fragment found in the above step S203, and returns the obtained data to the second server.

例如,如图1b所示的数据同步原理示意图中,第一服务器ServerB从ServerB的数据分片shard3中获取关键字信息相对应的数据kv3,将获取的kv3返回至第二服务器ServerC。For example, in the schematic diagram of the principle of data synchronization shown in FIG. 1b, the first server ServerB acquires data kv3 corresponding to keyword information from the data shard3 of ServerB, and returns the acquired kv3 to the second server ServerC.

S205:第二服务器根据接收到的第一服务器返回的数据,更新查找到的本地的数据分片。S205: The second server updates the found local data fragments according to the received data returned by the first server.

具体地,第二服务器根据上述步骤S201中基于的更新操作,将接收到的第一服务器返回的数据,更新到在上述步骤202中查找到的第二服务器的数据分片中。Specifically, the second server updates the received data returned by the first server into the data fragments of the second server found in the above step 202 according to the update operation based on the above step S201.

较佳地,若更新操作为替换操作,第二服务器将接收到的第一服务器返回的数据,替换掉上述步骤202中查找到的第二服务器数据分片中相应的数据。Preferably, if the update operation is a replacement operation, the second server will replace the corresponding data in the second server data fragment found in step 202 with the received data returned by the first server.

例如,如图1b所示的数据同步原理示意图中,第二服务器ServerC将接收的第一服务器ServerB返回的数据kv3,替换掉ServerC中数据分片Shard3中相应的kv3。For example, in the schematic diagram of the principle of data synchronization shown in FIG. 1b, the second server ServerC replaces the corresponding kv3 in the data shard Shard3 in ServerC with the received data kv3 returned by the first server ServerB.

事实上,本发明实施例的中的第一服务器,还可以具备与如图1a和图2a所示的方法流程步骤中的第二服务器相同的功能;第二服务器还可以具备与如图1a和图2a所示的方法流程步骤中的第一服务器相同的功能。In fact, the first server in the embodiment of the present invention can also have the same function as the second server in the method flow steps shown in Figure 1a and Figure 2a; the second server can also have the same function as Figure 1a and Figure 2a The first server in the method flow steps shown in Fig. 2a has the same function.

事实上,本发明实施例的分布式存储系统,在上述如图1a和图2所示的方法流程步骤中,包含了对用户发送的数据获取请求的响应方法。In fact, the distributed storage system of the embodiment of the present invention includes a response method to the data acquisition request sent by the user in the above-mentioned method flow steps shown in FIG. 1a and FIG. 2 .

例如,如图2b所示的数据获取原理示意图中,分布式存储系统中的ServerA接收到用户通过客户端Client发送的数据获取请求get query kv3后,从中解析出关键字信息,但在ServerA中预存的关键字信息与数据分片的名称的对应关系中,查找不到解析出的关键字信息;ServerA利用HTTP协议中的临时重定向功能,向客户端发送携带有的ServerB的网络地址的临时重定向指令。网络地址可以是URL(Uniform Resource Location,统一资源定位符)。For example, in the schematic diagram of the data acquisition principle shown in Figure 2b, after ServerA in the distributed storage system receives the data acquisition request get query kv3 sent by the user through the client client, it parses out the keyword information, but pre-stored in ServerA In the corresponding relationship between the keyword information and the name of the data fragment, the parsed keyword information cannot be found; ServerA uses the temporary redirection function in the HTTP protocol to send a temporary redirection with the network address of ServerB to the client. Orientation instructions. The network address may be a URL (Uniform Resource Location, Uniform Resource Locator).

客户端根据临时重定向指令,向ServerB发送数据获取请求。The client sends a data acquisition request to ServerB according to the temporary redirection instruction.

ServerB从接收的数据获取请求get query kv3中解析出关键字信息,从ServerB预存的关键字信息与数据分片的名称的对应关系中,查找到与解析出的关键字信息相对应的数据分片shard3;从shard3中读取数据kv3,并将读取的数据向客户端。ServerB parses the keyword information from the received data acquisition request get query kv3, and finds the data fragment corresponding to the parsed keyword information from the corresponding relationship between the keyword information stored in ServerB and the name of the data fragment shard3; read data kv3 from shard3, and send the read data to the client.

基于上述分布式存储系统中服务器之间的数据同步方法,本发明实施例提供了一种分布式存储系统中的第一服务器,其内部结构的框架示意图如图3所示,包括:数据分片确定模块301、数据更新模块302、更新操作记录模块303和同步请求响应模块304。Based on the data synchronization method between servers in the above-mentioned distributed storage system, an embodiment of the present invention provides a first server in the distributed storage system, the framework diagram of its internal structure is shown in Figure 3, including: data fragmentation A determination module 301 , a data update module 302 , an update operation record module 303 and a synchronization request response module 304 .

其中,数据分片确定模块301用于接收到数据更新请求,查找与数据更新请求中的关键字信息相对应的数据分片。Wherein, the data fragment determining module 301 is configured to receive a data update request, and search for a data fragment corresponding to the keyword information in the data update request.

数据更新模块302用于根据数据更新请求中的更新数据,更新数据分片。The data update module 302 is configured to update data fragments according to the update data in the data update request.

更新操作记录模块303用于若检测到设置有与数据分片名称相同的其他数据分片的第二服务器离线,将更新数据的更新操作记录到第一服务器的第一日志中,其中,第一服务器与第二服务器互为兄弟服务器,其均设置有相同名称的数据分片。The update operation recording module 303 is used to record the update operation of the update data into the first log of the first server if it is detected that the second server that is configured with other data fragments with the same name as the data fragment is offline, wherein the first The server and the second server are sibling servers to each other, and both of them are provided with data fragments with the same name.

同步请求响应模块304用于响应于第二服务器发送的日志同步请求,向第二服务器返回第一日志。The synchronization request response module 304 is configured to return the first log to the second server in response to the log synchronization request sent by the second server.

较佳地,同步请求响应模块304还用于接收第二服务器发送的数据同步请求,从中解析出关键字信息;查找本地与解析出的关键字信息相应的数据分片;将查找到的数据分片中的数据返回至第二服务器。Preferably, the synchronization request response module 304 is also configured to receive the data synchronization request sent by the second server, and parse out keyword information therefrom; search for local data fragments corresponding to the parsed keyword information; divide the found data into The data in the slice is returned to the second server.

较佳地,数据分片确定模块301的内部结构的框架示意图如图4所示,可以包括:数据更新请求接收单元401和数据分片确定单元402。Preferably, a schematic diagram of the internal structure of the data fragmentation determination module 301 is shown in FIG. 4 , which may include: a data update request receiving unit 401 and a data fragmentation determination unit 402 .

其中,数据更新请求接收单元401用于由预先创建的主控制进程接收多个客户端发送的数据更新请求;基于接收到的每个数据更新请求,生成该数据更新请求的工作信道;主控制进程将接收的数据更新请求及相应的工作信道,均匀分配给第一服务器预先创建的多个工作进程。Wherein, the data update request receiving unit 401 is used for receiving the data update requests sent by multiple clients by the pre-created main control process; based on each received data update request, generating the working channel of the data update request; the main control process Evenly distribute the received data update requests and corresponding working channels to multiple working processes pre-created by the first server.

具体地,数据更新请求接收单元401,由主控制进程利用HTTP协议监听网络端口;利用HTTP协议转换监听到的数据更新请求的格式,将转换格式后的数据更新请求作为接收到的数据更新请求。Specifically, the data update request receiving unit 401 uses the HTTP protocol to monitor the network port by the main control process; uses the HTTP protocol to convert the format of the monitored data update request, and uses the converted data update request as the received data update request.

数据分片确定单元402用于由工作进程根据分配到的数据更新请求中的关键字信息,查找对应的数据分片。The data fragment determination unit 402 is used for the work process to search for corresponding data fragments according to the key information in the assigned data update request.

更优的,如图3所示,第一服务器中还包括:同步请求发送模块305和数据同步模块306。More preferably, as shown in FIG. 3 , the first server further includes: a synchronization request sending module 305 and a data synchronization module 306 .

其中,同步请求发送模块305用于向第二服务器发送日志同步请求。Wherein, the synchronization request sending module 305 is configured to send a log synchronization request to the second server.

数据同步模块306用于根据接收到的第二服务器返回的第二日志,进行数据同步操作。The data synchronization module 306 is configured to perform a data synchronization operation according to the received second log returned by the second server.

上述数据分片确定模块301、数据更新模块302、更新操作记录模块303、同步请求响应模块304、同步请求发送模块305、数据同步模块306,以及数据分片确定模块301中的数据更新请求接收单元401和数据分片确定单元402功能的实现方法,请参考上述如图1a和图2a所示的方法流程步骤的具体内容,此处不再赘述。The above-mentioned data fragmentation determination module 301, data update module 302, update operation record module 303, synchronization request response module 304, synchronization request sending module 305, data synchronization module 306, and the data update request receiving unit in the data fragmentation determination module 301 For the implementation method of the functions of 401 and the data fragment determination unit 402, please refer to the specific content of the above-mentioned method flow steps shown in FIG. 1a and FIG. 2a, and details will not be repeated here.

基于上述分布式存储系统中服务器之间的数据同步方法,本发明实施例提供了一种分布式存储系统中的第二服务器,其内部结构的框架示意图如图3所示,包括:同步请求发送模块311和数据同步模块312。Based on the data synchronization method between servers in the above-mentioned distributed storage system, an embodiment of the present invention provides a second server in the distributed storage system, the framework diagram of its internal structure is shown in Figure 3, including: synchronization request sending module 311 and data synchronization module 312.

其中,同步请求发送模块311用于向第一服务器发送日志同步请求。Wherein, the synchronization request sending module 311 is configured to send a log synchronization request to the first server.

具体地,同步请求发送模块311当第二服务器在上线状态下,周期性向第一服务器发送日志同步请求;或者当第二服务器从离线状态变更至在线状态时,向第一服务器发送日志同步请求。Specifically, the synchronization request sending module 311 periodically sends a log synchronization request to the first server when the second server is online; or sends a log synchronization request to the first server when the second server changes from offline to online.

数据同步模块312用于根据接收到的第一服务器返回的第一日志,进行数据同步操作;其中,第一服务器与第二服务器互为兄弟服务器,其均设置有相同名称的数据分片。The data synchronization module 312 is used to perform a data synchronization operation according to the received first log returned by the first server; wherein, the first server and the second server are sibling servers, and both of them are configured with data fragments with the same name.

更优的,数据同步模块312的内部结构的框架示意图如图5所示,具体包括:更新操作列表确定单元501和数据更新单元502。More preferably, a schematic diagram of the internal structure of the data synchronization module 312 is shown in FIG. 5 , which specifically includes: an update operation list determination unit 501 and a data update unit 502 .

其中,更新操作列表确定单元501用于将接收到的第一服务器返回的第一日志与本地第二日志相比较,以确定更新操作列表。Wherein, the update operation list determining unit 501 is configured to compare the received first log returned by the first server with the local second log to determine the update operation list.

数据更新单元502用于根据更新操作列表,更新本地相应的数据分片。The data update unit 502 is configured to update the corresponding local data fragments according to the update operation list.

具体地,当更新操作列表中具体包括多个更新数据时,更新操作数据更新单元502依照多个更新操作在更新操作列表中的时间顺序,依次对本地相应的数据分片进行更新。Specifically, when the update operation list specifically includes multiple update data, the update operation data update unit 502 sequentially updates the corresponding local data fragments according to the time sequence of the multiple update operations in the update operation list.

进一步,数据更新单元502进一步用于基于第一日志,确定与该更新操作对应记录的关键字信息;将确定出的关键字信息携带于数据同步请求中发送至第一服务器;查找本地与关键字信息相应的数据分片;根据接收到的第一服务器返回的数据,更新查找到的本地的数据分片。Further, the data update unit 502 is further configured to determine the keyword information recorded corresponding to the update operation based on the first log; carry the determined keyword information in the data synchronization request and send it to the first server; search for local and keyword information The data fragment corresponding to the information; according to the received data returned by the first server, update the found local data fragment.

更优的,如图3所示,本发明实施例的第二服务器中,还包括:数据分片确定模块313、数据更新模块314、更新操作记录模块315和同步请求响应模块316。More preferably, as shown in FIG. 3 , the second server in the embodiment of the present invention further includes: a data fragment determination module 313 , a data update module 314 , an update operation record module 315 and a synchronization request response module 316 .

其中,数据分片确定模块313用于接收到数据更新请求,查找与数据更新请求中的关键字信息相对应的数据分片。Wherein, the data fragment determining module 313 is configured to receive the data update request, and search for the data fragment corresponding to the keyword information in the data update request.

数据更新模块314用于根据数据更新请求中的更新数据,更新数据分片。The data update module 314 is configured to update the data fragments according to the update data in the data update request.

更新操作记录模块315用于若检测到设置有与数据分片名称相同的其他数据分片的第一服务器离线,将更新数据的更新操作记录到第二服务器的第二日志中,其中,第一服务器与第二服务器互为兄弟服务器,其均设置有相同名称的数据分片。The update operation recording module 315 is used to record the update operation of updating data into the second log of the second server if it is detected that the first server that is configured with other data fragments with the same name as the data fragment is offline, wherein the first The server and the second server are sibling servers to each other, and both of them are provided with data fragments with the same name.

同步请求响应模块316用于响应于第一服务器发送的日志同步请求,向第一服务器返回第二日志。The synchronization request response module 316 is configured to return the second log to the first server in response to the log synchronization request sent by the first server.

较佳地,同步请求响应模块316还用于接收第一服务器发送的数据同步请求,从中解析出关键字信息;查找本地与解析出的关键字信息相应的数据分片;将查找到的数据分片中的数据返回至第一服务器。Preferably, the synchronization request response module 316 is also used to receive the data synchronization request sent by the first server, and parse out the keyword information therefrom; search for local data fragments corresponding to the parsed keyword information; divide the found data into The data in the slice is returned to the first server.

上述同步请求发送模块311、数据同步模块312、数据分片确定模块313、数据更新模块314、更新操作记录模块315和同步请求响应模块316,以及数据同步模块312中的更新操作列表确定单元501和数据更新单元502功能的实现方法,请参考上述如图1a和图2a所示的方法流程步骤的具体内容,此处不再赘述。The above-mentioned synchronization request sending module 311, data synchronization module 312, data fragment determination module 313, data update module 314, update operation record module 315 and synchronization request response module 316, as well as the update operation list determination unit 501 and For the implementation method of the function of the data update unit 502, please refer to the specific content of the steps of the above-mentioned method as shown in FIG. 1a and FIG. 2a, and details will not be repeated here.

本发明实施例的技术方案中,分布式存储系统的第一服务器将在第二服务器离线期间的数据更新操作记录到日志,第二服务器上线后,根据该日志将本地的数据与第一服务器的数据进行同步;与现有技术中将全部备份数据更新第二服务器中所有数据的数据同步方法相比,本方案的数据同步方法,大大减少了第二服务器需要同步的数据量,缩短了数据同步所需的时间,提高数据同步的效率,进一步地,使得在故障事件发生后,第二服务器可以在尽量短的时间内为用户提供数据服务,可以减少服务器离线导致的用户等待时间,提高用户体验。In the technical solution of the embodiment of the present invention, the first server of the distributed storage system records the data update operation during the offline period of the second server into a log, and after the second server goes online, compares the local data with the first server's data according to the log. Data synchronization; compared with the data synchronization method of updating all data in the second server with all backup data in the prior art, the data synchronization method of this program greatly reduces the amount of data that needs to be synchronized by the second server and shortens the time for data synchronization. The time required to improve the efficiency of data synchronization, and further, after the failure event occurs, the second server can provide data services for users in the shortest possible time, which can reduce the user waiting time caused by the server being offline, and improve user experience .

而且,本发明实施例的技术方案中,服务器中创建有主控制进程和工作进程;由主控制进程专门负责接收用户的请求,将接收的请求均匀分配给多个工作进程,由工作进程对请求进行响应;本方案所述的方式由于更充分高效地利用服务器的资源,可达到大大提高服务器的负载均衡性,提高服务器对用户请求的响应速度的目的,从而提高用户的使用体验。Moreover, in the technical solution of the embodiment of the present invention, a main control process and a work process are created in the server; the main control process is specially responsible for receiving the user's request, and evenly distributes the received request to a plurality of work processes, and the work process processes the request Response; the method described in this solution can achieve the purpose of greatly improving the load balance of the server and improving the response speed of the server to user requests due to more fully and efficiently utilizing server resources, thereby improving user experience.

进一步,本发明实施例的技术方案中,无需在服务器的进程、以及客户端中添加协议或格式转换的源代码,进程可以直接利用HTTP协议与客户端进行交互,提高了接收用户请求等互交操作的效率。Further, in the technical solution of the embodiment of the present invention, there is no need to add source codes for protocol or format conversion in the process of the server and the client, and the process can directly use the HTTP protocol to interact with the client, which improves the interaction between receiving user requests and the like. operational efficiency.

本技术领域技术人员可以理解,本发明包括涉及用于执行本申请中所述操作中的一项或多项的设备。这些设备可以为所需的目的而专门设计和制造,或者也可以包括通用计算机中的已知设备。这些设备具有存储在其内的计算机程序,这些计算机程序选择性地激活或重构。这样的计算机程序可以被存储在设备(例如,计算机)可读介质中或者存储在适于存储电子指令并分别耦联到总线的任何类型的介质中,所述计算机可读介质包括但不限于任何类型的盘(包括软盘、硬盘、光盘、CD-ROM、和磁光盘)、ROM(Read-Only Memory,只读存储器)、RAM(Random Access Memory,随即存储器)、EPROM(Erasable Programmable Read-Only Memory,可擦写可编程只读存储器)、EEPROM(Electrically Erasable ProgrammableRead-Only Memory,电可擦可编程只读存储器)、闪存、磁性卡片或光线卡片。也就是,可读介质包括由设备(例如,计算机)以能够读的形式存储或传输信息的任何介质。Those skilled in the art will appreciate that the present invention includes devices related to performing one or more of the operations described in this application. These devices may be specially designed and fabricated for the required purposes, or they may include known devices found in general purpose computers. These devices have computer programs stored therein that are selectively activated or reconfigured. Such a computer program can be stored in a device (e.g., computer) readable medium, including but not limited to any type of medium suitable for storing electronic instructions and respectively coupled to a bus. Types of disks (including floppy disks, hard disks, CDs, CD-ROMs, and magneto-optical disks), ROM (Read-Only Memory, read-only memory), RAM (Random Access Memory, random memory), EPROM (Erasable Programmable Read-Only Memory , Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory, Electrically Erasable Programmable Read-Only Memory), flash memory, magnetic card or optical card. That is, a readable medium includes any medium that stores or transmits information in a form readable by a device (eg, a computer).

本技术领域技术人员可以理解,可以用计算机程序指令来实现这些结构图和/或框图和/或流图中的每个框以及这些结构图和/或框图和/或流图中的框的组合。本技术领域技术人员可以理解,可以将这些计算机程序指令提供给通用计算机、专业计算机或其他可编程数据处理方法的处理器来实现,从而通过计算机或其他可编程数据处理方法的处理器来执行本发明公开的结构图和/或框图和/或流图的框或多个框中指定的方案。Those skilled in the art will understand that computer program instructions can be used to implement each block in these structural diagrams and/or block diagrams and/or flow diagrams and combinations of blocks in these structural diagrams and/or block diagrams and/or flow diagrams . Those skilled in the art can understand that these computer program instructions can be provided to general-purpose computers, professional computers, or processors of other programmable data processing methods for implementation, so that the computer or processors of other programmable data processing methods can execute the present invention. A scheme specified in a block or blocks of a structure diagram and/or a block diagram and/or a flow diagram of the invention disclosure.

本技术领域技术人员可以理解,本发明中已经讨论过的各种操作、方法、流程中的步骤、措施、方案可以被交替、更改、组合或删除。进一步地,具有本发明中已经讨论过的各种操作、方法、流程中的其他步骤、措施、方案也可以被交替、更改、重排、分解、组合或删除。进一步地,现有技术中的具有与本发明中公开的各种操作、方法、流程中的步骤、措施、方案也可以被交替、更改、重排、分解、组合或删除。Those skilled in the art can understand that the various operations, methods, and steps, measures, and solutions in the processes discussed in the present invention can be replaced, changed, combined, or deleted. Further, other steps, measures, and schemes in the various operations, methods, and processes that have been discussed in the present invention may also be replaced, changed, rearranged, decomposed, combined, or deleted. Further, steps, measures, and schemes in the prior art that have operations, methods, and processes disclosed in the present invention can also be alternated, changed, rearranged, decomposed, combined, or deleted.

以上所述仅是本发明的部分实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。The above descriptions are only part of the embodiments of the present invention. It should be pointed out that those skilled in the art can make some improvements and modifications without departing from the principles of the present invention. It should be regarded as the protection scope of the present invention.

Claims (10)

1. the method for data synchronization of first server end in distributed memory system, is characterized in that, comprising:
First server receives Data Update request, searches the data fragmentation corresponding with the keyword message in described Data Update request;
According to the more new data in described Data Update request, upgrade described data fragmentation;
The second server off-line of other data fragmentations identical with described data fragmentation title is provided with if detect, the renewal rewards theory of described more new data is recorded in the first daily record of described first server, wherein, described first server and second server be fraternal server each other, is wherein provided with the data fragmentation of same names;
In response to the daily record synchronization request that described second server sends, return the first daily record to second server.
2. method according to claim 1, is characterized in that, described to after second server returns the first daily record, also comprises:
Receive the data synchronization request that second server sends, therefrom parse keyword message;
Search the local data fragmentation corresponding to the keyword message parsed;
Data in the data fragmentation found are back to second server.
3. method according to claim 1 and 2, is characterized in that, described first server receives Data Update request, specifically comprises:
The master control process that described first server is pre-created receives the Data Update request that multiple client sends;
Based on each Data Update request received, generate the working channel of this Data Update request;
Described master control process by the Data Update request that receives and corresponding working channel, multiple progresses of work that uniform distribution is pre-created to described first server;
The described progress of work, according to the keyword message in the Data Update request be assigned to, searches corresponding data fragmentation.
4. the method for data synchronization of second server end in distributed memory system, is characterized in that, comprising:
Daily record synchronization request is sent to first server;
According to the first daily record that the described first server received returns, carry out data syn-chronization operation, wherein, described first server and second server be fraternal server each other, is wherein provided with the data fragmentation of same names.
5. method according to claim 4, is characterized in that, sends daily record synchronization request, comprising to first server:
When described second server is under upper line states, periodically send daily record synchronization request to first server; Or
When described second server changes to presence from off-line state, send daily record synchronization request to first server.
6. the method according to claim 4 or 5, is characterized in that, according to the first daily record that the described first server received returns, carries out data syn-chronization operation, specifically comprises:
The first daily record that the first server received is returned compared with local second daily record, to determine renewal rewards theory list;
According to described renewal rewards theory list, upgrade local corresponding data fragmentation.
7. the first server in distributed memory system, is characterized in that, comprising:
Data fragmentation determination module, for receiving Data Update request, searches the data fragmentation corresponding with the keyword message in described Data Update request;
Data update module, for according to the more new data in described Data Update request, upgrades described data fragmentation;
Renewal rewards theory logging modle, if for the second server off-line being provided with other data fragmentations identical with described data fragmentation title being detected, the renewal rewards theory of described more new data is recorded in the first daily record of described first server, wherein, described first server and second server be fraternal server each other, and it is provided with the data fragmentation of same names;
Synchronization request respond module, for the daily record synchronization request sent in response to described second server, returns the first daily record to second server.
8. first server according to claim 7, is characterized in that,
Synchronization request respond module also for receiving the data synchronization request that second server sends, therefrom parses keyword message; Search the local data fragmentation corresponding to the keyword message parsed; Data in the data fragmentation found are back to second server.
9. the second server in distributed memory system, is characterized in that, comprising:
Synchronization request sending module, for sending daily record synchronization request to first server;
Data simultaneous module, for the first daily record returned according to the described first server received, carries out data syn-chronization operation; Wherein, described first server and second server be fraternal server each other, and it is provided with the data fragmentation of same names.
10. second server according to claim 9, is characterized in that,
Synchronization request sending module, specifically for when described second server is under upper line states, periodically sends daily record synchronization request to first server; Or when described second server changes to presence from off-line state, send daily record synchronization request to first server.
CN201410843521.3A 2014-12-30 2014-12-30 Server of distributed storage system and data synchronizing method between servers Pending CN104506643A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410843521.3A CN104506643A (en) 2014-12-30 2014-12-30 Server of distributed storage system and data synchronizing method between servers

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410843521.3A CN104506643A (en) 2014-12-30 2014-12-30 Server of distributed storage system and data synchronizing method between servers

Publications (1)

Publication Number Publication Date
CN104506643A true CN104506643A (en) 2015-04-08

Family

ID=52948358

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410843521.3A Pending CN104506643A (en) 2014-12-30 2014-12-30 Server of distributed storage system and data synchronizing method between servers

Country Status (1)

Country Link
CN (1) CN104506643A (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104954474A (en) * 2015-06-19 2015-09-30 北京奇虎科技有限公司 Method and device for data updating in load balancing
CN105045638A (en) * 2015-08-20 2015-11-11 天脉聚源(北京)传媒科技有限公司 Method and device for acquiring software package information as well as method and device for installing software package
CN105933352A (en) * 2016-07-05 2016-09-07 广州华多网络科技有限公司 Data synchronization method and system between servers based on client and client
WO2017067415A1 (en) * 2015-10-22 2017-04-27 阿里巴巴集团控股有限公司 Data transmission method and device
WO2017084520A1 (en) * 2015-11-18 2017-05-26 阿里巴巴集团控股有限公司 Method and apparatus for synchronizing data files in a cloud environment
CN107347090A (en) * 2017-06-08 2017-11-14 广州市呼百应网络技术股份有限公司 Method of data synchronization
CN108776622A (en) * 2018-06-06 2018-11-09 北京达佳互联信息技术有限公司 Method of data synchronization, device, computer equipment and storage medium
CN109639755A (en) * 2018-10-23 2019-04-16 平安科技(深圳)有限公司 Interconnected system server decoupling method, device, medium and electronic equipment
WO2019076236A1 (en) * 2017-10-17 2019-04-25 中兴通讯股份有限公司 Data synchronization method and device, super controller, domain controller, and storage medium
CN109743379A (en) * 2018-12-27 2019-05-10 百视通网络电视技术发展有限责任公司 It is a kind of based on the multi-protocols distributed message service system communicated between server
CN110191146A (en) * 2019-03-21 2019-08-30 北京北信源软件股份有限公司 A kind of long-range retrieval method of file based on browser and system
CN111258739A (en) * 2020-01-20 2020-06-09 上海米哈游天命科技有限公司 Server process updating method, device, server and medium
CN111314479A (en) * 2016-06-20 2020-06-19 阿里巴巴集团控股有限公司 Data processing method and equipment
CN111506646A (en) * 2020-03-16 2020-08-07 阿里巴巴集团控股有限公司 Data synchronization method, device, system, storage medium and processor
CN112711630A (en) * 2019-10-24 2021-04-27 阿里巴巴集团控股有限公司 Data synchronization method, distributed cache node and system and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010052052A1 (en) * 2000-02-02 2001-12-13 Luosheng Peng Apparatus and methods for providing coordinated and personalized application and data management for resource-limited mobile devices
CN101132395A (en) * 2006-08-22 2008-02-27 阿里巴巴公司 Method and system for implementing data synchronization between servers
CN102917072A (en) * 2012-10-31 2013-02-06 北京奇虎科技有限公司 Device, system and method for carrying out data migration between data server clusters
CN103780636A (en) * 2012-10-17 2014-05-07 阿里巴巴集团控股有限公司 Cached data processing method and cached data processing system
CN104239310A (en) * 2013-06-08 2014-12-24 中国移动通信集团公司 Distributed database data synchronizing method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010052052A1 (en) * 2000-02-02 2001-12-13 Luosheng Peng Apparatus and methods for providing coordinated and personalized application and data management for resource-limited mobile devices
CN101132395A (en) * 2006-08-22 2008-02-27 阿里巴巴公司 Method and system for implementing data synchronization between servers
CN103780636A (en) * 2012-10-17 2014-05-07 阿里巴巴集团控股有限公司 Cached data processing method and cached data processing system
CN102917072A (en) * 2012-10-31 2013-02-06 北京奇虎科技有限公司 Device, system and method for carrying out data migration between data server clusters
CN104239310A (en) * 2013-06-08 2014-12-24 中国移动通信集团公司 Distributed database data synchronizing method and device

Cited By (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104954474B (en) * 2015-06-19 2019-08-02 北京奇虎科技有限公司 The method and device that data update in load balancing
CN104954474A (en) * 2015-06-19 2015-09-30 北京奇虎科技有限公司 Method and device for data updating in load balancing
CN105045638A (en) * 2015-08-20 2015-11-11 天脉聚源(北京)传媒科技有限公司 Method and device for acquiring software package information as well as method and device for installing software package
WO2017067415A1 (en) * 2015-10-22 2017-04-27 阿里巴巴集团控股有限公司 Data transmission method and device
CN106612308A (en) * 2015-10-22 2017-05-03 阿里巴巴集团控股有限公司 Data transmission method and device
US11201810B2 (en) 2015-10-22 2021-12-14 Alibaba Group Holding Limited Data transmission method and apparatus
US10735295B2 (en) 2015-10-22 2020-08-04 Alibaba Group Holding Limited Data transmission method and apparatus
EP3367634A4 (en) * 2015-10-22 2019-07-17 Alibaba Group Holding Limited METHOD AND DEVICE FOR DATA TRANSMISSION
WO2017084520A1 (en) * 2015-11-18 2017-05-26 阿里巴巴集团控股有限公司 Method and apparatus for synchronizing data files in a cloud environment
CN111314479B (en) * 2016-06-20 2022-08-23 北京奥星贝斯科技有限公司 Data processing method and equipment
CN111314479A (en) * 2016-06-20 2020-06-19 阿里巴巴集团控股有限公司 Data processing method and equipment
CN105933352A (en) * 2016-07-05 2016-09-07 广州华多网络科技有限公司 Data synchronization method and system between servers based on client and client
CN105933352B (en) * 2016-07-05 2019-05-31 广州华多网络科技有限公司 Method of data synchronization, client and system between client-based server
CN107347090A (en) * 2017-06-08 2017-11-14 广州市呼百应网络技术股份有限公司 Method of data synchronization
WO2019076236A1 (en) * 2017-10-17 2019-04-25 中兴通讯股份有限公司 Data synchronization method and device, super controller, domain controller, and storage medium
CN108776622A (en) * 2018-06-06 2018-11-09 北京达佳互联信息技术有限公司 Method of data synchronization, device, computer equipment and storage medium
CN109639755A (en) * 2018-10-23 2019-04-16 平安科技(深圳)有限公司 Interconnected system server decoupling method, device, medium and electronic equipment
CN109743379A (en) * 2018-12-27 2019-05-10 百视通网络电视技术发展有限责任公司 It is a kind of based on the multi-protocols distributed message service system communicated between server
CN109743379B (en) * 2018-12-27 2021-10-08 百视通网络电视技术发展有限责任公司 Multi-protocol distributed message service system based on communication between servers
CN110191146A (en) * 2019-03-21 2019-08-30 北京北信源软件股份有限公司 A kind of long-range retrieval method of file based on browser and system
CN112711630A (en) * 2019-10-24 2021-04-27 阿里巴巴集团控股有限公司 Data synchronization method, distributed cache node and system and readable storage medium
CN112711630B (en) * 2019-10-24 2024-05-17 阿里巴巴集团控股有限公司 Data synchronization method, distributed cache node, system and readable storage medium
CN111258739A (en) * 2020-01-20 2020-06-09 上海米哈游天命科技有限公司 Server process updating method, device, server and medium
CN111506646A (en) * 2020-03-16 2020-08-07 阿里巴巴集团控股有限公司 Data synchronization method, device, system, storage medium and processor
CN111506646B (en) * 2020-03-16 2023-05-02 阿里巴巴集团控股有限公司 Data synchronization method, device, system, storage medium and processor

Similar Documents

Publication Publication Date Title
CN104506643A (en) Server of distributed storage system and data synchronizing method between servers
EP3357217B1 (en) Peer-to-peer synchronization protocol for multi-premises hosting of digital content items
US10069942B2 (en) Method and apparatus for changing configurations
CN102148850B (en) Cluster system and service processing method thereof
RU2435206C2 (en) Reliable, efficient peer-to-peer storage
CN102411598B (en) Method and system for realizing data consistency
US20150237113A1 (en) Method and system for file transmission
US20150135255A1 (en) Client-configurable security options for data streams
US20080072264A1 (en) Distribution of content on a network
US20130238552A1 (en) Systems and methods for synchronizing files in a networked communication system
CN107818111B (en) Method for caching file data, server and terminal
US20130232187A1 (en) Systems and methods for managing data in a networked communication system
JP2017501515A (en) Data stream ingestion and persistence policy
JP2016536690A (en) Partition-based data stream processing framework
CN105338078A (en) Data storage method and device used for storing system
CN111338834B (en) Data storage method and device
CN105978948B (en) A kind of method and system of cloud service
CN103731507A (en) Data processing method and device of distributed data storage device
CN105069152A (en) Data processing method and apparatus
George et al. Hadoop MapReduce for mobile clouds
CN111382132A (en) Medical image data cloud storage system
CN112069152B (en) Database cluster upgrading method, device, equipment and storage medium
CN106850724B (en) Data pushing method and device
EP3579526A1 (en) Resource file feedback method and apparatus
CN112685486B (en) Data management method and device for database cluster, electronic equipment and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into 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: 20150408