Task scheduling model construction method and device

Through the module-task two-layer task scheduling model, the construction of task scheduling relationships is simplified, the problem of complexity of task scheduling topology and incomplete reflection of dependencies in the existing technology is solved, and the simplicity and high performance of the task scheduling model are achieved. .

CN118377605BActive Publication Date: 2024-09-27HUNDSUN TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410839061.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-26
Publication Date
2024-09-27
Estimated Expiration
2044-06-26

AI Technical Summary

Technical Problem

When the existing technology constructs a task scheduling topology, it results in high structural complexity, high maintenance costs, and the inability to fully reflect task dependencies, making it difficult to match business scenarios.

Method used

Adopting a module-task two-layer task scheduling model, by obtaining data processing tasks and their module annotation information, determining task dependencies, building a task node model, and constructing data processing modules based on module annotation information, simplifying task dependencies and ensuring task scheduling Model simplicity and maintainability.

Benefits of technology

It achieves a clear reflection of task scheduling relationships, reduces developers' maintenance costs, simplifies task dependencies, ensures the normal operation and high performance of the data processing business, and improves maintainability and ease of use.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118377605B
    Figure CN118377605B
Patent Text Reader

Abstract

The embodiments of the present specification provide a method and device for constructing a task scheduling model, wherein the method for constructing a task scheduling model is applied to a scheduling system, and includes: obtaining multiple data processing tasks associated with a data processing business, and module annotation information of each data processing task; determining the task dependency relationship between the multiple data processing tasks, and constructing a task node model based on the task dependency relationship and the multiple data processing tasks; constructing a data processing module according to the module annotation information of each data processing task; wherein the data processing module includes at least one data processing task; constructing a module node model based on the subordinate relationship between the data processing module and each data processing task, and the task dependency relationship; and using the task node model to update the module node model to obtain a task scheduling model associated with the data processing business.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present specification relate to the field of computer technology, and in particular to a method and device for constructing a task scheduling model. Background Art

[0002] With the development of computer technology, more and more businesses are becoming online. In large-scale business systems, there are usually a large number of data processing tasks. In order to ensure the execution of these data processing tasks, in the design or development stage, a suitable task scheduling topology structure is usually constructed to ensure that the scheduling system can control the execution of tasks in an orderly manner according to the task relationship in the topology structure during the operation stage. In the prior art, when constructing a task scheduling topology relationship for a large number of data processing tasks, in order to ensure that the tasks can be executed in an orderly manner, it is usually constructed in a way that tasks are nodes, or in a hierarchical relationship; however, due to the high complexity of the business, the topology structure constructed in a way that tasks are nodes is very complex, resulting in high maintenance costs. Although the topology result constructed according to the hierarchical relationship can avoid the problem of complex structure, when there are more complex dependencies between tasks, the hierarchical division method cannot fully reflect the dependencies between tasks, making it difficult to match with the business scenario. Therefore, an effective solution is urgently needed to solve the above problems. Summary of the invention

[0003] In view of this, an embodiment of this specification provides a method for constructing a task scheduling model. One or more embodiments of this specification also relate to a task scheduling model construction device, a computing device, a computer-readable storage medium and a computer program product to solve the technical defects existing in the prior art.

[0004] According to a first aspect of an embodiment of this specification, a method for constructing a task scheduling model is provided, which is applied to a scheduling system and includes:

[0005] Obtain multiple data processing tasks associated with the data processing business, and module annotation information of each data processing task;

[0006] Determining task dependencies between the multiple data processing tasks, and constructing a task node model according to the task dependencies and the multiple data processing tasks;

[0007] Constructing a data processing module according to the module annotation information of each data processing task; wherein the data processing module includes at least one data processing task;

[0008] Building a module node model according to the subordinate relationship between the data processing module and each data processing task, and the task dependency relationship;

[0009] The module node model is updated using the task node model to obtain a task scheduling model associated with the data processing business.

[0010] According to a second aspect of an embodiment of this specification, a task scheduling model construction device is provided, which is applied to a scheduling system, including:

[0011] An acquisition task module is configured to acquire multiple data processing tasks associated with the data processing business, and module annotation information of each data processing task;

[0012] A determination relationship module is configured to determine the task dependency relationship between the plurality of data processing tasks, and construct a task node model according to the task dependency relationship and the plurality of data processing tasks;

[0013] A construction module, configured to construct a data processing module according to the module annotation information of each data processing task; wherein the data processing module includes at least one data processing task;

[0014] A model building module is configured to build a module node model according to the subordinate relationship between the data processing module and each data processing task, and the task dependency relationship;

[0015] The update model module is configured to update the module node model using the task node model to obtain a task scheduling model associated with the data processing business.

[0016] According to a third aspect of an embodiment of this specification, a computing device is provided, including:

[0017] Memory and processor;

[0018] The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions. When the computer executable instructions are executed by the processor, the steps of the above-mentioned task scheduling model construction method are implemented.

[0019] According to a fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of the above-mentioned task scheduling model construction method are implemented.

[0020] According to a fifth aspect of the embodiments of this specification, a computer program product is provided, including a computer program or instructions, which implement the steps of the above-mentioned task scheduling model construction method when executed by a processor.

[0021] The task scheduling model construction method provided in this embodiment can adopt a two-layer task scheduling model of module-task to reflect the task scheduling relationship in order to clearly and concisely reflect the task scheduling relationship through the task scheduling model and reduce the maintenance cost of developers. Specifically, when constructing the task scheduling model, multiple data processing tasks of the associated data processing business and the module annotation information of each data processing task can be obtained first; on this basis, the task dependency relationship between the multiple data processing tasks can be determined first, and a task node model can be constructed based on the task dependency relationship and the multiple data processing tasks, so as to realize that the scheduling relationship between the data processing tasks is first reflected through the task node model. On this basis, in order to make the task scheduling model more concise and easy to maintain, the data processing module can be constructed according to the module annotation information of each data processing task; wherein, the data processing module contains at least one data processing task; thereby completing the mapping of tasks to modules, thereby reducing the complexity of the dependency relationship between tasks and encapsulating them through modules; thereafter, the module node model can be constructed according to the subordinate relationship between the data processing module and each data processing task, as well as the task dependency relationship; on the basis of the data processing task, the dependency relationship between tasks is simplified by encapsulating the data processing module, and the original execution order of the tasks is not changed, so as to ensure the normal operation of the data processing business. Finally, in order to ensure that the task scheduling module is concise and matches the data processing business, the module node model can also be updated using the task node model, so that the task scheduling model of the related data processing business can be obtained according to the update result, so that the task scheduling model can be used to control the execution of tasks in an orderly manner, and the maintenance difficulty and cost can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 It is a schematic diagram of a task scheduling model construction method provided by an embodiment of this specification;

[0023] Figure 2 is a flowchart of a method for constructing a task scheduling model provided by an embodiment of this specification;

[0024] Figure 3a It is a structural diagram of a model in a first task scheduling model construction method provided in an embodiment of this specification;

[0025] Figure 3b It is a structural diagram of a model in a second task scheduling model construction method provided in an embodiment of this specification;

[0026] Figure 3c It is a structural diagram of a model in a third method for constructing a task scheduling model provided in an embodiment of this specification;

[0027] Figure 3dIt is a structural diagram of a model in a fourth task scheduling model construction method provided in an embodiment of this specification;

[0028] Figure 3e It is a structural diagram of a model in a fifth task scheduling model construction method provided in an embodiment of this specification;

[0029] Figure 3f It is a structural diagram of a model in a sixth task scheduling model construction method provided by an embodiment of this specification;

[0030] Figure 3g is a schematic diagram of the structure of a model in a seventh method for constructing a task scheduling model provided in an embodiment of this specification;

[0031] Figure 3h It is a structural diagram of a model in an eighth task scheduling model construction method provided by an embodiment of this specification;

[0032] Figure 3i is a schematic diagram of the structure of a model in a ninth method for constructing a task scheduling model provided in an embodiment of this specification;

[0033] Figure 3j It is a structural diagram of a model in a tenth method for building a task scheduling model provided in an embodiment of this specification;

[0034] Figure 4 It is a process flow chart of a task scheduling model construction method provided by an embodiment of this specification;

[0035] Figure 5 It is a structural diagram of a task scheduling model building device provided by an embodiment of this specification;

[0036] Figure 6 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION

[0037] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.

[0038] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.

[0039] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0040] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0041] In this specification, a task scheduling model construction method is provided. This specification also involves a task scheduling model construction device, a computing device, a computer-readable storage medium and a computer program product, which are described in detail one by one in the following embodiments.

[0042] In practical applications, the methods of constructing task topology networks mainly include task node models and hierarchical models; the task node model refers to taking a single task as the smallest schedulable unit, that is, a node in the topology network. Figure 3aThe topological presentation of the task node model is shown. Each circle represents a task tn{n|n∈N+}, and the directed lines between the circles represent the dependencies between the tasks. The task node model can intuitively display the dependencies between tasks and facilitate the implementation of the scheduling system. In actual application scenarios, most business process platforms that support visual drag-and-drop design basically use this scheduling model in their backend systems. The advantage of this model is its high execution efficiency, but its disadvantages are also obvious: in the design stage, a large number of tasks will lead to too many nodes in the topological structure, and the task dependencies are complicated, which reduces the feasibility of manually building the topological structure; in the operation stage, when there are requirements such as interactive operation and maintenance, its operability is relatively poor, and it is difficult for users to select, view and process target tasks from a complex topological network; in terms of the overall structure, due to the limited business processing logic of a single task, it is difficult to explain the business meaning of a single task, especially in the financial field, because business data involves wider dimensions and more abstract, generally requires a combination of multiple tasks to express a complete business scenario. Therefore, this model is insufficient in terms of business expressibility.

