Cross-workflow task platform data synchronous scheduling method and device

By splitting the data synchronization task into export jobs and import jobs, and using the ETL scheduling cluster function of the export end and import end, the problem of data synchronization in large-scale data warehouse migration across workflow task platforms is solved, and daily business is not affected. Efficient data synchronization.

CN118796944APending Publication Date: 2024-10-18SHANGHAI PUDONG DEVELOPMENT BANK
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410843006.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-27
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

Existing data synchronization solutions In the process of large-scale data warehouse migration across workflow task platforms, it is difficult to find an effective table-level granular data synchronization scheduling solution that does not affect daily business batch operations, due to the intricate dependencies between each database table and data jobs. Relationship Limitations.

Method used

By splitting the data synchronization task into export jobs and import jobs, and deploying them to the export-side ETL scheduling cluster and the import-side ETL scheduling cluster respectively, using the existing functions of the export side and the import side, using load balancing algorithms and dependency judgment to ensure export The independent execution of jobs and import jobs does not affect daily batch jobs and achieves data synchronization.

Benefits of technology

It achieves large-scale data synchronization across workflow task platforms without affecting daily business, saves development resources, improves data synchronization efficiency, and meets table-level data synchronization requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118796944A_ABST
    Figure CN118796944A_ABST
Patent Text Reader

Abstract

Embodiments of the invention provide a cross-workflow task platform data synchronization scheduling method and apparatus. The method comprises the steps of receiving a data synchronization task; generating an export job according to the data synchronization task; deploying the export job to an export end ETL scheduling cluster, so that the export end ETL scheduling cluster exports a database table corresponding to the export job, and the database table falls on a child node of an import end ETL scheduling cluster; monitoring the falling action of the database table on the child node; generating an import job according to the monitoring result and the data synchronization task; and deploying the import job to an import end ETL scheduling cluster, so that the import end ETL scheduling cluster imports the database table on the child node into an import end data bin cluster. According to the method, a data synchronization task is divided into an export job and an import job, and the export job and the import job are deployed to an export end ETL scheduling cluster and an import end ETL scheduling cluster respectively, so that development resources are saved; and the export operation and the import operation do not influence the operation of daily batch operations of the export end and the import end.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present specification relate to the field of data processing technology, and in particular to a method and device for data synchronization scheduling across a workflow task platform. Background Art

[0002] When it comes to large-scale data warehouse migration across workflow task platforms, existing data synchronization solutions are difficult to find an effective, table-level granularity data synchronization scheduling solution that does not affect daily business batch operations due to the complex dependencies between database tables and data jobs.

[0003] In view of this, the embodiments of this specification aim to provide a method and device for data synchronization scheduling across workflow task platforms. Summary of the invention

[0004] In response to the above-mentioned problems in the prior art, the purpose of the embodiments of this specification is to provide a data synchronization scheduling method and device across workflow task platforms to solve the problem in the prior art that it is difficult to complete large-scale data synchronization across workflow task platforms in one go without affecting the batch operation of daily business.

[0005] In order to solve the above technical problems, the specific technical solutions of the embodiments of this specification are as follows:

[0006] In a first aspect, an embodiment of the present specification provides a data synchronization scheduling method across a workflow task platform, including:

[0007] Receive data synchronization tasks;

[0008] Generate an export job according to the data synchronization task, wherein the export job includes an export condition of the export job;

[0009] Deploy the export job to the export-end ETL scheduling cluster, so that the export-end ETL scheduling cluster exports the database table corresponding to the export job from the export-end data warehouse cluster and places it on the child node of the import-end ETL scheduling cluster according to the export conditions and the load balancing algorithm;

[0010] Monitoring the database table falling into the child node of the import-end ETL scheduling cluster;

[0011] Generate an import job according to the monitoring result and the data synchronization task, wherein the import job includes an import condition;

[0012] The import job is deployed to the import-end ETL scheduling cluster, so that the import-end ETL scheduling cluster imports the database table on the child node into the import-end data warehouse cluster according to the import condition.

[0013] Specifically, the data synchronization task carries data synchronization configuration information, and the synchronization configuration information includes a database table to be synchronized, a synchronization data date, a frequency, a synchronization mode, a first check flag, and a first dependency relationship with a daily batch of an export end;

[0014] Generate an export job according to the data synchronization task, further comprising:

[0015] Modify the preset export template script to obtain an export script according to the source database source table information, synchronization data date, frequency and synchronization mode of the database table to be synchronized;

[0016] Determining a derivation condition according to the first inspection identifier, the first dependency relationship, and the frequency;

[0017] The export job is obtained according to the export script and the export condition.

[0018] Further, the export-end ETL scheduling cluster exports the database table corresponding to the export job from the export-end data warehouse cluster and places it on the child node of the import-end ETL scheduling cluster according to the export condition and the load balancing algorithm, including:

[0019] The export-end ETL scheduling cluster determines, according to the first check identifier, whether it is necessary to execute the export job according to the first dependency relationship;

[0020] If necessary, after the first dependency and the frequency are satisfied, the database table is exported from the export-end data warehouse cluster to the child node of the import-end ETL scheduling cluster according to a load balancing algorithm;

[0021] If not, judging whether the priority of the export job is the highest level according to the first checking mark;

[0022] If yes, directly execute the export operation;

[0023] If not, the export operation is performed after all daily batches at the export end are completed.

[0024] Specifically, the export-end ETL scheduling cluster determines whether the first dependency is satisfied according to the following method:

