WO2016101758A1 - Cross-cluster data synchronization method and device - Google Patents

Cross-cluster data synchronization method and device Download PDF

Info

Publication number
WO2016101758A1
WO2016101758A1 PCT/CN2015/095504 CN2015095504W WO2016101758A1 WO 2016101758 A1 WO2016101758 A1 WO 2016101758A1 CN 2015095504 W CN2015095504 W CN 2015095504W WO 2016101758 A1 WO2016101758 A1 WO 2016101758A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
cluster
timestamp information
expiration time
time
Prior art date
Application number
PCT/CN2015/095504
Other languages
French (fr)
Chinese (zh)
Inventor
李明昊
陈营
宋昭
陈宗志
王超
Original Assignee
北京奇虎科技有限公司
奇智软件(北京)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京奇虎科技有限公司, 奇智软件(北京)有限公司 filed Critical 北京奇虎科技有限公司
Publication of WO2016101758A1 publication Critical patent/WO2016101758A1/en

Links

Images

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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications
    • 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

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a data synchronization method and apparatus across a cluster.
  • the advantages of the cluster service system are not only low price and high availability, but also strong scalability, which is very popular among users in network applications.
  • a corresponding cache may be set for the cluster, wherein the cache may store part of the data in the database (such as frequently accessed data), so that the client can access the cluster.
  • the data is read from the cache, and when the cache hit fails, the database is queried, so that the access frequency to the database can be reduced, and the running performance of the application can be improved.
  • the present invention has been made in order to provide a cross-cluster data synchronization method and apparatus that overcomes the above problems or at least partially solves the above problems.
  • a data synchronization method across a cluster including:
  • the first timestamp information is a set of a first expiration time of the data and a sending time when the data is sent by the first cluster ;
  • a write operation is performed on the data and the second expiration time corresponding to the data to be stored in the second cluster.
  • a computer program comprising computer readable code
  • the computing device is caused to perform the cross-cluster data synchronization method described above.
  • a cross-cluster data synchronization apparatus including:
  • a first receiving module configured to receive data from the first cluster and corresponding first timestamp information, where the first timestamp information is a first expiration time of the data and the data is used by the first cluster a collection of times when sending;
  • Generating a module configured to generate a second expiration time corresponding to the data according to the first timestamp information and a corresponding receiving time thereof;
  • a write module configured to perform a write operation on the data and a second expiration time corresponding to the data to be stored in the second cluster.
  • a cross-cluster data synchronization method and apparatus receives data from a first cluster and corresponding first timestamp information, and according to the first timestamp information and a corresponding receiving time thereof, Generating a second expiration time corresponding to the data; and generating a second expiration because the first timestamp information is a set of a first expiration time of the data and a sending time when the data is sent by the first cluster
  • the receiving time corresponding to the first timestamp information is considered in the process of time, that is, the influence of the transmission time on the first expiration time is considered, so that the synchronization of the time-sensitive data in the first cluster and the second cluster can be ensured.
  • FIG. 1 is a flow chart showing the steps of a cross-cluster data synchronization method according to an embodiment of the present invention
  • FIG. 2 is a flow chart showing the steps of a data synchronization method across a cluster according to an embodiment of the present invention
  • FIG. 3 is a flow chart showing the steps of a cross-cluster data synchronization method according to an example of the present invention.
  • FIG. 4 is a flow chart showing the steps of a cross-cluster data synchronization method according to an embodiment of the present invention.
  • FIG. 5 is a flow chart showing the steps of a cross-cluster data synchronization method according to an embodiment of the present invention.
  • FIG. 6 is a flow chart showing the steps of a data synchronization method across a cluster according to an embodiment of the present invention
  • FIG. 7 is a schematic structural diagram of a cluster system according to an embodiment of the present invention.
  • FIG. 8 is a flow chart showing the steps of a data processing method of the cache 1 shown in FIG. 7 according to an embodiment of the present invention
  • FIG. 9 is a schematic structural diagram of a data synchronization device across a cluster according to an embodiment of the present invention.
  • Figure 10 schematically shows a block diagram of a computing device for performing the method according to the invention
  • Fig. 11 schematically shows a storage unit for holding or carrying program code implementing the method according to the invention.
  • the schematic diagram of the step process may specifically include the following steps:
  • Step 101 Receive data from the first cluster and corresponding first timestamp information, where the first timestamp information is a first expiration time of the data and a sending when the data is sent by the first cluster a collection of time;
  • Step 102 Generate a second expiration time corresponding to the data according to the first timestamp information and a corresponding receiving time thereof;
  • Step 103 Perform a write operation on the data and a second expiration time corresponding to the data to be stored in the second cluster.
  • the embodiment of the present invention can be applied to a cluster system of various service scenarios for performing data synchronization across a cluster, where the cluster unit can be an IDC (Internet Data Center) or a computer room, etc., in the embodiment of the present invention. There are no restrictions on specific cluster units.
  • a write interface that sets an expiration time can be provided for the data, and the write interface can be used to set the expiration time of the data when the data is written.
  • the write interface set_with_ttl(key, value, ttl) interface can be used to simultaneously write the expiration time ttl of the key-value specified key-value, so that the data collation process can be based on the ttl
  • the key-value is sorted. For example, after the ttl expires, the key-value can be deleted.
  • Embodiments of the present invention can be used for synchronization of time-sensitive data across clusters.
  • the data synchronization process between the IDCl and the ID2 is triggered, and the data synchronization process may be specifically performed.
  • IDC1 sends the key-value and its corresponding ttl1 to IDC2; after receiving the key-value and its corresponding ttl1, the IDC2 side also writes the key-value by calling the set_with_ttl(key, value, ttl) interface. Corresponds to ttl1.
  • the above data synchronization process does not consider the transmission time of the data, and thus causes the synchronization of the time-sensitive data in IDC1 and IDC2. Assuming that ttl1 is 100s and the key-value transmission time is 10s, then the ID-side key-value will expire after 100s, and the IDC2 side key-value will be after 110s. Expired, obviously, The key-values in IDC1 and IDC2 are not synchronized.
  • the first cluster and the second cluster may be a triggering party and a receiving party of the data synchronization, where the first cluster may send the data to the second cluster when the data stored in the second cluster changes.
  • Corresponding first timestamp information wherein the first timestamp information is a set of an expiration time of the data and a sending time when the data is sent by the first cluster.
  • the data when a write operation is performed on the second expiration time corresponding to the data and the data to be stored in the second cluster, the data may be written into a database or a cache of the cluster, which is in the embodiment of the present invention.
  • the specific write position is not limited.
  • the data from the first cluster and the corresponding first timestamp information are received, and the second corresponding to the data is generated according to the first timestamp information and the corresponding receiving time.
  • An expiration time wherein the first timestamp information is a set of a first expiration time of the data and a transmission time when the data is sent by the first cluster, and the second expiration time is considered in the process of generating the second expiration time
  • the receiving time corresponding to the first timestamp information that is, the influence of the transmission time on the first expiration time, is considered, so that the synchronization of the time-sensitive data in the first cluster and the second cluster can be ensured.
  • FIG. 2 a schematic flowchart of a step of a data synchronization method for a cross-cluster according to an embodiment of the present invention is shown.
  • Step 201 Receive data from the first cluster and corresponding first timestamp information, where the first timestamp information is a first expiration time of the data and a sending when the data is sent by the first cluster a collection of time;
  • Step 202 Record, when receiving data from the first cluster and the corresponding first timestamp information, record a corresponding receiving time;
  • Step 203 Read the first timestamp information.
  • Step 204 Acquire a second expiration time corresponding to the data according to the first timestamp information and the receiving time;
  • Step 205 Perform a write operation on the data and the second expiration time corresponding to the data to be stored in the second cluster.
  • the process of generating the second expiration time corresponding to the data according to the first timestamp information and the corresponding receiving time by the second cluster is implemented by the step 202 and the step 204 in the embodiment. Since the receiving time corresponding to the first timestamp information is considered in the process of generating the second expiration time, that is, the influence of the transmission time on the first expiration time is considered, so that the first cluster and the second cluster can be guaranteed. Synchronization of time-sensitive data.
  • FIG. 3 a flow chart of the steps of a data synchronization method for a cross-cluster according to an example of the present invention is shown, which may specifically include the following steps:
  • Step 302 IDC2 receives the key, value and expired_time, and records the corresponding receiving time current_timel;
  • Step 304 IDC2 performs a write operation on key, value, and tt2.
  • the first expiration time ttl1 of the data is 100s
  • the transmission time current_time when the data is transmitted by the first cluster is 1:50
  • the reception time current_time1 for the first timestamp information is 2:00
  • FIG. 4 a schematic flowchart of a step of a data synchronization method for a cross-cluster according to an embodiment of the present invention is shown.
  • Step 401 Receive data from the first cluster and corresponding first timestamp information, where the first timestamp information is a first expiration time of the data and a sending when the data is sent by the first cluster a collection of time;
  • Step 402 Record, when receiving data from the first cluster and the corresponding first timestamp information, record a corresponding receiving time;
  • Step 403 Acquire, according to the first timestamp information, a sending time corresponding to the first expiration time and the first expiration time;
  • Step 404 Obtain a second expiration time corresponding to the data according to the first expiration time, the sending time and the receiving time corresponding to the first expiration time, and
  • Step 405 Perform a write operation on the data and the second expiration time corresponding to the data to be stored in the second cluster.
  • the process of generating the second expiration time corresponding to the data according to the first timestamp information and the corresponding receiving time of the second cluster is implemented by the step 402 and the step 404.
  • FIG. 5 a schematic flowchart of a step of a data synchronization method for a cross-cluster according to an embodiment of the present invention is shown.
  • Step 501 Receive data from the first cluster and corresponding first timestamp information, where the first timestamp information is a first expiration time of the data and a sending when the data is sent by the first cluster a collection of time;
  • Step 502 Generate a second expiration time corresponding to the data according to the first timestamp information and the corresponding receiving time.
  • Step 503 Perform a write operation on the data and a second expiration time corresponding to the data to be stored in the second cluster;
  • Step 504 When the data stored in the second cluster changes, send the change data and the corresponding second timestamp information to the first cluster, where the second timestamp information is a third expiration time of the data. And a set of transmission times when the change data is transmitted by the second cluster.
  • the embodiment may further change the data stored in the second cluster.
  • the first cluster sends the change data and the corresponding second timestamp information, that is, the data synchronization of the first cluster to the second cluster can be implemented, and the data synchronization of the second cluster to the first cluster can also be implemented.
  • the method may further include: receiving, after the data stored in the first cluster changes, the changed data sent by the first cluster and the corresponding third timestamp information;
  • the third timestamp information is a set of an expiration time of the changed data and a sending time when the changed data is sent by the first cluster.
  • the method may further include: generating, according to the third timestamp information and the corresponding receiving time, a fourth expiration time corresponding to the changed data; and utilizing And receiving the changed data and the fourth expiration time, and updating the second expiration time corresponding to the data stored in the second cluster and the data.
  • the process of updating the data stored in the second cluster and the second expiration time corresponding to the data may be: updating key-value-ttl2 to key-value-ttl4.
  • FIG. 6 a schematic flowchart of a step of a data synchronization method for a cross-cluster according to an embodiment of the present invention is shown.
  • Step 601 Receive data from the first cluster and corresponding first timestamp information, where the first timestamp information is a first expiration time of the data and a sending when the data is sent by the first cluster a collection of time;
  • Step 602 Generate a second expiration time corresponding to the data according to the first timestamp information and a corresponding receiving time thereof;
  • Step 603 Write the second expiration time corresponding to the data and the data to the cache system of the second cluster.
  • the embodiment may write the data and the second expiration time corresponding to the data into the cache system of the second cluster, so that data synchronization across the cluster cache can be implemented.
  • FIG. 7 a schematic structural diagram of a cluster system according to an embodiment of the present invention may be further illustrated, which may include: IDC1 and IDC2, wherein the IDC1 side is provided with a client 1 and a cache 1, and the IDC2 side is provided with a client. 2 and cache 2, IDC1 and IDC2 have a common database, which is connected to cache 1 and cache 2 respectively, and client 1 can send a read request or a write request to cache 1, and client 2 can send a read request to cache 2. Or the write request, and when the data stored in the cache 1 or the cache 2 changes, the data synchronization process to another cache may be triggered, and the cache 1 is taken as an example. 1 New data is written to the cache, or the database writes new data to the cache, and so on.
  • FIG. 8 is a flow chart showing the steps of the data processing method of the cache 1 shown in FIG. 7 according to an embodiment of the present invention. Specifically, the method may include the following steps:
  • Step 801 the cache 1 receives a read request from the client 1;
  • Step 802 the cache 1 determines whether it has the data corresponding to the read request, and if so, step 803 is performed, otherwise step 804 is performed;
  • Step 803 the cache 1 returns the first data corresponding to the read request to the client 1;
  • Step 804 the cache 1 requests the database to forward the read request, and receives the first data corresponding to the read request returned by the database and the expiration time of the first data, and performs the steps 803 and 805;
  • Step 805 The cache 1 sends the first data and its corresponding fourth timestamp information to the cache 2, where the fourth timestamp information is an expiration time of the first data and the first data is cached. 1 a collection of transmission times at the time of transmission;
  • Step 806 the cache 1 receives a write request from the client 1;
  • Step 807 The cache 1 writes the expiration time of the second data and the second data corresponding to the write request to the cache, and sends the second data and the corresponding fifth timestamp information to the cache 2;
  • the fifth timestamp information is a set of an expiration time of the second data and a transmission time when the second data is sent by the cache 1.
  • FIG. 9 is a schematic structural diagram of a data synchronization device for a cross-cluster according to an embodiment of the present invention.
  • the device may be configured as a second cluster side, and may specifically include the following modules:
  • the first receiving module 901 is configured to receive data from the first cluster and corresponding first timestamp information, where the first timestamp information is a first expiration time of the data and the data is first a collection of transmission times when the cluster is sent;
  • the generating module 902 is configured to generate a second expiration time corresponding to the data according to the first timestamp information and its corresponding receiving time;
  • the writing module 903 is configured to perform a write operation on the data and a second expiration time corresponding to the data to be stored in the second cluster.
  • the generating module 902 may further include:
  • a first recording submodule configured to record a corresponding receiving time when receiving data from the first cluster and corresponding first timestamp information
  • Reading a submodule configured to read the first timestamp information
  • the first obtaining submodule is configured to acquire a second expiration time corresponding to the data according to the first timestamp information and the receiving time.
  • the generating module 902 may further include:
  • a second recording submodule configured to record a corresponding receiving time when receiving data from the first cluster and the corresponding first timestamp information
  • a second obtaining submodule configured to acquire, according to the first timestamp information, a sending time corresponding to the first expiration time and the first expiration time;
  • the third obtaining sub-module is configured to acquire a second expiration time corresponding to the data according to the first expiration time, the sending time and the receiving time corresponding to the first expiration time.
  • the writing module 903 may be specifically configured to write the data and the second expiration time corresponding to the data into the cache system of the second cluster.
  • the apparatus may further include:
  • a sending module configured to send the change data and the corresponding second timestamp information to the first cluster when the data stored in the second cluster changes; wherein the second timestamp information is the third of the data The set of expiration times and the transmission time when the change data is transmitted by the second cluster.
  • the device may further include:
  • the second receiving module is configured to receive the changed data and the corresponding third timestamp information sent by the first cluster when the data stored in the first cluster changes; wherein the third timestamp information is The set of the expiration time of the changed data and the transmission time when the changed data is transmitted by the first cluster.
  • the device may further include:
  • a generating module configured to generate a fourth expiration time corresponding to the changed data according to the third timestamp information and a corresponding receiving time thereof;
  • an update module configured to update the data stored in the second cluster and the second expiration time corresponding to the data by using the received changed data and the fourth expiration time.
  • the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
  • the various component embodiments of the present invention may be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof.
  • a microprocessor or digital signal processor may be used in practice to implement some or all of some or all of the components of the cross-cluster data synchronization method and apparatus in accordance with embodiments of the present invention.
  • the invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein.
  • Such a program implementing the present invention may be stored on a computer readable medium or may have one or The form of multiple signals. Such signals may be downloaded from an internet platform, provided on a carrier signal, or provided in any other form.
  • Figure 10 illustrates a computing device, such as a search engine server, that can implement the above described method in accordance with the present invention.
  • the computing device conventionally includes a processor 1010 and a computer program product or computer readable medium in the form of a memory 1030.
  • the memory 1030 may be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read Only Memory), an EPROM, a hard disk, or a ROM.
  • the memory 1030 has a storage space 1050 that stores program code 1051 for performing any of the method steps described above.
  • storage space 1050 storing program code may include various program codes 1051 for implementing various steps in the above methods, respectively.
  • the program code can be read from or written to one or more computer program products.