[0043] The hierarchical model divides tasks into different processing levels (batches). There is generally no dependency between tasks in the same level. Designers generally need to pre-set the levels during the design phase. During the operation phase, the scheduling system executes tasks in each level in sequence according to the priority of the levels. Figure 3b The topological presentation of the hierarchical model is shown in Figure 1. The rectangular box represents a level, the circle in the rectangular box represents a task, and there is a sequential dependency relationship between the levels. The hierarchical model is widely used in a wide range of scenarios. For example, in the end-of-day settlement business processing in the financial industry, processing batches are defined according to different business delivery and settlement requirements. For another example, in some big data processing platforms, the data processing level is divided into the source layer, conversion layer, processing layer, and summary layer. The scheduling processing logic of the hierarchical model is clear and simple, but the disadvantage is that the number of levels and priorities of the hierarchical model are generally pre-set, and the dependencies between tasks cannot be too complex. For newly added tasks, if there are too many dependencies between them, it will be difficult to match the preset level. Therefore, the hierarchical model has weak expansion capabilities for new businesses; secondly, since tasks need to be executed hierarchically, that is, the same level must be completed before the next level can be executed, the overall execution efficiency is low.

[0044] It can be seen that both the task node model and the hierarchical model have some drawbacks in terms of maintainability, scalability, explainability, ease of use, etc. Therefore, an effective solution is urgently needed to solve the above problems.

[0045] See also Figure 1As shown in the schematic diagram, the task scheduling model construction method provided in this embodiment can adopt a two-layer task scheduling model of module-task to reflect the task scheduling relationship in order to clearly and concisely reflect the task scheduling relationship through the task scheduling model and reduce the maintenance cost of developers. Specifically, when constructing the task scheduling model, you can first obtain multiple data processing tasks of the associated data processing business and the module annotation information of each data processing task; on this basis, you can first determine the task dependency relationship between the multiple data processing tasks, and construct a task node model based on the task dependency relationship and the multiple data processing tasks, so as to first reflect the scheduling relationship between the data processing tasks through the task node model. On this basis, in order to make the task scheduling model more concise and easy to maintain, the data processing module can be constructed according to the module annotation information of each data processing task; wherein, the data processing module contains at least one data processing task; thereby completing the mapping of tasks to modules, thereby reducing the complexity of the dependency relationship between tasks and encapsulating them through modules; thereafter, the module node model can be constructed according to the subordinate relationship between the data processing module and each data processing task, as well as the task dependency relationship; on the basis of the data processing task, the dependency relationship between tasks is simplified by encapsulating the data processing module, and the original execution order of the tasks is not changed, so as to ensure the normal operation of the data processing business. Finally, in order to ensure that the task scheduling module is concise and matches the data processing business, the module node model can also be updated using the task node model, so that the task scheduling model of the related data processing business can be obtained according to the update result, so that the task scheduling model can be used to control the execution of tasks in an orderly manner, and the maintenance difficulty and cost can be improved.

[0046] That is to say, in the task scheduling model construction stage, there is no need for manual direct modification of the topology structure, nor is there any need for manual analysis of the current status of task dependencies, which makes up for the shortcomings of the existing model in terms of expansion capabilities. An automated method is used to construct the scheduling model, and based on the developed tasks and auxiliary simple annotation information, a task scheduling model is generated through an iterative graph algorithm. It also has a certain degree of fault tolerance for manually annotated data, and can automatically optimize the topology structure based on the actual task dependencies. At the same time, the task scheduling model constructed in this way can ensure high performance in the application stage, while facilitating the display and operation of visualization tools, providing better business explainability, and improving maintainability and ease of use.

[0047] See also Figure 2 , Figure 2 A flowchart of a method for constructing a task scheduling model provided according to an embodiment of the present specification is shown, which is applied to a scheduling system and specifically includes the following steps.

[0048] Step S202, obtaining multiple data processing tasks associated with the data processing business, and module labeling information of each data processing task.

[0049] The task scheduling model construction method provided in this embodiment can be applied to any field, and the task scheduling model scenario constructed in units of data processing tasks in any field can be implemented by the task scheduling model construction method provided in this embodiment. For example, in a computer processing scenario, the database and data table are used as data storage carriers, and the business data is converted and calculated by writing a structured query language (SQL), and the database execution engine is used to convert and calculate the business data, and the processed result data is stored in the target data table. In this case, the data processing conversion process from the source table to the target table can be defined as a "data processing task". Since the data in the target data table can still be used as a source table by other tasks, there will be dependencies between tasks, which determines that some tasks need to wait for other tasks to be executed before they can be executed. The task scheduling model constructed on this basis can support the orderliness of data processing task execution. In addition, in addition to data processing tasks within the same database, data processing tasks performed across databases can also be implemented using the task scheduling model construction method provided in this embodiment. The task scheduling model construction method provided in this embodiment focuses on constructing a task scheduling model for multiple data processing tasks involved in data processing business, and the implementation of data processing tasks does not affect the construction of the task scheduling model.

[0050] Specifically, the data processing business specifically refers to the business that needs to build a task scheduling model in the current scenario, which involves multiple data processing tasks, and the data processing business can be realized by executing the data processing tasks in sequence. Among them, the data processing task can be an atomic task or an overall task; wherein, the atomic task means that each data processing task is each data processing operation in the data processing business, such as data processing involving the operation of querying multiple tables and writing the query results to one table, then the data processing operation can be regarded as an atomic task at this time. Correspondingly, an overall task refers to the combination of multiple data processing operations; for example, data processing involves the operation of querying multiple tables and writing the query results to multiple tables, then the data processing operation can be regarded as an overall task at this time. In actual applications, the granularity of the data processing task can be set according to actual needs, and it can be set according to the complexity of the data processing business, and this embodiment does not make any restrictions here. Correspondingly, the module annotation information specifically refers to the information used when constructing the data processing module in the task scheduling model. The information is entered by the developer when creating the data processing task, and after marking the module annotation information for each data processing task, the data processing tasks with the same module standard information can be assigned to the same data processing module, thereby achieving the purpose of reducing the complexity of the task topology relationship. In actual applications, the module annotation information can be determined based on specified information, such as manual configuration by the developer, or determined by the name of the folder to which the data processing task belongs. This embodiment does not make any limitation here.

[0051] Based on this, in order to clearly and concisely reflect the task scheduling relationship through the task scheduling model and reduce the maintenance cost of developers, a two-layer task scheduling model of module-task can be used to reflect the task scheduling relationship. Specifically, when building a task scheduling model, you can first obtain multiple data processing tasks of the associated data processing business and the module annotation information of each data processing task; on this basis, you can first determine the task dependency relationship between multiple data processing tasks, and build a task node model based on the task dependency relationship and multiple data processing tasks, so as to first reflect the scheduling relationship between data processing tasks through the task node model. On this basis, in order to make the task scheduling model more concise and easy to maintain, a data processing module can be constructed according to the module annotation information of each data processing task; wherein, the data processing module contains at least one data processing task; thereby completing the mapping of tasks to modules, thereby reducing the complexity of the dependency relationship between tasks and encapsulating them through modules; thereafter, a module node model can be constructed based on the subordinate relationship between the data processing module and each data processing task, as well as the task dependency relationship; on the basis of the data processing task, the dependency relationship between tasks is simplified by encapsulating the data processing module, and the original execution order of the tasks is not changed, thereby ensuring the normal operation of the data processing business. Finally, in order to ensure that the task scheduling module is concise and matches the data processing business, the module node model can also be used to update the task node model, so that the task scheduling model of the associated data processing business can be obtained according to the update result.

[0052] Ensure that when the scheduling system is running, it can be scheduled according to the module dimension first, and it needs to be executed in sequence based on the dependencies between data processing modules; when executing a single data processing module, its internal data processing tasks need to be executed according to the dependencies between tasks; such as Figure 3c As shown, each rectangular box represents a data processing module, the circle inside the rectangular box represents a data processing task, the lines between modules represent the dependencies between modules, and the lines between tasks represent the dependencies between tasks, thereby ensuring that the data processing tasks involved in the data processing business can be executed in an orderly manner, and the task scheduling model is more concise and clear, which is convenient for developers to maintain.

[0053] Furthermore, after obtaining multiple data processing tasks related to the data processing business, in order to facilitate the automatic construction of the task scheduling model, when obtaining the module annotation information corresponding to each data processing task, it can be implemented according to the set rules. In this embodiment, the specific implementation method is as follows:

[0054] Determine the storage folder information corresponding to each data processing task among the multiple data processing tasks, and use the storage folder information corresponding to each data processing task as module labeling information; or, extract task attribute information from each data processing task, and use the task attribute information corresponding to each data processing task as module labeling information.

[0055] Specifically, the storage folder information specifically refers to the naming information corresponding to the folder where the relevant data files corresponding to each data processing task are stored; during specific implementation, developers can selectively store the relevant files corresponding to different data processing tasks in the same folder according to needs. Correspondingly, the task attribute information specifically refers to the information that defines the attribute type of each data processing task. Different data processing tasks correspond to different data types, and therefore correspond to different task attribute information.

[0056] Based on this, after obtaining multiple data processing tasks, in order to be able to build a task scheduling model with a two-layer structure (task-module) in the subsequent stage, it is necessary to first perform task-level division and module-level division before building the model. In order to ensure that the module labeling information can be standardized, the storage folder information corresponding to each data processing task in the multiple data processing tasks can be determined first, and the storage folder information corresponding to each data processing task can be used as the module labeling information; or, the task attribute information can be extracted from each data processing task, and the task attribute information corresponding to each data processing task can be used as the module labeling information, so as to facilitate the subsequent construction of the data processing module.

[0057] In actual applications, when developers edit processes through the scheduling model building system, the scheduling model building system will obtain multiple data processing tasks. Developers can develop tasks for data processing business on the scheduling system, and can fill in module annotation information after the task development is completed. In specific implementation, developers can use SQL language to develop data processing tasks according to business needs. The specific organization form of a single task includes but is not limited to: using an independent text file to represent a task, and the file content is an SQL statement describing the business logic. Further, when marking module information for each data processing task, business developers can mark the information of the module in which each task is expected to be located, and each task must belong to a module. The specific processing method for marking modules for tasks includes but is not limited to: (1) defining modules in the form of file directories, and storing tasks belonging to the same module in the same file directory. (2) defining modules in the form of task attributes, and setting a task attribute for the task to indicate the module to which it belongs. In addition, in actual applications, other methods can also be selected according to actual needs to mark the module information of each data processing task, and this embodiment does not make any restrictions here.

[0058] In summary, after allocating module annotation information for each data processing task, it is convenient to allocate data processing tasks to each data processing module when constructing the module node model later, so that a more concise task scheduling model can be constructed for use.

