CN104270424B - A kind of database synchronization method, server and system - Google Patents

A kind of database synchronization method, server and system Download PDF

Info

Publication number
CN104270424B
CN104270424B CN201410474391.0A CN201410474391A CN104270424B CN 104270424 B CN104270424 B CN 104270424B CN 201410474391 A CN201410474391 A CN 201410474391A CN 104270424 B CN104270424 B CN 104270424B
Authority
CN
China
Prior art keywords
historical operating
data
operating data
historical
moment
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
CN201410474391.0A
Other languages
Chinese (zh)
Other versions
CN104270424A (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.)
Shenzhen Skyworth Digital Technology Co Ltd
Shenzhen Skyworth Software Co Ltd
Original Assignee
Shenzhen Skyworth Digital Technology Co Ltd
Shenzhen Skyworth Software 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 Shenzhen Skyworth Digital Technology Co Ltd, Shenzhen Skyworth Software Co Ltd filed Critical Shenzhen Skyworth Digital Technology Co Ltd
Priority to CN201410474391.0A priority Critical patent/CN104270424B/en
Publication of CN104270424A publication Critical patent/CN104270424A/en
Application granted granted Critical
Publication of CN104270424B publication Critical patent/CN104270424B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention discloses a kind of database synchronization methods, including:Receive the synchronization request from server;Synchronization request includes business datum mark, reference time;Whole historical operating datas in historical operating data library are filtered according to synchronization request, obtain corresponding first historical operating data of synchronization request;First historical operating data is that business datum identifies the corresponding historical operating data for being later than the reference time;It is successive by the operating time, the historical operating data at the second moment that the historical operating data at the first moment in the first historical operating data is merged into the first historical operating data is obtained into synchrodata;First moment was later than for the second moment;Synchrodata is returned to extremely from server.Using the present invention, primary server can be reduced to the simultaneously operating from server, volume of transmitted data when simultaneously operating can be reduced, to improve synchronous efficiency, save Internet resources.

Description

