Data synchronization processing method and device, electronic equipment and storage medium
By dividing the existing data primary key and reading in parallel, and processing the change log data in parallel during the data synchronization process, the problems of low processing efficiency of existing data and delay in real-time update of incremental data in the prior art are solved, and efficient data synchronization processing is achieved.
Patent Information
- Application Number
- CN202411900701.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-03-18
AI Technical Summary
Existing data synchronization methods are difficult to efficiently process large-scale stock data, and may face delay and effectiveness problems in real-time updates of incremental data.
By obtaining the query primary key of the existing data, the primary key division of the existing data is divided into the primary key division queue, and while performing the incremental change log capture task, multiple existing data query tasks are simultaneously executed to realize parallel reading of the existing data and parallel processing of the change log.
It improves the query efficiency of existing data, reduces the risk of errors and time consumption during data synchronization, and reduces the data reading of later historical incremental change logs by processing change log data in parallel.
Smart Images

Figure CN119646097A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a data synchronization processing method, device, electronic device and storage medium. Background Art
[0002] In modern enterprise data management, data synchronization is a key link to ensure data consistency across systems and services. As the amount of data continues to grow, enterprises are facing increasingly complex challenges in managing stock and incremental data. Enterprises need to first fully synchronize stock data to ensure the integrity and accuracy of initial data. After completing stock synchronization, the system must quickly switch to incremental data collection mode to achieve instant capture and synchronization of subsequent data changes. This process requires efficiency, seamlessness, and automation to reduce the need for manual intervention, reduce the risk of errors, and reduce time consumption during data synchronization.
[0003] Currently, when performing data synchronization, the existing data query task and the incremental change log capture task are often started at the same time: the existing data query task reads data from the source database in a single stream and sends it to the downstream. At the same time, the incremental change log capture task is blocked from sending data to the downstream, and the captured log data is persisted in the shared storage; after the existing data query task is completed, the incremental change log data captured in the shared storage is sent to the downstream.
[0004] However, this data synchronization method is often difficult to efficiently process large amounts of stock data, and may also face delays and effectiveness issues in the subsequent real-time update of incremental data. Therefore, designing a data synchronization processing method and device that can efficiently realize the automatic switching of stock data and incremental data collection has become an important requirement for the modernization of enterprise data management. Summary of the invention
[0005] The present invention provides a data synchronization processing method, device, electronic device and storage medium, which can realize efficient data synchronization processing with automatic switching of stock data and incremental data collection.
[0006] In a first aspect, a data synchronization processing method is provided, comprising: Get the query primary key segmentation step and query parallelism of the existing data; Based on the query primary key segmentation step and query parallelism, the stock data is partitioned by the primary key of the stock query, and a primary key partition queue containing multiple primary key partition range intervals is obtained; While executing the incremental change log capture task corresponding to the stock data, the primary key partition queue is called to synchronously execute multiple stock data query tasks corresponding to multiple primary key partition range intervals. The incremental change log capture task is used to capture the change log data and perform the first data synchronization processing on the change log data. The stock data query task is used to query the initial stock data within the primary key partition range interval, and use the change log data to correct the initial stock data to the target stock data, and perform the second data synchronization processing on the target stock data.
[0007] In a second aspect, a data synchronization processing device is provided, comprising: The acquisition module is used to obtain the query primary key segmentation step and query parallelism of the existing data; A partitioning module is used to partition the existing data by the primary key of the query based on the query primary key partitioning step and the query parallelism, and obtain a primary key partitioning queue containing multiple primary key partitioning range intervals; The processing module is used to call the primary key partition queue while executing the incremental change log capture task corresponding to the stock data, and synchronously execute multiple stock data query tasks corresponding to multiple primary key partition range intervals. The incremental change log capture task is used to capture the change log data and perform the first data synchronization processing on the change log data. The stock data query task is used to query the initial stock data within the primary key partition range interval, and use the change log data to correct the initial stock data to the target stock data, and perform the second data synchronization processing on the target stock data.
[0008] According to a third aspect, an electronic device is provided, comprising: a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute the method in the first aspect or its various implementations.
[0009] According to a fourth aspect, a computer-readable storage medium is provided for storing a computer program, wherein the computer program enables a computer to execute the method according to the first aspect or its various implementations.
[0010] Through the technical solution provided by the present invention, after obtaining the query primary key segmentation step and query parallelism of the stock data, the stock data can be partitioned by the stock query primary key based on the query primary key segmentation step and query parallelism, and a primary key partition queue containing multiple primary key partition range intervals can be obtained; then, while executing the incremental change log capture task corresponding to the stock data, the primary key partition queue is called to synchronously execute multiple stock data query tasks corresponding to the multiple primary key partition range intervals, the incremental change log capture task is used to capture the change log data, and perform a first data synchronization processing on the change log data, the stock data query task is used to query the initial stock data within the primary key partition range interval, and use the change log data to correct the initial stock data to the target stock data, and perform a second data synchronization processing on the target stock data. The technical solution in the present application, when querying the stock data, by dividing the stock data primary key into multiple primary key partition range intervals, multiple stock data query tasks corresponding to multiple primary key partition range intervals can be started simultaneously to perform parallel reading of the stock data, and the data between each stock data query task does not overlap, thereby improving the query efficiency of the stock data. In addition, during the parallel reading of stock data, the change log data is merged and corrected into the stock data, so that the change log data can also be processed in parallel. That is, during the reading of stock data, the historical incremental change logs have been processed, which can reduce the amount of data read in the later historical incremental change logs and improve data synchronization efficiency.
[0011] It should be understood that the above general description and the following detailed description are only exemplary and explanatory and cannot limit the present invention. Other features and advantages of the present invention will be described in detail in the following specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0013] Figure 1 A schematic diagram of a scenario flow of a traditional data synchronization process provided in an embodiment of the present application; Figure 2 An application scenario diagram provided for an embodiment of the present application; Figure 3 A flowchart of a data synchronization processing method provided in an embodiment of the present application; Figure 4 A flowchart of a data synchronization processing method provided by another embodiment of the present application; Figure 5A schematic diagram of an example of primary key partitioning for stock query provided in an embodiment of the present application; Figure 6 A schematic diagram of the principle flow of primary key partitioning for stock query provided in an embodiment of the present application; Figure 7 A schematic diagram of an example of supplementing a primary key partition queue provided in an embodiment of the present application; Figure 8 A schematic diagram of an example of a third data synchronization process provided in an embodiment of the present application; Fig. 9 A schematic diagram of the execution flow of an incremental change log capture task provided in an embodiment of the present application; Fig.10 A schematic diagram of an example of first data synchronization processing provided in an embodiment of the present application; Fig.11 A schematic diagram of the execution flow of an existing data query task provided in an embodiment of the present application; Fig.12 A schematic diagram of an execution example of an existing data query task provided in an embodiment of the present application; Fig.13 A schematic diagram of the structure of a data synchronization processing device provided in an embodiment of the present application; Fig.14 A schematic diagram of the structure of a data synchronization processing device provided by another embodiment of the present application; Fig.15 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0014] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0015] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0016] In modern enterprise data management, data synchronization is a key link to ensure data consistency across systems and services. As the amount of data continues to grow, enterprises are facing increasingly complex challenges in managing stock and incremental data. Enterprises need to first fully synchronize stock data to ensure the integrity and accuracy of initial data. After completing stock synchronization, the system must quickly switch to incremental data collection mode to achieve instant capture and synchronization of subsequent data changes. This process requires efficiency, seamlessness, and automation to reduce the need for manual intervention, reduce the risk of errors, and reduce time consumption during data synchronization.
[0017] Currently, when synchronizing data, Figure 1 As shown in the figure, the existing data query task and the incremental change log capture task are often started at the same time: the existing data query task reads data from the source end Source in a single stream and sends it to the downstream Target. At the same time, the incremental change log capture task is blocked from sending data to the downstream Target, and the captured log data is persisted in the shared storage; after the existing data query task is completed, the incremental change log data captured in the shared storage is sent to the downstream Target.
[0018] However, this data synchronization method often has the following defects: 1. The incremental change log needs to wait until all existing data queries are completed before it can be processed and sent downstream. This process persists all incremental change logs, causing the task to take a long time to recover to normal status.
[0019] 2. The query of existing data reads data in a single stream, and the query performance is slow.
[0020] 3. During the process of reading existing data, the incremental change log generated by the modification of the existing data will be sent to the downstream, increasing the data processing pressure of the downstream.
[0021] In order to solve the above technical problems, the inventive concept of the present invention is that, when querying the stock data, the primary key of the stock data is divided to form a primary key division queue, and the range intervals are divided according to the multiple primary keys in the primary key division queue, and multiple stock data query tasks are started at the same time, and the stock data is read in parallel, and the data between each task does not overlap. In addition, in the process of parallel reading of stock data, the capture of change log data is performed at the same time, and the change log data is merged and corrected into the stock data, so that the change log data can also be processed in parallel. That is, in the process of reading stock data, the historical incremental change log has been processed, which can reduce the data reading amount of the later historical incremental change log and improve data synchronization efficiency.
[0022] It should be understood that the technical solution of the present invention can be applied to the following scenarios, but is not limited to: In some possible implementations, Figure 2 An application scenario diagram provided by an embodiment of the present invention, such as Figure 2 As shown, the application scenario may include an electronic device 210 and a network device 220. The electronic device 210 may establish a connection with the network device 220 via a wired network or a wireless network.
[0023] Exemplarily, the electronic device 210 may be a desktop computer, a laptop computer, a tablet computer, etc., but is not limited thereto. The network device 220 may be a terminal device or a server, but is not limited thereto. In one embodiment of the present invention, the electronic device 210 may send a request message to the network device 220, and the request message may be used to request to obtain the query primary key segmentation step and query parallelism of the stock data. Further, the electronic device 210 may receive a response message sent by the network device 220, and the response message includes the query primary key segmentation step and query parallelism of the stock data.
[0024] also, Figure 2 An electronic device 210 and a network device 220 are provided as an example, but other numbers of electronic devices and network devices may be included in practice, and the present invention is not limited thereto.
[0025] In some other possible implementations, the technical solution of the present invention may also be executed by the above-mentioned electronic device 210, or the technical solution of the present invention may also be executed by the above-mentioned network device 220, and the present invention does not limit this.
[0026] After introducing the application scenarios of the embodiments of the present invention, the technical solutions of the present invention will be described in detail below: Figure 3 A flowchart of a data synchronization processing method provided by an embodiment of the present invention, the method can be as follows Figure 2 The electronic device 210 shown is executed, but is not limited thereto. Figure 3As shown, the method may include the following steps: Step 310: Obtain the query primary key segmentation step and query parallelism of the stock data.
[0027] Among them, stock data refers to all data sets contained in the database from the earliest recorded time of the data to the current time point. This data set fully reflects all the stored data in the database, not just the current snapshot or the data of a specific time period; the query primary key split step (PKeySplitSize) and query parallelism (FullDataQueryParallelism) of stock data are two key concepts in stock data query, which affect the efficiency and performance of the query respectively. The query primary key split step determines the number of automatic increases in primary key values each time; query parallelism refers to the number of parallel processes or threads started by the system at the same time when executing parallel queries. The query primary key split step and query parallelism can be set according to the actual application scenario, and can be fixed system parameters of the system initial configuration.
[0028] Step 320: partition the stock data by the stock query primary key based on the query primary key partition step and the query parallelism, and obtain a primary key partition queue containing multiple primary key partition range intervals.
[0029] Among them, different primary key partition queues correspond to different primary key partition range intervals.
[0030] For the embodiments of the present disclosure, the existing query primary keys can be partitioned based on the query primary key partitioning step and the query parallelism, and a primary key partitioning queue containing multiple primary key partitioning range intervals is obtained. The number of primary key partitioning range intervals contained in the primary key partitioning queue is equal to the query parallelism, the number of query primary keys contained in each primary key partitioning range interval is equal to the query primary key partitioning step, and the query primary keys contained in different primary key partitioning range intervals do not overlap with each other.
[0031] Step 330: While executing the incremental change log capture task corresponding to the stock data, call the primary key partition queue to synchronously execute multiple stock data query tasks corresponding to multiple primary key partition range intervals.
[0032] For the disclosed embodiment, unlike the traditional data synchronization method, when the stock data query task is executed, it will not block the incremental change log capture task from sending data to the downstream, that is, the stock data query task and the incremental change log capture task can be started at the same time and send data to the downstream synchronously. This method can realize efficient processing of large-scale stock data and reduce the risk of errors and time consumption in the data synchronization process.
[0033] Among them, when the incremental change log capture task is executed, it is used to capture the change log data corresponding to the stock data in real time, and perform the first data synchronization processing on the change log data. The stock data query task is used to query the initial stock data within the range of the primary key partition, and use the change log data to correct the initial stock data to the target stock data, and perform the second data synchronization processing on the target stock data. Change log data refers to a detailed record of data changes in the recording system, database or application. It usually contains information about all insert, update and delete operations on the stock data, aiming to provide historical tracking and audit capabilities for stock data changes. Specifically, the change data capture tool (Change Data Capture, CDC) can be used to record and capture data changes (such as insert, update and delete) in the database. The first data synchronization processing may include sending the change log data to the downstream Target, and the second data synchronization processing may include sending the target stock data to the downstream Target. Downstream usually refers to the target end or receiving end of data transmission, such as: a system, message queue or database that receives data sent by the upstream. The downstream system may be responsible for further data processing, storage, analysis or visualization.
[0034] In summary, according to the data synchronization processing method provided by the present invention, after obtaining the query primary key segmentation step and query parallelism of the stock data, the stock data can be partitioned by the stock query primary key based on the query primary key segmentation step and query parallelism, and a primary key partition queue containing multiple primary key partition range intervals can be obtained; then, while executing the incremental change log capture task corresponding to the stock data, the primary key partition queue is called to synchronously execute multiple stock data query tasks corresponding to the multiple primary key partition range intervals, the incremental change log capture task is used to capture the change log data, and the first data synchronization processing is performed on the change log data, and the stock data query task is used to query the initial stock data within the primary key partition range interval, and the initial stock data is corrected to the target stock data using the change log data, and the second data synchronization processing is performed on the target stock data. The technical solution in the present application, when querying the stock data, by dividing the stock data primary key into multiple primary key partition range intervals, multiple stock data query tasks corresponding to the multiple primary key partition range intervals can be started simultaneously to perform parallel reading of the stock data, and the data between each stock data query task does not overlap, thereby improving the query efficiency of the stock data. In addition, during the parallel reading of stock data, the change log data is merged and corrected into the stock data, so that the change log data can also be processed in parallel. That is, during the reading of stock data, the historical incremental change logs have been processed, which can reduce the amount of data read in the later historical incremental change logs and improve data synchronization efficiency.
[0035] based on Figure 3The embodiment shown is a refinement and extension of the above embodiment. In order to fully illustrate the specific implementation process of the method of this embodiment, this embodiment provides the following Figure 4 The specific method shown. Figure 4 based on Figure 3 As shown in Figure 4, the method comprises the following steps: Step 410: Obtain the query primary key segmentation step and query parallelism of the stock data.
[0036] Step 420: partition the stock data by the stock query primary key based on the query primary key partition step and the query parallelism, and obtain a primary key partition queue containing multiple primary key partition range intervals.
[0037] For the embodiments of the present disclosure, Figure 5 As shown, the inventory query primary key list corresponding to the inventory data can be determined, and the inventory query primary key is divided according to the ascending order of the primary keys in the inventory query primary key list to obtain a range interval containing multiple primary key divisions ( , …), the number of intervals of the primary key partition range contained in the primary key partition queue is equal to the query parallelism (FullDataQueryParallelism), the number of query primary keys contained in each primary key partition range interval is equal to the query primary key segmentation step size (PKeySplitSize), and the query primary keys contained in different primary key partition range intervals do not overlap.
[0038] In specific application scenarios, when partitioning the existing data based on the query primary key segmentation step and query parallelism, the specific implementation process can be found in Figure 6 As shown: First, you can determine the minimum primary key of the current database in the stock query primary key corresponding to the stock data. , and create a primary key partition queue with an empty queue content, and then repeat the process of inserting the primary key partition interval into the primary key partition queue until it is determined that the queue length of the primary key partition queue is equal to the query parallelism. The process of inserting the primary key partition interval into the primary key partition queue includes: determining the minimum primary key PK-N corresponding to this primary key partition interval min , where PK min <=PK-N min , when the primary key partition interval is the first primary key partition interval of the stock query primary key, PK-N min =PK min , when the current primary key partition interval is the primary key partition interval after the first primary key partition interval, PK-N minis the right endpoint of the previous primary key partition interval; further, the primary key type of the stock query primary key can be determined. When the primary key type is determined to be a data auto-increment type, the newly added Nth primary key partition interval can be determined as: PKeySplit-N=[PK-N min , PK-N min +PKeySplitSize); when the primary key type is determined to be other types, you can min First, determine the set of PKeySplitSize data (PKeySplitSet-N) in ascending order of primary key, and determine the maximum primary key PK-N corresponding to this primary key partition interval in PKeySplitSet-N max =PKeySplitSet-N primary key maximum value, the newly added primary key partition interval can be further determined as: PKeySplit-N=[PK-N min , PK-N max ). After the Nth primary key split interval PKeySplit-N is determined, PKeySplit-N can be inserted into the primary key split queue (PKeySplitQueue).
[0039] In specific application scenarios, such as Figure 7 As shown in the figure, after each stock data query is completed, a new primary key partition range interval is obtained from the primary key partition queue; when the primary key partition queue replenishment task finds that the queue length is less than the parallelism, it will recalculate and add a new stock query primary key partition to the queue so that the queue length = parallelism.
[0040] Step 430, while executing the incremental change log capture task corresponding to the existing data, call the primary key partition queue, and synchronously execute multiple existing data query tasks corresponding to multiple primary key partition range intervals. The incremental change log capture task is used to capture the change log data and perform a first data synchronization processing on the change log data. The existing data query task is used to query the initial existing data within the primary key partition range interval, and use the change log data to correct the initial existing data to the target existing data, and perform a second data synchronization processing on the target existing data.
[0041] Step 440: After the second data synchronization processing is completed for the stock data, the execution completion information is inserted into the stock task execution record queue.
[0042] Step 450: Based on the existing task execution record queue, perform third data synchronization processing on the historical change log data stored in the shared storage.
[0043] After the existing data is read, the unprocessed historical incremental change log stored in the shared storage can be read to synchronize the data. Figure 8As shown in the figure, if the primary key (2) of an incremental change log belongs to one of the existing task execution record queues, that is, it is in [StartPKey, EndPKey), and the log primary key is greater than the log primary key ChangeLogEndOffset of the change log data at the end of the existing data query task execution, then this log is sent to the downstream Target; if the primary key (1) of an incremental change log belongs to one of the existing task execution record queues, that is, it is in [StartPKey, EndPKey), and the log primary key is less than or equal to the log primary key ChangeLogEndOffset of the change log data at the end of the existing data query task execution, then this log is not processed; if the primary key (3) of an incremental change log does not belong to any of the existing task execution record queues, then this log is not processed.
[0044] In summary, the technical solution in the present application, when querying the stock data, by dividing the stock data primary key into multiple primary key division range intervals, can simultaneously start multiple stock data query tasks corresponding to the multiple primary key division range intervals, and perform parallel reading of the stock data. The data between each stock data query task does not overlap, thereby improving the query efficiency of the stock data. In addition, in the process of parallel reading of the stock data, the change log data is merged and corrected into the stock data at the same time, so that the change log data can also be processed in parallel. That is, in the process of reading the stock data, the historical incremental change log has been processed, which can reduce the amount of data read in the later historical incremental change log and improve the data synchronization efficiency. In the present application, the memory cache window can be maintained to avoid the delay in reading the stock data query / incremental change log data, resulting in the failure of data merging and processing operations. The memory cache window time can be adjusted according to the performance of the database stock data reading and incremental change log capture in the current period of time, to avoid the problem of inconsistent timing of stock data reading and incremental change log capture due to delays, resulting in incomplete merging and correction operations.
[0045] In a specific application scenario, the execution process of the incremental change log capture task in step 430 is as follows: Fig. 9 As shown, the following steps may be included: Step 910: Create an incremental change log cache queue.
[0046] The incremental change log cache queue (ChangeLogCacheQueue) is used to cache the change log data captured in real time when executing the incremental change log capture task.
[0047] Step 920: Capture the change log data corresponding to the stock data, and insert the change log data into the incremental change log cache queue.
[0048] Step 930: Based on the incremental change log cache window duration, perform a first data synchronization process on the change log data in the incremental change log cache queue.
[0049] In specific application scenarios, the incremental change log cache window duration (ChangeLogCacheWindow) under the current task execution status can be determined in advance. The incremental change log cache window duration is used to control the duration of data cached in the incremental change log cache queue in memory. If a piece of data cached in the queue exceeds this window duration, it will be taken out of the queue and passed on for post-processing. Correspondingly, when determining the incremental change log cache window duration under the current task execution status, a historical task execution status list corresponding to multiple historical stock data query tasks can be obtained. The historical task execution status list stores time data for each historical stock data query task, and the time data includes: the first collection time of the change log data when the historical stock data query task starts to execute (StartCaptureTime corresponding to ChangeLogStartOffset), the second collection time of the change log data when the historical stock data query task ends (EndCaptureTime corresponding to ChangeLogEndOffset), and the task start time (StartTime) and task end time (EndTime) of the historical stock data query task; then, the average query delay duration (QueryDelay) corresponding to each historical stock data query task can be calculated based on the above time data, and the average query delay duration set corresponding to the historical task execution status list can be obtained:
[0050] The average query delay duration set can be further used to calculate the query delay duration (PreQueryDelay) of the stock data query task under the current task execution state:
[0051] In the formula, is the smoothing factor, 0< <=1, The larger the value, the higher the weight of the latest incremental log data capture delay. Take 0.98.
[0052] Calculate the cache window duration adjustment coefficient based on the query delay duration and the minimum tolerable query delay duration ( ):
[0053] In the formula, SysQueryDelay minThe minimum tolerable query delay duration configured for the system is the basic cache window time of the system. Its value, like the primary key split step size (PKeySplitSize) and the parallelism of full data query (FullDataQueryParallelism), is a system parameter fixed in the initial system configuration. It will be comprehensively considered according to factors such as the deployment machine resources of the synchronization tool / system, the database performance, and the data growth efficiency. The specific duration of its configuration is not fixed and restricted here.
[0054] Furthermore, it can be adjusted according to the cache window duration adjustment coefficient , to determine the incremental change log cache window duration (ChangeLogCacheWindow) corresponding to the current task execution status. The performance similarity of capturing incremental logs and reading full data within adjacent full data query task execution cycles is relatively high. In view of this, if it is determined that PreQueryDelay < 0, it means that the full data query performance is stronger than the incremental change log capture. At this time, only the full data cache window duration needs to be adjusted, and the incremental change log cache window duration does not need to be adjusted. The incremental change log cache window duration determined in the previous task execution status can be defaulted to the incremental change log cache window duration in the current task execution status; if PreQueryDelay > 0, it means that the full data query performance is weaker than the incremental change log capture. At this time, the full data cache window duration does not need to be adjusted, and only the incremental change log cache window duration needs to be increased according to the cache window duration adjustment coefficient to obtain the incremental change log cache window duration in the current task execution status :
[0055] In the formula, BaseCacheWindow is the basic cache data window time configured for the system; among them, MinCacheWindow < PreChangeLogCacheWindow < MaxCacheWindow, MinCacheWindw is the minimum cache data window time configured for the system, and MaxCacheWindow: is the maximum cache data window time configured for the system.
[0056] For the embodiments of the present disclosure, when performing the first data synchronization process on the change log data in the incremental change log cache queue based on the incremental change log cache window duration in step 930, as Fig.10 shown, the change log data in the cache queue that exceeds the incremental change log cache window is processed as follows: If the flag indicates that the change log data has been merged and corrected (ChangeLogState=2), no processing is done; (reducing the amount of historical incremental change log data read and improving the overall data sending efficiency of the task); If the flag indicates that the change log data has not been merged and revised (ChangeLogState=0, 1) and the primary key is within the primary key query range of the existing data: [PK min , PK max ], the change log is persisted to the shared storage; (as historical incremental change log data to avoid affecting the accuracy of existing data query) If the flag indicates that the change log data has not been merged and revised (ChangeLogState=0, 1) and the primary key is not in the primary key query range of the existing data: [PK min , PK max ] (indicates that this data is newly generated incremental data and does not affect the data accuracy of the existing data query), the change log data will be sent directly to the downstream Target and will not be persisted to the shared storage. (Reduce the amount of historical incremental change log data read and improve the overall data sending efficiency of the task) Accordingly, step 930 may include the following steps: Step 930 - 1 : Determine the second change log data in the incremental change log cache queue whose cache duration exceeds the incremental change log cache window duration.
[0057] Step 930-2: Determine whether the second change log data has been merged with the initial stock data that exceeds the stock data cache window length.
[0058] Step 930-3: If the second change log data is not merged with the initial stock data that exceeds the stock data cache window length, the first data synchronization process is performed on the second initial stock data based on the primary key query range of the stock data.
[0059] For the embodiments of the present disclosure, when performing first data synchronization processing on the second initial stock data based on the primary key query range of the stock data, the steps of the embodiment may include: determining the log primary key corresponding to the second change log data; if it is determined that the log primary key is within the primary key query range of the stock data, persisting the second change log data as historical change log data in the shared storage; if it is determined that the log primary key is outside the primary key query range of the stock data, sending the second change log data to the downstream.
[0060] In summary, the technical solution in this application can achieve instant capture and synchronization of change log data by executing the above incremental change log capture task, improve the data synchronization efficiency of change log data, reduce the need for manual intervention, and reduce the risk of errors and time consumption in the data synchronization process.
[0061] In a specific application scenario, the execution process of the stock data query task in step 430 is as follows: Fig.11 As shown, the following steps may be included: Step 1110: Create an existing data cache queue and a change log revision queue.
[0062] Among them, the stock data cache queue (FullDataCacheQueue) is used to cache the initial stock data for real-time query when executing the stock data query task; the change log correction queue (ChangeLogSupplyQueue) is used to cache the first change log data that meets the stock query task conditions in the incremental change log cache queue. Specifically, the change log correction queue filling task (ChangeLogAppendTask) can be started to obtain the first change log data that meets the current stock query task conditions from the incremental change log cache queue and insert it into the change log correction queue. The stock query task condition can be the log primary key Offset of the change log. m In [ChangeLogStartOffset,ChangeLogEndOffset), and PK i In [StartPKey, EndPKey)). Where Offset m The log primary key corresponding to each change log data is sequentially incremented; ChangeLogStartOffset is the log primary key of the change log data when the stock data query task starts to execute; ChangeLogEndOffset is the log primary key of the change log data when the stock data query task ends; PK i It is the stock query primary key corresponding to each change log data. StartPKey is the start primary key of the current stock data query task, and EndPKey is the end primary key of the current stock data query task. Step 1120: query the initial stock data within the range interval divided by the primary key, and insert the initial stock data into the stock data cache queue.
[0063] like Fig.12 As shown, the initial stock data within the range divided by the primary key can be queried, and the initial stock data can be inserted into the stock data cache queue (FullDataCacheQueue).
[0064] Step 1130: Obtain first change log data that meets the stock query task condition from the incremental change log cache queue, and insert the first change log data into the change log revision queue.
[0065] like Fig.12 As shown, the first change log data that meets the inventory query task conditions can be obtained from the incremental change log cache queue (ChangeLogCacheQueue), and the first change log data can be inserted into the change log revision queue (ChangeLogSupplyQueue).
[0066] Step 1140: merge the initial stock data in the stock data cache queue whose cache duration exceeds the stock data cache window duration with the first change log data in the change log correction queue to obtain target stock data.
[0067] like Fig.12 As shown, the initial stock data in the stock data cache queue (FullDataCacheQueue) whose cache duration exceeds the stock data cache window duration [StartPKey, EndPKey) can be first determined, and the primary key PK of the initial stock data can be used to determine the initial stock data. i Find the corresponding first change log data in the change log correction queue (ChangeLogSupplyQueue), and then merge the initial stock data and the first change log data to obtain the target stock data (ChangeLogState=2). In order to save the queue storage space of the change log correction queue, after the first change log data is merged, the first change log data can be deleted in the change log correction queue (ChangeLogSupplyQueue).
[0068] In specific application scenarios, the full data cache window duration (FullDataCacheWindow) under the current task execution status can be determined in advance. The full data cache window duration is used to control the duration of data cached in the memory data cache queue. If a piece of data cached in the queue exceeds this window duration, it will be taken out of the queue and passed for post-processing. Correspondingly, when determining the duration of the stock data cache window under the current task execution state, a historical task execution state list corresponding to multiple historical stock data query tasks can be obtained. The historical task execution state list stores the time data under each historical stock data query task, and the time data includes: the first collection time of the change log data when the historical stock data query task starts to execute (StartCaptureTime corresponding to ChangeLogStartOffset), the second collection time of the change log data when the historical stock data query task ends (EndCaptureTime corresponding to ChangeLogEndOffset), and the task start time (StartTime) and task end time (EndTime) of the historical stock data query task; then, the average query delay duration (QueryDelay) corresponding to each historical stock data query task can be calculated based on the above time data, and the average query delay duration set corresponding to the historical task execution state list can be obtained:
[0069] The average query delay duration set can be further used to calculate the query delay duration (PreQueryDelay) of the stock data query task under the current task execution state:
[0070] In the formula, is the smoothing factor, 0< <=1, The larger the value, the higher the weight of the latest incremental log data capture delay. Take 0.98.
[0071] Calculate the cache window duration adjustment coefficient based on the query delay duration and the minimum tolerable query delay duration ( ):
[0072] In the formula, SysQueryDelay minThe minimum tolerable query delay duration configured for the system is the basic cache window time of the system. Its value, like the primary key split step size (PKeySplitSize) and the parallelism of full data query (FullDataQueryParallelism), is a system parameter fixed in the initial configuration of the system. It will be comprehensively considered according to factors such as the deployment machine resources of the synchronization tool / system, the database performance, and the data growth efficiency. The specific duration of its configuration is not fixed and restricted here.
[0073] Furthermore, the cache window duration adjustment coefficient can be used , to determine the full data cache window duration (FullDataCacheWindow) corresponding to the current task execution status. The performance similarity of capturing incremental logs and reading full data within adjacent full data query task execution cycles is relatively high. In view of this, if PreQueryDelay > 0, it indicates that the full data query performance is weaker than the incremental change log capture. At this time, only the incremental change log cache window duration needs to be adjusted, and the full data cache window duration does not need to be adjusted. The full data cache window duration determined in the previous task execution status can be defaulted to the full data cache window duration in the current task execution status: if it is determined that PreQueryDelay < 0, it indicates that the full data query performance is stronger than the incremental change log capture. At this time, the incremental change log cache window duration does not need to be adjusted, and only the full data cache window duration needs to be increased according to the cache window duration adjustment coefficient to obtain the full data cache window duration in the current task execution status ;
[0074] In the formula, BaseCacheWindow is the basic cache data window time configured for the system; among them, MinCacheWindow < PreFullDataCacheWindow < MaxCacheWindow, MinCacheWindw is the minimum cache data window time configured for the system, and MaxCacheWindow is the maximum cache data window time configured for the system.
[0075] Step 1150: Send the target full data to the downstream.
[0076] In summary, the technical solution in the present application can realize the real-time capture and synchronization of stock data and improve the data synchronization efficiency of stock data by executing the above-mentioned stock data query task. In the process of reading stock data, the incremental change log generated by the modification of stock data can be directly merged and corrected into the stock data to avoid the change log being sent to the downstream again, increasing the data processing pressure of the downstream. That is, in the process of reading stock data, the historical incremental change log has been processed, reducing the amount of historical incremental change log data read later, improving the overall data sending efficiency of the task, and greatly reducing the time for the task to recover from the reading of stock data to the real-time capture of the incremental change log.
[0077] Based on the above Figure 3 , Figure 4 A detailed description of the data synchronization processing method provided, such as Fig.13 As shown, Fig.13 FIG. 1 is a structural block diagram of a data synchronization processing device according to an exemplary embodiment. Fig.13 As shown, the device comprises: An acquisition module 1310 may be used to acquire the query primary key segmentation step and query parallelism of the stock data; A partitioning module 1320 may be used to partition the stock data by stock query primary key based on the query primary key partitioning step and the query parallelism, and obtain a primary key partitioning queue containing multiple primary key partitioning range intervals; Processing module 1330 can be used to call the primary key partition queue and synchronously execute multiple stock data query tasks corresponding to multiple primary key partition range intervals while executing the incremental change log capture task corresponding to the stock data. The incremental change log capture task is used to capture the change log data and perform a first data synchronization processing on the change log data. The stock data query task is used to query the initial stock data within the primary key partition range interval, and use the change log data to correct the initial stock data to the target stock data, and perform a second data synchronization processing on the target stock data.
[0078] In some embodiments of the present application, when executing the incremental change log capture task, the processing module 1330 can be specifically used to create an incremental change log cache queue; capture the change log data corresponding to the existing data, and insert the change log data into the incremental change log cache queue; and perform a first data synchronization process on the change log data in the incremental change log cache queue based on the incremental change log cache window duration.
[0079] In some embodiments of the present application, when executing an inventory query task, the processing module 1330 can be specifically used to create an inventory cache queue and a change log correction queue; query the initial inventory data within the primary key partition range, and insert the initial inventory data into the inventory cache queue; obtain the first change log data that meets the inventory query task conditions from the incremental change log cache queue, and insert the first change log data into the change log correction queue; merge the initial inventory data in the inventory cache queue whose cache time exceeds the inventory data cache window time with the first change log data in the change log correction queue to obtain the target inventory data; and send the target inventory data to the downstream.
[0080] In some embodiments of the present application, when the processing module 1330 performs a first data synchronization processing on the change log data in the incremental change log cache queue based on the incremental change log cache window duration, it can be specifically used to determine the second change log data in the incremental change log cache queue whose cache duration exceeds the incremental change log cache window duration; determine whether the second change log data has been merged with the initial stock data that exceeds the stock data cache window duration; if not, perform a first data synchronization processing on the second initial stock data based on the primary key query range of the stock data.
[0081] In some embodiments of the present application, when the processing module 1330 performs the first data synchronization processing on the second initial stock data based on the primary key query range of the stock data, it can be specifically used to determine the log primary key corresponding to the second change log data; if it is determined that the log primary key is within the primary key query range of the stock data, the second change log data is persisted as historical change log data in the shared storage; if it is determined that the log primary key is outside the primary key query range of the stock data, the second change log data is sent to the downstream.
[0082] In some embodiments of the present application, Fig.14 As shown, the device further includes: an insertion module 1340; The inserting module 1340 may be used to insert the execution completion information into the existing task execution record queue after the existing data completes the second data synchronization processing; The processing module 1330 may also be used to perform a third data synchronization process on the historical change log data stored in the shared storage based on the existing task execution record queue; Correspondingly, processing module 1330 can be specifically used to send the historical change log data to the downstream if it is determined that the log primary key of the historical change log data belongs to an entry in the existing task execution record queue, and the log primary key is greater than the change log offset at the end of the existing data query task execution.
[0083] In some embodiments of the present application, Fig.14 As shown, the device further includes: a determination module 1350; A determination module 1350 may be used to determine the incremental change log cache window duration and the stock data cache window duration under the current task execution state; Correspondingly, the determination module 1350 can be specifically used to obtain a historical task execution status list corresponding to multiple historical stock data query tasks, wherein the historical task execution status list stores time data for each historical stock data query task, and the time data includes: a first collection time of change log data when the historical stock data query task starts to execute, a second collection time of change log data when the historical stock data query task ends to execute, and a task start time and a task end time of the historical stock data query task; based on the time data, the average query delay duration corresponding to each historical stock data query task is calculated respectively to obtain a set of average query delay durations corresponding to the historical task execution status list; the query delay duration of the stock data query task under the current task execution state is calculated using the set of average query delay durations; based on the query delay duration and the minimum tolerable query delay duration, a cache window duration adjustment coefficient is calculated; and according to the cache window duration adjustment coefficient, an incremental change log cache window duration and a stock data cache window duration corresponding to the current task execution state are determined.
[0084] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0085] In the embodiment of the present application, when querying the stock data, by dividing the stock data primary key into multiple primary key division range intervals, multiple stock data query tasks corresponding to the multiple primary key division range intervals can be started at the same time, and the stock data can be read in parallel. The data between each stock data query task does not overlap, thereby improving the query efficiency of the stock data. In addition, in the process of parallel reading of the stock data, the change log data is merged and corrected into the stock data at the same time, so that the change log data can also be processed in parallel. That is, in the process of reading the stock data, the historical incremental change log has been processed, which can reduce the data reading amount of the later historical incremental change log and improve the data synchronization efficiency. In the present application, the memory cache window can be maintained to avoid the delay of stock data reading query / incremental change log data reading, resulting in no data merging and processing operations. The memory cache window time can be adjusted according to the performance of database stock data reading and incremental change log capture in the current period of time, to avoid the problem of inconsistent timing of stock data reading and incremental change log capture due to delay, resulting in incomplete merging and correction operations.
[0086] The data synchronization processing device of the embodiment of the present invention is described above from the perspective of the functional module in conjunction with the accompanying drawings. It should be understood that the functional module can be implemented in the form of hardware, can be implemented by instructions in the form of software, or can be implemented by a combination of hardware and software modules. Specifically, the steps of the data synchronization processing method embodiment in the embodiment of the present invention can be completed by the hardware integrated logic circuit and / or software instructions in the processor, and the steps of the data synchronization processing method applied in conjunction with the embodiment of the present invention can be directly embodied as a hardware decoding processor to execute, or can be executed by a combination of hardware and software modules in the decoding processor. Optionally, the software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps in the above-mentioned data synchronization processing method embodiment in conjunction with its hardware.
[0087] Fig.15 is a schematic block diagram of an electronic device 1500 according to an embodiment of the present invention.
[0088] like Fig.15 As shown, the electronic device 1500 may include: The memory 1510 and the processor 1520, the memory 1510 is used to store the computer program and transmit the program code to the processor 1520. In other words, the processor 1520 can call and run the computer program from the memory 1510 to implement the method in the embodiment of the present invention.
[0089] For example, the processor 1520 may be configured to execute the above method embodiments according to instructions in the computer program.
[0090] In some embodiments of the present invention, the processor 1520 may include but is not limited to: General-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0091] In some embodiments of the present invention, the memory 1510 includes but is not limited to: Volatile memory and / or non-volatile memory. Among them, the non-volatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM) or flash memory. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct memory bus random access memory (Direct Rambus RAM, DR RAM).
[0092] In some embodiments of the present invention, the computer program may be divided into one or more modules, which are stored in the memory 1510 and executed by the processor 1520 to complete the method provided by the present invention. The one or more modules may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the controller.
[0093] like Fig.15 As shown, the electronic device 1500 may further include: The transceiver 1530 may be connected to the processor 1520 or the memory 1510 .
[0094] The processor 1520 may control the transceiver 1530 to communicate with other devices, specifically, to send data to other devices or receive data sent by other devices. The transceiver 1530 may include a transmitter and a receiver. The transceiver 1530 may further include an antenna, and the number of antennas may be one or more.
[0095] It should be understood that the various components in the electronic device are connected via a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus and a status signal bus.
[0096] The present invention also provides a computer storage medium having a computer program stored thereon, which, when executed by a computer, enables the computer to perform the method of the above method embodiment. In other words, an embodiment of the present invention also provides a computer program product containing instructions, which, when executed by a computer, enables the computer to perform the method of the above method embodiment.
[0097] When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (Digital Subscriber Line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integration. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (Digital Video Disc, DVD)), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.
[0098] Those skilled in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments applied herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0099] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the module is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0100] The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. For example, each functional module in each embodiment of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0101] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in this application, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A data synchronization processing method, characterized in that: include: Get the query primary key segmentation step and query parallelism of the existing data; Performing stock query primary key partitioning on the stock data based on the query primary key partitioning step and the query parallelism, and obtaining a primary key partitioning queue including multiple primary key partitioning range intervals; While executing the incremental change log capture task corresponding to the stock data, the primary key partition queue is called to synchronously execute multiple stock data query tasks corresponding to the multiple primary key partition range intervals, the incremental change log capture task is used to capture the change log data, and perform a first data synchronization process on the change log data; the stock data query task is used to query the initial stock data within the primary key partition range interval, and use the change log data to correct the initial stock data to the target stock data, and perform a second data synchronization process on the target stock data.
2. The method according to claim 1, characterized in that The execution process of the incremental change log capture task includes: Create an incremental change log cache queue; Capturing change log data corresponding to the stock data, and inserting the change log data into the incremental change log cache queue; Based on the incremental change log cache window duration, a first data synchronization process is performed on the change log data in the incremental change log cache queue.
3. The method according to claim 2, characterized in that The execution process of the stock data query task includes: Create an existing data cache queue and a change log revision queue; Querying the initial stock data within the primary key partition range, and inserting the initial stock data into the stock data cache queue; Acquire first change log data that meets the stock query task condition from the incremental change log cache queue, and insert the first change log data into the change log revision queue; Merging the initial stock data in the stock data cache queue whose cache duration exceeds the stock data cache window duration with the first change log data in the change log correction queue to obtain target stock data; The target inventory data is sent downstream.
4. The method according to claim 2, characterized in that: The performing first data synchronization processing on the change log data in the incremental change log cache queue based on the incremental change log cache window duration includes: Determine the second change log data in the incremental change log cache queue whose cache duration exceeds the incremental change log cache window duration; Determining whether the second change log data has been merged with the initial stock data that exceeds the stock data cache window length; If not, the first data synchronization process is performed on the second initial stock data based on the primary key query range of the stock data.
5. The method according to claim 4, characterized in that The performing first data synchronization processing on the second initial stock data based on the primary key query range of the stock data includes: Determine a log primary key corresponding to the second change log data; If it is determined that the log primary key is within the primary key query range of the stock data, persisting the second change log data as historical change log data in the shared storage; If it is determined that the log primary key is outside the primary key query range of the stock data, the second change log data is sent to the downstream.
6. The method according to claim 5, characterized in that The method further comprises: After the second data synchronization processing is completed for the stock data, the execution completion information is inserted into the stock task execution record queue; Based on the existing task execution record queue, performing third data synchronization processing on the historical change log data stored in the shared storage; The performing third data synchronization processing on the historical change log data stored in the shared storage based on the existing task execution record queue includes: If it is determined that the log primary key of the historical change log data belongs to an entry in the stock task execution record queue, and the log primary key is greater than the change log offset at the end of the stock data query task execution, the historical change log data is sent to the downstream.
7. The method according to claim 3, characterized in that The method further comprises: Determine the incremental change log cache window duration and the stock data cache window duration under the current task execution status; Determining the incremental change log cache window duration and the stock data cache window duration in the current task execution state includes: Obtain a historical task execution status list corresponding to multiple historical stock data query tasks, wherein the historical task execution status list stores time data under each of the historical stock data query tasks, and the time data includes: a first collection time of change log data when the historical stock data query task starts to execute, a second collection time of change log data when the historical stock data query task ends to execute, and a task start time and task end time of the historical stock data query task; Based on the time data, respectively calculate the average query delay duration corresponding to each of the historical stock data query tasks, and obtain the average query delay duration set corresponding to the historical task execution status list; Calculate the query delay of the stock data query task in the current task execution state by using the average query delay set; Calculate the cache window duration adjustment coefficient based on the query delay duration and the minimum tolerable query delay duration; According to the cache window duration adjustment coefficient, the incremental change log cache window duration and the stock data cache window duration corresponding to the current task execution state are determined.
8. A data synchronization processing device, characterized in that: include: The acquisition module is used to obtain the query primary key segmentation step and query parallelism of the existing data; A partitioning module, configured to partition the stock data by stock query primary key based on the query primary key partitioning step and the query parallelism, and obtain a primary key partitioning queue including multiple primary key partitioning range intervals; A processing module is used to call the primary key partition queue while executing an incremental change log capture task corresponding to the stock data, and synchronously execute multiple stock data query tasks corresponding to the multiple primary key partition range intervals, wherein the incremental change log capture task is used to capture change log data and perform a first data synchronization process on the change log data, and the stock data query task is used to query the initial stock data within the primary key partition range interval, and use the change log data to correct the initial stock data to target stock data, and perform a second data synchronization process on the target stock data.
9. An electronic device, characterized in that: include: A processor and a memory, the memory being used to store a computer program, and the processor being used to call and run the computer program stored in the memory to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein the computer program enables a computer to execute the method according to any one of claims 1 to 7.
Citation Information
Cited By
Message push processing method and device, computer equipment and readable storage medium
CN119603262A