[0059] Step S204: determine the task dependency relationship between the multiple data processing tasks, and construct a task node model according to the task dependency relationship and the multiple data processing tasks.

[0060] Specifically, after obtaining the multiple data processing tasks and the module annotation information corresponding to each data processing task as mentioned above, in order to be able to fully and accurately reflect the dependency relationship between the data processing tasks through the task scheduling model when constructing the task scheduling model, the task dependency relationship between the multiple data processing tasks can be determined first, and then the task dependency relationship and the multiple data processing tasks are combined to construct a task node model, so as to reflect the scheduling relationship between the data processing tasks through the task node model, so that when the task scheduling model is subsequently constructed, it can be completed with reference to the task node model, thereby accurately reflecting the task execution relationship of the data processing business.

[0061] Among them, task dependency specifically refers to the relationship between data processing tasks when they are executed. For example, a data processing business includes data processing tasks A, B, and C, among which data processing task B needs to be executed after data processing task A is completed. Then there is a task dependency relationship between data processing tasks A and B. Correspondingly, the task node model specifically refers to taking data processing tasks as nodes and building edges according to task dependency relationships, thereby obtaining a visual model that reflects the scheduling relationship of task nodes.

[0062] Furthermore, when constructing the task node model, in order to ensure the connectivity between the task nodes in the model and to meet the dependency relationship between the data processing tasks, this can be accomplished by extracting dependency identification information. In this embodiment, the specific implementation is as follows:

[0063] Constructing multiple task nodes for the multiple data processing tasks, and constructing a task node set based on the multiple task nodes; traversing the task nodes in the task node set to obtain dependency identification information corresponding to each task node; determining the task dependency relationship between the multiple data processing tasks based on the dependency identification information corresponding to each task node; and constructing a task node model based on the task dependency relationship and the task node set.

[0064] Specifically, the task node specifically refers to the graph node with a unique corresponding relationship for each data processing task. Correspondingly, the task node set is composed of the task nodes corresponding to each data processing task. It should be noted that the task node corresponding to the data processing task has a unique identifier in the task node set, so that when building the task node model, the corresponding data processing tasks can be distinguished and matched. Correspondingly, the dependency identification information specifically refers to the identification information determined by each task node based on the data processing task to which it belongs. This identification information can not only identify the data processing task, but also reflect the dependency relationship between the data processing tasks, so as to achieve that the task node corresponding to the data processing task with the dependency relationship can be found according to the dependency identification information, thereby completing the construction of the task node model.

[0065] Based on this, in order to ensure that the task node model can reflect the task dependency relationship between each data processing task in multiple data processing tasks, multiple task nodes can be constructed for multiple data processing tasks first, and a task node set can be constructed based on the multiple task nodes; at this time, the task nodes in the task node set can be traversed to scan the data files of the data processing tasks associated with each task node, so as to obtain the dependency identification information corresponding to each task node; since the dependency identification information can analyze the dependency relationship between data processing tasks, the task dependency relationship between multiple data processing tasks can be determined according to the dependency identification information corresponding to each task node; on this basis, a task node model can be constructed based on the task dependency relationship and the task node set, so as to facilitate the subsequent construction and use of the task scheduling model.

[0066] Furthermore, considering that the basis of the task dependency is determined based on the dependency identification information, in order to ensure the accuracy of the dependency identification information, it can be extracted from the business calculation logic text of the data processing task. In this embodiment, the specific implementation method is as follows:

[0067] By parsing the data processing tasks corresponding to the task nodes, the business calculation logic text is obtained; the business calculation logic text is preprocessed to obtain the standard logic text; the identification text features are extracted from the standard logic text according to the preset recognition rules, and the dependency identification information corresponding to the task node is constructed according to the identification text features.

[0068] Specifically, the business calculation logic text specifically refers to the task text containing dependency identification information and key identification information obtained after parsing the data processing task corresponding to any task node, which can be understood as one or more executable business logic statements written in SQL language, wherein the key identification refers to the SQL keyword in the SQL statement that can be used to identify the name of the data table. Correspondingly, the standard logic text specifically refers to the normative logic text obtained after preprocessing the business calculation logic text. Among them, the preprocessing includes but is not limited to revising the text, removing redundant text, etc. Correspondingly, the identification rule specifically refers to the rule for extracting the text features corresponding to the associated dependency identification information in the standard logic text, which is used to identify the content of the associated dependency identification information in the standard logic text, so that the dependency identification information can be obtained according to the identified text.

[0069] Based on this, when determining the dependency identification information for any task node, in order to ensure that the determined dependency identification information can support the construction of the task node model, and to ensure that the constructed task node model matches the task dependency relationship between multiple data processing tasks, the data processing tasks corresponding to the task node can be parsed first to obtain the business calculation logic text; on this basis, in order to avoid the influence of redundant text content on the recognition of dependency identification information, the business calculation logic text can be preprocessed first to obtain the standard logic text; thereafter, the identification text features can be extracted from the standard logic text according to the preset recognition rules, and the dependency identification information corresponding to the task node can be constructed according to the identification text features, so that the task node model can be constructed in combination with the dependency identification information in the future.

[0070] In actual applications, when constructing a task node model, you can first use the data processing task as a task node. At this time, you can construct a task node set Node <task>, and then the dependency identification information between data processing tasks can be obtained to achieve the subsequent combination of task node set Node <task>And rely on identification information to complete the construction of the task node model.

[0071] Specifically, when obtaining the dependency identification information corresponding to the data processing task, the dependency identification information used to determine the dependency between tasks can be collected in each task by traversing the data processing tasks. Among them, the specific method of determining the dependency identification information corresponding to the task includes but is not limited to obtaining the task dependency identifier by parsing the SQL statement. It should be noted that in order to ensure that the dependency identification information can be parsed, each data processing task needs to contain a business calculation logic text, wherein the business calculation logic text will contain dependency identification information and key identification information. The key identification information is specifically manifested as SQL keywords such as "from", "table", "join" and so on that can be used to identify the data table name in the SQL statement. The dependency identification information can be understood as an element used to determine the dependency relationship between tasks. In practical applications, the dependency identification information can be expressed as: the data table name carrying input and output attributes, for example: db1.table1 (input table).

[0072] In specific implementation, when extracting dependency identification information from the business logic calculation text corresponding to the data processing task, the business logic calculation text corresponding to the data processing task can be preprocessed by a text processing algorithm to remove irrelevant content such as comments and revision logs. This ensures that SQL statements, variable usage, method calls, and other content can be identified from the preprocessed business calculation logic text. Then, for the preprocessed business logic calculation text, a combination of the two methods of "based on dependency identification information text features" and "based on SQL grammar rules" can be used to extract the input data table and output data table in the task, thereby determining the dependency identification information. Among them, "based on dependency identification information text features" refers to the data table naming rules agreed upon in the current business system design specifications. For example, if the system design specifications stipulate that the database instance name in the system needs to start with "db_" and the data table name needs to start with "table_", then the content with the string pattern "db_*.table_*" in the SQL statement can be identified as the data table name; "based on SQL grammar rules" is based on the grammar rules of the SQL statement, and the content in the text before and after the target keyword is identified as the data table name. In specific implementation, the identification rules can be implemented using the identification rules in Table 1 below:

[0073]

[0074] Table 1

[0075] Furthermore, after obtaining the dependency identification information corresponding to each data processing task based on the above identification rules, the task dependency relationship Edge between the data processing tasks can be determined by combining the relationship recorded in the dependency identification information.<Task, Task> . In specific implementation, the input / output attributes corresponding to the data processing tasks and their associated dependency identification information can be used to establish task dependencies between data processing tasks through a task dependency algorithm. The task dependencies between data processing tasks can be shown in Table 2 below. For example, if the input table of data processing task a includes tbl2, and the output table of data processing task b includes tbl2, then it is determined that data processing task a depends on data processing task b, and so on. After the determination of the task dependencies between all data processing tasks is completed, a task node model can be constructed for subsequent use. Among them, Table 2 is shown below:

[0076]

[0077] Table 2

[0078] In addition, in order to avoid the situation where the task node model has disordered task dependencies and causes data processing tasks to become looped, which may affect downstream use, an error can be reported for this situation so that developers can make adjustments before building subsequent task scheduling models. In specific implementation, consider the errors caused by the fact that tasks are dependent in the construction phase but are not related in the operation phase. For example, T is the current trading day, task a reads the data of day T-1 in table tbl1 and writes the data of day T in table tbl2; task b reads the data of day T-1 in table tbl2 and writes the data of day T in table tbl1; since the task dependency construction phase belongs to static analysis, it will be considered that there is a circular dependency between tasks a and b, resulting in a construction error. However, the actual situation is that at runtime, tasks a and b do not have concurrent reading and writing of data, so there is no execution relationship; in response to this situation, a whitelist mechanism can be established, and developers can customize the task dependency pairs that need to be ignored, so as to ensure that the task scheduling model can continue to be built.

[0079] In summary, when building a task node model, by extracting dependency identification information from the business logic calculation text corresponding to the data processing task, the task dependency relationship between each data processing task can be accurately located. Building a task node model based on this can ensure that the task node model can accurately reflect the scheduling relationship and execution relationship between data processing tasks, thereby facilitating the subsequent construction of a task scheduling model that matches the data processing business for downstream use.

[0080] Step S206, constructing a data processing module according to the module annotation information of each data processing task; wherein the data processing module includes at least one data processing task.

[0081] Specifically, after the task node model is constructed for the data processing task, in order to make the task scheduling model finally constructed more concise, the task scheduling model construction method provided in this embodiment proposes a model construction mechanism for the data processing module. That is, a data processing module containing at least one data processing task can be constructed on the basis of the data processing task, so as to simplify the number of nodes in the model by including the data processing task in the module, and the execution of the data processing task is completed by the dependency relationship of the task in the data processing module, so as to complete the simplified processing of the task scheduling model without affecting the execution of the data processing business. Therefore, after obtaining the module annotation information corresponding to each data processing task, the data processing module can be constructed according to the module annotation information of each data processing task, and the data processing module contains at least one data processing task, so as to be used for the subsequent construction of the task scheduling model. Among them, the data processing module can be understood as a module obtained after encapsulating at least one data processing task.

