Task processing method and device

By obtaining and judging task execution information, it ensures data consistency between layers in the data warehouse, solves data inconsistency and delay problems caused by incremental synchronization errors, and improves the accuracy and efficiency of data processing.

CN118568102AActive Publication Date: 2024-08-30BOE TECHNOLOGY GROUP CO LTD +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202310215160.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-28
Publication Date
2024-08-30
Estimated Expiration
2043-02-28

AI Technical Summary

Technical Problem

In the data warehouse, there are consistency problems in data processing between layers, especially when the production cycle is long, the amount of data is large, and server or source database problems cause incremental synchronization errors, the downstream tasks cannot accurately obtain the data of the upstream tasks. , leading to data inconsistencies and delays.

Method used

By obtaining the execution information of the target task and the execution information of the upstream task, it is judged whether the task is within the execution cycle. If the upstream task has been successfully executed, the target task will be executed at the current time to ensure data consistency. If it is not within the execution cycle or the upstream task is not completed, the target task will not be executed and a prompt message will be output.

Benefits of technology

It effectively ensures the data consistency between layers, avoids the problem of empty data or delay in downstream tasks caused by the failure or delay of upstream tasks, and improves the accuracy and efficiency of data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118568102A
    Figure CN118568102A
Patent Text Reader

Abstract

The embodiment of the invention provides a task processing method and device, relates to the technical field of data processing, and is used for ensuring data consistency between layers in a database. The method comprises the steps that execution information of a target task at the current time is obtained, the target task is used for processing target data, and the execution information of the target task comprises the starting time and the ending time of the target data; and determining an upstream task of the target task and execution information of the upstream task. And if the target task and the upstream task are located in the same task execution period and the starting time of the data in the execution information of the target task is located after the ending time of the target data or is the same as the ending time of the target data, executing the target task according to the execution of the target task at the current time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, and in particular to a task processing method and device. Background Art

[0002] As enterprises develop, each department of the enterprise that produces products (such as business lines, production lines, and product lines) will build various information systems to process their own product data. For example, the information system built by the production line can integrate the product data uploaded by the equipment on the production line and the product data uploaded manually for analysis, making it easier for developers to determine the cause of product defects based on the analysis results.

[0003] The production process of products is complicated, the production cycle is long, and the amount of data is large. In order to better manage the data in the product production process, the data can be processed in layers through the data warehouse. The data between layers has a dependency relationship after processing. How to ensure the consistency of data between layers has become an urgent problem to be solved. Summary of the invention

[0004] The purpose of the embodiments of the present disclosure is to provide a task processing method and device for ensuring data consistency between layers in a database.

[0005] To achieve the above objectives, the embodiments of the present disclosure provide the following technical solutions:

[0006] On the one hand, a method for processing a task is provided. The method includes: obtaining the execution information of a target task at the current time, the target task is used to process the target data, and the execution information of the target task includes the start time and the end time of the target data. Determine the upstream task of the target task and the execution information of the upstream task. If the target task and the upstream task are within the task execution cycle, and the start time of the data in the execution information of the target task is after the end time of the target data, or is the same as the end time of the target data, then execute the target task according to the execution information of the target task at the current time.

[0007] In the above method, after obtaining the execution information of the target task, the upstream task of the target task and the execution information of the upstream task can be determined, and it can be judged whether the target task and the upstream task are within the task execution cycle and whether the start time of the data in the execution information of the upstream task is after the end time of the data in the execution information of the target task or whether the two are the same. If the target task and the upstream task are within the task execution cycle, it means that the target task and the upstream task are both in the execution stage. If the start time of the data in the execution information of the upstream task is after the end time of the data in the execution information of the target task or is the same as the end time of the target data, it means that the upstream task has been successfully executed. In this way, when executing the target task, the data of the target task execution can be obtained from the processing result of the upstream task, thereby ensuring the consistency of the data.

[0008] In some embodiments, the method also includes: if the target task and / or the upstream task of the target task are not within the task execution cycle, and / or the start time of the data in the execution information of the upstream task of the target task is before the end time of the target data, the target task is not executed.

[0009] In some embodiments, the method further includes: in response to completion of execution of the target task, updating execution information of the target task, the updated execution information including the start time and end time of the data to be processed after the current time.

[0010] In some embodiments, the above “determining the upstream task of the target task” specifically includes: determining the upstream task of the target task according to a preset corresponding relationship. The preset corresponding relationship includes an upstream and downstream relationship between multiple tasks, wherein the multiple tasks include the target task.

[0011] In some embodiments, the method further includes: in response to completion of execution of the target task, storing an actual execution time of the target task, where the actual execution time of the target task includes a start execution time and an end execution time of the target task.

[0012] In some embodiments, the execution information of the target task also includes the execution time interval and execution times of the target task. The above-mentioned "executing the target task according to the execution information of the target task at the current time" includes: executing the target task according to the execution time interval, and updating the execution times of the target task after the execution of the target task is completed.

[0013] In some embodiments, the method also includes: if the target task and the upstream task of the target task are not within the task execution cycle, and / or the start time of the data in the execution information of the upstream task is before the end time of the target data, outputting prompt information for indicating the reason for not executing the target task.

[0014] In some embodiments, the target task is an ETL task.

[0015] In another aspect, a task processing device is provided, wherein the task processing device comprises: an acquisition unit, a determination unit and a processing unit.

[0016] The acquisition unit is configured to: acquire the execution information of the target task at the current time, the target task is used to process the target data, and the execution information of the target task includes the start time and the end time of the target data. The determination unit is configured to: determine the upstream task of the target task and the execution information of the upstream task. The processing unit is configured to: if the target task and the upstream task are within the task execution cycle, and the start time of the data in the execution information of the target task is after the end time of the target data, or is the same as the end time of the target data, then execute the target task according to the execution information of the target task at the current time.

[0017] In some embodiments, the processing unit is further configured to: not execute the target task if the target task and / or the upstream task of the target task is not within the task execution cycle, and / or the start time of the data in the execution information of the upstream task of the target task is before the end time of the target data.

[0018] In some embodiments, the processing unit is further configured to: in response to completion of execution of the target task, update execution information of the target task, wherein the updated execution information includes the start time and end time of the data to be processed after the current time.

[0019] In some embodiments, the determining unit is specifically configured to: determine the upstream task of the target task according to a preset corresponding relationship. The preset corresponding relationship includes an upstream and downstream relationship between multiple tasks, wherein the multiple tasks include the target task.

[0020] In some embodiments, the device further comprises a storage unit configured to: in response to the completion of the execution of the target task, store the actual execution time of the target task, wherein the actual execution time of the target task comprises the start execution time and the end execution time of the target task.

[0021] In some embodiments, the execution information of the target task also includes the execution time interval and execution times of the target task. The processing unit is specifically configured to: execute the target task according to the execution time interval, and update the execution times of the target task after the target task is executed.