[0025] According to the job name of each dependent job in the first dependency relationship, query the job status of each dependent job;

[0026] Determine whether the job status of each of the dependent jobs is completed;

[0027] If so, the first dependency is satisfied.

[0028] Specifically, the synchronization configuration information also includes the type of the import operation, the second check identifier, and the second dependency relationship with the daily batch of the import end;

[0029] Generate an import job based on the monitoring result and the data synchronization task, and further:

[0030] According to the target library target table information, synchronization data date and frequency of the database table to be synchronized, modify the preset import template script to obtain the import script;

[0031] According to the monitored IP address of the import-end ETL scheduling cluster subnode where the database table falls, configure the logical weight of the import job;

[0032] According to the type of the import job, configure the resource consumption weight of the resources occupied by the import job at the import end, where the occupied resources include one or a combination of memory, CPU and I / O;

[0033] Determining an import condition according to the second inspection identifier, the second dependency, the frequency, and the resource consumption weight;

[0034] The import job is obtained according to the import script and the import bar.

[0035] Further, the import-end ETL scheduling cluster imports the database table on the child node into the import-end data warehouse cluster according to the import condition, including:

[0036] Determine whether the sum of the resource consumption weights of all jobs executed by the import-end ETL scheduling cluster is greater than a preset resource consumption value upper limit;

[0037] If yes, wait for the resource to be released until the sum of the resource consumption weights occupied by all jobs is less than or equal to the resource consumption value upper limit;

[0038] If not, judging whether it is necessary to execute the import operation according to the second dependency relationship according to the second checking identifier;

[0039] If necessary, after the second dependency and the frequency are satisfied, the database table is imported from the child node determined by the logical weight into the import-end data warehouse cluster;

[0040] If not, judging whether the priority of the export job is the highest level according to the second checking flag;

[0041] If yes, directly execute the import operation;

[0042] If not, the import operation is performed after all daily batches at the import end are completed.

[0043] Preferably, importing the database table on the child node into the import-end data warehouse cluster includes:

[0044] Importing the database table into a pre-established temporary library temporary table;

[0045] Perform consistency check on the database tables in the source library and the database tables imported into the temporary library;

[0046] When the consistency check passes, the database table is synchronized from the temporary database temporary table to the target database target table.

[0047] Specifically, the method further includes:

[0048] The IP address of the import-end ETL scheduling cluster subnode into which the monitored database table falls is recorded in the running record of the data synchronization task, so that the export-end ETL scheduling cluster uses the running record to load balance the export job.

[0049] In a second aspect, an embodiment of the present specification provides a data synchronization scheduling device across a workflow task platform, including:

[0050] A receiving module, used for receiving data synchronization tasks;

[0051] A first generating module, configured to generate an export job according to the data synchronization task, wherein the export job includes an export condition of the export job;

[0052] A first deployment module is used to deploy the export job to the export-end ETL scheduling cluster, so that the export-end ETL scheduling cluster exports the database table corresponding to the export job from the export-end data warehouse cluster and places it on the child node of the import-end ETL scheduling cluster according to the export condition and the load balancing algorithm;

[0053] A monitoring module, used for monitoring the database table falling into the sub-node of the import-end ETL scheduling cluster;

[0054] A second generating module, configured to generate an import job according to the monitoring result and the data synchronization task, wherein the import job includes an import condition;

[0055] The second deployment module is used to deploy the import job to the import-end ETL scheduling cluster, so that the import-end ETL scheduling cluster imports the database table on the child node into the import-end data warehouse cluster according to the import condition.

[0056] In a third aspect, an embodiment of the present specification provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method provided by the above technical solution when executing the computer program.

[0057] By adopting the above-mentioned technical scheme, a data synchronization scheduling method and device across workflow task platforms provided in the embodiments of this specification split the data synchronization task into two parts, namely, export job and import job, which are respectively deployed to the export-end ETL scheduling cluster and the import-end ETL scheduling cluster, so as to utilize the existing functions of the export-end ETL scheduling cluster and the import-end ETL scheduling cluster, thereby saving development resources; and the export job is separated from the import job, and will not affect the operation of the daily batch jobs of the export end and the import end respectively; in addition, the data synchronization scheduling service cluster is also used as the master control to monitor the export-end ETL scheduling cluster and the import-end ETL scheduling cluster, so that the export job is connected with the corresponding import job, thereby realizing the flow of data synchronization task status.

[0058] In order to make the above and other purposes, features and advantages of the embodiments of this specification more obvious and easy to understand, the following specifically cites preferred embodiments and describes them in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0060] Figure 1 A schematic diagram of the structure of a data synchronization system across workflow task platforms in an embodiment of this specification is shown;

[0061] Figure 2 A schematic diagram showing the steps of a data synchronization method across workflow task platforms provided by an embodiment of this specification;

[0062] Figure 3 A schematic diagram showing the steps of generating an export job according to a data synchronization task in an embodiment of this specification is shown;

[0063] Figure 4 A schematic diagram of the steps in which the export-side ETL scheduling cluster exports the database table corresponding to the export job from the export-side data warehouse cluster and places it on the child node of the import-side ETL scheduling cluster according to the export conditions and the load balancing algorithm in an embodiment of this specification;

[0064] Figure 5A schematic diagram of the steps of generating an import job according to monitoring results and data synchronization tasks in an embodiment of this specification is shown;

[0065] Figure 6 A schematic diagram of the steps of the import-end ETL scheduling cluster importing the database table on the child node into the import-end data warehouse cluster according to the import conditions in the embodiment of this specification is shown;