A kind of database synchronization method, server and system
Technical field
The present invention relates to database field more particularly to a kind of database synchronization methods, server and system.
Background technique
Database can be considered the place of storage electronic document, and user can increase the data in file newly, intercept, more Newly, the operation such as deletion.With the development of information technology, the synchronization of database is more and more important.Existing database synchronization technology There is database journal synchronous method, which passes through the log for monitoring source database, to capture source data The data variation information in library, to realize that source database is synchronous with target database;Existing database synchronization technology is also Database synchronization method file-based, the database synchronization method file-based is with file mode from source database to mesh Mark client database synchronizes.
But since each data needed from server are different, when synchronous, primary server needs are sieved according to condition Choosing, meanwhile, each to be all deployed in different networks from server, above-mentioned existing database synchronization technology causes primary server Frequent simultaneously operating is carried out, the data volume transmitted in simultaneously operating is big.
Summary of the invention
The embodiment of the present invention can reduce master the technical problem to be solved is that a kind of database synchronization method and system is provided Server can reduce volume of transmitted data when simultaneously operating to the simultaneously operating from server, to improve synchronous efficiency, save Internet resources.To solve the above problems, the technical scheme is that:
The embodiment of the invention provides a kind of database synchronization method, this method includes the content of two aspects.Wherein one The content of a aspect is the database synchronization method of main server side, including:
Receive the synchronization request from server;The synchronization request includes business datum mark, reference time;
Whole historical operating datas in historical operating data library are filtered according to the synchronization request, the synchronization is obtained and asks Business datum in asking identifies corresponding first historical operating data;First historical operating data is the business datum mark Know the corresponding historical operating data for being later than the reference time;
It is successive by the operating time, the historical operating data at the first moment in first historical operating data is merged into The historical operating data at the second moment in first historical operating data obtains synchrodata;First moment is later than Second moment;
The synchrodata is returned to described from server.
Specifically, the historical operating data by the first moment in first historical operating data be merged into it is described The historical operating data at the second moment in the first historical operating data includes to obtain synchrodata:It is successive by the operating time, In an iterative manner the historical operating data in first historical operating data is combined to be synchronized from back to front Data.
Specifically, the whole historical operating datas filtered in historical operating data library according to the synchronization request, obtain Identifying corresponding first historical operating data to the business datum in the synchronization request includes:
The history for being later than the reference time is filtered out in whole historical operating datas according to the reference time Operation data;
It is filtered out in the historical operating data for being later than the reference time according to business datum mark described It is first historical operating data that business datum, which identifies the corresponding historical operating data for being later than the reference time,.
Specifically, the business datum mark includes multiple subservice Data Identifications;It is described by first historical operation The historical operating data at the first moment in data is merged into the history behaviour at the second moment in first historical operating data Synchrodata is obtained as data includes:
First historical operating data is classified by the subservice Data Identification;
By the operating time successively by the historical operating data at first moment in the first historical operating data of same class It is respectively obtained in the historical operating data at second moment being merged into first historical operating data of same class each The final data of the first historical operating data of class;
The final data for being packaged all kinds of first historical operating datas is the synchrodata.
Specifically, returning to the synchrodata to described before server, if wrapped in the synchrodata described When containing accessory information, then it is that the corresponding attachment of the accessory information generates download address, and returns to the download address to described From server.
Specifically, pressing the operating time successively by first moment in the first historical operating data of same class described Historical operating data is merged into the historical operating data at second moment in first historical operating data of same class When, if the historical operating data at first moment in the first historical operating data of the same class and second moment Historical operating data correspond to identical field, then the corresponding operation information of the historical operating data at first moment is covered The corresponding operation information of historical operating data at second moment.
Specifically, the final data for being packaged all kinds of first historical operating datas is that the synchrodata includes: The final data of all kinds of first historical operating datas described in sequencing tissue by the operating time forms the synchrodata Data packet.
Specifically, the download address is returned to described after server described, including:
Described download from the attachment of server is received to request;
The corresponding attachment of the download address is sent to described from server.
Specifically, the corresponding operation information of the historical operating data include the corresponding operation content of historical operating data and The corresponding operational motion of historical operating data;It will be described in the corresponding operation information covering of the historical operating data at first moment The corresponding operation information of the historical operating data at the second moment includes:
The corresponding operation content of historical operating data at first moment is covered to the historical operation at second moment The corresponding operation content of data;
The corresponding operational motion of historical operating data at first moment is covered to the historical operation at second moment The corresponding operational motion of data.
Content in terms of another one is the database synchronization method from server side, including:
Synchronization request is sent to primary server;The synchronization request includes business datum mark, reference time;
Receive the synchrodata that primary server is sent;The synchrodata is the business number for being later than the reference time According to the corresponding historical operating data of mark;
Local data base is updated according to the synchrodata.
Specifically, described include according to synchrodata update local data base:
The corresponding business datum of historical operating data in the synchrodata is found in the local data base;
According in the synchrodata the corresponding operational motion of historical operating data and the corresponding behaviour of historical operating data The corresponding business datum of the historical operating data is updated as content.
Specifically, it is described according to the synchrodata update local data base after, record it is described update complete when Between;It is described to update reference time of the time as next synchronizing cycle completed.
Specifically, after the synchrodata that the reception primary server is sent, if comprising attached in the synchrodata The download address of part downloads request to the primary server according to download address transmission;Institute is downloaded from the primary server State the corresponding attachment of download address.
Specifically, the corresponding operational motion of historical operating data and historical operation number according in the synchrodata The corresponding business datum of the historical operating data is updated according to corresponding operation content includes:
If the corresponding operational motion of historical operating data in the synchrodata is deletion movement, by the history The corresponding business datum of operation data is deleted;Or
If the corresponding operational motion of historical operating data in the synchrodata is addition movement, by the history The corresponding field of operation data is added in the corresponding business datum of the historical operating data;Or
If the corresponding operational motion of historical operating data in the synchrodata is modification movement, by the history The corresponding field of operation data covers the field in the corresponding business datum of the historical operating data.
The embodiment of the invention provides a kind of primary server of database synchronization, the primary server includes:
Synchronization request receiving module, for receiving the synchronization request from server;The synchronization request includes business datum Mark, reference time;
Filtering module, for filtering whole historical operating datas in historical operating data library according to the synchronization request, The business datum obtained in the synchronization request identifies corresponding first historical operating data;First historical operating data is The business datum identifies the corresponding historical operating data for being later than the reference time;
Merging module, for successive by the operating time, by the history at the first moment in first historical operating data The historical operating data at the second moment that operation data is merged into first historical operating data obtains synchrodata;Institute Stating for the first moment is later than second moment;
Synchrodata sending module, for returning to the synchrodata to described from server.
Specifically, the merging module is successive specifically for pressing the operating time, it from back to front in an iterative manner will be described Historical operating data in first historical operating data is combined to obtain synchrodata.
Specifically, the filtering module includes:
First filtering module is later than institute for filtering out in whole historical operating datas according to the reference time State the historical operating data of reference time;
Second filtering module, for being identified according to the business datum in the historical operation for being later than the reference time Filtering out the business datum in data and identifying the corresponding historical operating data for being later than the reference time is described first to go through History operation data.
Specifically, the business datum mark includes multiple subservice Data Identifications;The merging module includes:
Categorization module, for first historical operating data to be classified by the subservice Data Identification;
Historical operation merging module, for by the operating time successively by described the in the first historical operating data of same class The historical operating data at one moment is merged into the history behaviour at second moment in first historical operating data of same class Make the final data that all kinds of first historical operating datas are respectively obtained in data;
Packetization module, the final data for being packaged all kinds of first historical operating datas are the synchrodata.
Specifically, further include attachment handling module, for it is described return the synchrodata to it is described from server it Before, if in the synchrodata include accessory information, download address is generated for the corresponding attachment of the accessory information, and The download address is returned to described from server.
Specifically, further include overlay module, it is described first by the operating time for being executed in the historical operation merging module The historical operating data at first moment in the first historical operating data of same class is merged into the same class first afterwards All kinds of first historical operating datas are respectively obtained in the historical operating data at second moment in historical operating data When the step of final data,
If the historical operating data at first moment in first historical operating data of same class and described the The historical operating data at two moment corresponds to identical field, then believes the corresponding operation of the historical operating data at first moment Breath covers the corresponding operation information of historical operating data at second moment.
Specifically, the packetization module is specifically used for all kinds of first history behaviour described in the sequencing tissue by the operating time The final data for making data forms the data packet of the synchrodata.
Specifically, further including download process module, for executing the return downloading in the attachment handling module Address to it is described from server the step of after, receive described download from the attachment of server and request;Send the download address Corresponding attachment is to described from server.
Specifically, the overlay module includes:
Operation content overlay module, for the corresponding operation content of the historical operating data at first moment to be covered institute State the corresponding operation content of historical operating data at the second moment;
Operational motion overlay module, for the corresponding operational motion of the historical operating data at first moment to be covered institute State the corresponding operational motion of historical operating data at the second moment.
It is described to include from server the embodiment of the invention provides a kind of slave server of database synchronization:
Synchronization request module, for sending synchronization request to primary server;The synchronization request includes business datum mark, Reference time;
Synchrodata receiving module, for receiving the synchrodata of primary server transmission;The synchrodata is is later than The business datum for stating reference time identifies corresponding historical operating data;
Update module, for updating local data base according to the synchrodata.
Specifically, the update module includes:
Business datum locating module, for finding the historical operating data in the synchrodata in the local data base Corresponding business datum;
Service data updating module, for according in the synchrodata the corresponding operational motion of historical operating data and The corresponding operation content of historical operating data updates the corresponding business datum of the historical operating data.
Specifically, further including:Logging modle, it is described according to synchrodata update for being executed in the update module After the step of local data base, the time for updating and completing is recorded;It is described to update the time completed as next synchronization The reference time in period.
Specifically, further including download module, for executing the reception primary server in the synchrodata receiving module After the step of synchrodata of transmission, if in the synchrodata including the download address of attachment, according to the downloading ground Location sends and downloads request to the primary server;The corresponding attachment of the download address is downloaded from the primary server.
Specifically, the service data updating module includes:
First update module, if being to delete for the corresponding operational motion of historical operating data in the synchrodata The historical operating data is then corresponded to business datum and deleted by movement;Or
Second update module, if being addition for the corresponding operational motion of historical operating data in the synchrodata The corresponding field of the historical operating data, then be added in the corresponding business datum of the historical operating data by movement;Or
Third update module, if being modification for the corresponding operational motion of historical operating data in the synchrodata Movement, then the corresponding field of the historical operating data is covered in the corresponding business datum of the historical operating data described in Field.
In addition, the embodiment of the invention also provides a kind of system of database synchronization, the system comprises primary server and From server, wherein the primary server is primary server described in above-mentioned full content, it is described from server be above-mentioned whole Slave server described in content, which is not described herein again.
By implementing the embodiment of the present invention, primary server is received from the synchronization request of server, according to from the same of server Step request filters historical operating data to obtain the corresponding historical operating data of the synchronization request, and it is corresponding to merge the synchronization request Historical operating data obtains the synchrodata from server, sends the synchrodata to from server, can reduce primary server To the simultaneously operating from server, volume of transmitted data when simultaneously operating can be reduced, to improve synchronous efficiency, saves network money Source.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other Attached drawing.
Fig. 1 is the flow chart of the database synchronization method for the primary server side that a kind of embodiment of the invention provides;
Fig. 2 is the flow chart of the database synchronization method for the slave server side that a kind of embodiment of the invention provides;
Fig. 3 is the flow chart of the database synchronization method for the primary server side that another embodiment of the invention provides;
Fig. 4 is the schematic diagram that historical operating data provided in an embodiment of the present invention merges;
Fig. 5 is the structural schematic diagram for the primary server that a kind of embodiment of the invention provides;
Fig. 6 is the structural schematic diagram of the filtering module for the primary server that a kind of embodiment of the invention provides;
Fig. 7 is the structural schematic diagram of the merging module for the primary server that a kind of embodiment of the invention provides;
Fig. 8 is the structural schematic diagram for the primary server that another embodiment of the invention provides;
Fig. 9 is the structural schematic diagram for the primary server that the third embodiment of the invention provides;
Figure 10 is the structural schematic diagram of the overlay module for the primary server that the third embodiment of the invention provides;
Figure 11 is the structural schematic diagram for the primary server that the 4th kind of embodiment of the invention provides;
Figure 12 is the structural schematic diagram for the slave server that an embodiment of the present invention provides;
Figure 13 is the structural schematic diagram of the update module for the slave server that an embodiment of the present invention provides;
Figure 14 is the structural schematic diagram of the service data updating module for the slave server that an embodiment of the present invention provides;
Figure 15 is the structural schematic diagram for the slave server that another embodiment of the invention provides;
Figure 16 is the structural schematic diagram for the slave server that the third embodiment of the invention provides.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
It should be noted that the term used in embodiments of the present invention is only merely for the mesh of description specific embodiment , it is not intended to limit the invention." the one of the embodiment of the present invention and singular used in the attached claims Kind ", " described " and "the" are also intended to including most forms, unless the context clearly indicates other meaning.It is also understood that this Term "and/or" used herein refers to and includes one or more associated any or all possible group for listing project It closes.
It is the flow chart of the database synchronization method for the primary server side that a kind of embodiment of the invention provides referring to Fig. 1. The process of the database synchronization method of the primary server side in the present embodiment may include as shown in the figure:
Step S101:Receive the synchronization request from server.
Specifically, primary server receives the synchronization request sent from server, which includes business datum mark, Reference time.The business that itself can will be needed from server, time (i.e. reference time) for synchronously completing last time and from The identity of server sends primary server to;Primary server receives after the synchronization request that server is sent, can root According to the data in synchronization request filtering historical operating data library.
Step S103:Whole historical operating datas in historical operating data library are filtered according to synchronization request, are synchronized Request corresponding first historical operating data.
Specifically, historical operating data library can be used for the historical operation record of storage service data;The historical operation record As historical operating data, it may include the newly-increased, interception that carries out to business datum such as updates, deletes at operation and these operations Content, may also include the mark of business datum, operating time, accessory information etc.;Wherein, the business number in historical operating data The unique identification that can be the business datum according to mark can also be the mark of the business datum under some specific module, here The form of expression of the relationship of historical operating data business datum corresponding with its is not limited.
Specifically, the synchronization request includes business datum mark, reference time;First historical operating data is the business number According to the corresponding historical operating data for being later than the reference time of mark.Step S103 may particularly include:Existed according to the reference time The historical operating data for being later than the reference time is filtered out in whole historical operating datas in historical operating data library;According to this It is corresponding that business datum mark filters out business datum mark in the historical operating data for being later than the reference time The historical operating data for being later than the reference time is the first historical operating data.
Primary server can filter the historical operating data in historical operating data library according to the reference time in synchronization request, It obtains being later than the historical operating data of reference time and synchronously completes newly generated historical operating data later to get to the last time; After this, primary server can be identified according to the business datum in synchronization request to filter the above-mentioned history for being later than reference time and grasp The business datum is obtained as data and identifies corresponding historical operating data, which is the data requested from server.
Step S105:It is successive by the operating time, by the historical operating data at the first moment in the first historical operating data The historical operating data at the second moment being merged into the first historical operating data obtains synchrodata.
Specifically, above-mentioned first moment is later than above-mentioned second moment, it will be appreciated that, in above-mentioned first historical operating data The historical operating data at the first moment is the posterior historical operating data in the first historical operating data;Similarly, above-mentioned first The historical operating data at the second moment in historical operating data is the first historical operation number in the first historical operating data According to.
Specifically, primary server can be identified according to business datum, and operational motion, operation content, accessory information, and operation Time merges, and merging repetitive operation is an operation.Here repetitive operation may include the difference for same business datum The historical operation record of operating time, for example, the Editorial Services of director server is to same programme information in radio data system Editor's movement of different time is the repetition historical operation of the programme information.
In the specific implementation, primary server can by whole historical operating datas in the first historical operating data according to operation when Between sort, and operating time posterior historical operating data is merged into operating time preceding historical operating data, thus Obtain synchrodata.For example, for same business datum, the historical operating data A of moment T1 is to the operational motion of field T " modification ", operation content are " abc ", and the historical operating data B of moment T2 is " modification " to the operational motion of field T, in operation Holding is " abcd ", and wherein moment T2 is later than moment T1, then historical operating data B is merged into historical operating data A, after merging The operational motion of historical operating data is " modification ", and operation content is " abcd ".
It should be noted that the direct operation object of the operational motions such as " addition " or " modification " in historical operating data is industry Field in data of being engaged in, but the direct operation object of " deletion " this operation movement in historical operating data is business number According to, then in the first historical operating data, if the operational motion of posterior historical operating data be " deletion ", can directly by Historical operation record before the posterior historical operating data is all deleted;Correspondingly, if what is received from server is same There are the historical operating data that operational motion is " deletion " in step data, it is corresponding that the historical operating data is directly deleted from server Business datum.For example, the operational motion of the historical operating data A of moment T1 is to field T's for same business datum " modification ", operation content are " abc ", and the operational motion of the historical operating data B of moment T2 is " deletion ", and wherein moment T2 is later than Moment T1 then directly deletes whole historical operating datas at the time of the business datum corresponds to before T2.Example is only this hair A kind of implementation of bright embodiment can should not constitute restriction with difference in actual use.
Optimal, primary server can be successive by the operating time, from back to front in an iterative manner by the first historical operation Historical operating data in data is combined to obtain synchrodata, i.e. primary server can be in an iterative manner successively by Posterior historical operating data in one historical operating data is merged into the first historical data in the first historical operating data In obtain the final data of the first historical operating data, specific implementation can be found in the content in the step S311 of Fig. 3.
Optionally, primary server can also go through the partial history operand for taking out continuous adjacent from the first historical operating data According to, the partial history operation data of the continuous adjacent is sorted according to the operating time, and by the partial history of the continuous adjacent grasp Make the posterior historical operating data of operating time in data to be merged into operating time preceding historical operating data, to reduce The part repetitive operation of first historical operating data.
It should be noted that the business datum mark in above-mentioned synchronization request can be the Data Identification of single business datum, It is also possible to the set of the Data Identification of multiple subservice data under individual module, can also be the business of other combining forms The Data Identification of data should not constitute restriction here.Correspondingly, the business datum for non-single business identifies, primary server Operation can be merged to the corresponding historical operating data of each business datum respectively, and by the corresponding merging of each business datum Historical operating data afterwards is packaged as synchrodata.Particularly, if above-mentioned business datum mark includes multiple subservice data Mark, primary server can classify the first historical operating data according to subservice Data Identification;In every a kind of historical operating data Merging process in, primary server can be successive by the operating time, from back to front in an iterative manner grasps every a kind of first history The historical operating data made in data merges.
Step S107:Synchrodata is returned to extremely from server.
Specifically, the corresponding synchrodata of the synchronization request sent from server can be sent to from service by primary server Device.In the specific implementation, primary server can be same come position receiver according to the identity for the slave server for including in synchronization request The slave server of step data.
Specifically, returning to synchrodata extremely before server, it is main if in the synchrodata include accessory information Server can generate download address for the corresponding attachment of the accessory information, and return to download address extremely from server.In main service Device returns to attachment download address to after server, and primary server can receive to download from the attachment of server and request;And it sends The corresponding attachment of download address is extremely from server.
Referring to fig. 2, be the slave server side that a kind of embodiment of the invention provides database synchronization method flow chart. The process of the database synchronization method of the slave server side in the present embodiment may include as shown in the figure:
Step S201:Synchronization request is sent to primary server.
Specifically, from the business that server itself can will need, the time (i.e. reference time) that the last time synchronously completes And primary server is sent to from the identity of server.It should be noted that can from the mode that server sends synchronization request To be interval timing at preset timed intervals to primary server initiation request, it can also initiate to request by user's triggering, not make here Limitation.
Step S203:Receive the synchrodata that primary server is sent.
Specifically, receiving the synchrodata that primary server is sent from server.In the same step number for receiving primary server transmission According to later, if in synchrodata including the download address of attachment, downloading request can be sent according to the download address from server To primary server;And the corresponding attachment of the download address is downloaded from primary server.
Step S205:Local data base is updated according to synchrodata.
Specifically, from server the corresponding business number of the historical operating data in synchrodata can be found in local data base According to;And it can be according in the corresponding operational motion of the historical operating data operation corresponding with the historical operating data in synchrodata Hold to update the corresponding business datum of the historical operating data.In practical application, if the historical operating data in synchrodata Corresponding operational motion is deletion movement, then can directly be deleted the corresponding business datum of the historical operating data from server; Or if the corresponding operational motion of historical operating data in synchrodata is addition movement, the history can be grasped if from server Make the corresponding field of data to be added in the corresponding business datum of the historical operating data;Or if the history in synchrodata is grasped Make the corresponding operational motion of data as modification movement, then the corresponding field of the historical operating data can be covered this from server and gone through The field in the corresponding business datum of history operation data.
Further, it after updating local data base according to final synchrodata from server, is recorded from server This time updates the time completed;This time updates the reference time for the time completed being used as next synchronizing cycle.
It is the process of the database synchronization method for the primary server side that another embodiment of the invention provides referring to Fig. 3 Figure.The process of the database synchronization method of the primary server side in the present embodiment may include as shown in the figure:
Step S301:Receive the synchronization request from server.
Specifically, specific implementation can be found in the content in step S101.
Step S303:Historical operating data library is filtered according to synchronization request.
Specifically, historical operating data library can be used for the historical operation record of storage service data;The historical operation record As historical operating data, it may include the newly-increased, interception that carries out to business datum such as updates, deletes at operation and these operations Content, may also include the mark of business datum, operating time, accessory information etc.;Wherein, the business number in historical operating data The unique identification that can be the business datum according to mark can also be the mark of the business datum under some specific module, here The form of expression of the relationship of historical operating data business datum corresponding with its is not limited.
Primary server can filter the historical operating data in historical operating data library according to the reference time in synchronization request, It obtains being later than the historical operating data of reference time and synchronously completes newly generated historical operating data later to get to the last time; After this, primary server can be identified according to the business datum in synchronization request to filter the above-mentioned history for being later than reference time and grasp The business datum is obtained as data and identifies corresponding historical operating data, which is the data requested from server.
Step S305:By filtered historical operating data by business datum mark classification.
Specifically, the business datum mark in above-mentioned synchronization request can be the business datum mark of single business, it can also Be multiple business datums under individual module Data Identification set, can also be the business datum of other combining forms Data Identification.
Specifically, primary server can be gone through first when above-mentioned business datum mark includes multiple subservice Data Identifications History operation data is classified by subservice Data Identification.
Step S307:Judge the historical operating data at the first moment in the first historical operating data of same class and when second Whether the historical operating data at quarter corresponds to identical field.
Specifically, above-mentioned first moment is later than above-mentioned second moment, it will be appreciated that, in above-mentioned first historical operating data The historical operating data at the first moment is the posterior historical operating data in the first historical operating data;Similarly, above-mentioned first The historical operating data at the second moment in historical operating data is the first historical operation number in the first historical operating data According to.
Specifically, if historical operating data and second moment at the first moment in the first historical operating data of same class Historical operating data correspond to identical field, then primary server execute step S309;Otherwise, step S311 is executed.
Step S309:The corresponding operation information of the historical operating data at the first moment is covered to the historical operation at the second moment The corresponding operation information of data.
Specifically, above-mentioned first moment is later than above-mentioned second moment, it will be appreciated that, in above-mentioned first historical operating data The historical operating data at the first moment is the posterior historical operating data in the first historical operating data;Similarly, above-mentioned first The historical operating data at the second moment in historical operating data is the first historical operation number in the first historical operating data According to.
Specifically, if historical operating data and second moment at the first moment in the first historical operating data of same class Historical operating data correspond to identical field, primary server can be by the corresponding operation information of the historical operating data at the first moment Cover the corresponding operation information of historical operating data at the second moment.The corresponding operation information of historical operating data may include history The corresponding operational motion of operation data and the corresponding operation content of historical operating data.In the specific implementation, primary server is by first The corresponding operation content of the historical operating data at moment covers the corresponding operation content of historical operating data at the second moment;Main clothes The corresponding operational motion of the historical operating data at the first moment is covered the corresponding behaviour of historical operating data at the second moment by business device It acts.
Step S311:The historical operating data at the first moment in the first historical operating data of same class is merged into second In the historical operating data at moment.
Specifically, above-mentioned first moment is later than above-mentioned second moment, it will be appreciated that, in above-mentioned first historical operating data The historical operating data at the first moment is the posterior historical operating data in the first historical operating data;Similarly, above-mentioned first The historical operating data at the second moment in historical operating data is the first historical operation number in the first historical operating data According to.
Specifically, if historical operating data and second moment at the first moment in the first historical operating data of same class Historical operating data do not correspond to identical field, primary server can be by the operating time successively by same class the first historical operation number The historical operating data at above-mentioned first moment in is merged into above-mentioned second moment in the first historical operating data of same class Historical operating data in respectively obtain the final datas of all kinds of first historical operating datas.
Optimal, the merging for the first historical operating data of same class, primary server can be successive by the operating time, from It is combined to the historical operating data in first historical operating data to obtain same step number in an iterative manner forward afterwards According to.In the specific implementation, iterative merging process can be found in Fig. 4, wherein historical operating data 401 is the first history of same class The historical operating data successively arranged by the operating time in operation data, 403 be the merging of historical operating data shown in 401 As a result, 405 be time shaft;The initial value merged for the first time can be the historical operating data from reference time at the time of nearest, i.e., " N " in Fig. 4, the result merged for the first time are " merging 1 ";The initial value that " merging 1 " merges as second, second of merging Result be " merge 2 ";The initial value that " merging 2 " merges as third time, the result that third time merges are " merging 3 ";According to this Repeatedly, final amalgamation result, the as final data of the first historical operating data of same class finally can be obtained.
It should be noted that the direct operation object of the operational motions such as " addition " or " modification " in historical operating data is industry Field in data of being engaged in, but the direct operation object of " deletion " this operation movement in historical operating data is business number According to, then in the first historical operating data of same class, if the operational motion of posterior historical operating data be " deletion ", can Directly the historical operation record before the posterior historical operating data is all deleted;Correspondingly, if being received from server To synchrodata in there are operational motion be " deletion " historical operating data, the historical operation number is directly deleted from server According to corresponding business datum.For example, the operational motion of the historical operating data A of moment T1 is to word for same business datum " modification " of section T, operation content are " abc ", and the operational motion of the historical operating data B of moment T2 is " deletion ", wherein the moment T2 is later than moment T1, then directly deletes at the time of the business datum corresponds to the historical operating data of T2 and complete before moment T2 Portion's historical operating data.Example is only a kind of implementation of the embodiment of the present invention, can not be answered with difference in actual use It constitutes and limits.
In the specific implementation, iterative merging process shown in Fig. 4 can be:
Newly-built the first container is used to store by the historical operation number in the first historical operating data of same class shown in 401 According to, newly-built second container be used to store 401 shown in historical operating data in the first historical operating data of same class it is current Amalgamation result 403.
Newest historical operating data is taken out from the first container;
Judge in second container whether to be empty, if second container is sky, newest is gone through what is taken out in the first container History operation data is put into second container;If second container is not sky, the data in second container are taken out and are held with first The newest historical operating data taken out in device merges, if two parts of data have identical field in merging process, with most The field for the data taken out in the field covering second container of new historical operating data, newest historical operating data The operation information for the data taken out in operation information covering second container;
Then amalgamation result is reentered into second container, waits merge next time;
It repeats the above process until the historical operating data in the first container is fully completed merging, is then stored in second container Data be the whole historical operating datas initially stored in the first container amalgamation result.
It should be noted that iterative merging process shown in Fig. 4 is only a kind of history provided in an embodiment of the present invention The merging mode of operation data can also realize the merging of historical operating data in practical application by non-iterative mode, When the corresponding operational motion of posterior historical operating data is " deletion ", then going through before directly deleting the historical operating data History operation data, here with no restriction.
Step S313:The final data for being packaged all kinds of first historical operating datas is synchrodata.
Specifically, primary server can be by the final number of all kinds of first historical operating datas of sequencing tissue of operating time According to the data packet for forming synchrodata.
Step S315:Synchrodata is sent extremely from server.
Specifically, specific implementation can be found in the content in step S107.
It is the structural schematic diagram for the primary server that a kind of embodiment of the invention provides referring to Fig. 5.Master as shown in Figure 5 Server 50 can include at least:Synchronization request receiving module 501, filtering module 503, merging module 505 and synchrodata hair Send module 507.Wherein:
Synchronization request receiving module 501, for receiving the synchronization request from server;Synchronization request includes business datum mark Know, reference time;
Filtering module 503, for filtering whole historical operation numbers in historical operating data library according to the synchronization request According to the business datum obtained in the synchronization request identifies corresponding first historical operating data;The first historical operation number The corresponding historical operating data for being later than the reference time is identified according to for the business datum;
Merging module 505, for successive by the operating time, by going through for the first moment in first historical operating data The historical operating data at the second moment that history operation data is merged into first historical operating data obtains synchrodata; First moment is later than second moment;
Synchrodata sending module 507, for returning to synchrodata extremely from server.
Specifically, merging module 505 can be specifically successive by the operating time, from back to front in an iterative manner by described first Historical operating data in historical operating data is combined to obtain synchrodata.
Further, in the specific implementation, filtering module 503 can include the first filtering module 5031 and second as shown in Figure 6 Filtering module 5033.Wherein:
First filtering module 5031 is late for being filtered out in whole historical operating datas according to the reference time In the historical operating data of the reference time;
Second filtering module 5033, for being identified according to the business datum in the history for being later than the reference time Filtering out the business datum in operation data and identifying the corresponding historical operating data for being later than the reference time is described the One historical operating data.
Further, in the specific implementation, merging module 505 can include as shown in Figure 7:Categorization module 5051, history behaviour Make merging module 5053 and packetization module 5055.Wherein:
Categorization module 5051, for corresponding first historical operating data of synchronization request to be classified by business datum mark;
Historical operation merging module 5053, for pressing the operating time successively by the institute in the first historical operating data of same class State going through for second moment that the historical operating data at the first moment is merged into first historical operating data of same class The final data of all kinds of first historical operating datas is respectively obtained in history operation data;Packetization module 5055, it is each for being packaged The final data of the first historical operating data of class is synchrodata.
Packetization module 5055 can be specifically by the final of all kinds of first historical operating datas of sequencing tissue of operating time The data packet of data formation synchrodata.
It is the structural schematic diagram for the primary server that another embodiment of the invention provides referring to Fig. 8.Further, more Detailed to show the structure of primary server 50, primary server 50 as shown in Figure 8 includes:Synchronization request receiving module 501, mistake It filters outside module 503, merging module 505 and synchrodata sending module 507, may also include attachment handling module 509.Wherein:
Attachment handling module 509, for returning to the synchrodata extremely before server, if wrapped in synchrodata When containing accessory information, then generates download address for the corresponding attachment of the accessory information, and returns to download address extremely from server.
It is the structural schematic diagram for the primary server that the third embodiment of the invention provides referring to Fig. 9.Further, more Detailed to show the structure of primary server 50, primary server 50 as shown in Figure 9 includes:Synchronization request receiving module 501, mistake It filters outside module 503, merging module 505 and synchrodata sending module 507, may also include overlay module 511.Wherein:
Overlay module 511, for historical operation merging module 5053 execute it is described by the operating time successively by same class The historical operating data at first moment in the first historical operating data is merged into the first historical operation of same class number The final data of all kinds of first historical operating datas is respectively obtained in the historical operating data at second moment in When step, if the historical operating data and described second at first moment in the first historical operating data of the same class The historical operating data at moment corresponds to identical field, then by the corresponding operation information of historical operating data at first moment Cover the corresponding operation information of historical operating data at second moment.
Further, overlay module 511 can also include as shown in Figure 10:Operation content overlay module 5111 and operational motion Overlay module 5113.Wherein:
Operation content overlay module 5111, for covering the corresponding operation content of historical operating data at first moment Cover the corresponding operation content of historical operating data at second moment;
Operational motion overlay module 5113, for covering the corresponding operational motion of historical operating data at first moment Cover the corresponding operational motion of historical operating data at second moment.
It is the structural schematic diagram for the primary server that the 4th kind of embodiment of the invention provides referring to Figure 11.Further, more Detailed to show the structure of primary server 50, primary server 50 as shown in figure 11 includes:Synchronization request receiving module 501, Outside filtering module 503, merging module 505, synchrodata sending module 507 and attachment handling module 509, it may also include downloading Processing module 513.Wherein:
Download process module 513 connects for returning to download address to after server in attachment handling module 509 It receives to download from the attachment of server and request;The corresponding attachment of download address is sent extremely from server.
It is the structural schematic diagram for the slave server that an embodiment of the present invention provides referring to Figure 12.It is as shown in figure 12 from Server 60 can include at least:Synchronization request module 601, synchrodata receiving module 603 and update module 605.Wherein:
Synchronization request module 601, for sending synchronization request to primary server;Synchronization request includes business datum mark, Reference time;
Synchrodata receiving module 603, for receiving the synchrodata of primary server transmission;Synchrodata is to be later than reference The business datum of time identifies corresponding historical operating data;
Update module 605, for updating local data base according to synchrodata.
Further, update module 605 can include as shown in figure 13:Business datum locating module 6051 and business datum are more New module 6053.Wherein:
Business datum locating module 6051, it is corresponding for finding the historical operating data in synchrodata in local data base Business datum;
Service data updating module 6053, for according in synchrodata the corresponding operational motion of historical operating data and The corresponding operation content of historical operating data updates the corresponding business datum of historical operating data.
Further, service data updating module 6053 can include as shown in figure 14:First update module 60531, Two update modules 60533 and third update module 60535.Wherein:
First update module 60531, if being to delete for the corresponding operational motion of historical operating data in synchrodata Except movement, then the corresponding business datum of historical operating data is deleted;Or
Second update module 60533, if being to add for the corresponding operational motion of historical operating data in synchrodata Add movement, then the corresponding field of historical operating data is added in the corresponding business datum of historical operating data;Or
Third update module 60535, if being to repair for the corresponding operational motion of historical operating data in synchrodata Change is made, then by the field in the corresponding business datum of the corresponding field covering historical operating data of historical operating data.
It is the structural schematic diagram for the slave server that another embodiment of the invention provides referring to Figure 15.Further, more in detail The thin structure elaborated from server 60, slave server 60 as shown in figure 15 include:Synchronization request module 601, same to step number Outside according to receiving module 603 and update module 605, it may also include:Logging modle 607.Wherein:
Logging modle 607, for after update module 605 updates local data base according to synchrodata, record to update The time of completion;The time that the update is completed is used as the reference time of next synchronizing cycle.
It is the structural schematic diagram for the slave server that the third embodiment of the invention provides referring to Figure 16.Further, more in detail The thin structure elaborated from server 60, slave server 60 as shown in figure 16 include:Synchronization request module 601, same to step number Outside according to receiving module 603 and update module 605, it may also include:Download module 609.Wherein:
Download module 609, for synchrodata receiving module 603 receive primary server send synchrodata after, If in synchrodata including the download address of attachment, primary server is downloaded request to according to download address transmission;From main clothes Business device downloads the corresponding attachment of the download address.
Correspondingly, the embodiment of the invention also provides the system for implementing above scheme, including primary server and from server, Wherein:
The primary server can be the primary server 50 in any one embodiment of above-mentioned Fig. 5 to Figure 11;
This from server can be the slave server 60 in any one embodiment of above-mentioned Figure 12 to Figure 16.
In conclusion by implementing the embodiment of the present invention, primary server is received from the synchronization request of server, according to from clothes The synchronization request of business device filters historical operating data to obtain the corresponding historical operating data of the synchronization request, merges the synchronization and asks Corresponding historical operating data is sought to obtain the synchrodata from server, the synchrodata is sent to from server, can reduce Primary server can reduce volume of transmitted data when simultaneously operating to the simultaneously operating from server, to improve synchronous efficiency, save About Internet resources.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the program can be stored in a computer-readable storage medium In, the program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, the storage medium can be magnetic Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access Memory, RAM) etc..
Above disclosed is only a preferred embodiment of the present invention, cannot limit the power of the present invention with this certainly Sharp range, those skilled in the art can understand all or part of the processes for realizing the above embodiment, and weighs according to the present invention Benefit requires made equivalent variations, still belongs to the scope covered by the invention.