[0022] In some embodiments, the device further comprises an output unit. The output unit is configured to output prompt information indicating the reason for not executing the target task if the target task and / or an upstream task of the target task are not within the task execution cycle, and / or the start time of the data in the execution information of the upstream task is before the end time of the target data.

[0023] In some embodiments, the target task is an ETL task.

[0024] In another aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed on a computer, the computer executes the processing method described in any of the above embodiments.

[0025] In another aspect, a computer program product is provided, wherein the computer program product comprises computer program instructions, and when the computer program instructions are executed on a computer, the computer program instructions cause the computer to execute the processing method as described in any one of the above embodiments.

[0026] In another aspect, a computer program is provided. When the computer program is executed on a computer, the computer program enables the computer to execute the processing method described in any of the above embodiments.

[0027] On the other hand, a chip is provided, which includes a processor and a communication interface, wherein the communication interface and the processor are coupled, and the processor is used to run a computer program or instruction to implement the method described in any of the above embodiments.

[0028] Specifically, the chip provided in the present application also includes a memory for storing computer programs or instructions.

[0029] It should be noted that the above computer instructions may be stored in whole or in part on a computer-readable storage medium, wherein the computer-readable storage medium may be packaged together with the processor of the device, or may be packaged separately from the processor of the device, which is not limited in this application.

[0030] In this application, the names of the above devices do not limit the devices or functional modules themselves. In actual implementation, these devices or functional modules may appear with other names. As long as the functions of each device or functional module are similar to those of this application, they fall within the scope of the claims of this application and their equivalent technologies. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions in the present disclosure, the following briefly introduces the drawings required to be used in some embodiments of the present disclosure. Obviously, the drawings described below are only drawings of some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can also be obtained based on these drawings. In addition, the drawings described below can be regarded as schematic diagrams, and are not limitations on the actual size of the product involved in the embodiments of the present disclosure, the actual process of the method, the actual timing of the signal, etc.

[0032] Figure 1 is a structural diagram of a data warehouse according to some embodiments;

[0033] Figure 2 is a schematic diagram of dependencies between tasks according to some embodiments;

[0034] Figure 3 is a schematic diagram of dependencies between tasks according to some embodiments;

[0035] Figure 4 is a schematic diagram of dependencies between tasks in an actual production process according to some embodiments;

[0036] Figure 5 is a structural diagram of an ETL system according to some embodiments;

[0037] Figure 6 is a flowchart of a method for processing a task according to some embodiments;

[0038] Figure 7 is a flowchart of a method for processing a task according to some embodiments;

[0039] Figure 8 A flowchart of a method for processing a task according to some embodiments

[0040] Fig. 9 A block diagram of a processing device for a task according to some embodiments;

[0041] Fig.10 A block diagram of a processing device for a task according to some embodiments. DETAILED DESCRIPTION

[0042] The following will be combined with the accompanying drawings to clearly and completely describe the technical solutions in some embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments provided by the present disclosure, all other embodiments obtained by ordinary technicians in this field belong to the scope of protection of the present disclosure.

[0043] Unless the context requires otherwise, throughout the specification and claims, the term "including" is to be interpreted as an open, inclusive meaning, that is, "including, but not limited to". In the description of the specification, the terms "one embodiment", "some embodiments", "exemplary embodiments", "examples" or "some examples" and the like are intended to indicate that specific features, structures, materials or characteristics associated with the embodiment or example are included in at least one embodiment or example of the present disclosure. The schematic representations of the above terms do not necessarily refer to the same embodiment or example. In addition, the specific features, structures, materials or characteristics described may be included in any one or more embodiments or examples in any appropriate manner.

[0044] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present disclosure, unless otherwise specified, "plurality" means two or more.

[0045] “At least one of A, B, and C” has the same meaning as “at least one of A, B, or C” and both include the following combinations of A, B, and C: A only, B only, C only, the combination of A and B, the combination of A and C, the combination of B and C, and the combination of A, B, and C.

[0046] “A and / or B” includes the following three combinations: A only, B only, and a combination of A and B.

[0047] As used herein, the term "if" is optionally interpreted to mean "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined that" or "if [a stated condition or event] is detected" are optionally interpreted to mean "upon determining that" or "in response to determining that" or "upon detecting [a stated condition or event]" or "in response to detecting [a stated condition or event]," depending on the context.

[0048] The use of "adapted to" or "configured to" herein is meant to be open and inclusive language that does not exclude devices adapted or configured to perform additional tasks or steps.

[0049] Additionally, the use of “based on” is meant to be open and inclusive, as a process, step, calculation, or other action “based on” one or more stated conditions or values ​​may, in practice, be based on additional conditions or values ​​beyond those stated.

[0050] As used herein, "about," "substantially," or "approximately" includes the stated value and an average value that is within an acceptable range of variation from the particular value as determined by one of ordinary skill in the art taking into account the measurements in question and the errors associated with the measurement of the particular quantity (i.e., the limitations of the measurement system).

[0051] The following explains the terms involved in the embodiments of the present application to facilitate the reader's understanding.

[0052] Extract-transform-load (ETL): can be used to describe the process of extracting, transforming and loading data from the source to the destination.

[0053] In one example, the source end and the destination end may be different databases. For example, the databases may include: a manufacturing execution system (MES) database, an operational data store (ODS) database, and a manufacturing data warehouse (MDW) database.

[0054] Among them, the MES database can be connected to the production equipment. The MES database can be used to store the manufacturing data of the production equipment, such as product quantity, product qualification rate, production efficiency, etc.

[0055] It should be noted that in order to ensure the security and reliability of data, the MES database can be set with permissions or protection measures. That is, if the operator does not have permission, the MES database cannot add, delete, modify, query, etc. the stored data.

[0056] The ODS database can be used to store raw data. The data in the ODS database is consistent with the data produced by the source system. For example, the ODS data can extract data from the MES database and store, summarize, store, and analyze data in the manufacturing process. In other words, the ODS database can back up the data in the MES database. In this way, data anomalies caused by data loss or data tampering in the MES database can be avoided.

[0057] The MDW database is used to aggregate, store, and analyze data in the manufacturing process. That is, the MDW database can respond to user operations, organize and aggregate data, and obtain multiple types of data tables. The data in the data table can be used as a subsequent data source and data foundation.

[0058] In one scenario, when a product manufacturing company is building a database, it can divide the data into multiple layers according to business needs. For example, the data in the MDW database can be divided into the operational data layer (operational data store, ODS) (also called the data preparation layer, collectively referred to as the ODS layer for the convenience of description), the data warehouse detail layer (data warehouse detail, DWD) (collectively referred to as the DWD layer for the convenience of description), and the data summary layer (data warehouse summary, DWS) (collectively referred to as the DWS layer for the convenience of description).

[0059] The ODS layer can be used to store data in the MES database. The DWD layer can be used to store data in the ODS layer after association and cleaning. The DWS layer can be used to store data in the DWD layer after aggregation.

