CN104580183B - A kind of method of data synchronization and device across cluster - Google Patents

A kind of method of data synchronization and device across cluster Download PDF

Info

Publication number
CN104580183B
CN104580183B CN201410836865.1A CN201410836865A CN104580183B CN 104580183 B CN104580183 B CN 104580183B CN 201410836865 A CN201410836865 A CN 201410836865A CN 104580183 B CN104580183 B CN 104580183B
Authority
CN
China
Prior art keywords
time
data
expired
cluster
receiving
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.)
Active
Application number
CN201410836865.1A
Other languages
Chinese (zh)
Other versions
CN104580183A (en
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
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 CN201410836865.1A priority Critical patent/CN104580183B/en
Publication of CN104580183A publication Critical patent/CN104580183A/en
Priority to PCT/CN2015/095504 priority patent/WO2016101758A1/en
Application granted granted Critical
Publication of CN104580183B publication Critical patent/CN104580183B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • 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
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention provides a kind of method of data synchronization and device across cluster, method therein specifically include: receiving data and its stamp information of corresponding first time from the first cluster;Wherein, the set of sending time when the first expired time and the data that the first time stamp information is the data are by the first collection pocket transmission;Information and its corresponding receiving time are stabbed according to the first time, generates corresponding second expired time of the data;And write operation is executed to be stored in the second cluster to the data and corresponding second expired time of the data.The embodiment of the present invention can guarantee the synchronization of timeliness data in the first cluster and the second cluster.

Description

A kind of method of data synchronization and device across cluster
Technical field
The present invention relates to fields of communication technology, more particularly to a kind of method of data synchronization and device across cluster.
Background technique
Compared with mainframe, the advantage of cluster service system is not only in that cheap price and its high availability, also has Very strong scalability, thus by the favor of user in network application.
In order to reduce application client to the visitation frequency of database in cluster, can be arranged for cluster corresponding Caching, wherein can store the partial data (such as the data frequently accessed) in database in caching, in this way, client is being visited Data can be read from caching first by asking when cluster, remove inquiry database again when cache hit failure, therefore can reduce To the visitation frequency of database, and it can be improved the runnability of application program.
Currently, can receive and handle the access request of client due to caching in each cluster, across cluster cache Data synchronize and become particularly important.
Summary of the invention
In view of the above problems, it proposes on the present invention overcomes the above problem or at least be partially solved in order to provide one kind State a kind of method of data synchronization and device across cluster of problem.
According to one aspect of the present invention, a kind of method of data synchronization across cluster is provided, comprising:
It receives data and its corresponding first time from the first cluster and stabs information;Wherein, the first time stamp letter The set of sending time when the first expired time and the data that breath is the data are by the first collection pocket transmission;
Stab information and its corresponding receiving time according to the first time, generate the data it is corresponding second it is expired when Between;And
Write operation is executed to be stored in the second cluster to the data and corresponding second expired time of the data.
Optionally, second cluster stabs information and its corresponding receiving time according to the first time, described in generation The step of data corresponding second expired time, comprising:
When receiving the data and its stamp information of corresponding first time from the first cluster, when recording corresponding reception Between;
Read the first time stamp information;And
According to first time stamp information and the receiving time, corresponding second expired time of the data is obtained.
Optionally, second cluster stabs information and its corresponding receiving time according to the first time, described in generation The step of data corresponding second expired time, comprising:
When receiving the data and its stamp information of corresponding first time from the first cluster, when recording corresponding reception Between;
According to the first expired time and the corresponding hair of first expired time described in first time stamp acquisition of information Send the time;
According to first expired time, the corresponding sending time of first expired time and receiving time, institute is obtained State corresponding second expired time of data.
Optionally, described that write operation is executed to be stored in the data and corresponding second expired time of the data Second cluster is to be stored in the step of the second cluster is to be stored in the second cluster, comprising:
By the caching system of the data and corresponding second expired time write-in the second cluster itself of the data.
Optionally, the method also includes:
When the data of the second cluster-based storage change, to first collection pocket transmission delta data and its corresponding second Timestamp information;Wherein, second timestamp information is the data third expired time and the delta data are by the The set of sending time when two collection pocket transmissions.
Optionally, the method also includes:
When the data of the first cluster-based storage change, data and its correspondence after the variation of the first collection pocket transmission are received Third timestamp information;Wherein, the third timestamp information is the expired time and the variation of data after the variation The set of time when data are by the first collection pocket transmission afterwards.
Optionally, the method also includes:
According to the third timestamp information and its corresponding receiving time, data the corresponding 4th after the variation are generated Expired time;And
Using data after the received variation and the 4th expired time, the data described in the second cluster are updated storage The second expired time corresponding with the data.
Another aspect according to the present invention provides a kind of data synchronization unit across cluster, comprising:
First receiving module, for receiving data and its stamp information of corresponding first time from the first cluster;Wherein, Time when the first expired time and the data that the first time stamp information is the data are by the first collection pocket transmission Set;
Generation module generates the data pair for stabbing information and its corresponding receiving time according to the first time The second expired time answered;And
Writing module, for executing write operation to the data and corresponding second expired time of the data to store In the second cluster.
Optionally, the generation module, comprising:
First record sub module, for receiving data and its stamp information of corresponding first time from the first cluster When, record corresponding receiving time;
Reading submodule, for reading the first time stamp information;And
First acquisition submodule, for obtaining the data according to first time stamp information and the receiving time Corresponding second expired time.
Optionally, the generation module, comprising:
Second record sub module, for receiving data and its stamp information of corresponding first time from the first cluster When, record corresponding receiving time;
Second acquisition submodule, for according to the first expired time and described the described in first time stamp acquisition of information The corresponding sending time of one expired time;And
Third acquisition submodule, when for transmission corresponding according to first expired time, first expired time Between and receiving time, obtain corresponding second expired time of the data.
A kind of method of data synchronization and device across cluster according to an embodiment of the present invention receives the number from the first cluster According to and its corresponding first time stab information, and stab information and its corresponding receiving time according to the first time, generate institute State corresponding second expired time of data;Due to the first time stamp information be the data the first expired time with it is described The set of sending time when data are by the first collection pocket transmission, and described the is considered during generating the second expired time The corresponding receiving time of one timestamp information, namely influence of the transmission time for the first expired time is considered, therefore can Guarantee the synchronization of timeliness data in the first cluster and the second cluster.
The above description is only an overview of the technical scheme of the present invention, in order to better understand the technical means of the present invention, And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can It is clearer and more comprehensible, the followings are specific embodiments of the present invention.
Detailed description of the invention
By reading the detailed description of hereafter optional embodiment, various other advantages and benefits are common for this field Technical staff will become clear.Attached drawing is only used for showing the purpose of optional embodiment, and is not considered as to the present invention Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 shows a kind of step process signal of method of data synchronization across cluster according to an embodiment of the invention Figure;
Fig. 2 shows a kind of step process signals of the method for data synchronization across cluster according to an embodiment of the invention Figure;
Fig. 3 shows an exemplary a kind of step process signal for the method for data synchronization across cluster according to the present invention Figure;
Fig. 4 shows a kind of step process signal of method of data synchronization across cluster according to an embodiment of the invention Figure;
Fig. 5 shows a kind of step process signal of method of data synchronization across cluster according to an embodiment of the invention Figure;
Fig. 6 shows a kind of step process signal of method of data synchronization across cluster according to an embodiment of the invention Figure;
Fig. 7 shows a kind of structural schematic diagram of group system according to an embodiment of the invention;
Fig. 8 shows the step of data processing method of caching 1 shown in a kind of Fig. 7 according to an embodiment of the invention stream Journey schematic diagram;And
Fig. 9 shows a kind of structural schematic diagram of data synchronization unit across cluster according to an embodiment of the invention.
Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure It is fully disclosed to those skilled in the art.
Referring to Fig.1, the step of showing a kind of method of data synchronization across cluster according to an embodiment of the invention stream Journey schematic diagram, can specifically include following steps:
Step 101 receives data and its stamp information of corresponding first time from the first cluster;Wherein, described first The set of sending time when the first expired time and the data that timestamp information is the data are by the first collection pocket transmission;
Step 102 stabs information and its corresponding receiving time according to the first time, generates the data corresponding the Two expired times;And
Step 103 executes write operation to the data and corresponding second expired time of the data to be stored in the Two clusters.
The embodiment of the present invention can be applied in the group system of various businesses scene, same for carrying out the data across cluster Step, the group unit therein that integrates can be IDC (Internet data center, Internet Data Center) or computer room etc., The embodiment of the present invention is without restriction to specific collection group unit.
For certain business scenarios of cluster, data often have certain timeliness.In addition, slow in order to improve The hit rate deposited, the data cached in cluster are also required to the timeliness for having certain, to adapt to business field by updating caching The variation of scape data.In order to realize timeliness management, the write-in interface of setting expired time, the write-in can be provided for data Interface can be used for being arranged when data are written the expired time of data.For example, write-in connects in a kind of application example of the invention Mouthful set_with_ttl (key, value, ttl) interface can be used for being written simultaneously key-value specify key-value it is expired when Between ttl so that data preparation process can realize arrangement to key-value according to the ttl, for example, after ttl is expired, Delete operation can be executed to key-value.
The embodiment of the present invention can be used for the synchronization of the timeliness data across cluster.In traditional scheme, the side IDC1 passes through After the event for calling set_with_ttl (key, value, ttl) interface write-in key-value and its corresponding ttl1, it can trigger The synchronous process of data between IDC1 and ID2, the synchronous process of the data can specifically include: IDC1 by key-value and its Corresponding ttl1 is sent to IDC2;The side IDC2 is after receiving key-value and its corresponding ttl1, also by calling set_ Key-value and its corresponding ttl1 is written in with_ttl (key, value, ttl) interface.The synchronous process of above-mentioned data does not consider number According to transmission time, therefore the asynchronous of timeliness data in IDC1 and IDC2 can be caused.Assuming that ttl1 is 100s, key- The transmission time of value is 10s, then, it is counted at the time of entering key-value from IDC1 sidelights on, the side IDC key-value will be It is expired after 100s, and the side IDC2 key-value will be expired after 110s, it is clear that key-value is asynchronous in IDC1 and IDC2 's.
In the embodiment of the present invention, the first cluster and the second cluster can be the synchronous triggering side of data and recipient, wherein First cluster, can be to second collection pocket transmission data and its corresponding first when the data of the second cluster-based storage change Timestamp information;Wherein, the first time stamp information is that the expired time of the data and the data are mass-sended by the first collection The set of sending time when sending.
In the concrete realization, write operation is being executed to deposit to the data and corresponding second expired time of the data In the second cluster the database or caching of cluster can be written, the embodiment of the present invention is to specifically writing in the data by storage It is without restriction to enter position.
To sum up, in the embodiment of the present invention, data and its corresponding first time from the first cluster is received and stab information, and Information and its corresponding receiving time are stabbed according to the first time, generates corresponding second expired time of the data;Due to When the first time stabs the transmission of the first expired time that information is the data and the data by the first collection pocket transmission when Between set, and first time stamp information corresponding receiving time is considered during generating the second expired time, Namely influence of the transmission time for the first expired time is considered, therefore can guarantee timeliness in the first cluster and the second cluster The synchronization of property data.
Referring to Fig. 2, the step of showing a kind of method of data synchronization across cluster according to an embodiment of the invention stream Journey schematic diagram, can specifically include following steps:
Step 201 receives data and its stamp information of corresponding first time from the first cluster;Wherein, described first The set of sending time when the first expired time and the data that timestamp information is the data are by the first collection pocket transmission;
Step 202, when receiving data from the first cluster and its stamp information of corresponding first time, record corresponding Receiving time;
Step 203 reads the first time stamp information;
Step 204 stabs information and the receiving time according to the first time, obtains corresponding second mistake of the data Time phase;And
Step 205 executes write operation to the data and corresponding second expired time of the data to be stored in the Two clusters.
Relative to embodiment illustrated in fig. 1, the present embodiment realizes the second cluster according to institute by step 202 and step 204 Stamp information and its corresponding receiving time at the first time are stated, the process of corresponding second expired time of the data is generated;Due to The first time stamp information corresponding receiving time is considered during generating the second expired time, namely considers biography Influence of the defeated time for the first expired time, therefore can guarantee the same of timeliness data in the first cluster and the second cluster Step.
In order to enable those skilled in the art to better understand the present invention, referring to Fig. 3, show according to the present invention one it is exemplary A kind of step flow diagram of the method for data synchronization across cluster, can specifically include following steps:
Step 301, IDC1 generate stamp information expired_time=at the first time after key-value-ttl1 is written Ttl1+current_time, and key, value and expired_time are transmitted to IDC2;Wherein, tt1 is key-value's First expired time;
Step 302, IDC2 receive key, value and expired_time, and record corresponding receiving time current_time1;
Step 303, IDC2 generate the second expired time ttl2=expired_time-current_time1;
Step 304, IDC2 execute write operation to key, value and tt2.
Assuming that the first expired time ttl1 of the data be 100s, the data by first collection pocket transmission when transmission when Between current_time be 1:50, it is further assumed that for the first time stamp information receiving time current_time1 For 2:00, then, information and its corresponding receiving time are stabbed according to the first time, generates corresponding second mistake of the data Time phase are as follows: 100s+1:50-2:00=90s, therefore can guarantee the same of timeliness data in the first cluster and the second cluster Step.
Referring to Fig. 4, the step of showing a kind of method of data synchronization across cluster according to an embodiment of the invention stream Journey schematic diagram, can specifically include following steps:
Step 401 receives data and its stamp information of corresponding first time from the first cluster;Wherein, described first The set of sending time when the first expired time and the data that timestamp information is the data are by the first collection pocket transmission;
Step 402, when receiving data from the first cluster and its stamp information of corresponding first time, record corresponding Receiving time;
Step 403 stabs the first expired time and first expired time described in acquisition of information according to the first time Corresponding sending time;
Step 404, according to first expired time, the corresponding sending time of first expired time and receive when Between, obtain corresponding second expired time of the data;And
Step 405 executes write operation to the data and corresponding second expired time of the data to be stored in the Two clusters.
Relative to embodiment illustrated in fig. 1, the present embodiment realizes the second cluster according to institute by step 402 and step 404 Stamp information and its corresponding receiving time at the first time are stated, the process of corresponding second expired time of the data is generated, wherein The process that step 404 obtains corresponding second expired time of the data can be with are as follows: and the second expired time=the first expired time+ (receiving time-sending time);Since the difference of receiving time and sending time is transmission time, namely it is expired generating second Influence of the transmission time for the first expired time is considered during time, therefore can guarantee the first cluster and the second collection The synchronization of timeliness data in group.
Referring to Fig. 5, the step of showing a kind of method of data synchronization across cluster according to an embodiment of the invention stream Journey schematic diagram, can specifically include following steps:
Step 501 receives data and its stamp information of corresponding first time from the first cluster;Wherein, described first The set of sending time when the first expired time and the data that timestamp information is the data are by the first collection pocket transmission;
Step 502 stabs information and its corresponding receiving time according to the first time, generates the data corresponding the Two expired times;
Step 503 executes write operation to the data and corresponding second expired time of the data to be stored in the Two clusters;And
Step 504, when the data of the second cluster-based storage change, to first collection pocket transmission delta data and its right The second timestamp information answered;Wherein, second timestamp information is the third expired time and the variation of the data The set of sending time when data are by the second collection pocket transmission.
Relative to embodiment illustrated in fig. 1, the present embodiment is in addition to can receive data from the first cluster and its corresponding It, can also be when the data of the second cluster-based storage change, to first collection pocket transmission variation number at the first time outside stamp information According to and its corresponding second timestamp information also can that is, can either realize that the data of the first cluster to the second cluster are synchronous Realize that the data of the second cluster to the first cluster are synchronous.
In an alternative embodiment of the invention, the method can also include: the data hair in the first cluster-based storage When changing, data and its corresponding third timestamp information after the variation of the first collection pocket transmission are received;Wherein, the third Timestamp information be the variation after data expired time and the variation after data by first collection pocket transmission when transmission when Between set.In this alternative embodiment, the data of the first cluster may occur to change as follows: key-value-ttl1 variation is Key-value-ttl3 can then generate the corresponding third timestamp information of data after variation: expired_ as follows Time3=ttl3+current_time3, wherein expired_time3, ttl3 and current_time3 respectively indicate third After timestamp information, the variation after the expired time and the variation of data data by first collection pocket transmission when transmission when Between.
In another alternative embodiment of the invention, the method can also include: to believe according to the third timestamp Breath and its corresponding receiving time, generate corresponding 4th expired time of data after the variation;And it utilizes received described Data and the 4th expired time after variation, update storage the data described in the second cluster and corresponding second mistake of the data Time phase.
For upper example, after receiving key, value and expired_time3, corresponding receiving time can recorde Current_time4, and generate the 4th expired time ttl4=expired_time3-current_time4.Then update storage The process of the data described in the second cluster and corresponding second expired time of the data can be, more by key-value-ttl2 It is newly key-value-ttl4.
Referring to Fig. 6, the step of showing a kind of method of data synchronization across cluster according to an embodiment of the invention stream Journey schematic diagram, can specifically include following steps:
Step 601 receives data and its stamp information of corresponding first time from the first cluster;Wherein, described first The set of sending time when the first expired time and the data that timestamp information is the data are by the first collection pocket transmission;
Step 602 stabs information and its corresponding receiving time according to the first time, generates the data corresponding the Two expired times;And
Step 603, the caching system that the data and corresponding second expired time of the data are written to the second cluster.
Relative to embodiment illustrated in fig. 1, the present embodiment can by the data and the data it is corresponding second it is expired when Between the caching system of the second cluster is written, therefore it is synchronous to can be realized data across cluster cache.
Referring to Fig. 7, a kind of structural schematic diagram of group system according to an embodiment of the invention is shown, specifically may be used To include: IDC1 and IDC2, wherein the side IDC1 is provided with client 1 and the caching side 1, IDC2 is provided with client 2 and caching 2, IDC1 and IDC2 has a common database, which 2 is connected respectively at caching 1 and caching, also, client 1 can be to Caching 1 sends read request or write request, and client 2 can send read request or write request to caching 2, and, in caching 1 or delay When depositing the data stored in 2 and changing, process synchronous to the data of another caching can be triggered, by taking caching 1 as an example, wherein The data of storage, which change, can specifically include: client 1 is written with new data into caching, alternatively, database is to slow New data etc. are written in depositing.
Referring to Fig. 8, the data processing method of caching 1 shown in a kind of Fig. 7 according to an embodiment of the invention is shown Steps flow chart schematic diagram can specifically include following steps:
Step 801, caching 1 receive the read request from client 1;
Step 802, caching 1 judge that itself whether there is the corresponding data of the read request, if so, 803 are thened follow the steps, It is no to then follow the steps 804;
Step 803, caching 1 return to corresponding first data of the read request to client 1;
Step 804, caching 1 forward the read request to database request, and receive the reading that the database returns The expired time of corresponding first data and first data is requested, and executes the step 803 and step 805;
Step 805, caching 1 send first data and its corresponding 4th timestamp information to caching 2;Wherein, institute State the sending time when expired time that the 4th timestamp information is first data is buffered 1 transmission with first data Set;
Step 806, caching 1 receive the write request from client 1;
Step 807, caching 1 expired time of corresponding second data of the write request and second data are written slow It deposits, and sends second data and its corresponding 5th timestamp information to caching 2;Wherein, the 5th timestamp information The set of sending time when 1 transmission is buffered for the expired time of second data and second data.
For embodiment of the method, for simple description, therefore, it is stated as a series of action combinations, but this field Technical staff should be aware of, and embodiment of that present invention are not limited by the describe sequence of actions, because implementing according to the present invention Example, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art should also know that, specification Described in embodiment belong to alternative embodiment, the actions involved are not necessarily necessary for embodiments of the present invention.
Referring to Fig. 9, the structure for showing a kind of data synchronization unit across cluster according to an embodiment of the invention is shown It is intended to, which can be applied to the second cluster side, can specifically include following module:
First receiving module 901, for receiving data and its stamp information of corresponding first time from the first cluster;Its In, transmission when the first expired time and the data that the first time stamp information is the data are by the first collection pocket transmission The set of time;
Generation module 902 generates the data for stabbing information and its corresponding receiving time according to the first time Corresponding second expired time;And
Writing module 903, for the data and corresponding second expired time of the data execute write operation with It is stored in the second cluster.
In an alternative embodiment of the invention, the generation module 902, may further include:
First record sub module, for receiving data and its stamp information of corresponding first time from the first cluster When, record corresponding receiving time;
Reading submodule, for reading the first time stamp information;And
First acquisition submodule, for obtaining the data according to first time stamp information and the receiving time Corresponding second expired time.
In another alternative embodiment of the invention, the generation module 902 be may further include:
Second record sub module, for receiving data and its stamp information of corresponding first time from the first cluster When, record corresponding receiving time;
Second acquisition submodule, for according to the first expired time and described the described in first time stamp acquisition of information The corresponding sending time of one expired time;And
Third acquisition submodule, when for transmission corresponding according to first expired time, first expired time Between and receiving time, obtain corresponding second expired time of the data.
In another alternative embodiment of the invention, the write module 903 can be specifically used for the data and institute State the caching system that the second cluster is written in corresponding second expired time of data.
In another alternative embodiment of the invention, described device can also include:
Sending module, for collecting the pocket transmission delta data to first when the data of the second cluster-based storage change And its corresponding second timestamp information;Wherein, third expired time and institute of second timestamp information for the data State the set of sending time of the delta data by the second collection pocket transmission when.
In an alternative embodiment of the invention, described device can also include:
Second receiving module, for when the data of the first cluster-based storage change, receiving being somebody's turn to do for the first collection pocket transmission Data and its corresponding third timestamp information after variation;Wherein, the third timestamp information is data after the variation The set of sending time when data are by the first collection pocket transmission after expired time and the variation.
In another alternative embodiment of the invention, described device can also include:
Generation module is used for according to the third timestamp information and its corresponding receiving time, after generating the variation Corresponding 4th expired time of data;And
Update module, for using data and the 4th expired time after the received variation, updating storage the Data described in two clusters and corresponding second expired time of the data.
For device embodiment, since it is basically similar to the method embodiment, related so being described relatively simple Place illustrates referring to the part of embodiment of the method.
Algorithm and display are not inherently related to any particular computer, virtual system, or other device provided herein. Various general-purpose systems can also be used together with teachings based herein.As described above, it constructs required by this kind of system Structure be obvious.In addition, the present invention is also not directed to any particular programming language.It should be understood that can use various Programming language realizes summary of the invention described herein, and the description done above to language-specific is to disclose this hair Bright preferred forms.
In the instructions provided here, numerous specific details are set forth.It is to be appreciated, however, that implementation of the invention Example can be practiced without these specific details.In some instances, well known method, structure is not been shown in detail And technology, so as not to obscure the understanding of this specification.
Similarly, it should be understood that in order to simplify the disclosure and help to understand one or more of the various inventive aspects, Above in the description of exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes In example, figure or descriptions thereof.However, the disclosed method should not be interpreted as reflecting the following intention: i.e. required to protect Shield the present invention claims features more more than feature expressly recited in each claim.More precisely, as following Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore, Thus the claims for following specific embodiment are expressly incorporated in the specific embodiment, wherein each claim itself All as a separate embodiment of the present invention.
Those skilled in the art will understand that can be carried out adaptively to the module in the equipment in embodiment Change and they are arranged in one or more devices different from this embodiment.It can be the module or list in embodiment Member or component are combined into a module or unit or component, and furthermore they can be divided into multiple submodule or subelement or Sub-component.Other than such feature and/or at least some of process or unit exclude each other, it can use any Combination is to all features disclosed in this specification (including adjoint claim, abstract and attached drawing) and so disclosed All process or units of what method or apparatus are combined.Unless expressly stated otherwise, this specification is (including adjoint power Benefit require, abstract and attached drawing) disclosed in each feature can carry out generation with an alternative feature that provides the same, equivalent, or similar purpose It replaces.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments In included certain features rather than other feature, but the combination of the feature of different embodiments mean it is of the invention Within the scope of and form different embodiments.For example, in the following claims, embodiment claimed is appointed Meaning one of can in any combination mode come using.
Various component embodiments of the invention can be implemented in hardware, or to run on one or more processors Software module realize, or be implemented in a combination thereof.It will be understood by those of skill in the art that can be used in practice Microprocessor or digital signal processor (DSP) come realize the method for data synchronization according to an embodiment of the present invention across cluster and The some or all functions of some or all components in device.The present invention is also implemented as being retouched here for executing The some or all device or device programs (for example, computer program and computer program product) for the method stated. It is such to realize that program of the invention can store on a computer-readable medium, or can have one or more signal Form.Such signal can be downloaded from Internet platform and be obtained, be perhaps provided on the carrier signal or with it is any its He provides form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and ability Field technique personnel can be designed alternative embodiment without departing from the scope of the appended claims.In the claims, Any reference symbol between parentheses should not be configured to limitations on claims.Word " comprising " does not exclude the presence of not Element or step listed in the claims.Word "a" or "an" located in front of the element does not exclude the presence of multiple such Element.The present invention can be by means of including the hardware of several different elements and being come by means of properly programmed computer real It is existing.In the unit claims listing several devices, several in these devices can be through the same hardware branch To embody.The use of word first, second, and third does not indicate any sequence.These words can be explained and be run after fame Claim.
The invention discloses a kind of method of data synchronization across cluster, comprising:
It receives data and its corresponding first time from the first cluster and stabs information;Wherein, the first time stamp letter The set of sending time when the first expired time and the data that breath is the data are by the first collection pocket transmission;
Stab information and its corresponding receiving time according to the first time, generate the data it is corresponding second it is expired when Between;And
Write operation is executed to be stored in the second cluster to the data and corresponding second expired time of the data.
Optionally, second cluster stabs information and its corresponding receiving time according to the first time, described in generation The step of data corresponding second expired time, comprising:
When receiving the data and its stamp information of corresponding first time from the first cluster, when recording corresponding reception Between;
Read the first time stamp information;And
According to first time stamp information and the receiving time, corresponding second expired time of the data is obtained.
Optionally, second cluster stabs information and its corresponding receiving time according to the first time, described in generation The step of data corresponding second expired time, comprising:
When receiving the data and its stamp information of corresponding first time from the first cluster, when recording corresponding reception Between;
According to the first expired time and the corresponding hair of first expired time described in first time stamp acquisition of information Send the time;
According to first expired time, the corresponding sending time of first expired time and receiving time, institute is obtained State corresponding second expired time of data.
Optionally, described that write operation is executed to be stored in the data and corresponding second expired time of the data Second cluster is to be stored in the step of the second cluster is to be stored in the second cluster, comprising:
By the caching system of the data and corresponding second expired time write-in the second cluster itself of the data.
Optionally, the method also includes:
When the data of the second cluster-based storage change, to first collection pocket transmission delta data and its corresponding second Timestamp information;Wherein, second timestamp information is the data third expired time and the delta data are by the The set of sending time when two collection pocket transmissions.
Optionally, the method also includes:
When the data of the first cluster-based storage change, data and its correspondence after the variation of the first collection pocket transmission are received Third timestamp information;Wherein, the third timestamp information is the expired time and the variation of data after the variation The set of time when data are by the first collection pocket transmission afterwards.
Optionally, the method also includes:
According to the third timestamp information and its corresponding receiving time, data the corresponding 4th after the variation are generated Expired time;And
Using data after the received variation and the 4th expired time, the data described in the second cluster are updated storage The second expired time corresponding with the data.
The invention also discloses a kind of data synchronization units across cluster, comprising:
First receiving module, for receiving data and its stamp information of corresponding first time from the first cluster;Wherein, Time when the first expired time and the data that the first time stamp information is the data are by the first collection pocket transmission Set;
Generation module generates the data pair for stabbing information and its corresponding receiving time according to the first time The second expired time answered;And
Writing module, for executing write operation to the data and corresponding second expired time of the data to store In the second cluster.
Optionally, the generation module, comprising:
First record sub module, for receiving data and its stamp information of corresponding first time from the first cluster When, record corresponding receiving time;
Reading submodule, for reading the first time stamp information;And
First acquisition submodule, for obtaining the data according to first time stamp information and the receiving time Corresponding second expired time.
Optionally, the generation module, comprising:
Second record sub module, for receiving data and its stamp information of corresponding first time from the first cluster When, record corresponding receiving time;
Second acquisition submodule, for according to the first expired time and described the described in first time stamp acquisition of information The corresponding sending time of one expired time;And
Third acquisition submodule, when for transmission corresponding according to first expired time, first expired time Between and receiving time, obtain corresponding second expired time of the data.
Optionally, the write module, specifically for writing the data and corresponding second expired time of the data Enter the caching system of the second cluster.
Optionally, described device further include:
Sending module, for collecting the pocket transmission delta data to first when the data of the second cluster-based storage change And its corresponding second timestamp information;Wherein, third expired time and institute of second timestamp information for the data State the set of sending time of the delta data by the second collection pocket transmission when.
Optionally, described device further include:
Second receiving module, for when the data of the first cluster-based storage change, receiving being somebody's turn to do for the first collection pocket transmission Data and its corresponding third timestamp information after variation;Wherein, the third timestamp information is data after the variation The set of sending time when data are by the first collection pocket transmission after expired time and the variation.
Optionally, described device further include:
Generation module is used for according to the third timestamp information and its corresponding receiving time, after generating the variation Corresponding 4th expired time of data;And
Update module, for using data and the 4th expired time after the received variation, updating storage the Data described in two clusters and corresponding second expired time of the data.

Claims (12)

1. a kind of method of data synchronization across cluster, comprising:
It receives data and its corresponding first time from the first cluster and stabs information;Wherein, the first time stamp information is The set of sending time when the first expired time and the data of the data are by the first collection pocket transmission;
Information and its corresponding receiving time are stabbed according to the first time, generates corresponding second expired time of the data; Wherein, second expired time subtracts the receiving time plus the sending time equal to first expired time;With And
Write operation is executed to be stored in the second cluster to the data and corresponding second expired time of the data;Wherein, For the data of first cluster expired after the first expired time, the data for being performed write operation are passing through second It is expired after expired time.
2. the method as described in claim 1, which is characterized in that described to stab information according to the first time and its corresponding connect Between time receiving, the step of generating the data corresponding second expired time, comprising:
When receiving the data and its stamp information of corresponding first time from the first cluster, corresponding receiving time is recorded;
When according to the first expired time described in first time stamp acquisition of information and the corresponding transmission of first expired time Between;
According to first expired time, the corresponding sending time of first expired time and receiving time, the number is obtained According to corresponding second expired time.
3. method according to claim 1 or 2, which is characterized in that described to the data and the data corresponding second Expired time executes the step of write operation is to be stored in the second cluster, comprising:
By the caching system of the data and corresponding second expired time write-in the second cluster itself of the data.
4. method according to claim 1 or 2, which is characterized in that the method also includes:
When the data of the second cluster-based storage change, to first collection pocket transmission delta data and its corresponding second time Stab information;Wherein, second timestamp information is that the third expired time of the data and the delta data are collected by second The set of sending time when pocket transmission.
5. method according to claim 1 or 2, which is characterized in that further include:
When the data of the first cluster-based storage change, data and its corresponding the after the variation of the first collection pocket transmission are received Three timestamp informations;Wherein, the third timestamp information is number after the expired time and the variation of data after the variation The set of time when according to by the first collection pocket transmission.
6. method as claimed in claim 5, which is characterized in that further include:
According to the third timestamp information and its corresponding receiving time, it is corresponding 4th expired to generate data after the variation Time;And
Using data after the received variation and the 4th expired time, the data described in the second cluster and institute are updated storage State corresponding second expired time of data.
7. a kind of data synchronization unit across cluster, comprising:
First receiving module, for receiving data and its stamp information of corresponding first time from the first cluster;Wherein, described The set of time when the first expired time and the data that stamp information is the data at the first time are by the first collection pocket transmission;
It is corresponding to generate the data for stabbing information and its corresponding receiving time according to the first time for generation module Second expired time;Wherein, second expired time subtracts institute plus the sending time equal to first expired time State receiving time;And
Writing module, for executing write operation to the data and corresponding second expired time of the data to be stored in the Two clusters;Wherein, the data of first cluster are in expired after the first expired time, the number for being performed write operation According to expired after the second expired time.
8. device as claimed in claim 7, which is characterized in that the generation module, comprising:
Second record sub module, for remembering when receiving the data and its stamp information of corresponding first time from the first cluster Record corresponding receiving time;
Second acquisition submodule, for according to the first expired time and first mistake described in first time stamp acquisition of information Time phase corresponding sending time;And
Third acquisition submodule, for according to first expired time, the corresponding sending time of first expired time and Receiving time obtains corresponding second expired time of the data.
9. device as claimed in claim 7 or 8, which is characterized in that the write module is specifically used for the data and institute State the caching system that the second cluster is written in corresponding second expired time of data.
10. device as claimed in claim 7 or 8, which is characterized in that described device further include:
Sending module, for when the data of the second cluster-based storage change, to first collection pocket transmission delta data and its Corresponding second timestamp information;Wherein, second timestamp information is the third expired time and the change of the data Change the set of sending time of the data by the second collection pocket transmission when.
11. device as claimed in claim 7 or 8, which is characterized in that described device further include:
Second receiving module, for when the data of the first cluster-based storage change, receiving the variation of the first collection pocket transmission Data and its corresponding third timestamp information afterwards;Wherein, the third timestamp information be the variation after data it is expired The set of sending time when data are by the first collection pocket transmission after time and the variation.
12. device as claimed in claim 11, which is characterized in that described device further include:
Generation module, for generating data after the variation according to the third timestamp information and its corresponding receiving time Corresponding 4th expired time;And
Update module, for using data and the 4th expired time after the received variation, updating storage in the second collection Group's data and corresponding second expired time of the data.
CN201410836865.1A 2014-12-27 2014-12-27 A kind of method of data synchronization and device across cluster Active CN104580183B (en)

Priority Applications (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
PCT/CN2015/095504 WO2016101758A1 (en) 2014-12-27 2015-11-25 Cross-cluster data synchronization method and device

Applications Claiming Priority (1)

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

Publications (2)

Publication Number Publication Date
CN104580183A CN104580183A (en) 2015-04-29
CN104580183B true CN104580183B (en) 2019-02-15

Family

ID=53095364

Family Applications (1)

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

Country Status (2)

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

Families Citing this family (5)

* 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
CN108512877B (en) * 2017-02-28 2022-03-18 腾讯科技(北京)有限公司 Method and device for sharing data in server cluster
CN111708796A (en) * 2020-06-23 2020-09-25 浪潮云信息技术股份公司 Data consistency method based on time stamp

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101426026A (en) * 2008-09-17 2009-05-06 北京六维世纪网络技术有限公司 Method and system for data synchronization between multiple servers
CN101425891A (en) * 2008-12-09 2009-05-06 中兴通讯股份有限公司 Time synchronization method, system and customer terminal
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

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2390442B (en) * 2002-03-19 2004-08-25 Sun Microsystems Inc Fault tolerant computer system
US7899783B1 (en) * 2006-05-30 2011-03-01 Cisco Technology, Inc Monitoring data integrity
US7451339B2 (en) * 2006-09-15 2008-11-11 International Business Machines Corporation Pulse-per-second attachment for STP
CN104156361B (en) * 2013-05-13 2017-11-17 阿里巴巴集团控股有限公司 A kind of method and system for realizing data syn-chronization
CN104580183B (en) * 2014-12-27 2019-02-15 北京奇虎科技有限公司 A kind of method of data synchronization and device across cluster

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101426026A (en) * 2008-09-17 2009-05-06 北京六维世纪网络技术有限公司 Method and system for data synchronization between multiple servers
CN101425891A (en) * 2008-12-09 2009-05-06 中兴通讯股份有限公司 Time synchronization method, system and customer terminal
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

Also Published As

Publication number Publication date
WO2016101758A1 (en) 2016-06-30
CN104580183A (en) 2015-04-29

Similar Documents

Publication Publication Date Title
CN104580183B (en) A kind of method of data synchronization and device across cluster
CN107943951B (en) Method and system for retrieving block chain service information
CN106776823B (en) A kind of time series data management method, equipment and device
CN105515872B (en) The update method of configuration information, apparatus and system
CN103559231B (en) A kind of file system quota management method, apparatus and system
CN103685590B (en) Obtain the method and system of IP address
EP3316175B1 (en) Methods and apparatus of an immutable threat intelligence system
CN104283926B (en) A kind of method of data synchronization, device and server
CN110457258A (en) A kind of blog management method, device, equipment and medium
WO2008074663A1 (en) Data synchronization mechanism for change-request-management repository interoperation
US20240163242A1 (en) Distributed domain name resolution and method for use of same
CN102685018A (en) Method and system for processing network instant messaging message and instant massaging equipment
CN103995807A (en) Massive data query and secondary processing method based on Web architecture
US11928605B2 (en) Techniques for cyber-attack event log fabrication
CN106126629A (en) A kind of master data management method and system based on live industry
CN113886485A (en) Data processing method, device, electronic equipment, system and storage medium
CN109086158A (en) A kind of Analysis on Abnormal method, apparatus and server
Bowling et al. We are meeting on Microsoft Teams: Forensic analysis in Windows, Android, and iOS operating systems
CN110417869A (en) A kind of activity method for pushing, device and computer equipment
CN108897804A (en) A kind of search system and method for the Internet space data
CN105245446B (en) A kind of file transmitting method and gateway
CN111309674A (en) System and method for file management by mobile computing device
CN108255898A (en) Page display method and device
US20170200465A1 (en) Location-specific audio capture and correspondence to a video file
CN110633322A (en) Resource information synchronization method and device, 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
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20220718

Address after: Room 801, 8th floor, No. 104, floors 1-19, building 2, yard 6, Jiuxianqiao Road, Chaoyang District, Beijing 100015

Patentee after: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Patentee before: Qizhi software (Beijing) Co.,Ltd.

TR01 Transfer of patent right