CN104184756A - Data synchronization method, device and system - Google Patents

Data synchronization method, device and system Download PDF

Info

Publication number
CN104184756A
CN104184756A CN201310190268.1A CN201310190268A CN104184756A CN 104184756 A CN104184756 A CN 104184756A CN 201310190268 A CN201310190268 A CN 201310190268A CN 104184756 A CN104184756 A CN 104184756A
Authority
CN
China
Prior art keywords
data
terminal
server
self
future
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201310190268.1A
Other languages
Chinese (zh)
Inventor
武巍
周遥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201310190268.1A priority Critical patent/CN104184756A/en
Publication of CN104184756A publication Critical patent/CN104184756A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a data synchronization method, a device and a system. The method is applied to a data synchronization system provided with multiple servers. Each server performs the following actions: data with data identification sent by a terminal connected with the server are received, and the data are saved as primary data and sent to a server in a server list pre-stored locally for synchronization processing; data with data identification sent by a server connected with the server are received, and the data are saved as clustered data; and according to data identification in the data pre-stored locally and subscribed by a terminal connected with the server, data subscribed by the terminal are selected from the stored primary data and the clustered data, and the selected data are synchronously pushed to the corresponding terminal. No clustered main server needs to be selected, each server is provided with functions of the clustered main server, and thus when part of the servers fail, operation of the system is not influenced, and data missing does not happen.

Description