[0060] Combined with the above application scenarios, such as Figure 1 As shown, the MDW database may include multiple layers, and data may be transmitted and processed between the layers through ETL. For example, data in the MES database may be stored in MES tables 1 to 3. Data in the MDW database may be stored in ODS tables 4 to ODW tables 6, DWD tables 7 to 9, and DWS tables 10 to 11.

[0061] Among them, ODS table 4 to ODW table 6 are used to store data in the ODS layer, DWD table 7 to DWD table 9 are used to store data in the DWD layer, and DWS table 10 to DWS table are used to store data in the DWS layer.

[0062] Task: It can refer to the process of extracting, converting, loading, etc. of data from tables at each layer. For example, a task can be an ETL task.

[0063] In the embodiment of the present application, tasks may include upstream tasks and downstream tasks. Upstream tasks and downstream tasks are inseparable. Downstream tasks depend on upstream tasks. A downstream task may correspond to one or more upstream tasks. An upstream task may also correspond to one or more downstream tasks.

[0064] In one example, if the data of table A comes from table B, then in the relationship between table A and table B, table B is called the upstream of table A, and table A is called the downstream of table B. Then, the task corresponding to table A is called the downstream task, and the task corresponding to table B is called the upstream task.

[0065] For example, combined with Figure 1 , the tasks of the DWD layer depend on the tasks of the ODS layer. The tasks of the DWS layer depend on the tasks of the DWD layer. And there are multiple dependencies and single dependencies between tasks.

[0066] For example, the upstream task of the task corresponding to ODS table 4 may be the task corresponding to MES table 1. The upstream task of the task corresponding to DWD table 7 may be the task corresponding to ODS table 4. The upstream task of the task corresponding to DWD table 8 may be the task corresponding to ODS table 4 and the task corresponding to ODS table 5. The upstream task of the task corresponding to DWS table 11 may be the task corresponding to DWD table 8 and the task corresponding to DWD table 9.

[0067] The task corresponding to the table may refer to a task that needs to process the data in the table, for example, updating the data in the table or inserting data in the table.

[0068] In one example, the task corresponding to ODS table 4 can process the data in ODS table 4 and write the processed data into ODS table 4. The task corresponding to DWD table 7 can process the data in the ODS table and write the processed data into DWD table 7. That is, the data in DWD table 7 comes from ODS table 4.

[0069] It should be noted that Figure 1 The arrows in the figure indicate the data flow direction. The left side of the arrow represents the upstream, and the right side of the arrow represents the downstream. The figure only uses the example of a downstream task relying on one upstream task and a downstream task relying on two upstream tasks. In the actual factory production process, the dependency relationship between tasks is more complicated.

[0070] Since a large amount of data is generated during the factory generation process, data between layers can usually be synchronized through incremental synchronization. However, when using incremental synchronization to synchronize data, errors may occur due to server problems, source database problems, and other reasons. The following describes incremental synchronization and possible errors in combination with specific scenarios.

[0071] Scenario 1: No dependencies are set between tasks, and tasks run independently.

[0072] The dependency relationship may refer to the association between tasks. For example, taking Task A and Task B as an example, Task A is used to process the data in Table A, and Task B is used to process the data in Table B. The data in Table B (i.e., the downstream table) comes from Table A (i.e., the upstream table).

[0073] In one example, at 202206280710 (that is, 07:10 on June 28, 2022), both Task A and Task B need to execute the data between 20220628070500 and 20220628071000, and the scheduling information of Task A and Task B is every 5 minutes, incrementally synchronizing the data 5 minutes before the current time.

[0074] In one possible scenario, after Task B starts executing, if Task A reports an error or Task A has not yet been successfully executed, since Task A and Task B do not have a dependency relationship, even if Task B is successfully executed, the following problems may occur:

[0075] 1. When task B is executed, since table A does not have data after 20220628070500, and since the data in table B comes from table A, there will be no data after 20220628070500 in table B. In this way, even if task B is executed successfully, the incremental data is empty.

[0076] 2. Since Task B is successfully executed this time, no error log will be generated. Therefore, it is not easy to find the problem of missing data in Table B.

[0077] 3. The data range of the next execution of Task B is from 20220628071000 to 20220628071500. Due to the time misalignment between the upstream task and the downstream task, the data acquired incrementally by Task B may be empty.

[0078] It should be noted that in the embodiment of the present application, when a task scheduling fails to execute, the scheduling task will be repeated until it is successfully executed. For example, when task A fails to execute the data between 20220628070500 and 20220628071000, but task B is successfully executed, since the data executed by task B comes from the data executed by task A, the data executed by task B is empty due to the failure of task A. In this way, even if task B is successfully executed, no data will be generated, resulting in the subsequent data of task B being always empty.

[0079] In combination with the above examples, the execution status of Task A and Task B can be shown in Tables 1 to 3. Among them, Table 1 shows the situation when Task A and Task B are not executed at 202206280710, Table 2 shows the situation after Task A and Task B are executed at 202206280710, and Table 3 shows the situation after Task A and Task B are executed at 202206280715.

[0080] Table 1

[0081] Task Name Start time End time Task execution status Task A 20220628070500 20220628071000 READY Task B 20220628070500 20220628071000 READY

[0082] Table 2

[0083] Task Name Start time End time Task execution status Task A 20220628070500 20220628071000 ERROR Task B 20220628071000 20220628071500 READY

[0084] It should be noted that, in Table 2, ERROR indicates that task A failed to execute at time 2022062807110.

[0085] Table 3

[0086] Task Name Start time End time Task execution status Task A 20220628071000 20220628071500 READY Task B 20220628071500 20220628072000 READY

[0087] It can be seen from Tables 2 and 3 above that due to the failure of Task A, the data executed by Task A in Table 3 cannot be synchronized with the data executed by Task B. In this way, when Task B executes the data from 20220628071500 to 20220628072000, since the data in this time period comes from the data from 20220628071500 to 20220628072000 executed by Task A, but Task A has not yet executed the data in this time period, the data executed by Task B is empty, that is, the data executed by Task B is inaccurate.

[0088] Scenario 2: Dependencies are set between tasks. Tasks are independent of each other, and downstream tasks can only be executed after the upstream task is successfully executed.

[0089] In one example, Figure 2 As shown, task A and task B are upstream tasks of task C, and task A and task B are independent.

[0090] The data executed by Task C comes from Table A and Table B. There is no correlation between the data in Table A and the data in Table B. Table A corresponds to Task A, and Table B corresponds to Task B. Task C can only be executed after Task A and Task B are both executed successfully.

[0091] In one scenario, at time 202206280710, task A fails to obtain data between time 20220628070500 and time 20220628071000, and task B succeeds in obtaining data between time 20220628070500 and time 20220628071000. Then task C fails to obtain data between time 20220628070500 and time 20220628071000. At time 202206280715, if task A succeeds in obtaining data between time 20220628070500 and time 20220628071000, and task B fails, then task C still fails to obtain data between time 20220628070500 and time 20220628071000. Therefore, the execution time of task C is seriously delayed.