[0066] Figure 7 A schematic diagram of the steps of importing a database table on a child node into an import-end data warehouse cluster is shown in an embodiment of this specification;

[0067] Figure 8 A schematic diagram of the structure of a data synchronization device across workflow task platforms provided by an embodiment of this specification is shown;

[0068] Fig. 9 A schematic diagram of the structure of a computer device provided in an embodiment of this specification is shown.

[0069] Description of the accompanying symbols:

[0070] 10. Export end workflow task platform;

[0071] 11. Export the data warehouse cluster;

[0072] 12. Export-side ETL scheduling cluster;

[0073] 20. Import-end workflow task platform;

[0074] 21. Import the terminal data warehouse cluster;

[0075] 22. Import-side ETL scheduling cluster;

[0076] 30. Data synchronization scheduling service cluster;

[0077] 81. Receiving module;

[0078] 82. A first generation module;

[0079] 83. First deployment module;

[0080] 84. Monitoring module;

[0081] 85. Second generation module;

[0082] 86. Second deployment module;

[0083] 902. Computer equipment;

[0084] 904, processor;

[0085] 906. Memory;

[0086] 908, driving mechanism;

[0087] 910, input / output module;

[0088] 912. Input device;

[0089] 914. Output device;

[0090] 916. Presentation equipment;

[0091] 918. Graphical user interface;

[0092] 920, network interface;

[0093] 922, communication link;

[0094] 924. Communication bus. DETAILED DESCRIPTION

[0095] The following will be combined with the drawings in the embodiments of this specification to clearly and completely describe the technical solutions in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.

[0096] It should be noted that the terms "first", "second", etc. in this specification and claims 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 interchanged where appropriate, so that the embodiments of this specification described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, device, product or equipment 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 equipment.

[0097] The embodiments of this specification provide a data synchronization method and device across workflow task platforms, which can solve the problem in the prior art that it is difficult to implement a table-level granularity data synchronization scheduling solution that does not affect daily batch operations when facing large-scale data warehouse migration problems. Figure 2It is a schematic diagram of the steps of a data synchronization method across a workflow task platform provided in an embodiment of this specification. This specification provides method operation steps as described in the embodiment or flowchart, but may include more or fewer operation steps based on conventional or non-creative labor. The order of steps listed in the embodiment is only one way of executing the order of many steps and does not represent the only execution order. When the actual system or device product is executed, it can be executed in the order of the method shown in the embodiment or the accompanying drawings or in parallel.

[0098] The method is applied to a data synchronization scheduling system across workflow task platforms, such as Figure 1 FIG. 1 is a schematic diagram of the structure of the data synchronization scheduling system, and the data synchronization scheduling system includes:

[0099] The export-side workflow task platform 10 further includes an export-side data warehouse cluster 11 and an export-side ETL (Extract-Transform-Load, used to describe the process of extracting, transforming and loading data from the export side to the import side) scheduling cluster 12;

[0100] The import-end workflow task platform 20 further includes an import-end data warehouse cluster 21 and an import-end ETL scheduling cluster 22; and

[0101] Data synchronization scheduling service cluster 30.

[0102] It should be noted that, in the embodiments of this specification, the cross-workflow task platform refers to the different types of the export-end workflow task platform 10 and the import-end workflow task platform 20. That is, the type of the export-end data warehouse cluster 11 is different from the type of the import-end data warehouse cluster 21; and the type of the export-end ETL scheduling cluster 12 is different from the type of the import-end ETL scheduling cluster 22. Exemplarily, the export-end data warehouse cluster 11 can be a TD data warehouse cluster, and the import-end data warehouse cluster 21 can be a Guass data warehouse cluster; then the export-end ETL scheduling cluster 12 is a scheduling cluster loaded on the TD data warehouse cluster, and the import-end ETL scheduling cluster 22 is a scheduling cluster loaded on the Guass data warehouse cluster. In addition, the export-end data warehouse cluster and the import-end data warehouse cluster can both be other types of data warehouse clusters.

[0103] Furthermore, in the embodiment of this specification, each sub-node of the export-end ETL scheduling cluster and each sub-node of the import-end ETL scheduling cluster 22 are mounted on the same shared storage service NAS (Network Attached Storage).

[0104] A data synchronization method across workflow task platforms provided in the embodiments of this specification can be executed by the data synchronization scheduling service cluster, such as Figure 2 As shown, the method includes:

[0105] S210: receiving a data synchronization task.

[0106] The data synchronization task can be applied for by the staff of the application market or data warehouse platform and submitted to the data synchronization scheduling system.

[0107] S220: Generate an export job according to the data synchronization task, where the export job includes an export condition of the export job.

[0108] S230: Deploy the export job to the export-end ETL scheduling cluster, so that the export-end ETL scheduling cluster exports the database table corresponding to the export job from the export-end data warehouse cluster and places it on the child node of the import-end ETL scheduling cluster according to the export conditions and load balancing algorithm.

[0109] The data synchronization method provided in the embodiments of this specification deploys the generated export job on the child node of the export-side ETL scheduling cluster, and can utilize the existing functions of the export-side workflow scheduling platform, such as the data export tool of the export-side data warehouse cluster, the workflow scheduling capability of the export-side ETL scheduling cluster, etc. Specifically, when the export-side data warehouse cluster is a TD data warehouse cluster, its TPT data export tool can be utilized; when the export-side data warehouse cluster is a data warehouse cluster of other types other than TD, the data export tools of other types of data warehouse clusters can be applied accordingly, thereby eliminating the need to repeatedly develop the data export function for the data synchronization scheduling system, which is conducive to saving development resources.

