CN104967536A - Method and device for realizing data consistency of multiple machine rooms - Google Patents

Method and device for realizing data consistency of multiple machine rooms Download PDF

Info

Publication number
CN104967536A
CN104967536A CN201510370133.2A CN201510370133A CN104967536A CN 104967536 A CN104967536 A CN 104967536A CN 201510370133 A CN201510370133 A CN 201510370133A CN 104967536 A CN104967536 A CN 104967536A
Authority
CN
China
Prior art keywords
data
machine room
message
machine
value
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
CN201510370133.2A
Other languages
Chinese (zh)
Inventor
杨武明
麦俊生
孙小俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201510370133.2A priority Critical patent/CN104967536A/en
Publication of CN104967536A publication Critical patent/CN104967536A/en
Pending legal-status Critical Current

Links

Abstract

The invention discloses a method and a device for realizing data consistency of multiple machine rooms, which solve the problem in the prior art that the data among the plurality of machine rooms are hard to be consistent under the condition that the updating is frequent. The method comprises steps of transmitting notification to the other machine rooms when the data of one machine room is updated to enable the data of the other machine rooms to be correspondingly updated according to the notification, furthermore, regularly comparing the data of all machine rooms, when the data is inconsistent, identifying the machine room having correct data, and updating the data of the other machine rooms according to the machine room storing the correct data.

Description