[0082] Step S208: construct a module node model according to the subordinate relationship between the data processing module and each data processing task, and the task dependency relationship.

[0083] Specifically, after obtaining the data processing module containing at least one data processing task as mentioned above, at this time, the subordinate relationship between the data processing task and the data processing module can be determined first. As the module does not have attributes at the data processing task level, it does not have a dependency relationship. Therefore, it is also necessary to determine the dependency relationship between the data processing modules based on the task dependency relationship. Thus, the module node model can be constructed based on the subordinate relationship between the data processing module and each data processing task, as well as the task dependency relationship, so that the task scheduling model can be constructed subsequently based on the module node model.

[0084] Among them, the subordinate relationship between the data processing module and the data processing task specifically refers to the relationship that describes which data processing tasks the data processing module contains; correspondingly, the module node model specifically refers to a visualization model obtained by taking the data processing module as the node and building edges based on the module dependency determined by the task dependency.

[0085] Furthermore, when constructing the module node model, considering that there may be conflicts or redundant dependencies in the constructed model, the model can also be optimized. In this embodiment, the specific implementation is as follows:

[0086] Construct module nodes for the data processing module, and determine the subordinate relationships between the multiple data processing tasks and the data processing module; construct a directed topological graph based on the module nodes, the subordinate relationships and the task dependencies, and use the directed topological graph as an initial module node model; optimize the initial module node model according to a preset model optimization strategy to obtain a module node model.

[0087] Specifically, a module node refers to a graph node constructed based on a data processing module. Accordingly, a directed topological graph specifically refers to a module node model under an initial structure constructed by combining task dependencies, subordinate relationships, and module nodes. Accordingly, the model optimization strategy is a strategy for adjusting the initial module node model. This strategy is used to delete redundant module dependencies, split data processing tasks, and construct new module nodes for the split data processing tasks for the initial module node model. This can make the final module node model more concise by deleting redundant module dependencies, and make the module node model more reasonably schedulable by splitting data processing tasks.

[0088] Based on this, after constructing multiple data processing modules for data processing tasks, module nodes can be constructed for the data processing modules first, and the subordinate relationships between multiple data processing tasks and data processing modules can be determined at the same time; on this basis, a directed topology graph can be constructed based on module nodes, subordinate relationships, and task dependencies, and the directed topology graph can be used as the initial module node model. Afterwards, in order to ensure the simplicity of the model, the initial module node model can be optimized according to the preset model optimization strategy, so that the module node model can be obtained according to the optimization results, so that the module node model can be used to construct the task scheduling model in the future.

[0089] In actual applications, when building a module scheduling model, you can first collect the module annotation information that developers have annotated for each data processing task, and then build module nodes based on the module annotation information to form a module node set Node <biz>On this basis, the module nodes can be used as topological nodes to build the initial module node model. In this process, we can first build the model based on the subordinate relationship between the data processing module and the data processing task, as well as the dependency relationship between the tasks.<Task, Task> , construct a directed topological graph G with modules as nodes <Node <biz>, Edge<Biz, Biz> >, and use it as the initial module node model. The directed relationship between modules is determined by: There are tasks in Dependency modules Tasks in , then the module Dependency modules , the module The corresponding node points to the module This can be done by analogy, until the connection relationship between all modules is determined, the following can be obtained: Figure 3d The task node model shown ( Figure 3d Center left) and the initial module node model ( Figure 3d center right).

[0090] In summary, by combining the subordination relationship and task dependency relationship to determine the module dependency relationship between module nodes, and building an initial module node model based on this, and using the model optimization strategy to adjust it, the module node model of the corresponding data processing business can be obtained for use in the subsequent task scheduling model construction.

[0091] Furthermore, when optimizing the model according to the model optimization strategy, the task can be split according to the loop problem, and a new data processing module can be constructed for the split data processing task, and then it can be spliced ​​into the initial module node model to obtain the basic elements for constructing the task scheduling model. In this embodiment, the specific implementation method is as follows:

[0092] Determine the module dependency relationship between module nodes in the initial module node model according to the task dependency relationship; perform loop detection on the initial module node model according to the preset model optimization strategy and the module dependency relationship; determine that loop modules constitute a loop module set in the initial module node model when a loop problem exists in the initial module node model according to the detection result; select and split data processing tasks from the data processing tasks included in the loop modules in the loop module set, and construct an update data processing module for the split data processing tasks; use the update data processing module to update the initial module node model to obtain a module node model.

[0093] Specifically, the module dependency specifically refers to the dependency relationship between each module node in the initial module node model. Accordingly, loop detection specifically refers to the detection and processing operation of detecting whether there is a loop problem in the initial module node model. Accordingly, the loop module specifically refers to the data processing module involved in the loop problem in the initial module node model. Accordingly, the loop module set is a set composed of loop modules. By performing subsequent processing on the loop modules in the set, the loop problem can be resolved. Correspondingly, the split data processing task specifically refers to the data processing task that needs to be split out of the loop module to separately build a new data processing module. Because the cause of the loop problem is caused by the execution relationship between the data processing tasks, splitting this type of data processing task and building a new data processing module can eliminate the loop problem in the initial module node model. Correspondingly, the update data processing module is a new data processing module constructed for the split data processing task. Move the split data processing task to the update data processing module and splice it to the initial module node model to obtain the optimized module node model.

[0094] Based on this, in order to build a module node model that matches the data processing business for use in the subsequent construction of the task scheduling model, the module dependency relationship between the module nodes in the initial module node model can be determined based on the task dependency relationship; at this time, the initial module node model can be subjected to a loop detection according to the preset model optimization strategy and module dependency relationship; if it is determined based on the detection results that the initial module node model does not have a loop problem, the initial module node model can be directly used as the module node model for the subsequent construction of the task scheduling model.

[0095] When it is determined according to the detection results that there is a loop problem in the initial module node model, it means that there is a closed-loop problem in the module connectivity relationship in the module node model, and the mapping task execution relationship is unclear. Therefore, the loop modules can be determined in the initial module node model to form a loop module set; thereafter, the data processing tasks included in the loop modules in the loop module set can be screened and split data processing tasks can be constructed on this basis for the split data processing tasks; thereafter, the updated data processing module can be used to update the initial module node model to obtain a module node model that meets the usage requirements.

[0096] In practical applications, after obtaining the initial module node model, the initial module node model G <Node <biz>, Edge<Biz, Biz> >Perform schedulability analysis. Scheduling analysis can be understood as determining whether the initial module node model needs to be optimized. Specifically, for any module node in the initial module node model, if it can traverse to itself through any directed link, the initial module node model is considered to be looped. For example, Figure 3d As shown in the figure on the left, data processing tasks a1~a5 belong to module A, and data processing tasks b1~b4 belong to module B. Since data processing task a1 depends on data processing task b1, and data processing task b2 depends on data processing task a2, module A and module B are mutually dependent, thus forming a loop in the module topology diagram. That is, there is a closed loop between module A and module B. This shows that it is impossible to build a task scheduling model that can be executed correctly based only on the module annotation information given by the developer. Therefore, it is necessary to optimize and adjust the initial module node model, and it is necessary to record the module set C that forms the loop. <Node <biz>>, and perform subsequent optimization operations. For example, Figure 3d As shown, one of the cycle sets is C={A,B}.

[0097] Furthermore, after obtaining a set including loop modules A and B, the data processing tasks in the loop modules can be split. The purpose is to remove some data processing tasks from the current module and move them to new similar data processing modules, so that there is no loop in the initial module node model, and the scheduling feasibility of the module node model is achieved, thereby obtaining the module node model.

[0098] In summary, when constructing a module node model, you can first build an initial module node model based on the data processing module, and then optimize the initial module node model according to the optimization strategy to eliminate the loop problem, thereby ensuring that the obtained module node model can map the task execution relationship.

[0099] In the specific implementation, considering that the data processing modules included in the ring set are data processing modules with loop relationships, in order to avoid affecting the task scheduling relationship, the data processing tasks can be split. When splitting the data processing tasks, different methods need to be used for judgment and splitting according to different situations. In this embodiment, the specific implementation method is as follows:

[0100] Determine the target data processing task included in the target looping module in the looping module set, and load the predecessor data processing task of the target data processing task to form a predecessor data processing task sequence; traverse the predecessor data processing task sequence, and detect whether there is a target predecessor data processing task in the predecessor data processing task sequence that belongs to the target looping module and has a path with the target data processing task according to the traversal result;

[0101] If so, determine the associated preceding data processing task corresponding to the target preceding data processing task, and use the target preceding data processing task and the associated preceding data processing task as split data processing tasks.

[0102] If not, when the target data processing task directly depends on the associated data processing task that does not belong to the target looping module, determine the associated data processing module that contains the associated data processing task; when the associated data processing module belongs to the looping module set, and the number of data processing tasks contained in the associated data processing module is greater than the set number threshold, take the associated data processing task as a candidate split data processing task and add it to the candidate task set; when the detection of the data processing tasks contained in the looping modules in the looping module set is completed, perform in-and-out degree comparison processing on the candidate split data processing tasks contained in the candidate task set, and filter the split data processing tasks in the candidate task set according to the comparison results.

[0103] Specifically, the module looping module specifically refers to the looping module in the looping module set that needs to be detected for splitting tasks, that is, the target looping module is any looping module in the looping module set. Correspondingly, the target data processing task specifically refers to the data processing task contained in the target looping module. Correspondingly, the predecessor data processing task specifically refers to the data processing task that has a task dependency relationship with the target data processing task before the target data processing task. Correspondingly, the predecessor data processing task sequence is a sequence composed of multiple predecessor data processing tasks. Correspondingly, the associated predecessor data processing task specifically refers to the data processing task that has a task dependency relationship with the target predecessor data processing task before the target predecessor data processing task. Correspondingly, the associated data processing module is the data processing module to which the associated data processing task belongs. Candidate split data processing tasks specifically refer to data processing tasks that have not yet been characterized as split data processing tasks.