Abstract

Provided are a cross-cluster data synchronization method and device. The method specifically comprises: receiving data from a first cluster and first timestamp information corresponding thereto, wherein the first timestamp information is a set of a first expiration time of the data and a sending time when the data is sent by the first cluster; according to the first timestamp information and a receiving time corresponding thereto, generating a second expiration time corresponding to the data; and executing a write-in operation on the data and the second expiration time corresponding to the data, so as to store same in a second cluster. The embodiments of the present invention can guarantee the synchronization of timeliness data in a first cluster and a second cluster.

Description

一种跨集群的数据同步方法和装置Cross-cluster data synchronization method and device 技术领域Technical field
本发明涉及通信技术领域,特别是涉及一种跨集群的数据同步方法和装置。The present invention relates to the field of communications technologies, and in particular, to a data synchronization method and apparatus across a cluster.
背景技术Background technique
与大型机相比,集群服务系统的优势,不仅在于低廉的价格和其高可用性,还具有很强的可扩展性,因而在网络应用中备受用户的青睐。Compared with the mainframe, the advantages of the cluster service system are not only low price and high availability, but also strong scalability, which is very popular among users in network applications.
为了降低应用程序客户端对集群中数据库的访问频次,可以针对集群设置相应的缓存,其中,缓存中可以存储数据库中的部分数据(如频繁访问的数据),这样,客户端在访问集群时可以首先从缓存中读取数据,当缓存命中失败时再去查询数据库,因此能够降低对数据库的访问频次,且能够提高应用程序的运行性能。In order to reduce the frequency of application client access to the database in the cluster, a corresponding cache may be set for the cluster, wherein the cache may store part of the data in the database (such as frequently accessed data), so that the client can access the cluster. First, the data is read from the cache, and when the cache hit fails, the database is queried, so that the access frequency to the database can be reduced, and the running performance of the application can be improved.
目前,由于各集群中缓存均可以接收并处理客户端的访问请求,因此,跨集群缓存的数据同步变得尤为重要。Currently, data synchronization across clusters is especially important because caches in each cluster can receive and process client access requests.
发明内容Summary of the invention
鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决上述问题的一种跨集群的数据同步方法和装置。In view of the above problems, the present invention has been made in order to provide a cross-cluster data synchronization method and apparatus that overcomes the above problems or at least partially solves the above problems.
依据本发明的一个方面,提供了一种跨集群的数据同步方法,包括:According to an aspect of the present invention, a data synchronization method across a cluster is provided, including:
接收来自第一集群的数据及其对应的第一时间戳信息;其中,所述第一时间戳信息为所述数据的第一过期时间与所述数据被第一集群发送时的发送时间的集合;Receiving data from the first cluster and corresponding first timestamp information; wherein the first timestamp information is a set of a first expiration time of the data and a sending time when the data is sent by the first cluster ;
依据所述第一时间戳信息及其对应的接收时间,生成所述数据对应的第二过期时间;以及Generating a second expiration time corresponding to the data according to the first timestamp information and its corresponding receiving time;
对所述数据和所述数据对应的第二过期时间执行写入操作以存储在第二集群。A write operation is performed on the data and the second expiration time corresponding to the data to be stored in the second cluster.
根据本发明的另一方面,提供了一种计算机程序,包括计算机可读代码, 当所述计算机可读代码在计算设备上运行时,导致所述计算设备执行上文所述的的跨集群的数据同步方法。According to another aspect of the present invention, a computer program comprising computer readable code is provided, When the computer readable code is run on a computing device, the computing device is caused to perform the cross-cluster data synchronization method described above.
根据本发明的再一方面,提供了一种计算机可读介质,其中存储了上文所述的计算机程序。According to still another aspect of the present invention, there is provided a computer readable medium storing the computer program described above.
依据本发明的又一方面,提供了一种跨集群的数据同步装置,包括:According to still another aspect of the present invention, a cross-cluster data synchronization apparatus is provided, including:
第一接收模块,配置为接收来自第一集群的数据及其对应的第一时间戳信息;其中,所述第一时间戳信息为所述数据的第一过期时间与所述数据被第一集群发送时的时间的集合;a first receiving module, configured to receive data from the first cluster and corresponding first timestamp information, where the first timestamp information is a first expiration time of the data and the data is used by the first cluster a collection of times when sending;
生成模块,配置为依据所述第一时间戳信息及其对应的接收时间,生成所述数据对应的第二过期时间;以及Generating a module, configured to generate a second expiration time corresponding to the data according to the first timestamp information and a corresponding receiving time thereof;
写入模块,配置为对所述数据和所述数据对应的第二过期时间执行写入操作以存储在第二集群。And a write module configured to perform a write operation on the data and a second expiration time corresponding to the data to be stored in the second cluster.
根据本发明实施例的一种跨集群的数据同步方法和装置,接收来自第一集群的数据及其对应的第一时间戳信息,并依据所述第一时间戳信息及其对应的接收时间,生成所述数据对应的第二过期时间;由于所述第一时间戳信息为所述数据的第一过期时间与所述数据被第一集群发送时的发送时间的集合,而在生成第二过期时间的过程中考虑了所述第一时间戳信息对应的接收时间,也即考虑了传输时间对于第一过期时间的影响,因此能够保证第一集群和第二集群中时效性数据的同步。A cross-cluster data synchronization method and apparatus according to an embodiment of the present invention receives data from a first cluster and corresponding first timestamp information, and according to the first timestamp information and a corresponding receiving time thereof, Generating a second expiration time corresponding to the data; and generating a second expiration because the first timestamp information is a set of a first expiration time of the data and a sending time when the data is sent by the first cluster The receiving time corresponding to the first timestamp information is considered in the process of time, that is, the influence of the transmission time on the first expiration time is considered, so that the synchronization of the time-sensitive data in the first cluster and the second cluster can be ensured.
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solutions of the present invention, and the above-described and other objects, features and advantages of the present invention can be more clearly understood. Specific embodiments of the invention are set forth below.
附图说明DRAWINGS
通过阅读下文可选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出可选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中: Various other advantages and benefits will become apparent to those skilled in the art from a The drawings are only for the purpose of illustrating alternative embodiments and are not to be considered as limiting. Throughout the drawings, the same reference numerals are used to refer to the same parts. In the drawing:
图1示出了根据本发明一个实施例的一种跨集群的数据同步方法的步骤流程示意图;1 is a flow chart showing the steps of a cross-cluster data synchronization method according to an embodiment of the present invention;
图2示出了根据本发明一个实施例的一种跨集群的数据同步方法的步骤流程示意图;2 is a flow chart showing the steps of a data synchronization method across a cluster according to an embodiment of the present invention;
图3示出了根据本发明一个示例的一种跨集群的数据同步方法的步骤流程示意图;3 is a flow chart showing the steps of a cross-cluster data synchronization method according to an example of the present invention;
图4示出了根据本发明一个实施例的一种跨集群的数据同步方法的步骤流程示意图;4 is a flow chart showing the steps of a cross-cluster data synchronization method according to an embodiment of the present invention;
图5示出了根据本发明一个实施例的一种跨集群的数据同步方法的步骤流程示意图;FIG. 5 is a flow chart showing the steps of a cross-cluster data synchronization method according to an embodiment of the present invention;
图6示出了根据本发明一个实施例的一种跨集群的数据同步方法的步骤流程示意图;6 is a flow chart showing the steps of a data synchronization method across a cluster according to an embodiment of the present invention;
图7示出了根据本发明一个实施例的一种集群系统的结构示意图;FIG. 7 is a schematic structural diagram of a cluster system according to an embodiment of the present invention; FIG.
图8示出了根据本发明一个实施例的一种图7所示缓存1的数据处理方法的步骤流程示意图;FIG. 8 is a flow chart showing the steps of a data processing method of the cache 1 shown in FIG. 7 according to an embodiment of the present invention;
图9示出了根据本发明一个实施例的一种跨集群的数据同步装置的结构示意图;FIG. 9 is a schematic structural diagram of a data synchronization device across a cluster according to an embodiment of the present invention; FIG.
图10示意性地示出了用于执行根据本发明的方法的计算设备的框图;以及Figure 10 schematically shows a block diagram of a computing device for performing the method according to the invention;
图11示意性地示出了用于保持或者携带实现根据本发明的方法的程序代码的存储单元。Fig. 11 schematically shows a storage unit for holding or carrying program code implementing the method according to the invention.
具体实施方式detailed description
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While the embodiments of the present invention have been shown in the drawings, the embodiments Rather, these embodiments are provided so that this disclosure will be more fully understood and the scope of the disclosure will be fully disclosed.
参照图1,示出了根据本发明一个实施例的一种跨集群的数据同步方法 的步骤流程示意图,具体可以包括如下步骤:Referring to FIG. 1, a data synchronization method across a cluster according to an embodiment of the present invention is illustrated. The schematic diagram of the step process may specifically include the following steps:
步骤101、接收来自第一集群的数据及其对应的第一时间戳信息;其中,所述第一时间戳信息为所述数据的第一过期时间与所述数据被第一集群发送时的发送时间的集合;Step 101: Receive data from the first cluster and corresponding first timestamp information, where the first timestamp information is a first expiration time of the data and a sending when the data is sent by the first cluster a collection of time;
步骤102、依据所述第一时间戳信息及其对应的接收时间,生成所述数据对应的第二过期时间;以及Step 102: Generate a second expiration time corresponding to the data according to the first timestamp information and a corresponding receiving time thereof;
步骤103、对所述数据和所述数据对应的第二过期时间执行写入操作以存储在第二集群。Step 103: Perform a write operation on the data and a second expiration time corresponding to the data to be stored in the second cluster.
本发明实施例可以应用于各种业务场景的集群系统中,用于进行跨集群的数据同步,其中的集群单位可以为IDC(互联网数据中心,Intemet Data Center)或者机房等等,本发明实施例对具体的集群单位不加以限制。The embodiment of the present invention can be applied to a cluster system of various service scenarios for performing data synchronization across a cluster, where the cluster unit can be an IDC (Internet Data Center) or a computer room, etc., in the embodiment of the present invention. There are no restrictions on specific cluster units.
对于集群的某些业务场景而言,其数据往往具有一定的时效性。另外,为了提高缓存的命中率,集群中缓存的数据也需要具有一定的时效性,以通过更新缓存来适应业务场景数据的变化。为了实现时效性管理,可以针对数据提供设置过期时间的写入接口,该写入接口可用于在写入数据时设置数据的过期时间。例如,在本发明的一种应用示例中,写入接口set_with_ttl(key,value,ttl)接口可用于同时写入key-value指定key-value的过期时间ttl,以使得数据整理流程可以依据该ttl实现对key-value的整理,例如,在ttl过期后,可以对key-value执行删除操作。For some business scenarios of a cluster, its data tends to be time-sensitive. In addition, in order to improve the cache hit rate, the data cached in the cluster also needs to be time-sensitive to adapt to changes in the business scenario data by updating the cache. In order to achieve time-sensitive management, a write interface that sets an expiration time can be provided for the data, and the write interface can be used to set the expiration time of the data when the data is written. For example, in an application example of the present invention, the write interface set_with_ttl(key, value, ttl) interface can be used to simultaneously write the expiration time ttl of the key-value specified key-value, so that the data collation process can be based on the ttl The key-value is sorted. For example, after the ttl expires, the key-value can be deleted.
本发明实施例可用于跨集群的时效性数据的同步。传统方案中,IDCl侧发生通过调用set_with_ttl(key,value,ttl)接口写入key-value及其对应ttl1的事件后,会触发IDCl与ID2之间的数据同步流程,所述数据同步流程具体可以包括:IDC1将key-value及其对应的ttl1发送至IDC2;IDC2侧在接收到key-value及其对应的ttl1后,也通过调用set_with_ttl(key,value,ttl)接口写入key-value及其对应ttl1。上述数据同步流程未考虑数据的传输时间,因此会引起IDC1和IDC2中时效性数据的不同步。假设ttl1为100s,key-value的传输时间为10s,那么,从IDC1侧写入key-value的时刻算起,IDC侧key-value将在100s后过期,而IDC2侧key-value将在110s后过期,显然, IDC1和IDC2中key-value是不同步的。Embodiments of the present invention can be used for synchronization of time-sensitive data across clusters. In the conventional solution, after the event of the key_value and its corresponding ttl1 is written by the set_with_ttl (key, value, ttl) interface, the data synchronization process between the IDCl and the ID2 is triggered, and the data synchronization process may be specifically performed. Including: IDC1 sends the key-value and its corresponding ttl1 to IDC2; after receiving the key-value and its corresponding ttl1, the IDC2 side also writes the key-value by calling the set_with_ttl(key, value, ttl) interface. Corresponds to ttl1. The above data synchronization process does not consider the transmission time of the data, and thus causes the synchronization of the time-sensitive data in IDC1 and IDC2. Assuming that ttl1 is 100s and the key-value transmission time is 10s, then the ID-side key-value will expire after 100s, and the IDC2 side key-value will be after 110s. Expired, obviously, The key-values in IDC1 and IDC2 are not synchronized.
本发明实施例中,第一集群和第二集群可以为数据同步的触发方和接收方,其中,第一集群在第二集群存储的数据发生变化时,可以向第二集群发送该数据及其对应的第一时间戳信息;其中,所述第一时间戳信息为所述数据的过期时间与所述数据被第一集群发送时的发送时间的集合。In the embodiment of the present invention, the first cluster and the second cluster may be a triggering party and a receiving party of the data synchronization, where the first cluster may send the data to the second cluster when the data stored in the second cluster changes. Corresponding first timestamp information; wherein the first timestamp information is a set of an expiration time of the data and a sending time when the data is sent by the first cluster.
在具体实现中,在对所述数据和所述数据对应的第二过期时间执行写入操作以存储在第二集群时,可以将所述数据写入集群的数据库或者缓存,本发明实施例对具体的写入位置不加以限制。In a specific implementation, when a write operation is performed on the second expiration time corresponding to the data and the data to be stored in the second cluster, the data may be written into a database or a cache of the cluster, which is in the embodiment of the present invention. The specific write position is not limited.
综上,本发明实施例中,接收来自第一集群的数据及其对应的第一时间戳信息,并依据所述第一时间戳信息及其对应的接收时间,生成所述数据对应的第二过期时间;由于所述第一时间戳信息为所述数据的第一过期时间与所述数据被第一集群发送时的发送时间的集合,而在生成第二过期时间的过程中考虑了所述第一时间戳信息对应的接收时间,也即考虑了传输时间对于第一过期时间的影响,因此能够保证第一集群和第二集群中时效性数据的同步。In summary, in the embodiment of the present invention, the data from the first cluster and the corresponding first timestamp information are received, and the second corresponding to the data is generated according to the first timestamp information and the corresponding receiving time. An expiration time; wherein the first timestamp information is a set of a first expiration time of the data and a transmission time when the data is sent by the first cluster, and the second expiration time is considered in the process of generating the second expiration time The receiving time corresponding to the first timestamp information, that is, the influence of the transmission time on the first expiration time, is considered, so that the synchronization of the time-sensitive data in the first cluster and the second cluster can be ensured.
参照图2,示出了根据本发明一个实施例的一种跨集群的数据同步方法的步骤流程示意图,具体可以包括如下步骤:Referring to FIG. 2, a schematic flowchart of a step of a data synchronization method for a cross-cluster according to an embodiment of the present invention is shown.
步骤201、接收来自第一集群的数据及其对应的第一时间戳信息;其中,所述第一时间戳信息为所述数据的第一过期时间与所述数据被第一集群发送时的发送时间的集合;Step 201: Receive data from the first cluster and corresponding first timestamp information, where the first timestamp information is a first expiration time of the data and a sending when the data is sent by the first cluster a collection of time;
步骤202、在接收来自第一集群的数据及其对应的第一时间戳信息时,记录对应的接收时间;Step 202: Record, when receiving data from the first cluster and the corresponding first timestamp information, record a corresponding receiving time;
步骤203、读取所述第一时间戳信息;Step 203: Read the first timestamp information.
步骤204、依据所述第一时间戳信息与所述接收时间,获取所述数据对应的第二过期时间;以及Step 204: Acquire a second expiration time corresponding to the data according to the first timestamp information and the receiving time;
步骤205、对所述数据和所述数据对应的第二过期时间执行写入操作以存储在第二集群。 Step 205: Perform a write operation on the data and the second expiration time corresponding to the data to be stored in the second cluster.
相对于图1所示实施例,本实施例通过步骤202和步骤204来实现第二集群依据所述第一时间戳信息及其对应的接收时间,生成所述数据对应的第二过期时间的过程;由于在生成第二过期时间的过程中考虑了所述第一时间戳信息对应的接收时间,也即考虑了传输时间对于第一过期时间的影响,因此能够保证第一集群和第二集群中时效性数据的同步。The process of generating the second expiration time corresponding to the data according to the first timestamp information and the corresponding receiving time by the second cluster is implemented by the step 202 and the step 204 in the embodiment. Since the receiving time corresponding to the first timestamp information is considered in the process of generating the second expiration time, that is, the influence of the transmission time on the first expiration time is considered, so that the first cluster and the second cluster can be guaranteed. Synchronization of time-sensitive data.
为使本领域技术人员更好地理解本发明,参照图3,示出了根据本发明一个示例的一种跨集群的数据同步方法的步骤流程示意图,具体可以包括如下步骤:For a better understanding of the present invention by those skilled in the art, with reference to FIG. 3, a flow chart of the steps of a data synchronization method for a cross-cluster according to an example of the present invention is shown, which may specifically include the following steps:
步骤301、IDC1在写入key-value-ttl1后,生成第一时间戳信息expired_time=ttl1+current_time,并将key、value和expired_time传输至IDC2;其中,ttl为key-value的第一过期时间;Step 301: After writing key-value-ttl1, IDC1 generates first timestamp information expired_time=ttl1+current_time, and transmits key, value, and expired_time to IDC2; wherein, ttl is the first expiration time of key-value;
步骤302、IDC2接收到key、value和expired_time,并记录对应的接收时间current_timel; Step 302, IDC2 receives the key, value and expired_time, and records the corresponding receiving time current_timel;
步骤303、IDC2生成第二过期时间ttl2=expired_time-current_time1; Step 303, IDC2 generates a second expiration time ttl2=expired_time-current_time1;
步骤304IDC2对key、value和tt2执行写入操作。Step 304 IDC2 performs a write operation on key, value, and tt2.
假设所述数据的第一过期时间ttl1为100s,所述数据被第一集群发送时的发送时间current_time为1:50,进一步假设对于所述第一时间戳信息的接收时间current_timel为2:00,那么,依据所述第一时间戳信息及其对应的接收时间,生成所述数据对应的第二过期时间为:100s+1:50-2:00=90s,因此能够保证第一集群和第二集群中时效性数据的同步。It is assumed that the first expiration time ttl1 of the data is 100s, and the transmission time current_time when the data is transmitted by the first cluster is 1:50, further assuming that the reception time current_time1 for the first timestamp information is 2:00, Then, according to the first timestamp information and the corresponding receiving time, the second expiration time corresponding to the data is generated: 100s+1:50-2:00=90s, so the first cluster and the second group can be guaranteed. Synchronization of time-sensitive data in a cluster.
参照图4,示出了根据本发明一个实施例的一种跨集群的数据同步方法的步骤流程示意图,具体可以包括如下步骤:Referring to FIG. 4, a schematic flowchart of a step of a data synchronization method for a cross-cluster according to an embodiment of the present invention is shown.
步骤401、接收来自第一集群的数据及其对应的第一时间戳信息;其中,所述第一时间戳信息为所述数据的第一过期时间与所述数据被第一集群发送时的发送时间的集合;Step 401: Receive data from the first cluster and corresponding first timestamp information, where the first timestamp information is a first expiration time of the data and a sending when the data is sent by the first cluster a collection of time;
步骤402、在接收来自第一集群的数据及其对应的第一时间戳信息时,记录对应的接收时间; Step 402: Record, when receiving data from the first cluster and the corresponding first timestamp information, record a corresponding receiving time;
步骤403、依据所述第一时间戳信息获取所述第一过期时间和所述第一过期时间对应的发送时间;Step 403: Acquire, according to the first timestamp information, a sending time corresponding to the first expiration time and the first expiration time;
步骤404、依据所述第一过期时间、所述第一过期时间对应的发送时间和接收时间,获取所述数据对应的第二过期时间;以及Step 404: Obtain a second expiration time corresponding to the data according to the first expiration time, the sending time and the receiving time corresponding to the first expiration time, and
步骤405、对所述数据和所述数据对应的第二过期时间执行写入操作以存储在第二集群。Step 405: Perform a write operation on the data and the second expiration time corresponding to the data to be stored in the second cluster.
相对于图1所示实施例,本实施例通过步骤402和步骤404来实现第二集群依据所述第一时间戳信息及其对应的接收时间,生成所述数据对应的第二过期时间的过程,其中,步骤404获取所述数据对应的第二过期时间的过程可以为:第二过期时间=第一过期时间+(接收时间-发送时间);由于接收时间与发送时间的差值为传输时间,也即在生成第二过期时间的过程中考虑了传输时间对于第一过期时间的影响,因此能够保证第一集群和第二集群中时效性数据的同步。The process of generating the second expiration time corresponding to the data according to the first timestamp information and the corresponding receiving time of the second cluster is implemented by the step 402 and the step 404. The process of obtaining the second expiration time corresponding to the data in step 404 may be: second expiration time=first expiration time+(reception time-transmission time); since the difference between the reception time and the transmission time is the transmission time That is, in the process of generating the second expiration time, the influence of the transmission time on the first expiration time is considered, so that the synchronization of the time-sensitive data in the first cluster and the second cluster can be ensured.
参照图5,示出了根据本发明一个实施例的一种跨集群的数据同步方法的步骤流程示意图,具体可以包括如下步骤:Referring to FIG. 5, a schematic flowchart of a step of a data synchronization method for a cross-cluster according to an embodiment of the present invention is shown.
步骤501、接收来自第一集群的数据及其对应的第一时间戳信息;其中,所述第一时间戳信息为所述数据的第一过期时间与所述数据被第一集群发送时的发送时间的集合;Step 501: Receive data from the first cluster and corresponding first timestamp information, where the first timestamp information is a first expiration time of the data and a sending when the data is sent by the first cluster a collection of time;
步骤502、依据所述第一时间戳信息及其对应的接收时间,生成所述数据对应的第二过期时间;Step 502: Generate a second expiration time corresponding to the data according to the first timestamp information and the corresponding receiving time.
步骤503、对所述数据和所述数据对应的第二过期时间执行写入操作以存储在第二集群;以及Step 503: Perform a write operation on the data and a second expiration time corresponding to the data to be stored in the second cluster;
步骤504、在第二集群存储的数据发生变化时,向第一集群发送该变化数据及其对应的第二时间戳信息;其中,所述第二时间戳信息为所述数据的第三过期时间与所述变化数据被第二集群发送时的发送时间的集合。Step 504: When the data stored in the second cluster changes, send the change data and the corresponding second timestamp information to the first cluster, where the second timestamp information is a third expiration time of the data. And a set of transmission times when the change data is transmitted by the second cluster.
相对于图1所示实施例,本实施例除了可以接收来自第一集群的数据及其对应的第一时间戳信息外,还可以在第二集群存储的数据发生变化时,向 第一集群发送该变化数据及其对应的第二时间戳信息,也即,既能够实现第一集群到第二集群的数据同步,也能够实现第二集群到第一集群的数据同步。Compared with the embodiment shown in FIG. 1 , in addition to receiving the data from the first cluster and the corresponding first timestamp information, the embodiment may further change the data stored in the second cluster. The first cluster sends the change data and the corresponding second timestamp information, that is, the data synchronization of the first cluster to the second cluster can be implemented, and the data synchronization of the second cluster to the first cluster can also be implemented.
在本发明的一种可选实施例中,所述方法还可以包括:在第一集群存储的数据发生变化时,接收第一集群发送的该变化后数据及其对应的第三时间戳信息;其中,所述第三时间戳信息为所述变化后数据的过期时间与所述变化后数据被第一集群发送时的发送时间的集合。本可选实施例中,第一集群的数据可能发生如下变化:key-value-ttl1变化为key-value-ttl3,则可以按照如下过程生成变化后数据对应的第三时间戳信息:expired_time3=ttl3+current_time3,其中,expired_time3、ttl3和current_time3分别表示第三时间戳信息、所述变化后数据的过期时间和所述变化后数据被第一集群发送时的发送时间。In an optional embodiment of the present invention, the method may further include: receiving, after the data stored in the first cluster changes, the changed data sent by the first cluster and the corresponding third timestamp information; The third timestamp information is a set of an expiration time of the changed data and a sending time when the changed data is sent by the first cluster. In this alternative embodiment, the data of the first cluster may be changed as follows: key-value-ttl1 is changed to key-value-ttl3, and the third timestamp information corresponding to the changed data may be generated according to the following procedure: expired_time3=ttl3 +current_time3, where expired_time3, ttl3, and current_time3 represent the third timestamp information, the expiration time of the changed data, and the transmission time when the changed data is transmitted by the first cluster, respectively.
在本发明的另一种可选实施例中,所述方法还可以包括:依据所述第三时间戳信息及其对应的接收时间,生成所述变化后数据对应的第四过期时间;以及利用接收的所述变化后数据及所述第四过期时间,更新存储在第二集群所述数据和所述数据对应的第二过期时间。In another optional embodiment of the present invention, the method may further include: generating, according to the third timestamp information and the corresponding receiving time, a fourth expiration time corresponding to the changed data; and utilizing And receiving the changed data and the fourth expiration time, and updating the second expiration time corresponding to the data stored in the second cluster and the data.
对于上例,在接收到key、value和expired_time3后,可以记录对应的接收时间current_time4,并生成第四过期时间ttl4=expired_time3-current_time4。则更新存储在第二集群所述数据和所述数据对应的第二过期时间的过程可以为,将key-value-ttl2更新为key-value-ttl4。For the above example, after receiving the key, value, and expired_time3, the corresponding receiving time current_time4 can be recorded, and a fourth expiration time ttl4=expired_time3-current_time4 is generated. Then, the process of updating the data stored in the second cluster and the second expiration time corresponding to the data may be: updating key-value-ttl2 to key-value-ttl4.
参照图6,示出了根据本发明一个实施例的一种跨集群的数据同步方法的步骤流程示意图,具体可以包括如下步骤:Referring to FIG. 6, a schematic flowchart of a step of a data synchronization method for a cross-cluster according to an embodiment of the present invention is shown.
步骤601、接收来自第一集群的数据及其对应的第一时间戳信息;其中,所述第一时间戳信息为所述数据的第一过期时间与所述数据被第一集群发送时的发送时间的集合;Step 601: Receive data from the first cluster and corresponding first timestamp information, where the first timestamp information is a first expiration time of the data and a sending when the data is sent by the first cluster a collection of time;
步骤602、依据所述第一时间戳信息及其对应的接收时间,生成所述数据对应的第二过期时间;以及 Step 602: Generate a second expiration time corresponding to the data according to the first timestamp information and a corresponding receiving time thereof;
步骤603、将所述数据和所述数据对应的第二过期时间写入第二集群的缓存系统。Step 603: Write the second expiration time corresponding to the data and the data to the cache system of the second cluster.
相对于图1所示实施例,本实施例可以将所述数据和所述数据对应的第二过期时间写入第二集群的缓存系统,因此能够实现跨集群缓存的数据同步。Compared with the embodiment shown in FIG. 1 , the embodiment may write the data and the second expiration time corresponding to the data into the cache system of the second cluster, so that data synchronization across the cluster cache can be implemented.
参照图7,示出了根据本发明一个实施例的一种集群系统的结构示意图,其具体可以包括:IDC1和IDC2,其中,IDC1侧设置有客户端1和缓存1,IDC2侧设置有客户端2和缓存2,IDC1和IDC2具有共同的数据库,该数据库分别于缓存1和缓存2相连,并且,客户端1可以向缓存1发送读请求或写请求,客户端2可以向缓存2发送读请求或写请求,以及,在缓存1或缓存2中存储的数据发生变化时,均可以触发向另一缓存的数据同步流程,以缓存1为例,其中存储的数据发生变化具体可以包括:客户端1向缓存中写入了新的数据,或者,数据库向缓存中写入了新的数据等等。Referring to FIG. 7, a schematic structural diagram of a cluster system according to an embodiment of the present invention may be further illustrated, which may include: IDC1 and IDC2, wherein the IDC1 side is provided with a client 1 and a cache 1, and the IDC2 side is provided with a client. 2 and cache 2, IDC1 and IDC2 have a common database, which is connected to cache 1 and cache 2 respectively, and client 1 can send a read request or a write request to cache 1, and client 2 can send a read request to cache 2. Or the write request, and when the data stored in the cache 1 or the cache 2 changes, the data synchronization process to another cache may be triggered, and the cache 1 is taken as an example. 1 New data is written to the cache, or the database writes new data to the cache, and so on.
参照图8,示出了根据本发明一个实施例的一种图7所示缓存1的数据处理方法的步骤流程示意图,具体可以包括如下步骤:FIG. 8 is a flow chart showing the steps of the data processing method of the cache 1 shown in FIG. 7 according to an embodiment of the present invention. Specifically, the method may include the following steps:
步骤801、缓存1接收来自客户端1的读请求; Step 801, the cache 1 receives a read request from the client 1;
步骤802、缓存1判断自身是否存在所述读请求对应的数据,若是,则执行步骤803,否则执行步骤804;Step 802, the cache 1 determines whether it has the data corresponding to the read request, and if so, step 803 is performed, otherwise step 804 is performed;
步骤803、缓存1向客户端1返回所述读请求对应的第一数据; Step 803, the cache 1 returns the first data corresponding to the read request to the client 1;
步骤804、缓存1向数据库请求转发所述读请求,并接收所述数据库返回的所述读请求对应的第一数据和所述第一数据的过期时间,并执行所述步骤803和步骤805; Step 804, the cache 1 requests the database to forward the read request, and receives the first data corresponding to the read request returned by the database and the expiration time of the first data, and performs the steps 803 and 805;
步骤805、缓存1向缓存2发送所述第一数据及其对应的第四时间戳信息;其中,所述第四时间戳信息为所述第一数据的过期时间与所述第一数据被缓存1发送时的发送时间的集合;Step 805: The cache 1 sends the first data and its corresponding fourth timestamp information to the cache 2, where the fourth timestamp information is an expiration time of the first data and the first data is cached. 1 a collection of transmission times at the time of transmission;
步骤806、缓存1接收来自客户端1的写请求; Step 806, the cache 1 receives a write request from the client 1;
步骤807、缓存1将所述写请求对应的第二数据和所述第二数据的过期时间写入缓存,并向缓存2发送所述第二数据及其对应的第五时间戳信息; 其中,所述第五时间戳信息为所述第二数据的过期时间与所述第二数据被缓存1发送时的发送时间的集合。Step 807: The cache 1 writes the expiration time of the second data and the second data corresponding to the write request to the cache, and sends the second data and the corresponding fifth timestamp information to the cache 2; The fifth timestamp information is a set of an expiration time of the second data and a transmission time when the second data is sent by the cache 1.
对于方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明实施例并不受所描述的动作顺序的限制,因为依据本发明实施例,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于可选实施例,所涉及的动作并不一定是本发明实施例所必须的。For the method embodiments, for the sake of simple description, they are all expressed as a series of action combinations, but those skilled in the art should understand that the embodiments of the present invention are not limited by the described action sequence, because the embodiment according to the present invention Some steps can be performed in other orders or at the same time. In the following, those skilled in the art should also understand that the embodiments described in the specification are optional embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
参照图9,示出了根据本发明一个实施例的一种跨集群的数据同步装置的结构示意图,该装置可以应配置为第二集群侧,具体可以包括如下模块:FIG. 9 is a schematic structural diagram of a data synchronization device for a cross-cluster according to an embodiment of the present invention. The device may be configured as a second cluster side, and may specifically include the following modules:
第一接收模块901,配置为接收来自第一集群的数据及其对应的第一时间戳信息;其中,所述第一时间戳信息为所述数据的第一过期时间与所述数据被第一集群发送时的发送时间的集合;The first receiving module 901 is configured to receive data from the first cluster and corresponding first timestamp information, where the first timestamp information is a first expiration time of the data and the data is first a collection of transmission times when the cluster is sent;
生成模块902,配置为依据所述第一时间戳信息及其对应的接收时间,生成所述数据对应的第二过期时间;以及The generating module 902 is configured to generate a second expiration time corresponding to the data according to the first timestamp information and its corresponding receiving time;
写入模块903,配置为对所述数据和所述数据对应的第二过期时间执行写入操作以存储在第二集群。The writing module 903 is configured to perform a write operation on the data and a second expiration time corresponding to the data to be stored in the second cluster.
在本发明的一种可选实施例中,所述生成模块902,可以进一步包括:In an optional embodiment of the present invention, the generating module 902 may further include:
第一记录子模块,配置为在接收来自第一集群的数据及其对应的第一时间戳信息时,记录对应的接收时间;a first recording submodule configured to record a corresponding receiving time when receiving data from the first cluster and corresponding first timestamp information;
读取子模块,配置为读取所述第一时间戳信息;以及Reading a submodule configured to read the first timestamp information;
第一获取子模块,配置为依据所述第一时间戳信息与所述接收时间,获取所述数据对应的第二过期时间。The first obtaining submodule is configured to acquire a second expiration time corresponding to the data according to the first timestamp information and the receiving time.
在本发明的另一种可选实施例中,所述生成模块902,可以进一步包括:In another optional embodiment of the present invention, the generating module 902 may further include:
第二记录子模块,配置为在接收来自第一集群的数据及其对应的第一时间戳信息时,记录对应的接收时间;a second recording submodule configured to record a corresponding receiving time when receiving data from the first cluster and the corresponding first timestamp information;
第二获取子模块,配置为依据所述第一时间戳信息获取所述第一过期时间和所述第一过期时间对应的发送时间;以及 a second obtaining submodule configured to acquire, according to the first timestamp information, a sending time corresponding to the first expiration time and the first expiration time;
第三获取子模块,配置为依据所述第一过期时间、所述第一过期时间对应的发送时间和接收时间,获取所述数据对应的第二过期时间。The third obtaining sub-module is configured to acquire a second expiration time corresponding to the data according to the first expiration time, the sending time and the receiving time corresponding to the first expiration time.
在本发明的再一种可选实施例中,所述写入模块903,可具体配置为将所述数据和所述数据对应的第二过期时间写入第二集群的缓存系统。In still another optional embodiment of the present invention, the writing module 903 may be specifically configured to write the data and the second expiration time corresponding to the data into the cache system of the second cluster.
在本发明的又一种可选实施例中,所述装置还可以包括:In still another optional embodiment of the present invention, the apparatus may further include:
发送模块,配置为在第二集群存储的数据发生变化时,向第一集群发送该变化数据及其对应的第二时间戳信息;其中,所述第二时间戳信息为所述数据的第三过期时间与所述变化数据被第二集群发送时的发送时间的集合。a sending module, configured to send the change data and the corresponding second timestamp information to the first cluster when the data stored in the second cluster changes; wherein the second timestamp information is the third of the data The set of expiration times and the transmission time when the change data is transmitted by the second cluster.
在本发明的一种可选实施例中,所述装置还可以包括:In an optional embodiment of the present invention, the device may further include:
第二接收模块,配置为在第一集群存储的数据发生变化时,接收第一集群发送的该变化后数据及其对应的第三时间戳信息;其中,所述第三时间戳信息为所述变化后数据的过期时间与所述变化后数据被第一集群发送时的发送时间的集合。The second receiving module is configured to receive the changed data and the corresponding third timestamp information sent by the first cluster when the data stored in the first cluster changes; wherein the third timestamp information is The set of the expiration time of the changed data and the transmission time when the changed data is transmitted by the first cluster.
在本发明的另一种可选实施例中,所述装置还可以包括:In another optional embodiment of the present invention, the device may further include:
生成模块,配置为依据所述第三时间戳信息及其对应的接收时间,生成所述变化后数据对应的第四过期时间;以及a generating module, configured to generate a fourth expiration time corresponding to the changed data according to the third timestamp information and a corresponding receiving time thereof;
更新模块,配置为利用接收的所述变化后数据及所述第四过期时间,更新存储在第二集群所述数据和所述数据对应的第二过期时间。And an update module configured to update the data stored in the second cluster and the second expiration time corresponding to the data by using the received changed data and the fourth expiration time.
对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的跨集群的数据同步方法和装置中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或 者多个信号的形式。这样的信号可以从因特网平台上下载得到,或者在载体信号上提供,或者以任何其他形式提供。The various component embodiments of the present invention may be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or digital signal processor (DSP) may be used in practice to implement some or all of some or all of the components of the cross-cluster data synchronization method and apparatus in accordance with embodiments of the present invention. Features. The invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein. Such a program implementing the present invention may be stored on a computer readable medium or may have one or The form of multiple signals. Such signals may be downloaded from an internet platform, provided on a carrier signal, or provided in any other form.
例如,图10示出了可以实现根据本发明上述方法的计算设备,例如搜索引擎服务器。该计算设备传统上包括处理器1010和以存储器1030形式的计算机程序产品或者计算机可读介质。存储器1030可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。存储器1030具有存储用于执行上述方法中的任何方法步骤的程序代码1051的存储空间1050。例如,存储程序代码的存储空间1050可以包括分别用于实现上面的方法中的各种步骤的各个程序代码1051。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。这些计算机程序产品包括诸如硬盘,紧致盘(CD)、存储卡或者软盘之类的程序代码载体。这样的计算机程序产品通常为例如图11所示的便携式或者固定存储单元。该存储单元可以具有与图10的计算设备中的存储器1030类似布置的存储段、存储空间等。程序代码可以例如以适当形式进行压缩。通常,存储单元包括用于执行根据本发明的方法步骤的计算机可读代码1051’,即可以由诸如1010之类的处理器读取的代码,当这些代码由服务器运行时,导致该服务器执行上面所描述的方法中的各个步骤。For example, Figure 10 illustrates a computing device, such as a search engine server, that can implement the above described method in accordance with the present invention. The computing device conventionally includes a processor 1010 and a computer program product or computer readable medium in the form of a memory 1030. The memory 1030 may be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read Only Memory), an EPROM, a hard disk, or a ROM. The memory 1030 has a storage space 1050 that stores program code 1051 for performing any of the method steps described above. For example, storage space 1050 storing program code may include various program codes 1051 for implementing various steps in the above methods, respectively. The program code can be read from or written to one or more computer program products. These computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards or floppy disks. Such a computer program product is typically a portable or fixed storage unit such as that shown in FIG. The storage unit may have storage segments, storage spaces, and the like that are similarly arranged to memory 1030 in the computing device of FIG. The program code can be compressed, for example, in an appropriate form. Typically, the storage unit comprises computer readable code 1051' for performing the steps of the method according to the invention, ie code that can be read by a processor such as 1010, which when executed by the server causes the server to execute the above Each step in the described method.
本文中所称的“一个实施例”、“实施例”或者“一个或者多个实施例”意味着,结合实施例描述的特定特征、结构或者特性包括在本发明的至少一个实施例中。此外,请注意,这里“在一个实施例中”的词语例子不一定全指同一个实施例。"an embodiment," or "an embodiment," or "an embodiment," In addition, it is noted that the phrase "in one embodiment" is not necessarily referring to the same embodiment.
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下被实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. However, it is understood that the embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of the description.
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利 要求的限制。单词“包括”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It is to be noted that the above-described embodiments are illustrative of the invention and are not intended to be limiting, and that the invention may be devised without departing from the scope of the appended claims. In the claims, any reference symbol between parentheses should not be constructed as a right Required restrictions. The word 'comprising' does not exclude the presence of the elements or steps that are not recited in the claims. The word "a" or "an" The invention can be implemented by means of hardware comprising several distinct elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means can be embodied by the same hardware item. The use of the words first, second, and third does not indicate any order. These words can be interpreted as names.
此外,还应当注意,本说明书中使用的语言主要是为了可读性和教导的目的而选择的,而不是为了解释或者限定本发明的主题而选择的。因此,在不偏离所附权利要求书的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。对于本发明的范围,对本发明所做的公开是说明性的,而非限制性的,本发明的范围由所附权利要求书限定。 In addition, it should be noted that the language used in the specification has been selected for the purpose of readability and teaching, and is not intended to be construed or limited. Therefore, many modifications and changes will be apparent to those skilled in the art without departing from the scope of the invention. The disclosure of the present invention is intended to be illustrative, and not restrictive, and the scope of the invention is defined by the appended claims.