A kind of method of data synchronization, Apparatus and system
Technical field
The application relates to communication technical field, relates in particular to a kind of method of data synchronization, Apparatus and system.
Background technology
In existing group system, data are synchronously normally realized by the server in system and terminal alternately, conventionally realization flow is: the server comprising from system, select a station server as cluster master server, complete data synchronize by cluster master server with other servers and terminal.
For example, as shown in Figure 1, a kind of atomic broadcasting (the Zookeeper Atomic Broadcast under concentrating type, Zab) synchronous architecture, comprise multiple servers and mutual many station terminals with it, example is server 101 as shown in Figure 1, server 102 and server 103, and terminal 104, terminal 105, terminal 106 and terminal 107, in the time of the synchronous flow process of executing data, conventionally the every station server in group system need be carried out vote by ballot flow process, then according to vote by ballot result, in server by Fast Paxos scheduling algorithm from system, select a station server as cluster master server, for example, server 101 in Fig. 1 as cluster master server after definite server 101 is cluster master server, other servers need initiatively to connect with cluster master server 101, for example, other servers are server 102 and server 103, then, cluster master server is after monitoring measures other servers and self connects, IP address corresponding other servers is added in local server list, so that follow-up cluster master server 101 receives after the synchrodata that the server 102 that is connected with self uploads, this synchrodata is sent to server 103, and this synchrodata is pushed to the terminal that is connected and subscribes in advance this synchrodata with server 103, and for example terminal 106, thus realize the synchronous of data.
Can find out from above-mentioned flow process, although above-mentioned group system can realize the synchronous of data, but because every secondary data is synchronous, need to first determine cluster master server, and the data that can only be realized between other servers and terminal by cluster master server are synchronizeed, in the situation that cluster master server breaks down, will cause data cannot realize synchronously like this, be unfavorable for the operation of system.
Summary of the invention
The embodiment of the present application provides a kind of method of data synchronization, Apparatus and system, causes in order to solve the problem that data cannot be synchronous in the situation that existing cluster master server breaks down.
Based on the problems referred to above, a kind of method of data synchronization that the embodiment of the present application provides, is applied in the data synchronous system that includes multiple servers, and the every station server in described data synchronous system is all carried out following step:
Receive the data that include Data Identification of the terminal transmission being connected with self, and set it as initial data preservation, other servers that the initial data of preservation is sent in the server list that this locality prestores are synchronously processed;
Receive the data that include Data Identification that the terminal that is connected with self sends, and future self terminal data as primary data preservation after, the server being sent in the server list that this locality prestores is synchronously processed;
Receive the data that include Data Identification of the server transmission being connected with self, and preserve the data from other servers as cluster data; And
The Data Identification comprising in the data of the terminal subscribes being connected with self prestoring according to this locality, selects the data of terminal subscribes the primary data of preserving from self and cluster data, and by the data synchronized push of selecting to corresponding terminal.
A kind of data synchronization unit that the embodiment of the present application provides, comprising:
Receive and preserve module, for receiving the data that include Data Identification of the terminal transmission being connected with self, and the data of self terminal are preserved as primary data in the future; And receive the data that include Data Identification of the server transmission being connected with self, and preserve the data from other servers as cluster data;
Sending module, for future, the data of self terminal are sent to the server of the server list that this locality prestores;
Select module, the Data Identification comprising for the data of the terminal subscribes being connected with self that prestores according to this locality is selected the data of terminal subscribes from the primary data of self preservation and cluster data;
Pushing module, for by the data-pushing of selecting to corresponding terminal.
A kind of data synchronous system that the embodiment of the present application provides, comprise to multiple servers and with multiple terminals of described server interaction,
Every station server, data that include Data Identification that send for receiving the terminal that is connected with self, and after the data of self terminal are preserved as primary data in the future, the server being sent in the server list that this locality prestores is synchronously processed; Receive the data that include Data Identification of the server transmission being connected with self, and preserve the data from other servers as cluster data; And the Data Identification comprising in the data of the terminal subscribes being connected with self prestoring according to this locality, the primary data of preserving from self and cluster data, select the data of terminal subscribes, and by the data synchronized push of selecting to corresponding terminal;
Each terminal, sends the data that include Data Identification for the server to being connected with self, and receives the data of self subscribing to of the server push being connected with self.
The beneficial effect of the embodiment of the present application comprises:
A kind of method of data synchronization, Apparatus and system that the embodiment of the present application provides, the method is applied in the data synchronous system that includes multiple servers, for the every station server in data synchronous system, all carry out following step: the data that include Data Identification that receive the terminal transmission being connected with self, and after setting it as primary data and preserving, the server being sent in the server list that this locality prestores is synchronously processed; The data that include Data Identification that the server that reception is connected with self is sent, and set it as the preservation of cluster data; Then, the Data Identification comprising in the data of the terminal subscribes being connected with self prestoring according to this locality, selects the data of terminal subscribes the primary data of preserving from self and cluster data, and by the data synchronized push of selecting to this terminal.In the embodiment of the present application, every station server may first receive primary data, also may first receive cluster data, here, the order that receives primary data and cluster data is not limited, in the synchronous flow process of above-mentioned data, every station server all possesses the function of cluster master server, can complete data with other servers synchronizes, without election cluster master server, and in the data synchronous system of the embodiment of the present application, when in the situation that a certain or multiple servers break down, the terminal being attached thereto can be by connecting other servers, synchronous to realize data, in the situation of having avoided cluster master server to break down, cause the problem that data cannot be synchronous.
Brief description of the drawings
Fig. 1 is the structural representation of existing group system;
The method of data synchronization flow chart that Fig. 2 provides for the embodiment of the present application;
Fig. 3 realizes one of flow chart that data mode is consistent for what the embodiment of the present application provided;
Fig. 4 is two of realizing of providing of the embodiment of the present application flow chart that data mode is consistent;
Fig. 5 A to Fig. 5 C is that the embodiment of the present application is applied to the mutual schematic diagram between the server of HSF;
The data synchronization unit schematic diagram that Fig. 6 provides for the embodiment of the present application;
The data synchronous system schematic diagram that Fig. 7 the embodiment of the present application provides.
Embodiment
In existing group system, because the every station server in system need be carried out vote by ballot flow process, select cluster master server, and after selecting cluster master server, other servers in system can only be realized alternately data with cluster master server and synchronize, under this data method of synchronization, when in the situation that cluster master server breaks down, will cause the data in system cannot be synchronous, thereby be unfavorable for the operation of whole system.
Based on this problem, the embodiment of the present application provides a kind of method of data synchronization, Apparatus and system, without definite cluster master server, every station server in the application's data synchronous system all possesses the function of cluster master server, can complete data with other servers and terminal synchronizes, and in the data synchronous system providing in the embodiment of the present application, when in the situation that a certain station server breaks down, the terminal that station server connects therewith also can be by connecting another station server, keep the synchronous of data, in this situation of having avoided cluster master server to break down, cause the problem that data cannot be synchronous.
Below in conjunction with Figure of description, a kind of method of data synchronization that the embodiment of the present application is provided, the embodiment of Apparatus and system describe.
A kind of method of data synchronization that the embodiment of the present application provides, as shown in Figure 2, the method is applied in the data synchronous system that includes multiple servers, for the every station server in data synchronous system, all can carry out following steps:
S201: receive the data that include Data Identification that the terminal that is connected with self sends, and future self terminal data as primary data preservation after, be sent to the server in the server list that this locality prestores;
Here, every station server can pass through transmission control protocol/Internet Interconnection agreement (Transmission Control Protocol/Internet Protocol, TCP/IP) connect with terminal, and the data that terminal sends can have polytype, can determine according to different application scenarioss, for example, the data that terminal sends can be IP address dates of far call server etc.
It should be noted that, for every station server, for can be by data synchronized transmission to correct position, can a pre-configured server list on every station server, in this server list, include the information such as self and the follow-up IP address that need to carry out with it synchronous server, so that every station server is according to the server list of self configuration, the data that oneself is received are sent in previous list on the server except self after preserving.Here, the server list of above-mentioned configuration can dynamically update, fashionable when there being new server to add, can in advance the information such as the IP address of new server be added in above-mentioned server list, and in the situation that listening to existing server and disconnecting, the relevant information of the server disconnecting can be deleted from server list.
S202: receive the data that include Data Identification of the server transmission being connected with self, and preserve the data from other servers as cluster data;
Above-mentioned cluster data refer to the primary data of the connected terminal transmission of the arbitrary server preservation being connected with self in server list.
In the embodiment of the present application, it is primary data that the software program that every station server can arrange by self is distinguished the data that receive, or cluster data, for example, distinguish according to the IP address of terminal information comprising in the data that receive, can certainly distinguish according to other information of carrying in data, will not enumerate at this.
The hardware that every station server can also arrange by self is distinguished primary data and cluster data, the port of the unified employing of terminal being for example connected with this server sends data, the unified another one port that adopts of other servers being connected with this server sends data, like this, this server can, according to the port of Data Source, be distinguished primary data and cluster data, certainly, also can adopt other hardware to distinguish, will not enumerate at this.
And for every station server, may first receive the cluster data that the server that is connected with self is sent, also likely first receive the primary data that the terminal that is connected with self is sent.That is to say, the embodiment of the present application in the specific implementation, may first be carried out above-mentioned steps S201, also may first carry out above-mentioned steps S202, and therefore, the embodiment of the present application is not carried out any restriction to the sequencing of above-mentioned steps S201-S202.
S203: the Data Identification comprising in the data of the terminal subscribes being connected with self prestoring according to this locality, the primary data of preserving from self and cluster data, select the data of terminal subscribes, and by the data-pushing of selecting to corresponding terminal;
It should be noted that, the embodiment of the present application is in the time that executing data is synchronous, for the each terminal connecting for the every station server in data synchronous system, it is after successfully connecting with this station server, the data that self can be subscribed to report this station server and preserve,, in the data of subscription, include the Data Identification for unique differentiation data here, to screen according to this terminal iidentification the follow-up data of preserving from self of this station server.For example, Data Identification can, by the self-defined generation of terminal, embody with dataID.
Further, in the embodiment of the present application, in the primary data that every station server is preserved and cluster data, all also include terminal iidentification, guarantee so that follow-up when data mode is consistent to use, this terminal iidentification is used for characterizing an issue terminal, conventionally adopt the form of terminal IP+ port numbers to represent, for example, terminal iidentification can be datumID, like this, different issue terminals can identify identical data by distributing data, but the mark of issue terminal is different, and a terminal can only be connected with a station server, this is by the client control in terminal.
Further, in order to ensure the state consistency of primary data in data synchronous system, every of receiving can be preserved to the life cycle self arranging at primary data, follow-up in life cycle corresponding to every primary data, consistent (as shown in Figure 3) that can realize by following step data mode:
S301: the delay package that carries terminal iidentification that receives the terminal transmission being connected with self;
S302: the data that in the future in the delay package of self terminal, terminal iidentification is corresponding extend the Dai-ichi Mutual Life Insurance cycle of a setting, and the delay package of self terminal is sent to the server in the server list that this locality prestores in the future.
In this flow process, if do not receive the delay package that a certain primary Data Source terminal sends, so, these primary data are deleted.
Similarly, every station server state variation of cluster data that self preserves that can not know for sure, so, in order to ensure the state consistency of cluster data in data synchronous system, every station server also can be preserved the life cycle self arranging by every cluster data that receive conventionally, follow-up in life cycle corresponding to every cluster data, consistent (as shown in Figure 4) that can realize by following flow process data mode:
S401: the delay package that carries terminal iidentification that receives the server transmission being connected with self;
S402: the second life cycle that the data that in the delay package from server terminal, terminal iidentification is corresponding is extended to a setting.
In this flow process, if do not receive the delay package of the server transmission that in a certain cluster data, terminal corresponding to terminal iidentification connects, so, these cluster data are deleted.
It should be noted that, the embodiment of the present application is not limited in above-mentioned realization flow and guarantees the consistent of data mode, also can adopt other implementations.The Dai-ichi Mutual Life Insurance cycle of above-mentioned setting can be identical with the second life cycle arranging, also can be different, and both values can synchronously need to be set according to real data, the Dai-ichi Mutual Life Insurance cycle for example arranging can be N second, the second life cycle arranging can be M second, certainly both also can adopt other numerical value, enumerate no longer one by one at this.
In addition, in the time carrying out the above-mentioned operation by a life cycle of data prolongation corresponding terminal iidentification, these data can be continued to preserve a life cycle from receiving the current time of delay package; Also these data can be preserved to 2 life cycles again from receiving the current time of delay package.
Alternatively, every station server can pass through hardware, and the timer for example self arranging carrys out the life cycle that Monitoring Data is preserved.Certainly, also can monitor by other means life cycle, will not enumerate at this.
Further, every primary data and cluster data that every station server is preserved can also comprise version number, whether change so that distinguish data, this version number all can store in end side and server side, like this, in the time of the upper station server of the initial connection of terminal, the version number of the data of terminal to report is 0, once, corresponding versions of data number just increases by 1 in the every renewal of data afterwards.So, the data content, terminal iidentification and the Data Identification that exist packet to contain if follow-up are all identical, just both version numbers are not identical, in this case, just select the larger data of version number, can avoid like this terminal because of certain reason and the server being connected at first disconnection, the data that report while connecting with new server are capped, thereby have guaranteed the consistency that data are synchronous.
Preferably, in order to ensure in the time that primary data change, realize data synchronous, every station server can also be carried out following flow process: in the case of receiving the data of the terminal transmission being connected with self, version number in the data of self terminal in the future, compares with the versions of data number that in the primary data of self preserving, terminal iidentification is corresponding; And in the time comparing version number and change, the data of self terminal are sent to the server in server list in the future.Here, push after thread starting, be not directly by the data-pushing of this variation to the terminal of subscribing to, but the identical data of the Data Identification corresponding with these data are pushed to corresponding terminal together, to reduce the converging operationJu Hecaozuo of end side.
Preferably, in order to ensure in the time that cluster data change, realize data synchronous, every station server can also be carried out following flow process: in the case of receiving the data of the server transmission being connected with self, by version number corresponding to terminal iidentification in the data from other servers, compare with the version number that in the cluster data of self preserving, terminal iidentification is corresponding; And in the time comparing version number and change, by the data from server with the data-pushing identical with its Data Identification to subscribing to terminal.
It should be noted that, the embodiment of the present application is not limited in above-mentioned according to version number's specified data renewal, can certainly adopt other mode specified datas to upgrade.
Further, in order to reduce the transmission quantity of synchrodata, every station server also can be carried out following step select the data of terminal subscribes the primary data of preserving from self and cluster data before:
Judge whether the primary data of self preserving exist with in cluster data the data that Data Identification is identical;
If exist, data identical Data Identification are put into queue to be combined, start merging thread the data in queue to be combined are merged.
Suppose this server judge exist two groups identify identical data (as shown in following table 1 and following table 2), starting merging thread merges these two groups of data, merge into the data shown in following table 3 by the data of table 1 and table 2, then carry out follow-up data selection.
Table 1
Table 2
Table 3
Further, synchronize successfully with the data of server that self connects in order to ensure every station server, also can carry out following flow process: judge future self terminal data be sent in the first setting-up time after other servers, whether to receive the first response message that this server returns; In the situation that receiving, determine the synchronously success of this secondary data; In the situation that not receiving, be considered as this failure of data synchronization, re-start simultaneous operation, the data that are about to self terminal resend to this server, until receive the first response message.
Further, synchronize successfully with the data of end side in order to ensure every station server, also can carry out following flow process: judge whether the data-pushing of selecting is received to the second response message that corresponding terminal returns to the second setting-up time after corresponding terminal; In the situation that receiving, determine the synchronously success of this secondary data; In the situation that not receiving, be considered as this failure of data synchronization, re-start simultaneous operation, the data that are about to select push to corresponding terminal again, disconnect until listen to corresponding terminal.
It should be noted that, the embodiment of the present application is not limited in the synchronous successfully implementation of above-mentioned confirmation data, certainly can also adopt other modes to realize.
In the embodiment of the present application, in the situation that server breaks down, the terminal being connected with server can listen to, in this case, a station server in other servers in the server list that terminal can be stored to self is initiated connection request, and after successfully connecting, send the primary data of local cache to the server of new connection, thereby it is synchronous not affect data.
Method of data synchronization the embodiment of the present application being provided below in conjunction with concrete application scenarios carries out brief description:
Application scenarios one
At Taobao's service framework (High-speed Service Framework, HSF) under, one station server S2 has subscribed to the data of another station server S1, here, server S 1 and server S2 are equivalent to above-mentioned terminal, the data of subscribing to, for example, be " far call service data ", carries the IP address D 1 of server S 1 in these data.
So, under this framework, in the time of normal operation, as shown in Figure 5A, server S 1 can send to oneself " far call service data " on the software load server R1 self connecting; Software load server R1 receives rear life cycle of preserving a setting as primary data, and " far call service data " pushed to software load server R2, like this after software load server R2 successfully receives, preserve the life cycle of a setting as cluster data, and be pushed to server S 2, realize the synchronous of data, follow-uply initiatively initiated to call service request to server S 1 by server S 2, carried out subsequent operation.
In the situation that server S 1 breaks down, software load server R1 judges from do not receive the delay package that server S 1 sends in life cycle is set, " service of RCP far call " data that this locality is preserved are deleted (as shown in Figure 5 B, the "×" at S1 place represents that S1 breaks down, and the "×" at R1 place represents that R1 has deleted data); And for software load server R2, judge from also do not receive delay package in the life cycle arranging, at this moment software load server R2 also can preserve this locality the deletion of " service of RCP far call " data, so, server S 2 does not receive " service of RCP far call " data, can not send and call service request (as shown in Figure 5 C, the "×" at R2 place represents that R2 has deleted data) to server S 1.
Application scenarios two
In load balancing (Load Balance Service) system, in order to remove LBS hardware load balancing, in original system, application server is tied to the domain name of the other side's server on the IP address of LBS hardware conventionally, like this, LBS goes service request to be forwarded on the IP of a certain station server again, safeguards the health status of these machines simultaneously.But, removing after LBS, application server is by being published to the IP address of oneself on intermediate server, and the other side's server gets IP address list by subscription again, and aforementioned this mode is the data synchronization mechanism of the embodiment of the present application of employing equally.
Based on same inventive concept, the embodiment of the present application also provides a kind of data synchronization unit and system, the method that the principle of dealing with problems with system due to this device is synchronizeed with aforementioned data is similar, therefore the enforcement of this device and system can be referring to the enforcement of preceding method, repeats part and repeat no more.
The embodiment of the present application provides a kind of data synchronization unit, as shown in Figure 6, specifically comprises:
Receive and preserve module 601, for receiving the data that include Data Identification of the terminal transmission being connected with self, and the data of self terminal are preserved as primary data in the future; And receive the data that include Data Identification of the server transmission being connected with self, and preserve the data from other servers as cluster data;
Sending module 602, for future, the data of self terminal are sent to the server of the server list that this locality prestores;
Select module 603, the Data Identification comprising for the data of the terminal subscribes being connected with self that prestores according to this locality is selected the data of terminal subscribes from the primary data of self preservation and cluster data;
Pushing module 604, for by the data-pushing of selecting to corresponding terminal.
Preferably, in every primary data that above-mentioned reception preservation module 601 is preserved, include terminal iidentification,
This device, can also comprise the first prolongation module 605,
Module 601 is preserved in above-mentioned reception, also for receiving the delay package that carries terminal iidentification of the terminal transmission being connected with self;
First extends module 605, and for future, the data corresponding to delay package terminal iidentification of self terminal extend the Dai-ichi Mutual Life Insurance cycle of a setting;
Sending module 602, also for future self terminal delay package be sent to the server of the server list that this locality prestores.
Preferably, in every cluster data that above-mentioned reception preservation module 601 is preserved, include terminal iidentification,
This device, can also comprise the second prolongation module 606,
Module 601 is preserved in above-mentioned reception, also for receiving the delay package that carries terminal iidentification of the server transmission being connected with self;
Above-mentioned second extends module 606, for data corresponding the delay package terminal iidentification from server terminal being extended to the second life cycle of a setting.
Preferably, in every primary data that above-mentioned reception preservation module 601 is preserved, include version number,
This device, can also comprise:
The first comparison module 607, in the time receiving the data of the terminal transmission being connected with self, the version number in the data of self terminal in the future, compares with the version number that in the primary data of self preserving, terminal iidentification is corresponding;
Above-mentioned sending module 602, also when comparing version number at the first comparison module 607 and change, the data of self terminal are sent to the server in server list in the future;
Above-mentioned pushing module 604, also when comparing version number at the first comparison module 607 and change, in the future the data of self terminal with the data-pushing identical with its Data Identification to subscribing to terminal.
Preferably, in every cluster data that above-mentioned reception preservation module 601 is preserved, include version number,
This device, can also comprise:
The second comparison module 608, in the time receiving the data of the server transmission being connected with self, by version number corresponding to terminal iidentification in the data from other servers, compares with the version number that in the cluster data of self preserving, terminal iidentification is corresponding;
Above-mentioned pushing module 604, also when comparing version number at the second comparison module 608 and change, by the data from server with the data-pushing identical with its Data Identification to subscribing to terminal.
Preferably, this device, can also comprise:
Judge module 609, for judging whether the primary data that reception preservation module 601 is preserved exist with cluster data the data that Data Identification is identical;
Merge module 610, while existence for being judged as at judge module 609, data identical Data Identification are put into queue to be combined, start merging thread the data in queue to be combined are merged.
Preferably, above-mentioned sending module 602, also for future self terminal data be sent to while not receiving the first response message that this server returns in the first setting-up time after other servers, the data of self terminal resend to these other servers in the future, until receive the first response message; And the data-pushing of selecting is not received to the second response message that corresponding terminal returns to the second setting-up time after corresponding terminal, the data of selecting are pushed to corresponding terminal again, disconnect until listen to corresponding terminal.
The data synchronous system that the embodiment of the present application provides, as shown in Figure 7, comprise multiple servers 701 and with the mutual multiple terminals 702 of server 701,
Above-mentioned server 701, data that include Data Identification that send for receiving the terminal that is connected with self, and after the data of self terminal are preserved as primary data in the future, the server being sent in the server list that this locality prestores is synchronously processed; Receive the data that include Data Identification of the server transmission being connected with self, and preserve the data from other servers as cluster data; And the Data Identification comprising in the data of the terminal subscribes being connected with self prestoring according to this locality, the primary data of preserving from self and cluster data, select the data of terminal subscribes, and by the data synchronized push of selecting to corresponding terminal;
Above-mentioned terminal 702, sends the data that include Data Identification for the server to being connected with self, and receives the data of self subscribing to of the server push being connected with self.
Preferably, above-mentioned terminal 702, also for monitoring the server self connecting while breaking down, initiate connection request to the arbitrary station server except the server breaking down in the server list of this locality storage, and include the data of Data Identification to the server transmission of successful connection.
Those skilled in the art should understand, the application's embodiment can be provided as method, system or computer program.Therefore, the application can adopt complete hardware implementation example, completely implement software example or the form in conjunction with the embodiment of software and hardware aspect.And the application can adopt the form at one or more upper computer programs of implementing of computer-usable storage medium (including but not limited to magnetic disc store, CD-ROM, optical memory etc.) that wherein include computer usable program code.
The application is with reference to describing according to flow chart and/or the block diagram of the method for the embodiment of the present application, equipment (system) and computer program.Should understand can be by the flow process in each flow process in computer program instructions realization flow figure and/or block diagram and/or square frame and flow chart and/or block diagram and/or the combination of square frame.Can provide these computer program instructions to the processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing device to produce a machine, the instruction that makes to carry out by the processor of computer or other programmable data processing device produces the device for realizing the function of specifying at flow process of flow chart or multiple flow process and/or square frame of block diagram or multiple square frame.
These computer program instructions also can be stored in energy vectoring computer or the computer-readable memory of other programmable data processing device with ad hoc fashion work, the instruction that makes to be stored in this computer-readable memory produces the manufacture that comprises command device, and this command device is realized the function of specifying in flow process of flow chart or multiple flow process and/or square frame of block diagram or multiple square frame.
These computer program instructions also can be loaded in computer or other programmable data processing device, make to carry out sequence of operations step to produce computer implemented processing on computer or other programmable devices, thereby the instruction of carrying out is provided for realizing the step of the function of specifying in flow process of flow chart or multiple flow process and/or square frame of block diagram or multiple square frame on computer or other programmable devices.
Although described the application's preferred embodiment, once those skilled in the art obtain the basic creative concept of cicada, can make other change and amendment to these embodiment.So claims are intended to be interpreted as comprising preferred embodiment and fall into all changes and the amendment of the application's scope.
Obviously, those skilled in the art can carry out various changes and modification and the spirit and scope that do not depart from the application to the application.Like this, if these amendments of the application and within modification belongs to the scope of the application's claim and equivalent technologies thereof, the application is also intended to comprise these changes and modification interior.