Claims (27)

1. a kind of database synchronization method, which is characterized in that including:
Receive the synchronization request from server;The synchronization request includes business datum mark, reference time;The business datum Mark includes multiple subservice Data Identifications;
Whole historical operating datas in historical operating data library are filtered according to the synchronization request, obtain the synchronization request pair The first historical operating data answered;First historical operating data, which is that business datum mark is corresponding, is later than the reference time Historical operating data;
First historical operating data is classified by the subservice Data Identification;By the operating time successively by same class first The historical operating data at the first moment in historical operating data is merged into first historical operating data of same class The final data of all kinds of first historical operating datas is respectively obtained in the historical operating data at two moment;It is packaged described all kinds of The final data of one historical operating data is the synchrodata;First moment is later than second moment;
The synchrodata is returned to described from server;
Wherein, the historical operating data includes:To the content of operation and the operation that business datum carries out.
2. the method as described in claim 1, which is characterized in that it is described successive by the operating time, by first historical operation The historical operating data at the first moment in data is merged into the history behaviour at the second moment in first historical operating data Synchrodata is obtained as data includes:It is successive by the operating time, first history is grasped in an iterative manner from back to front Make the historical operating data in data to be combined to obtain synchrodata.
3. the method as described in claim 1, which is characterized in that described to filter historical operating data library according to the synchronization request In whole historical operating datas, obtaining corresponding first historical operating data of the synchronization request includes:
The historical operation for being later than the reference time is filtered out in whole historical operating datas according to the reference time Data;
The business is filtered out in the historical operating data for being later than the reference time according to business datum mark The corresponding historical operating data for being later than the reference time of Data Identification is first historical operating data.
4. the method as described in claim 1, which is characterized in that it is described return the synchrodata to it is described from server it Before, if in the synchrodata include accessory information, download address is generated for the corresponding attachment of the accessory information, and The download address is returned to described from server.
5. the method as described in claim 1, which is characterized in that successively grasp the first history of same class by the operating time described Make first moment in data historical operating data be merged into it is described in first historical operating data of same class When in the historical operating data at the second moment,
If the historical operating data at first moment in first historical operating data of same class is with described second The historical operating data at quarter corresponds to identical field, then covers the corresponding operation information of historical operating data at first moment Cover the corresponding operation information of historical operating data at second moment.
6. the method as described in claim 1, which is characterized in that described to be packaged the final of all kinds of first historical operating datas Data are that the synchrodata includes:All kinds of first historical operating datas is final described in sequencing tissue by the operating time Data form the data packet of the synchrodata.
7. method as claimed in claim 4, which is characterized in that it is described return the download address to it is described from server it Afterwards, including:
Described download from the attachment of server is received to request;
The corresponding attachment of the download address is sent to described from server.
8. method as claimed in claim 5, which is characterized in that the corresponding operation information of the historical operating data includes history The corresponding operation content of operation data and the corresponding operational motion of historical operating data;By the historical operation number at first moment Include according to the corresponding operation information of historical operating data that corresponding operation information covers second moment:
The corresponding operation content of historical operating data at first moment is covered to the historical operating data at second moment Corresponding operation content;
The corresponding operational motion of historical operating data at first moment is covered to the historical operating data at second moment Corresponding operational motion.
9. a kind of database synchronization method, which is characterized in that including:
Sending synchronization request described in synchronization request to primary server includes business datum mark, reference time;The business datum Mark includes multiple subservice Data Identifications;
Receive the synchrodata that primary server is sent;The synchrodata is that the final data of all kinds of first historical operating datas is beaten Packet obtains, and first historical operating data is classified by the subservice Data Identification;All kinds of first historical operation numbers According to final data be successively to grasp the history at the first moment in the first historical operating data described in same class by the operating time It is respectively obtained in the historical operating data at the second moment being merged into first historical operating data of same class as data; First historical operating data is that business datum identifies the corresponding historical operating data for being later than the reference time;Described One moment was later than second moment;
Local data base is updated according to the synchrodata.
10. method as claimed in claim 9, which is characterized in that described to update local data base packet according to the synchrodata It includes:
The corresponding business datum of historical operating data in the synchrodata is found in the local data base;
According in the corresponding operational motion of historical operating data and the corresponding operation of historical operating data in the synchrodata Hold to update the corresponding business datum of the historical operating data.
11. method as claimed in claim 9, which is characterized in that update local data base according to the synchrodata described Later, the time for updating and completing is recorded;It is described to update reference time of the time as next synchronizing cycle completed.
12. method as claimed in claim 9, which is characterized in that after the synchrodata that the reception primary server is sent, If in the synchrodata including the download address of attachment, the main service is downloaded request to according to download address transmission Device;The corresponding attachment of the download address is downloaded from the primary server.
13. method as claimed in claim 10, which is characterized in that the historical operating data according in the synchrodata Corresponding operational motion and the corresponding operation content of historical operating data update the corresponding business number of the historical operating data According to including:
If the corresponding operational motion of historical operating data in the synchrodata is deletion movement, by the historical operation The corresponding business datum of data is deleted;Or
If the corresponding operational motion of historical operating data in the synchrodata is addition movement, by the historical operation The corresponding field of data is added in the corresponding business datum of the historical operating data;Or
If the corresponding operational motion of historical operating data in the synchrodata is modification movement, by the historical operation The corresponding field of data covers the field in the corresponding business datum of the historical operating data.
14. a kind of primary server of database synchronization, which is characterized in that including:
Synchronization request receiving module, for receiving the synchronization request from server;The synchronization request includes business datum mark, Reference time;The business datum mark includes multiple subservice Data Identifications;
Filtering module is obtained for filtering whole historical operating datas in historical operating data library according to the synchronization request Business datum in the synchronization request identifies corresponding first historical operating data;First historical operating data is described Business datum identifies the corresponding historical operating data for being later than the reference time;
Merging module, for successive by the operating time, by the historical operation at the first moment in first historical operating data The historical operating data at the second moment that data are merged into first historical operating data obtains synchrodata;Described One moment was later than second moment;
The merging module includes categorization module, historical operation merging module and packetization module, wherein:The categorization module is used In by first historical operating data by the subservice Data Identification classify;The historical operation merging module, for pressing The historical operating data at first moment in the first historical operating data of same class is successively merged into described by the operating time All kinds of first history are respectively obtained in the historical operating data at second moment in the first historical operating data of same class The final data of operation data;The packetization module, the final data for being packaged all kinds of first historical operating datas are The synchrodata;Synchrodata sending module, for returning to the synchrodata to described from server;
Wherein, the historical operating data includes:To the content of operation and the operation that business datum carries out.
15. primary server as claimed in claim 14, which is characterized in that the merging module is specifically used for first by the operating time Afterwards, in an iterative manner the historical operating data in first historical operating data is combined to obtain together from back to front Step data.
16. primary server as claimed in claim 14, which is characterized in that the filtering module includes:
First filtering module is later than the ginseng for filtering out in whole historical operating datas according to the reference time According to the historical operating data of time;
Second filtering module, for being identified according to the business datum in the historical operating data for being later than the reference time In filter out the business datum identify the corresponding historical operating data for being later than the reference time for first history behaviour Make data.
17. primary server as claimed in claim 14, which is characterized in that further include attachment handling module, for being returned described The synchrodata is returned to described before server, is described attached in the synchrodata if include accessory information The corresponding attachment of part information generates download address, and returns to the download address to described from server.
18. primary server as claimed in claim 14, which is characterized in that further include overlay module, for being grasped in the history It is described by the operating time successively going through first moment in the first historical operating data of same class to make merging module execution History operation data is merged into the historical operating data at second moment in first historical operating data of same class When respectively obtaining the step of the final data of all kinds of first historical operating datas,
If the historical operating data at first moment in first historical operating data of same class is with described second The historical operating data at quarter corresponds to identical field, then covers the corresponding operation information of historical operating data at first moment Cover the corresponding operation information of historical operating data at second moment.
19. primary server as claimed in claim 14, which is characterized in that the packetization module was specifically used for by the operating time The final data of all kinds of first historical operating datas described in sequencing tissue forms the data packet of the synchrodata.
20. primary server as claimed in claim 17, which is characterized in that further include download process module, for described attached Part processing module execute it is described return the download address to it is described from server the step of after, receive described from server Attachment downloading request;The corresponding attachment of the download address is sent to described from server.
21. primary server as claimed in claim 18, which is characterized in that the overlay module includes:
Operation content overlay module, for by the historical operating data at first moment corresponding operation content covering described the The corresponding operation content of the historical operating data at two moment;
Operational motion overlay module, for by the historical operating data at first moment corresponding operational motion covering described the The corresponding operational motion of the historical operating data at two moment.
22. a kind of slave server of database synchronization, which is characterized in that including:
Synchronization request module, for sending synchronization request to primary server;The synchronization request includes business datum mark, reference Time;The business datum mark includes multiple subservice Data Identifications;
Synchrodata receiving module, for receiving the synchrodata of primary server transmission;The synchrodata is gone through for all kinds of first The final data of history operation data is packaged to obtain, and first historical operating data is classified by the subservice Data Identification; The final data of all kinds of first historical operating datas is by the operating time successively by the first historical operation number described in same class The second moment that the historical operating data at the first moment in is merged into first historical operating data of same class is gone through It is respectively obtained in history operation data;When first historical operating data is later than the reference for business datum mark is corresponding Between historical operating data;First moment is later than second moment;
Update module, for updating local data base according to the synchrodata.
23. as claimed in claim 22 from server, which is characterized in that the update module includes:
Business datum locating module, it is corresponding for finding the historical operating data in the synchrodata in the local data base Business datum;
Service data updating module, for according to the corresponding operational motion of historical operating data and history in the synchrodata The corresponding operation content of operation data updates the corresponding business datum of the historical operating data.
24. as claimed in claim 22 from server, which is characterized in that further include:Logging modle, in the update mould After block executes described the step of updating local data base according to the synchrodata, the time for updating and completing is recorded;Institute State reference time of the time as next synchronizing cycle for updating and completing.
25. as claimed in claim 22 from server, which is characterized in that further include download module, in the same step number After the step of executing the synchrodata of the reception primary server transmission according to receiving module, if including in the synchrodata The download address of attachment downloads request to the primary server according to download address transmission;It is downloaded from the primary server The corresponding attachment of the download address.
26. as claimed in claim 23 from server, which is characterized in that the service data updating module includes:
First update module, if being to delete to move for the corresponding operational motion of historical operating data in the synchrodata Make, then deletes the corresponding business datum of the historical operating data;Or
Second update module, if being that addition is dynamic for the corresponding operational motion of historical operating data in the synchrodata Make, then the corresponding field of the historical operating data is added in the corresponding business datum of the historical operating data;Or
Third update module, if being that modification is dynamic for the corresponding operational motion of historical operating data in the synchrodata Make, then the corresponding field of the historical operating data is covered to the word in the corresponding business datum of the historical operating data Section.
27. a kind of system of database synchronization, which is characterized in that including primary server and from server, wherein:
The primary server is the primary server of the described in any item database synchronizations of claim 14-21;
It is described from server be the described in any item database synchronizations of claim 22-26 slave server.
CN201410474391.0A 2014-09-17 2014-09-17 A kind of database synchronization method, server and system Active CN104270424B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410474391.0A CN104270424B (en) 2014-09-17 2014-09-17 A kind of database synchronization method, server and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410474391.0A CN104270424B (en) 2014-09-17 2014-09-17 A kind of database synchronization method, server and system

