Data synchronization method and device, equipment, storage medium and program product

By obtaining unified time and time zone information during incremental synchronization, the timing of synchronization tasks can be precisely controlled. Combined with synchronization location markers and metadata tags to filter data, the problem of resource scarcity in synchronization tasks in existing technologies is solved, achieving efficient, low-interference, and highly consistent data synchronization.

CN121501889APending Publication Date: 2026-02-10CHINA UNITED NETWORK COMM GRP CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511503124.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-20
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

Existing incremental synchronization solutions do not fully consider the real-time load status of the target storage, causing synchronization tasks to be launched in a concentrated manner when resources are scarce, consuming a large amount of computing and bandwidth resources, affecting the normal operation of core businesses, and reducing overall stability.

Method used

By obtaining the current unified time and the target storage time zone information, the timing of the synchronization task execution is precisely controlled, the synchronization position mark is initialized, the data list carrying the integrity identifier is incrementally read from the position, and the target data is filtered by combining the preset synchronization configuration and the metadata tags of the data itself to reduce invalid transmission. Finally, the corresponding storage entry is created on the target storage and the synchronization position mark is updated.

Benefits of technology

This avoids executing synchronization tasks during peak business hours, reduces interference with core business operations, ensures no incremental data is missed, improves the accuracy and efficiency of synchronization, optimizes resource utilization, and forms a highly efficient, low-interference, and highly consistent data synchronization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121501889A_ABST
    Figure CN121501889A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data synchronization method and device, equipment, a storage medium and a program product, and the method comprises the steps: determining the actual time according to the current unified time and the time zone information of a target storage end; according to the matching result of the actual time and the configured synchronization time window parameters, whether the synchronization task is executed or not is judged; if yes, reading the storage data from the position increment indicated by the synchronous position mark in the source storage end to obtain a data list carrying an integrity identifier; if the integrity identifier indicates that the data list is complete, determining the data as target storage data; according to a preset metadata tag of the target storage data, screening to obtain target data to be synchronized to a target storage end; and creating a corresponding storage entry in the target storage end, and updating the synchronization position mark, and the method is used for achieving the effect of improving the reliability and efficiency of incremental synchronization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a data synchronization method, apparatus, device, storage medium, and program product. Background Technology

[0002] As data becomes a core asset for businesses and individuals, the need for collaborative management across multiple storage devices is becoming increasingly prominent. Whether it's the interaction between cloud and local storage, or the information exchange between different nodes in a distributed system, data synchronization technology plays a crucial role.

[0003] Currently, the mainstream data synchronization methods mainly include two categories: full synchronization and incremental synchronization. Full synchronization achieves consistency by periodically copying the entire dataset, while incremental synchronization only transmits newly added or modified content.

[0004] However, existing incremental synchronization schemes only perform synchronization operations according to fixed logic, without fully considering the real-time load status of the target storage end. This causes synchronization tasks to be launched in a concentrated manner when the target end resources are scarce, consuming a large amount of computing and bandwidth resources, affecting the normal operation of core businesses, and reducing overall stability. Summary of the Invention

[0005] This application provides a data synchronization method, apparatus, device, storage medium, and program product to improve the reliability and efficiency of incremental synchronization.

[0006] In a first aspect, embodiments of this application provide a data synchronization method applied to an electronic device, comprising: obtaining the current unified time and determining the actual time of the current time zone based on the current unified time and the time zone information of a pre-configured target storage terminal; determining whether to execute a synchronization task based on the matching result of the actual time of the current time zone and a pre-configured synchronization time window parameter; if it is determined that the synchronization task can be executed, initializing a synchronization position marker, wherein the synchronization position marker is used to indicate the position of the stored data at the source storage terminal at the end of the last synchronization task; reading the stored data incrementally from the position indicated by the synchronization position marker in the source storage terminal to obtain a data list carrying an integrity identifier, wherein the integrity identifier is used to indicate whether the data list is complete; if the integrity identifier indicates that the data list is complete, determining the stored data in the data list as the target stored data; filtering the target data to be synchronized to the target storage terminal according to a preset synchronization configuration and a preset metadata tag carried by the target stored data, wherein the preset metadata tag is used to identify the synchronization status of the target stored data; creating a storage entry corresponding to the target data in the target storage terminal, and updating the synchronization position marker to the position of the stored data at the source storage terminal at the end of the current synchronization task.

[0007] In one possible implementation, determining whether to execute a synchronization task based on the matching result between the current actual time in the time zone and a pre-configured synchronization time window parameter includes: reading the pre-configured synchronization time window parameter, which includes a synchronization start time and a synchronization end time; determining whether the synchronization start time is less than or equal to the synchronization end time, and whether both the synchronization start time and the synchronization end time are within a preset range, to verify the validity of the synchronization time window parameter; if the validity verification of the synchronization time window parameter fails, setting the synchronization time window parameter to a preset business off-peak default window parameter; if the validity verification of the synchronization time window parameter passes, continuing to determine whether the current actual time in the time zone is within the synchronization time window parameter; if the current actual time in the time zone is within the synchronization time window parameter, triggering a synchronization task execution instruction; if the current actual time in the time zone is not within the synchronization time window parameter, calculating the time until the next synchronization time window opens to obtain a waiting time, releasing the system resources associated with the synchronization task, and setting a timed startup mechanism based on the waiting time to preload the system resources required by the synchronization task at a preset time before the waiting time expires.

[0008] In one possible implementation, initializing the synchronization location marker includes: determining whether the source storage terminal is executing a synchronization task for the first time; if it is determined that the source storage terminal is executing a synchronization task for the first time, then initializing the synchronization location marker to the root directory path of the source storage terminal; if it is determined that the source storage terminal is not executing a synchronization task for the first time, then reading the synchronization location marker saved after the last synchronization task ended; determining whether the synchronization location marker saved after the last synchronization task ended conforms to the location identifier specification of the source storage terminal; if yes, then determining the synchronization location marker saved after the last synchronization task ended as the currently initialized synchronization location marker; if not, then extracting the location information of the most recently successfully synchronized point from the synchronization log of the source storage terminal as the currently initialized synchronization location marker.