Claims (10)

1. a method of data synchronization, is applied in the data synchronous system that includes multiple servers, it is characterized in that, the every station server in described data synchronous system is all carried out following step:
Receive the data that include Data Identification that the terminal that is connected with self sends, and future self terminal data as primary data preservation after, the server being sent in the server list that this locality prestores is synchronously processed;
Receive the data that include Data Identification of the server transmission being connected with self, and preserve the data from other servers as cluster data; And
The Data Identification comprising in the data of the terminal subscribes being connected with self prestoring according to this locality, selects the data of terminal subscribes the primary data of preserving from self and cluster data, and by the data synchronized push of selecting to corresponding terminal.
2. the method for claim 1, is characterized in that, every primary data also include terminal iidentification,
Every station server is also carried out following step:
Receive the delay package that carries terminal iidentification of the terminal transmission being connected with self;
The data that in the future in the delay package of self terminal, terminal iidentification is corresponding extend the Dai-ichi Mutual Life Insurance cycle of a setting, and the delay package of self terminal is sent to the server in the server list that this locality prestores in the future.
3. the method for claim 1, is characterized in that, every cluster data also include terminal iidentification,
Every station server is also carried out following step:
Receive the delay package that carries terminal iidentification of the server transmission being connected with self;
The data that in delay package from described server terminal, terminal iidentification is corresponding are extended to the second life cycle of a setting.
4. method as claimed any one in claims 1 to 3, is characterized in that, every primary data also include version number,
Every station server is also carried out following step:
If receive the data of the terminal transmission being connected with self, the version number in the data of self terminal in the future, the version number corresponding with terminal iidentification described in the primary data of self preserving compares;
Change if compare version number, the data of self terminal are sent to the server in described server list in the future;
In the future the data of self terminal with the data-pushing identical with its Data Identification to subscribing to terminal.
5. method as claimed in claim 4, is characterized in that, every cluster data also include version number,
Every station server is also carried out following step:
If receive the data of the server transmission being connected with self, by version number corresponding to terminal iidentification in the data from other servers, the version number corresponding with terminal iidentification described in the cluster data of self preserving compares;
Change if compare version number, by the data from described server with the data-pushing identical with its Data Identification to subscribing to terminal.
6. method as claimed in claim 5, is characterized in that, every station server was also carried out following step select the data of terminal subscribes the primary data of preserving from self and cluster data before:
Judge whether the primary data of self preserving exist with in cluster data the data that Data Identification is identical;
If exist, data identical Data Identification are put into queue to be combined, start merging thread the data in queue to be combined are merged.
7. method as claimed in claim 6, is characterized in that, every station server is also carried out following step:
If the data of self terminal are sent to and do not receive the first response message that described server returns in the first setting-up time after other servers in future, the data of self terminal resend to described server in the future, until receive described the first response message;
If the data-pushing of selecting is not received to the second response message that corresponding terminal returns to the second setting-up time after corresponding terminal, the data of selecting are pushed to corresponding terminal again, disconnect until listen to corresponding terminal.
8. a data synchronization unit, is characterized in that, comprising:
Receive and preserve module, for receiving the data that include Data Identification of the terminal transmission being connected with self, and the data of self terminal are preserved as primary data in the future; And receive the data that include Data Identification of the server transmission being connected with self, and preserve the data from other servers as cluster data;
Sending module, for future, the data of self terminal are sent to the server of the server list that this locality prestores;
Select module, the Data Identification comprising for the data of the terminal subscribes being connected with self that prestores according to this locality is selected the data of terminal subscribes from the primary data of self preservation and cluster data;
Pushing module, for by the data-pushing of selecting to corresponding terminal.
9. device as claimed in claim 8, is characterized in that, in every primary data that described reception preservation module is preserved, includes terminal iidentification,
This device also comprises the first prolongation module,
Module is preserved in described reception, also for receiving the delay package that carries terminal iidentification of the terminal transmission being connected with self;
First extends module, and for future, the data corresponding to delay package terminal iidentification of self terminal extend the Dai-ichi Mutual Life Insurance cycle of a setting;
Described sending module, also for future self terminal delay package be sent to the server of the server list that this locality prestores.
10. a data synchronous system, is characterized in that, comprises multiple servers and the multiple terminals with described server interaction,
Every station server, data that include Data Identification that send for receiving the terminal that is connected with self, and after the data of self terminal are preserved as primary data in the future, the server being sent in the server list that this locality prestores is synchronously processed; Receive the data that include Data Identification of the server transmission being connected with self, and preserve the data from other servers as cluster data; And the Data Identification comprising in the data of the terminal subscribes being connected with self prestoring according to this locality, the primary data of preserving from self and cluster data, select the data of terminal subscribes, and by the data synchronized push of selecting to corresponding terminal;
Each terminal, sends the data that include Data Identification for the server to being connected with self, and receives the data of self subscribing to of the server push being connected with self.
CN201310190268.1A 2013-05-21 2013-05-21 Data synchronization method, device and system Pending CN104184756A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310190268.1A CN104184756A (en) 2013-05-21 2013-05-21 Data synchronization method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310190268.1A CN104184756A (en) 2013-05-21 2013-05-21 Data synchronization method, device and system