Realize the method and apparatus of multimachine room data consistency
Technical field
The present invention relates to Internet technical field, be specifically related to a kind of method and apparatus realizing multimachine room data consistency.
Background technology
Day by day universal along with network service, often needs some conventional data (as business datum etc.) to be stored on the server of multiple machine room simultaneously.Such as, in order to provide identical service to the user of all parts of the country, respectively in Beijing, Guangzhou and Tibet is provided with three machine rooms, user can have access to required service by arbitrary machine room node, and generally user accesses nearest machine room node.At this moment, the data stored in the machine room that Beijing, Guangzhou are regional with three, Tibet are all identical.In addition, sometimes the situation of service disruption is caused to occur in order to prevent because the server in a machine room hangs, also can dispose multiple machine room storing identical data, so that can by other machine room for user provides reliability services after a machine room is hung simultaneously.
In above-mentioned situation, the data in multiple machine room need to be consistent, once the data in each machine room have occurred that inconsistent situation will affect the normal use of user.Because business datum often changes, once after data in certain machine room change, other machine rooms do not carry out the situation generation that synchronized update will cause data inconsistent in time, therefore, also do not have a kind of effective mechanism can guarantee that the data in multiple machine room are completely the same at present.
Summary of the invention
In view of the above problems, the present invention is proposed to provide a kind of method and apparatus realizing multimachine room data consistency overcoming the problems referred to above or solve the problem at least in part.
According to an aspect of the present invention, provide a kind of method realizing multimachine room data consistency, it comprises: when a machine room carries out Data Update, send a notification message to other each machine rooms, makes other each machine rooms carry out corresponding Data Update according to described notification message; Further, the method comprises further: regularly compare to the data of each machine room, when finding that data are inconsistent, determines the machine room that data are correct; According to the data in other each machine rooms of the Data Update stored in the machine room that data are correct.
According to a further aspect in the invention, provide a kind of device realizing multimachine room data consistency, it comprises: update module, is suitable for when a machine room carries out Data Update, send a notification message to other each machine rooms, make other each machine rooms carry out corresponding Data Update according to described notification message; And comparing module, is suitable for regularly comparing to the data of each machine room, when finding that data are inconsistent, determine the machine room that data are correct; According to the data in other each machine rooms of the Data Update stored in the machine room that data are correct.
According to the method and apparatus realizing multimachine room data consistency of the present invention, whenever a machine room upgrades time, all can generate a notification message, other each machine rooms can carry out synchronized update according to this notification message; In addition, in order to prevent the situation because the data that cause of synchronized update failure are inconsistent from occurring, the method and device also can the data of each machine room of regularly comparison, thus guarantee the data consistent of each machine room.According to the program, the synchronized update between each machine room can be realized by notification message, and, by the data between each machine room of regular comparison, can also when synchronized update failure, the machine room inconsistent to data carries out asynchronous refresh, finally guarantees the consistency between each machine room data.
Above-mentioned explanation is only the general introduction of technical solution of the present invention, in order to technological means of the present invention can be better understood, and can be implemented according to the content of specification, and can become apparent, below especially exemplified by the specific embodiment of the present invention to allow above and other objects of the present invention, feature and advantage.
Accompanying drawing explanation
By reading hereafter detailed description of the preferred embodiment, various other advantage and benefit will become cheer and bright for those of ordinary skill in the art.Accompanying drawing only for illustrating the object of preferred implementation, and does not think limitation of the present invention.And in whole accompanying drawing, represent identical parts by identical reference symbol.In the accompanying drawings:
Fig. 1 shows the flow chart of the method realizing multimachine room data consistency according to an embodiment of the invention;
Fig. 2 shows the flow chart of the method realizing multimachine room data consistency in accordance with another embodiment of the present invention; And,
Fig. 3 shows the structure chart of the device realizing multimachine room data consistency according to an embodiment of the invention.
Embodiment
Below with reference to accompanying drawings exemplary embodiment of the present disclosure is described in more detail.Although show exemplary embodiment of the present disclosure in accompanying drawing, however should be appreciated that can realize the disclosure in a variety of manners and not should limit by the embodiment set forth here.On the contrary, provide these embodiments to be in order to more thoroughly the disclosure can be understood, and complete for the scope of the present disclosure can be conveyed to those skilled in the art.
Embodiments provide a kind of method and apparatus realizing multimachine room data consistency, the data that can solve in prior art between multiple machine room are difficult to when frequent updating realize conforming problem.
Fig. 1 shows the flow chart of the method realizing multimachine room data consistency according to an embodiment of the invention, and as shown in Figure 1, the method comprises the steps:
Step S110, when a machine room carries out Data Update, sends a notification message to other each machine rooms, makes other each machine rooms carry out corresponding Data Update according to this notification message.
Particularly, when a machine room carries out Data Update according to the new data received, all can generate a notification message, make other each machine rooms carry out synchronized update according to this notification message.Wherein, conveniently transmit notification message, and improve the reliability of transmission of messages, message-oriented middleware for transmitting message can be installed on each machine room, this message-oriented middleware can carry out classification and ordination according to message sender mark and/or message receipt times to each bar message received, and feeds back the execution result of each bar message to message sender.
Step S120, regularly compares to the data of each machine room, when finding that data are inconsistent, determines the machine room that data are correct, and according to the data in other each machine rooms of Data Update stored in the correct machine room of data.
Wherein, when regularly comparing to the data of each machine room, the frequency that can change according to data sets the time interval between twice comparison.Such as, change frequently in application scenarios in data, the time interval between twice comparison can be arranged shorter, as every 1 hour or comparison one in 5 hours inferior; Change in application scenarios infrequently in data, the time interval between twice comparison can be arranged longer, as comparison every day once or each week comparison one inferior.
In order to reduce workload, improve comparison efficiency, can the incremental data of the only each machine room of comparison during each comparison, if the incremental data of each machine room is identical, then determine the data consistent of each machine room; Otherwise, then determine that the data of each machine room are inconsistent; Wherein, the more new data produced after upper once comparison is the incremental data of this secondary comparison.Particularly, the implementation regularly obtaining the incremental data of the also each machine room of comparison comprises: regularly obtain the md5 value that the incremental data of each machine room is corresponding, when md5 value is identical, determine that the incremental data of each machine room is identical; When md5 value is different, obtains the actual value of the incremental data corresponding with md5 value, if actual value is identical, then determine that the incremental data of each machine room is identical; Otherwise, then determine that the incremental data of each machine room is different.In addition, when finding that data are inconsistent, can determine that the data in which platform machine room are correct by md5 value.Such as, calculate the md5 value that the incremental data of each machine room is corresponding, the machine room corresponding to incremental data correct for md5 value is defined as the correct machine room of data.
As can be seen here, the synchronized update between each machine room data can be realized by step S110, when synchronized update failure, the final consistency between each machine room data can be guaranteed by asynchronous refresh by step S120.Above-mentioned step S110 and step S120 independently carries out, and does not have temporal ordinal relation therebetween: as long as at least one the machine room data in the middle of multiple machine room there occurs renewal, step S110 will be triggered; As long as the time interval of setting arrives, step S120 will be triggered.By step S110 and step S120, the data consistency between each machine room can be guaranteed.
Below in conjunction with a specific embodiment, the method realizing multimachine room data consistency in the present invention is described in detail.In this specific embodiment, for convenience of description, be described for the data consistency realized between three machine rooms, those skilled in the art are it is understood that method in the present embodiment can also realize the data consistency between more machine room.Fig. 2 shows the method flow diagram of this specific embodiment.As shown in Figure 2, the method comprises the steps:
Step S210, machine room A receive more after new data, according to this more new data corresponding renewal is carried out to the data stored in this machine room, and produce a notification message.
Wherein, before execution step S210, in machine room A and other machine room B and machine room C, identical data content is stored.At a time, machine room A have received a more new data, then step S210 starts to perform.In this step, on the one hand, machine room A will according to this more new data corresponding renewal is carried out to the data stored in this machine room, on the other hand, machine room A also will produce a notification message, to notify that machine room B upgrades together with machine room C.
Notification message is sent to machine room B and machine room C by step S220, machine room A, makes machine room B and machine room C carry out corresponding Data Update according to this notification message.
Particularly, this step can have multiple implementation.In the first implementation, machine room A stores the mailing address of machine room B and machine room C, machine room A directly can communicate with machine room C with machine room B according to this mailing address, thus, notification message is directly sent to machine room B and machine room C by machine room A, and this mode is suitable for the situation of machine room negligible amounts.The notification message of two types can be adopted during specific implementation.Comprise the particular content of more new data in the notification message of the first type, can upgrade after machine room B and machine room C receives notification message according to more new data wherein, the notification message of the type is suitable for the less situation of more amount of new data.The particular content of more new data is not comprised in the notification message of the second type, after machine room B and machine room C receives this notification message, preparation obtains more new data, during concrete acquisition, more machine room B and machine room C can will be sent to by new data by machine room A, more preferably, also by machine room A, more new data can be stored in a update server can shared by machine room B and machine room C, make machine room B and machine room C obtain data from this update server.Wherein, the more new data that this update server receives for storing each machine room, that is, as long as there is a machine room to have received more new data, will the more new data received be stored in this update server, and the machine room to other sends a notification message, to notify that other machine room obtains more new data from this update server.The notification message of the second type is suitable for the more situation of more amount of new data.Further, the Data Update record of each machine room can be preserved by update server, to inquire about when a certain machine room upgrades unsuccessfully, thus improve reliability.
In the second implementation, machine room A sends a notification message to machine room B and machine room C by update server, therefore, machine room A only need carry out communicating with above-mentioned update server, and need not directly communicate with machine room C with machine room B, therefore, machine room A need not the mailing address of storage room B and machine room C, this mode is more suitable for the situation of machine room One's name is legion, when machine room One's name is legion, store the mailing address of other all machine rooms by each machine room and communicate with it and not only can increase the carrying cost of machine room, also easily affect the regular traffic operation of machine room.Particularly, after machine room A receives updating message, updating message is sent to this update server, then, sent a notification message by this update server each machine room to other, make other each machine rooms obtain more new data according to this notification message and upgrade.Wherein, notification message also can take two above-mentioned types to realize flexibly.
Except above-mentioned two kinds of implementations, those skilled in the art can also take other implementations flexibly, as long as can realize the object notifying that other machine rooms upgrade jointly.
In addition, in above-mentioned implementation, in order to realize transmission of messages more reliably, notification message can be transmitted by message-oriented middleware.Message-oriented middleware is a kind of software for realizing transmission of messages, and it can sort to the message received, classify and the management work such as state feedback.Particularly, the message that message sender will send sends to message server, and message in message queue, and is transmitted to message receiver on suitable opportunity by each bar message deposit of receiving by message server.Wherein, the every bar message in message queue at least comprises: message sender mark and/or message sink square mark, message transmitting time and message processing state.Each bar message in message queue can be classified according to message sender mark and/or message sink square mark and message processing state, can also sort according to message transmitting time.In addition, the message in message queue can also comprise priority tag, and some important message have higher priority, thus come before message queue, so that priority treatment.Message processing state comprises: to be sent, send, receive reply etc.Such as, in the present embodiment, message sender both can be machine room A, also can be update server, and message receiver is machine room B and machine room C.Notification message is sent to message server by machine room A or update server, this notification message is put in message queue by message server, and record transmit leg and the recipient of this notification message, and the transmitting time of this notification message, now, the treatment state of this notification message is " to be sent ".Then, this notification message is sent to machine room B and machine room C by message server respectively, then, is revised as " sending " by the treatment state of this notification message.Afterwards, message server judges whether each bar message sent have received the reply of recipient, when receiving reply, reply content is transmitted to message sender.In addition, only after receiving the response message be disposed that recipient returns, this notification message just can be set to the state be disposed by message server, if do not receive the feedback of recipient in setting-up time, message server then can resend this message, until receive the reply from recipient, or until report an error to message sender when the number of times that resends reaches set point number.By message-oriented middleware, can classify, sort and the work such as condition managing, thus guarantee that every bar message can be effectively addressed to message, avoid after message sender sends message, recipient does not receive or not have the situation generation that processes.
Except transmitting notification message by message-oriented middleware, to realize outside more reliable transmission of messages, in embodiments of the present invention, on each machine room, a device for subscribe message can also be installed, when machine room A or update server having there is new more new data, each machine room can be notified immediately by the device of this subscribe message, and gets new more new data.
By above-mentioned step S210 and step S220 can a certain machine room more new data time, notify that other machine rooms upgrade together, thus the data in multimachine room be consistent.But, a certain machine room may be caused to upgrade unsuccessfully due to a variety of causes, such as, because network failure causes a machine room not receive complete more new data, or, a certain machine room write more new data time there occurs mistake.In order to prevent causing the data of each machine room inconsistent because of synchronized update failure, the method in the embodiment of the present invention also comprises following step S230 and step S240 further.
Step S230, regularly compares to the data of each machine room.
Wherein, step S230 both can be performed with the server that each machine room is connected respectively by one, also can be performed by the some machine rooms in the middle of multiple machine room.The frequency of regular comparison can be arranged as required flexibly, such as, when the Data Update of each machine room is frequent, arranges higher versus frequency, as every comparison in a hour once; When each machine room Data Update infrequently time, lower versus frequency is set, as the comparison of every other day or one week once.
In order to improve comparison efficiency, during each comparison, can only comparison incremental data.Wherein, incremental data refers to that last ratio is to the more new data produced afterwards.Such as, in comparison every day application scenarios once, after nine o'clock comparison in the morning on Monday completes, the data content produced after only needing comparison nine o'clock of the morning on Monday Tuesday, to the data content before nine o'clock of the morning on Monday then without the need to comparison again.The mode right by incremental raio can improve comparison efficiency, reduces workload, avoids repetition comparison.In actual applications, can only adopt increment alignments, also increment alignments can be combined with full dose alignments, that is: an incremental raio pair is performed every the first Preset Time, a full dose comparison is performed every the second Preset Time, wherein, the first Preset Time is less than the second Preset Time.Such as, carry out an incremental raio pair every day, carry out weekly a full dose comparison, thus prevent the data of comparison to be tampered.
In addition, when comparison, in order to improve comparison efficiency, can be realized by the mode of the md5 value corresponding to comparison pieces of data record.After each more new data of machine room, can produce at least one data record, the corresponding md5 value of every bar data record, this md5 value is calculated by certain algorithm, for verifying this data record.So, when comparison, can md5 value corresponding to comparison pieces of data record, if md5 value is identical, then think that data content is identical.Because md5 value is shorter, to be compared speed by md5 value.When md5 value is different, both be likely that data record is different, also be likely that data record is identical, just md5 value mistake in computation, therefore, the data content of the data record also wanting further comparison corresponding with this md5 value, the i.e. actual value of data, if actual value is identical, then determine the data consistent of each machine room; If actual value is different, then determine that the data of each machine room are inconsistent, and when finding that data are inconsistent, perform following step S240.
Step S240, when finding that data are inconsistent, determines the machine room that data are correct, and according to the data in other each machine rooms of Data Update stored in the correct machine room of data.
Wherein, when finding that data are inconsistent, determine by modes such as data checks the machine room that data are correct.Such as, when md5 value is different, can for the different data record of md5 value, recalculate the md5 value corresponding to this data record, the machine room at data record place correct for md5 value is defined as the correct machine room of data, and according to the data in other each machine rooms of the Data Update stored in this machine room, finally realize the object of multimachine room data consistent.
In addition, also can determine by update server mentioned above the machine room that data are correct, in update server, store the more new data that each machine room in the recent period receives, determine that the data content stored in which machine room is correct according to the more new data in corresponding moment.
In a word, the consistency between multimachine room data can finally be realized by step S230 and step S240.
In sum, the synchronized update between each machine room data can be realized by step S210 and step S220, when synchronized update failure, the final consistency between each machine room data can be guaranteed by asynchronous verification by step S230 and step S240.Above-mentioned step S210 and step S220 and step S230 and step S240 independently carries out, therebetween temporal ordinal relation is not had: as long as at least one the machine room data in the middle of multiple machine room there occurs renewal, step S210 and step S220 will be triggered; As long as the time interval of setting arrives, step S230 and step S240 will be triggered.By step S210 to step S240, the data consistency between each machine room finally can be guaranteed.
Fig. 3 shows the structure chart of the device 300 realizing multimachine room data consistency according to an embodiment of the invention, and as shown in Figure 3, this device 300 comprises update module 31 and comparing module 32.
Wherein, update module 31 is suitable for, when a machine room carries out Data Update, sending a notification message to other each machine rooms, makes other each machine rooms carry out corresponding Data Update according to this notification message.Particularly, when a machine room carries out Data Update according to the new data received, all can generate a notification message, make other each machine rooms carry out synchronized update according to this notification message.Wherein, conveniently transmit notification message, and improve the reliability of transmission of messages, message-oriented middleware for transmitting message can be installed on each machine room, this message-oriented middleware can carry out classification and ordination according to message sender mark and/or message receipt times to each bar message received, and feeds back the execution result of each bar message to message sender.
Comparing module 32 is suitable for regularly comparing to the data of each machine room, when finding that data are inconsistent, determines the machine room that data are correct, and according to the data in other each machine rooms of Data Update stored in the correct machine room of data.Wherein, when regularly comparing to the data of each machine room, the frequency that can change according to data sets the time interval between twice comparison.Such as, change frequently in application scenarios in data, the time interval between twice comparison can be arranged shorter, as every 1 hour or comparison one in 5 hours inferior; Change in application scenarios infrequently in data, the time interval between twice comparison can be arranged longer, as comparison every day once or each week comparison one inferior.
In order to reduce workload, improve comparison efficiency, can the incremental data of the only each machine room of comparison during each comparison, if the incremental data of each machine room is identical, then determine the data consistent of each machine room; Otherwise, then determine that the data of each machine room are inconsistent; Wherein, the more new data produced after upper once comparison is the incremental data of this secondary comparison.Particularly, the implementation regularly obtaining the incremental data of the also each machine room of comparison comprises: regularly obtain the md5 value that the incremental data of each machine room is corresponding, when md5 value is identical, determine that the incremental data of each machine room is consistent; When md5 value is different, obtains the actual value of the incremental data corresponding with md5 value, if actual value is identical, then determine that the incremental data of each machine room is identical; Otherwise, then determine that the incremental data of each machine room is different.In addition, when finding that data are inconsistent, can determine that the data in which platform machine room are correct by md5 value.Such as, calculate the md5 value that the incremental data of each machine room is corresponding, the machine room corresponding to incremental data correct for md5 value is defined as the correct machine room of data.
The specific works principle of above-mentioned modules see the description of corresponding steps in embodiment of the method, can repeat no more herein.
According to the method and apparatus realizing multimachine room data consistency of the present invention, whenever a machine room upgrades time, all can generate a notification message, other each machine rooms can carry out synchronized update according to this notification message; In addition, in order to prevent the situation because the data that cause of synchronized update failure are inconsistent from occurring, the method and device also can the data of each machine room of regularly comparison, thus guarantee the data consistent of each machine room.According to the program, the synchronized update between each machine room can be realized by notification message, and, by the data between each machine room of regular comparison, can also when synchronized update failure, the machine room inconsistent to data carries out asynchronous refresh, finally guarantees the consistency between each machine room data.
In addition, from traditional can only to write the mode of data at synchronization in a machine room different, realize in the method and apparatus of multimachine room data consistency of the present invention, multiple machine room can receive data simultaneously, that is: can write data in multiple machine room at synchronization simultaneously.Therefore, each machine room likely can receive identical or different more new data simultaneously, so each machine room likely needs to communicate simultaneously.Such as, suppose at a time, machine room A have received the first more new data, need by first more new data send to machine room B and machine room C; Machine room B have received the second more new data, need by second more new data send to machine room A and machine room C, wherein, first more new data and second more new data can be the same or different.Therefore, in this moment, machine room A, B need to intercom mutually: machine room A will to machine room B transmission first more new data, meanwhile, machine room B will to machine room A transmission second more new data, in order to meet the demand that machine room A, B communicate simultaneously, in method and apparatus provided by the invention, between each machine room, bidirectional data transfers can be carried out by message-oriented middleware.Wherein.Message-oriented middleware can be realized by the QBus of encapsulation, QBus is a kind of virtual messaging bus, is also Distributed Message Queue, for providing message distribution services, its inside can comprise QBusHandle further, QBusHandle be one for obtaining the intermediate layer of concrete data content.By message-oriented middleware, can the path of flexible management transmission of messages, thus the message path between each machine room is set to two-way.
Intrinsic not relevant to any certain computer, virtual system or miscellaneous equipment with display at this algorithm provided.Various general-purpose system also can with use based on together with this teaching.According to description above, the structure constructed required by this type systematic is apparent.In addition, the present invention is not also for any certain programmed language.It should be understood that and various programming language can be utilized to realize content of the present invention described here, and the description done language-specific is above to disclose preferred forms of the present invention.
In specification provided herein, describe a large amount of detail.But can understand, embodiments of the invention can be put into practice when not having these details.In some instances, be not shown specifically known method, structure and technology, so that not fuzzy understanding of this description.
Similarly, be to be understood that, in order to simplify the disclosure and to help to understand in each inventive aspect one or more, in the description above to exemplary embodiment of the present invention, each feature of the present invention is grouped together in single embodiment, figure or the description to it sometimes.But, the method for the disclosure should be construed to the following intention of reflection: namely the present invention for required protection requires feature more more than the feature clearly recorded in each claim.Or rather, as claims below reflect, all features of disclosed single embodiment before inventive aspect is to be less than.Therefore, the claims following embodiment are incorporated to this embodiment thus clearly, and wherein each claim itself is as independent embodiment of the present invention.
Those skilled in the art are appreciated that and adaptively can change the module in the equipment in embodiment and they are arranged in one or more equipment different from this embodiment.Module in embodiment or unit or assembly can be combined into a module or unit or assembly, and multiple submodule or subelement or sub-component can be put them in addition.Except at least some in such feature and/or process or unit be mutually repel except, any combination can be adopted to combine all processes of all features disclosed in this specification (comprising adjoint claim, summary and accompanying drawing) and so disclosed any method or equipment or unit.Unless expressly stated otherwise, each feature disclosed in this specification (comprising adjoint claim, summary and accompanying drawing) can by providing identical, alternative features that is equivalent or similar object replaces.
In addition, those skilled in the art can understand, although embodiments more described herein to comprise in other embodiment some included feature instead of further feature, the combination of the feature of different embodiment means and to be within scope of the present invention and to form different embodiments.Such as, in the following claims, the one of any of embodiment required for protection can use with arbitrary compound mode.
All parts embodiment of the present invention with hardware implementing, or can realize with the software module run on one or more processor, or realizes with their combination.It will be understood by those of skill in the art that the some or all functions realizing the some or all parts in the device of multimachine room data consistency that microprocessor or digital signal processor (DSP) can be used in practice to realize according to the embodiment of the present invention.The present invention can also be embodied as part or all equipment for performing method as described herein or device program (such as, computer program and computer program).Realizing program of the present invention and can store on a computer-readable medium like this, or the form of one or more signal can be had.Such signal can be downloaded from internet website and obtain, or provides on carrier signal, or provides with any other form.
The present invention will be described instead of limit the invention to it should be noted above-described embodiment, and those skilled in the art can design alternative embodiment when not departing from the scope of claims.In the claims, any reference symbol between bracket should be configured to limitations on claims.Word " comprises " not to be got rid of existence and does not arrange element in the claims or step.Word "a" or "an" before being positioned at element is not got rid of and be there is multiple such element.The present invention can by means of including the hardware of some different elements and realizing by means of the computer of suitably programming.In the unit claim listing some devices, several in these devices can be carry out imbody by same hardware branch.Word first, second and third-class use do not represent any order.Can by these words.

