File Synchronization Using Extracted Operation Records
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current file synchronization methods are inefficient due to high network resource consumption and bandwidth pressure, particularly when dealing with large directory structures, as they often require multiple interactions with the server and extensive data transfer.
Innovation Solution
A file synchronization method that involves a server searching for operation records generated after the terminal's last synchronization and sending only the necessary data to the terminal, which then performs the required operations without traversing the directory structure, using basic operation records of ADD or DELETE to reduce redundant data and improve efficiency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If the terminal queries the server for directory structure and compares layer by layer, then the synchronization is accurate, but the synchronization time is relatively long
Solution Approach 1:
The patent extracts only the operation records (ADD, DELETE operations) from the complete directory structure and transmits them separately. This allows the terminal to synchronize by applying only these extracted operation records without comparing the entire directory structure layer by layer, thus maintaining synchronization accuracy while significantly reducing synchronization time.
Solution Approach 2:
The patent segments the directory structure comparison into two parts: (1) transmitting operation records that capture all changes, and (2) applying these records at the terminal. This segmentation eliminates the need for the terminal to perform time-consuming layer-by-layer comparison while ensuring complete and accurate synchronization of all file changes.
2Loss of information
If the terminal downloads the directory structure from the server, then the terminal has complete file information, but the bandwidth pressure increases and synchronization time increases
Solution Approach 1:
The patent extracts only the essential operation records (ADD, DELETE operations with path information) from the complete directory structure and transmits them separately. This extraction approach ensures the terminal receives complete file change information while minimizing bandwidth consumption by excluding redundant directory structure data.
3Reliability
If multiple interactions are performed with the server for synchronization, then the file synchronization is thorough, but the network resource consumption increases
Solution Approach 1:
The patent performs preliminary action by generating and transmitting operation records that capture all file changes (ADD, DELETE operations) before the terminal needs to synchronize. The terminal then applies these pre-prepared operation records locally without needing multiple interactive queries to the server, ensuring thorough synchronization while minimizing network resource consumption.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
The present application provides a file synchronization method, a server, and a terminal. The method includes: receiving a file synchronization request sent by a terminal; responding to the file synchronization request, and searching data that is of various versions of the file and stored in a server for first record data, where the first record data includes an operation record generated for the file of a predetermined version after the terminal last synchronized the file; and sending the first record data to the terminal, so that the terminal obtains, according to the first record data and second record data in the terminal, an operation that should be performed by the terminal, where the second record data includes an operation record of operations performed on the file after the terminal last synchronized the file. According to the present application, a time for file synchronization can be shortened, consumption of a network resource can be reduced, and synchronization efficiency can be improved.