A multi-source data extraction, transformation and loading task scheduling method and system
By dynamically creating data source processors and unified interfaces, and configuring extraction, transformation, and loading pipelines, efficient task orchestration and automated processing in multi-source data scenarios are achieved. This solves the problems of poor scalability and inadequate multi-tenant isolation in existing technologies, and improves development efficiency and security.
Patent Information
- Application Number
- CN202611431399.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-15
- Publication Date
- 2026-11-27
AI Technical Summary
In multi-source heterogeneous data scenarios, existing technologies suffer from low development efficiency of extraction, transformation and loading tasks, poor scalability, difficulty in integration with algorithm models, and imperfect isolation of multi-tenant data.
This paper provides a method for orchestrating multi-source data extraction, transformation, and loading tasks. It dynamically creates data source processors through a data source processor factory, implements a unified data source processor interface, configures the extraction, transformation, and loading pipeline, models them as unified workflow task nodes, and executes them through a distributed scheduling engine. It also achieves multi-tenant isolation by combining thread-local variables and object-relational mapping interceptors.
It improves system scalability, shortens data pipeline configuration time, realizes full-link automation of data extraction, cleaning, and algorithm calculation, lowers the operation and maintenance threshold, and eliminates the risk of data unauthorization.
Smart Images

Figure CN123178494A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a method and system for orchestrating multi-source data extraction, transformation, and loading tasks. Background Technology
[0002] In data-driven enterprise decision-making scenarios, data development and processing are fundamental steps supporting upper-level analysis, algorithm models, and business dashboards. A typical business data chain is as follows: external business systems generate massive amounts of raw data, which are then extracted, transformed, and loaded through an extraction process to synchronize the data from the source to the target. After cleaning and transformation, the data becomes standardized data assets available for downstream consumption.
[0003] In actual enterprise IT architectures, data sources exhibit significant multi-source heterogeneity. Typical data source types include relational databases, analytical databases, message brokers, Hypertext Transfer Protocol interfaces, and offline files. Existing solutions often rely on manually written extraction, transformation, and loading scripts, coupled with single-machine scheduling tools for data processing. Such solutions require writing separate Java database connection code or shell scripts for each data source, hard-coding the data extraction logic within the scripts, and then configuring execution rules through scheduled tasks. Monitoring the data pipeline, viewing logs, and handling failure retries depend on manual login to the server, lacking a unified visual management platform.
[0004] Some relatively advanced solutions use distributed workflow scheduling systems to replace single-machine scheduled tasks for task scheduling. However, data source management, extraction, transformation, and loading pipeline configuration, script management, and workflow orchestration are still scattered across multiple tools, lacking a unified management entry point. When business processes require embedding algorithm model calculations into the data processing chain, existing solutions typically require manual coordination between the extraction, transformation, and loading system and the algorithm platform. The extraction, transformation, and loading system first completes data processing, then the algorithm platform is manually triggered to perform model calculations, and finally the results are manually imported into the downstream system. This process is fragmented, inefficient, and prone to errors.
[0005] Furthermore, existing solutions suffer from several drawbacks, including fragmented data source management, separation of extraction, transformation, and loading pipeline configuration and execution, lack of scalable task orchestration capabilities, lack of multi-tenant data isolation, and tight coupling between the scheduling system and business systems. Adding a new data source type requires modifying the core code and re-releasing the system; business metadata is scattered across code, configuration files, and scheduling tools; workflow node types are fixed, making it difficult to embed algorithmic model calculations as standard nodes; in multi-tenant scenarios, developers need to manually concatenate tenant filtering conditions in each structured query language or script, which can easily lead to data breaches and leaks due to oversight; when directly using the native software development kit of the distributed scheduling engine, workflow coding requires manual maintenance of mapping relationships, and workflow instances need to be synchronized via interface polling, lacking an efficient integration and encapsulation layer. Summary of the Invention
[0006] This invention aims to solve the problems of low development efficiency, poor scalability, difficulty in integrating with algorithm models, and imperfect data isolation in multi-tenant data scenarios for extraction, transformation, and loading tasks.
[0007] This invention provides a method for orchestrating multi-source data extraction, transformation, and loading tasks, comprising: responding to a data source configuration operation, dynamically creating a data source processor corresponding to the data source engine type through a data source processor factory, wherein the data source processor implements a unified data source processor interface to access multiple data sources and obtain metadata from the multiple data sources; responding to a pipeline configuration operation, configuring the data source end, data target end, and transformation mapping of the extraction, transformation, and loading pipeline, generating an extraction, transformation, and loading pipeline configuration, and using the extraction, transformation, and loading pipeline configuration as a reference object for workflow task nodes in subsequent workflow orchestration after publication; responding to a workflow orchestration operation, uniformly modeling the extraction, transformation, and loading pipeline, scripts, and algorithm schemes as workflow task nodes, wherein the workflow task node corresponding to the extraction, transformation, and loading pipeline is defined as an extraction, transformation, and loading pipeline node, and the workflow task node corresponding to the algorithm scheme is defined as an algorithm scheme node, each workflow task node holds a corresponding business object identifier, and orchestrating the workflow task nodes based on a directed acyclic graph to generate a business workflow definition; wherein the algorithm scheme corresponds to a pre-configured and published algorithm model computation task; and using distributed scheduling... The software development kit (SDK) encapsulation layer synchronizes the business workflow definition to the distributed scheduling engine and obtains the scheduling engine workflow code returned by the distributed scheduling engine. This scheduling engine workflow code serves as the mapping key between the business workflow definition and the distributed scheduling engine. When the business workflow definition is executed, the workflow task nodes are executed through the distributed scheduling engine. Specifically, for the extraction, transformation, and loading pipeline node, the extraction, transformation, and loading execution engine is triggered to execute the corresponding extraction, transformation, and loading pipeline configuration. For the algorithm scheme node, the algorithm scheme management module is called through the algorithm scheme node, and the task status returned by the algorithm scheme management module is polled. The distributed scheduling engine SSD encapsulation layer synchronizes the workflow instances and task instances generated during execution to the business database storing business metadata. When a Hypertext Transfer Protocol (HTTP) request arrives, the authentication token is parsed to obtain the tenant identifier, which is bound to the thread-local variable of the current thread. An object-relational mapping (ORM) interceptor automatically injects tenant filtering conditions corresponding to the tenant identifier into the database operation statement, and the thread-local variable is cleaned up after the HTTP request ends.
[0008] The present invention also provides a multi-source data extraction, transformation and loading task orchestration system, including a data source management module, a pipeline configuration module, a workflow orchestration module, a scheduling integration module, an execution and status synchronization module and a multi-tenant isolation module, each module performing the corresponding steps in the above method.
[0009] Compared with the prior art, the present invention has the following technical effects:
[0010] 1. By using a data source processor factory and a unified data source processor interface, adding a new data source type only requires adding a new processor class, without modifying the core code, thus significantly improving system scalability;
[0011] 2. By visually configuring the extraction, transformation, and loading pipeline and various synchronization strategies, the data pipeline configuration time is reduced from several hours to several minutes;
[0012] 3. By embedding algorithm model calculations into the extraction, transformation, and loading workflow through algorithm scheme nodes, the entire chain of data extraction, data cleaning, algorithm calculation, and result output is automated;
[0013] 4. By automatically injecting tenant filtering conditions through thread-local variables and object-relational mapping interceptors, the risk of data privilege escalation is eliminated at the architectural level;
[0014] 5. By automatically synchronizing workflow instances and task instances through the distributed scheduling engine software development kit encapsulation layer, task observability is enhanced; and the operation and maintenance threshold is reduced through configurable synchronization strategies. Attached Figure Description
[0015] Figure 1 This is a schematic diagram of the overall architecture of the multi-source data extraction, transformation, and loading task orchestration system provided in an embodiment of the present invention. Detailed Implementation
[0016] The present invention will be further illustrated below with reference to specific embodiments. It should be understood that the specific embodiments described herein are for illustrative and explanatory purposes only and are not intended to limit the present invention.
[0017] like Figure 1As shown, the multi-source data extraction, transformation, and loading task orchestration system provided by this invention adopts a layered architecture with front-end and back-end separation, including a front-end presentation layer 100, a back-end service layer 200, a scheduling engine layer 300, a data execution layer 400, and a data storage layer 500. The front-end presentation layer 100 provides data source management, pipeline configuration, script editing, directed acyclic graph (DAG) orchestration, and a monitoring dashboard. The front-end presentation layer 100 also provides a monitoring dashboard to uniformly display the execution status of workflow instances and task instances, the real-time progress of the DAG, and logs. The back-end service layer 200 is responsible for data source management, pipeline configuration, script management, workflow orchestration, and multi-tenant management. The scheduling engine layer 300 is responsible for workflow definition synchronization, task triggering, status callbacks, and log acquisition. The data execution layer 400 is responsible for extraction, transformation, and loading execution, structured query language script execution, Python script execution, and algorithm solution interface calls. The data storage layer 500 stores business metadata, business data, scripts, and logs.
[0018] Example 1: Multi-source data extraction, transformation, and loading task orchestration method
[0019] This embodiment provides a method for orchestrating multi-source data extraction, transformation, and loading tasks, including the following steps.
[0020] Step 1: In response to the data source configuration operation, a data source processor corresponding to the data source engine type is dynamically created through the data source processor factory. The data source processor implements a unified data source processor interface to access multiple data sources and obtain their metadata.
[0021] Specifically, the unified data source processor interface defines methods for testing connection methods, database directory retrieval methods, table list retrieval methods, and field metadata retrieval methods. The abstract data source processor provides general implementations for connection management and exception handling. The Java Database Connection Data Source Abstract Processor inherits from the abstract data source processor, encapsulating general Java database connection logic. The MySQL, PostgreSQL, and StarRocks data source processors are all implemented by inheriting from the Java Database Connection Data Source Abstract Processor, requiring only overriding a few parameters such as the driver class name and default port. The Hypertext Transfer Protocol (HTTP) data source processor is implemented independently for HTTP interface type data sources, using a descriptive state transition interface for data retrieval and authentication. The data source processor factory dynamically creates corresponding processor instances based on the data source engine type and implements processor registration and discovery through an auto-assembly mechanism.
[0022] After the data source is configured, for database-type data sources, the data source processor reads the database's directory, schema, tables, and field metadata, saving them to the data source metadata table and table field metadata table. For non-database-type data sources, the data source processor retrieves and saves the corresponding data source metadata. Simultaneously, the configured data source is registered as a data source environment for the distributed scheduling engine, providing a connection foundation for subsequent task execution. Therefore, when a new data source type needs to be added, developers only need to add a processor class that inherits from the Java Database Connection Data Source Abstract Processor or implements a unified data source processor interface, without modifying existing business code. The system automatically recognizes and registers the new data source upon startup, significantly improving system scalability.
[0023] Step 2: In response to the pipeline configuration operation, configure the data source end, data target end, and transformation mapping of the extraction, transformation, and loading pipeline, generate the extraction, transformation, and loading pipeline configuration, and use the extraction, transformation, and loading pipeline configuration as a reference object for workflow task nodes in subsequent workflow orchestration after publication.
[0024] Specifically, the extraction, transformation, and loading pipeline is abstracted into a configuration entity composed of three elements: a data source, a data target, and a transformation mapping. The data source is used to select registered data sources and tables, defining where data is read from. The data target is used to select target data sources and tables, defining where data is written. The transformation mapping defines the mapping relationship between source and target fields, supporting at least one of field type conversion, default value setting, and custom field processing. The extraction, transformation, and loading pipeline configuration also includes synchronization strategies, which include at least one of full update, append update, overwrite update, and custom filter script update. A full update means that after clearing the target table each time it is executed, all data is rewritten; an append update means that historical data is retained and only new data is appended; an overwrite update means that existing data is overwritten based on primary key matching; and a custom filter script update means that synchronization logic is defined through a filter script.
[0025] Each time the extraction, transformation, and loading pipeline configuration is saved, a snapshot version of the configuration is generated, supporting version rollback and auditing. After the extraction, transformation, and loading pipeline configuration is published, its status changes to "published," and it can be referenced by workflow orchestration. When the extraction, transformation, and loading pipeline configuration is executed, the system automatically generates the configuration file for the extraction, transformation, and loading execution engine and schedules its execution through a distributed scheduling engine. Therefore, business personnel can configure and publish common data synchronization tasks without writing code; configuration is delivery, significantly reducing the operational threshold.
[0026] Step 3: In response to workflow orchestration operations, the extraction, transformation, and loading pipeline, scripts, and algorithm solutions are uniformly modeled as workflow task nodes. Specifically, the workflow task node corresponding to the extraction, transformation, and loading pipeline is defined as an extraction, transformation, and loading pipeline node, and the workflow task node corresponding to the algorithm solution is defined as an algorithm solution node. Each workflow task node holds a corresponding business object identifier. These workflow task nodes are orchestrated based on a directed acyclic graph to generate a business workflow definition. The algorithm solution corresponds to a pre-configured and published algorithm model computation task.
[0027] Specifically, the node types for workflow task nodes include extraction, transformation, and loading pipeline nodes, structured query language script nodes, Python script nodes, and algorithm solution nodes. Each node type holds a corresponding business object identifier, which points to the extraction, transformation, and loading pipeline definition, script definition, or algorithm solution. The business workflow definition includes at least one of global parameters, execution strategies, failure strategies, timed expressions, and alarm notification strategies. Execution strategies include serial execution and parallel execution; failure strategies include termination and retry; alarm notification strategies include at least one of email, DingTalk, and WeChat Work robot.
[0028] The timing expression can be represented as "0 0 2 * * ?", indicating execution at 2 AM daily. From left to right, this expression represents seconds, minutes, hours, days, months, and weeks, where "0" represents the 0th second, "0" represents the 0th minute, "2" represents the 2nd hour (2 AM), "" represents any day, "" represents any month, and "?" indicates no week is specified. Overall, it represents execution at 2 AM daily. Therefore, data engineers can orchestrate complex dependencies such as serial, parallel, and conditional branching relationships using a visual directed acyclic graph canvas, significantly improving development efficiency.
[0029] Step 4: Through the distributed scheduling engine software development kit encapsulation layer, synchronize the business workflow definition to the distributed scheduling engine, obtain the scheduling engine workflow code returned by the distributed scheduling engine, and use the scheduling engine workflow code as the mapping key between the business workflow definition and the distributed scheduling engine.
[0030] Specifically, after a user publishes a workflow on the front end, the system automatically calls the distributed scheduling engine's interface to create a workflow definition and obtain the scheduling engine's workflow code. This scheduling engine workflow code is then stored back in the business database as a unique mapping key for subsequent operations. Afterward, the distributed scheduling engine automatically triggers workflow execution according to the configured timing expression, or it can be manually triggered by the user in the front end interface. During execution, the generated workflow instances and task instance data are automatically synchronized to the business database through the distributed scheduling engine's software development kit (SDK) encapsulation layer, enabling real-time status display and log viewing on the front end interface. Thus, front-end visual orchestration and the back-end scheduling engine are automatically synchronized, achieving task observability management without switching systems.
[0031] Step 5: When the business workflow definition is executed, the workflow task nodes are executed through the distributed scheduling engine. Specifically, for the extraction, transformation, and loading pipeline node, the extraction, transformation, and loading execution engine is triggered to execute the corresponding extraction, transformation, and loading pipeline configuration; for the algorithm scheme node, the algorithm scheme management module is invoked through the algorithm scheme node, and the task status returned by the algorithm scheme management module is polled; the workflow instances and task instances generated during execution are synchronized to the business database storing business metadata through the distributed scheduling engine software development kit encapsulation layer.
[0032] For the algorithm solution node, its execution includes: completing data extraction and preprocessing through upstream workflow task nodes to obtain the input dataset required by the algorithm solution; submitting the algorithm task to the algorithm solution management module through the Hypertext Transfer Protocol interface, passing in the algorithm solution code and task parameters, obtaining the task code returned by the algorithm solution management module, and storing the task code associated with the algorithm solution node; triggering the execution of the algorithm task through the Hypertext Transfer Protocol interface; polling the task status of the algorithm task at configured time intervals; when the task status indicates completion, obtaining the calculation result of the algorithm task and transmitting it to the downstream workflow task node; when the task status indicates failure or timeout, triggering an alarm notification, and retrying the algorithm task according to the configured retry strategy; when the number of retries reaches a preset number, terminating the algorithm task and marking the task status as failure.
[0033] For example, submitting an algorithm task can be done using the POST method of the Hypertext Transfer Protocol (HTTP) to call the interface path " / api / algo / task / add"; triggering the execution of an algorithm task can be done using the GET method of the HTTP protocol to call the interface path " / api / algo / task / execute"; and polling the task status can be done using the GET method of the HTTP protocol to call the interface path " / api / algo / task / info". Here, "api" represents the interface prefix, "algo" represents the algorithm solution management module, "task" represents the task, "add" represents submission, "execute" represents execution, and "info" represents information query. Data engineers do not need to understand the internal implementation details of the algorithm platform; they only need to drag the algorithm solution node into the canvas during workflow orchestration, configure the corresponding algorithm solution, and achieve end-to-end automation of data extraction, data cleaning, algorithm calculation, and result output.
[0034] Step Six: When a Hypertext Transfer Protocol (HTTP) request arrives, parse the authentication token to obtain the tenant identifier, bind the tenant identifier to a thread-local variable of the current thread, automatically inject tenant filtering conditions corresponding to the tenant identifier into the database operation statement using an Object-Relational Mapping (ORM) interceptor, and clean up the thread-local variable after the HTTP request ends. If authentication token parsing fails, reject the HTTP request.
[0035] Specifically, when each Hypertext Transfer Protocol (HTTP) request enters the system, the authentication filter parses the user's authentication token, obtains the user's tenant information, and binds the tenant context to the current thread's thread-local variable through the tenant context holder. Before each database operation, the Object-Relational Mapping (ORM) interceptor automatically reads the current tenant identifier from the tenant context holder and appends the condition "WHERE tenant_id = '{current tenant}'" to the database operation statement. Here, `tenant_id` represents the tenant identifier field in the business data table, and `{current tenant}` represents the tenant identifier read from the current thread's thread-local variable; this condition is automatically injected by the ORM interceptor. Business code does not need to explicitly handle tenant filtering logic. After the request ends, the tenant context holder cleans up the thread-local variable to avoid data leakage in thread reuse scenarios.
[0036] The system supports three tenant modes: single-tenant mode, multi-tenant mode, and dynamic infrastructure service loading mode. In single-tenant mode, all Hypertext Transfer Protocol (HTTP) requests share the same database; in multi-tenant mode, each tenant uses an independent data source; and in dynamic infrastructure service loading mode, tenant information is dynamically loaded from microservices deployed independently of the system to provide tenant information. These modes can be flexibly switched using preset configuration parameters. Therefore, business logic code does not need to explicitly handle tenant filtering, eliminating the risk of privilege escalation at the architectural level.
[0037] Step 7: Provide an online script editor for editing Structured Query Language (SCL) scripts and Python scripts, supporting a tree-like directory structure. Each time a script is saved, a snapshot version is generated, supporting version rollback, difference comparison, and auditing. The SCL scripts and Python scripts are executed through the script task types of the distributed scheduling engine. The Python scripts, after being encapsulated, are also executed through the script task types of the distributed scheduling engine. This ensures that script assets are traceable and auditable, reducing operational risks.
[0038] Alternative implementation methods:
[0039] (1) The distributed scheduling engine can be replaced by other distributed scheduling systems that support directed acyclic graph orchestration, as long as the scheduling engine workflow coding mapping and state synchronization are implemented through the software development kit encapsulation layer.
[0040] (2) The extraction, transformation, loading, and execution engine can be replaced by other data synchronization frameworks, as long as the visualization configuration is mapped to the execution configuration of the corresponding execution engine through the configuration converter.
[0041] (3) The various data sources can be extended to other data sources that can be connected via Java database connection, Hypertext Transfer Protocol, message queue, file system, etc.
[0042] (4) The multi-tenant data isolation implemented by the object relational mapping interceptor can be replaced by a database row-level security policy or an independent database mode, as long as the business code does not need to explicitly handle tenant filtering.
[0043] (5) The front-end presentation layer can be replaced by other modern front-end frameworks, as long as a unified visual operation interface is provided.
[0044] (6) The communication between the algorithm scheme node and the algorithm scheme management module can be replaced by a message queue or remote procedure call, as long as the algorithm task triggering and state synchronization are achieved.
[0045] Example 2: Multi-source data extraction, transformation, and loading task orchestration system
[0046] This embodiment provides a multi-source data extraction, transformation, and loading task orchestration system, including a data source management module, a pipeline configuration module, a workflow orchestration module, a scheduling integration module, an execution and status synchronization module, and a multi-tenant isolation module.
[0047] The data source management module responds to data source configuration operations by dynamically creating data source processors corresponding to the data source engine type through a data source processor factory. These data source processors implement a unified data source processor interface to access multiple data sources and obtain their metadata. The data source management module includes a unified data source processor interface, an abstract data source processor, a Java Database Connectivity (JDBC) data source abstract processor, a Hypertext Transfer Protocol (HTTP) data source processor, and a data source processor factory. The data source processor factory dynamically creates the data source processors based on the data source engine type and registers them through an auto-assembly mechanism.
[0048] The pipeline configuration module is used to respond to pipeline configuration operations, configure the data source end, data target end, and transformation mapping of the extraction, transformation, and loading pipeline, generate the extraction, transformation, and loading pipeline configuration, and use the extraction, transformation, and loading pipeline configuration as a reference object for workflow task nodes in subsequent workflow orchestration after publication.
[0049] The workflow orchestration module responds to workflow orchestration operations by uniformly modeling the extraction, transformation, and loading pipeline, scripts, and algorithm solutions as workflow task nodes. Specifically, workflow task nodes corresponding to the extraction, transformation, and loading pipeline are defined as extraction, transformation, and loading pipeline nodes, and workflow task nodes corresponding to the algorithm solutions are defined as algorithm solution nodes. Each workflow task node holds a corresponding business object identifier. The workflow task nodes are orchestrated based on a directed acyclic graph to generate business workflow definitions. The algorithm solutions correspond to pre-configured and published algorithm model computation tasks.
[0050] The scheduling integration module is used to synchronize the business workflow definition to the distributed scheduling engine through the distributed scheduling engine software development kit encapsulation layer, and obtain the scheduling engine workflow code returned by the distributed scheduling engine, and use the scheduling engine workflow code as the mapping key between the business workflow definition and the distributed scheduling engine.
[0051] The execution and status synchronization module is used to execute the workflow task nodes through the distributed scheduling engine when the business workflow definition is executed; wherein, for the extraction, transformation, and loading pipeline node, the extraction, transformation, and loading execution engine is triggered to execute the corresponding extraction, transformation, and loading pipeline configuration; for the algorithm scheme node, the algorithm scheme management module is called through the algorithm scheme node, and the task status returned by the algorithm scheme management module is polled; the workflow instances and task instances generated during the execution process are synchronized to the business database storing business metadata through the distributed scheduling engine software development kit encapsulation layer.
[0052] The multi-tenant isolation module is used to parse the authentication token to obtain the tenant identifier when the Hypertext Transfer Protocol request comes in, bind the tenant identifier to the thread-local variable of the current thread, automatically inject the tenant filtering conditions corresponding to the tenant identifier into the database operation statement through the object relational mapping interceptor, and clean up the thread-local variable after the Hypertext Transfer Protocol request ends.
[0053] The specific implementation methods of each module in this embodiment correspond to the method steps in Embodiment 1, and will not be repeated here. The system provided in this embodiment achieves multi-source data access, visual pipeline configuration, directed acyclic graph workflow orchestration, algorithm solution node embedding, automated multi-tenant data isolation, and script version management through the collaborative work of the above modules. It is suitable for scenarios such as enterprise data development decision engines that require multi-source data extraction, transformation, and loading task orchestration.
[0054] As an example, executable instructions can be deployed to execute on a single computing device, or on multiple computing devices located in one location, or on multiple computing devices distributed across multiple locations and interconnected via a communication network.
[0055] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0056] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0057] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory / random access memory, magnetic disk, optical disk) and includes several instructions to cause a multimedia terminal device (which may be a mobile phone, computer, television receiver, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0058] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A method for orchestrating multi-source data extraction, transformation, and loading tasks, characterized in that, include: In response to data source configuration operations, a data source processor corresponding to the data source engine type is dynamically created through the data source processor factory according to the data source engine type. The data source processor implements a unified data source processor interface to access multiple data sources and obtain the metadata of the multiple data sources. In response to the pipeline configuration operation, the data source end, data target end, and transformation mapping of the extraction, transformation, and loading pipeline are configured, the extraction, transformation, and loading pipeline configuration is generated, and after publication, the extraction, transformation, and loading pipeline configuration is used as a reference object for workflow task nodes in subsequent workflow orchestration. In response to workflow orchestration operations, the extraction, transformation, and loading pipeline, scripts, and algorithm solutions are uniformly modeled as workflow task nodes. Specifically, workflow task nodes corresponding to the extraction, transformation, and loading pipeline are defined as extraction, transformation, and loading pipeline nodes, and workflow task nodes corresponding to the algorithm solutions are defined as algorithm solution nodes. Each workflow task node holds a corresponding business object identifier. The workflow task nodes are orchestrated based on a directed acyclic graph to generate a business workflow definition. The algorithm solutions correspond to pre-configured and published algorithm model computation tasks. The business workflow definition is synchronized to the distributed scheduling engine through the software development kit (SDK) encapsulation layer of the distributed scheduling engine, and the scheduling engine workflow code returned by the distributed scheduling engine is obtained. The scheduling engine workflow code is used as the mapping key between the business workflow definition and the distributed scheduling engine. When the business workflow definition is executed, the workflow task nodes are executed through the distributed scheduling engine; wherein, for the extraction, transformation, and loading pipeline node, the extraction, transformation, and loading execution engine is triggered to execute the corresponding extraction, transformation, and loading pipeline configuration; for the algorithm scheme node, the algorithm scheme management module is called through the algorithm scheme node, and the task status returned by the algorithm scheme management module is polled; the workflow instances and task instances generated during the execution process are synchronized to the business database storing business metadata through the distributed scheduling engine software development kit encapsulation layer; When a Hypertext Transfer Protocol (HTTP) request arrives, the authentication token is parsed to obtain the tenant identifier. The tenant identifier is then bound to a thread-local variable of the current thread. The object-relational mapping (ORM) interceptor automatically injects the tenant filtering conditions corresponding to the tenant identifier into the database operation statement. Finally, the thread-local variable is cleaned up after the HTTP request ends.
2. The multi-source data extraction, transformation, and loading task orchestration method according to claim 1, characterized in that, The unified data source processor interface defines test connection methods, database directory retrieval methods, table list retrieval methods, and field metadata retrieval methods; The data source processor factory creates and registers the data source processor according to the data source engine type through an automatic assembly mechanism; The method further includes: for a database type data source, reading the metadata of the database's directory, schema, tables, and fields through the data source processor, and saving it to the data source metadata table and the table field metadata table; For non-database type data sources, the corresponding data source metadata is obtained and saved through the data source processor; and the various data sources are registered as the data source environment of the distributed scheduling engine.
3. The multi-source data extraction, transformation, and loading task orchestration method according to claim 1, characterized in that, The transformation mapping supports at least one of field type conversion, default value setting, and custom field processing; the extraction transformation loading pipeline configuration also includes a synchronization strategy, which includes at least one of full update, append update, overwrite update, and custom filter script update; each time the extraction transformation loading pipeline configuration is saved, a snapshot version of the extraction transformation loading pipeline configuration is generated, and the status of the extraction transformation loading pipeline configuration after publication is changed to published status.
4. The multi-source data extraction, transformation, and loading task orchestration method according to claim 1, characterized in that, The workflow task nodes include extraction, transformation, and loading pipeline nodes, structured query language script nodes, Python script nodes, and algorithm solution nodes; each node type holds a corresponding business object identifier, which points to the extraction, transformation, and loading pipeline definition, script definition, or algorithm solution; the business workflow definition includes at least one of global parameters, execution strategy, failure strategy, timed expression, and alarm notification strategy.
5. The multi-source data extraction, transformation, and loading task orchestration method according to claim 4, characterized in that, The algorithm scheme node calls the algorithm scheme management module and polls the task status returned by the algorithm scheme management module, including: Data extraction and preprocessing are completed through upstream workflow task nodes to obtain the input dataset required by the algorithm scheme; The algorithm task is submitted to the algorithm scheme management module through the Hypertext Transfer Protocol interface, and the algorithm scheme code and task parameters are passed in. The task code returned by the algorithm scheme management module is obtained, and the task code is associated with and stored with the algorithm scheme node. The algorithm task is triggered to execute via the Hypertext Transfer Protocol interface; The task status of the algorithm task is polled at configured time intervals; When the task status indicates completion, the calculation result of the algorithm task is obtained and passed to the downstream workflow task node; When the task status indicates failure or timeout, an alarm notification is triggered, and the algorithm task is retried according to the configured retry policy. When the number of retries reaches a preset number, the algorithm task is terminated and the task status is marked as failure.
6. The multi-source data extraction, transformation, and loading task orchestration method according to claim 1, characterized in that, The method further includes switching between single-tenant mode, multi-tenant mode, and infrastructure service dynamic loading mode according to preset configuration parameters; wherein, in single-tenant mode, all Hypertext Transfer Protocol requests share the same database, in multi-tenant mode, each tenant uses an independent data source, and in infrastructure service dynamic loading mode, tenant information is dynamically loaded from microservices deployed independently of this system to provide tenant information.
7. The multi-source data extraction, transformation, and loading task orchestration method according to claim 1, characterized in that, The method further includes: providing an online script editor for editing structured query language scripts and Python scripts, and supporting a tree-like directory structure; generating a script snapshot version each time a script is saved, supporting version backtracking, difference comparison, and auditing; and executing the structured query language script and the Python script through the script task type of the distributed scheduling engine.
8. A multi-source data extraction, transformation, and loading task orchestration system for implementing the multi-source data extraction, transformation, and loading task orchestration method according to any one of claims 1-7, characterized in that, include: The data source management module is used to respond to data source configuration operations and dynamically create data source processors corresponding to the data source engine type through the data source processor factory. The data source processors implement a unified data source processor interface to access multiple data sources and obtain the metadata of the multiple data sources. The pipeline configuration module is used to respond to pipeline configuration operations, configure the data source end, data target end, and transformation mapping of the extraction, transformation, and loading pipeline, generate the extraction, transformation, and loading pipeline configuration, and use the extraction, transformation, and loading pipeline configuration as a reference object for workflow task nodes in subsequent workflow orchestration after publication. The workflow orchestration module, in response to workflow orchestration operations, uniformly models the extraction, transformation, and loading pipeline, scripts, and algorithm solutions as workflow task nodes. Specifically, workflow task nodes corresponding to the extraction, transformation, and loading pipeline are defined as extraction, transformation, and loading pipeline nodes, and workflow task nodes corresponding to the algorithm solutions are defined as algorithm solution nodes. Each workflow task node holds a corresponding business object identifier. The module orchestrates these workflow task nodes based on a directed acyclic graph to generate a business workflow definition. The algorithm solutions correspond to pre-configured and published algorithm model computation tasks. The scheduling integration module is used to synchronize the business workflow definition to the distributed scheduling engine through the distributed scheduling engine software development kit encapsulation layer, and obtain the scheduling engine workflow code returned by the distributed scheduling engine, and use the scheduling engine workflow code as the mapping key between the business workflow definition and the distributed scheduling engine. The execution and status synchronization module is used to execute the workflow task nodes through the distributed scheduling engine when the business workflow definition is executed; wherein, for the extraction, transformation, and loading pipeline node, the extraction, transformation, and loading execution engine is triggered to execute the corresponding extraction, transformation, and loading pipeline configuration; for the algorithm scheme node, the algorithm scheme management module is called through the algorithm scheme node, and the task status returned by the algorithm scheme management module is polled; the workflow instances and task instances generated during the execution process are synchronized to the business database storing business metadata through the distributed scheduling engine software development kit encapsulation layer; The multi-tenant isolation module is used to parse the authentication token to obtain the tenant identifier when the Hypertext Transfer Protocol (HTTP) request comes in, bind the tenant identifier to the thread-local variable of the current thread, automatically inject the tenant filtering conditions corresponding to the tenant identifier into the database operation statement through the Object Relational Mapping (ORM) interceptor, and clean up the thread-local variable after the HTTP request ends.
9. The multi-source data extraction, transformation, and loading task orchestration system according to claim 8, characterized in that, The data source management module includes a unified data source processor interface, an abstract data source processor, a Java database connection data source abstract processor, a hypertext transfer protocol data source processor, and a data source processor factory. The data source processor factory dynamically creates the data source processor according to the data source engine type and registers the data source processor through an automatic assembly mechanism.