[0104] Based on this, when the initial module node model is optimized by using the model optimization strategy, the purpose is to eliminate the loop problem in the initial module node model, that is, to delete the dependencies involved in the loop, and create a new data processing module for the split data processing task and splice it into the initial module node model. In this process, in order to avoid the unavailability of the final module node model, the target data processing task contained in the target loop module in the loop module set can be determined first. At this time, the pre-order data processing task of the target data processing task can be loaded first to form a pre-order data processing task sequence; thereafter, the pre-order data processing task sequence can be traversed, and the pre-order data processing task sequence can be detected according to the traversal results. Whether there is a target pre-order data processing task that belongs to the target loop module and has a path with the target data processing task. Among them, the specific process of detection and processing refers to first determining the pre-order data processing task of the target data processing task, and then determining the pre-order task of the pre-order data processing task, wherein the pre-order data processing task and the target data processing task do not belong to the same data processing module; on this basis, the pre-order task and the target data processing task will be detected by traversal to see whether they belong to the same target loop module and whether there is a path with the target data processing task.

[0105] If so, it means that the target predecessor data processing task and its corresponding predecessor data processing task are both data processing tasks that cause the loop problem. Therefore, the associated predecessor data processing task corresponding to the target predecessor data processing task can be determined, and the target predecessor data processing task and the associated predecessor data processing task can be used as split data processing tasks, so that a new data processing module can be constructed for the split data processing task later, thereby generating a module node model that meets expectations.

[0106] If not, it means that there is no data processing task that can be split in the previous data processing task, and the detection of associated data processing tasks can be carried out at this time. If the target data processing task directly depends on the associated data processing task that does not belong to the target loop module, the associated data processing module containing the associated data processing task can be determined at this time; when the associated data processing module belongs to the loop module set, and the number of data processing tasks contained in the associated data processing module is greater than the set number threshold, it means that it may be used as a split data processing task, so the associated data processing task can be first used as a candidate split data processing task and added to the candidate task set; when the detection of the data processing tasks contained in the loop module in the loop module set is completed, a candidate task set containing multiple candidate split data processing tasks will be obtained, and then the candidate split data processing tasks contained in the candidate task set can be compared for the in-and-out degree, and the split data processing tasks can be screened in the candidate task set according to the comparison results.

[0107] In actual applications, when screening and splitting data processing tasks, for any target loop module in the loop set, the following method can be used to determine the split data processing task. Specifically, first traverse the loop modules included in the loop module set C, and for any data processing task included in the target loop module A, , you can get the task first All the predecessor tasks of , and form a predecessor task sequence, and then the predecessor task sequence can be traversed. There are tasks in a previous task sequence that belong to the same target loop module A. , and the task With the task There is at least one task that passes through non-target loop module A. If there is a reachable path, then all tasks belonging to the target loop module A and its predecessor tasks will be used as split data processing tasks.