[0009] In one possible implementation, after reading stored data incrementally from the position indicated by the synchronization position marker in the source storage to obtain a data list carrying an integrity identifier, the method further includes: if the integrity identifier indicates that the data list is incomplete, iteratively performing the following steps: updating the position of the last stored data in the data list in the source storage to a new synchronization position marker; continuing to read stored data from the source storage based on the new synchronization position marker to obtain a data list carrying a new integrity identifier; determining whether the new integrity identifier indicates that the data list is complete; if the new integrity identifier indicates that the data list is complete, and / or the amount of stored data read reaches a preset synchronization range threshold, then the iteration ends, and the read stored data is integrated into target stored data according to the storage order in the source storage.

[0010] In one possible implementation, target data to be synchronized to the target storage terminal is selected according to a preset synchronization configuration and preset metadata tags carried by the target storage data. This includes: reading synchronization mode parameters in the preset synchronization configuration, where the synchronization mode parameters include full synchronization and tag-filtered synchronization; if the synchronization mode parameters are configured as full synchronization, the target storage data is added to the candidate set to be synchronized; if the synchronization mode parameters are configured as tag-filtered synchronization, the metadata information of the target storage data is obtained, and preset metadata tags are extracted from the metadata information, where the tag values ​​of the preset metadata tags include a synchronized identifier, a pending processing identifier, and a custom version identifier; the target storage data corresponding to the custom version identifier with the key value of the preset metadata tag is added to the candidate set to be synchronized; if the target storage data does not carry preset metadata tags, the modification time of the target storage data is obtained, and if the modification time is within the preset synchronization time range, the target storage data is added to the candidate set to be synchronized; the target storage data in the candidate set to be synchronized is determined as the target data to be synchronized to the target storage terminal.

[0011] In one possible implementation, before obtaining the current unified time, the method further includes: generating a preset metadata tag when it is detected that new stored data needs to be uploaded to the source storage; determining the tag value of the preset metadata tag according to the data attributes of the new stored data; transmitting the preset metadata tag and the corresponding tag value along with the new stored data to the source storage; and sending a verification command for the new stored data to the source storage to confirm that the source storage has bound the preset metadata tag and the corresponding tag value with the new stored data and persisted it.

[0012] Secondly, embodiments of this application provide a data synchronization device applied to an electronic device, comprising: an actual time determination module, configured to acquire the current unified time and determine the actual time of the current time zone based on the current unified time and pre-configured time zone information of the target storage terminal; a task execution judgment module, configured to determine whether to execute a synchronization task based on the matching result between the actual time of the current time zone and pre-configured synchronization time window parameters; a synchronization position marker initialization module, configured to initialize a synchronization position marker if it is determined that the synchronization task can be executed, wherein the synchronization position marker is used to indicate the position of the stored data at the source storage terminal at the end of the last synchronization task; and a data list acquisition module, configured to add data from the source storage terminal at the position indicated by the synchronization position marker. The system reads stored data to obtain a data list carrying an integrity identifier, where the integrity identifier indicates whether the data list is complete; a target storage data determination module determines the stored data in the data list as the target storage data if the integrity identifier indicates that the data list is complete; a target data filtering module filters the target data to be synchronized to the target storage end according to the preset synchronization configuration and the preset metadata tags carried by the target storage data, where the preset metadata tags are used to identify the synchronization status of the target storage data; and a synchronization position mark update module creates a storage entry corresponding to the target data in the target storage end and updates the synchronization position mark to the position of the stored data in the source storage end at the end of this synchronization task.

[0013] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor;

[0014] The memory stores the instructions that the computer executes;

[0015] The processor executes computer execution instructions stored in memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.

[0016] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.

[0017] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.

[0018] The data synchronization method, apparatus, device, storage medium, and program product provided in this application dynamically update the synchronization position marker when incomplete data is detected, ensuring that each resume transmission starts precisely from the last end position, avoiding the waste of bandwidth and computing resources caused by repeated readings. At the same time, data integrity and reading volume reaching a preset synchronization range threshold are used as dual termination conditions, which not only ensures the continuity and integrity of incremental data, but also prevents synchronization timeouts or resource overloads caused by continuous iteration. Ultimately, it provides a continuous and complete data source for subsequent target storage data filtering, transmission, and target end storage, further improving the reliability and efficiency of incremental synchronization. Attached Figure Description

[0019] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0020] Figure 1 A schematic diagram illustrating a scenario for the data synchronization method provided in an embodiment of this application;

[0021] Figure 2 Flowchart of the data synchronization method provided in the embodiments of this application Figure 1 ;

[0022] Figure 3 Flowchart of the data synchronization method provided in the embodiments of this application Figure 2 ;

[0023] Figure 4 This is a schematic diagram of the structure of the data synchronization device provided in the embodiments of this application;

[0024] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0025] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0026] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0027] To clearly understand the technical solution of this application, we will first provide a detailed introduction to existing solutions. With the advent of the digital age, data has become a core asset for enterprises and individuals, and the need for collaborative management across multiple storage devices is increasingly prominent. Whether it's the interaction between cloud storage and local storage, or the information exchange between different nodes in a distributed system, data synchronization technology plays a crucial role. In existing data synchronization solutions, full synchronization typically involves periodically scanning all data on the source storage device, generating a complete data snapshot, and then transmitting it to the target storage device. The target storage device receives the snapshot and overwrites the original data to ensure consistency. This method is simple to implement, but each synchronization requires processing all data, which consumes significant bandwidth and computing resources when the data volume is large, and the long synchronization cycle makes it difficult to meet the needs of high-frequency update scenarios. Incremental synchronization, as an optimization solution, focuses on reducing the amount of data transmitted by recording data change trajectories. Most solutions deploy a change log module on the source storage device. When data is added, modified, or deleted, the log module records the data's identification information and change time. When the synchronization task starts, it only reads the change log after the last synchronization time point and extracts the corresponding data for transmission. However, existing incremental synchronization schemes only perform synchronization operations according to fixed logic, without fully considering the real-time load status of the target storage end. This causes synchronization tasks to be launched in a concentrated manner when the target storage end is under resource pressure, consuming a large amount of computing and bandwidth resources, affecting the normal operation of core businesses, and reducing overall stability.