[0092] In combination with the above examples, the execution status of Task A, Task B, and Task C can be shown in Tables 4 to 6. Among them, Table 4 shows the situation when Task A, Task B, and Task C are not executed at 2022062807110, Table 5 shows the execution status of Task A, Task B, and Task C at 2022062807110, and Table 6 shows the execution status of Task A, Task B, and Task C at 202206280715.

[0093] Table 4

[0094] Task Name Start time End time Task execution status Task A 20220628070500 20220628071000 READY Task B 20220628070500 20220628071000 READY Task C 20220628070500 20220628071000 READY

[0095] Table 5

[0096] Task Name Start time End time Task execution status Task A 20220628070500 20220628071000 ERROR Task B 20220628071000 20220628071500 READY Task C 20220628070500 20220628071000 ERROR

[0097] It should be noted that, in Table 5, ERROR indicates that task A failed to execute at time 2022062807110.

[0098] Table 6

[0099]

[0100]

[0101] It can be seen from Table 5 and Table 6 that when any of Task A and Task B fails, Task C will fail. Furthermore, it can be seen from Table 6 that since Task A fails at 2022062807110 and Task B fails at 202206280715, the execution time of Task C is delayed by 10 minutes.

[0102] Scenario 3: Dependencies are set between tasks. There are dependencies between upstream tasks, and downstream tasks can only be executed after the upstream tasks are successfully executed.

[0103] In one example, Figure 3 As shown, task A and task B are upstream tasks of task C, and there is a dependency relationship between task A and task B.

[0104] Among them, the data executed by Task C comes from Table A and Table B. There is no correlation between the data in Table A and the data in Table B, and Table A corresponds to Task A, and Table B corresponds to Task B.

[0105] In one scenario, at time 202206280710, both Task A and Task B fail, which will cause Task C to fail. At time 202206280715, Task A succeeds, but Task B fails, which will also cause Task C to fail. At time 202206280720, Task A and Task B succeed, then Task C also succeeds, but the execution time of Task C is delayed.

[0106] In combination with the above examples, the execution status of Task A, Task B, and Task C can be shown in Tables 7 to 10. Among them, Table 7 shows the situation when Task A, Task B, and Task C are not executed at 202206280710, Table 8 shows the execution status of Task A, Task B, and Task C at 202206280710, Table 9 shows the execution status of Task A, Task B, and Task C at 202206280715, and Table 10 shows the execution status of Task A, Task B, and Task C at 202206280720.

[0107] Table 7

[0108] Task Name Start time End time Task execution status Task A 20220628070500 20220628071000 READY Task B 20220628070500 20220628071000 READY Task C 20220628070500 20220628071000 READY

[0109] Table 8

[0110] Task Name Start time End time Task execution status Task A 20220628070500 20220628071000 ERROR Task B 20220628070500 20220628071000 ERROR Task C 20220628070500 20220628071000 ERROR

[0111] In Table 8, since Task A fails to execute, Task B and Task C also fail to execute.

[0112] Table 9

[0113] Task Name Start time End time Task execution status Task A 20220628071000 20220628071500 READY Task B 20220628070500 20220628071000 ERROR Task C 20220628070500 20220628071000 ERROR

[0114] In Table 9, Task A is executed successfully, but Task B fails, which causes Task C to fail.

[0115] Table 10

[0116] Task Name Start time End time Task execution status Task A 20220628071500 20220628072000 READY Task B 20220628071000 20220628071500 READY Task C 20220628071000 20220628071500 READY

[0117] In Table 10, after Task A, Task B and Task C are executed at time 202206280720, data scheduling between time 202206280720 and time 202206280725 should be executed, but the latest end time of Task A and Task B is time 202206250715, that is, the execution time of the upstream task is delayed by 10 minutes, and the execution time of Task C (downstream task) is delayed by 10 minutes.

[0118] In a practical application scenario, in the construction of a manufacturing data warehouse, the production status of products can be analyzed based on indicators such as product input-output topics, defective topics, and pass rate topics. Figure 4 As shown in the figure, it is the dependency relationship between tasks in the actual production process. Figure 4 In the example above, the task (or table) on the right side of the arrow depends on the task (or table) on the left side of the arrow. Therefore, there are single dependency and multiple dependency situations.

[0119] like Figure 4 The task shown in uses the task dependency in the above scenario 1. When the data in the ODS_LOTHISTORY table is delayed, all subsequent subject table data that depends on the ODS_LOTHISTORY table will be missing, resulting in the factory output and defective numbers being less than the actual production, and also causing inaccurate calculation of yield indicators.

[0120] If there is a dependency relationship between task JOB_DWS_FPY_LOT, task JOB_DWS_INOUT_LOT and task JOB_DWS_NG_LOT as described in the above scenario 2, when task JOB_DWS_INOUT_LOT fails or task JOB_DWS_NG_LOT fails, the data in the DWS_FPY_LOT table will be delayed, causing the yield indicator calculation to lag.

[0121] If the tasks JOB_DWS_FPY_LOT, JOB_DWS_INOUT_LOT and JOB_DWS_NG_LOT have a dependency relationship as shown in the above scenario three, that is, the tasks of the input-output theme depend on the tasks of the bad theme, and the pass rate task depends on both the tasks of the input-output theme and the tasks of the bad theme, it may cause the data in the input-output theme table and the pass rate theme table to lag seriously.

[0122] In response to the above-mentioned problems, an embodiment of the present application provides a method that does not restrict the upstream and downstream relationships in the ETL tool, but instead determines whether the downstream task can be executed based on the data corresponding to the upstream and downstream tasks and the relationship between the upstream task and the downstream task.

[0123] In one example, in the present application, when starting to execute a task, the execution information of the task is obtained from the config table, such as the start time and end time of the data executed by the task. The upstream task of the task is obtained from the mapping table. If the execution information of all upstream tasks of the task is obtained from the config table, and the start time of each upstream task is after the end time of the task, the task is executed. After the execution of the task is completed, the execution log is written to the config hist table, and the execution information in the config table is updated. If all the upstream information of the task cannot be obtained from the mapping table, and / or the start time of the upstream information of the task is before the end time of the task, the task is stopped and the reason for the failure of the task execution is output.

[0124] The implementation of the embodiments of the present application will be described in detail below in conjunction with the accompanying drawings.

[0125] like Figure 5 As shown, it is a structural diagram of an ETL system provided in an embodiment of the present application. The ETL system may include multiple databases. The databases are communicated and connected. For example, the multiple databases may include an MES database and an MDW database. The multiple databases can refer to the above description and will not be repeated.

[0126] In one example, the database may be configured with an ETL tool. The ETL tool may be used to schedule tasks for data in the database. For example, the ETL tool may be used to execute the method in the following embodiment.

[0127] Combine the following Figure 1 The multiple layers shown and Figure 5 The system shown describes the method provided in the embodiment of the present application.

[0128] like Figure 6 As shown, the method may include S601 to S603.

[0129] S601: Obtain execution information of the target task at the current time.

[0130] The target task may be used to process the target data, for example, to schedule the target data. For example, the target task may be an ETL task.