[0110] S240: Monitor the database table's entry into the child node of the import-end ETL scheduling cluster.

[0111] S250: Generate an import job according to the monitoring result and the data synchronization task, where the import job includes an import condition.

[0112] S260: Deploy the import job to the import-end ETL scheduling cluster, so that the import-end ETL scheduling cluster imports the database table on the child node into the import-end data warehouse cluster according to the import condition.

[0113] Similar to the export job being deployed on the sub-node of the export-side ETL scheduling cluster, the import job is deployed on the sub-node of the import-side ETL scheduling cluster in the embodiments of this specification to utilize the existing functions of the import-side workflow scheduling platform, such as the data import tool of the import-side data warehouse cluster, the workflow scheduling capability of the import-side ETL scheduling cluster, etc. Specifically, when the import-side data warehouse cluster is a Gauss data warehouse cluster, its gds data import tool can be used; when the import-side data warehouse cluster is a data warehouse cluster of other types other than Gauss, the data import tool of other types of data warehouse clusters can be applied accordingly, and there is no need to repeatedly develop the data import function of the data synchronization scheduling system.

[0114] The data synchronization scheduling method across workflow task platforms provided in the embodiments of this specification divides the data synchronization task into two parts: export job and import job, which are deployed to the export-end ETL scheduling cluster and the import-end ETL scheduling cluster respectively, so as to utilize the existing functions of the export-end ETL scheduling cluster and the import-end ETL scheduling cluster, thereby saving development resources; and the export job is separated from the import job, which will not affect the operation of the daily batch jobs of the export end and the import end respectively; the data synchronization scheduling service cluster is used as the master control to monitor the export-end ETL scheduling cluster and the import-end ETL scheduling cluster, so that the export job is connected with the corresponding import job, thereby realizing the flow of data synchronization task status.

[0115] Specifically, the data synchronization task carries data synchronization configuration information, and may also carry information about the initiator of the data synchronization task, the initiation time, etc.;

[0116] The data synchronization configuration information includes a database table to be synchronized, a synchronization data date, a frequency, a synchronization mode, a first check mark, and a first dependency relationship with the daily batch of the export end;

[0117] The information of the database table to be synchronized is the source table location of the source database and the target table location of the target database.

[0118] The synchronization data date is the data date of the database table to be synchronized. In some specific scenarios, it can be the creation time of the data in the database table to be synchronized, which is an attribute of the data.

[0119] Frequency includes daily frequency, weekly frequency, and monthly frequency, that is, synchronization is performed on a certain day of each month, a certain day of each week, or daily synchronization, or multiple synchronizations per day, or scheduled synchronization, etc.;

[0120] The synchronization modes include full synchronization and incremental synchronization (incremental append, incremental replacement, etc.);

[0121] The first check flag is used to indicate under what conditions the export operation can be executed.

[0122] If Figure 3 As shown, in step S220, generating an export job according to the data synchronization task is further as follows:

[0123] S310: According to the source library and source table information of the database table to be synchronized, the synchronization data date, the frequency and the synchronization mode, modify the preset export template script to obtain an export script.

[0124] The export script includes an export SQL statement, which replaces the relevant fields in the preset export template with the source library source table and the synchronization data date, and uses the while condition to splice the frequency with the replaced export template. The export script also includes the splicing processing logic of the export template and the while condition, the script path and other information.

[0125] S320: Determine a derivation condition according to the first inspection identifier, the first dependency and the frequency.

[0126] S330: Obtain the export job according to the export script and the export condition.

[0127] That is, the export job includes the export script and the export condition. By generating SQL statements through predefined splicing rules, the export script is obtained, and the export job is automatically generated, which is conducive to improving data synchronization efficiency.

[0128] Further, in the embodiments of this specification, Figure 4 As shown, in step S230, the export-side ETL scheduling cluster exports the database table corresponding to the export job from the export-side data warehouse cluster and places it on the child node of the import-side ETL scheduling cluster according to the export condition and the load balancing algorithm, further comprising:

[0129] S410: The export-end ETL scheduling cluster determines, according to the first check identifier, whether it is necessary to execute the export job according to the first dependency relationship.

[0130] That is, when determining whether the export operation meets the export condition, the priority of the first check mark is higher than the priority of the first dependency and the frequency. In other words, the first check mark is used to determine whether to query the first dependency of the export operation.

[0131] S420: If necessary, after the first dependency and the frequency are satisfied, the database table is exported from the export-end data warehouse cluster to a child node of the import-end ETL scheduling cluster according to a load balancing algorithm.

[0132] Generally, the first dependency is combined with the frequency. For example, a certain export job is a monthly job with a frequency of end-of-month synchronization, and it depends on a daily job with a frequency of daily synchronization. If the daily job has already executed the daily job on January 30 and is about to execute the daily job on January 31, it is in the time state of 0130. At this time, the monthly job synchronized at the end of the month still does not meet the export condition. Only when the daily job that is rolled over to January 31 is completed, the dependency of the monthly job is met.

[0133] In the embodiment of this specification, the load balancing algorithm of the export end may be a minimum connection number algorithm. Specifically:

[0134] For each export job, configure relevant experience weights according to the data volume of the corresponding database table, and set the initial weights of each sub-node cluster of the import-side ETL scheduling cluster to 0.