[0028] To address the aforementioned technical challenges, the inventors devised a method to determine the target storage's actual time by acquiring the current unified time and combining it with the target storage's time zone information. Based on the matching result between this time and a preset synchronization time window, the timing of the synchronization task execution is precisely controlled to avoid starting during peak business periods at the target storage. During synchronization, a synchronization position marker pointing to the last synchronization end position is initialized. A list of data carrying integrity identifiers is incrementally read from this position to ensure no incremental data is missed. Then, the target data to be synchronized is filtered according to the preset synchronization configuration and the preset metadata tags inherent in the data, reducing invalid transmissions. Finally, a corresponding storage entry is created on the target storage and the synchronization position marker is updated, thereby achieving efficient, low-interference, and highly consistent data synchronization.

[0029] Figure 1 This is a schematic diagram of a scenario for the data synchronization method provided in the embodiments of this application, such as... Figure 1 As shown, the specific application scenarios of this application include: electronic device 101, source storage terminal 102, and target storage terminal 103.

[0030] Among them, electronic device 101, as the main body for executing the synchronization task, establishes communication connections with source storage terminal 102 and target storage terminal 103 through networks such as local area network, wide area network or cloud network, and is responsible for coordinating the entire process logic of data synchronization.

[0031] Among them, the source storage end 102 is the initial storage node for data, such as cloud storage, which can store massive amounts of structured or unstructured data and record the metadata information of the data.

[0032] Among them, the target storage end 103 is the destination node for data synchronization, such as a local file system, which is used to receive and store the target data synchronized from the source storage end 102 in order to achieve data collaboration with the source storage end 102.

[0033] Specifically, electronic device 101 first determines its actual business time based on the unified time and the time zone information of the target storage terminal 103, and judges whether it is within the preset synchronization window. If the conditions are met, electronic device 101 incrementally reads data from the synchronization position mark of the source storage terminal 102, verifies the integrity of the data list through the integrity identifier, and filters out the target data to be synchronized by combining the preset synchronization configuration and the metadata tags of the data. Finally, the target data is transmitted to the target storage terminal 103 and the synchronization position mark is updated to complete a closed-loop synchronization.

[0034] The technical solution of this application and how it solves the above-mentioned technical problems will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.

[0035] Figure 2 Flowchart of the data synchronization method provided in the embodiments of this application Figure 1 The execution subject of this application embodiment is Figure 1 The electronic device shown can also be other devices with similar functions; no specific restrictions are made here, such as... Figure 2 As shown, the method includes:

[0036] S201: Obtain the current unified time and determine the actual time of the current time zone based on the current unified time and the time zone information of the pre-configured target storage terminal.

[0037] Specifically, the electronic device accesses a globally unified time server via the network to obtain the current UTC (Universal Time Coordinated) time as the unified time. Simultaneously, it reads pre-stored time zone information of the target storage device from a local configuration file or remote management platform, such as time zone offset parameters like East 8 or West 5. Subsequently, the electronic device converts the unified time into the current actual time in the target storage device's time zone according to the time zone offset calculation rules—that is, adding the time zone offset to the UTC time.

[0038] For example, if the unified time is UTC08:00 and the target storage is in the East 8th time zone, then the actual time in the current time zone is 16:00.

[0039] S202: Determine whether to execute the synchronization task based on the matching result between the actual time in the current time zone and the pre-configured synchronization time window parameters.

[0040] Specifically, based on the matching result between the actual time in the current time zone and the pre-configured synchronization time window parameters, it is determined whether to execute the synchronization task. This process specifically includes Sa1~Sa6:

[0041] Sa1: Reads the pre-configured synchronization time window parameters, which include the synchronization start time and synchronization end time.

[0042] Specifically, the electronic device reads the synchronization time window parameter through the local configuration interface. This parameter is pre-configured by the user or system administrator and stored in the device's synchronization policy database. The format is structured data containing the synchronization start time and synchronization end time.

[0043] Sa2: Determine whether the synchronization start time is less than or equal to the synchronization end time, and both the synchronization start time and synchronization end time are within the preset range, in order to verify the validity of the synchronization time window parameter.

[0044] Specifically, the electronic device converts the read synchronization start and end times into minutes. First, it checks if the number of minutes corresponding to the start time is less than or equal to the number of minutes corresponding to the end time. If the synchronization start time is configured as 23:00 and the end time as 02:00, which spans the next day's time window, the electronic device converts these into minutes: 23:00 corresponds to 1380 minutes, and 02:00 corresponds to 120 minutes. Directly comparing 1380 ≤ 120 results in a false positive, but the system recognizes this configuration as a cross-day window, from 23:00 of the current day to 02:00 of the next day. This meets the logic that the start and end times form a valid time interval, and therefore the synchronization time window parameter is still considered valid. Simultaneously, it checks if both times are within the reasonable range of 0-1439 minutes, corresponding to 00:00-23:59. If both conditions are met, the synchronization time window parameter is considered valid; otherwise, it is considered invalid.

[0045] Sa3: If the validity check of the synchronization time window parameter fails, the synchronization time window parameter will be set to the preset business off-peak default window parameter.

[0046] Specifically, if the validity check fails, such as when the 600 minutes corresponding to the start time of 10:00 are greater than the 480 minutes corresponding to the end time of 08:00, or when the time exceeds the range of 00:00-23:59, the electronic device will automatically call the preset parameter loading module to read the business off-peak window parameters from the locally built-in default configuration, such as the default start time being 23:00 and the end time being 5:00 the next day, and update the default parameters to the synchronization strategy database, overwriting the original invalid parameters.

[0047] Sa4: If the validity check of the synchronization time window parameter passes, then continue to determine whether the actual time of the current time zone is within the synchronization time window parameter.

[0048] Specifically, if the validity check passes, the electronic device converts the actual time in the current time zone into minutes, and then compares it with the minutes corresponding to the start and end times of the synchronization time window. It determines whether the minutes of the current time are greater than or equal to the minutes of the start time and less than or equal to the minutes of the end time, thereby determining whether the current time is within the synchronization time window.

