Method and system for data synchronization between multiple servers

A data synchronization, multi-server technology, applied in the database field, can solve the problem of inability to synchronize transmission efficiency in time, and achieve the effect of ensuring performance

Active Publication Date: 2009-05-06
北京六维世纪网络技术有限公司
View PDF0 Cites 36 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] In view of this, the object of the present invention is to provide a method and system for synchronizing data between multiple servers to solve the problems of inability to synchronize in time and low transmission efficiency in the prior art

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and system for data synchronization between multiple servers
  • Method and system for data synchronization between multiple servers
  • Method and system for data synchronization between multiple servers

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0075] Embodiment one, see Figure 4 , when updating data, the method provided by the present invention includes the following steps:

[0076] S401: Update a piece of data marked as 1 in the type A data of the source server;

[0077] S402: The program updates A_SYNC, or inserts the record in the first row of Table 1 into A_SYNC;

[0078] S403: The sending program reads the A_SYNC table every 1 minute, and finds that the version number of the source server is inconsistent with the version number of the target server, indicating that the data of this item has not been synchronized.

[0079] S404: The sending program sends the piece of data marked as 1 to the receiving port of the target server.

[0080] S405: The receiving end receives the data, and the program executes the update program, and writes the data marked as 1 into the database.

[0081] S406: The program judges that the number of affected data items is 1, and the program returns a value of 1, indicating that the u...

Embodiment 2

[0086] Embodiment two, see Figure 5 , when inserting data, the method provided by the present invention includes the following steps:

[0087] S501: Insert a piece of data marked as 1 into the type A data of the source server.

[0088] S502: The program updates A_SYNC, or inserts the record in the first row of Table 1 into A_SYNC.

[0089] S503: on the target server side, the program first performs a data update operation.

[0090] S504: If the update operation fails, the return value of the program is 0 (because the target server does not have this piece of data, the number of affected data pieces in the target server is 0 when the update operation is performed).

[0091] S505: The program judges that the insert operation needs to be performed based on the return value of 0, and adds the data marked as 1 to the database of the target server.

[0092] S506: Judging by the program that the number of affected data items in the target server is 1, the program returns a value ...

Embodiment 3

[0095] Embodiment three, refer to Image 6 , when deleting data, the method provided by the invention comprises the following steps:

[0096] S601: Delete a piece of data marked as 3 in data table A of the source server.

[0097] S602: The program updates A_SYNC, or inserts the record in the third row of Table 1 into the A_SYNC table.

[0098]S603: The sending program reads the A_SYNC table every 1 minute, and finds that the version number of the source server is inconsistent with the version number of the target server, indicating that the data of this item has not been synchronized.

[0099] S604: The sending program sends the piece of data identified as 3 to the receiving port of the target server.

[0100] S605: The program reads the data marked as 3, and finds that the version number of the source server is -1, executes a corresponding deletion program, and deletes the data marked as 3 from the database of the target server.

[0101] S606: Return success information if...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a method for synchronizing data of servers. The method comprises: source server establishes edition tracking table for data needed to be synchronized; adds records about the change in corresponding edition tracking table; transmits the changed data to target server according to recording of edition tracking table and target server performs data synchronization utilizing received changed data. The invention also discloses a data synchronization system for multiple servers. In the invention, synchronizing table records database change in real time, and synchronizes changed data in database among multiple servers, thereby implementing data synchronization timeliness and high efficiency among multiple servers.

Description

technical field [0001] The invention relates to the technical field of databases, in particular to a method and system for synchronizing data between servers. Background technique [0002] With the continuous development of Internet technology, the network has penetrated into thousands of households. In order to facilitate users as much as possible and improve network speed, Internet companies as service providers will set up multiple partition servers in different regions in addition to the central server. Each server is responsible for maintaining information in each region. In order to be able to share information in the distributed environment, so that all data used (running) distributed in each partition server can be highly integrated, coordinated, and shared. to sync. That is to say, when the data on a server changes, the central server also needs to make the same change to ensure that users see the latest and fastest information no matter when and where. In this p...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): H04L29/08
Inventor 蒋亚洪
Owner 北京六维世纪网络技术有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products