[0131] In one example, combining Figure 1 as well as Figure 2 , the ETL tool is configured for the MDW database. The target task can be Figure 1For tasks in the DWS layer, the target data may be data in the DWS layer. For example, the target data may be stored in the DWS layer in a table form. For example, the target data may be data in DWS table 10 or data in DWS table 11.

[0132] In a possible implementation, a configuration (config) table may be configured in the database. The config table may include execution information of multiple tasks, and the multiple tasks are tasks that need to be executed in the same cycle. The multiple tasks may include target tasks. The execution information of the target task may include time information of the target data (such as start time (START_TIME) and end time (END_TIME), etc.). In this way, the ETL tool can obtain the execution information of the target data at the current time from the config table.

[0133] The start time and end time of the target data may be referred to as the timestamp of the target data, that is, the ETL tool may perform scheduling tasks on the data within the timestamp interval.

[0134] Of course, the execution information of the target task may also include other information, such as the name of the target task (JOB_NAME), the actual execution time of the target task (also known as the update time (UPDATE_TIME)), the execution time interval (INCREMENT_MI), the number of executions (BATCH_ID), the execution status (JOB_STATUS), etc.

[0135] The actual execution time of a task may refer to the time when the task is completed. The execution time interval of a task may refer to the data that needs to be processed each time the task is executed. The number of executions may refer to the total number of times the task has been executed.

[0136] For example, Table 11 shows a config table provided in an embodiment of the present application. The table can be used to record information such as data ranges that need to be synchronized for multiple tasks at the current time.

[0137] Table 11

[0138]

[0139] It should be noted that only three tasks and the execution information of each task are shown in Table 11. Of course, more tasks and corresponding execution information may be included without limitation.

[0140] S602: Determine the upstream task of the target task and the execution information of the upstream task.

[0141] The upstream task of the target task can refer to the above description, which will not be described in detail. The execution information of the upstream task can refer to the execution information of the target task, which will not be described in detail.

[0142] In a possible implementation, the ETL tool may determine the upstream task of the target task according to a preset corresponding relationship. The preset corresponding relationship may include an upstream and downstream relationship between multiple tasks. The multiple tasks include the target task.

[0143] In one example, the preset corresponding relationship may be pre-configured in an ETL tool or database. For example, the preset corresponding relationship may be stored in an ETL tool or database in a table form (such as a mapping table). For example, the preset corresponding relationship may be as shown in Table 12.

[0144] Table 12

[0145] Task Name Table name Source table name Interface time job_dwd_inout_lot dwd_inout_lot ods_lothistory 20220506 15:50:15 job_dws_fpy_move_d dws_fpy_move_d dws_inout_lot_d 20220507 13:25:03 job_dws_fpy_move_d dws_fpy_move_d dws_ng_lot_d 20220507 13:25:03 job_dws_fpy_move_d dws_fpy_move_d dws_palletpacking_lot_d 20220507 13:25:03 job_dws_inout_lot_d dws_inout_lot_d dws_inout_lot_h 20220507 08:42:13

[0146] It should be noted that in Table 12, the task name may refer to the name of the downstream task. The table name may refer to the name of the table corresponding to the downstream task (that is, the downstream table name). The source table name may refer to the name of the upstream table that the downstream table depends on. The interface time refers to the insertion time of the corresponding relationship between the task and the upstream task of the task. For example, for the second row of data in Table 12. The interface time (20220506 15:50:15) means inserting the row of data into the table at 2022050615:50:15.

[0147] It should be noted that the table name and task name in Table 12 are related. The table corresponding to the task can be determined by the task name, and the corresponding task can be determined by the table name. For example, the task job_dwd_inout_lot in the second row of Table 12 has a source table name corresponding to ods_lothistory, and the upstream task of the task job_dwd_inout_lot is job_ods_lothistory. That is, by adding job_ before the source table name corresponding to the task, the upstream task of the task can be obtained.

[0148] After determining the upstream task of the target task, the ETL tool can obtain the execution information of the upstream task according to the name of the upstream task. Specifically, the method for obtaining the execution information of the target task in S501 above can be referred to, and no further description is given.

[0149] S603. If the target task and the upstream task of the target task are within the task execution cycle, and the start time of the data in the execution information of the upstream task is after the end time of the target data, or is the same as the end time of the target data, then the target task is executed according to the execution information of the target task at the current time.

[0150] Among them, the target task and the upstream task of the target task are in the execution cycle, which can also be described as the target task and the upstream task of the target task need to be executed, or the target task and the upstream task of the target task are in the task execution list, or the target task and the upstream task of the target task need to be executed synchronously.

[0151] In one example, the ETL tool or database may be pre-configured with one or more tables, and one table includes multiple tasks. For example, the table may be the above-mentioned config table (i.e., Table 11). If the target task and the upstream task of the target task are located in the config table, it means that the target task and the upstream task of the target task are located in the task execution cycle.

[0152] If the start time of the data in the execution information of the upstream task is after the end time of the target data, it means that the upstream task has been processed and the target data has been obtained.

[0153] In one example, combined with the above Table 11, if the target task is job_dwd_inout_lot, the upstream task of the target task is job_ods_lothistory. The end time of the target task is 20220627183000, and the start time of the upstream task is 20220627191000. Since 20220627191000 is after 20220627183000, it means that the upstream task has completed the data before 20220627183000, that is, the upstream task has provided a data source for the target task. Therefore, when executing the target task, the ETL tool can obtain the data (that is, the target data) with a timestamp interval between 20220627173000 and 20220627183000.

[0154] In a possible implementation, after determining that the target task and the upstream task of the target task are in the task execution cycle, if the start time of the data in the execution information of the upstream task is after the end time of the target data in the execution information of the target task, or the start time of the data in the execution information of the upstream task is the same as the end time of the target data in the execution information of the target task, the ETL tool can execute the target task according to the execution information of the target data at the current time. For example, the ETL tool can schedule the data between the timestamp intervals in the above config table according to the execution information of the target task in the table.

[0155] Further, if the execution information of the target task also includes the number of executions of the task, then after the target task is executed, the number of executions in the execution information can be updated. For example, the number of executions in the execution information or the number of executions is increased by a first value (such as 1). For example, when the target task is not executed, the number of executions in the execution information of the target task is A, then after the target task is executed, the number of executions in the execution information of the target task is updated to A+1.

[0156] On the contrary, if the target task and / or the upstream task are not within the task execution cycle, and / or the start time of the data in the execution information of the upstream task is before the end time of the target data, the target task is not executed.

[0157] In one example, if any of the target task and the upstream task is not in the config table, it means that there is a task that is not executed in the target task and the upstream task. In order to avoid the failure of the target task or the lack of data source, the target task can be temporarily not executed until the config table is updated and the updated config table contains the target task and the upstream task of the target task.

[0158] In another example, in the config table, if the start time of the data in the execution information of the target task is before the end time of the upstream task, it means that the upstream task has not been completed. In this case, if the target task is executed, the target task will not be able to obtain the data. Therefore, the target task can be not executed.