[0049] Sa5: If the actual time in the current time zone is within the synchronization time window parameter, then the synchronization task execution instruction is triggered.

[0050] Specifically, if the determination result is that the actual time of the current time zone is within the synchronization time window, the electronic device sends a trigger instruction to the synchronization task scheduling module. This instruction contains key parameters such as the unique identifier of the synchronization task and the connection information between the source storage end and the target storage end. After receiving the instruction, the scheduling module updates the synchronization task status from pending trigger to executing, allocates dedicated thread resources for the task, and starts the synchronization process.

[0051] Sa6: If the actual time in the current time zone is not within the synchronization time window parameter, calculate the waiting time until the next synchronization time window opens, release the system resources associated with the synchronization task, and set a timed start mechanism according to the waiting time to preload the system resources required by the synchronization task at a preset time before the waiting time ends.

[0052] Specifically, if the determination result indicates that the actual time in the current time zone is not within the synchronization time window, the electronic device calculates the waiting time: if the current time is later than the window end time, the waiting time is 24 hours - the current time in minutes + the window start time in minutes; if the current time is earlier than the window start time, the waiting time is the window start time in minutes - the current time in minutes. Subsequently, the electronic device releases system resources such as memory buffers and network connections already occupied by the synchronization task. After setting the waiting time through the scheduled task module, it automatically starts the synchronization task and configures the preloading of resources such as source and target storage interface drivers and data verification algorithm libraries required for synchronization 30 minutes before startup to ensure rapid execution upon task startup.

[0053] S203: If it is determined that the synchronization task can be executed, the synchronization position flag is initialized, wherein the synchronization position flag is used to indicate the position of the stored data at the source storage end when the last synchronization task ended.

[0054] Specifically, the process of initializing the synchronization position markers includes Sb1~Sb6:

[0055] Sb1: Determine whether the source storage is executing the synchronization task for the first time.

[0056] Specifically, the electronic device accesses the local synchronization status database to query whether there are historical synchronization records for the source storage device. These historical synchronization records contain information such as the unique identifier of the source storage device, the last synchronization time, and the synchronization location marker. If the query result is empty, it is determined that the source storage device is performing a synchronization task for the first time; if at least one record exists, it is determined that it is not performing the task for the first time.

[0057] Sb2: If it is determined that the source storage is executing the synchronization task for the first time, the synchronization position marker is initialized to the root directory path of the source storage.

[0058] Specifically, if it is determined to be the first time a synchronization task is executed, the electronic device calls the metadata query interface of the source storage to obtain the standard representation of its root directory path. For file system-type source storage, the root directory path may be " / " or "C:\", and for object storage-type source storage, the root directory path may be the bucket name, such as "source-bucket / ". The electronic device uses this root directory path as an initial synchronization position marker and stores it in a field of the local synchronization status database.

[0059] Sb3: If it is determined that the source storage is not executing the synchronization task for the first time, then read the synchronization position marker saved after the last synchronization task ended.

[0060] Specifically, if it is determined that the synchronization task is not being performed for the first time, the electronic device reads the synchronization position marker saved after the last synchronization task was completed from the source storage terminal from the local synchronization status database.

[0061] Sb4: Determine whether the synchronization position marker saved after the last synchronization task ended conforms to the position identifier specification of the source storage.

[0062] Specifically, the electronic device calls the location specification verification tool provided by the source storage terminal, passing the read synchronization location marker as a parameter. The verification tool performs format and validity checks according to the location identifier rules of the source storage terminal, and returns a valid or invalid verification result.

[0063] Sb5: If so, then the synchronization position marker saved after the last synchronization task ended will be used as the currently initialized synchronization position marker.

[0064] Specifically, if the verification result is valid, the electronic device directly marks the synchronization position as the current initial synchronization position and uses it as the starting point for this incremental data reading.

[0065] Sb6: If not, extract the location information of the most recently successfully synchronized point from the synchronization log of the source storage as the current initial synchronization location marker.

[0066] Specifically, if the verification result is invalid, the electronic device obtains the synchronization log file of the source storage through the log query interface of the source storage. The log records the status, timestamp, and end position of each synchronization. The electronic device filters out the log records with a successful status, sorts them in descending order by timestamp, takes the first record, and extracts the synchronization position marker field value of the first record as the currently initialized synchronization position marker.

[0067] S204: Read the stored data from the location increment indicated by the synchronization location marker in the source storage to obtain a data list carrying an integrity identifier, wherein the integrity identifier is used to indicate whether the data list is complete.

[0068] Specifically, the electronic device initiates a data read request through the incremental transmission interface of the source storage terminal based on the synchronization position marker, explicitly specifying the range of incremental data starting from that position. Upon receiving the request, the source storage terminal scans the newly added / modified data after the corresponding position and decides whether to transmit in batches based on the data volume (e.g., a maximum of 100 data entries per batch). Each batch of data includes transmission control information at the beginning, including the total number of data entries to be transmitted, the start sequence number, and the end sequence number. When the source storage terminal completes the transmission of all data, it appends an integrity flag to the last batch of data to indicate complete transmission. If some data is not transmitted due to network interruption, temporary data locking, etc. (e.g., out of a total of 150 entries, only the first 100 are transmitted), an integrity flag is appended to the end of the transmitted data to indicate transmission interruption, and the start position of the untransmitted data is recorded. After receiving the data, the electronic device temporarily stores it in a local cache and parses the integrity flag and transmission control information to confirm the completion status of the current data list's transmission.

[0069] S205: If the integrity identifier indicates that the data list is complete, then the stored data in the data list is determined as the target stored data.

[0070] Specifically, the electronic device parses the integrity identifier carried in the data list. If the identifier indicates complete transmission, and the transmission control information verifies that the current received end sequence number equals the total number of data entries, then it confirms that all incremental data has been completely received without omissions or interruptions. At this point, the electronic device integrates all stored data in the cache into a continuous data sequence according to the storage order of the source storage end, identifies it as the target storage data, and marks the data status as filterable. If the integrity identifier indicates transmission interruption, the electronic device records the starting position of the untransmitted data, does not identify the current data list as the target storage data, but triggers a resume mechanism, sending a supplementary request to the source storage end based on the untransmitted position until it receives the data list with the integrity identifier indicating complete transmission.

[0071] S206: According to the preset synchronization configuration and the preset metadata tags carried by the target storage data, the target data to be synchronized to the target storage end is obtained by filtering. The preset metadata tags are used to identify the synchronization status of the target storage data.

[0072] Specifically, based on the preset synchronization configuration and the preset metadata tags carried by the target storage data, the target data to be synchronized to the target storage end is obtained, including Sc1~Sc6:

[0073] Sc1: Reads the synchronization mode parameters in the preset synchronization configuration, which include full synchronization and tag filtering synchronization.

[0074] Specifically, the electronic device reads the preset synchronization configuration, parses the synchronization mode parameters, which include two types of values: full synchronization and tag-filtered synchronization. For example, the configuration item `sync_mode=full` represents full synchronization, and `sync_mode=tag_filter` represents tag-filtered synchronization. After extracting this parameter through the configuration parsing interface, the electronic device stores it in the `sync_mode` variable of the synchronization task context.

[0075] Sc2: If the synchronization mode parameter is configured as full synchronization, the target stored data will be added to the candidate set to be synchronized.

[0076] Specifically, if the synchronization mode parameter is determined to be full synchronization, the electronic device does not need to perform filtering operations such as tag verification. It directly adds the determined complete target storage data, i.e., all data incrementally read from the source storage, to the candidate set to be synchronized in batches. This candidate set exists in the form of a temporary in-memory data table, and the table structure contains basic information such as unique data identifier, data type, storage path, and data size.

[0077] Sc3: If the synchronization mode parameter is configured as tag-filtered synchronization, then the metadata information of the target stored data is obtained, and the preset metadata tags are extracted from the metadata information. The tag values ​​of the preset metadata tags include the synchronized identifier, the pending identifier, and the custom version identifier.

[0078] Specifically, if the synchronization mode parameter is parsed as tag-filtered synchronization, the electronic device initiates a metadata query request for each identified target stored data to obtain the complete metadata information of that data. Subsequently, a preset custom metadata tag is extracted from the metadata. The tag key name is fixed as x-amz-meta-enfs-tag, and the tag value is a string that conforms to UTF-8 encoding, specifically including three types of values: synced to mark that it has been synchronized, processing to mark that it is not suitable for synchronization, and a custom version identifier to mark specific version / backup attributes, such as v2.1_202410 and backup_q3_2024.

[0079] Sc4: Add the target storage data corresponding to the custom version identifier with the key value of the preset metadata tag to the candidate set to be synchronized.

[0080] Specifically, the electronic device checks each extracted x-amz-meta-enfs-tag value. If the tag value is synced (already synchronized) or processing (pending processing), the data is determined not to need synchronization, marked as skipped, and the reason is recorded. If the tag value is a custom version identifier, such as version number or backup batch identifier, the data is determined to meet the synchronization conditions, and its unique identifier, storage path, data type, and other information are added to the candidate set to be synchronized. At the same time, the version / backup attribute corresponding to the tag is noted in the set.

[0081] Sc5: If the target stored data does not carry a preset metadata tag, obtain the modification time of the target stored data. If the modification time is within the preset synchronization time range, add the target stored data to the candidate set to be synchronized.

[0082] Specifically, when an electronic device traverses the target stored data, if it detects that the metadata of a certain piece of data does not contain the x-amz-meta-enfs-tag (i.e., it does not carry the preset metadata tag), it calls the source storage's interface with a time query parameter to obtain the last modified timestamp of the data. Simultaneously, it reads the preset synchronization time range parameter from the system configuration and converts it into the corresponding timestamp interval. If the data modification timestamp falls within this interval, the data is added to the synchronization candidate set; if it exceeds the interval, it is determined to be historical, untagged, and not recently changed data, and is therefore excluded.

[0083] Sc6: Determine the target storage data in the candidate set to be synchronized as the target data to be synchronized to the target storage end.

[0084] Specifically, the electronic device first performs data cleaning on the candidate set to be synchronized, eliminating duplicate data through unique data identifiers and standardizing the data storage paths. Then, it pre-sets basic attributes based on data types: file data has preset size and permissions, directory data has preset fixed size and permissions, and the timestamp is uniformly preset to the current time. After processing, the electronic device officially identifies this set as the target data to be synchronized to the target storage, generates a synchronization task list containing data IDs, source paths, target paths, data types, and attribute configurations, and temporarily stores it in a local task queue.

[0085] S207: Create a storage entry in the target storage terminal corresponding to the target data, and update the synchronization position marker to the position of the storage data in the source storage terminal at the end of this synchronization task.

[0086] Specifically, the electronic device transmits the selected target data to the target storage terminal in batches through the write interface of the target storage terminal. For each batch of data transmitted, the electronic device calls the entry creation interface of the target storage terminal to generate the corresponding storage entry for the batch of data and waits for the target storage terminal to return a confirmation message of successful creation. After all target data has successfully created storage entries, the electronic device records the position information of the last synchronized data in the source storage terminal at the end of this synchronization task, updates the position information to the local synchronization status record library, overwrites the previous synchronization position mark, and uses it as the starting point of the next synchronization task to complete a synchronization loop.

[0087] In summary, by precisely matching the time window with the target time zone, synchronization tasks are avoided from being executed during peak business periods, reducing interference with core business operations. Synchronization location marking and integrity verification ensure no incremental data is missed, improving synchronization accuracy. Combined with a metadata tagging filtering mechanism, invalid data transmission is eliminated, optimizing resource utilization. The resulting closed-loop mechanism achieves efficient, low-interference, and highly consistent cross-storage data synchronization, significantly improving the stability of data synchronization in multi-storage collaborative scenarios.

[0088] In another embodiment provided in this application, after reading stored data from the source storage end according to the location increment indicated by the synchronization location marker to obtain a data list carrying an integrity identifier, the method further includes:

[0089] S301: If the integrity flag indicates that the data list is incomplete, then iteratively execute the following steps:

[0090] Specifically, the electronic device parses the integrity flag carried in the data list obtained from the source storage. If the flag indicates a transmission interruption, the data list is determined to be incomplete. At this point, the electronic device initiates an iterative reading mechanism, initializes an iteration counter, and executes steps S302-S304 sequentially until the termination condition of S305 is met.

[0091] S302: Update the position of the last stored data in the data list at the source storage end to the new synchronization position marker.

[0092] Specifically, the electronic device traverses the currently incomplete data list, locates the last stored data item, and obtains the specific location information of that data on the source storage end through the source storage end's location resolution interface. The electronic device updates this location information with a new synchronization location marker, overwriting the original marker in the local cache, and uses it as the starting point for the next continuation of the transmission.

[0093] S303: Continue reading stored data from the source storage based on the new synchronization location marker, and obtain a data list carrying the new integrity identifier.

[0094] Specifically, based on the updated new synchronization position marker, the electronic device again calls the incremental read interface of the source storage terminal to request to continue reading subsequent stored data from that position. After receiving the request, the source storage terminal scans the remaining data after the newly marked position and continues to transmit it in the same batch size. At the same time, it carries new transmission control information at the beginning of the data list to be transmitted and appends a new integrity identifier at the end. If all remaining data is transmitted in this transmission, it is marked as a complete transmission; if there is still untransmitted data, it is marked as a transmission interruption and the latest untransmitted position is recorded.

[0095] S304: Determine whether the new integrity flag indicates that the data list is complete.

[0096] Specifically, the new integrity identifier carried by the data list parsed and obtained by the electronic device: if the identifier indicates complete transmission, and the current batch end sequence number is equal to the remaining total number of records after verification by the transmission control information, then the data list for this continued transmission is determined to be complete; if the identifier still indicates transmission interruption, or the actual number of records received is less than the number of records that should be transmitted in the batch, then the data list is determined to be incomplete.

[0097] S305: If the new complete identifier indicates that the data list is complete, and / or the amount of data read from the storage reaches the preset synchronization range threshold, then the iteration ends, and the read storage data is integrated into the target storage data according to the storage order in the source storage.

[0098] Specifically, the electronic device first checks the new integrity identifier. If it indicates a complete transmission, it confirms that all incremental data has been fully received. If the data is incomplete but the cumulative amount of stored data read reaches a preset synchronization range threshold, a forced termination condition is triggered. Once either condition is met, the electronic device terminates the iteration process, extracts all read stored data from the local cache and the resume buffer, and concatenates and integrates it according to the natural storage order of the source storage end to form continuous and complete target stored data.

[0099] In summary, when incomplete data is detected, dynamically updating the synchronization position marker ensures that each resume transmission starts precisely from the last end position, avoiding the waste of bandwidth and computing resources caused by repeated readings. At the same time, using data integrity and the reading volume reaching the preset synchronization range threshold as dual termination conditions not only ensures the continuity and integrity of incremental data, but also prevents synchronization timeouts or resource overloads caused by continuous iteration. Ultimately, it provides a continuous and complete data source for subsequent target storage data filtering, transmission, and target end storage, further improving the reliability and efficiency of incremental synchronization.

[0100] Figure 3 Flowchart of the data synchronization method provided in the embodiments of this application Figure 2 ,like Figure 3 As shown, before obtaining the current unified time, the following steps are also included:

[0101] S401: When new stored data is detected that needs to be uploaded to the source storage, a preset metadata tag will be generated.

[0102] Specifically, when an electronic device detects new stored data that needs to be uploaded to the source storage through the file system listening service or application layer upload interface, it automatically triggers the metadata tag generation logic. This logic calls the preset tag template generator to create a preset metadata tag x-amz-meta-enfs-tag with a fixed key name.

[0103] S402: Determine the tag value of the preset metadata tag based on the data attributes of the new stored data.

[0104] Specifically, the electronic device parses the data attributes of the newly stored data and maps tag values ​​according to preset rules: if the data is automatically backed up by the system and does not require manual review, the tag value is set to a custom version identifier; if the data is user-uploaded data awaiting review, the tag value is set to pending processing; if the data has been confirmed through the pre-process to not need to be synchronized, the tag value is set to synchronized.

[0105] S403: Transfer the preset metadata tags and their corresponding tag values, along with the new storage data, to the source storage.

[0106] Specifically, when constructing an upload request for new stored data, the electronic device embeds the generated preset metadata tags and their key-value pairs into the upload protocol header: for HTTP-based protocols, this is carried through a prefix field; for file system protocols, it is appended through an extended attribute mechanism. Simultaneously, the binary content of the new stored data is sent as the request body to the write interface of the source storage terminal via an encrypted transmission channel.

[0107] S404: Send a verification command for the new stored data to the source storage to confirm that the source storage has bound the preset metadata tags and corresponding tag values ​​to the new stored data and persisted them.

[0108] Specifically, after uploading, the electronic device immediately sends a verification command to the source storage terminal, calling the source storage terminal's metadata query interface and passing in the unique identifier of the newly stored data. Upon receiving the command, the source storage terminal queries its internal metadata storage to verify whether the data has been bound to the preset metadata tag and tag value, and checks whether the tag has been written to persistent storage. The source storage terminal returns a verification response containing the binding status and persistence result. The electronic device parses the response: if both are successful, it records that the tag binding is complete; if it fails, it triggers a retry mechanism; if it still fails, it generates an alarm log and notifies the administrator.

[0109] In summary, by completing the generation, value determination, association transmission, and binding verification of preset metadata tags before uploading new stored data to the source storage, a solid foundation is laid from the source for the tag filtering logic of subsequent incremental synchronization.

[0110] Figure 4 This is a schematic diagram of the structure of the data synchronization device provided in the embodiments of this application, as shown below. Figure 4 As shown, the data synchronization device provided in this embodiment includes: an actual time determination module 401, a task execution judgment module 402, a synchronization position mark initialization module 403, a data list acquisition module 404, a target storage data determination module 405, a target data filtering module 406, and a synchronization position mark update module 407.