[0135] Each time the node corresponding to the database table of the export job is selected, the one with the smallest weight is selected from each child node cluster (when there are multiple child nodes with the smallest weight, one can be randomly selected from multiple child nodes), the relevant experience weight of the database table is added to the initial weight of the selected child node, and the database table is exported to the child node.

[0136] This process repeats itself, so that each export job is evenly distributed to the disks of each scheduling sub-node according to the size of the corresponding database table, thus avoiding the imbalance of bandwidth and disk resources.

[0137] And because the sub-nodes of the export-side ETL scheduling cluster and the import-side ETL scheduling cluster are mounted on the same shared storage service NAS, therefore, in the export phase, exporting the database table to NAS is equivalent to exporting to a sub-node of the import-side ETL scheduling cluster.

[0138] S430: If not necessary, determining whether the priority of the export job is the highest level according to the first checking flag.

[0139] S440: If yes, directly execute the export operation.

[0140] That is, the export job does not need to check its dependencies on the export side and directly executes the export.

[0141] S450: If not, after all daily batches at the export end are completed, the export operation is executed.

[0142] That is, the export job does not need to check its dependencies on the export side, but needs to be executed after all daily batches on the export side are completed.

[0143] The data synchronization scheduling method across workflow task platforms provided in the embodiments of this specification utilizes the workflow scheduling capability of the export-side ETL scheduling cluster so that the execution of the export job does not affect the operation of daily batches, complying with table-level dependencies. At the same time, through the load balancing algorithm, the resources of the import-side ETL scheduling cluster sub-nodes are utilized to the greatest extent, thereby realizing flexible configuration and scheduling of the export job table-level granularity data synchronization tasks.

[0144] It should be noted that the database table corresponding to the export job is written to the disk of the import-side scheduling cluster child node in the form of text, ensuring the complete separation of the export job and the import job.

[0145] Specifically, in the embodiment of this specification, the export-end ETL scheduling cluster determines whether the first dependency relationship is satisfied according to the following method:

[0146] According to the job name of each dependent job in the first dependency relationship, query the job status of each dependent job;

[0147] Determine whether the job status of each of the dependent jobs is completed;

[0148] If so, the first dependency is satisfied.

[0149] When the staff of the application market or data warehouse platform applies for and submits the data synchronization task, the dependency relationship of the data synchronization task is known, and the job name of each dependent job is submitted to the data synchronization scheduling system. When the data synchronization scheduling service cluster generates export jobs and import jobs, the job names of the dependent jobs corresponding to the export end and the import end of the data synchronization task are read respectively. Therefore, when the ETL scheduling cluster on the export end determines whether the export job satisfies the first dependency relationship, it only needs to read the job name of the relevant dependent job and associate and query the job status of the dependent job, such as the data date, status, batch, etc. of the dependent job. The export job can have multiple dependent jobs on the export end. When the status of multiple dependent jobs are all completed, the export job satisfies the first dependency relationship.

[0150] Furthermore, the synchronization configuration information also includes the type of the import operation, a second check identifier, and a second dependency relationship with the daily batch of the import end;

[0151] The type of job may be one of a loading job, a distribution job, an import job, an export job, an operation and maintenance job, a synchronization job, etc. In the embodiments of this specification, only two types of jobs, an export job at the export end and an import job at the import end, are involved.

[0152] The second check mark is similar to the first check mark, and is used to indicate the conditions under which the import operation can be executed.

[0153] If Figure 5 As shown, in step S250, generating an import job according to the monitoring result and the data synchronization task can be further:

[0154] S510: According to the target library target table information, synchronization data date, frequency and synchronization mode of the database table to be synchronized, modify the preset import template script to obtain an import script.

[0155] The compilation method of the import script is similar to that of the export script, which includes importing SQL statements. The import SQL statements replace the relevant fields in the preset import template with the target library target table and synchronization data date, and use the while condition to splice the frequency, synchronization mode, etc. with the replaced import template.

[0156] S520: According to the monitored IP address of the import-end ETL scheduling cluster subnode to which the database table falls, configure the logical weight of the import job.

[0157] The logical weight is used to determine from which child node the import end obtains the database table and performs the import operation.

[0158] For example, if in the export stage, the export-side ETL scheduling cluster places the database table on the child node 101 of the import-side ETL scheduling cluster according to the load balancing algorithm, the data synchronization scheduling server cluster monitors the event that the database table falls on the child node 101, and generates 101 as the logical weight in the import job. Therefore, when the import-side ETL scheduling cluster executes the import job, it will be able to obtain the database table from the child node 101 according to the logical weight field in the import job, thereby ensuring the feasibility of data synchronization.

[0159] S530: configuring resource consumption weights of resources occupied by the import job at the import end according to the type of the import job, where the occupied resources include one or a combination of memory, CPU, and I / O.

[0160] Generally, jobs of the import job type consume more I / O resources than CPU resources. Therefore, in some simple embodiments, only the I / O resources occupied by each import job may be configured with a corresponding resource consumption weight.

[0161] In some preferred embodiments, resource consumption weights of memory, CPU and I / O resources occupied by the import job may be configured separately, thereby achieving fine concurrency control of the import job.

[0162] The resource consumption weight of each resource occupied by the import operation is usually proportional to the data volume of its database table. Therefore, the resource consumption weight of the import operation can be configured according to the data volume of the database table.

[0163] S540: Determine an import condition according to the second check identifier, the second dependency, the frequency, and the resource consumption weight.

[0164] S550: Obtain the import job according to the import script and the import condition.