Claims (16)

  1. 一种跨集群的数据同步方法,包括:A cross-cluster data synchronization method, including:
    接收来自第一集群的数据及其对应的第一时间戳信息;其中,所述第一时间戳信息为所述数据的第一过期时间与所述数据被第一集群发送时的发送时间的集合;Receiving data from the first cluster and corresponding first timestamp information; wherein the first timestamp information is a set of a first expiration time of the data and a sending time when the data is sent by the first cluster ;
    依据所述第一时间戳信息及其对应的接收时间,生成所述数据对应的第二过期时间;以及Generating a second expiration time corresponding to the data according to the first timestamp information and its corresponding receiving time;
    对所述数据和所述数据对应的第二过期时间执行写入操作以存储在第二集群。A write operation is performed on the data and the second expiration time corresponding to the data to be stored in the second cluster.
  2. 如权利要求1所述的方法,其中,所述第二集群依据所述第一时间戳信息及其对应的接收时间,生成所述数据对应的第二过期时间的步骤,包括:The method of claim 1, wherein the step of generating, by the second cluster, the second expiration time corresponding to the data according to the first timestamp information and the corresponding receiving time comprises:
    在接收来自第一集群的数据及其对应的第一时间戳信息时,记录对应的接收时间;Recording a corresponding receiving time when receiving data from the first cluster and its corresponding first timestamp information;
    读取所述第一时间戳信息;以及Reading the first timestamp information;
    依据所述第一时间戳信息与所述接收时间,获取所述数据对应的第二过期时间。Obtaining a second expiration time corresponding to the data according to the first timestamp information and the receiving time.
  3. 如权利要求1所述的方法,其中,所述第二集群依据所述第一时间戳信息及其对应的接收时间,生成所述数据对应的第二过期时间的步骤,包括:The method of claim 1, wherein the step of generating, by the second cluster, the second expiration time corresponding to the data according to the first timestamp information and the corresponding receiving time comprises:
    在接收来自第一集群的数据及其对应的第一时间戳信息时,记录对应的接收时间;Recording a corresponding receiving time when receiving data from the first cluster and its corresponding first timestamp information;
    依据所述第一时间戳信息获取所述第一过期时间和所述第一过期时间对应的发送时间;Obtaining, according to the first timestamp information, a sending time corresponding to the first expiration time and the first expiration time;
    依据所述第一过期时间、所述第一过期时间对应的发送时间和接收时间,获取所述数据对应的第二过期时间。Obtaining a second expiration time corresponding to the data according to the first expiration time, the sending time and the receiving time corresponding to the first expiration time.
  4. 如权利要求1或2或3所述的方法,其中,所述对所述数据和所述数据对应的第二过期时间执行写入操作以存储在第二集群以存储在第二集群以存储在第二集群的步骤,包括: The method according to claim 1 or 2 or 3, wherein said writing operation is performed on said data and said second expiration time corresponding to said data to be stored in said second cluster for storage in said second cluster for storage The steps of the second cluster include:
    将所述数据和所述数据对应的第二过期时间写入第二集群自身的缓存系统。And writing the second expiration time corresponding to the data and the data to the cache system of the second cluster itself.
  5. 如权利要求1或2或3所述的方法,其中,所述方法还包括:The method of claim 1 or 2 or 3, wherein the method further comprises:
    在第二集群存储的数据发生变化时,向第一集群发送该变化数据及其对应的第二时间戳信息;其中,所述第二时间戳信息为所述数据的第三过期时间与所述变化数据被第二集群发送时的发送时间的集合。Transmitting the change data and the corresponding second timestamp information to the first cluster when the data stored in the second cluster changes; wherein the second timestamp information is a third expiration time of the data and the The set of transmission times when the change data is transmitted by the second cluster.
  6. 如权利要求1或2或3所述的方法,其中,还包括:The method of claim 1 or 2 or 3, further comprising:
    在第一集群存储的数据发生变化时,接收第一集群发送的该变化后数据及其对应的第三时间戳信息;其中,所述第三时间戳信息为所述变化后数据的过期时间与所述变化后数据被第一集群发送时的时间的集合。And receiving, after the data stored in the first cluster, the changed data and the corresponding third timestamp information sent by the first cluster, where the third timestamp information is an expiration time of the changed data and The set of times when the changed data is transmitted by the first cluster.
  7. 如权利要求6所述的方法,其中,还包括:The method of claim 6 further comprising:
    依据所述第三时间戳信息及其对应的接收时间,生成所述变化后数据对应的第四过期时间;以及Generating, according to the third timestamp information and the corresponding receiving time, a fourth expiration time corresponding to the changed data;
    利用接收的所述变化后数据及所述第四过期时间,更新存储在第二集群所述数据和所述数据对应的第二过期时间。And using the received changed data and the fourth expiration time, updating the second expiration time corresponding to the data stored in the second cluster and the data.
  8. 一种计算机程序,包括计算机可读代码,当所述计算机可读代码在计算设备上运行时,导致所述计算设备执行根据权利要求1至7中的任一项所述的跨集群的数据同步方法。A computer program comprising computer readable code causing the computing device to perform cross-cluster data synchronization according to any one of claims 1 to 7 when the computer readable code is run on a computing device method.
  9. 一种计算机可读介质,其中存储了如权利要求8所述的计算机程序。A computer readable medium storing the computer program of claim 8.
  10. 一种跨集群的数据同步装置,包括:A cross-cluster data synchronization device, comprising:
    第一接收模块,配置为接收来自第一集群的数据及其对应的第一时间戳信息;其中,所述第一时间戳信息为所述数据的第一过期时间与所述数据被第一集群发送时的时间的集合;a first receiving module, configured to receive data from the first cluster and corresponding first timestamp information, where the first timestamp information is a first expiration time of the data and the data is used by the first cluster a collection of times when sending;
    生成模块,配置为依据所述第一时间戳信息及其对应的接收时间,生成所述数据对应的第二过期时间;以及Generating a module, configured to generate a second expiration time corresponding to the data according to the first timestamp information and a corresponding receiving time thereof;
    写入模块,配置为对所述数据和所述数据对应的第二过期时间执行写入操作以存储在第二集群。 And a write module configured to perform a write operation on the data and a second expiration time corresponding to the data to be stored in the second cluster.
  11. 如权利要求10所述的装置,其中,所述生成模块,包括:The device of claim 10, wherein the generating module comprises:
    第一记录子模块,配置为在接收来自第一集群的数据及其对应的第一时间戳信息时,记录对应的接收时间;a first recording submodule configured to record a corresponding receiving time when receiving data from the first cluster and corresponding first timestamp information;
    读取子模块,配置为读取所述第一时间戳信息;以及Reading a submodule configured to read the first timestamp information;
    第一获取子模块,配置为依据所述第一时间戳信息与所述接收时间,获取所述数据对应的第二过期时间。The first obtaining submodule is configured to acquire a second expiration time corresponding to the data according to the first timestamp information and the receiving time.
  12. 如权利要求10所述的装置,其中,所述生成模块,包括:The device of claim 10, wherein the generating module comprises:
    第二记录子模块,配置为在接收来自第一集群的数据及其对应的第一时间戳信息时,记录对应的接收时间;a second recording submodule configured to record a corresponding receiving time when receiving data from the first cluster and the corresponding first timestamp information;
    第二获取子模块,配置为依据所述第一时间戳信息获取所述第一过期时间和所述第一过期时间对应的发送时间;以及a second obtaining submodule configured to acquire, according to the first timestamp information, a sending time corresponding to the first expiration time and the first expiration time;
    第三获取子模块,配置为依据所述第一过期时间、所述第一过期时间对应的发送时间和接收时间,获取所述数据对应的第二过期时间。The third obtaining sub-module is configured to acquire a second expiration time corresponding to the data according to the first expiration time, the sending time and the receiving time corresponding to the first expiration time.
  13. 如权利要求10或11或12所述的装置,其中,所述写入模块,具体配置为将所述数据和所述数据对应的第二过期时间写入第二集群的缓存系统。The device of claim 10 or 11 or 12, wherein the writing module is specifically configured to write the data and a second expiration time corresponding to the data to a cache system of the second cluster.
  14. 如权利要求10或11或12所述的装置,其中,所述装置还包括:The device of claim 10 or 11 or 12, wherein the device further comprises:
    发送模块,配置为在第二集群存储的数据发生变化时,向第一集群发送该变化数据及其对应的第二时间戳信息;其中,所述第二时间戳信息为所述数据的第三过期时间与所述变化数据被第二集群发送时的发送时间的集合。a sending module, configured to send the change data and the corresponding second timestamp information to the first cluster when the data stored in the second cluster changes; wherein the second timestamp information is the third of the data The set of expiration times and the transmission time when the change data is transmitted by the second cluster.
  15. 如权利要求10或11或12所述的装置,其中,所述装置还包括:The device of claim 10 or 11 or 12, wherein the device further comprises:
    第二接收模块,配置为在第一集群存储的数据发生变化时,接收第一集群发送的该变化后数据及其对应的第三时间戳信息;其中,所述第三时间戳信息为所述变化后数据的过期时间与所述变化后数据被第一集群发送时的发送时间的集合。The second receiving module is configured to receive the changed data and the corresponding third timestamp information sent by the first cluster when the data stored in the first cluster changes; wherein the third timestamp information is The set of the expiration time of the changed data and the transmission time when the changed data is transmitted by the first cluster.
  16. 如权利要求15所述的装置,其中,所述装置还包括:The device of claim 15 wherein said device further comprises:
    生成模块,配置为依据所述第三时间戳信息及其对应的接收时间,生成所述变化后数据对应的第四过期时间;以及 a generating module, configured to generate a fourth expiration time corresponding to the changed data according to the third timestamp information and a corresponding receiving time thereof;
    更新模块,配置为利用接收的所述变化后数据及所述第四过期时间,更新存储在第二集群所述数据和所述数据对应的第二过期时间。 And an update module configured to update the data stored in the second cluster and the second expiration time corresponding to the data by using the received changed data and the fourth expiration time.