[0108] For example, Figure 3e As shown, there is a loop in the data processing module [A, B, C, D, E]. When checking task a8 in data processing module A, it is found that task a8 has a previous task sequence [c2, c1, a6, a3, a1] ( Figure 3e The red circle in the middle left figure shows that tasks a6, a3, and a1 belong to data processing module A, and tasks c1 and c2 belong to data processing module C. Then tasks a1, a3, and a6 ( Figure 3e The yellow circle in the middle right figure) can be considered as a split data processing task.

[0109] In addition, when the split data processing task is not determined by the above detection logic, another detection rule can be used; specifically, for the data processing task included in the target loop module A , we can check whether it satisfies the following logic: (1) Task Directly depends on a module that does not belong to the target loop Mission ; (2) Mission Data processing module Belong to the loop ; (3) The number of tasks in data processing module B is greater than 1.

[0110] When the data processing task in the target loop module A meets the above three conditions, the task can be As a candidate split data processing task, add it to the candidate split task collection and record the module The in-and-out degree of a module refers to the total number of direct dependencies or dependencies between a data processing module and other data processing modules. This is used to iterate the processing of each loop module.

[0111] After each loop module has been tested, and the candidate split task set When there are candidate split data processing tasks in the set, Select a candidate split data processing task with the smallest in-and-out degree of its module from the list and use it as the split data processing task. Figure 3f As shown, the module , There is a loop C=[D,E]. Module Tasks in Depends on modules Tasks in , module Tasks in Depends on modules Tasks in , the number of tasks of the two modules are 2 and 3 respectively, which meets the above conditions. . Because the module The in-degree is 4, the module The in-degree of is 2, so the task As a split data processing task. Subsequently, a data processing module can be constructed according to the determined split data processing task, and spliced ​​into the initial module node model to obtain a module node model that can generate a task scheduling model.

[0112] In summary, in order to ensure that the module node model can be used for the subsequent construction of the task node model, when optimizing the model, different methods can be selected to determine the split data processing tasks according to different situations, thereby ensuring the positioning accuracy of the split data processing tasks, so as to facilitate the subsequent construction of the module node model.

[0113] In addition, after obtaining the split data processing task, it is necessary to build an updated data processing module for the data processing task, and on this basis, it is also necessary to splice it into the initial module node model. Therefore, the update of the initial module node model can be achieved in the following way:

[0114] Determine the split data processing module to which the split data processing task belongs, and remove the split data processing task from the split data processing module; construct an update data processing module according to the module information of the split data processing module; wherein, using the update data processing module to update the initial module node model to obtain a module node model includes: determining a reconstructed module dependency relationship between the split data processing module and the update data processing module, and between the update data processing module and the data processing module included in the initial module node model according to the task dependency relationship; and updating the update data processing module to the initial module node model based on the reconstructed module dependency relationship to obtain a module node model.

[0115] Specifically, the split data processing module specifically refers to the data processing module to which the split data processing task belongs. Correspondingly, the reconstructed module dependency specifically refers to the relationship that the new data processing module depends on when it is spliced ​​into the initial module node model after the new data processing module is constructed for the split data processing task, and the relationship matches the data processing business, thereby ensuring that the updated data processing module can be correctly spliced ​​into the initial module node model to obtain the module node model for subsequent use.

[0116] Based on this, after filtering out the split data processing task from the loop module, we can first determine the split data processing module to which the split data processing task belongs. At this time, we can remove the split data processing task from the split data processing module; at the same time, we can build an update data processing module according to the module information of the split data processing module; further, we can determine the reconstructed module dependency between the split data processing module and the update data processing module, and between the update data processing module and other data processing modules included in the initial module node model based on the task dependency; on this basis, we can update the update data processing module to the initial module node model based on the reconstructed module dependency, thereby obtaining the module node model based on the update result.

[0117] In practical applications, after obtaining the split data processing module, the split data processing module can be removed from the original split data processing module. After that, a new data processing module can be created for the split data processing tasks that originally belonged to the same data processing module, and this part of the split data processing tasks can be added to the new data processing module. It should be noted that the naming of the new data processing module can be associated with the naming of the original data processing module to represent the same business meaning. In specific implementation, the new data processing module can be named by adding a suffix identifier based on the name of the original data processing module. Figure 3g As shown, based on Figure 3e For example, if tasks a1, a3, and a6 need to be split from module A, then these three tasks are split into a new module A1, and the original module name is changed to A0.

[0118] Furthermore, for Figure 3g Based on the relationship shown in the figure, the module dependency relationship between the split data processing module and the split new data processing module is reconstructed. Figure 3g For example, after the relationship reconstruction, the module node model is obtained as follows Figure 3h As shown. Then you can build and use the task scheduling model.

[0119] In summary, by constructing a new data processing module for the split data processing task and splicing it into the initial module node model, it is possible to delete the relationship that affects the execution order of the data processing tasks when constructing the module node model, thereby ensuring that the module node model better matches the data processing business.

[0120] Step S210: using the task node model to update the module node model, to obtain a task scheduling model associated with the data processing service.

[0121] Specifically, after obtaining the task node model and the module node model as described above, further, considering that the task node model reflects the task scheduling relationship between data processing tasks, and the module node model reflects the module scheduling relationship between data processing modules, and since the data processing module contains at least one data processing task, in order to obtain a more concise task scheduling model that reflects the execution relationship between data processing tasks, the task node model can be used to update the module node model, thereby obtaining a task scheduling model for the associated data processing business according to the update result. Among them, the task scheduling model specifically refers to a two-layer scheduling model constructed by tasks and modules, which can execute data processing tasks in an orderly manner, thereby completing data processing business.

[0122] Furthermore, when using the task node model to update the module node model, considering that there may be redundant data processing modules after the above processing, which increases the complexity of the model and even affects the execution order of the data processing task, the redundant data processing modules can be removed. In this embodiment, the specific implementation is as follows:

[0123] Determine at least one initial data processing module pair according to the module node model; select an initial data processing module pair with the same original task label and a direct dependency relationship from the at least one initial data processing module pair as a target data processing module pair, wherein the target data processing module pair consists of a main data processing module and an auxiliary data processing module; migrate the model attributes associated with the auxiliary data processing module to the main data processing module, remove the auxiliary data processing module from the module node model, and obtain the target module node model according to the removal result; use the task node model to update the target module node model to obtain a task scheduling model associated with the data processing business.

[0124] Specifically, the initial data processing module pair specifically refers to a pair consisting of a main data processing module and an auxiliary data processing module in a dependent relationship; wherein the main data processing module and the auxiliary data processing module can be understood as data processing modules that have a direct dependent relationship with each other and can be merged. Correspondingly, model attribute migration specifically refers to the operation of migrating all module attributes of the merged data processing module to the merged data processing module when merging data processing modules. Correspondingly, the target module node model specifically refers to the module node model obtained after the module merger.

[0125] Based on this, after obtaining the module node model and the task node model, in order to combine the two to obtain a task scheduling model that matches the data processing business and reduce the impact of redundant modules, module merging processing can be performed. In this process, at least one initial data processing module pair can be determined according to the module node model; then, an initial data processing module pair with the same original task label and a direct dependency relationship can be selected from at least one initial data processing module pair as a target data processing module pair, wherein the target data processing module pair consists of a main data processing module and an auxiliary data processing module; on this basis, the model attributes associated with the auxiliary data processing module can be migrated to the main data processing module, and the auxiliary data processing module can be removed from the module node model, and the target module node model can be obtained according to the removal result; finally, the target module node model is updated using the task node model to obtain a task scheduling model for the associated data processing business.

[0126] In practical applications, when merging data processing modules, the main purpose is to merge the data processing modules corresponding to the over-split tasks. This reduces the number of modules formed and makes the model more concise. Therefore, in order to achieve a high cohesion effect of tasks with the same preset modules, the data processing modules to be merged can be obtained first, and then the dependency set E of the data processing modules can be traversed.<Biz, Biz> , for any set of modules with dependencies and modules , determine whether the following conditions are met: (1) Module With module The corresponding original task label is the same; (2) module With module There is no indirect dependency relationship between modules except direct dependencies. With module At least one module Pathway.

[0127] If the module and If the above conditions are met, it means that the two modules can be merged. When merging, you can remove the module first. The corresponding module node, and then the original module Dependent modules, changed to modules Make dependencies; and convert the original and dependent modules Modules are changed to dependent modules ; and will belong to the module Tasks moved to module For example, Figure 3i As shown, the module and Tasks in , The original modules are , and there is no indirect dependency between the two modules, then the modules can be Incorporation By analogy, after all modules that can be merged are merged, the merged module node model can be combined with the task node model to complete the construction of the task scheduling model.

[0128] Furthermore, after the redundant data processing modules are removed, there may be redundant connectivity between the remaining data processing modules, that is, there is an indirect dependency relationship between the data processing modules on the basis of the direct dependency relationship, which may affect the execution of the data processing modules and cause a complex relationship problem, so it is necessary to delete the dependency relationship. In this embodiment, the specific implementation method is as follows:

[0129] Detect the module dependency relationship between the data processing modules in the target module node model; determine the optimized data processing modules with indirect dependencies based on the detection results, delete the direct dependencies between the optimized data processing modules in the target module node model, and obtain the optimized module node model; use the task node model to update the optimized module node model to obtain a task scheduling model associated with the data processing business.

[0130] Specifically, the optimized data processing module specifically refers to a data processing module in the target module node model that can optimize module dependencies. Correspondingly, the optimized module node model specifically refers to a module node model obtained after deleting the dependencies that can be deleted in the target module node model.

[0131] Based on this, after obtaining the target module node model, considering that the execution of the downstream data processing module needs to be completed based on the execution result of the upstream data processing module, when there is both a direct dependency and an indirect dependency between the two data processing modules, the existence of the direct dependency will be meaningless (it is necessary to wait for the other data processing modules to be executed before the downstream data processing module can be executed), so the dependency can be optimized. Specifically, the module dependency between the data processing modules in the target module node model can be detected; at this time, the optimized data processing modules with indirect dependencies can be determined based on the detection results, and then the direct dependencies between the optimized data processing modules in the target module node model can be deleted to obtain the optimized module node model; finally, the optimized module node model is updated using the task node model, and the task scheduling model of the associated data processing business can be obtained based on the update results.

[0132] In practical applications, when removing dependencies, the goal is to simplify the model structure without changing the original dependencies. Therefore, we can first traverse the node dependency set E of the module topology.<Biz, Biz> , for any module Directly dependent modules In the case of the module, determine whether there are other indirect dependencies between the two. Is there a non The accessible path can be connected to the module If present, the module With module Direct dependencies between Add to the set of relations to be deleted.

[0133] Furthermore, all the dependencies in the to-be-deleted relationship set are removed from the target module node model. Figure 3j As shown in , there are both direct and indirect dependencies between modules A1 and A0, E1 and E0, and B and D. These redundant direct dependencies need to be removed. After removal, we can get Figure 3j The module node model shown on the right.

[0134] In summary, by merging data processing modules and deleting dependencies on the module node model, a clear and concise module node model can be obtained. By combining this with the task node model, a task scheduling model with a two-layer structure that matches the data processing business can be generated for use by downstream businesses.

[0135] On this basis, when constructing the task scheduling model, it can be implemented by traversing and combining. In this embodiment, the specific implementation method is as follows:

[0136] Traverse the data processing modules included in the optimization module node model, and determine the data processing tasks included in each data processing module according to the traversal results; construct a task sub-topology structure diagram within the module according to the task node model and the data processing tasks included in each data processing module; based on the optimization module node model and the task sub-topology structure diagram within the module, generate a task scheduling model associated with the data processing business; wherein the task scheduling model is stored in a preset format.

[0137] Specifically, the task sub-topology structure diagram within the module specifically refers to the model of the task dimension constructed by at least one data processing node within the data processing module. Based on this, when constructing the task scheduling model, it is actually to traverse the data processing modules contained in the optimization module node model, and then the data processing tasks contained in each data processing module can be determined according to the traversal results; on this basis, the task sub-topology structure diagram within the module can be constructed according to the task node model and the data processing tasks contained in each data processing module; then, based on the optimization module node model and the task sub-topology structure diagram within the module, the task scheduling model of the associated data processing business can be generated; wherein, the task scheduling model is stored in a preset format.

[0138] In practical applications, after obtaining the task node model and module node model, each data processing module can be traversed to collect the tasks contained in each data processing module and Edge<Task, Task> , construct the task sub-topology structure within the module. On this basis, a task scheduling model that matches the data processing business can be generated, and the task scheduling model is a structured configuration file, such as an XML or JSON format file, which can be used to execute the data processing business later.

[0139] The task scheduling model construction method provided in this embodiment can adopt a two-layer task scheduling model of module-task to reflect the task scheduling relationship in order to clearly and concisely reflect the task scheduling relationship through the task scheduling model and reduce the maintenance cost of developers. Specifically, when constructing the task scheduling model, multiple data processing tasks of the associated data processing business and the module annotation information of each data processing task can be obtained first; on this basis, the task dependency relationship between the multiple data processing tasks can be determined first, and a task node model can be constructed based on the task dependency relationship and the multiple data processing tasks, so as to realize that the scheduling relationship between the data processing tasks is first reflected through the task node model. On this basis, in order to make the task scheduling model more concise and easy to maintain, the data processing module can be constructed according to the module annotation information of each data processing task; wherein, the data processing module contains at least one data processing task; thereby completing the mapping of tasks to modules, thereby reducing the complexity of the dependency relationship between tasks and encapsulating them through modules; thereafter, the module node model can be constructed according to the subordinate relationship between the data processing module and each data processing task, as well as the task dependency relationship; on the basis of the data processing task, the dependency relationship between tasks is simplified by encapsulating the data processing module, and the original execution order of the tasks is not changed, so as to ensure the normal operation of the data processing business. Finally, in order to ensure that the task scheduling module is concise and matches the data processing business, the module node model can also be updated using the task node model, so that the task scheduling model of the related data processing business can be obtained according to the update result, so that the task scheduling model can be used to control the execution of tasks in an orderly manner, and the maintenance difficulty and cost can be improved.

[0140] The following combination Figure 4 , taking the application of the task scheduling model construction method provided in this specification in the scenario of statistically analyzing data in a database as an example, the task scheduling model construction method is further described. Figure 4 A process flow chart of a task scheduling model construction method provided by an embodiment of the present specification is shown, which specifically includes the following steps.

[0141] Step S402, obtaining multiple data processing tasks associated with the data processing business, and module labeling information of each data processing task.

[0142] Step S404: construct multiple task nodes for multiple data processing tasks, and construct a task node set based on the multiple task nodes.

[0143] Step S406, traverse the task nodes in the task node set to obtain dependency identification information corresponding to each task node.

[0144] Step S408, determining the task dependency relationship between the multiple data processing tasks according to the dependency identification information corresponding to each task node, and constructing a task node model based on the task dependency relationship and the task node set.

[0145] Step S410, constructing a data processing module according to the module annotation information of each data processing task; wherein the data processing module includes at least one data processing task.

[0146] Step S412, constructing a module node for the data processing module, and determining the subordinate relationship between the plurality of data processing tasks and the data processing module.

[0147] Step S414, constructing a directed topology graph based on the module nodes, subordinate relationships and task dependencies, and using the directed topology graph as an initial module node model.

[0148] Step S416, determining the module dependency between module nodes in the initial module node model according to the task dependency, and performing loop detection on the initial module node model according to the preset model optimization strategy and module dependency.

[0149] Step S418, when it is determined according to the detection result that there is a loop problem in the initial module node model, determine the loop modules in the initial module node model to form a loop module set.

[0150] Step S420, screening and splitting data processing tasks from the data processing tasks included in the loop modules in the loop module set.

[0151] Specifically, determine the target data processing task included in the target looping module in the looping module set, load the predecessor data processing task of the target data processing task to form a predecessor data processing task sequence; traverse the predecessor data processing task sequence, and detect whether there is a target predecessor data processing task in the predecessor data processing task sequence that belongs to the target looping module and has a path with the target data processing task according to the traversal result;

[0152] If so, determine the associated preceding data processing task corresponding to the target preceding data processing task, and use the target preceding data processing task and the associated preceding data processing task as split data processing tasks.

[0153] If not, when the target data processing task directly depends on the associated data processing task that does not belong to the target looping module, determine the associated data processing module that contains the associated data processing task; when the associated data processing module belongs to the looping module set and the number of data processing tasks contained in the associated data processing module is greater than the set number threshold, take the associated data processing task as a candidate split data processing task and add it to the candidate task set; when the detection of the data processing tasks contained in the looping module in the looping module set is completed, perform in-and-out degree comparison processing on the candidate split data processing tasks contained in the candidate task set, and screen the split data processing tasks in the candidate task set according to the comparison results.

[0154] Step S422, determine the split data processing module to which the split data processing task belongs, and remove the split data processing task from the split data processing module.

[0155] Step S424, construct an updated data processing module according to the module information of the split data processing module, determine the split data processing module and the updated data processing module according to the task dependency, and reconstruct the module dependency between the updated data processing module and the data processing module included in the initial module node model.

[0156] Step S426, updating the data processing module to the initial module node model based on the reconstructed module dependency to obtain the module node model.

[0157] Step S428, determining at least one initial data processing module pair according to the module node model.

[0158] Step S430, selecting an initial data processing module pair with the same original task label and a direct dependency relationship from at least one initial data processing module pair as a target data processing module pair, wherein the target data processing module pair consists of a main data processing module and an auxiliary data processing module.

[0159] Step S432, migrating the model attributes associated with the auxiliary data processing module to the main data processing module, and removing the auxiliary data processing module from the module node model, and obtaining the target module node model according to the removal result.

[0160] Step S434, detect the module dependencies between the data processing modules in the target module node model, determine the optimized data processing modules with indirect dependencies based on the detection results, delete the direct dependencies between the optimized data processing modules in the target module node model, and obtain the optimized module node model.

[0161] Step S436, traverse the data processing modules included in the optimization module node model, and determine the data processing tasks included in each data processing module according to the traversal results.

[0162] Step S438, according to the task node model and the data processing tasks contained in each data processing module, construct the task sub-topology structure diagram within the module, and based on the optimized module node model and the task sub-topology structure diagram within the module, generate a task scheduling model for the related data processing business; wherein the task scheduling model is stored in a preset format.

[0163] In summary, in order to clearly and concisely reflect the task scheduling relationship through the task scheduling model and reduce the maintenance cost of developers, a two-layer task scheduling model of module-task can be used to reflect the task scheduling relationship. Specifically, when constructing the task scheduling model, you can first obtain multiple data processing tasks of the associated data processing business and the module annotation information of each data processing task; on this basis, you can first determine the task dependency relationship between multiple data processing tasks, and construct a task node model based on the task dependency relationship and multiple data processing tasks, so as to first reflect the scheduling relationship between data processing tasks through the task node model. On this basis, in order to make the task scheduling model more concise and easy to maintain, the data processing module can be constructed according to the module annotation information of each data processing task; wherein, the data processing module contains at least one data processing task; thereby completing the mapping of tasks to modules, thereby reducing the complexity of the dependency relationship between tasks and encapsulating them through modules; thereafter, the module node model can be constructed according to the subordinate relationship between the data processing module and each data processing task, as well as the task dependency relationship; on the basis of the data processing task, the dependency relationship between tasks is simplified by encapsulating the data processing module, and the original execution order of the tasks is not changed, so as to ensure the normal operation of the data processing business. Finally, in order to ensure that the task scheduling module is concise and matches the data processing business, the module node model can also be updated using the task node model, so that the task scheduling model of the related data processing business can be obtained according to the update result, so that the task scheduling model can be used to control the execution of tasks in an orderly manner, and the maintenance difficulty and cost can be improved.

[0164] Corresponding to the above method embodiment, this specification also provides a task scheduling model construction device embodiment, Figure 5 FIG. 1 is a schematic diagram showing a structure of a task scheduling model building device provided by an embodiment of the present specification. Figure 5 As shown, the device is applied to a dispatching system, comprising:

[0165] The task acquisition module 502 is configured to acquire multiple data processing tasks associated with the data processing service and module annotation information of each data processing task;

[0166] A determining relationship module 504 is configured to determine the task dependency relationship between the plurality of data processing tasks, and construct a task node model according to the task dependency relationship and the plurality of data processing tasks;

[0167] A construction module 506 is configured to construct a data processing module according to the module annotation information of each data processing task; wherein the data processing module includes at least one data processing task;

[0168] A model building module 508 is configured to build a module node model according to the subordinate relationship between the data processing module and each data processing task, and the task dependency relationship;

[0169] The update model module 510 is configured to update the module node model using the task node model to obtain a task scheduling model associated with the data processing service.

[0170] In an optional embodiment, the task acquisition module 502 is further configured to:

[0171] Determine the storage folder information corresponding to each data processing task among the multiple data processing tasks, and use the storage folder information corresponding to each data processing task as module labeling information; or, extract task attribute information from each data processing task, and use the task attribute information corresponding to each data processing task as module labeling information.

[0172] In an optional embodiment, the determining relationship module 504 is further configured to:

[0173] Constructing multiple task nodes for the multiple data processing tasks, and constructing a task node set based on the multiple task nodes; traversing the task nodes in the task node set to obtain dependency identification information corresponding to each task node; determining the task dependency relationship between the multiple data processing tasks based on the dependency identification information corresponding to each task node; and constructing a task node model based on the task dependency relationship and the task node set.

[0174] In an optional embodiment, the determination relationship module 504 is further configured to: obtain business calculation logic text by parsing the data processing task corresponding to the task node; preprocess the business calculation logic text to obtain standard logic text; extract identification text features from the standard logic text according to preset recognition rules, and construct dependency identification information corresponding to the task node based on the identification text features.

[0175] In an optional embodiment, the model building module 508 is further configured to:

[0176] Construct module nodes for the data processing module, and determine the subordinate relationships between the multiple data processing tasks and the data processing module; construct a directed topological graph based on the module nodes, the subordinate relationships and the task dependencies, and use the directed topological graph as an initial module node model; optimize the initial module node model according to a preset model optimization strategy to obtain a module node model.

[0177] In an optional embodiment, the model building module 508 is further configured to:

[0178] Determine the module dependency relationship between module nodes in the initial module node model according to the task dependency relationship; perform loop detection on the initial module node model according to the preset model optimization strategy and the module dependency relationship; determine that loop modules constitute a loop module set in the initial module node model when a loop problem exists in the initial module node model according to the detection result; select and split data processing tasks from the data processing tasks included in the loop modules in the loop module set, and construct an update data processing module for the split data processing tasks; use the update data processing module to update the initial module node model to obtain a module node model.

[0179] In an optional embodiment, the model building module 508 is further configured to:

[0180] Determine the target data processing task included in the target looping module in the looping module set, load the predecessor data processing tasks of the target data processing task to form a predecessor data processing task sequence; traverse the predecessor data processing task sequence, and detect whether there is a target predecessor data processing task in the predecessor data processing task sequence that belongs to the target looping module and has a path with the target data processing task according to the traversal result; if so, determine the associated predecessor data processing task corresponding to the target predecessor data processing task, and use the target predecessor data processing task and the associated predecessor data processing task as split data processing tasks.

[0181] In an optional embodiment, when the judgment result of detecting whether there is a target preceding data processing task belonging to the target loop module and having a path with the target data processing task in the preceding data processing task sequence according to the traversal result is no, the model building module 508 is further configured as follows:

[0182] In the case where the target data processing task directly depends on an associated data processing task that does not belong to the target looping module, determine the associated data processing module that contains the associated data processing task; in the case where the associated data processing module belongs to the looping module set and the number of data processing tasks contained in the associated data processing module is greater than a set number threshold, take the associated data processing task as a candidate split data processing task and add it to the candidate task set; in the case where the detection of the data processing tasks contained in the looping modules in the looping module set is completed, perform in-and-out degree comparison processing on the candidate split data processing tasks contained in the candidate task set, and screen the split data processing tasks in the candidate task set according to the comparison results.

[0183] In an optional embodiment, the model building module 508 is further configured to:

[0184] Determine the split data processing module to which the split data processing task belongs, and remove the split data processing task from the split data processing module; construct an update data processing module according to the module information of the split data processing module; wherein, using the update data processing module to update the initial module node model to obtain a module node model includes: determining a reconstructed module dependency relationship between the split data processing module and the update data processing module, and between the update data processing module and the data processing module included in the initial module node model according to the task dependency relationship; and updating the update data processing module to the initial module node model based on the reconstructed module dependency relationship to obtain a module node model.

[0185] In an optional embodiment, the update model module 510 is further configured to:

[0186] Determine at least one initial data processing module pair according to the module node model; select an initial data processing module pair with the same original task label and a direct dependency relationship from the at least one initial data processing module pair as a target data processing module pair, wherein the target data processing module pair consists of a main data processing module and an auxiliary data processing module; migrate the model attributes associated with the auxiliary data processing module to the main data processing module, remove the auxiliary data processing module from the module node model, and obtain the target module node model according to the removal result; use the task node model to update the target module node model to obtain a task scheduling model associated with the data processing business.

[0187] In an optional embodiment, the update model module 510 is further configured to:

[0188] Detect the module dependency relationship between the data processing modules in the target module node model; determine the optimized data processing modules with indirect dependencies based on the detection results, delete the direct dependencies between the optimized data processing modules in the target module node model, and obtain the optimized module node model; use the task node model to update the optimized module node model to obtain a task scheduling model associated with the data processing business.

[0189] In an optional embodiment, the update model module 510 is further configured to:

[0190] Traverse the data processing modules included in the optimization module node model, and determine the data processing tasks included in each data processing module according to the traversal results; construct a task sub-topology structure diagram within the module according to the task node model and the data processing tasks included in each data processing module; based on the optimization module node model and the task sub-topology structure diagram within the module, generate a task scheduling model associated with the data processing business; wherein the task scheduling model is stored in a preset format.

[0191] The task scheduling model construction device provided in this embodiment can adopt a two-layer task scheduling model of module-task to reflect the task scheduling relationship in order to clearly and concisely reflect the task scheduling relationship through the task scheduling model and reduce the maintenance cost of developers. Specifically, when constructing the task scheduling model, multiple data processing tasks of the associated data processing business and the module annotation information of each data processing task can be obtained first; on this basis, the task dependency relationship between the multiple data processing tasks can be determined first, and a task node model can be constructed based on the task dependency relationship and the multiple data processing tasks, so as to realize that the scheduling relationship between the data processing tasks is first reflected through the task node model. On this basis, in order to make the task scheduling model more concise and easy to maintain, the data processing module can be constructed according to the module annotation information of each data processing task; wherein, the data processing module contains at least one data processing task; thereby completing the mapping of tasks to modules, thereby reducing the complexity of the dependency relationship between tasks and encapsulating them through modules; thereafter, the module node model can be constructed according to the subordinate relationship between the data processing module and each data processing task, as well as the task dependency relationship; on the basis of the data processing task, the dependency relationship between tasks is simplified by encapsulating the data processing module, and the original execution order of the tasks is not changed, so as to ensure the normal operation of the data processing business. Finally, in order to ensure that the task scheduling module is concise and matches the data processing business, the module node model can also be updated using the task node model, so that the task scheduling model of the related data processing business can be obtained according to the update result, so that the task scheduling model can be used to control the execution of tasks in an orderly manner, and the maintenance difficulty and cost can be improved.

[0192] The above is a schematic scheme of a task scheduling model construction device of this embodiment. It should be noted that the technical scheme of the task scheduling model construction device and the technical scheme of the task scheduling model construction method described above belong to the same concept, and the details not described in detail in the technical scheme of the task scheduling model construction device can be found in the description of the technical scheme of the task scheduling model construction method described above.

[0193] Figure 6 The block diagram of a computing device 600 according to an embodiment of the present specification is shown. The components of the computing device 600 include but are not limited to a memory 610 and a processor 620. The processor 620 is connected to the memory 610 via a bus 630, and the database 650 is used to store data.

[0194] The computing device 600 also includes an access device 640 that enables the computing device 600 to communicate via one or more networks 660. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 640 may include one or more of any type of network interface (e.g., a network interface card (NIC)) that is wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world-wide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, and a near field communication (NFC).

[0195] In one embodiment of the present specification, the above components of the computing device 600 and Figure 6 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 6 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.

[0196] The computing device 600 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 600 may also be a mobile or stationary server.

[0197] The processor 620 is used to execute the following computer executable instructions, which, when executed by the processor, implement the steps of the above-mentioned task scheduling model construction method.

[0198] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above-mentioned task scheduling model construction method belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be referred to the description of the technical scheme of the above-mentioned task scheduling model construction method.

[0199] An embodiment of the present specification also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the above-mentioned task scheduling model construction method.

[0200] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the above-mentioned task scheduling model construction method belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the above-mentioned task scheduling model construction method.

[0201] An embodiment of the present specification also provides a computer program product, including a computer program or instructions, which implement the steps of the above-mentioned task scheduling model construction method when executed by a processor.

[0202] The above is a schematic scheme of a computer program product of this embodiment. It should be noted that the technical scheme of the computer program product and the technical scheme of the above-mentioned task scheduling model construction method belong to the same concept, and the details not described in detail in the technical scheme of the computer program product can be referred to the description of the technical scheme of the above-mentioned task scheduling model construction method.

[0203] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0204] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0205] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.