Publications (2)

Publication Number Publication Date
CN104270424A CN104270424A (en) 2015-01-07
CN104270424B true CN104270424B (en) 2018-11-27

Family

ID=52161913

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410474391.0A Active CN104270424B (en) 2014-09-17 2014-09-17 A kind of database synchronization method, server and system

Country Status (1)

Country Link
CN (1) CN104270424B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105427147B (en) * 2015-10-30 2019-12-03 网易(杭州)网络有限公司 Method of data synchronization and device and game system based on game time shelves
CN105260486A (en) * 2015-11-23 2016-01-20 郑州悉知信息科技股份有限公司 Data processing method, device and system
CN105354681A (en) * 2015-11-26 2016-02-24 新疆信息产业有限责任公司 Method for automatically studying, judging and correcting acquisition file of marketing acquisition interface data
CN107819795A (en) * 2016-09-12 2018-03-20 北京金山云网络技术有限公司 A kind of major-minor server data synchronous method of DNS, apparatus and system
CN107798127A (en) * 2017-11-14 2018-03-13 中国银行股份有限公司 A kind of method of data synchronization and device of bank's mainframe and personal computer
CN110674214B (en) * 2019-09-06 2023-11-21 中国平安财产保险股份有限公司 Big data synchronization method, device, computer equipment and storage medium
CN111522789A (en) * 2020-04-20 2020-08-11 京东数字科技控股有限公司 Log replication method and device for master server and slave server and log storage system
CN111897880B (en) * 2020-09-30 2020-12-29 腾讯科技(深圳)有限公司 Database synchronization method and device, terminal equipment and storage medium
CN115037729B (en) * 2022-04-21 2024-05-28 中国建设银行股份有限公司 Data aggregation method, device, electronic equipment and computer readable medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101594256A (en) * 2009-06-05 2009-12-02 成都市华为赛门铁克科技有限公司 Disaster recovery method, device and system
CN102483715A (en) * 2009-09-04 2012-05-30 Kii株式会社 Data synchronization system and data synchronization method
CN103442042A (en) * 2013-08-14 2013-12-11 福建天晴数码有限公司 Incremental data synchronization method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101594256A (en) * 2009-06-05 2009-12-02 成都市华为赛门铁克科技有限公司 Disaster recovery method, device and system
CN102483715A (en) * 2009-09-04 2012-05-30 Kii株式会社 Data synchronization system and data synchronization method
CN103442042A (en) * 2013-08-14 2013-12-11 福建天晴数码有限公司 Incremental data synchronization method and system