PCT/CN2015/095504 2014-12-27 2015-11-25 Cross-cluster data synchronization method and device WO2016101758A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410836865.1A CN104580183B (en) 2014-12-27 2014-12-27 A kind of method of data synchronization and device across cluster
CN201410836865.1 2014-12-27

Publications (1)

Publication Number Publication Date
WO2016101758A1 true WO2016101758A1 (en) 2016-06-30

Family

ID=53095364

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/095504 WO2016101758A1 (en) 2014-12-27 2015-11-25 Cross-cluster data synchronization method and device

Country Status (2)

Country Link
CN (1) CN104580183B (en)
WO (1) WO2016101758A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108512877A (en) * 2017-02-28 2018-09-07 腾讯科技(北京)有限公司 The method and apparatus of sharing data in a kind of server cluster

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104580183B (en) * 2014-12-27 2019-02-15 北京奇虎科技有限公司 A kind of method of data synchronization and device across cluster
CN107231400B (en) * 2016-03-25 2020-07-03 阿里巴巴集团控股有限公司 Data synchronization method and device
CN106357723A (en) * 2016-08-15 2017-01-25 杭州古北电子科技有限公司 Synchronous system and method for multi-cluster information caching based on cloud host
CN111708796A (en) * 2020-06-23 2020-09-25 浪潮云信息技术股份公司 Data consistency method based on time stamp

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7124319B2 (en) * 2002-03-19 2006-10-17 Sun Microsystems, Inc. Delay compensation for synchronous processing sets
US7899783B1 (en) * 2006-05-30 2011-03-01 Cisco Technology, Inc Monitoring data integrity
CN102006330A (en) * 2010-12-01 2011-04-06 北京瑞信在线系统技术有限公司 Distributed cache system, data caching method and inquiring method of cache data
CN103580845A (en) * 2012-07-19 2014-02-12 中兴通讯股份有限公司 Clock synchronization method based on virtual switch cluster and clock synchronization device based on virtual switch cluster
CN104156361A (en) * 2013-05-13 2014-11-19 阿里巴巴集团控股有限公司 Method and system for achieving data synchronization
CN104580183A (en) * 2014-12-27 2015-04-29 北京奇虎科技有限公司 Cross-cluster data synchronization method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7451339B2 (en) * 2006-09-15 2008-11-11 International Business Machines Corporation Pulse-per-second attachment for STP
CN101426026B (en) * 2008-09-17 2013-07-03 北京六维世纪网络技术有限公司 Method and system for data synchronization between multiple servers
CN101425891B (en) * 2008-12-09 2012-09-12 中兴通讯股份有限公司 Time synchronization method, system and customer terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7124319B2 (en) * 2002-03-19 2006-10-17 Sun Microsystems, Inc. Delay compensation for synchronous processing sets
US7899783B1 (en) * 2006-05-30 2011-03-01 Cisco Technology, Inc Monitoring data integrity
CN102006330A (en) * 2010-12-01 2011-04-06 北京瑞信在线系统技术有限公司 Distributed cache system, data caching method and inquiring method of cache data
CN103580845A (en) * 2012-07-19 2014-02-12 中兴通讯股份有限公司 Clock synchronization method based on virtual switch cluster and clock synchronization device based on virtual switch cluster
CN104156361A (en) * 2013-05-13 2014-11-19 阿里巴巴集团控股有限公司 Method and system for achieving data synchronization
CN104580183A (en) * 2014-12-27 2015-04-29 北京奇虎科技有限公司 Cross-cluster data synchronization method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108512877A (en) * 2017-02-28 2018-09-07 腾讯科技(北京)有限公司 The method and apparatus of sharing data in a kind of server cluster
CN108512877B (en) * 2017-02-28 2022-03-18 腾讯科技(北京)有限公司 Method and device for sharing data in server cluster