[0159] based on Figure 6 According to the technical solution, after obtaining the execution information of the target task, the upstream task of the target task and the execution information of the upstream task can be determined, and it can be judged whether the target task and the upstream task are within the task execution cycle and whether the start time of the data in the execution information of the upstream task is after the end time of the data in the execution information of the target task or whether the two are the same. If the target task and the upstream task are within the task execution cycle, it means that both the target task and the upstream task are in the execution stage. If the start time of the data in the execution information of the upstream task is after the end time of the data in the execution information of the target task or the two are the same, it means that the upstream task has been successfully executed. In this way, when executing the target task, the data required for the execution of the target task can be obtained from the processing result of the upstream task, thereby ensuring the consistency of the data.

[0160] In some embodiments, such as Figure 7 As shown, the method provided in the embodiment of the present application may further include S701.

[0161] S701: In response to completion of execution of a target task, update execution information of the target task.

[0162] The updated execution information includes the start time and end time of the data to be processed after the current time.

[0163] In a possible implementation, in response to the target task being executed and completed, the ETL tool may update the execution information of the target task according to the timestamp interval of the data in the execution information of the target task.

[0164] In an example, if the timestamp interval of the data in the execution information of the target task is 60 minutes, the start time of the target data in the execution information of the current target task is 20220627173000, and the end time is 20220627183000, then the start time of the target data in the execution information of the updated target task can be 20220627173000, and the end time is 20220627183000.

[0165] In one scenario, if the target task is not executed successfully, the ETL tool may execute the target task again until the target task is executed successfully, and update the execution information of the target task after the target task is executed successfully.

[0166] For example, in combination with the above Table 11, if the task in Table 11 is executed successfully, the ETL tool can update the start time and end time in Table 11 according to the timestamp interval corresponding to the task.

[0167] based on Figure 7 According to the technical solution, after the target task is executed, the start time and end time of the data in the execution information of the target task can be updated, so that the next time the target task is executed, the data to be processed can be accurately obtained according to the updated execution information.

[0168] In some embodiments, the method provided by the embodiments of the present application may further include: in response to the completion of the execution of the target task, the ETL tool may store the actual execution time of the target task.

[0169] The actual execution time of the target task may include the start execution time and the end execution time of the target task.

[0170] In one example, in response to the execution completion time of the target task, the ETL tool may store the actual execution time of the target task in a database. For example, the actual execution time of the target task may be stored in a table. For example, the table may be a config Hist table. The config Hist table may be used to record logs of executed / running tasks.

[0171] For example, Table 13 shows a config Hist table provided by an embodiment of the present application. The config Hist table may include task name, task execution times, start time and end time of task execution data, task timestamp interval, task status, actual execution time of the task, etc.

[0172] Table 13

[0173]

[0174] It should be noted that Table 13 only shows the logs of a task executed 9 times. Of course, more logs can be included without limitation. In Table 13, the start execution time of the task is the same as the end execution time. This is because in some scenarios, such as when the amount of synchronized data is small, the execution of the task may be displayed in microseconds, which will cause the start execution time in the table to be the same as the end execution time, but in fact there is still a time interval between the two.

[0175] Based on this embodiment, after the target task is executed, the ETL tool can store the execution log of the target task, so that subsequent managers can check whether the task execution is abnormal.

[0176] In some embodiments, the method provided by the embodiments of the present application may also include: if the target task and the upstream task are not in the same task execution cycle, and / or the end time of the data in the execution information of the upstream task is after the start time of the target data, outputting a prompt message.

[0177] The prompt information may be used to indicate the reason for not executing the target task.

[0178] In one scenario, if the target task and / or the upstream task are not within the task execution cycle, the output prompt information may be used to indicate that there is a task that is not executed between the target task and the upstream task. For example, the reason for not executing the target task may include that the upstream task of the target task is not executed or the execution status of the upstream task of the target task is unknown.

[0179] In another scenario, if the start time of the data in the execution information of the upstream task is before the end time of the target data, the output prompt information can be used to indicate that the upstream task has not been completed or the target task has no data source.

[0180] Based on the technical solution of this embodiment, when the ETL tool does not execute a task, it can output a prompt message indicating that the target task is not executed, so that the maintenance personnel can accurately determine the reason why the task is not executed based on the prompt reason.

[0181] In some embodiments, the number of upstream tasks of the target task can be multiple. In this case, the ETL tool can obtain the execution information of each upstream task, and execute the target task when the multiple upstream tasks and the target task are in the same task execution cycle, and the start time of the data in the execution information of each upstream task is before the end time of the target task data. In this way, when the target task has multiple upstream tasks, the ETL tool can also ensure the successful execution of the target task and the data source is not empty.

[0182] The method provided in the embodiment of the present application is described below with reference to specific examples.

[0183] In one example, the target task is task C, which has two upstream tasks, namely task A and task B. Figure 8 As shown, the method provided in the embodiment of the present application may include:

[0184] S801. In response to starting to execute task C, the execution information of the current execution of task C is obtained from the config table.

[0185] The execution information may include the start time, end time and timestamp interval of the data that task C needs to process.

[0186] S802. Store the execution information of task C during this execution.

[0187] In one example, the execution information of the current execution of task C can be stored in a Kettle variable.

[0188] S803. Read the task name of the upstream task that task C depends on from the mapping table.

[0189] In one example, the task names of the upstream tasks that Task C depends on may be Task A and Task B.

[0190] S804. According to the task name of the upstream task that Task C depends on, the execution information of Task A and Task C is obtained from the config table.

[0191] If the start time of the data in the execution information of task A and the start time of the data in the execution information of task B are greater than or equal to the end time of the data in the execution information of task C, then S805 to S806 are executed; otherwise, S807 is executed.

[0192] Among them, the start time of the data in the execution information of task A and the start time of the data in the execution information of task B are actually greater than or equal to the end time of the data in the execution information of task C, which may mean that the start time of the data in the execution information of task A and the start time of the data in the execution information of task B are both after the end time of the data in the execution information of task C, or are both the same as the end time of the data in the execution information of task C.

[0193] S805. Perform data processing according to the execution information of task C this time.

[0194] Among them, data processing may include data conversion, data warehousing, etc.

[0195] S806. Write the log of the current execution of task C into the config Hist table, and update the relevant information of task C in the config table to obtain the time information of the data required for the next execution of task C (that is, the start time and end time of the data).

[0196] The relevant information of task C may refer to the start time and end time of the data that task C needs to process in the config table.

[0197] S807, terminate the execution of task C and output a prompt message.

[0198] In a possible implementation manner, the above S804, S805 and S807 may be implemented through codes.

[0199] In one example, the code may look like this:

[0200]

[0201]

[0202] It should be noted that the above codes are only exemplary and can be implemented by other codes without limitation.

[0203] Based on the above embodiment, when executing a task, the upstream task of the task can be obtained through the mapping table, and the execution information of the upstream task can be obtained from the config table. In this way, it can be determined whether to execute the task based on the execution information of the upstream task and the execution information of the task, avoiding the problem of inconsistent data when executing the task.

