The invention discloses a mobile terminal offline bidirectional
data synchronization method and
system, and relates to the technical field of
data synchronization processing, and the method comprises the following steps: initializing a whole table synchronization mechanism, and establishing a file mapping structure; a user performs data operation in an offline state, records data operation details and stores the data operation details in a local cache; when the
network connection is recovered, a whole table synchronization mechanism is started,
data compression and partitioning are performed, a synchronization request is sent to a
server, and segmented
data transmission is performed; after receiving the data, the
server performs data storage and management by using a file mapping mechanism; detecting potential conflicts by utilizing a multi-version parallel management mechanism, carrying out conflict resolution, merging data with local data after the conflict resolution, and confirming that synchronization is completed to a
server; after it is confirmed that all data are synchronized, local and global timestamps are updated, and meanwhile, the optimal
thread count is dynamically determined by adopting a multi-thread technology. According to the invention, the efficiency, reliability and accuracy of
data synchronization of the mobile terminal are remarkably improved.