Also Published As

Publication number Publication date
CN104270424A (en) 2015-01-07

Similar Documents

Publication Publication Date Title
CN104270424B (en) A kind of database synchronization method, server and system
CN107908542B (en) Test case creating method and device, computer equipment and storage medium
CN109117425A (en) Management is stored as the digital asset of component and packaging file
CN104809201B (en) A kind of method and apparatus of database synchronization
CN105302895B (en) A kind of data cache synchronization method, server and client side
CN109101622A (en) Method of data synchronization, calculates equipment and computer storage medium at device
CN106610854A (en) Model update method and device
CN106202123B (en) The method and apparatus of gray scale publication
CN108536752A (en) A kind of method of data synchronization, device and equipment
CN106407115B (en) The test method and device of fine arts resource file
CN104426955A (en) Processing method of shared file, and cloud storage server
CN106775498A (en) A kind of data cached synchronous method and system
CN111752640A (en) Cloud service-based computer software installation-free method, device and system
CN109976942A (en) A kind of data backup and resume method, backup server and source server
CN110532021A (en) The processing method and processing device of the configuration file of dcs
CN104657164B (en) Software upgrading treating method and apparatus
CN103701653B (en) The processing method of a kind of interface hot plug configuration data and network configuration server
CN113687932A (en) Task scheduling method, device and system, electronic equipment and storage medium
CN113470263A (en) Quick storage and taking method and device for intelligent cabinet
CN102026228A (en) Statistical method and equipment for communication network performance data
CN110445843A (en) Parallel chain block method for pushing, equipment and storage medium
CN110209680A (en) Data-updating method, device and electronic device based on Hive external table
CN107968812A (en) The method and device of synchronous local resource and Internet resources
CN106210751A (en) The method and system of internet video live broadcasting data hierarchy transmission
CN113297322A (en) Data synchronization method, system and device

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