[0165] That is, the import job includes an import script and an import condition, wherein the import condition includes a second check identifier, a second dependency, a logic weight, and a resource consumption weight. In the embodiment of this specification, an SQL statement is generated through a predefined splicing rule to obtain an import script, thereby realizing automatic generation of an import job, which is conducive to improving data synchronization efficiency.

[0166] like Figure 6 As shown, in the embodiment of this specification, in step S260, so that the import-end ETL scheduling cluster imports the database table on the child node into the import-end data warehouse cluster according to the import condition, it can further include:

[0167] S610: Determine whether the sum of the resource consumption weights of all jobs executed by the import-end ETL scheduling cluster is greater than a preset upper limit of resource consumption value.

[0168] That is, when judging whether the import operation meets the import condition, the judgment of the resource consumption weight of the import operation has the first priority.

[0169] Exemplarily, if the resource consumption weight of an import job for I / O resources is 5, determine whether the sum of the resource consumption weights of the I / O resources consumed by all jobs executed at the import-end ETL scheduling cluster (i.e., the import job and other jobs running on the import-end ETL scheduling cluster, including other import jobs, loading jobs, operation and maintenance jobs, computing jobs, etc.) is greater than a preset upper limit on the resource consumption value (for example, it can be set to 100).

[0170] S620: If yes, wait for resource release until the sum of the resource consumption weights occupied by all jobs is less than or equal to the resource consumption value upper limit.

[0171] That is, if the sum of the resource consumption weights of the consumed I / O resources is greater than 100, the import job will not be executed temporarily. After other jobs are completed and the corresponding resources are released, and the sum of the resource consumption weights is less than 100, the import job will be executed.

[0172] S630: If not, determine, based on the second check identifier, whether it is necessary to execute the import operation based on the second dependency relationship.

[0173] That is, if the sum of the resource consumption weights of the consumed I / O resources is less than 100, it is necessary to determine whether the conditions for executing the import operation are met according to the second check mark. That is, the second check mark is at the second priority when determining whether the import operation meets the import condition.

[0174] The determination of the second inspection mark of the import operation is similar to the determination of the first inspection mark of the export end, and will not be repeated here.

[0175] S640: If necessary, after the second dependency relationship and the frequency are satisfied, the database table is imported from the child node determined by the logical weight into the import-end data warehouse cluster.

[0176] S650: If not necessary, determine whether the priority of the export job is the highest level according to the second checking flag.

[0177] S660: If yes, directly execute the import operation.

[0178] S670: If not, after all daily batches at the import end are completed, the import operation is executed.

[0179] The method for determining the second dependency relationship of the import job is similar to the method for determining the first dependency relationship of the export job, and will not be described in detail here.

[0180] The data synchronization scheduling method across workflow task platforms provided in the embodiments of this specification utilizes the workflow scheduling capability of the ETL scheduling cluster on the import side, so that the import job does not affect the daily batch operation of the import side, complying with the table-level dependency; at the same time, by pre-configuring the resource occupancy weights of various types of resources for the import job, it achieves balanced and full utilization of various types of resources of the sub-nodes of the ETL scheduling cluster on the import side, and realizes flexible configuration and scheduling of the data synchronization tasks at the table-level granularity of the export job.

[0181] Preferably, in the embodiments of this specification, Figure 7 As shown, in step S260, importing the database table on the child node into the import-end data warehouse cluster further includes:

[0182] S710: Import the database table into a pre-established temporary library temporary table.

[0183] S720: Perform consistency check on the database tables in the source library and the database tables imported into the temporary library.

[0184] In some feasible embodiments, a key value md5 calculation can be performed on one or several columns of a database table in a source library or source table to obtain a first calculation result; the same key value md5 calculation can be performed on a corresponding column or several columns of a database table in a temporary table or temporary library to obtain a second calculation result; and a consistency check can be performed by judging whether the first calculation result is the same as the second calculation result.

[0185] In addition, there may be other consistency verification methods, and the embodiments of this specification do not specifically limit the consistency verification method.

[0186] S730: When the consistency check passes, the database table is synchronized from the temporary table in the temporary library to the target table in the target library.

[0187] When the consistency check passes, the database table is imported into the target database table. By establishing a temporary database and temporary table, the impact on daily batch operations on the import end can also be reduced.

[0188] Further, in the embodiment of the present specification, when monitoring the database table falling into the sub-node of the import-end ETL scheduling cluster and obtaining the IP address of the import-end ETL scheduling cluster sub-node where the database table falls, it also includes:

[0189] The monitored IP address is recorded in the running record of the data synchronization task, so that the export-end ETL scheduling cluster uses the running record to load balance the export job.

[0190] The data synchronization scheduling method across workflow task platforms provided in the embodiments of this specification deploys the export job and the import job on the ETL scheduling clusters at both ends respectively, borrowing the existing capabilities of the ETL scheduling clusters at both ends, which is conducive to reducing the difficulty of development and saving development costs; at the same time, the data synchronization scheduling service cluster is used for overall control, monitoring the status of the data synchronization tasks at both ends and the batch business execution status and dependencies running on the workflow task platforms at both ends, and adopting independent control concurrency for the export job and the import job respectively. When exporting, the database table corresponding to the import job is evenly exported to each sub-node of the ETL scheduling cluster at the import end through the load balancing method with the minimum number of connections; when importing, the resource consumption weights of each import job are preset to control the table-level import job to run the loading and import tasks at the corresponding export data sub-node. At the same time, through the export condition and import condition setting, on the basis of fully utilizing the idle resources of the clusters at both ends, the export job and the import job will not affect the original daily batch operation of the export end and the import end respectively, meeting the synchronization requirements of large quantities of data across the workflow task platform.

