File Synchronization via Bidirectional Snapshot Comparison
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing file synchronization technologies lack the capability for two-way synchronization between a terminal and a server, where updates on one device do not automatically propagate to the other, limiting the efficiency of file management across different terminals and locations.
Innovation Solution
A method and device for file synchronization that involves acquiring and comparing file list snapshots on both the terminal and server, determining the update operations, and performing synchronization based on identified operations to ensure bidirectional synchronization.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If full scanning is performed on the local synchronization directory to determine file update states, then file update detection is achieved, but two-way synchronization between terminal and server cannot be implemented
Solution Approach 1:
The patent segments the synchronization process into two independent directions: terminal-to-server synchronization and server-to-terminal synchronization. Each direction operates with its own scanning and comparison mechanism, allowing both to function simultaneously without interference. The terminal performs local scanning to detect changes, while the server independently scans and pushes changes to the terminal, achieving bidirectional synchronization capability.
Solution Approach 2:
The patent introduces a snapshot comparison mechanism as an intermediary between the terminal and server. Instead of direct bidirectional communication that would be complex to coordinate, the system uses file list snapshots as intermediaries. The terminal sends its snapshot to the server, and the server sends its snapshot to the terminal, allowing both parties to independently determine their update states and perform synchronization without direct real-time coordination.
2Reliability
If the terminal sends all file information to the server for authentication, then file update state determination is achieved, but synchronization efficiency is reduced
Solution Approach 1:
The patent extracts only the necessary authentication information from complete file data. Instead of transmitting all file information (content, metadata, permissions, etc.), the system extracts and transmits only file list snapshots containing essential identifiers and change indicators. This extraction approach maintains authentication reliability while dramatically reducing transmission overhead and improving synchronization efficiency.
Solution Approach 2:
The patent applies partial action by transmitting only the portion of file information necessary for update detection - specifically, file list snapshots with change indicators - rather than complete file data. The server performs authentication based on this partial information, which is sufficient for determining update states without requiring full file transmission, thus improving efficiency while maintaining reliability.
3Reliability
If the server maintains comprehensive file information for synchronization, then file update tracking is improved, but server storage and processing burden increases
Solution Approach 1:
The patent uses copying by creating and transmitting lightweight snapshots of file lists rather than maintaining or transmitting complete file data. These snapshots are copies containing only essential information (file identifiers, change indicators, timestamps) needed for update tracking. The server stores and processes these compact snapshot copies instead of comprehensive file information, reducing storage requirements and processing burden while maintaining sufficient tracking accuracy.
Data Source
Figure 1
Figure 2~3
AI summary
The present invention relates to the field of communications technologies, and in particular, to a file synchronization method and device. The file synchronization method includes: acquiring a first file list snapshot, where the first file list snapshot includes information of a local file list stored when last synchronization ends; comparing the first file list snapshot with information of the current local file list to acquire a second file list snapshot, where the second file list snapshot includes an update operation of the current local file list; sending a file list snapshot request to a server; receiving a third file list snapshot sent by the server, where the third file list snapshot includes information of a file list of the server; and determining, according to the second file list snapshot and the third file list snapshot, an identifier and an operation of a file to be synchronized, and performing file synchronization with the server according to the identifier and the operation of the file to be synchronized. Through the present invention, two-way synchronization between a device for synchronization and the server can be implemented, thereby improving user experience.