CN103268351A - Method and device for data synchronism - Google Patents

Method and device for data synchronism Download PDF

Info

Publication number
CN103268351A
CN103268351A CN2013102137875A CN201310213787A CN103268351A CN 103268351 A CN103268351 A CN 103268351A CN 2013102137875 A CN2013102137875 A CN 2013102137875A CN 201310213787 A CN201310213787 A CN 201310213787A CN 103268351 A CN103268351 A CN 103268351A
Authority
CN
China
Prior art keywords
operation log
affairs
backup database
data base
data
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.)
Granted
Application number
CN2013102137875A
Other languages
Chinese (zh)
Other versions
CN103268351B (en
Inventor
饶珑辉
姜承尧
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN201310213787.5A priority Critical patent/CN103268351B/en
Publication of CN103268351A publication Critical patent/CN103268351A/en
Application granted granted Critical
Publication of CN103268351B publication Critical patent/CN103268351B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

The invention provides a method for data synchronism. The method comprises the steps of executing completed operation by responding to an affair set of a local database, obtaining an operation log of the affair set, writing the operation log into a back-up database, and judging if the operation log is successfully written in. If the operation log is successfully written in, data inn the local database is updated according to the operation log. According to the method for data synchronism, the operation log is firstly successfully written in the back-up database and then the local database is updated, data synchronism of the local database and the back-up database can be successfully achieved, furthermore, the whole performance for processing affairs of a server can be improved. In addition, the invention provides a device for data synchronism, such as the server.

Description

A kind of method of data synchronization and equipment
Technical field
Embodiments of the present invention relate to data processing field, and more specifically, embodiments of the present invention relate to a kind of method of data synchronization and equipment.
Background technology
This part is intended to provide background or context for the embodiments of the present invention of stating in claims.Description herein can comprise the concept that can probe into, but the concept of having expected or having probed into not necessarily.Therefore, unless point out at this, otherwise for the application's instructions and claims, be not prior art in the content of describing in this part, and not because be included in just admit it is prior art in this part.
Server, generally refer to computing machine or computer system that a kind of runs administrative software conducts interviews to network or Internet resources (disc driver, printer etc.) with control, and can provide resource that it is operated just as workstation for the computing machine on network.For example, mailbox server or blog server etc.Generally speaking, server adopts database usually when preserving data.
Because the data volume of the required preservation of server is bigger, and network is not any moment can both guarantee high performance data transmission, so server can adopt two databases to carry out preservation and the backup of data generally speaking, namely be when local data base is preserved data, Operation Log with local data base is transferred to the backup database that is arranged on the computing machine different with server by network again, also can carry out the purpose that data are recovered from backup database even if reach under the situation of loss of data of local data base with this.Wherein, local data base also can be arranged on the computing machine of the special preservation data different with server generally speaking.
Affairs refer to visit in computerese and a program execution unit of various data item in the new database more.Affairs on the general database have atomicity, i.e. operation in affairs or all take place or do not take place.For example, a flow process that exists a user to withdraw the money in terminal, so for banking system, the launching and a series of events such as renewal of the inner amount of money data of banking system of the deduction of the amount of money, coin on user's bank card just is called affairs.Generally speaking, the data relevant with these affairs are upgraded in server after the affairs successful execution can be to local data base, in case the data in the local data base of server have produced renewal, these affairs will come into force.
Summary of the invention
But, the inventor finds in research process, in the prior art, server is performed such for the data sync between local data base and the backup database: if currently produced affairs at local data base, server generates corresponding Operation Log, and according to the data in this Operation Log renewal local data base, and then this Operation Log sent to the machine at backup database place, and when receiving that Operation Log successfully writes the message of backup database, carry out next affairs again.
Therefore according to prior art, server had just carried out corresponding renewal to the data in the local data base before Operation Log successfully sends to backup database, in this case, if because network problem or local data base etc. go wrong, cause Operation Log to fail sending to the computing machine at backup database place, will make the Operation Log of correspondence when having lost current affairs in the backup database carries out, data in the backup database just can't be upgraded accordingly according to this Operation Log so, will make the data between local data base and the backup database produce difference, just make that therefore the data sync between local data base and the backup database does not just normally realize.
In addition, in the time of again because of affairs of each execution, whether server all need successfully be transferred to the computing machine at backup database place for the Operation Log of these affairs and carry out the wait of confirmation, and this just makes the overall performance of server process affairs descend.
For this reason, be starved of a kind of improved method of data synchronization and equipment (for example, server), can't normally realize this technical matters with the data sync between local data base and the backup database in the solution prior art, further, also can promote the overall performance of server process affairs.
In the present context, the embodiments of the present invention expectation provides a kind of method of data synchronization and equipment.
In the first aspect of embodiment of the present invention, a kind of method of data synchronization is provided, for example can comprise: in response to the complete operation of affairs set of local data base, obtain the Operation Log of described affairs set; Described Operation Log is write backup database; Judge whether described Operation Log writes success, if then the described Operation Log of foundation upgrades the data of described local data base.
In an embodiment of the invention, wherein, describedly judge that whether described Operation Log writes success, comprising: judge whether to receive the message that described Operation Log successfully writes described backup database.
In another embodiment of the present invention, wherein, the described Operation Log that obtains described affairs set comprises: the Operation Log of described affairs set is read to the disk from internal memory; From described disk, obtain described Operation Log.
In another embodiment of the present invention, for example can also comprise: the service routine that triggers described backup database upgrades data in the described backup database according to described Operation Log.
In another embodiment of the present invention, wherein, the set of described affairs is: the set of single affairs or comprise the transaction set of a plurality of affairs.
In the second aspect of embodiment of the present invention, a kind of data sync equipment is provided, for example can comprise: acquisition module, configuration are used for the complete operation of affairs set in response to local data base, obtain the Operation Log of described affairs set; Writing module, configuration are used for described Operation Log is write backup database; Judge module, configuration are used for judging whether described Operation Log writes success; The local update module, the result that configuration is used at described judge module is under the situation that is, upgrades the data of described local data base according to described Operation Log.
In another embodiment of the present invention, wherein, described judge module, concrete configuration is used for: judge whether to receive the message that described Operation Log successfully writes described backup database.
In another embodiment of the present invention, wherein, described acquisition module comprises: first reading submodule, configuration are used for the Operation Log of described affairs set is read to disk from internal memory; Second reading submodule, configuration are used for obtaining described Operation Log from described disk.
In another embodiment of the present invention, for example can also comprise: trigger module, configuration upgrade the data of described backup database according to described Operation Log for the service routine that triggers described backup database.
In another embodiment of the present invention, wherein, the set of described affairs is: the set of single affairs or comprise the transaction set of a plurality of affairs.
In the present embodiment, before the data of upgrading local data base, whether elder generation's decision operation daily record has successfully write backup database, under the situation that successfully writes backup database, upgrade the data of local data base again, will avoid to realize in the prior art phenomenon of normal synchronized, successfully realize the data sync between the local data base and backup database in any case.
Further, after a plurality of affairs in the transaction set are all complete, obtain the Operation Log of a plurality of affairs in this transaction set more in batches, and server also sends to backup database in the lump with the Operation Log of transaction set, so the message that the computing machine at backup database place also only needs to reply once success reception at this transaction set gets final product, therefore also reduce cost on network communication, improved the overall performance of server process affairs.
Description of drawings
By reading detailed description hereinafter with reference to the accompanying drawings, above-mentioned and other purposes of exemplary embodiment of the invention, the feature and advantage easy to understand that will become.In the accompanying drawings, show some embodiments of the present invention in exemplary and nonrestrictive mode, wherein:
Fig. 1 schematically shows the block diagram of the exemplary computer system 100 that is suitable for realizing embodiment of the present invention;
Fig. 2 schematically shows the framework synoptic diagram of an exemplary application scene of embodiments of the present invention;
Fig. 3 schematically shows method flow diagram according to an embodiment of the present invention;
Fig. 4 schematically shows the process flow diagram of step 301 in an embodiment of the present invention;
Fig. 5 schematically shows the method flow diagram of the another embodiment according to the present invention;
Fig. 6 schematically shows the structural framing figure of the equipment (for example, server) of an embodiment of the present invention;
Fig. 7 schematically shows the structural framing figure of acquisition module 601 in the equipment of an embodiment of the present invention;
Fig. 8 schematically shows the structural framing figure of the equipment of the another embodiment of the present invention.
In the accompanying drawings, identical or corresponding label is represented identical or corresponding part.
Embodiment
Below with reference to some illustrative embodiments principle of the present invention and spirit are described.Should be appreciated that providing these embodiments only is for those skilled in the art can being understood better and then realize the present invention, and be not to limit the scope of the invention by any way.On the contrary, it is in order to make the disclosure thorough more and complete that these embodiments are provided, and the scope of the present disclosure intactly can be conveyed to those skilled in the art.
Fig. 1 shows the block diagram of the exemplary computer system 100 that is suitable for realizing embodiment of the present invention.As shown in Figure 1, computing system 100 can comprise: CPU (central processing unit) (CPU) 101, random-access memory (ram) 102, ROM (read-only memory) (ROM) 103, system bus 104, hard disk controller 105, keyboard controller 106, serial interface controller 107, parallel interface controller 108, display controller 109, hard disk 110, keyboard 111, serial external unit 112, parallel external unit 113 and display 114.In these equipment, with system bus 104 coupling CPU101, RAM102, ROM103, hard disk controller 105, keyboard controller 106, serialization controller 107, parallel controller 108 and display controller 109 arranged.Hard disk 110 and hard disk controller 105 couplings, keyboard 111 and keyboard controller 106 couplings, serial external unit 112 and serial interface controller 107 couplings, parallel external unit 113 and parallel interface controller 108 couplings, and display 114 and display controller 109 couplings.Should be appreciated that the described structured flowchart of Fig. 1 only is the purpose for example, rather than limitation of the scope of the invention.In some cases, can increase or reduce some equipment as the case may be.
Art technology technician knows that embodiments of the present invention can be implemented as a kind of system, method or computer program.Therefore, the disclosure can specific implementation be following form, that is: hardware, software (comprising firmware, resident software, microcode etc.) completely completely, and the perhaps form of hardware and software combination, this paper is commonly referred to as " circuit ", " module " or " system ".In addition, in certain embodiments, the present invention can also be embodied as the form of the computer program in one or more computer-readable mediums, comprises computer-readable program code in this computer-readable medium.
Can adopt the combination in any of one or more computer-readable media.Computer-readable medium can be computer-readable signal media or computer-readable recording medium.Computer-readable recording medium for example can be, but be not limited to electricity, magnetic, light, electromagnetism, infrared ray or semi-conductive system, device or device, perhaps any above combination.The example more specifically of computer-readable recording medium (non exhaustive example) for example can comprise: have the electrical connection, portable computer diskette, hard disk, random-access memory (ram), ROM (read-only memory) (ROM), erasable type programmable read only memory (EPROM or flash memory), optical fiber, Portable, compact disk ROM (read-only memory) (CD-ROM), light storage device, magnetic memory device of one or more leads or the combination of above-mentioned any appropriate.In presents, computer-readable recording medium can be any comprising or stored program tangible medium, and this program can be used by instruction execution system, device or device or be used in combination with it.
Computer-readable signal media can be included in the base band or as the data-signal that a carrier wave part is propagated, wherein carry computer-readable program code.The data-signal of this propagation can adopt various ways, includes but not limited to the combination of electromagnetic signal, light signal or above-mentioned any appropriate.Computer-readable signal media can also be any computer-readable medium beyond the computer-readable recording medium, and this computer-readable medium can send, propagates or transmit the program of using or being used in combination with it for by instruction execution system, device or device.
The program code that comprises on the computer-readable medium can be with the transmission of any suitable medium, includes but not limited to wireless, electric wire, optical cable, RF etc., the perhaps combination of above-mentioned any appropriate.
Can make up to write for carrying out the computer program code that the present invention operates with one or more programming languages or its, described programming language comprises object-oriented programming language-such as Java, Smalltalk, C++, also comprises conventional process type programming language-such as " C " language or similar programming language.Program code can fully be carried out at subscriber computer, partly carries out at subscriber computer, carry out or carry out at remote computer or server fully at remote computer on subscriber computer top as an independently software package execution, part.In relating to the situation of remote computer, remote computer can be connected to subscriber computer by the network (comprising Local Area Network or wide area network (WAN)) of any kind, perhaps, can be connected to outer computer (for example utilizing the ISP to come to connect by the Internet).
With reference to the process flow diagram of the method for embodiment of the present invention and the block diagram of equipment (or system) embodiments of the present invention are described below.The combination that should be appreciated that each square frame in each square frame of process flow diagram and/or block diagram and process flow diagram and/or the block diagram can be realized by computer program instructions.These computer program instructions can offer the processor of multi-purpose computer, special purpose computer or other programmable data treating apparatus, thereby produce a kind of machine, these computer program instructions are carried out by computing machine or other programmable data treating apparatus, have produced the device of the function/operation of stipulating in the square frame in realization flow figure and/or the block diagram.
Also can be stored in these computer program instructions and can make in computing machine or the computer-readable medium of other programmable data treating apparatus with ad hoc fashion work, like this, the instruction that is stored in the computer-readable medium just produces a product that comprises the command device of the function/operation of stipulating in the square frame in realization flow figure and/or the block diagram.
Also can be loaded into computer program instructions on computing machine, other programmable data treating apparatus or the miscellaneous equipment, make and carry out the sequence of operations step at computing machine, other programmable data treating apparatus or miscellaneous equipment, producing computer implemented process, thus the process that makes the function/operation of in the instruction that computing machine or other programmable device are carried out can provide square frame in realization flow figure and/or the block diagram, stipulating.
According to the embodiment of the present invention, a kind of method of data synchronization and equipment have been proposed.
In this article, it will be appreciated that any number of elements in the accompanying drawing is all unrestricted for example, and any name only be used for to distinguish all, and do not have any limitation.
Below with reference to some representative embodiments of the present invention, explained in detail principle of the present invention and spirit.
Summary of the invention
The inventor finds, because earlier the data of local data base are upgraded in the prior art, again Operation Log is sent to backup database, this may cause the Data Update success of local data base and Operation Log sends to the situation of backup database because network problem etc. fail, if and backup database has been lost this Operation Log, will realize the data sync between local data base and the backup database.If can be when affairs be carried out, local data base is not upgraded earlier, but earlier Operation Log is sent to backup database, sending the data of upgrading local data base under the case of successful again, just can realize that the success of data between local data base and the backup database is synchronous.
After having introduced ultimate principle of the present invention, following mask body is introduced various non-limiting embodiment of the present invention.
The application scenarios overview
At first with reference to figure 2, Fig. 2 is the framework synoptic diagram of an exemplary application scene of embodiments of the present invention.Wherein, the user is undertaken by client 201 and server 202 alternately.It will be understood by those skilled in the art that framework synoptic diagram shown in Figure 2 only is the example that embodiments of the present invention can be achieved therein.The scope of application of embodiment of the present invention is not subjected to the restriction of this any aspect of framework.
It should be noted that, client 201 herein can be existing, that researching and developing or research and development in the future, can be by any type of wired or wireless connection (for example, Wi-Fi, LAN, WAN, the Internet etc.) with the mutual any client of server 202, include but not limited to: existing, that researching and developing or research and development in the future, desk-top computer, laptop computer, portable terminal (comprising smart mobile phone, non intelligent mobile phone, various panel computer) etc.
It is also to be noted that, server 202 herein only be existing, researching and developing or example research and development, that the equipment of service can be provided to the user in the future.Embodiments of the present invention are unrestricted in this regard.
Server 202 is by local data base 204 and backup database 203 storage data, wherein, local data base 204 can be arranged on the server 202, also can be arranged on the computing machine different with server 202, backup database 203 is arranged on the computing machine different with server 202 generally speaking, and is arranged on the different computing machines with local data base 204 usually.Server 202 can be in response to the complete operation of affairs set of local data base 204, obtain the Operation Log of described affairs set, described Operation Log is write backup database 203, and judge whether described Operation Log writes success, if then the described Operation Log of foundation upgrades the data of described local data base 204.
Illustrative methods
Below in conjunction with the application scenarios of Fig. 2, be described with reference to Figure 3 the method for data synchronization according to exemplary embodiment of the invention.It should be noted that above-mentioned application scenarios only is to illustrate for the ease of understanding spirit of the present invention and principle, embodiments of the present invention are unrestricted in this regard.On the contrary, embodiments of the present invention any scene that can be applied to be suitable for.
With reference to shown in Figure 3, be the process flow diagram of method of data synchronization one embodiment disclosed by the invention, the present embodiment concrete example is as comprising:
Step 301: in response to the complete operation of affairs set of local data base, obtain the Operation Log of described affairs set.
In the present embodiment, if single things is arranged or comprise the transaction set of a plurality of things complete at local data base, then server can get access to this single things or comprise the Operation Log of the transaction set of a plurality of things.Wherein, described affairs set namely can be the set of single affairs, also can be the transaction set that comprises a plurality of affairs.Operation Log generally is the network equipment, system and service routine etc., and one that produces when running is log the logout of (daily record), and the description of the associative operations such as date, time, user and action of affairs generation is all being put down in writing in each line operate daily record.
Wherein, with reference to shown in Figure 4, obtain the step of the Operation Log of described affairs set, specifically can comprise:
Step 401: the Operation Log of described affairs set is read to the disk from internal memory;
In the present embodiment, after affairs were carried out, Operation Log generally was created in the internal memory of server, if server need obtain the Operation Log of affairs set, just needed earlier Operation Log to be read to the disk from internal memory.
Step 402: from described disk, obtain described Operation Log.
Server after internal memory successfully reads to disk, obtains the Operation Log of affairs set with Operation Log again from disk.
Then return Fig. 3, enter step 302: described Operation Log is write backup database.
In the present embodiment, because the affairs set is carried out at local data base, so for server, realize data sync between local data base and the backup database more if desired, must all write backup database to the Operation Log of each affairs set could be ready for data sync.
Step 303: judge whether described Operation Log writes success, if then enter step 304.
In the present embodiment, because backup database generally is to be arranged on the different computing machines with local data base or server, so if network goes wrong, server might successfully write backup database after getting access to Operation Log, therefore, just need after being write backup database, Operation Log judge whether this Operation Log successfully writes backup database.Successfully Operation Log being write under the situation of backup database, carry out subsequent step 304 again.
Wherein, in embodiment, whether the daily record of server decision operation writes success, can realize by judging whether to receive the message that described Operation Log successfully writes described backup database.Generally speaking, the computing machine at backup database place is after Operation Log successfully writes backup database, can return the message that an Operation Log has successfully write backup database to server, if server receives this message, then the description operation daily record has successfully write backup database.
Step 304: the data of upgrading described local data base according to described Operation Log.
Server is then after Operation Log successfully writes backup database, according to the data in the content update local data base of Operation Log, namely be that related Data Update situation is come the data in the local data base are done a corresponding renewal when carrying out according to affairs again.For example, certain bar data that certain affairs relates in the local data base need be deleted, and that server is just deleted these data in the local data base and got final product.
In the present embodiment, because server writes backup database with Operation Log earlier, and under the situation that successfully writes backup database, upgrade data in the local data base according to Operation Log again, if the data of follow-up local data base occur unusual, also can trigger backup database carries out data according to Operation Log renewal, thereby guarantee that the data between the local data base and backup database all are consistent in any case, successfully be implemented in data between local data base and the backup database synchronously.
With reference to shown in Figure 5, be the process flow diagram of the another embodiment of method of data synchronization disclosed by the invention, the present embodiment concrete example is as comprising:
Step 501: in response to the complete operation of the transaction set of local data base, obtain the Operation Log of described transaction set.
Step 502: the Operation Log of described transaction set is write backup database.
In the present embodiment, affairs set is a transaction set that comprises a plurality of affairs, and the relevant introduction that the realization of concrete step 501~502 can reference implementation mode 1 does not repeat them here.
Step 503: the Operation Log that judges whether to receive described transaction set successfully writes the message of described backup database, if, enter step 504, if not, then return step 502.
In the present embodiment, the computing machine Operation Log that return, transaction set that server judges whether to receive the backup database place successfully writes the message of backup database, if received, then enter subsequent step 504, if do not receive, illustrate that then this Operation Log does not successfully write backup database, then can return step 502, by the computing machine transmit operation daily record of server continuation to the backup database place.
In the present embodiment, need to prove, the Operation Log of a plurality of affairs in the transaction set is to send to backup database in the lump, namely be to treat that a plurality of affairs in the transaction set all are finished, property is obtained the Operation Log of these a plurality of affairs again, is the process of transmitting that unit carries out Operation Log then with the transaction set.
Step 504: the data of upgrading described local data base according to the Operation Log of described transaction set.
Server treats that the Operation Log of a plurality of affairs in the transaction set all successfully writes after the backup database, and being unit again with the transaction set upgrades the related data that relates in these a plurality of affairs implementations in the local data base respectively according to the Operation Log of a plurality of affairs wherein.
In the present embodiment, treat server according to after the data in the Operation Log batch updating local data base of transaction set, occur then can also comprising unusually if subsequent server detects the data of local data base:
Step 505: the service routine that triggers described backup database upgrades data in the described backup database according to the Operation Log of described transaction set.
The Operation Log that the service routine of server triggers backup database successfully writes according to step 502, upgrade the data in the backup database accordingly, data after upgrading in the backup database are consistent with the data that unusual local data base occurs just, do not influence server to the normal use of the data of recent renewal yet, the phenomenon of having avoided server data to lose has also successfully realized the data sync of local data base and backup database.
Further, in the present embodiment, after a plurality of affairs in the transaction set are all complete, obtain the Operation Log of a plurality of affairs in this transaction set more in batches, and server also sends to backup database in the lump with the Operation Log of transaction set, therefore the computing machine at backup database place also only needs to reply the message that once success receives at this transaction set and get final product, so has also reduced cost on network communication, has improved the overall performance of server process affairs.
Exemplary apparatus
After the method for having introduced exemplary embodiment of the invention, next, with reference to figure 6, Fig. 6 be the disclosed equipment of embodiment of the present invention (for example, the structural representation of embodiment server), exemplary embodiment of the invention, data sync equipment, concrete example is as comprising:
Acquisition module 601, configuration are used for the complete operation of affairs set in response to local data base, obtain the Operation Log of described affairs set.
According to some embodiment of the present invention, described affairs set namely can be the set of single affairs, also can be the transaction set that comprises a plurality of affairs.
Wherein, described acquisition module 601 with reference to shown in Figure 7, specifically can comprise:
First reading submodule 701, configuration are used for the Operation Log of described affairs set is read to disk from internal memory;
Second reading submodule 702, configuration are used for obtaining described Operation Log from described disk.
Writing module 602, configuration are used for described Operation Log is write backup database.
Judge module 603, configuration are used for judging whether described Operation Log writes success.
Wherein, described judge module 603, concrete configuration is used for: judge whether to receive the message that described Operation Log successfully writes described backup database.
Local update module 604, the result that configuration is used at described judge module is under the situation that is, upgrades the data of described local data base according to described Operation Log.
In the present embodiment, because server writes backup database with Operation Log earlier, and under the situation that successfully writes backup database, upgrade data in the local data base according to Operation Log again, if the data of follow-up local data base occur unusual, also can trigger backup database carries out data according to Operation Log renewal, thereby guarantee that the data between the local data base and backup database all are consistent in any case, successfully be implemented in data between local data base and the backup database synchronously.
With reference to shown in Figure 8, be the structured flowchart of the another embodiment of equipment provided by the invention, except structure illustrated in Figure 6, the present embodiment concrete example is as comprising:
Acquisition module 601, configuration is used in response to the complete operation of the transaction set of local data base, obtains the Operation Log of described transaction set.
Writing module 602, configuration are used for the Operation Log of described transaction set is write backup database.
Judge module 603, the Operation Log that judges whether to receive described transaction set successfully writes the message of described backup database.
Local update module 604, the result that configuration is used at described judge module is under the situation that is, upgrades the data of described local data base according to the Operation Log of described transaction set.
Trigger module 801, configuration upgrade the data of described backup database according to the Operation Log of described transaction set for the service routine that triggers described backup database.
As seen, the equipment that embodiment of the present invention provides (for example, server) not only can realize that the success between local data base and the backup database is synchronous, can also reduce cost on network communication, has improved the overall performance of server process affairs.
Although should be noted that some devices or the sub-device of the equipment of having mentioned (for example, server) in above-detailed, this division only is not enforceable.In fact, according to the embodiment of the present invention, the feature of above-described two or more devices and function can be specialized in a device.Otherwise the feature of an above-described device and function can further be divided into by a plurality of devices to be specialized.
In addition, although described the operation of the inventive method in the accompanying drawings with particular order,, this is not that requirement or hint must be carried out these operations according to this particular order, or the operation shown in must carrying out all could realize the result of expectation.On the contrary, the step of describing in the process flow diagram can change execution sequence.Additionally or alternatively, can omit some step, a plurality of steps be merged into a step carry out, and/or a step is decomposed into a plurality of steps carries out.
Need to prove, in this article, relational terms such as first and second grades only is used for an entity or operation are made a distinction with another entity or operation, and not necessarily requires or hint and have the relation of any this reality or in proper order between these entities or the operation.The verb of mentioning in the application documents " comprises ", those elements or the element the step or the existence of putting down in writing of step do not got rid of in " comprising " and paradigmatic use thereof in application documents.The existence that article " " before the element or " one " do not get rid of a plurality of this elements.
Though described spirit of the present invention and principle with reference to some embodiments, but should be appreciated that, the present invention is not limited to disclosed embodiment, division to each side does not mean that the feature in these aspects can not make up to be benefited yet, and this division only is the convenience in order to explain.The present invention is intended to contain interior included various modifications and the equivalent arrangements of spirit and scope of claims.The scope of claims meets the most wide in range explanation, thereby comprises all such modifications and equivalent structure and function.

Claims (10)

1. method comprises:
In response to the complete operation of affairs set of local data base, obtain the Operation Log of described affairs set;
Described Operation Log is write backup database;
Judge whether described Operation Log writes success, if then the described Operation Log of foundation upgrades the data of described local data base.
2. method according to claim 1, wherein, describedly judge that whether described Operation Log writes success, comprising:
Judge whether to receive the message that described Operation Log successfully writes described backup database.
3. method according to claim 1, wherein, the described Operation Log that obtains described affairs set comprises:
The Operation Log of described affairs set is read to the disk from internal memory;
From described disk, obtain described Operation Log.
4. method according to claim 1 also comprises:
The service routine that triggers described backup database upgrades data in the described backup database according to described Operation Log.
5. according to each described method of claim 1~4, wherein, described affairs set is: the set of single affairs or comprise the transaction set of a plurality of affairs.
6. equipment comprises:
Acquisition module, configuration are used for the complete operation of affairs set in response to local data base, obtain the Operation Log of described affairs set;
Writing module, configuration are used for described Operation Log is write backup database;
Judge module, configuration are used for judging whether described Operation Log writes success;
The local update module, the result that configuration is used at described judge module is under the situation that is, upgrades the data of described local data base according to described Operation Log.
7. equipment according to claim 6, wherein, described judge module, concrete configuration is used for: judge whether to receive the message that described Operation Log successfully writes described backup database.
8. equipment according to claim 6, wherein, described acquisition module comprises:
First reading submodule, configuration are used for the Operation Log of described affairs set is read to disk from internal memory;
Second reading submodule, configuration are used for obtaining described Operation Log from described disk.
9. equipment according to claim 6 also comprises:
Trigger module, configuration upgrade the data of described backup database according to described Operation Log for the service routine that triggers described backup database.
10. according to each described equipment of claim 6~9, wherein, described affairs set is: the set of single affairs or comprise the transaction set of a plurality of affairs.
CN201310213787.5A 2013-05-31 2013-05-31 Method and device for data synchronism Active CN103268351B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310213787.5A CN103268351B (en) 2013-05-31 2013-05-31 Method and device for data synchronism

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310213787.5A CN103268351B (en) 2013-05-31 2013-05-31 Method and device for data synchronism

Publications (2)

Publication Number Publication Date
CN103268351A true CN103268351A (en) 2013-08-28
CN103268351B CN103268351B (en) 2017-05-03

Family

ID=49011980

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310213787.5A Active CN103268351B (en) 2013-05-31 2013-05-31 Method and device for data synchronism

Country Status (1)

Country Link
CN (1) CN103268351B (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103761165A (en) * 2014-01-15 2014-04-30 北京奇虎科技有限公司 Log backup method and log backup device
CN104462127A (en) * 2013-09-22 2015-03-25 阿里巴巴集团控股有限公司 Recorded data updating method and device
CN104572350A (en) * 2014-12-19 2015-04-29 华为技术有限公司 Method and device for processing metadata
CN104714957A (en) * 2013-12-13 2015-06-17 阿里巴巴集团控股有限公司 List structure changing method and device
WO2015117276A1 (en) * 2014-02-10 2015-08-13 华为终端有限公司 Data backup method and device
CN106611061A (en) * 2016-12-29 2017-05-03 北京众享比特科技有限公司 Database write-in method and system based on block chain network
CN106776121A (en) * 2016-11-23 2017-05-31 中国工商银行股份有限公司 A kind of data calamity is for device, system and method
CN107678888A (en) * 2017-09-30 2018-02-09 北京九桥同步软件有限公司 database data backup method and device
WO2018126390A1 (en) * 2017-01-05 2018-07-12 深圳市前海中康汇融信息技术有限公司 Trigger-based database synchronization system
CN108665654A (en) * 2018-05-18 2018-10-16 任飞翔 Cash register information synchronization method and cash register system
CN110209642A (en) * 2018-02-05 2019-09-06 北京智明星通科技股份有限公司 Method, apparatus, server and the computer-readable medium of information processing
CN110309215A (en) * 2019-04-24 2019-10-08 厦门网宿有限公司 A kind of data processing method, system and metadata updates method, system
CN110674105A (en) * 2019-08-30 2020-01-10 中国人民财产保险股份有限公司 Data backup method, system and server
CN112364037A (en) * 2020-11-09 2021-02-12 深圳橙电新能源科技有限公司 Data synchronization control method based on local server
CN117033083A (en) * 2023-09-28 2023-11-10 武汉吧哒科技股份有限公司 Data backup method, system and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101364217A (en) * 2007-08-08 2009-02-11 华为技术有限公司 Data maintenance method, equipment and system thereof in data-base
US7725428B1 (en) * 2002-03-14 2010-05-25 Novell, Inc. System and method for restoring a database in a distributed database system
CN101714169A (en) * 2009-12-01 2010-05-26 广州从兴电子开发有限公司 Method and system for transmitting data on multiple nodes
CN102385637A (en) * 2011-12-22 2012-03-21 山东中创软件商用中间件股份有限公司 Backup method and system for database information
CN102541691A (en) * 2011-12-27 2012-07-04 北京人大金仓信息技术股份有限公司 Log check point recovery method applied to memory data base OLTP (online transaction processing)
CN102693324A (en) * 2012-01-09 2012-09-26 西安电子科技大学 Distributed database synchronization system, synchronization method and node management method
CN102722579A (en) * 2012-06-07 2012-10-10 浪潮电子信息产业股份有限公司 Bisynchronous method for internal database of cluster memory system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7725428B1 (en) * 2002-03-14 2010-05-25 Novell, Inc. System and method for restoring a database in a distributed database system
CN101364217A (en) * 2007-08-08 2009-02-11 华为技术有限公司 Data maintenance method, equipment and system thereof in data-base
CN101714169A (en) * 2009-12-01 2010-05-26 广州从兴电子开发有限公司 Method and system for transmitting data on multiple nodes
CN102385637A (en) * 2011-12-22 2012-03-21 山东中创软件商用中间件股份有限公司 Backup method and system for database information
CN102541691A (en) * 2011-12-27 2012-07-04 北京人大金仓信息技术股份有限公司 Log check point recovery method applied to memory data base OLTP (online transaction processing)
CN102693324A (en) * 2012-01-09 2012-09-26 西安电子科技大学 Distributed database synchronization system, synchronization method and node management method
CN102722579A (en) * 2012-06-07 2012-10-10 浪潮电子信息产业股份有限公司 Bisynchronous method for internal database of cluster memory system

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104462127A (en) * 2013-09-22 2015-03-25 阿里巴巴集团控股有限公司 Recorded data updating method and device
CN104714957A (en) * 2013-12-13 2015-06-17 阿里巴巴集团控股有限公司 List structure changing method and device
CN104714957B (en) * 2013-12-13 2018-11-23 阿里巴巴集团控股有限公司 A kind of variation and device of table structure
CN103761165A (en) * 2014-01-15 2014-04-30 北京奇虎科技有限公司 Log backup method and log backup device
WO2015117276A1 (en) * 2014-02-10 2015-08-13 华为终端有限公司 Data backup method and device
CN104572350B (en) * 2014-12-19 2018-11-06 华为技术有限公司 A kind of metadata processing method and device
CN104572350A (en) * 2014-12-19 2015-04-29 华为技术有限公司 Method and device for processing metadata
CN106776121A (en) * 2016-11-23 2017-05-31 中国工商银行股份有限公司 A kind of data calamity is for device, system and method
CN106776121B (en) * 2016-11-23 2020-08-18 中国工商银行股份有限公司 Data disaster recovery device, system and method
CN106611061A (en) * 2016-12-29 2017-05-03 北京众享比特科技有限公司 Database write-in method and system based on block chain network
WO2018126390A1 (en) * 2017-01-05 2018-07-12 深圳市前海中康汇融信息技术有限公司 Trigger-based database synchronization system
CN107678888A (en) * 2017-09-30 2018-02-09 北京九桥同步软件有限公司 database data backup method and device
CN110209642A (en) * 2018-02-05 2019-09-06 北京智明星通科技股份有限公司 Method, apparatus, server and the computer-readable medium of information processing
CN108665654A (en) * 2018-05-18 2018-10-16 任飞翔 Cash register information synchronization method and cash register system
CN110309215A (en) * 2019-04-24 2019-10-08 厦门网宿有限公司 A kind of data processing method, system and metadata updates method, system
CN110674105A (en) * 2019-08-30 2020-01-10 中国人民财产保险股份有限公司 Data backup method, system and server
CN112364037A (en) * 2020-11-09 2021-02-12 深圳橙电新能源科技有限公司 Data synchronization control method based on local server
CN117033083A (en) * 2023-09-28 2023-11-10 武汉吧哒科技股份有限公司 Data backup method, system and storage medium
CN117033083B (en) * 2023-09-28 2024-01-19 武汉吧哒科技股份有限公司 Data backup method, system and storage medium

Also Published As

Publication number Publication date
CN103268351B (en) 2017-05-03

Similar Documents

Publication Publication Date Title
CN103268351A (en) Method and device for data synchronism
CN108846753B (en) Method and apparatus for processing data
KR20190122815A (en) Method and system for off-line data transfer via machine-readable code
CN103246730A (en) File storage method and device and file sensing method and device
CN109408247A (en) Interaction data processing method and device
CN110837505B (en) State data storage method, state data synchronization device and storage medium
CN110109979A (en) A kind of allocation list radio button method and apparatus
CN103677968A (en) Transaction processing method, transaction coordinator device and transaction participant device and system
CN108011926B (en) Message sending method, message processing method, server and system
CN109885347A (en) A kind of acquisition methods of configuration data, device and terminal, system, storage medium
CN103324679A (en) Method and device for controlling data update in cache server
CN105282821A (en) Terminal and method for connecting the terminal with wireless fidelity WiFi access point
EP4080915B1 (en) Connection method and apparatus, electronic device, storage medium and program product
CN113360172B (en) Application deployment method, device, computer equipment and storage medium
CN110839064A (en) Method and device for executing script by distributed system
CN113610527B (en) Alliance chain transaction method, device, system, terminal equipment and storage medium
CN114565472A (en) Medical insurance platform interaction method, system and medium based on B/S framework
CN106681761B (en) Interactive upgrading method and system
CN113673476B (en) Face recognition model training method and device, storage medium and electronic equipment
CN105512544B (en) A kind of method and device obtaining mobile terminal superuser right
CN108243180B (en) Bank policy data docking method and policy data server
US11797277B2 (en) Neural network model conversion method server, and storage medium
CN105763944B (en) Module television and screen terminal upgrading method thereof
CN110175179B (en) Data transmission method and system, service node and storage device
CN114253924A (en) Synchronization method, synchronization equipment and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant