A data synchronization method, device and medium for multiple data sources
By using time wheels and dynamically adjusting time steps during multi-data source synchronization, the problems of uneven synchronization, waste of resources and data distortion are solved, and more uniform and accurate data synchronization is achieved, saving resources and reducing high concurrency pressure.
Patent Information
- Application Number
- CN202411250095.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2044-09-06
AI Technical Summary
During the multi-source data synchronization process, problems such as uneven synchronization, waste of node resources, and data distortion.
The time round is used for data synchronization, the time round length is determined according to the number of multiple data sources, and the time step length of each data source is dynamically adjusted to ensure the uniformity and accuracy of the data synchronization process.
The data synchronization during the multi-data source synchronization process is achieved more uniformly, and the data changes are closer to reality, saving nodes and hardware resources, and reducing the pressure on the database by high concurrency.
Smart Images

Figure CN119202082B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of multi-source data synchronization, and in particular to a method, device and medium for synchronizing data from multiple sources. Background Art
[0002] In information systems, it is often necessary to synchronize data from multiple data sources to business systems.
[0003] In the process of multi-source synchronization, multiple data sources often have multi-source concurrency, large data unit time changes, and uneven data distribution. Traditional information systems usually use a multi-node approach to evenly distribute multiple data sources to each node, and each node processes the data source uniformly through multi-threading and other technologies. However, in the multi-node data processing method, there is usually only data synchronization service on the node and no other business services. This will cause the node to be idle when the data synchronization is idle, resulting in a waste of resources. In addition, multi-node sampling usually cannot truly reflect the actual data situation, which may cause data distortion in certain cases. Summary of the invention
[0004] The present invention provides a data synchronization method, device and medium for multiple data sources, which are used to solve the technical problems of synchronization unevenness, node resource waste and data distortion that occur during the multi-source data synchronization process.
[0005] The present invention adopts the following technical solutions:
[0006] In a first aspect, the present invention provides a method for synchronizing data from multiple data sources, the method comprising: determining multiple data sources corresponding to data to be synchronized, and determining a time wheel length according to the number of the multiple data sources; dividing an equal time step Δt for each data source on the time wheel; performing data synchronization on the multiple data sources in sequence based on the time wheel; and estimating the time steps Δt corresponding to the multiple data sources on the next time wheel according to the data synchronization time and the amount of unprocessed data within the time step Δt. 1 , and update Δt to Δt 1 ; Continue to synchronize data for the multiple data sources in sequence according to the next time round until the data synchronization process of the data to be synchronized is completed.
[0007] In a possible implementation of the present invention, the length of the time wheel is determined based on the product of the number of the multiple data sources and the time step Δt, including: the length of the time wheel is the product of the number of the multiple data sources and the time step plus a feedback time, and the feedback time is used to indicate the time taken by the multiple data sources to feed back the data synchronization results corresponding to the time wheel.
[0008] In a possible implementation of the present invention, the length of the time wheel is no longer than 1 minute.
[0009] In a possible implementation of the present invention, the time steps Δt corresponding to the multiple data sources in the next time round are estimated. 1 , including: calculating the synchronization curve derivative according to the amount of synchronization data of each data source within the data synchronization time and the amount of unprocessed data within the time step Δt; calculating the time step Δt of each data source in the next time round according to the synchronization curve derivative corresponding to each data source 1 .
[0010] In a possible implementation of the present invention, on the time wheel, the time step Δt is composed of data synchronization time and data processing time, and the allocation ratio of the data synchronization time to the data processing time is 1:1.
[0011] In a possible implementation of the present invention, the method further includes: after executing one time round, reallocating the ratio of the data synchronization time to the data processing time within the corresponding time step Δt of each data source according to the data synchronization time and the amount of unprocessed data, and increasing the proportion of the data processing time; storing the unprocessed data in a to-be-processed queue of the corresponding data source.
[0012] In a possible implementation of the present invention, the method further includes: in the next time round, when a data source with an amount of unprocessed data performs data synchronization, the data stored in the queue to be processed is preferentially processed within its corresponding data processing time.
[0013] In a possible implementation of the present invention, the method further includes: if any data source among the multiple data sources has no synchronization data in N consecutive time rounds, marking the any data source as a no-data mode; and not allocating the time step Δt to the data source marked as a no-data mode in the next time round.
[0014] In a second aspect, the present invention further provides a data synchronization device for multiple data sources, the device comprising: at least one processor; and a memory in communication connection with the at least one processor; wherein the memory stores instructions executable by the at least one processor, so that the at least one processor can execute: determining multiple data sources corresponding to the data to be synchronized, so as to determine the length of the time wheel according to the number of the multiple data sources; dividing each data source into equal time steps Δt on the time wheel; synchronizing the data for the multiple data sources in sequence based on the time wheel; and estimating the time steps Δt corresponding to the multiple data sources on the next time wheel according to the data synchronization time and the amount of unprocessed data within the time step Δt.1 , and update Δt to Δt 1 ; Continue to synchronize data for the multiple data sources in sequence according to the next time round until the data synchronization process of the data to be synchronized is completed.
[0015] In a third aspect, the present invention further provides a non-volatile computer storage medium having computer executable instructions stored thereon, wherein the computer executable instructions are configured to execute: determining multiple data sources corresponding to data to be synchronized, so as to determine the length of the time wheel according to the number of the multiple data sources; dividing each data source into equal time steps Δt on the time wheel; performing data synchronization on the multiple data sources in sequence based on the time wheel; and estimating the time steps Δt corresponding to the multiple data sources on the next time wheel according to the data synchronization time and the amount of unprocessed data within the time step Δt. 1 , and update Δt to Δt 1 ; Continue to synchronize data for the multiple data sources in sequence according to the next time round until the data synchronization process of the data to be synchronized is completed.
[0016] The present invention provides a method, device and medium for synchronizing data from multiple data sources, which have the following beneficial effects:
[0017] The present invention performs data synchronization through a time wheel, and the time step of each data source on the time wheel can be adjusted according to the feedback of the synchronization result of the previous time wheel or the amount of unprocessed data of each data source on the previous time wheel. The allocation on the time wheel can be adjusted in time to make the time step distribution of each data source on the time wheel more reasonable, and can achieve more uniform data synchronization and closer to the reality of data changes in the multi-data source synchronization process than the traditional multi-source data synchronization. At the same time, the present invention uses the solution of data synchronization using the time wheel to avoid the traditional solution of using multiple nodes, which can significantly save nodes and hardware resources. At the same time, when the multi-source data is highly concurrent, the data can be smoothed out through the time wheel to fill the valleys, thereby alleviating the pressure of the high-concurrency data on the database. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0019] Figure 1 A flow chart of a data synchronization method for multiple data sources provided by the present invention;
[0020] Figure 2A schematic diagram of the structure of a data synchronization device for multiple data sources provided by the present invention. DETAILED DESCRIPTION
[0021] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0022] Aiming at the problems of uneven synchronization, waste of node resources and data distortion in the process of multi-source data synchronization in traditional information systems, the present invention proposes a multi-source data synchronization method based on time-rotating elastic time step, which aims to synchronize multiple data sources through time wheel under the premise of saving node resources. During the data synchronization process, according to the time of this data synchronization and the number of unprocessed data in the elastic time step Δt, after each time rotation, the elastic time step Δt of each data source is dynamically adjusted. 1 , to achieve uniform synchronization of multiple data sources and ensure that the synchronized data can truly reflect the actual data.
[0023] The method of the present invention is described in detail below with reference to the accompanying drawings.
[0024] Figure 1 A flow chart of a data synchronization method for multiple data sources provided by the present invention, such as Figure 1 As shown, the multi-source data synchronization method in the present invention at least includes the following execution steps:
[0025] Step 101: Determine multiple data sources corresponding to the data to be synchronized, and determine the length of the time wheel according to the number of the multiple data sources.
[0026] The data synchronization method proposed in the present invention is aimed at multi-source data, that is, these data come from different databases or data tables and have different sources. When performing data synchronization, it is necessary to first determine the number of multiple data sources corresponding to the data to be synchronized, and then determine the length of the time wheel based on the number of multiple data sources.
[0027] In a possible implementation of the present invention, the length of the time wheel is determined by the product of the number of multiple data sources and the time step of each data source, where the time step refers to the time allocated to each data source on the time wheel, during which the data source should complete the data synchronization and processing process. In one example, at the beginning of the data synchronization process, that is, the time step initially allocated to each data source is the same, and is subsequently adjusted according to actual data synchronization feedback.
[0028] Furthermore, a feedback time can be added to the length of the time wheel in the present invention. During the feedback time, each data source reports the data synchronization status in the current time wheel to provide a basis for adjusting the time allocation of the next time wheel. In this way, the length of the time wheel becomes the product of the number of multiple data sources and the time step, plus the feedback time.
[0029] Step 102: On the time wheel, divide each data source into equal time steps Δt.
[0030] After the length of the time wheel is determined, the construction of the time wheel is completed, and then an equal time step Δt is allocated to each data source on the time wheel.
[0031] In a possible implementation of the present invention, when the number of multiple data sources is determined, the division of the time step should be reasonably set, preferably to be able to complete more than one time rotation within a unit minute. In this way, when data can be processed as quickly as possible within the time step Δt, data synchronization can more realistically reflect the changes in actual data. Therefore, the length of the time wheel in the present invention generally does not exceed 1 minute.
[0032] Step 103: synchronize data on multiple data sources in sequence based on the time wheel.
[0033] After the time step is divided on the time wheel, a data synchronization process is performed based on the time wheel. After the time wheel is completed, the time wheel is adjusted again.
[0034] Step 104: according to the data synchronization time and the amount of unprocessed data within the time step Δt, estimate the time step Δt corresponding to each of the multiple data sources in the next time round. 1 , and update Δt to Δt 1 .
[0035] In a possible implementation of the present invention, after the time round is completed, a synchronization curve derivative is calculated by the amount of data synchronization and the amount of unprocessed data within the time step Δt. In one example, the derivative can be calculated by the ratio between the two, and then the time step Δt of each data source in the next time round is calculated based on the synchronization curve derivative. 1 , and update Δt to Δt 1 .
[0036] Furthermore, when adjusting the time step, it can be achieved by adjusting the data synchronization time and data processing time within the time step. In the initial time wheel, the data synchronization time and the data processing time are divided into the time step in a ratio of 1:1. After the initial time wheel is completed, the proportion of data synchronization time and data processing time is redivided according to the amount of unprocessed data of each data source within the data processing time. However, the proportion of data processing time will be increased during the division, providing more time for the data processing process and reducing the accumulated amount of unprocessed data.
[0037] Furthermore, each data source has a corresponding data queue to be processed. After a time round is completed, if one or several data sources have unprocessed data, the unprocessed data will be stored in the corresponding queue to be processed, and when the data processing time on the next time round begins, the data stored in the queue to be processed will be processed first. At the same time, the allocation ratio of data processing time will be increased or decreased according to the amount of data stored or accumulated in the queue to be processed.
[0038] Step 105: Continue to synchronize data on multiple data sources in sequence according to the next time round until the data synchronization process of the data to be synchronized is completed.
[0039] After the next time round is obtained, the data synchronization process is continued based on the next time round, and this cycle is repeated. After each data synchronization process is executed, the time step allocation on the next time round and the allocation ratio of data synchronization time and data processing time within the time step are adjusted according to the feedback execution result, so that multiple data sources can better complete the data synchronization process on the time round.
[0040] In a possible implementation of the present invention, if one or several of the multiple data sources have no synchronized data in N consecutive time rounds, the one or several data sources will be marked as no-data mode. At the same time, the data source marked as no-data mode will not be allocated a time step Δt in the next time round.
[0041] In order to explain the data synchronization method in the present invention in more detail, the present invention also provides the following supplementary description.
[0042] The data synchronization method for multiple data sources proposed in the present invention may also include the following process:
[0043] 1) It can process more than one data source. In a single data source, the time step Δt remains unchanged, which is the same as regular data synchronization. When processing more than two data sources, in the initial stage, each data source executes the same elastic time step Δt in the time wheel; in the running stage, based on the current data synchronization of the data source and the number of unprocessed data in this time step Δt, after the time wheel completes a rotation synchronization, the next time step of each data source is estimated by calculation, so as to dynamically adjust the time step Δt of each data source in the time wheel.
[0044] 2) A complete time wheel is equal to the number of data sources S*time step Δt+feedback processing time. When the number of data sources is fixed, the time step Δt needs to be set reasonably. It is best to complete more than one time wheel within a unit minute. In this way, when the time step Δt can process data as quickly as possible, data synchronization can more realistically reflect the changes in data in reality. During the feedback processing time, the time step Δt of multiple data sources will be dynamically adjusted according to the feedback, and the data synchronization time and data processing time within the time step Δt will also be adjusted synchronously according to the feedback.
[0045] 3) After the first execution of a time round, a synchronization curve derivative is calculated based on the number of synchronized data of each data source in this time round and the remaining unprocessed number within the time step Δt, and the next time step Δt of each data source is calculated based on the derivative of each data source.
[0046] 4) The time step Δt of each data source can be basically divided into data synchronization time and data processing time. During the first execution, the ratio of data synchronization time to data processing time is 1:1. After executing one time round, the ratio of the two times is redistributed according to the synchronous sampling derivatives of each data source and the remaining unprocessed functions.
[0047] 5) If a data source has almost no data in the set N time rounds, then in the subsequent N time rounds, the data source will be marked as no data mode and will not participate in time allocation; if a data source shows a trend of increasing data in the time round, the allocated time step will be increased in the time round time allocation. Only when the data shows a downward trend, the time step will be synchronously allocated downward until the normal ratio is restored.
[0048] 6) If the synchronization data of the data source is not completed within the data processing time, the unfinished data will be placed in the pending data queue of the data source. In the next time round, the time step Δt of the data source will reduce the proportion of data synchronization time and increase the proportion of data processing time, and give priority to the data being processed in the data processing time. If the number of unprocessed data in the pending queue shows an increasing trend, then the time step Δt will continue to reduce the proportion of data synchronization time and increase the proportion of data processing time. If a certain warning value is reached, the data synchronization time will no longer be allocated time, and all time steps Δt will be allocated to the data processing time to process the backlog data until it is reduced to below the warning value, and then the data synchronization time and data processing time will be re-allocated in proportion.
[0049] Based on the same inventive concept, the present invention also provides a data synchronization device with multiple data sources, the structure of which is as follows: Figure 2 shown.
[0050] Figure 2 The present invention provides a schematic diagram of the structure of a multi-data source data synchronization device. Figure 2 As shown, the data synchronization device 200 for multiple data sources in the present invention specifically includes: at least one processor 201; and a memory 203 that is communicatively connected to the at least one processor 201 (connected via a bus 202); wherein the memory 203 stores instructions that can be executed by the at least one processor 201, so that the at least one processor 201 can execute a data synchronization method for multiple data sources as described in the above embodiment.
[0051] In a possible implementation of the present invention, the aforementioned processor is used to execute: determine multiple data sources corresponding to the data to be synchronized, so as to determine the length of the time wheel according to the number of the multiple data sources; divide equal time steps for each data source on the time wheel; synchronize the data of the multiple data sources in sequence based on the time wheel; estimate the time steps corresponding to the multiple data sources in the next time wheel according to the data synchronization time and the amount of unprocessed data within the time step, and update them to; continue to synchronize the data of the multiple data sources in sequence according to the next time wheel until the data synchronization process of the data to be synchronized is completed.
[0052] In addition, the present invention further provides a non-volatile computer storage medium on which computer executable instructions are stored. The computer executable instructions are configured to execute a data synchronization method for multiple data sources as described in the above embodiment.
[0053] In one possible implementation of the present invention, the aforementioned computer executable instructions are configured to execute, determine multiple data sources corresponding to the data to be synchronized, so as to determine the length of the time wheel according to the number of the multiple data sources; divide equal time steps for each data source on the time wheel; synchronize the data of the multiple data sources in sequence based on the time wheel; estimate the time steps corresponding to the multiple data sources in the next time wheel according to the data synchronization time and the amount of unprocessed data within the time step, and update them to; continue to synchronize the data of the multiple data sources in sequence according to the next time wheel until the data synchronization process of the data to be synchronized is completed.
[0054] Each embodiment of the present invention is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the IoT device and medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0055] The system and medium provided by the present invention correspond one-to-one to the method, and therefore, the system and medium also have similar beneficial technical effects to the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the system and medium will not be repeated here.
[0056] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0057] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0058] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0059] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0060] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0061] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0062] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0063] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0064] The above are only embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A data synchronization method for multiple data sources, characterized in that: The method comprises: Determine a plurality of data sources corresponding to the data to be synchronized, and determine the length of the time wheel according to the number of the plurality of data sources; On the time wheel, divide each data source into equal time steps ; Synchronizing the data of the multiple data sources in sequence based on the time wheel; According to the time step The data synchronization time and the amount of unprocessed data within the time period are estimated, and the time steps corresponding to the multiple data sources in the next time round are estimated. , and Updated to , including: the amount of data synchronized by each data source during the data synchronization time and the time step The amount of unprocessed data in the calculation, the derivative of the synchronization curve is calculated, and the time step of each data source in the next time round is calculated according to the derivative of the synchronization curve corresponding to each data source. ; On the time wheel, the time step It is composed of data synchronization time and data processing time, and the allocation ratio of data synchronization time to data processing time is 1:
1. After executing a time round, the corresponding time step is reallocated in the next time round according to the data synchronization time and unprocessed data volume corresponding to each data source. The ratio of internal data synchronization time to data processing time is increased, and the unprocessed data is stored in the waiting queue of the corresponding data source; The data synchronization of the multiple data sources continues in sequence according to the next time round until the data synchronization process of the data to be synchronized is completed.
2. A method for synchronizing data from multiple data sources according to claim 1, characterized in that: The time wheel length is determined according to the number of the plurality of data sources and the time step length. The product between is determined by: The time wheel length is the product of the number of the multiple data sources and the time step, plus the feedback time, and the feedback time is used to indicate the time taken by the multiple data sources to feedback the data synchronization results corresponding to the time wheel.
3. A method for synchronizing data from multiple data sources according to claim 2, characterized in that: The length of the time wheel is no longer than 1 minute.
4. The method for synchronizing data from multiple data sources according to claim 1, characterized in that: The method further comprises: In the next time round, when a data source with unprocessed data volume performs data synchronization, the data stored in the queue to be processed is processed preferentially within its corresponding data processing time.
5. The method for synchronizing data from multiple data sources according to claim 1, characterized in that: The method further comprises: If any data source among the multiple data sources has no synchronization data in N consecutive time rounds, then the any data source is marked as a no-data mode; In the next time round, the time step is not allocated to the data source marked as no data mode. .
6. A data synchronization device for multiple data sources, characterized in that: The device comprises: 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 to enable the at least one processor to: Determine a plurality of data sources corresponding to the data to be synchronized, and determine the length of the time wheel according to the number of the plurality of data sources; On the time wheel, divide each data source into equal time steps ; Synchronizing the data of the multiple data sources in sequence based on the time wheel; According to the time step The data synchronization time and the amount of unprocessed data within the time period are estimated, and the time steps corresponding to the multiple data sources in the next time round are estimated. , and Updated to , including: the amount of data synchronized by each data source during the data synchronization time and the time step The amount of unprocessed data in the calculation, the derivative of the synchronization curve is calculated, and the time step of each data source in the next time round is calculated according to the derivative of the synchronization curve corresponding to each data source. ; On the time wheel, the time step It is composed of data synchronization time and data processing time, and the allocation ratio of data synchronization time to data processing time is 1:
1. After executing a time round, the corresponding time step is reallocated in the next time round according to the data synchronization time and unprocessed data volume corresponding to each data source. The ratio of internal data synchronization time to data processing time is increased, and the unprocessed data is stored in the waiting queue of the corresponding data source; The data synchronization of the multiple data sources continues in sequence according to the next time round until the data synchronization process of the data to be synchronized is completed.
7. A non-volatile computer storage medium having computer executable instructions stored thereon, characterized in that: The computer executable instructions are configured to perform: Determine a plurality of data sources corresponding to the data to be synchronized, and determine the length of the time wheel according to the number of the plurality of data sources; On the time wheel, divide each data source into equal time steps ; Synchronizing the data of the multiple data sources in sequence based on the time wheel; According to the time step The data synchronization time and the amount of unprocessed data within the time period are estimated, and the time steps corresponding to the multiple data sources in the next time round are estimated. , and Updated to , including: the amount of data synchronized by each data source during the data synchronization time and the time step The amount of unprocessed data in the calculation, the derivative of the synchronization curve is calculated, and the time step of each data source in the next time round is calculated according to the derivative of the synchronization curve corresponding to each data source. ; On the time wheel, the time step It is composed of data synchronization time and data processing time, and the allocation ratio of data synchronization time to data processing time is 1:
1. After executing a time round, the corresponding time step is reallocated in the next time round according to the data synchronization time and unprocessed data volume corresponding to each data source. The ratio of internal data synchronization time to data processing time is increased, and the unprocessed data is stored in the waiting queue of the corresponding data source; The data synchronization of the multiple data sources continues in sequence according to the next time round until the data synchronization process of the data to be synchronized is completed.
Citation Information
Patent Citations
Data synchronization method and device, computer equipment and readable storage medium
CN112612583A
Multi-source data processing method, device and system and storage medium
CN114286316A