Claims (10)

1. realize a method for multimachine room data consistency, it comprises:
When a machine room carries out Data Update, send a notification message to other each machine rooms, make other each machine rooms carry out corresponding Data Update according to described notification message; Further, the method comprises further:
Regularly the data of each machine room being compared, when finding that data are inconsistent, determining the machine room that data are correct; According to the data in other each machine rooms of the Data Update stored in the machine room that described data are correct.
2. method according to claim 1, wherein, described notification message passes to other each machine rooms by message-oriented middleware, described message-oriented middleware carries out classification and ordination according to message sender mark and/or message receipt times to each bar message received, and feeds back the execution result of each bar message to message sender.
3. method according to claim 1 and 2, wherein, described regularly comparing to the data of each machine room is specially: regularly obtain and the incremental data of each machine room of comparison, if the incremental data of each machine room is identical, then determine the data consistent of each machine room; Otherwise, then determine that the data of each machine room are inconsistent;
Wherein, the more new data produced after upper once comparison is the incremental data of this secondary comparison.
4. method according to claim 3, wherein, described regular acquisition the implementation of the incremental data of each machine room of comparison comprise: regularly obtain the md5 value that the incremental data of each machine room is corresponding, when described md5 value is identical, determine that the incremental data of each machine room is identical; When described md5 value is different, obtains the actual value of the incremental data corresponding with described md5 value, if described actual value is identical, then determine that the incremental data of each machine room is identical; If described actual value is different, then determine that the incremental data of each machine room is different.
5. method according to claim 4, wherein, when finding that data are inconsistent, determining that the machine room that data are correct is specially: calculate the md5 value that the incremental data of each machine room is corresponding, the machine room corresponding to incremental data correct for md5 value is defined as the correct machine room of data.
6. realize a device for multimachine room data consistency, it comprises:
Update module, is suitable for, when a machine room carries out Data Update, sending a notification message to other each machine rooms, makes other each machine rooms carry out corresponding Data Update according to described notification message; And,
Comparing module, is suitable for regularly comparing to the data of each machine room, when finding that data are inconsistent, determines the machine room that data are correct; According to the data in other each machine rooms of the Data Update stored in the machine room that described data are correct.
7. device according to claim 6, wherein, comprise further: message-oriented middleware, then described notification message passes to other each machine rooms by described message-oriented middleware, described message-oriented middleware carries out classification and ordination according to message sender mark and/or message receipt times to each bar message received, and feeds back the execution result of each bar message to message sender.
8. the device according to claim 6 or 7, wherein, described comparing module regularly obtains and the incremental data of each machine room of comparison, if the incremental data of each machine room is identical, then determines the data consistent of each machine room; Otherwise, then determine that the data of each machine room are inconsistent; Wherein, the more new data produced after upper once comparison is the incremental data of this secondary comparison.
9. device according to claim 8, wherein, described comparing module regularly obtains md5 value corresponding to the incremental data of each machine room, when described md5 value is identical, determines that the incremental data of each machine room is identical; When described md5 value is different, obtains the actual value of the incremental data corresponding with described md5 value, if described actual value is identical, then determine that the incremental data of each machine room is identical; If described actual value is different, then determine that the incremental data of each machine room is different.
10. device according to claim 9, wherein, when described comparing module finds that data are inconsistent, calculates the md5 value that the incremental data of each machine room is corresponding, the machine room corresponding to incremental data correct for md5 value is defined as the correct machine room of data.
CN201510370133.2A 2015-06-29 2015-06-29 Method and device for realizing data consistency of multiple machine rooms Pending CN104967536A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510370133.2A CN104967536A (en) 2015-06-29 2015-06-29 Method and device for realizing data consistency of multiple machine rooms

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510370133.2A CN104967536A (en) 2015-06-29 2015-06-29 Method and device for realizing data consistency of multiple machine rooms

