Incremental synchronization method and device, equipment, storage medium and computer program product
By reading historical change identification and current file change events from the local database in the file synchronization method, the problem of slow synchronization speed in the existing technology is solved, and faster and timely file synchronization is achieved.
Patent Information
- Application Number
- CN202411998384.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-05-06
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing file synchronization method requires overall scanning of snapshot data from the cloud and local areas when starting the client, resulting in slow synchronization speed and untimely synchronization.
In response to the synchronization request, a historical change identification is read from the local database, the current file change event is read based on the identification, and the historical identification is updated according to the current change identification to perform file synchronization.
There is no need to scan the snapshot data in the cloud and on-premises, which improves file synchronization speed, reduces waiting time, and ensures timely updates of file versions.
Smart Images

Figure CN119938681A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an incremental synchronization method, apparatus, device, storage medium and computer program product. Background Art
[0002] At present, with the popularity of cloud computing and the growth of data storage demand, traditional local storage methods can no longer meet users' requirements for flexibility and real-time performance. However, the existing file synchronization methods need to scan the cloud and local snapshot data as a whole to calculate the file changes during the client shutdown each time the client is started, which has the defects of slow synchronization speed and untimely synchronization. Summary of the invention
[0003] The main purpose of the present application is to provide an incremental synchronization method, apparatus, device, storage medium and computer program product, which aims to solve the technical problem that the existing file synchronization method needs to scan the cloud and local snapshot data as a whole to calculate the changes of files during the period when the client is closed each time the client is started, resulting in slow synchronization speed and untimely synchronization.
[0004] To achieve the above object, the present application provides an incremental synchronization method, which includes:
[0005] In response to the synchronization request, reading a historical change identifier from a local database, wherein the historical change identifier is used to identify a historical file change event;
[0006] Reading the current file change event based on the historical change identifier;
[0007] The historical change identifier is updated according to the current change identifier corresponding to the current file change event, and the file corresponding to the current file change event is synchronized.
[0008] Optionally, reading the current file change event based on the historical change identifier includes:
[0009] Determining a target reading position based on the historical change identifier, wherein the target reading position is greater than a position of the historical change identifier;
[0010] The current file change event is read from the local computer and / or the cloud starting from the target reading position.
[0011] Optionally, the reading the current file change event from the local computer and / or the cloud starting from the target reading position includes:
[0012] Monitoring the current file change events in the local synchronization directory starting from the target read position through the local service;
[0013] And / or, receiving a cloud file change message from the target reading position through a cloud service to obtain a current file change event.
[0014] Optionally, receiving a cloud file change message from the target reading position through a cloud service to obtain a current file change event includes:
[0015] Receiving cloud file change messages starting from the target reading position through the cloud service;
[0016] If the cloud file change message is discontinuous, the message is re-pulled from the disconnected position to obtain the current file change event.
[0017] Optionally, if the cloud file change message is discontinuous, re-pulling the message from the disconnected position, before obtaining the current file change event, further includes:
[0018] Obtaining a change identifier in the cloud file change message;
[0019] Calculating the difference between the historical change identifier and the change identifier in the cloud file change message;
[0020] Whether the cloud file change messages are continuous is determined according to the difference.
[0021] Optionally, before updating the historical change identifier according to the current change identifier corresponding to the current file change event and synchronizing the file corresponding to the current file change event, the method further includes:
[0022] Detecting whether the synchronization record corresponding to the historical change identifier is overwritten;
[0023] Correspondingly, updating the historical change identifier according to the current change identifier corresponding to the current file change event, and synchronizing the file corresponding to the current file change event, includes:
[0024] If the synchronization record corresponding to the historical change identifier is not overwritten, the historical change identifier is updated according to the current change identifier corresponding to the current file change event, and the file corresponding to the current file change event is synchronized.
[0025] Optionally, after detecting whether the synchronization record corresponding to the historical change identifier is overwritten, the method further includes:
[0026] If the synchronization record corresponding to the historical change identifier is overwritten, resetting the change identifier;
[0027] After the reset is completed, the changed file is obtained, and the current file change event is regenerated according to the changed file.
[0028] Optionally, after the reset is completed, obtaining the changed file and regenerating the current file change event according to the changed file includes:
[0029] After the reset is completed, scan the local synchronization directory to obtain local file attribute data;
[0030] Scan the cloud directory to obtain cloud file attribute data;
[0031] Comparing the local file attribute data with the synchronization record in the local database to obtain a first comparison result;
[0032] Comparing the cloud file attribute data with the synchronization record in the local database to obtain a second comparison result;
[0033] A changed file is acquired according to the first comparison result and the second comparison result, and a current file change event is regenerated according to the changed file.
[0034] Optionally, the incremental synchronization method further includes:
[0035] If incremental synchronization is started for the first time and the cloud file is not mapped to the local computer, obtain the attribute data of the cloud file;
[0036] A placeholder file is created in the virtual disk based on the attribute data, wherein the placeholder file is a representation of the cloud file mapped to the local disk, and is used to indicate the existence of the file in the cloud.
[0037] Optionally, after creating a placeholder file in the virtual disk based on the attribute data, the method further includes:
[0038] In response to the file access request, downloading the file data corresponding to the file access request from the cloud;
[0039] The file data is filled into the placeholder file, the file to be accessed corresponding to the file access request is obtained, and the file to be accessed is displayed.
[0040] Optionally, after filling the file data into the placeholder file, obtaining the file to be accessed corresponding to the file access request, and displaying the file to be accessed, the method further includes:
[0041] In response to a file release request, determining a file to be released according to the file release request;
[0042] The file data of the file to be released is released, and the file to be released is changed into the placeholder file.
[0043] In addition, to achieve the above purpose, the present application also proposes an incremental synchronization device, the incremental synchronization device comprising:
[0044] An identification reading module, used for reading a historical change identification from a local database in response to a synchronization request, wherein the historical change identification is used to identify a historical file change event;
[0045] An event reading module, used for reading the current file change event based on the historical change identifier;
[0046] The incremental synchronization module is used to update the historical change identifier according to the current change identifier corresponding to the current file change event, and synchronize the file corresponding to the current file change event.
[0047] Optionally, the event reading module is further used to determine a target reading position based on the historical change identifier, wherein the target reading position is greater than the position of the historical change identifier; and read the current file change event from the local and / or cloud starting from the target reading position.
[0048] Optionally, the event reading module is further used to monitor the current file change events in the local synchronization directory starting from the target reading position through a local service; and / or, to receive cloud file change messages starting from the target reading position through a cloud service to obtain the current file change events.
[0049] Optionally, the event reading module is further used to receive cloud file change messages starting from the target reading position through the cloud service; if the cloud file change messages are discontinuous, re-pull the messages from the disconnected position to obtain the current file change event.
[0050] Optionally, the event reading module is further used to obtain the change identifier in the cloud file change message; calculate the difference between the historical change identifier and the change identifier in the cloud file change message; and determine whether the cloud file change message is continuous based on the difference.
[0051] Optionally, the incremental synchronization module is also used to detect whether the synchronization record corresponding to the historical change identifier is overwritten; if the synchronization record corresponding to the historical change identifier is not overwritten, the historical change identifier is updated according to the current change identifier corresponding to the current file change event, and the file corresponding to the current file change event is synchronized.
[0052] In addition, to achieve the above objectives, the present application also proposes an incremental synchronization device, which includes a memory, a processor, and an incremental synchronization program stored in the memory and executable on the processor, and the incremental synchronization program is configured to implement the incremental synchronization method described above.
[0053] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, on which an incremental synchronization program is stored, and when the incremental synchronization program is executed by a processor, the incremental synchronization method as described above is implemented.
[0054] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes an incremental synchronization program, and when the incremental synchronization program is executed by a processor, it implements the incremental synchronization method described above.
[0055] One or more technical solutions proposed in this application have at least the following technical effects:
[0056] In the present application, it is disclosed that in response to a synchronization request, a historical change identifier is read from a local database, wherein the historical change identifier is used to identify a historical file change event, a current file change event is read based on the historical change identifier, the historical change identifier is updated according to the current change identifier corresponding to the current file change event, and the file corresponding to the current file change event is synchronized; since the present application reads the current file change event starting from the historical change identifier and synchronizes the file corresponding to the current file change event, there is no need to perform a comprehensive scan of the cloud and local snapshot data to calculate the changes in the file during the client shutdown period, thereby improving the file synchronization speed, reducing the waiting time, and ensuring the timely update of the file version. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0058] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0059] Figure 1 This is a flowchart of the first embodiment of the incremental synchronization method of the present application;
[0060] Figure 2 This is a display interface diagram of an embodiment of the incremental synchronization method of the present application;
[0061] Figure 3 This is a flowchart of file incremental synchronization of an embodiment of the incremental synchronization method of the present application;
[0062] Figure 4 This is a flowchart of the third embodiment of the incremental synchronization method of the present application;
[0063] Figure 5 This is a flowchart of dynamic file loading of an embodiment of the incremental synchronization method of the present application;
[0064] Figure 6 This is a schematic diagram of the module structure of the incremental synchronization device according to an embodiment of the present application;
[0065] Figure 7 A schematic diagram of the device structure of the hardware operating environment involved in the incremental synchronization method in the embodiment of the present application.
[0066] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0067] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0068] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0069] At present, with the popularity of cloud computing and the growth of data storage demand, traditional local storage methods can no longer meet users' requirements for flexibility and real-time performance. Although there are many cloud storage solutions on the market that provide similar functions, they have their own advantages and disadvantages in file management, synchronization efficiency and user experience. Early cloud disk synchronization solutions were mainly based on the synchronization of physical files. This solution requires storing a copy of file data both locally and in the cloud. When the amount of synchronized files is relatively large, it will occupy the user's local disk space. In addition, the physical file data will be transmitted during the synchronization process, which will cause bandwidth occupation and slow synchronization. When the amount of files reaches the million level, when starting the client, it is necessary to scan the cloud and local snapshot data as a whole to calculate the changes in the files during the client shutdown, resulting in slow synchronization and untimely synchronization.
[0070] Therefore, in order to overcome the above-mentioned defects, the present application provides a solution, which includes: in response to a synchronization request, reading a historical change identifier from a local database, wherein the historical change identifier is used to identify a historical file change event, reading a current file change event based on the historical change identifier, updating the historical change identifier according to the current change identifier corresponding to the current file change event, and synchronizing the file corresponding to the current file change event; since the present application reads the current file change event starting from the historical change identifier and synchronizes the file corresponding to the current file change event, there is no need to perform a comprehensive scan of the cloud and local snapshot data to calculate the changes in the file during the client shutdown period, thereby improving the file synchronization speed, reducing the waiting time, and ensuring the timely update of the file version.
[0071] It should be noted that the execution subject of this embodiment can be an incremental synchronization device with data processing, network communication and program running functions, such as a computer, or other electronic devices that can achieve the same or similar functions, and this embodiment does not impose any restrictions on this.
[0072] Based on this, the embodiment of the present application provides an incremental synchronization method, referring to Figure 1 , Figure 1 This is a flowchart of the first embodiment of the incremental synchronization method of the present application.
[0073] In a first embodiment, the incremental synchronization method includes:
[0074] Step S10: In response to the synchronization request, a historical change identifier is read from a local database, wherein the historical change identifier is used to identify a historical file change event.
[0075] It should be understood that in order to avoid the need to rescan the entire synchronization directory or cloud storage every time synchronization is performed and to improve synchronization efficiency, in this embodiment, in response to a synchronization request, a historical change identifier is read from a local database. Among them, a synchronization request may refer to an event or instruction that triggers a file synchronization operation, which may be caused by a user operation (such as opening a synchronization client, manually triggering synchronization, etc.) or a system event (such as detecting network connection recovery, scheduled tasks, etc.), and this embodiment does not limit this. A local database may refer to a database stored on a user's local device, which is used to record various information during the file synchronization process, including identifiers of historical file change events (i.e., historical change identifiers), file status, synchronization progress, etc. The historical change identifier may refer to an identifier used to uniquely identify file change events that occurred in the past, which may be a number, a string, or other form of unique code, used to locate and process these events during subsequent synchronization.
[0076] In the specific implementation, when a user or system triggers a synchronization request, the local database is first accessed to read the previously recorded historical change identifier, which is the identifier of the last file change event processed when the last synchronization was completed.
[0077] Step S20: Read the current file change event based on the historical change identifier.
[0078] It is understandable that in order to ensure that all file changes that have occurred since the last synchronization can be correctly identified and processed, in this embodiment, the current file change event is read based on the historical change identifier. The current file change event may refer to a new file change event that has occurred since the last synchronization, including operations such as file creation, modification, and deletion.
[0079] In a specific implementation, based on the read historical change identifier, all new file change events that have occurred since the historical identifier are searched and read from the local synchronization directory or cloud synchronization service. The new file change events may include file creation, modification, deletion, etc.
[0080] Step S30: updating the historical change identifier according to the current change identifier corresponding to the current file change event, and synchronizing the file corresponding to the current file change event.
[0081] It should be understood that, in order to facilitate subsequent incremental synchronization, in this embodiment, the historical change identifier is also updated according to the current change identifier corresponding to the current file change event. The current change identifier may refer to an identifier used to uniquely identify the current file change event, and may also be a unique code in the form of a number, a string, etc.
[0082] In the specific implementation, for each current file change event read, the historical change mark in the local database is first updated and set as the current change mark (i.e. the unique identifier of the event). Then, according to the event type (creation, modification, deletion, etc.), the corresponding local or cloud files are synchronized.
[0083] This embodiment reads the current file change event starting from the historical change identifier and synchronizes the file corresponding to the current file change event, thereby calculating the changes in the file during the period when the client is closed without the need to perform a comprehensive scan of the cloud and local snapshot data, thereby improving the file synchronization speed, reducing the waiting time, and ensuring the timely update of the file version.
[0084] Reference Figure 2 , Figure 2 This is a flow chart of the second embodiment of the incremental synchronization method of the present application, based on the above Figure 1 The first embodiment shown proposes a second embodiment of the incremental synchronization method of the present application.
[0085] In the second embodiment, the step S20 includes:
[0086] Step S201: determining a target reading position based on the historical change identifier, wherein the target reading position is greater than a position of the historical change identifier.
[0087] It should be understood that in order to ensure that the synchronization process can continue from the position where the last synchronization ended and avoid repeated processing of file change events that have been synchronized, in this embodiment, the target reading position is first determined based on the historical change identifier, and then the current file change event is read from the local and / or cloud starting from the target reading position. The target reading position may refer to the position in the file change event sequence from which new file change events are read, which is determined based on the historical change identifier and is located after the historical change identifier.
[0088] Step S202: starting from the target reading position, reading the current file change event from the local computer and / or the cloud.
[0089] In the specific implementation, a new reading position, namely the target reading position, is determined based on the read historical change identifier. This position is located after the historical change identifier, ensuring that the file change events that have occurred since the last synchronization are read from this position. Starting from the target reading position, new file change events are read from the local synchronization directory or the cloud synchronization service. These events may include file creation, modification, deletion, etc., depending on the file changes that have occurred since the last synchronization.
[0090] This embodiment first determines the target reading position based on the historical change identifier, and then starts reading the current file change event from the local and / or cloud from the target reading position, thereby ensuring that the synchronization process can continue from the position where the last synchronization ended, avoiding repeated processing of file change events that have already been synchronized.
[0091] Furthermore, in order to ensure that file changes occurring locally or in the cloud can be captured in a timely manner, the step S202 includes: monitoring the current file change events in the local synchronization directory starting from the target reading position through the local service; and / or, receiving the cloud file change message starting from the target reading position through the cloud service to obtain the current file change event. Among them, the local service can be responsible for monitoring the file changes in the local synchronization directory and reporting these change events to the file synchronization module. The cloud service can be responsible for receiving and sending cloud file change messages to synchronize with the local service.
[0092] In a specific implementation, a file synchronization model is set in the incremental synchronization device, and the file synchronization module starts the local service and instructs the local service to monitor the file changes in the local synchronization directory from the target reading position. The file synchronization module can also start the cloud service and instruct the cloud service to receive cloud file change messages from the target reading position.
[0093] Furthermore, in order to ensure the integrity and accuracy of file synchronization and avoid synchronization errors caused by message loss or omission, the receiving of cloud file change messages from the target reading position through the cloud service to obtain the current file change event includes: receiving cloud file change messages from the target reading position through the cloud service; if the cloud file change messages are discontinuous, re-pulling messages from the disconnected position to obtain the current file change event. The cloud file change message may refer to a message sent by the cloud service containing file change event information. These messages typically include the type of file change (such as creation, modification, deletion, etc.), the path and name of the file, and a unique identifier for the change event.
[0094] In a specific implementation, the file synchronization module establishes a connection with the cloud service and instructs the cloud service to send cloud file change messages starting from the target reading position. The cloud service sends file change messages to the file synchronization module one by one starting from the target reading position according to the request. In the process of receiving cloud file change messages, if the file synchronization module finds that the message sequence is discontinuous (for example, the message number is discontinuous or there are missing messages), the file synchronization module will request the cloud service to resend the message from the disconnected position. This ensures that the file synchronization module can receive all file change events that have occurred since the last synchronization, and will not cause incomplete synchronization due to lost or omitted messages.
[0095] Furthermore, in order to accurately determine whether the cloud file change message is continuous, if the cloud file change message is discontinuous, the message is re-pulled from the disconnected position, and before obtaining the current file change event, it also includes: obtaining the change identifier in the cloud file change message; calculating the difference between the historical change identifier and the change identifier in the cloud file change message; and determining whether the cloud file change message is continuous based on the difference.
[0096] In a specific implementation, for each received cloud file change message, the file synchronization module extracts a change identifier, which is an identifier that uniquely identifies the file change event. The file synchronization module calculates the difference between the change identifier in the currently received cloud file change message and the historical change identifier. This difference is used to determine whether the message is continuous. If the difference increases continuously (for example, by 1 each time), the message is continuous. If the difference is discontinuous (for example, there is a jump or missing), the message is discontinuous.
[0097] In the third embodiment, in order to timely discover and handle possible synchronization record loss or overwriting problems and avoid synchronization errors or omissions caused by incomplete records, before step S30, it also includes: detecting whether the synchronization record corresponding to the historical change identifier is overwritten; accordingly, step S30 includes: if the synchronization record corresponding to the historical change identifier is not overwritten, then updating the historical change identifier according to the current change identifier corresponding to the current file change event, and synchronizing the file corresponding to the current file change event. The synchronization record may refer to information about file synchronization recorded in the local database, including historical change identifiers, file status, synchronization time, etc.
[0098] In the specific implementation, before processing the current file change event, the file synchronization module will check whether the synchronization record associated with the historical change identifier in the local database has been overwritten or deleted by a new record. If it is detected that the synchronization record corresponding to the historical change identifier is still valid and has not been overwritten, the file synchronization module will perform corresponding synchronization operations (such as creation, modification, deletion, etc.) on the local file according to the change information contained in the current file change event. At the same time, it will update the historical change identifier in the local database to the current change identifier, so that when the next synchronization request arrives, it can continue to synchronize from the latest file change event processed last time.
[0099] Furthermore, in order to allow the synchronization process to continue when the synchronization record is overwritten, after detecting whether the synchronization record corresponding to the historical change identifier is overwritten, it also includes: if the synchronization record corresponding to the historical change identifier is overwritten, resetting the change identifier; after the reset is completed, obtaining the change file, and regenerating the current file change event based on the change file.
[0100] In the specific implementation, if it is detected that the synchronization record corresponding to the historical change identifier has been overwritten or deleted, the file synchronization module will not be able to perform accurate incremental synchronization. At this time, the module needs to perform a reset operation, that is, abandon the use of the current historical change identifier and prepare for full synchronization or re-acquire a new change identifier. After the reset operation is completed, the file synchronization module needs to re-acquire all file change information that has occurred since the last synchronization. This can be achieved by communicating with the cloud synchronization service to obtain a complete list of file changes. The module will then regenerate the current file change event based on this change information.
[0101] Furthermore, in order to accurately identify the files that need to be synchronized and provide an accurate data basis for subsequent synchronization operations, after the reset is completed, the changed files are obtained, and the current file change event is regenerated based on the changed files, including: after the reset is completed, scan the local synchronization directory to obtain local file attribute data; scan the cloud directory to obtain cloud file attribute data; compare the local file attribute data with the synchronization records in the local database to obtain a first comparison result; compare the cloud file attribute data with the synchronization records in the local database to obtain a second comparison result; obtain the changed files based on the first comparison result and the second comparison result, and regenerate the current file change event based on the changed files. Among them, the local synchronization directory can refer to a directory set by the user for storing local files, and the file directory is synchronized with the cloud directory. The cloud directory can refer to a file directory stored in the cloud, which is synchronized with the local synchronization directory. File attribute data can refer to metadata of the file, including file name, size, modification time, etc.
[0102] In the specific implementation, after the reset operation is completed, the file synchronization module will scan the local synchronization directory and obtain the attribute data of all files in the directory, including file name, size, modification time, etc. At the same time, the file synchronization module will also scan the cloud directory to obtain the attribute data of all files stored in the cloud. The file synchronization module will compare the scanned local file attribute data with the synchronization records recorded in the local database to determine which files have changed locally (such as added, modified or deleted). Similarly, the file synchronization module will also compare the scanned cloud file attribute data with the synchronization records recorded in the local database to determine which files have changed in the cloud. Combining the first comparison result and the second comparison result, the file synchronization module can determine which files are changed (that is, they have changed locally or in the cloud, but have not yet been synchronized to the other party). Then, the module will regenerate the current file change event based on these changed files.
[0103] For ease of understanding, refer to Figure 3 This invention is provided for illustration, but is not intended to limit the present application. Figure 3 This is a flowchart of incremental synchronization of files according to an embodiment of the incremental synchronization method of the present application. Figure 3 In the file synchronization module, the file synchronization module records the currently consumed file change event id so that subsequent consumption starts from a position greater than the recorded id, thereby avoiding the time-consuming problem of scanning the file snapshot data in the local and cloud synchronization directories every time the synchronization module is started, and then calculating the file changes during the client shutdown period, thereby improving the response speed of file synchronization. The specific implementation is as follows:
[0104] 1. When the file synchronization module smart_sync is started, the sync_service service will be started internally to monitor file changes in the local synchronization directory, and the realtime_service service will be started to receive cloud file change messages;
[0105] 2. Each file change event obtained by smart_sync from the local or cloud contains an id value. The id obtained from sync_service is marked as usn_id, and the id obtained from realtime_service is marked as action_id. The two are independent of each other.
[0106] 3. After smart_sync is started, it will read the local database to obtain the previously recorded historical usn_id and historical action_id. If the data can be read, the two IDs will be sent to sync_service and realtime_service respectively, so that consumption can continue from the last consumption position;
[0107] 4. After receiving the id, sync_service and realtime_service start reading file change events from a position greater than the id value and send the event to smart_sync for processing;
[0108] 5. After receiving the change event, smart_sync updates the current id corresponding to the change event to the database and synchronizes the file corresponding to the event. After the synchronization is completed, there will be a record of the file in the database, indicating that the file has been synchronized locally.
[0109] 6. If the record corresponding to the historical usn_id has been overwritten when sync_service receives the historical usn_id, smart_sync needs to execute full sync to calculate the specific file changes;
[0110] 7 If the realtime_service messages received by smart_sync are discontinuous (the difference is not 1), it is necessary to request realtime_service to re-pull the messages from the disconnected position.
[0111] Reference Figure 4 , Figure 4 This is a flow chart of the third embodiment of the incremental synchronization method of the present application. Based on the above embodiments, the third embodiment of the incremental synchronization method of the present application is proposed.
[0112] In the third embodiment, before step S10, the method further includes:
[0113] Step S01: If incremental synchronization is started for the first time and the cloud file is not mapped to the local computer, the attribute data of the cloud file is obtained.
[0114] It should be understood that in this embodiment, a virtual layer tightly integrated with the operating system file manager is created through file virtualization, so that users can view files in the cloud in the local resource manager without downloading all file data locally. When a certain file is to be used, the corresponding file data will be obtained from the cloud. At the same time, when the file data at both ends changes, two-way synchronization is automatically performed, eliminating the need for users to manually upload and update the new version of the file. This synchronization scheme improves the flexibility and convenience of users, enhances the real-time performance of file synchronization, saves local disk space, and significantly reduces the local bandwidth usage and the bandwidth cost of the server. It is particularly suitable for modern remote work and cross-device use. In particular, cloud files can refer to files stored on the server of a cloud service provider, which users can access through the Internet, but the files themselves are not directly stored on the user's local device. Attribute data can refer to detailed information about a file, including but not limited to file name, file size, file type, creation time, modification time, etc., which are used to describe the characteristics and status of the file.
[0115] Step S02: creating a placeholder file in the virtual disk based on the attribute data, wherein the placeholder file is a representation of the cloud file mapped to the local disk, and is used to indicate the existence of the file in the cloud.
[0116] It should be noted that a virtual disk may refer to a physical hard disk simulated by software. It does not correspond to an actual physical storage device, but serves as a logical storage area for storing and managing files. A virtual disk can be mapped to a user's file system, allowing the user to access files on the virtual disk as if they were accessing an actual hard disk. A placeholder file may refer to a special file created in a virtual disk. It does not contain the actual data of the file itself, but serves as a local representation or reference to a cloud file. Placeholder files usually have a very small file size and are only used to store the file's attribute data and a link or pointer to the actual data of the cloud file.
[0117] In the specific implementation, when the file synchronization module is started for the first time, it is necessary to register the virtual disk first, and the cloud file needs to be mapped to the local. Specifically, the file synchronization module sends a request to the server of the cloud service provider to obtain the attribute data of the cloud file. After obtaining the attribute data of the cloud file, the system will create a placeholder file corresponding to the cloud file in the virtual disk. The size of the placeholder file is usually very small (for example, 4KB) because it does not contain the actual data of the file. Instead, it only contains the attribute data of the file and a link or pointer to the actual data of the cloud file. The existence of the placeholder file enables users to see the existence of cloud files through the file explorer without downloading the actual data of the file.
[0118] This embodiment creates a virtual layer that is tightly integrated with the operating system file manager through file virtualization, allowing users to view cloud files in the local resource manager without having to download all file data locally, thereby improving user flexibility and convenience, enhancing the real-time performance of file synchronization, and saving local disk space.
[0119] Furthermore, in order to enable users to access the actual data of cloud files when needed without downloading the entire file in advance, after step S50, it also includes: in response to a file access request, downloading the file data corresponding to the file access request from the cloud; filling the file data into the placeholder file, obtaining the file to be accessed corresponding to the file access request, and displaying the file to be accessed. The file access request may refer to an access operation to a file initiated by a user through a file explorer or other application, such as opening, editing, deleting, etc.
[0120] In a specific implementation, when a user tries to access (such as open or edit) a cloud file that exists in the form of a placeholder, the file synchronization module will recognize that this is a placeholder file and trigger the operation of downloading the actual data of the file from the cloud. The file synchronization module will send a request to the cloud service provider's server to obtain the actual data of the file based on the link or pointer to the actual data of the cloud file stored in the placeholder file. After downloading the actual data of the file from the cloud, the file synchronization module will fill this data into the previously created placeholder file. At this point, the placeholder file is no longer a placeholder that only contains attribute data and links, but becomes an ordinary file containing the actual data of the file. The user can now access and edit this file normally through the file explorer.
[0121] Furthermore, in order to enable users to flexibly manage local disk space, files that are no longer needed are released back to the cloud, the file data is filled into the placeholder file, the file to be accessed corresponding to the file access request is obtained, and after the file to be accessed is displayed, it also includes: responding to the file release request, determining the file to be released according to the file release request; releasing the file data of the file to be released, and turning the file to be released into the placeholder file. The file release request may refer to an operation request initiated by the user in some way (such as the right-click menu) to release the file from the local disk back to the cloud (i.e., turn it into a placeholder file).
[0122] In the specific implementation, when the user initiates a file release request through some means (such as the right-click menu), the file synchronization module will identify the file that the user wants to release, delete the actual data of the file to be released from the local disk (or move it to a temporary storage area such as the recycle bin), and convert the file into a placeholder file, thereby saving local disk space and maintaining the mapping relationship between the cloud file and the local placeholder file.
[0123] For ease of understanding, refer to Figure 5 This invention is provided for illustration, but is not intended to limit the present application. Figure 5 This is a flowchart of the file dynamic loading of an embodiment of the incremental synchronization method of this application. Figure 5 In the cloud, a virtual file system (VFS) layer is built to map the files and folders that users see in the file explorer with the content actually stored in the cloud. Users can access cloud files just like accessing local files, without actually downloading all the content. At the same time, dynamic recording technology is used to hydrate the files that need to be accessed and release disk space for unused files. The specific implementation is as follows:
[0124] 1. When starting smart_sync for the first time, you need to register the virtual disk and map the cloud file to the local computer. After registration, smart_sync can create a file symbol with a size of 4kb based on the file attributes obtained from the cloud (such as file size, file modification events, etc.) without downloading the actual file data from the cloud;
[0125] 2. After the file is mapped in the form of a placeholder, only when the user needs to access the file, such as double-clicking to open the file, at this time, since the file is just a placeholder and does not include the actual file data, it is necessary to download the actual file data from the cloud and fill it into the placeholder. When the file data is filled, the file can be opened;
[0126] 3. For some files that contain actual data, you can use the right-click menu to release the disk space occupied by the file and turn the file back into a placeholder file.
[0127] This application brings the following effects:
[0128] 1. Time efficiency: Since local and cloud snapshot data scanning and file change comparison operations are avoided each time the client is started, incremental synchronization is usually faster than full synchronization, which can increase synchronization speed, reduce waiting time, and ensure timely update of file versions.
[0129] 2. Lower system burden: The incremental synchronization solution avoids the disk IO operations caused by scanning files and the memory overhead required for loading file snapshot data, effectively reducing the system load and improving system fluency;
[0130] 3. Storage saving: After using file virtualization storage locally, even if the file is synchronized to the local, there is no need to download the file from the cloud to the local at one time, which greatly reduces the pressure on the user's local storage space;
[0131] 4. Commercial value and competitive advantage: This technology provides cloud disk customers with a solution to operate cloud files without changing user habits, which has high commercial value and competitive advantage. Because there is no additional learning cost during use, the threshold for use is low, which improves the user experience.
[0132] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the incremental synchronization method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0133] This application also provides an incremental synchronization device, please refer to Figure 6 , the incremental synchronization device comprises:
[0134] The identification reading module 10 is used to read the historical change identification from the local database in response to the synchronization request, wherein the historical change identification is used to identify the historical file change event;
[0135] An event reading module 20, configured to read a current file change event based on the historical change identifier;
[0136] The incremental synchronization module 30 is used to update the historical change identifier according to the current change identifier corresponding to the current file change event, and synchronize the file corresponding to the current file change event.
[0137] The incremental synchronization device provided by the present application adopts the incremental synchronization method in the above embodiment, which can solve the technical problem that the existing file synchronization method needs to scan the cloud and local snapshot data as a whole to calculate the changes of the files during the client shutdown each time the client is started, thereby having the defects of slow synchronization speed and untimely synchronization. Compared with the prior art, the beneficial effects of the incremental synchronization device provided by the present application are the same as the beneficial effects of the incremental synchronization method provided by the above embodiment, and the other technical features in the incremental synchronization device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0138] The present application provides an incremental synchronization device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the incremental synchronization method in the above-mentioned embodiment one.
[0139] Reference below Figure 7 , which shows a schematic diagram of the structure of an incremental synchronization device suitable for implementing the embodiment of the present application. The incremental synchronization device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The incremental synchronization device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0140] like Figure 7As shown, the incremental synchronization device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a ROM (Read Only Memory) 1002 or a program loaded from a storage device 1003 to a RAM (Random Access Memory) 1004. In the RAM 1004, various programs and data required for the operation of the incremental synchronization device are also stored. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, an LCD (Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the incremental synchronization device to communicate with other devices wirelessly or by wire to exchange data. Although the incremental synchronization device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0141] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0142] The incremental synchronization device provided by the present application adopts the incremental synchronization method in the above embodiment, which can solve the technical problem that the existing file synchronization method needs to scan the cloud and local snapshot data as a whole to calculate the changes of the files during the client shutdown each time the client is started, thereby having the defects of slow synchronization speed and untimely synchronization. Compared with the prior art, the beneficial effects of the incremental synchronization device provided by the present application are the same as the beneficial effects of the incremental synchronization method provided by the above embodiment, and the other technical features in the incremental synchronization device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0143] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0144] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0145] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the incremental synchronization method in the above-mentioned embodiment.
[0146] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, RAM (Random Access Memory), ROM (Read Only Memory), EPROM (Erasable Programmable Read Only Memory) or flash memory, optical fiber, CD-ROM (CD-Read Only Memory, portable compact disk read-only memory), optical storage device, magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0147] The computer-readable storage medium may be included in the incremental synchronization device; or may exist independently without being assembled into the incremental synchronization device.
[0148] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the incremental synchronization device, the incremental synchronization device executes the incremental synchronization method.
[0149] The computer program code for performing the operation of the present application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on the remote computer, or completely on the remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a LAN (Local Area Network) or a WAN (Wide Area Network), or it can be connected to an external computer (e.g., using an Internet service provider to connect through the Internet).
[0150] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0151] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0152] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned incremental synchronization method, and can solve the technical problem that the existing file synchronization method needs to scan the cloud and local snapshot data as a whole to calculate the changes of files during the period when the client is closed every time the client is started, thereby having the defects of slow synchronization speed and untimely synchronization. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the incremental synchronization method provided by the above-mentioned embodiment, which will not be repeated here.
[0153] The present application also provides a computer program product, including a computer program, which implements the incremental synchronization method as described above when executed by a processor.
[0154] The computer program product provided by the present application can solve the technical problem that the existing file synchronization method needs to scan the cloud and local snapshot data as a whole to calculate the changes of the files during the client shutdown each time the client is started, resulting in the defects of slow synchronization speed and untimely synchronization. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the incremental synchronization method provided by the above embodiment, which will not be elaborated here.
[0155] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
[0156] The present application discloses A1, an incremental synchronization method, the incremental synchronization method comprising:
[0157] In response to the synchronization request, reading a historical change identifier from a local database, wherein the historical change identifier is used to identify a historical file change event;
[0158] Reading the current file change event based on the historical change identifier;
[0159] The historical change identifier is updated according to the current change identifier corresponding to the current file change event, and the file corresponding to the current file change event is synchronized.
[0160] A2. The incremental synchronization method as described in A1, wherein the step of reading the current file change event based on the historical change identifier comprises:
[0161] Determining a target reading position based on the historical change identifier, wherein the target reading position is greater than a position of the historical change identifier;
[0162] The current file change event is read from the local computer and / or the cloud starting from the target reading position.
[0163] A3. The incremental synchronization method as described in A2, wherein the step of reading the current file change event from the local computer and / or the cloud starting from the target reading position comprises:
[0164] Monitoring the current file change events in the local synchronization directory starting from the target read position through the local service;
[0165] And / or, receiving a cloud file change message from the target reading position through a cloud service to obtain a current file change event.
[0166] A4, as described in A3, the incremental synchronization method, wherein the receiving of the cloud file change message from the target reading position through the cloud service to obtain the current file change event, comprises:
[0167] Receiving cloud file change messages starting from the target reading position through the cloud service;
[0168] If the cloud file change message is discontinuous, the message is re-pulled from the disconnected position to obtain the current file change event.
[0169] A5. The incremental synchronization method as described in A4, wherein if the cloud file change message is discontinuous, the message is re-pulled from the disconnected position, and before obtaining the current file change event, the method further comprises:
[0170] Obtaining a change identifier in the cloud file change message;
[0171] Calculating the difference between the historical change identifier and the change identifier in the cloud file change message;
[0172] Whether the cloud file change messages are continuous is determined according to the difference.
[0173] A6. The incremental synchronization method as described in any one of A1 to A5, before updating the historical change identifier according to the current change identifier corresponding to the current file change event and synchronizing the file corresponding to the current file change event, further comprising:
[0174] Detecting whether the synchronization record corresponding to the historical change identifier is overwritten;
[0175] Correspondingly, updating the historical change identifier according to the current change identifier corresponding to the current file change event, and synchronizing the file corresponding to the current file change event, includes:
[0176] If the synchronization record corresponding to the historical change identifier is not overwritten, the historical change identifier is updated according to the current change identifier corresponding to the current file change event, and the file corresponding to the current file change event is synchronized.
[0177] A7. The incremental synchronization method as described in A6, after detecting whether the synchronization record corresponding to the historical change identifier is overwritten, further comprising:
[0178] If the synchronization record corresponding to the historical change identifier is overwritten, resetting the change identifier;
[0179] After the reset is completed, the changed file is obtained, and the current file change event is regenerated according to the changed file.
[0180] A8. The incremental synchronization method as described in A7, wherein after the reset is completed, the changed file is obtained, and the current file change event is regenerated according to the changed file, including:
[0181] After the reset is completed, scan the local synchronization directory to obtain local file attribute data;
[0182] Scan the cloud directory to obtain cloud file attribute data;
[0183] Comparing the local file attribute data with the synchronization record in the local database to obtain a first comparison result;
[0184] Comparing the cloud file attribute data with the synchronization record in the local database to obtain a second comparison result;
[0185] A changed file is acquired according to the first comparison result and the second comparison result, and a current file change event is regenerated according to the changed file.
[0186] A9. The incremental synchronization method as described in any one of A1 to A5, further comprising:
[0187] If incremental synchronization is started for the first time and the cloud file is not mapped to the local computer, obtain the attribute data of the cloud file;
[0188] A placeholder file is created in the virtual disk based on the attribute data, wherein the placeholder file is a representation of the cloud file mapped to the local disk, and is used to indicate the existence of the file in the cloud.
[0189] A10. The incremental synchronization method as described in A9, after creating the placeholder file in the virtual disk based on the attribute data, further comprising:
[0190] In response to the file access request, downloading the file data corresponding to the file access request from the cloud;
[0191] The file data is filled into the placeholder file, the file to be accessed corresponding to the file access request is obtained, and the file to be accessed is displayed.
[0192] A11. The incremental synchronization method as described in A10, after filling the file data into the placeholder file, obtaining the file to be accessed corresponding to the file access request, and displaying the file to be accessed, further comprises:
[0193] In response to a file release request, determining a file to be released according to the file release request;
[0194] The file data of the file to be released is released, and the file to be released is changed into the placeholder file.
[0195] The present application also discloses B12, an incremental synchronization device, the incremental synchronization device comprising:
[0196] An identification reading module, used for reading a historical change identification from a local database in response to a synchronization request, wherein the historical change identification is used to identify a historical file change event;
[0197] An event reading module, used for reading the current file change event based on the historical change identifier;
[0198] The incremental synchronization module is used to update the historical change identifier according to the current change identifier corresponding to the current file change event, and synchronize the file corresponding to the current file change event.
[0199] B13. In the incremental synchronization device as described in B12, the event reading module is further used to determine a target reading position based on the historical change identifier, wherein the target reading position is greater than the position of the historical change identifier; and read the current file change event from the local and / or cloud starting from the target reading position.
[0200] B14. In the incremental synchronization device as described in B13, the event reading module is also used to monitor the current file change events in the local synchronization directory starting from the target reading position through the local service; and / or, receive cloud file change messages starting from the target reading position through the cloud service to obtain the current file change events.
[0201] B15. In the incremental synchronization device as described in B14, the event reading module is also used to receive cloud file change messages starting from the target reading position through the cloud service; if the cloud file change messages are discontinuous, the messages are re-pulled from the disconnected position to obtain the current file change event.
[0202] B16. In the incremental synchronization device as described in B15, the event reading module is also used to obtain the change identifier in the cloud file change message; calculate the difference between the historical change identifier and the change identifier in the cloud file change message; and determine whether the cloud file change message is continuous based on the difference.
[0203] B17. An incremental synchronization device as described in any one of B12 to B16, wherein the incremental synchronization module is further used to detect whether the synchronization record corresponding to the historical change identifier is overwritten; if the synchronization record corresponding to the historical change identifier is not overwritten, the historical change identifier is updated according to the current change identifier corresponding to the current file change event, and the file corresponding to the current file change event is synchronized.
[0204] The present application also discloses C18, an incremental synchronization device, which includes: a memory, a processor, and an incremental synchronization program stored in the memory and executable on the processor, wherein the incremental synchronization program implements the incremental synchronization method described above when executed by the processor.
[0205] The present application also discloses D19, a storage medium, on which an incremental synchronization program is stored, and when the incremental synchronization program is executed by a processor, the incremental synchronization method as described above is implemented.
[0206] The present application also discloses E20, a computer program product, which includes an incremental synchronization program, and when the incremental synchronization program is executed by a processor, it implements the incremental synchronization method described above.
Claims
1. An incremental synchronization method, characterized in that: The incremental synchronization method comprises: In response to the synchronization request, reading a historical change identifier from a local database, wherein the historical change identifier is used to identify a historical file change event; Reading the current file change event based on the historical change identifier; The historical change identifier is updated according to the current change identifier corresponding to the current file change event, and the file corresponding to the current file change event is synchronized.
2. The incremental synchronization method according to claim 1, characterized in that: The reading of the current file change event based on the historical change identifier includes: Determining a target reading position based on the historical change identifier, wherein the target reading position is greater than a position of the historical change identifier; The current file change event is read from the local computer and / or the cloud starting from the target reading position.
3. The incremental synchronization method according to claim 2, characterized in that: The step of reading the current file change event from the local computer and / or the cloud starting from the target reading position includes: Monitoring the current file change events in the local synchronization directory starting from the target read position through the local service; And / or, receiving a cloud file change message from the target reading position through a cloud service to obtain a current file change event.
4. The incremental synchronization method according to claim 3, characterized in that: The receiving of the cloud file change message from the target reading position through the cloud service to obtain the current file change event includes: Receiving cloud file change messages starting from the target reading position through the cloud service; If the cloud file change message is discontinuous, the message is re-pulled from the disconnected position to obtain the current file change event.
5. The incremental synchronization method according to claim 4, characterized in that: If the cloud file change message is discontinuous, then re-pulling the message from the disconnected position, before obtaining the current file change event, further comprising: Obtaining a change identifier in the cloud file change message; Calculating the difference between the historical change identifier and the change identifier in the cloud file change message; Whether the cloud file change messages are continuous is determined according to the difference.
6. The incremental synchronization method according to any one of claims 1 to 5, characterized in that: Before updating the historical change identifier according to the current change identifier corresponding to the current file change event and synchronizing the file corresponding to the current file change event, the method further includes: Detecting whether the synchronization record corresponding to the historical change identifier is overwritten; Correspondingly, updating the historical change identifier according to the current change identifier corresponding to the current file change event, and synchronizing the file corresponding to the current file change event, includes: If the synchronization record corresponding to the historical change identifier is not overwritten, the historical change identifier is updated according to the current change identifier corresponding to the current file change event, and the file corresponding to the current file change event is synchronized.
7. An incremental synchronization device, characterized in that: The incremental synchronization device comprises: An identification reading module, used for reading a historical change identification from a local database in response to a synchronization request, wherein the historical change identification is used to identify a historical file change event; An event reading module, used for reading the current file change event based on the historical change identifier; The incremental synchronization module is used to update the historical change identifier according to the current change identifier corresponding to the current file change event, and synchronize the file corresponding to the current file change event.
8. An incremental synchronization device, characterized in that: The incremental synchronization device comprises: a memory, a processor, and an incremental synchronization program stored in the memory and executable on the processor, wherein the incremental synchronization program implements the incremental synchronization method according to any one of claims 1 to 6 when executed by the processor.
9. A storage medium, characterized in that: An incremental synchronization program is stored on the storage medium, and when the incremental synchronization program is executed by the processor, the incremental synchronization method according to any one of claims 1 to 6 is implemented.
10. A computer program product, characterized in that The computer program product comprises an incremental synchronization program, and when the incremental synchronization program is executed by a processor, the incremental synchronization method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Method and apparatus for realizing real-time increment synchronization of data
CN105243067A
Data synchronization processing method, mobile terminal and computer readable storage medium
CN107180116A
Transaction-based file synchronization method and synchronization system
CN117421290A
Cited By
Large-scale data set increment synchronization method based on cloud object storage
CN121743295A
Large-scale dataset incremental synchronization method based on cloud object storage
CN121743295B