[0111] The actual time determination module 401 is used to obtain the current unified time and determine the actual time of the current time zone based on the current unified time and the time zone information of the pre-configured target storage terminal.

[0112] The task execution judgment module 402 is used to determine whether to execute the synchronization task based on the matching result between the actual time of the current time zone and the pre-configured synchronization time window parameters.

[0113] The synchronization position marker initialization module 403 is used to initialize the synchronization position marker if it is determined that the synchronization task can be executed. The synchronization position marker is used to indicate the position of the stored data at the source storage end when the last synchronization task ended.

[0114] The data list acquisition module 404 is used to read stored data from the source storage end by the location increment indicated by the synchronous location marker, so as to obtain a data list carrying an integrity identifier, wherein the integrity identifier is used to indicate whether the data list is complete.

[0115] The target storage data determination module 405 is used to determine the stored data in the data list as the target storage data if the integrity identifier indicates that the data list is complete.

[0116] The target data filtering module 406 is used to filter the target data to be synchronized to the target storage end according to the preset synchronization configuration and the preset metadata tags carried by the target storage data. The preset metadata tags are used to identify the synchronization status of the target storage data.

[0117] The synchronization location marker update module 407 is used to create a storage entry corresponding to the target data in the target storage end, and update the synchronization location marker to the position of the storage data in the source storage end at the end of this synchronization task.

[0118] In one possible implementation, the task execution judgment module 402 is specifically used to read pre-configured synchronization time window parameters, which include synchronization start time and synchronization end time; determine whether the synchronization start time is less than or equal to the synchronization end time, and whether both the synchronization start time and synchronization end time are within a preset range, to verify the validity of the synchronization time window parameters; if the validity verification of the synchronization time window parameters fails, the synchronization time window parameters are set to the preset business off-peak default window parameters; if the validity verification of the synchronization time window parameters passes, it continues to determine whether the actual time of the current time zone is within the synchronization time window parameters; if the actual time of the current time zone is within the synchronization time window parameters, the synchronization task execution instruction is triggered; if the actual time of the current time zone is not within the synchronization time window parameters, the waiting time is calculated from the time until the next synchronization time window opens, the system resources associated with the synchronization task are released, and a timed start mechanism is set according to the waiting time to preload the system resources required by the synchronization task at a preset time before the waiting time ends.

[0119] In one possible implementation, the synchronization position marker initialization module 403 is specifically used to determine whether the source storage end is executing the synchronization task for the first time;

[0120] If it is determined that the source storage is executing a synchronization task for the first time, the synchronization location marker is initialized to the root directory path of the source storage. If it is determined that the source storage is not executing a synchronization task for the first time, the synchronization location marker saved after the last synchronization task ends is read. It is then determined whether the synchronization location marker saved after the last synchronization task ends conforms to the location identifier specification of the source storage. If yes, the synchronization location marker saved after the last synchronization task ends is determined as the currently initialized synchronization location marker. If not, the location information of the most recently successfully synchronized point is extracted from the synchronization log of the source storage as the currently initialized synchronization location marker.

[0121] In one possible implementation, the data synchronization device further includes a data iterative reading module. This module iteratively executes the following steps if the integrity identifier indicates that the data list is incomplete: updating the position of the last stored data item in the data list at the source storage end to a new synchronization position marker; continuing to read stored data from the source storage end based on the new synchronization position marker to obtain a data list carrying the new integrity identifier; determining whether the new integrity identifier indicates that the data list is complete; if the new integrity identifier indicates that the data list is complete, and / or the amount of stored data read reaches a preset synchronization range threshold, then the iteration ends, and the read stored data is integrated into target stored data according to its storage order at the source storage end.

[0122] In one possible implementation, the target data filtering module 406 reads the synchronization mode parameters in the preset synchronization configuration, where the synchronization mode parameters include full synchronization and tag-filtered synchronization. If the synchronization mode parameter is configured as full synchronization, the target stored data is added to the candidate set to be synchronized. If the synchronization mode parameter is configured as tag-filtered synchronization, the metadata information of the target stored data is obtained, and preset metadata tags are extracted from the metadata information. The tag values ​​of the preset metadata tags include a synchronized identifier, a pending processing identifier, and a custom version identifier. The target stored data corresponding to the custom version identifier with the key value of the preset metadata tag is added to the candidate set to be synchronized. If the target stored data does not carry a preset metadata tag, the modification time of the target stored data is obtained. If the modification time is within the preset synchronization time range, the target stored data is added to the candidate set to be synchronized. The target stored data in the candidate set to be synchronized is determined as the target data to be synchronized to the target storage end.

[0123] In one possible implementation, the data synchronization device further includes a tag configuration module. The tag configuration module is used to generate a preset metadata tag when it detects that new stored data needs to be uploaded to the source storage end; determine the tag value of the preset metadata tag according to the data attributes of the new stored data; transmit the preset metadata tag and the corresponding tag value along with the new stored data to the source storage end; and send a verification command for the new stored data to the source storage end to confirm that the source storage end has bound the preset metadata tag and the corresponding tag value with the new stored data and persisted it.

[0124] The data synchronization device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0125] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 5 As shown, the electronic device provided in this embodiment includes at least one processor 501 and a memory 502. Optionally, the electronic device further includes a communication component 503. The processor 501, memory 502, and communication component 503 are connected via a bus 504.

[0126] In a specific implementation, at least one processor 501 executes computer execution instructions stored in memory 502, causing at least one processor 501 to perform the above-described method.

[0127] The specific implementation process of processor 501 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0128] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0129] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0130] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0131] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0132] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.

[0133] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0134] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.

