CN103268351B - Method and device for data synchronism - Google Patents

Method and device for data synchronism Download PDF

Info

Publication number
CN103268351B
CN103268351B CN201310213787.5A CN201310213787A CN103268351B CN 103268351 B CN103268351 B CN 103268351B CN 201310213787 A CN201310213787 A CN 201310213787A CN 103268351 B CN103268351 B CN 103268351B
Authority
CN
China
Prior art keywords
operation log
affairs
data
data base
backup
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201310213787.5A
Other languages
Chinese (zh)
Other versions
CN103268351A (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

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 are related to data processing field, more specifically, embodiments of the present invention are related to a kind of number According to synchronous method and equipment.
Background technology
This part is it is intended that the embodiments of the present invention stated in claims provide background or context.Herein Description may include the concept that can be probed into, but the concept for having contemplated that or having probed into before being not necessarily.Therefore, unless This points out that the content otherwise described in this part is not existing skill for the description and claims of this application Art, and not because just recognizing it is prior art in being included in this part.
Server, generally referred to as a kind of operational management software is controlling (disc driver, to beat network or Internet resources Print machine etc.) computer that conducts interviews or computer system, and resource can be provided for the computer on network and still make which Operated as work station.For example, mailbox server or blog server etc..Generally, server is being protected Data base is adopted when deposit data generally.
Because the data volume preserved needed for server is larger, and network is not can to ensure high performance number at any moment According to transmission, so server generally can carry out the preservation and backup of data using two data bases, it is local While data are preserved on data base, then by the Operation Log of local data base by network transmission to being arranged on server not With computer on backup database, even if also can be from backup in the case of the loss of data of local data base is reached with this Data base carries out the purpose of data recovery.Wherein, local data base generally can also be arranged on different from server special Door is preserved on the computer of data.
Affairs refer to the program performing that access and may update the data various data item in storehouse in computerese Unit.Affairs on general database have the operation in the affairs of atomicity, i.e., one or all occur or do not occur.Example Such as, there is the flow process withdrawn the money in terminal by a user, then for banking system, gold on user's bank card The deduction of volume, coin launch and banking system inside value data a series of event such as renewal, be known as a thing Business.Generally, after affairs successful execution server can to local data base in the data relevant with the affairs carry out Update, once the data in the local data base of server generate renewal, the affairs will come into force.
The content of the invention
But, the present inventor is had found in research process, and in the prior art, server is for local data base and backup What the data syn-chronization between data base was performed such:If an affairs, server are generated on local data base currently Corresponding Operation Log is generated, and the data in local data base are updated according to the Operation Log, then again by the Operation Log The machine at backup database place is sent to, and in the case where receiving and being performed when Operation Log is successfully written the message of backup database again One affairs.
Therefore according to prior art, server is before Operation Log is successfully sent to backup database just to local data Data in storehouse have carried out corresponding renewal, in this case, if as asking occur in network problem or local data base etc. Topic, causes Operation Log to fail and is sent to the computer at backup database place, loses in will causing backup database Corresponding Operation Log when Current transaction is performed, then the data in backup database just cannot be carried out according to the Operation Log It is corresponding to update, the data between local data base and backup database will be caused to produce difference, therefore allow for local number Realize according to the data syn-chronization between storehouse and backup database is not just normal.
Additionally, and because when every time performing an affairs, server be required for for the Operation Log of the affairs be It is no be successfully transferred to backup database place computer and carry out the wait of confirmation, this allows for server process affairs Overall performance decline.
For this purpose, a kind of improved method of data synchronization and equipment (for example, server) are highly desirable to, to solve prior art Data syn-chronization between middle local data base and backup database cannot normally realize this technical problem, further, also can The overall performance of server process affairs is lifted enough.
In the present context, embodiments of the present invention are expected to provide a kind of method of data synchronization and equipment.
In the first aspect of embodiment of the present invention, there is provided a kind of method of data synchronization, for example, can include:Response The operation for completing is performed in the affairs set of local data base, the Operation Log of the affairs set is obtained;By the operation day Will writing backup data storehouse;Judge whether the Operation Log writes successfully, if it is, institute is updated according to the Operation Log State the data of local data base.
In an embodiment of the invention, wherein, it is described judge the Operation Log whether write successfully, including: Judge whether to receive the message that the Operation Log is successfully written the backup database.
In another embodiment of the present invention, wherein, the Operation Log for obtaining the affairs set, including:Will The Operation Log of the affairs set is read into disk from internal memory;The Operation Log is obtained from the disk.
In the further embodiment of the present invention, for example, can also include:Trigger the service journey of the backup database Sequence updates the data in the backup database according to the Operation Log.
In yet further embodiment of the invention, wherein, the transaction set is combined into:The set of single affairs is included many The transaction set of individual affairs.
In the second aspect of embodiment of the present invention, there is provided a kind of data syn-chronization equipment, for example, can include:Obtain Module, is configured to perform the operation for completing in response to the affairs set of local data base, obtains the operation of the affairs set Daily record;Writing module, is configured to the Operation Log writing backup data storehouse;Judge module, is configured to judge the behaviour Make whether daily record writes successfully;Local update module, is configured to result in the judge module in the case of being, foundation The Operation Log updates the data of the local data base.
In another embodiment of the present invention, wherein, the judge module is configured specifically for:Judge whether to receive The message of the backup database is successfully written to the Operation Log.
In another embodiment of the present invention, wherein, the acquisition module, including:First reading submodule, configuration are used In the Operation Log of the affairs set is read into disk from internal memory;Second reading submodule, is configured to from the magnetic The Operation Log is obtained in disk.
In another embodiment of the present invention, can also for example include:Trigger module, is configured to trigger the backup The service routine of data base updates the data in the backup database according to the Operation Log.
In another embodiment of the present invention, wherein, the transaction set is combined into:The set of single affairs is included multiple The transaction set of affairs.
In the present embodiment, before the data of local data base are updated, first judge whether Operation Log is successfully written Backup database, updates the data of local data base again in the case where backup database is successfully written, and will avoid existing The phenomenon of normal synchronized cannot be realized in technology, the number in any case between local data base and backup database is successfully realized According to synchronization.
Further, after the multiple affairs in transaction set are carried out completing, then multiple things in the transaction set are obtained in batches The Operation Log of business, and the Operation Log of transaction set is also sent to backup database, therefore Backup Data by server in the lump Place computer also need to only be directed to the transaction set and reply the message that once be properly received, therefore it is logical to also reduce network Letter expense, improves the overall performance of server process affairs.
Description of the drawings
Detailed description below, above-mentioned and other mesh of exemplary embodiment of the invention are read by reference to accompanying drawing , feature and advantage will become prone to understand.In the accompanying drawings, if showing the present invention's by way of example, and not by way of limitation Dry embodiment, wherein:
Fig. 1 schematically shows the block diagram of the exemplary computer system 100 for being adapted for carrying out embodiment of the present invention;
Fig. 2 schematically shows the block schematic illustration 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;
The flow chart that Fig. 4 schematically shows step 301 in an embodiment of the present invention;
Fig. 5 schematically shows the method flow diagram according to a further embodiment of this 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 a further embodiment of this invention.
In the accompanying drawings, identical or corresponding label represents identical or corresponding part.
Specific embodiment
The principle and spirit of the present invention are described below with reference to some illustrative embodiments.It should be appreciated that providing this Just for the sake of making, those skilled in the art better understood when a little embodiments and then realization is of the invention, and not with any Mode limits the scope of the present invention.Conversely, these embodiments are provided so that the disclosure is more thorough and complete, and energy It is enough that the scope of the present disclosure is intactly conveyed to those skilled in the art.
Fig. 1 shows the block diagram of the exemplary computer system 100 for being adapted for carrying out embodiment of the present invention.As shown in figure 1, meter Calculation system 100 can include:CPU (CPU) 101, random access memory (RAM) 102, read only memory (ROM) 103rd, system bus 104, hard disk controller 105, KBC 106, serial interface controller 107, parallel interface controller 108th, display controller 109, hard disk 110, keyboard 111, serial peripheral equipment 112, concurrent peripheral equipment 113 and display 114. In these equipment, what is coupled with system bus 104 has CPU101, RAM102, ROM103, hard disk controller 105, KBC 106th, serialization controller 107, parallel controller 108 and display controller 109.Hard disk 110 is coupled with hard disk controller 105, key Disk 111 is coupled with KBC 106, and serial peripheral equipment 112 is coupled with serial interface controller 107, concurrent peripheral equipment 113 are coupled with parallel interface controller 108, and display 114 is coupled with display controller 109.It should be appreciated that described in Fig. 1 Structured flowchart just for the sake of example purpose, rather than limitation of the scope of the invention.In some cases, can basis Concrete condition increases or decreases some equipment.
Art technology technical staff knows that embodiments of the present invention can be implemented as a kind of system, method or calculating Machine program product.Therefore, the disclosure can be implemented as following form, i.e.,:Completely hardware, completely software (include solid Part, resident software, microcode etc.), or the form that hardware and software is combined, referred to generally herein as " circuit ", " module " or " it is System ".Additionally, in certain embodiments, the present invention is also implemented as the calculating in one or more computer-readable mediums The form of machine program product, includes computer-readable program code in the computer-readable medium.
The combination in any of one or more computer-readable media can be adopted.Computer-readable medium can be calculated Machine readable signal medium or computer-readable recording medium.Computer-readable recording medium for example may be, but not limited to, The system of electricity, magnetic, optical, electromagnetic, infrared ray or quasiconductor, device or device, or arbitrarily more than combination.Computer-readable The more specifically example (non-exhaustive examples) of storage medium can for example include:Electrical connection with one or more wires, just Take formula computer disk, hard disk, random access memory (RAM), read only memory (ROM), erasable type and may be programmed read-only storage Device (EPROM or flash memory), optical fiber, portable compact disc read only memory (CD-ROM), light storage device, magnetic memory device, Or above-mentioned any appropriate combination.In this document, computer-readable recording medium can be it is any comprising or storage journey The tangible medium of sequence, the program can be commanded execution system, device or device and use or in connection.
Computer-readable signal media can include the data signal propagated in a base band or as a carrier wave part, Computer-readable program code is carried wherein.The data signal of this propagation can take various forms, including but do not limit In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can Any computer-readable medium beyond reading storage medium, the computer-readable medium can send, propagates or transmit to be used for Used by instruction execution system, device or device or program in connection.
The program code included on computer-readable medium can with any appropriate medium transmission, including but not limited to without Line, electric wire, optical cable, RF etc., or above-mentioned any appropriate combination.
Can be write with one or more programming language or its combination for performing the computer that the present invention is operated Program code, described program design language include object oriented program language-such as Java, Smalltalk, C++, also Including conventional procedural programming language-such as " C " language or similar programming language.Program code can be complete Ground is performed on the user computer, is partly performed on the user computer, performing, partly exist as an independent software kit On subscriber computer, part performs on the remote computer or performs on remote computer or server completely.It is being related to In the situation of remote computer, remote computer (can include LAN (LAN) or wide area network by the network of any kind (WAN) subscriber computer is connected to), or, it may be connected to outer computer (is such as led to using ISP Cross Internet connection).
Below with reference to the block diagram description present invention of the flow chart and equipment (or system) of the method for embodiment of the present invention Embodiment.It should be appreciated that in each square frame and flow chart and/or block diagram of flow chart and/or block diagram each square frame group Conjunction can be realized by computer program instructions.These computer program instructions can be supplied to general purpose computer, dedicated computing The processor of machine or other programmable data processing units, so as to produce a kind of machine, these computer program instructions pass through Computer or other programmable data processing units are performed, and are generated specified in flowchart and/or the square frame in block diagram The device of function/operation.
These computer program instructions can also be stored in and can cause computer or other programmable data processing units In the computer-readable medium for working in a specific way, so, the instruction being stored in computer-readable medium just produces one The product of the command device of function/operation specified in the individual square frame including in flowchart and/or block diagram.
Computer program instructions can also be loaded into computer, other programmable data processing units or miscellaneous equipment On so that series of operation steps is performed on computer, other programmable data processing units or miscellaneous equipment, in terms of producing The process that calculation machine is realized, so that the instruction performed on computer or other programmable devices can provide flowchart And/or the process of function/operation specified in the square frame in block diagram.
According to the embodiment of the present invention, it is proposed that a kind of method of data synchronization and equipment.
Herein, it is to be understood that any number of elements in accompanying drawing is used to example and unrestricted and any Name is only used for distinguishing, not with any limitation.
Below with reference to some representative embodiments of the present invention, the in detail principle and spirit of the explaination present invention.
Summary of the invention
The inventors discovered that, because be first updated to the data of local data base in prior art, then by Operation Log Be sent to backup database, this data that may result in local data base be updated successfully and Operation Log because network problem The situation that backup database is sent to etc. failing, and if backup database lost the Operation Log, will be real Existing data syn-chronization between local data base and backup database.If can be when an affairs be performed, first not to this Ground data base be updated, but Operation Log is sent to backup database first, updates this in the case of sending successfully again The data of ground data base, it is possible to realize the successful synchronization of data between local data base and backup database.
After the ultimate principle for describing the present invention, lower mask body introduces the various non-limiting embodiment party of the present invention Formula.
Application scenarios overview
With reference first to Fig. 2, Fig. 2 is the block schematic illustration of an exemplary application scene of embodiments of the present invention.Its In, user is interacted with server 202 by client 201.It will be understood by those skilled in the art that the framework shown in Fig. 2 Schematic diagram is only the example that embodiments of the present invention can be achieved wherein.The applicable model of embodiment of the present invention Enclose and do not limited by any aspect of the framework.
It should be noted that client 201 herein can be existing, research and develop or in the future research and development, can By appointing that any type of wired or wireless connection (for example, Wi-Fi, LAN, WAN, the Internet etc.) is interacted with server 202 What client, including but not limited to:It is existing, research and develop or in the future research and development, desk computer, laptop computer, Mobile terminal (including smart mobile phone, non-smart mobile phone, various panel computers) etc..
It is also to be noted that server 202 herein be only existing, research and develop or in the future research and development, can Provide a user with an example of the equipment of service.Embodiments of the present invention are unrestricted in this regard.
Server 202 passes through 203 data storage of local data base 204 and backup database, wherein, local data base 204 Can be arranged on server 202, it is also possible to be arranged on the computers different from server 202, backup database 203 is general In the case of be arranged on the computers different from server 202, and be generally arranged on different calculating from local data base 204 On machine.Server 202 can perform the operation for completing in response to the affairs set of local data base 204, obtain the transaction set The Operation Log of conjunction, by the Operation Log writing backup data storehouse 203, and judges whether the Operation Log writes successfully, If it is, the data of the local data base 204 are updated according to the Operation Log.
Illustrative methods
With reference to the application scenarios of Fig. 2, the data syn-chronization according to exemplary embodiment of the invention is described with reference to Figure 3 Method.It should be noted that above-mentioned application scenarios are for only for ease of and understand spirit and principles of the present invention and illustrates, the present invention Embodiment it is unrestricted in this regard.Conversely, embodiments of the present invention can apply to applicable any scene.
With reference to shown in Fig. 3, it is the flow chart of one embodiment of method of data synchronization disclosed by the invention, present embodiment tool Body can for example include:
Step 301:Affairs set in response to local data base performs the operation for completing, and obtains the behaviour of the affairs set Make daily record.
In the present embodiment, if having single things or the transaction set comprising multiple things to hold on local data base Row is completed, then server can get the Operation Log of the single things or the transaction set comprising multiple things.Wherein, institute The affairs set stated can be the set of single affairs, or the transaction set comprising multiple affairs.Operation Log is general It is the network equipment, system and service routine etc., produced in running is the log logouts of (daily record), and often a line Operation Log all recites the description of the associative operations such as date, time, user and the action of affairs generation.
Wherein, with reference to shown in Fig. 4, the step of obtain the Operation Log of the affairs set, can specifically include:
Step 401:The Operation Log of the affairs set is read into disk from internal memory;
In the present embodiment, after affairs are performed, Operation Log is typically created in the internal memory of server, if service Device needs the Operation Log for obtaining affairs set, it is necessary to first Operation Log is read into disk from internal memory.
Step 402:The Operation Log is obtained from the disk.
Operation Log is successfully read to disk by server from internal memory, then the operation of affairs set is obtained from disk Daily record.
Fig. 3 is then returned to, into step 302:By the Operation Log writing backup data storehouse.
In the present embodiment, because affairs set is performed on local data base, for server, If necessary to realize data syn-chronization again between local data base and backup database, it is necessary to the operation of each affairs set Daily record all writing backup data storehouses could be ready for data syn-chronization.
Step 303:Judge whether the Operation Log writes successfully, if it is, entering step 304.
In the present embodiment, because backup database be usually be arranged on from local data base or server it is different On computer, so if network goes wrong, server is possible to successfully to write after Operation Log is got Enter backup database, it is therefore desirable to after by Operation Log writing backup data storehouse, judge whether the Operation Log is successful Writing backup data storehouse.Successfully by Operation Log writing backup data storehouse in the case of, then perform subsequent step 304.
Wherein, in a specific embodiment, server judges whether Operation Log writes successfully, can be by judging whether Receive the Operation Log to be successfully written the message of the backup database to realize.Generally, Backup Data place Computer after Operation Log is successfully written backup database, the success of Operation Log can be returned to server The message in writing backup data storehouse, if server receives the message, illustrates that Operation Log has been successfully written backup number According to storehouse.
Step 304:The data of the local data base are updated according to the Operation Log.
And server is then after Operation Log is successfully written backup database, then according to the content update sheet of Operation Log Data in ground data base are data update status involved when performing according to affairs come to the data in local data base Do a corresponding renewal.For example, certain data needs that certain affairs is related in local data base are deleted, that service The data in local data base is just deleted by device.
In the present embodiment, because server is first by Operation Log writing backup data storehouse, and it is being successfully written backup In the case of data base, then according to Operation Log updating the data in local data base, if the number of follow-up local data base It is abnormal according to occurring, it is also possible to trigger backup database according to Operation Log to carry out the renewal of data, so as to ensure any situation Lower data between local data base and backup database are all consistent, are successfully realized in local data base and backup database Between data synchronization.
With reference to shown in Fig. 5, it is the flow chart of the another embodiment of method of data synchronization disclosed by the invention, present embodiment Specifically can for example include:
Step 501:The operation for completing is performed in response to the transaction set of local data base, the operation day of the transaction set is obtained Will.
Step 502:By the Operation Log writing backup data storehouse of the transaction set.
In the present embodiment, transaction set is combined into a transaction set comprising multiple affairs, concrete step 501~502 Realization may be referred to the related introduction of embodiment 1, will not be described here.
Step 503:Judge whether that the Operation Log for receiving the transaction set is successfully written disappearing for the backup database Breath, if it is, step 504 is entered, if it is not, then return to step 502.
In the present embodiment, server judges whether the computer for receiving backup database place is returned, affairs The Operation Log of group is successfully written the message of backup database, if having received, into subsequent step 504, if do not had Receive, then illustrate that this Operation Log is not successfully written backup database, then can with return to step 502, by server after Continue to the computer that backup database is located and send Operation Log.
In the present embodiment, it should be noted that the Operation Log of multiple affairs in transaction set is to be sent in the lump Backup database, be to treat that the multiple affairs in transaction set are performed both by finishing, and property obtains the operation of the plurality of affairs again Daily record, then carries out the transmission process of Operation Log in units of transaction set.
Step 504:The data of the local data base are updated according to the Operation Log of the transaction set.
After server treats that the Operation Log of multiple affairs in transaction set is successfully written backup database, then with transaction set Updated in local data base respectively according to the Operation Log of plurality of affairs for unit and be related in the plurality of affairs implementation procedure The related data for arriving.
In the present embodiment, device to be serviced is according to the data in the Operation Log batch updating local data base of transaction set Afterwards, if exception occur in the data that subsequent server detects local data base, can also include:
Step 505:The service routine for triggering the backup database updates described according to the Operation Log of the transaction set Data in backup database.
The Operation Log that the service routine of server triggers backup database is successfully written according to step 502, comes corresponding Update the data in backup database, the number just with the local data base for exception occur of the data after renewal in backup database According to being consistent, nor affect on normal use of the server to the data of recent renewal, it is to avoid what server data was lost shows As being also successfully realized the data syn-chronization of local data base and backup database.
Further, in the present embodiment, after the multiple affairs in transaction set are carried out completing, then batch is obtained and is somebody's turn to do The Operation Log of multiple affairs in transaction set, and the Operation Log of transaction set is also sent to Backup Data by server in the lump Storehouse, therefore the computer that backup database is located also need to only be directed to the message that transaction set reply is once properly received, because This also reduces cost on network communication, improves the overall performance of server process affairs.
Example devices
After the method for describing exemplary embodiment of the invention, next, referring to Fig. 6, Fig. 6 is enforcement of the present invention The structural representation of one embodiment of equipment disclosed in mode (for example, server), exemplary embodiment of the invention, number According to synchronizer, specifically can for example include:
Acquisition module 601, is configured to perform the operation for completing in response to the affairs set of local data base, obtains described The Operation Log of affairs set.
According to some embodiments of the present invention, described affairs set can be the set of single affairs, it is also possible to It is the transaction set comprising multiple affairs.
Wherein, the acquisition module 601, with reference to shown in Fig. 7, can specifically include:
First reading submodule 701, is configured to the Operation Log of the affairs set is read into disk from internal memory;
Second reading submodule 702, is configured to from the disk obtain the Operation Log.
Writing module 602, is configured to the Operation Log writing backup data storehouse.
Judge module 603, is configured to judge whether the Operation Log writes successfully.
Wherein, the judge module 603, is configured specifically for:Judge whether that receiving the Operation Log is successfully written The message of the backup database.
Local update module 604, is configured to result in the judge module in the case of being, according to the operation Daily record updates the data of the local data base.
In the present embodiment, because server is first by Operation Log writing backup data storehouse, and it is being successfully written backup In the case of data base, then according to Operation Log updating the data in local data base, if the number of follow-up local data base It is abnormal according to occurring, it is also possible to trigger backup database according to Operation Log to carry out the renewal of data, so as to ensure any situation Lower data between local data base and backup database are all consistent, are successfully realized in local data base and backup database Between data synchronization.
With reference to shown in Fig. 8, the structured flowchart of the another embodiment of the equipment provided for the present invention, except illustrated in Figure 6 Structure outside, present embodiment specifically can also for example include:
Acquisition module 601, is configured to perform the operation for completing in response to the transaction set of local data base, obtains the thing The Operation Log of business group.
Writing module 602, is configured to the Operation Log writing backup data storehouse of the transaction set.
Judge module 603, judges whether that the Operation Log for receiving the transaction set is successfully written the backup database Message.
Local update module 604, is configured to result in the judge module in the case of being, according to the affairs The Operation Log of group updates the data of the local data base.
Trigger module 801, is configured to trigger the operation of the service routine according to the transaction set of the backup database Daily record updates the data in the backup database.
It can be seen that, the equipment (for example, server) that embodiment of the present invention is provided can not only realize local data base and standby Successful synchronization between part data base, moreover it is possible to reduce cost on network communication, improve the overall performance of server process affairs.
Although it should be noted that equipment (for example, server) is referred in above-detailed if equipment for drying or son dress Put, but this division is only not enforceable.In fact, according to the embodiment of the present invention, above-described two or The feature and function of more devices can embody in one apparatus.Conversely, the feature and work(of an above-described device Can be able to be to be embodied by multiple devices with Further Division.
Although additionally, describe the operation of the inventive method in the accompanying drawings with particular order, this do not require that or Hint must perform according to the particular order these operation, or the operation having to carry out shown in whole could realize it is desired As a result.Conversely, the step of describing in flow chart can change execution sequence.Additionally or alternatively, it is convenient to omit some steps, Multiple steps are merged into a step to perform, and/or a step is decomposed into into execution of multiple steps.
It should be noted that herein, such as first and second or the like relational terms are used merely to a reality Body or operation are made a distinction with another entity or operation, and are not necessarily required or implied these entities or deposit between operating In any this actual relation or order.The verb " including " that refers in application documents, "comprising" and its paradigmatic Using the presence of the element or step being not excluded in addition to those elements or step described in application documents.Hat before element Word "a" or "an" is not excluded for the presence of multiple this elements.
Although describing spirit and principles of the present invention by reference to some specific embodiments, it should be appreciated that, this Invention is not limited to disclosed specific embodiment, and the feature in also not meaning that to the division of each side in terms of these can not Combination is to be benefited, this to divide merely to the convenience of statement.It is contemplated that cover claims spirit and In the range of included various modifications and equivalent arrangements.Scope of the following claims meets broadest explanation, so as to include All such modifications and equivalent structure and function.

Claims (10)

1. a kind of method of data synchronization, including:
Affairs set in response to local data base performs the operation for completing, and obtains the Operation Log of the affairs set;It is described The logout that Operation Log is produced when being running;
By network by the Operation Log writing backup data storehouse;
Judge whether the Operation Log writes successfully, if it is, the local data base is updated according to the Operation Log Data.
2. method according to claim 1, wherein, it is described judge the Operation Log whether write successfully, including:
Judge whether to receive the message that the Operation Log is successfully written the backup database.
3. method according to claim 1, wherein, the Operation Log for obtaining the affairs set, including:
The Operation Log of the affairs set is read into disk from internal memory;
The Operation Log is obtained from the disk.
4. method according to claim 1, also includes:
The service routine for triggering the backup database updates the data in the backup database according to the Operation Log.
5. the method according to any one of Claims 1 to 4, wherein, the transaction set is combined into:The set of single affairs or bag Transaction set containing multiple affairs.
6. a kind of data syn-chronization equipment, including:
Acquisition module, is configured to perform the operation for completing in response to the affairs set of local data base, obtains the transaction set The Operation Log of conjunction;The logout that the Operation Log is produced when being running;
Writing module, is configured to network by the Operation Log writing backup data storehouse;
Judge module, is configured to judge whether the Operation Log writes successfully;
Local update module, is configured to result in the judge module in the case of being, according to the Operation Log more The data of the new local data base.
7. equipment according to claim 6, wherein, the judge module is configured specifically for:Judge whether to receive institute State the message that Operation Log is successfully written the backup database.
8. equipment according to claim 6, wherein, the acquisition module, including:
First reading submodule, is configured to the Operation Log of the affairs set is read into disk from internal memory;
Second reading submodule, is configured to from the disk obtain the Operation Log.
9. equipment according to claim 6, also includes:
Trigger module, the service routine for being configured to trigger the backup database update the backup according to the Operation Log Data in data base.
10. the equipment according to any one of claim 6~9, wherein, the transaction set is combined into:The set of single affairs or Transaction set comprising multiple 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 CN103268351A (en) 2013-08-28
CN103268351B true 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)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104462127B (en) * 2013-09-22 2018-07-20 阿里巴巴集团控股有限公司 A kind of record data-updating method and device
CN104714957B (en) * 2013-12-13 2018-11-23 阿里巴巴集团控股有限公司 A kind of variation and device of table structure
CN103761165B (en) * 2014-01-15 2017-10-24 北京奇虎科技有限公司 Log backup method and 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
CN106776121B (en) * 2016-11-23 2020-08-18 中国工商银行股份有限公司 Data disaster recovery device, system and method
CN106611061B (en) * 2016-12-29 2018-02-23 北京众享比特科技有限公司 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
CN117033083B (en) * 2023-09-28 2024-01-19 武汉吧哒科技股份有限公司 Data backup method, system and storage medium

Citations (6)

* 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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102722579A (en) * 2012-06-07 2012-10-10 浪潮电子信息产业股份有限公司 Bisynchronous method for internal database of cluster memory system

Patent Citations (6)

* 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

Also Published As

Publication number Publication date
CN103268351A (en) 2013-08-28

Similar Documents

Publication Publication Date Title
CN103268351B (en) Method and device for data synchronism
US10693630B1 (en) Cross-blockchain interaction method, apparatus, system, and electronic device
CA3083819C (en) Cross-blockchain authentication method, apparatus, and electronic device
CN107122289B (en) Method, device and system for system regression testing
CN108492108A (en) Across the chain communication means of block chain, system and computer readable storage medium
CN110569311A (en) Data synchronization method and device for database and computer storage medium
CN110430087A (en) The architecture design and realization of block chain heat upgrading
WO2019178501A1 (en) Fraudulent transaction identification method and apparatus, server, and storage medium
CN106611061A (en) Database write-in method and system based on block chain network
US20190318280A1 (en) Method, system, and device for online ticket checking based on a client interface
CN110019498A (en) Log synchronous method and device, storage medium, electronic equipment
CN107122673A (en) A kind of information ciphering method and terminal
CN111026769B (en) Working method of dual-core front-end system and related equipment thereof
CN109891849A (en) Highly usable and reliable secret distribution infrastructure
CN113434881A (en) Credibility verification method and device for cross-chain transaction and electronic equipment
CN107506200A (en) A kind of screen content switching method, terminal and computer-readable recording medium
CN107526838A (en) The method and apparatus of data-base cluster dilatation
CN113673476B (en) Face recognition model training method and device, storage medium and electronic equipment
CN110045952A (en) Code call method and device
CN111352769A (en) Method for restoring database, restoring server and computer readable storage medium
CN113032817B (en) Data alignment method, device, equipment and medium based on block chain
CN108768742A (en) Network establishing method and device, electronic equipment, storage medium
CN112100187B (en) Student learning data storage method and device based on VueJS
CN114328464A (en) Data maintenance method, device, equipment and readable medium for distributed storage equipment
CN107798556A (en) For updating method, equipment and the storage medium of situation record

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