[0191] Based on the above-mentioned data synchronization scheduling method across workflow task platforms, the embodiments of this specification also provide a data synchronization scheduling device across workflow task platforms. The device may include a system (including a distributed system), software (application), module, component, server, client, etc. using the method described in the embodiments of this specification and a device combined with necessary implementation hardware. Based on the same innovative concept, the device in one or more embodiments provided in the embodiments of this specification is as described in the following embodiments. Since the implementation scheme and method for solving the problem of the device are similar, the implementation of the specific device of the embodiments of this specification can refer to the implementation of the aforementioned method, and the repetitions will not be repeated. As used below, the term "unit" or "module" can implement a combination of software and / or hardware of a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.

[0192] like Figure 8 As shown, an embodiment of this specification provides a data synchronization scheduling device across workflow task platforms, including:

[0193] A receiving module 81, used for receiving a data synchronization task;

[0194] A first generating module 82, configured to generate an export job according to the data synchronization task, wherein the export job includes an export condition of the export job;

[0195] The first deployment module 83 is used to deploy the export job to the export-end ETL scheduling cluster, so that the export-end ETL scheduling cluster exports the database table corresponding to the export job from the export-end data warehouse cluster and places it on the child node of the import-end ETL scheduling cluster according to the export condition and the load balancing algorithm;

[0196] A monitoring module 84, used for monitoring the database table falling into the child node of the import-end ETL scheduling cluster;

[0197] A second generating module 85, configured to generate an import job according to the monitoring result and the data synchronization task, wherein the import job includes an import condition;

[0198] The second deployment module 86 is used to deploy the import job to the import-end ETL scheduling cluster, so that the import-end ETL scheduling cluster imports the database table on the child node into the import-end data warehouse cluster according to the import condition.

[0199] The beneficial effects obtained by the device provided in the embodiments of this specification are consistent with the beneficial effects obtained by the above method and will not be repeated here.

[0200] like Fig. 9 As shown, a computer device provided in an embodiment of this specification, a data synchronization scheduling device across a workflow task platform in this specification can be a computer device in this embodiment, executing the above method of this specification. The computer device 902 may include one or more processors 904, such as one or more central processing units (CPUs), and each processing unit may implement one or more hardware threads. The computer device 902 may also include any memory 906, which is used to store any kind of information such as code, settings, data, etc. Non-limiting, for example, the memory 906 may include any one or more combinations of the following: any type of RAM, any type of ROM, flash memory device, hard disk, optical disk, etc. More generally, any memory can use any technology to store information. Further, any memory can provide volatile or non-volatile retention of information. Further, any memory can represent a fixed or removable component of the computer device 902. In one case, when the processor 904 executes an associated instruction stored in any memory or a combination of memories, the computer device 902 can perform any operation of the associated instruction. The computer device 902 also includes one or more drive mechanisms 908 for interacting with any storage, such as a hard disk drive mechanism, an optical disk drive mechanism, etc.

[0201] The computer device 902 may also include an input / output module 910 (I / O) for receiving various inputs (via input devices 912) and for providing various outputs (via output devices 914). A specific output mechanism may include a presentation device 916 and an associated graphical user interface (GUI) 918. In other embodiments, the input / output module 910 (I / O), the input device 912, and the output device 914 may not be included, and the computer device 902 may be used as a computer device in a network. The computer device 902 may also include one or more network interfaces 920 for exchanging data with other devices via one or more communication links 922. One or more communication buses 924 couple the components described above together.

[0202] The communication link 922 may be implemented in any manner, for example, through a local area network, a wide area network (e.g., the Internet), a point-to-point connection, etc., or any combination thereof. The communication link 922 may include any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc. governed by any protocol or combination of protocols.

[0203] Corresponding to Figures 2 to 7 In addition to the method shown, an embodiment of the specification also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above method are executed.

[0204] The embodiment of the present specification also provides a computer-readable instruction, wherein when the processor executes the instruction, the program therein causes the processor to execute the following Figures 2 to 7 The method shown.

[0205] The embodiments of the present specification also provide a computer program product, including at least one instruction or at least one program, wherein the at least one instruction or the at least one program is loaded and executed by a processor to implement the following Figures 2 to 7 The method shown.

[0206] It should be understood that in the various embodiments of this specification, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this specification.

[0207] It should also be understood that in the embodiments of this specification, the term "and / or" is only a description of the association relationship of the associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this specification generally indicates that the associated objects before and after are in an "or" relationship.

[0208] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in this specification can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. 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 this specification.

[0209] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0210] In the several embodiments provided in this specification, 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 units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, or it can be an electrical, mechanical or other form of connection.

[0211] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of this specification.

[0212] In addition, each functional unit in each embodiment of this specification may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0213] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this specification is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of this specification. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0214] Specific embodiments are used in this specification to illustrate the principles and implementation methods of this specification. The description of the above embodiments is only used to help understand the methods and core ideas of this specification. At the same time, for those skilled in the art, according to the ideas of this specification, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on this specification.

Claims

1. A data synchronization scheduling method across workflow task platforms, characterized in that: The method comprises: Receive data synchronization tasks; Generate an export job according to the data synchronization task, wherein the export job includes an export condition of the export job; Deploy the export job to the export-end ETL scheduling cluster, so that the export-end ETL scheduling cluster exports the database table corresponding to the export job from the export-end data warehouse cluster and places it on the child node of the import-end ETL scheduling cluster according to the export conditions and the load balancing algorithm; Monitoring the database table falling into the child node of the import-end ETL scheduling cluster; Generate an import job according to the monitoring result and the data synchronization task, wherein the import job includes an import condition; The import job is deployed to the import-end ETL scheduling cluster, so that the import-end ETL scheduling cluster imports the database table on the child node into the import-end data warehouse cluster according to the import condition.

2. The method according to claim 1, characterized in that The data synchronization task carries data synchronization configuration information, and the synchronization configuration information includes a database table to be synchronized, a synchronization data date, a frequency, a synchronization mode, a first check flag, and a first dependency relationship with a daily batch of an export end; Generate an export job according to the data synchronization task, further comprising: Modify the preset export template script to obtain an export script according to the source database source table information, synchronization data date, frequency and synchronization mode of the database table to be synchronized; Determining a derivation condition according to the first inspection identifier, the first dependency relationship, and the frequency; The export job is obtained according to the export script and the export condition.

3. The method according to claim 2, characterized in that The export-end ETL scheduling cluster exports the database table corresponding to the export job from the export-end data warehouse cluster and places it on the child node of the import-end ETL scheduling cluster according to the export condition and the load balancing algorithm, further comprising: The export-end ETL scheduling cluster determines, according to the first check identifier, whether it is necessary to execute the export job according to the first dependency relationship; If necessary, after the first dependency and the frequency are satisfied, the database table is exported from the export-end data warehouse cluster to the child node of the import-end ETL scheduling cluster according to a load balancing algorithm; If not, judging whether the priority of the export job is the highest level according to the first checking mark; If yes, directly execute the export operation; If not, the export operation is performed after all daily batches at the export end are completed.

4. The method according to claim 3, characterized in that The export-end ETL scheduling cluster determines whether the first dependency relationship is satisfied according to the following method: According to the job name of each dependent job in the first dependency relationship, query the job status of each dependent job; Determine whether the job status of each of the dependent jobs is completed; If so, the first dependency is satisfied.

5. The method according to claim 2, characterized in that: The synchronization configuration information also includes the type of the import operation, a second check identifier, and a second dependency relationship with the daily batch of the import end; Generate an import job based on the monitoring result and the data synchronization task, and further: According to the target library target table information, synchronization data date and frequency of the database table to be synchronized, modify the preset import template script to obtain the import script; According to the monitored IP address of the import-end ETL scheduling cluster subnode where the database table falls, configure the logical weight of the import job; According to the type of the import job, configure the resource consumption weight of the resources occupied by the import job at the import end, where the occupied resources include one or a combination of memory, CPU and I / O; Determining an import condition according to the second inspection identifier, the second dependency, the frequency, and the resource consumption weight; The import job is obtained according to the import script and the import bar.

6. The method according to claim 5, characterized in that So that the import-end ETL scheduling cluster imports the database table on the child node into the import-end data warehouse cluster according to the import condition, further comprising: Determine whether the sum of the resource consumption weights of all jobs executed by the import-end ETL scheduling cluster is greater than a preset resource consumption value upper limit; If yes, wait for the resource to be released until the sum of the resource consumption weights occupied by all jobs is less than or equal to the resource consumption value upper limit; If not, judging whether it is necessary to execute the import operation according to the second dependency relationship according to the second checking identifier; If necessary, after the second dependency and the frequency are satisfied, the database table is imported from the child node determined by the logical weight into the import-end data warehouse cluster; If not, judging whether the priority of the export job is the highest level according to the second checking flag; If yes, directly execute the import operation; If not, the import operation is performed after all daily batches at the import end are completed.

7. The method according to claim 6, characterized in that Importing the database table on the child node into the import-end data warehouse cluster further includes: Importing the database table into a pre-established temporary library temporary table; Perform consistency check on the database tables in the source library and the database tables imported into the temporary library; When the consistency check passes, the database table is synchronized from the temporary database temporary table to the target database target table.

8. The method according to claim 1, characterized in that The method further comprises: The IP address of the import-end ETL scheduling cluster subnode into which the monitored database table falls is recorded in the running record of the data synchronization task, so that the export-end ETL scheduling cluster uses the running record to load balance the export job.

9. A data synchronization scheduling device across workflow task platforms, characterized in that: include: A receiving module, used for receiving data synchronization tasks; A first generating module, configured to generate an export job according to the data synchronization task, wherein the export job includes an export condition of the export job; A first deployment module is used to deploy the export job to the export-end ETL scheduling cluster, so that the export-end ETL scheduling cluster exports the database table corresponding to the export job from the export-end data warehouse cluster and places it on the child node of the import-end ETL scheduling cluster according to the export condition and the load balancing algorithm; A monitoring module, used for monitoring the database table falling into the sub-node of the import-end ETL scheduling cluster; A second generating module, configured to generate an import job according to the monitoring result and the data synchronization task, wherein the import job includes an import condition; The second deployment module is used to deploy the import job to the import-end ETL scheduling cluster, so that the import-end ETL scheduling cluster imports the database table on the child node into the import-end data warehouse cluster according to the import condition.

10. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Task processing method and device in multi-task queue

    CN108228240A

  • DB2 database data synchronization method, device and system

    CN110737720A

  • Data synchronization method and device, electronic equipment and storage medium

    CN113076365A

  • Data synchronization method and data synchronization system

    CN114547206A

  • Data synchronization method, data synchronization device and electronic device

    CN116860881A