Publications (1)

Publication Number Publication Date
CN104967536A true CN104967536A (en) 2015-10-07

Family

ID=54221484

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510370133.2A Pending CN104967536A (en) 2015-06-29 2015-06-29 Method and device for realizing data consistency of multiple machine rooms

Country Status (1)

Country Link
CN (1) CN104967536A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106773749A (en) * 2016-11-15 2017-05-31 山东大学 Internet of things equipment control method, control end and system
CN106790549A (en) * 2016-12-23 2017-05-31 北京奇虎科技有限公司 A kind of data-updating method and device
CN108055343A (en) * 2017-12-26 2018-05-18 北京奇虎科技有限公司 For the method for data synchronization and device of computer room
CN108200219A (en) * 2018-03-13 2018-06-22 广东欧珀移动通信有限公司 Method of data synchronization, device, server and storage medium
CN108717384A (en) * 2018-05-18 2018-10-30 阿里巴巴集团控股有限公司 A kind of data back up method and device
CN108920504A (en) * 2018-05-28 2018-11-30 北京达佳互联信息技术有限公司 A kind of data cached synchronous method and device
WO2019061720A1 (en) * 2017-09-29 2019-04-04 网宿科技股份有限公司 Data synchronization method and system
CN110348826A (en) * 2018-04-08 2019-10-18 财付通支付科技有限公司 Strange land disaster recovery method, system, equipment and readable storage medium storing program for executing mostly living
CN110674156A (en) * 2019-09-27 2020-01-10 掌阅科技股份有限公司 Multi-machine room data synchronization method, computing equipment and computer storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102012944A (en) * 2010-12-16 2011-04-13 四川川大智胜软件股份有限公司 Distributed NOSQL (not only structured query language) database capable of providing replication property
CN102457549A (en) * 2010-10-28 2012-05-16 盛乐信息技术(上海)有限公司 Data synchronization system and method for multiple network storage devices
CN103138912A (en) * 2011-12-05 2013-06-05 阿里巴巴集团控股有限公司 Data synchronizing method and data synchronizing system
CN103379129A (en) * 2012-04-12 2013-10-30 阿里巴巴集团控股有限公司 Data synchronization method, servers and distributed system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102457549A (en) * 2010-10-28 2012-05-16 盛乐信息技术(上海)有限公司 Data synchronization system and method for multiple network storage devices
CN102012944A (en) * 2010-12-16 2011-04-13 四川川大智胜软件股份有限公司 Distributed NOSQL (not only structured query language) database capable of providing replication property
CN103138912A (en) * 2011-12-05 2013-06-05 阿里巴巴集团控股有限公司 Data synchronizing method and data synchronizing system
CN103379129A (en) * 2012-04-12 2013-10-30 阿里巴巴集团控股有限公司 Data synchronization method, servers and distributed system

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106773749B (en) * 2016-11-15 2020-05-29 山东大学 Internet of things equipment control method, control end and system
CN106773749A (en) * 2016-11-15 2017-05-31 山东大学 Internet of things equipment control method, control end and system
CN106790549A (en) * 2016-12-23 2017-05-31 北京奇虎科技有限公司 A kind of data-updating method and device
CN106790549B (en) * 2016-12-23 2021-01-15 北京奇虎科技有限公司 Data updating method and device
WO2019061720A1 (en) * 2017-09-29 2019-04-04 网宿科技股份有限公司 Data synchronization method and system
CN108055343A (en) * 2017-12-26 2018-05-18 北京奇虎科技有限公司 For the method for data synchronization and device of computer room
CN108055343B (en) * 2017-12-26 2021-07-13 北京奇虎科技有限公司 Data synchronization method and device for computer room
CN108200219A (en) * 2018-03-13 2018-06-22 广东欧珀移动通信有限公司 Method of data synchronization, device, server and storage medium
CN108200219B (en) * 2018-03-13 2020-04-14 Oppo广东移动通信有限公司 Data synchronization method, device, server and storage medium
CN110348826A (en) * 2018-04-08 2019-10-18 财付通支付科技有限公司 Strange land disaster recovery method, system, equipment and readable storage medium storing program for executing mostly living
CN108717384A (en) * 2018-05-18 2018-10-30 阿里巴巴集团控股有限公司 A kind of data back up method and device
CN108717384B (en) * 2018-05-18 2021-11-23 创新先进技术有限公司 Data backup method and device
CN108920504A (en) * 2018-05-28 2018-11-30 北京达佳互联信息技术有限公司 A kind of data cached synchronous method and device
CN110674156A (en) * 2019-09-27 2020-01-10 掌阅科技股份有限公司 Multi-machine room data synchronization method, computing equipment and computer storage medium
CN110674156B (en) * 2019-09-27 2020-06-26 掌阅科技股份有限公司 Multi-machine room data synchronization method, computing equipment and computer storage medium

