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
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
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...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com