[0135] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0136] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0137] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0138] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0139] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0140] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A data synchronization method, characterized in that, Applied to electronic devices, including: Obtain the current unified time, and determine the actual time in the current time zone based on the current unified time and the pre-configured time zone information of the target storage terminal; Based on the matching result between the actual time in the current time zone and the pre-configured synchronization time window parameters, determine whether to execute the synchronization task; If it is determined that the synchronization task can be executed, the synchronization location marker is initialized, wherein the synchronization location marker is used to indicate the location of the stored data at the source storage end when the last synchronization task ended. Read the stored data incrementally from the location indicated by the synchronization location marker in the source storage terminal to obtain a data list carrying an integrity identifier, wherein the integrity identifier is used to indicate whether the data list is complete; If the integrity identifier indicates that the data list is complete, then the stored data in the data list is determined as the target stored data; According to the preset synchronization configuration and the preset metadata tags carried by the target storage data, the target data to be synchronized to the target storage end is obtained by filtering, wherein the preset metadata tags are used to identify the synchronization status of the target storage data; Create a storage entry corresponding to the target data in the target storage terminal, and update the synchronization position marker to the position of the stored data in the source storage terminal at the end of this synchronization task.

2. The method according to claim 1, characterized in that, The step of determining whether to execute a synchronization task based on the matching result between the actual time of the current time zone and the pre-configured synchronization time window parameters includes: Read the pre-configured synchronization time window parameters, which include the synchronization start time and synchronization end time; Determine whether the synchronization start time is less than or equal to the synchronization end time, and both the synchronization start time and the synchronization end time are within a preset range, in order to verify the validity of the synchronization time window parameter; If the validity check of the synchronization time window parameter fails, the synchronization time window parameter will be set to the preset business off-peak default window parameter. If the validity check of the synchronization time window parameter passes, then it is further determined whether the actual time of the current time zone is within the synchronization time window parameter; If the actual time in the current time zone is within the synchronization time window parameter, then the synchronization task execution instruction is triggered; If the actual time in the current time zone is not within the synchronization time window parameter, the waiting time is calculated from the time until the next synchronization time window opens. The system resources associated with the synchronization task are released, and a timed start mechanism is set according to the waiting time to preload the system resources required by the synchronization task at a preset time before the waiting time ends.

3. The method according to claim 1, characterized in that, The initialization of the synchronization position marker includes: Determine whether the source storage terminal is executing the synchronization task for the first time; If it is determined that the source storage is executing the synchronization task for the first time, then the synchronization location marker is initialized to the root directory path of the source storage. If it is determined that the source storage is not executing the synchronization task for the first time, then the synchronization position marker saved after the last synchronization task ended is read. Determine whether the synchronization location marker saved after the last synchronization task ended conforms to the location identifier specification of the source storage end; If so, the synchronization position marker saved after the last synchronization task ended will be determined as the currently initialized synchronization position marker; If not, the location information of the most recently successfully synchronized point is extracted from the synchronization log of the source storage terminal as the current initialized synchronization location marker.

4. The method according to claim 1, characterized in that, After reading the stored data incrementally from the position indicated by the synchronization position marker in the source storage to obtain a data list carrying integrity identifiers, the method further includes: If the integrity flag indicates that the data list is incomplete, then the following steps are performed iteratively: Update the position of the last stored data in the data list at the source storage end to a new synchronization position marker; Based on the new synchronization location marker, continue reading stored data from the source storage end to obtain a data list carrying the new integrity identifier; Determine whether the new integrity identifier indicates that the data list is complete; If the new complete identifier indicates that the data list is complete, and / or the amount of data read from the storage reaches a preset synchronization range threshold, then the iteration ends, and the read storage data is integrated into the target storage data according to the storage order in the source storage.

5. The method according to claim 1, characterized in that, The step of filtering the target data to be synchronized to the target storage terminal according to the preset synchronization configuration and the preset metadata tags carried by the target storage data includes: Read the synchronization mode parameters in the preset synchronization configuration, wherein the synchronization mode parameters include full synchronization and tag filtering synchronization; If the synchronization mode parameter is configured as full synchronization, then the target stored data is added to the candidate set to be synchronized; If the synchronization mode parameter is configured as tag filtering synchronization, then the metadata information of the target stored data is obtained, and the preset metadata tag is extracted from the metadata information, wherein the tag value of the preset metadata tag includes a synchronized identifier, a pending identifier, and a custom version identifier; Add the target storage data corresponding to the custom version identifier, whose key value is the preset metadata tag, to the candidate set to be synchronized; If the target stored data does not carry the preset metadata tag, then the modification time of the target stored data is obtained. If the modification time is within the preset synchronization time range, then the target stored data is added to the candidate set to be synchronized. The target storage data in the candidate set to be synchronized is determined as the target data to be synchronized to the target storage terminal.

6. The method according to any one of claims 1-5, characterized in that, Before obtaining the current unified time, the process also includes: When new stored data is detected that needs to be uploaded to the source storage, a preset metadata tag will be generated. Based on the data attributes of the newly stored data, determine the tag value of the preset metadata tag; The preset metadata tags and their corresponding tag values, along with the new storage data, are transmitted to the source storage terminal. A verification command for the new stored data is sent to the source storage terminal to confirm that the source storage terminal binds the preset metadata tag and the corresponding tag value to the new stored data and persists it.

7. A data synchronization device, characterized in that, Applied to electronic devices, including: The actual time determination module is used to obtain the current unified time and determine the actual time of the current time zone based on the current unified time and the time zone information of the pre-configured target storage terminal. The task execution judgment module is used to determine whether to execute the synchronization task based on the matching result between the actual time of the current time zone and the pre-configured synchronization time window parameters. The synchronization position marker initialization module is used to initialize the synchronization position marker if it is determined that the synchronization task can be executed, wherein the synchronization position marker is used to indicate the position of the stored data at the source storage end when the last synchronization task ended. The data list acquisition module is used to read stored data from the position increment indicated by the synchronization position marker in the source storage terminal to obtain a data list carrying an integrity identifier, wherein the integrity identifier is used to indicate whether the data list is complete. The target storage data determination module is used to determine the stored data in the data list as the target storage data if the integrity identifier indicates that the data list is complete. The target data filtering module is used to filter target data to be synchronized to the target storage terminal according to the preset synchronization configuration and the preset metadata tag carried by the target storage data, wherein the preset metadata tag is used to identify the synchronization status of the target storage data; The synchronization location marker update module is used to create a storage entry corresponding to the target data in the target storage terminal, and update the synchronization location marker to the position of the stored data in the source storage terminal at the end of this synchronization task.

8. An electronic device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 6.

10. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method described in any one of claims 1 to 6.