[0206] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0207] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that technicians in the relevant technical field can understand and use this specification well.< / biz> < / biz> < / biz> < / biz> < / task> < / task>

Claims

1. A method for constructing a task scheduling model, characterized in that: Applied to dispatching systems, including: Acquire multiple data processing tasks associated with the data processing business, and module annotation information of each data processing task, wherein the module annotation information is determined by extracting task attribute information from each data processing task, and using the task attribute information corresponding to each data processing task as the module annotation information; Determining task dependencies between the multiple data processing tasks, and constructing a task node model based on the task dependencies and the multiple data processing tasks, wherein the task node model is constructed by taking the data processing tasks as nodes and the task dependencies as edges; Constructing a data processing module according to the module annotation information of each data processing task; wherein the data processing module includes at least one data processing task; Constructing a module node model according to the subordinate relationship between the data processing module and each data processing task, and the task dependency relationship, wherein the module node model is constructed by taking the data processing module as a node and the module dependency relationship as an edge, and the module dependency relationship is determined according to the subordinate relationship and the task dependency relationship; Determine at least one initial data processing module pair according to the module node model; select an initial data processing module pair with the same original task label and a direct dependency relationship from the at least one initial data processing module pair as a target data processing module pair, wherein the target data processing module pair consists of a main data processing module and an auxiliary data processing module; migrate the model attributes associated with the auxiliary data processing module to the main data processing module, remove the auxiliary data processing module from the module node model, and obtain the target module node model according to the removal result; use the task node model to update the target module node model to obtain a task scheduling model associated with the data processing business.