Publications (1)

Publication Number Publication Date
CN104184756A true CN104184756A (en) 2014-12-03

Family

ID=51965496

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310190268.1A Pending CN104184756A (en) 2013-05-21 2013-05-21 Data synchronization method, device and system

Country Status (1)

Country Link
CN (1) CN104184756A (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106254456A (en) * 2016-08-03 2016-12-21 深圳市商汤科技有限公司 A kind of method of data synchronization and data synchronous system
CN106302827A (en) * 2016-10-25 2017-01-04 聚好看科技股份有限公司 Communication means based on distributed system, equipment and distributed system
CN106330994A (en) * 2015-06-18 2017-01-11 天脉聚源(北京)科技有限公司 User message publishing method and system
CN106817408A (en) * 2016-12-27 2017-06-09 中国银联股份有限公司 A kind of distributed server cluster dispatching method and device
CN106878473A (en) * 2017-04-20 2017-06-20 腾讯科技(深圳)有限公司 A kind of message treatment method, server cluster and system
CN106888240A (en) * 2015-12-16 2017-06-23 天脉聚源(北京)科技有限公司 A kind of page data dissemination method and system
CN107302551A (en) * 2016-04-14 2017-10-27 阿里巴巴集团控股有限公司 A kind of service data dissemination method and device
CN108366086A (en) * 2017-12-25 2018-08-03 聚好看科技股份有限公司 A kind of method and device of control business processing
CN108512877A (en) * 2017-02-28 2018-09-07 腾讯科技(北京)有限公司 The method and apparatus of sharing data in a kind of server cluster
CN108809681A (en) * 2017-05-04 2018-11-13 华为技术有限公司 A kind of method, apparatus and system for verifying data consistency
CN109660613A (en) * 2018-12-11 2019-04-19 网宿科技股份有限公司 Document transmission method and system
CN110032548A (en) * 2019-04-18 2019-07-19 中国南方电网有限责任公司 Power telecom network monitor supervision platform unstructured data distribution management method and system
CN110224988A (en) * 2019-05-10 2019-09-10 视联动力信息技术股份有限公司 A kind of processing method of image data, system and device and storage medium
CN111726376A (en) * 2019-03-19 2020-09-29 阿里巴巴集团控股有限公司 On-site ticket checking system
CN115102968A (en) * 2022-06-16 2022-09-23 普联技术有限公司 Data synchronization method, device, system and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1356654B1 (en) * 2001-02-02 2005-01-19 TeliaSonera Finland Oyj System and method for assigning dynamic ip-addresses
CN1622519A (en) * 2003-11-29 2005-06-01 鸿富锦精密工业(深圳)有限公司 Information synchronous management system and method
CN101036403A (en) * 2004-12-28 2007-09-12 三星电子株式会社 Method and apparatus for managing multimedia messages
CN102291416A (en) * 2011-09-14 2011-12-21 成都软智科技有限公司 Two-way synchronizing method and system of client-side and server-side

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1356654B1 (en) * 2001-02-02 2005-01-19 TeliaSonera Finland Oyj System and method for assigning dynamic ip-addresses
CN1622519A (en) * 2003-11-29 2005-06-01 鸿富锦精密工业(深圳)有限公司 Information synchronous management system and method
CN101036403A (en) * 2004-12-28 2007-09-12 三星电子株式会社 Method and apparatus for managing multimedia messages
CN102291416A (en) * 2011-09-14 2011-12-21 成都软智科技有限公司 Two-way synchronizing method and system of client-side and server-side

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106330994A (en) * 2015-06-18 2017-01-11 天脉聚源(北京)科技有限公司 User message publishing method and system
CN106888240A (en) * 2015-12-16 2017-06-23 天脉聚源(北京)科技有限公司 A kind of page data dissemination method and system
CN107302551A (en) * 2016-04-14 2017-10-27 阿里巴巴集团控股有限公司 A kind of service data dissemination method and device
CN107302551B (en) * 2016-04-14 2021-07-02 阿里巴巴集团控股有限公司 Service data publishing method and device
CN106254456A (en) * 2016-08-03 2016-12-21 深圳市商汤科技有限公司 A kind of method of data synchronization and data synchronous system
CN106254456B (en) * 2016-08-03 2020-03-10 深圳市商汤科技有限公司 Data synchronization method and data synchronization system
CN106302827A (en) * 2016-10-25 2017-01-04 聚好看科技股份有限公司 Communication means based on distributed system, equipment and distributed system
CN106302827B (en) * 2016-10-25 2019-09-17 聚好看科技股份有限公司 Communication means, equipment and distributed system based on distributed system
CN106817408A (en) * 2016-12-27 2017-06-09 中国银联股份有限公司 A kind of distributed server cluster dispatching method and device
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
CN106878473A (en) * 2017-04-20 2017-06-20 腾讯科技(深圳)有限公司 A kind of message treatment method, server cluster and system
CN106878473B (en) * 2017-04-20 2021-03-30 腾讯科技(深圳)有限公司 Message processing method, server cluster and system
CN108809681A (en) * 2017-05-04 2018-11-13 华为技术有限公司 A kind of method, apparatus and system for verifying data consistency
CN108366086A (en) * 2017-12-25 2018-08-03 聚好看科技股份有限公司 A kind of method and device of control business processing
CN109660613A (en) * 2018-12-11 2019-04-19 网宿科技股份有限公司 Document transmission method and system
CN111726376A (en) * 2019-03-19 2020-09-29 阿里巴巴集团控股有限公司 On-site ticket checking system
CN111726376B (en) * 2019-03-19 2022-01-11 阿里巴巴集团控股有限公司 On-site ticket checking system
CN110032548A (en) * 2019-04-18 2019-07-19 中国南方电网有限责任公司 Power telecom network monitor supervision platform unstructured data distribution management method and system
CN110224988A (en) * 2019-05-10 2019-09-10 视联动力信息技术股份有限公司 A kind of processing method of image data, system and device and storage medium
CN110224988B (en) * 2019-05-10 2023-04-07 视联动力信息技术股份有限公司 Image data processing method, system and device and storage medium
CN115102968A (en) * 2022-06-16 2022-09-23 普联技术有限公司 Data synchronization method, device, system and storage medium

Similar Documents

Publication Publication Date Title
CN104184756A (en) Data synchronization method, device and system
CN107465767B (en) Data synchronization method and system
CN108040108B (en) Communication switching method, device, coordination server and readable storage medium
US9740515B2 (en) Exception handling method, apparatus, and client
CN102769626B (en) A kind of session information synchronous method, device and system
CN103139157B (en) A kind of based on the network communication method of socket, Apparatus and system
CN107888434B (en) Network equipment configuration synchronization method and device
CN103631652A (en) Method and system for achieving virtual machine migration
CN109150659B (en) Processor and BFD message transmission method
CN109802995A (en) Information push method, device, equipment and storage medium
CN112486707A (en) Redis-based message asynchronous consumption method and device
CN109788251B (en) Video processing method, device and storage medium
CN111901395B (en) Multi-cluster switching method and device
CN110769019A (en) Session processing method, device and system
CN103138961B (en) server control method, controlled server and central control server
CN102684865B (en) Method, system and device for data synchronization
CN114884805B (en) Data transmission method, device, terminal and storage medium
CN114143730B (en) Signaling processing method, communication system, electronic device, and storage medium
CN111385324A (en) Data communication method, device, equipment and storage medium
CN115632815A (en) Data updating method and device, electronic equipment and storage medium
CN106209666B (en) Link multiplexing method and system based on load balancer
CN114697339A (en) Load balancing method and device under centralized architecture
CN111416852A (en) Method for session synchronization among multiple load balancers and load balancer
WO2016188499A1 (en) Network management method and apparatus, network device and data synchronization system
US11973824B2 (en) Method for data transmission of audio and video in end-to-end system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20141203

RJ01 Rejection of invention patent application after publication