Also Published As

Publication number Publication date
CN104580183B (en) 2019-02-15
CN104580183A (en) 2015-04-29

Similar Documents

Publication Publication Date Title
CN110188096B (en) Index creating method, device and equipment for data record
WO2016101758A1 (en) Cross-cluster data synchronization method and device
US8914856B1 (en) Synchronization of networked storage systems and third party systems
CN110162526B (en) Method, device and equipment for inquiring data records in block chain type account book
CN110162662B (en) Verification method, device and equipment for data records in block chain type account book
US20170212781A1 (en) Parallel execution of blockchain transactions
WO2016101752A1 (en) Method and device for data synchronization
WO2016091069A1 (en) Data operation method and device
CN109657174B (en) Method and device for updating data
CN106649828B (en) Data query method and system
US20150372885A1 (en) Method, apparatus, and system for tracing resource propagation
CN107153644B (en) Data synchronization method and device
WO2015081848A1 (en) Socialized extended search method and corresponding device and system
US9031909B2 (en) Provisioning and/or synchronizing using common metadata
CN111046036A (en) Data synchronization method, device, system and storage medium
CN111324665B (en) Log playback method and device
WO2017166815A1 (en) Data updating method and device for a distributed database system
WO2019100853A1 (en) Page query method, device, and electronic apparatus
CN110737682A (en) cache operation method, device, storage medium and electronic equipment
CN104239353B (en) WEB classification control and log audit method
CN110879687B (en) Data reading method, device and equipment based on disk storage
CN109992469B (en) Method and device for merging logs
WO2017107679A1 (en) Historical information display method and apparatus
WO2016101759A1 (en) Data routing method, data management device and distributed storage system
CN110990365A (en) Data synchronization method, device, server and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15871827

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15871827

Country of ref document: EP

Kind code of ref document: A1