[0204] In some embodiments, for the problem of inconsistent data in the above scenario 1, based on the method provided in the embodiment of the present application, the execution status of Task A and Task B can be shown in the following Tables 14 to 16. Among them, Table 14 shows the situation when Task A and Task B are not executed at 202206280710, Table 15 shows the situation after Task A and Task B are executed at 2022062807110, and Table 16 shows the situation after Task A and Task B are executed at 202206280715.

[0205] Table 14

[0206] Task Name Start time End time Task execution status Task A 20220628070500 20220628071000 READY Task B 20220628070500 20220628071000 READY

[0207] Table 15

[0208] Task Name Start time End time Task execution status Task A 20220628070500 20220628071000 ERROR Task B 20220628070500 20220628071000 ERROR

[0209] It can be seen from Table 15 that since task A failed to execute, task B also failed to execute, and the data is accurate.

[0210] Table 16

[0211] Task Name Start time End time Task execution status Task A 20220628071000 20220628071500 READY Task B 20220628071000 20220628071500 READY

[0212] It can be seen from Table 16 that when task A is executed successfully, task B is also executed successfully and the data is accurate.

[0213] In view of the problem of large delay in the execution of downstream tasks in the above scenario 2, based on the method provided in the embodiment of the present application, the execution of tasks A, B and C can be shown in the following Tables 17 to 19. Among them, Table 17 shows the situation when tasks A, B and C are not executed at 2022062807110, Table 18 shows the execution of tasks A, B and C at 2022062807110, and Table 19 shows the execution of tasks A, B and C at 202206280715.

[0214] Table 17

[0215]

[0216]

[0217] Table 18

[0218] Task Name Start time End time Task execution status Task A 20220628070500 20220628071000 ERROR Task B 20220628071000 20220628071500 READY Task C 20220628070500 20220628071000 ERROR

[0219] Table 19

[0220] Task Name Start time End time Task execution status Task A 20220628071000 20220628071500 READY Task B 20220628071000 20220628071500 ERROR Task C 20220628071000 20220628071500 READY

[0221] It can be seen from Table 19 above that based on the method provided in the embodiment of the present application, task C is executed only after task A and task B have successfully processed the data from 20220628070500 to 20220628071000, and the execution time of task C is only delayed by 5 minutes. Compared with the execution result of task C in Table 6 (delayed by 10 minutes), in the present application, the timeliness of the data of the downstream tasks is higher.

[0222] In view of the problem that there is a large delay in the execution time of downstream tasks in the above scenario three, based on the method provided in the embodiment of the present application, the execution status of Task A, Task B and Task C can be shown in the following Tables 20 to 23. Among them, Table 20 shows the situation when Task A, Task B and Task C are not executed at 202206280710, Table 21 shows the execution status of Task A, Task B and Task C at 202206280710, Table 22 shows the execution status of Task A, Task B and Task C at 202206280715, and Table 23 shows the execution status of Task A, Task B and Task C at 202206280720.

[0223] Table 20

[0224] Task Name Start time End time Task execution status Task A 20220628070500 20220628071000 READY Task B 20220628070500 20220628071000 READY Task C 20220628070500 20220628071000 READY

[0225] Table 21

[0226]

[0227]

[0228] It can be seen from Table 21 that the start time of task A (20220628070500) is less than the end time of task C (20220628071000) in Table 20, so the task execution status of task C is ERROR.

[0229] Table 22

[0230] Task Name Start time End time Task execution status Task A 20220628071000 20220628071500 READY Task B 20220628071000 20220628071500 ERROR Task C 20220628071000 20220628071500 READY

[0231] It can be seen from Table 22 that the start time of Task A (20220628071000) and the start time of Task B (20220628071000) are greater than the end time of Task C (20220628071000) in Table 20, so Task C in Table 22 is executed. That is, Task C is executed for the data between 20220628071000 and 20220628071500.

[0232] Table 23

[0233] Task Name Start time End time Task execution status Task A 20220628071500 20220628072000 READY Task B 20220628071500 20220628072000 READY Task C 20220628071500 20220628072000 READY

[0234] It can be seen from Table 23 that the start time of Task A (20220628071500) and the start time of Task B (20220628071500) are both equal to the end time of Task C in Table 22 (20220628071500), so Task C in Table 23 can be executed. That is, Task C is executed for the data between 20220628071500 and 20220628072000.

[0235] It should be pointed out that the various embodiments of the present application can learn from or refer to each other. For example, the same or similar steps, method embodiments, system embodiments and device embodiments can all refer to each other without limitation.

[0236] The embodiment of the present application can divide the task processing device into functional modules or functional units according to the above method example. For example, each functional module or functional unit can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules or functional units. Among them, the division of modules or units in the embodiment of the present application is schematic, which is only a logical function division. There may be other division methods in actual implementation.

[0237] like Fig. 9 , which is a schematic diagram of the structure of a task processing device provided in an embodiment of the present application, the device includes: an acquisition unit 901, a determination unit 902 and a processing unit 903.

[0238] Wherein, the acquisition unit 901 is configured to: acquire the execution information of the target task at the current time, the target task is used to process the target data, and the execution information of the target task includes the start time and the end time of the target data. The determination unit 902 is configured to: determine the upstream task of the target task and the execution information of the upstream task. The processing unit 903 is configured to: if the target task and the upstream task are within the task execution cycle, and the start time of the data in the execution information of the target task is after the end time of the target data, or is the same as the end time of the target data, then execute the target task according to the execution information of the target task at the current time.

[0239] In some embodiments, the processing unit 903 is further configured to: not execute the target task if the target task and / or the upstream task of the target task is not within the task execution cycle, and / or the start time of the data in the execution information of the upstream task of the target task is before the end time of the target data.

[0240] In some embodiments, the processing unit 903 is further configured to: in response to completion of execution of the target task, update execution information of the target task, wherein the updated execution information includes the start time and end time of the data to be processed after the current time.

[0241] In some embodiments, the determining unit 902 is specifically configured to: determine the upstream task of the target task according to a preset corresponding relationship. The preset corresponding relationship includes an upstream and downstream relationship between multiple tasks, wherein the multiple tasks include the target task.

[0242] In some embodiments, the apparatus further includes a storage unit 904. The storage unit 904 is configured to: in response to the completion of the execution of the target task, store the actual execution time of the target task, the actual execution time of the target task including the start execution time and the end execution time of the target task.

[0243] In some embodiments, the execution information of the target task also includes the execution time interval and execution times of the target task. The processing unit 903 is specifically configured to: execute the target task according to the execution time interval, and update the execution times of the target task when the target task is executed.

[0244] In some embodiments, the device further includes an output unit 905. The output unit 905 is configured to: if the target task and / or the upstream task of the target task is not within the task execution cycle, and / or the start time of the data in the execution information of the upstream task is before the end time of the target data, output prompt information for prompting the reason for not executing the target task.