2. The task scheduling model construction method according to claim 1, characterized in that: The determination of the module labeling information of any one of the plurality of data processing tasks further includes: Determine storage folder information corresponding to each data processing task among the multiple data processing tasks, and use the storage folder information corresponding to each data processing task as module labeling information.

3. The task scheduling model construction method according to claim 1, characterized in that: The determining the task dependency relationship between the multiple data processing tasks and constructing a task node model according to the task dependency relationship and the multiple data processing tasks includes: Constructing a plurality of task nodes for the plurality of data processing tasks, and constructing a task node set according to the plurality of task nodes; Traversing the task nodes in the task node set to obtain dependency identification information corresponding to each task node; Determine the task dependency relationship between the multiple data processing tasks according to the dependency identification information corresponding to each task node; A task node model is constructed based on the task dependency relationship and the task node set.

4. The task scheduling model construction method according to claim 3, characterized in that: Determining the dependency identification information corresponding to any one of the task nodes in the task node set includes: By parsing the data processing tasks corresponding to the task nodes, the business calculation logic text is obtained; Preprocessing the business calculation logic text to obtain a standard logic text; The identification text features are extracted from the standard logic text according to the preset recognition rules, and the dependency identification information corresponding to the task node is constructed according to the identification text features.

5. The task scheduling model construction method according to claim 1, characterized in that: The module node model is constructed according to the subordinate relationship between the data processing module and each data processing task, and the task dependency relationship, including: Constructing a module node for the data processing module, and determining a subordinate relationship between the plurality of data processing tasks and the data processing module; Based on the module nodes, the subordinate relationships and the task dependencies, a directed topological graph is constructed, and the directed topological graph is used as an initial module node model; The initial module node model is optimized according to a preset model optimization strategy to obtain a module node model.

6. The method for constructing a task scheduling model according to claim 5, characterized in that: The step of optimizing the initial module node model according to a preset model optimization strategy to obtain a module node model includes: Determine the module dependency relationship between module nodes in the initial module node model according to the task dependency relationship; According to the preset model optimization strategy and the module dependency relationship, the initial module node model is subjected to loop detection; When it is determined according to the detection result that there is a loop problem in the initial module node model, determining the loop modules in the initial module node model to form a loop module set; Screening the split data processing tasks from the data processing tasks included in the looping modules in the looping module set, and constructing an update data processing module for the split data processing tasks; The initial module node model is updated by using the update data processing module to obtain a module node model.

7. The task scheduling model construction method according to claim 6, characterized in that: The step of screening and splitting the data processing tasks from the data processing tasks included in the looping modules in the looping module set includes: Determine a target data processing task included in a target loop module in the loop module set, and load a preceding data processing task of the target data processing task to form a preceding data processing task sequence; Traversing the preceding data processing task sequence, and detecting, according to the traversal result, whether there is a target preceding data processing task in the preceding data processing task sequence that belongs to the target loop module and has a path with the target data processing task; If so, determine the associated preceding data processing task corresponding to the target preceding data processing task, and use the target preceding data processing task and the associated preceding data processing task as split data processing tasks.

8. The method for constructing a task scheduling model according to claim 7, characterized in that: In the case where the result of the determination of whether there is a target preceding data processing task belonging to the target loop module and having a path with the target data processing task in the preceding data processing task sequence according to the traversal result is no, the method further includes: In the case where the target data processing task directly depends on an associated data processing task that does not belong to the target looping module, determining an associated data processing module that includes the associated data processing task; When the associated data processing module belongs to the loop module set and the number of data processing tasks included in the associated data processing module is greater than a set number threshold, the associated data processing task is taken as a candidate split data processing task and added to the candidate task set; When the detection of the data processing tasks included in the loop modules in the loop module set is completed, an in-degree comparison is performed on the candidate split data processing tasks included in the candidate task set, and the split data processing tasks are screened in the candidate task set according to the comparison results.

9. The method for constructing a task scheduling model according to any one of claims 6 to 8, characterized in that: The step of constructing an update data processing module for the split data processing task includes: Determine the split data processing module to which the split data processing task belongs, and remove the split data processing task from the split data processing module; Constructing and updating a data processing module according to the module information of the split data processing module; Wherein, the updating of the initial module node model by using the update data processing module to obtain the module node model includes: Determine, according to the task dependency, a reconstruction module dependency between the split data processing module and the update data processing module, and between the update data processing module and the data processing module included in the initial module node model; Based on the reconstructed module dependency, the update data processing module is updated to the initial module node model to obtain a module node model.

10. The task scheduling model construction method according to claim 1, characterized in that: The step of updating the target module node model by using the task node model to obtain a task scheduling model associated with the data processing service includes: Detecting module dependencies between data processing modules in the target module node model; Determine the optimized data processing modules with indirect dependencies according to the detection results, delete the direct dependencies between the optimized data processing modules in the target module node model, and obtain the optimized module node model; The task node model is used to update the optimization module node model to obtain a task scheduling model associated with the data processing business.

11. The method for constructing a task scheduling model according to claim 10, characterized in that: The step of updating the optimization module node model by using the task node model to obtain a task scheduling model associated with the data processing service includes: Traversing the data processing modules included in the optimization module node model, and determining the data processing tasks included in each data processing module according to the traversal results; According to the task node model and the data processing tasks included in each data processing module, a task sub-topology structure diagram within the module is constructed; Based on the optimization module node model and the task sub-topology diagram within the module, a task scheduling model associated with the data processing business is generated; wherein the task scheduling model is stored in a preset format.

12. A task scheduling model construction device, characterized in that: Applied to dispatching systems, including: An acquisition task module is configured to acquire multiple data processing tasks associated with the data processing business, and module annotation information of each data processing task, wherein the module annotation information is determined by extracting task attribute information from each data processing task, and using the task attribute information corresponding to each data processing task as the module annotation information; a determining relationship module configured to determine task dependencies between the plurality of data processing tasks, and construct a task node model according to the task dependencies and the plurality of data processing tasks, wherein the task node model is constructed by taking the data processing tasks as nodes and the task dependencies as edges; A construction module, configured to construct a data processing module according to the module annotation information of each data processing task; wherein the data processing module includes at least one data processing task; A model building module is configured to build a module node model according to the subordinate relationship between the data processing module and each data processing task, and the task dependency relationship, wherein the module node model is built by taking the data processing module as a node and the module dependency relationship as an edge, and the module dependency relationship is determined according to the subordinate relationship and the task dependency relationship; An update model module is configured to determine at least one initial data processing module pair according to the module node model; select an initial data processing module pair with the same original task label and a direct dependency relationship from the at least one initial data processing module pair as a target data processing module pair, wherein the target data processing module pair consists of a main data processing module and an auxiliary data processing module; migrate the model attributes associated with the auxiliary data processing module to the main data processing module, and remove the auxiliary data processing module from the module node model, and obtain a target module node model based on the removal result; use the task node model to update the target module node model to obtain a task scheduling model associated with the data processing business.

13. A computing device, characterized in that: include: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the method described in any one of claims 1 to 11 are implemented.

14. A computer-readable storage medium, characterized in that: It stores computer executable instructions, which, when executed by a processor, implement the steps of the method described in any one of claims 1 to 11.

15. A computer program product, characterized in that The method comprises a computer program or an instruction, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 11.