Similar Documents

Publication Publication Date Title
CN104967536A (en) Method and device for realizing data consistency of multiple machine rooms
CN104980519A (en) Multi-computer room storage system
CN105162879A (en) Method, device and system for realizing data consistency among plurality of machine rooms
US9208476B2 (en) Counting and resetting broadcast system badge counters
US10243919B1 (en) Rule-based automation of DNS service discovery
CN109788027B (en) Data synchronization method, device, server and computer storage medium
US20090049172A1 (en) Concurrent Node Self-Start in a Peer Cluster
US20130139178A1 (en) Cluster management system and method
CN103281394A (en) File acquiring method, node servers and system
US10362131B1 (en) Fault tolerant message delivery
CN101075969B (en) Method, apparatus and system for controlling data transmission
CN105554142A (en) Method, apparatus and system for pushing messages
CN104579765A (en) Disaster tolerance method and device for cluster system
CN108737218A (en) A kind of automatic Verification method and device of message push arrival rate
CN103152390A (en) Method and device and nodes and system for node configuration of distributed storage system
EP3803616A1 (en) Change notifications for object storage
CN101675424A (en) Inter-process communication methods and apparatus for building scalable/redundant telecommunications systems
CN103647811A (en) A method and an apparatus for application's accessing backstage service
WO2022033586A1 (en) Message sending method and device
CN103297477B (en) A kind of data acquisition reporting system and data processing method and proxy server
CN111104250A (en) Method, apparatus and computer program product for data processing
US10152490B2 (en) Sequential replication with limited number of objects
CN103647622A (en) Method, apparatus and system for realizing computer room-spanning data transmission
US11212220B2 (en) Optimized reconciliation in a controller-switch network
CN106709060B (en) Data sharing method and 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20151007