[0245] In some embodiments, the target task is an ETL task.

[0246] When implemented by hardware, the acquisition unit 901 in the embodiment of the present application can be integrated on the communication interface, and the determination unit 902 and the processing unit 903 can be integrated on the processor. Fig.10 shown.

[0247] Fig.10 A schematic diagram of the structure of another possible device for processing the tasks involved in the above embodiments is shown. The device includes: a processor 1002 and a communication interface 1003. The processor 1002 is used to control and manage the actions of the device, for example, to execute the steps performed by the above-mentioned determination unit 902 and the processing unit 903, and / or to execute other processes of the technology described herein. The communication interface 1003 is used to support the communication between the device and other network entities, for example, to execute the steps performed by the above-mentioned acquisition unit 901. The device may also include a memory 1001 and a bus 1004, and the memory 1001 is used to store program codes and data of the device.

[0248] Among them, the memory 1001 can be a memory in the device, etc., and the memory can include a volatile memory, such as a random access memory; the memory can also include a non-volatile memory, such as a read-only memory, a flash memory, a hard disk or a solid-state drive; the memory can also include a combination of the above types of memory.

[0249] The processor 1002 may be a processor that implements or executes various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of the present application. The processor may be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field programmable gate array, or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of the present application. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.

[0250] The bus 1004 may be an Extended Industry Standard Architecture (EISA) bus, etc. The bus 1004 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.10 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0251] Fig.10 The device in the embodiment may also be a chip. The chip includes one or more than two (including two) processors 1002 and a communication interface 1003.

[0252] Optionally, the chip further includes a memory 1001, which may include a read-only memory and a random access memory, and provides operation instructions and data to the processor 1002. A portion of the memory 1001 may also include a non-volatile random access memory (NVRAM).

[0253] In some implementations, the memory 1001 stores the following elements, execution modules or data structures, or a subset thereof, or an extended set thereof.

[0254] In the embodiment of the present application, the corresponding operation is performed by calling the operation instruction stored in the memory 1001 (the operation instruction may be stored in the operating system).

[0255] Through the description of the above implementation methods, technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0256] Some embodiments of the present disclosure provide a computer-readable storage medium (e.g., a non-transitory computer-readable storage medium), which stores computer program instructions. When the computer program instructions are executed on a computer, the computer executes the method for constructing an ETL system as described in any of the above embodiments.

[0257] Exemplarily, the above-mentioned computer-readable storage media may include, but are not limited to: magnetic storage devices (e.g., hard disks, floppy disks or magnetic tapes, etc.), optical disks (e.g., CDs (Compact Disks), DVDs (Digital Versatile Disks), etc.), smart cards and flash memory devices (e.g., EPROMs (Erasable Programmable Read-Only Memory), cards, sticks or key drives, etc.). The various computer-readable storage media described in the present disclosure may represent one or more devices and / or other machine-readable storage media for storing information. The term "machine-readable storage medium" may include, but is not limited to, wireless channels and various other media capable of storing, containing and / or carrying instructions and / or data.

[0258] Some embodiments of the present disclosure also provide a computer program product, for example, the computer program product is stored on a non-transitory computer-readable storage medium. The computer program product includes computer program instructions, and when the computer program instructions are executed on a computer, the computer program instructions cause the computer to execute the method described in the above embodiments.

[0259] Some embodiments of the present disclosure further provide a computer program. When the computer program is executed on a computer, the computer program enables the computer to execute the method described in the above embodiments.

[0260] The beneficial effects of the above-mentioned computer-readable storage medium, computer program product and computer program are the same as the beneficial effects of the methods described in some of the above-mentioned embodiments, and will not be repeated here.

[0261] In the several embodiments provided in the present application, 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. 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 units, which can be electrical, mechanical or other forms.

[0262] 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 solution of this embodiment.

[0263] In addition, each functional unit in each embodiment of the present application 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.

[0264] The above is only a specific embodiment of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any changes or substitutions that can be thought of by any person skilled in the art within the technical scope disclosed in the present disclosure should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.

Claims

1. A task processing method, characterized in that: include: Obtaining execution information of a target task at the current time, wherein the target task is used to process target data, and the execution information includes a start time and an end time of the target data; Determine an upstream task of the target task and execution information of the upstream task; If the target task and the upstream task are within the task execution cycle, and the start time of the data in the execution information of the upstream task is after the end time of the target data, or is the same as the end time of the target data, then the target task is executed according to the execution information of the target task at the current time.

2. The method according to claim 1, characterized in that: The method further comprises: If the target task and / or the upstream task are not within the task execution cycle, and / or the start time of the data in the execution information of the upstream task is before the end time of the target data, the target task is not executed.

3. The method according to claim 1 or 2, characterized in that: The method further comprises: In response to the target task being executed, the execution information of the target task is updated, and the updated execution information includes the start time and end time of the data to be processed after the current time.

4. The method according to claim 1 or 2, characterized in that: The determining of the upstream task of the target task includes: An upstream task of the target task is determined according to a preset corresponding relationship, wherein the preset corresponding relationship includes an upstream and downstream relationship between a plurality of tasks, wherein the plurality of tasks includes the target task.

5. The method according to claim 3, characterized in that: The method further comprises: In response to the target task being completed, the actual execution time of the target task is stored, where the actual execution time includes the start execution time and the end execution time of the target task.

6. The method according to claim 5, characterized in that The execution information also includes an execution time interval and execution times of the target task. The executing the target task according to the execution information of the target task at the current time includes: The target task is executed according to the execution time interval, and after the target task is executed, the execution times of the target task are updated.

7. The method according to claim 1 or 2, characterized in that: The method further comprises: If the target task and / or the upstream task of the target task are not within the task execution cycle, and / or the start time of the data in the execution information of the upstream task is before the end time of the target data, a prompt message is output, and the prompt message is used to indicate the reason for not executing the target task.

8. The method according to claim 1 or 2, characterized in that: The target task is an extract-transform-load (ETL) task.

9. A task processing device, characterized in that: The device comprises: An acquiring unit is configured to: acquire execution information of a target task at a current time, wherein the target task is used to process target data, and the execution information includes a start time and an end time of the target data; A determination unit is configured to: determine an upstream task of the target task and execution information of the upstream task; The processing unit is configured to: if the target task and the upstream task are within a task execution cycle, and the start time of the data in the execution information of the upstream task is after the end time of the target data, or is the same as the end time of the target data, then execute the target task according to the execution information of the target task at the current time.

10. A processing device, characterized in that: include: A processor and a communication interface; the communication interface is coupled to the processor, and the processor is used to run a computer program or instruction to implement the method as described in any one of claims 1-8.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when a computer executes the instructions, the computer executes the method described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Scheduling scheme generation method and device

    CN109871270A

  • Task scheduling method and device, server and storage medium

    CN112328382A

  • Task scheduling method and device and storage medium

    CN112801546A

  • Task delay monitoring method and device, equipment and storage medium

    CN115629903A

  • Intellective switching between tasks

    US20160378544A1