Task arrangement method and device, equipment, storage medium and product
Through the task orchestration method of node splitting and action orchestrating the orchestration task, the problem of low efficiency in business process development in the existing technology is solved, and more efficient automated development is achieved.
Patent Information
- Application Number
- CN202411930075.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-04-22
AI Technical Summary
When developing new business processes, existing technologies require manual redevelopment, resulting in low task development efficiency.
A task orchestration method is proposed. By responding to task orchestration requests, node splits the task to be orchestrated, and allocates it to work nodes for action orchestration, and generates task orchestration results.
It improves the efficiency of task development, reduces the need for manual redevelopment, and improves the automation level of business process development.
Smart Images

Figure CN119861955A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a task scheduling method, device, equipment, storage medium and product. Background Art
[0002] As enterprises continue to grow, each department and team often maintains different API interfaces and data storage systems. Whenever a new system or business process is developed, reconnecting these interfaces and systems is not only time-consuming and labor-intensive, but also costly, especially when faced with temporary or urgent task development needs. Therefore, how to improve the efficiency of task scheduling has become a technical problem that needs to be solved urgently. Summary of the invention
[0003] The main purpose of this application is to provide a task scheduling method, device, equipment, storage medium and product, aiming to solve the technical problem of low task development efficiency caused by manual redevelopment when developing new business processes.
[0004] To achieve the above objectives, the present application proposes a task scheduling method, which includes:
[0005] In response to a task scheduling request, performing node splitting on the task to be scheduled corresponding to the task scheduling request to obtain node tasks;
[0006] Allocate the node tasks to corresponding working nodes for action scheduling, and obtain node scheduling results;
[0007] Generate a task scheduling result of the task to be scheduled according to the node scheduling result.
[0008] Optionally, the step of performing node splitting on the task to be scheduled corresponding to the task scheduling request to obtain node tasks includes:
[0009] Determine the task to be scheduled corresponding to the task scheduling request;
[0010] Performing a validity check on the tasks to be scheduled, and obtaining target tasks to be scheduled that have passed the check;
[0011] The target task to be scheduled is split into nodes according to the node type to obtain node tasks.
[0012] Optionally, the step of performing a legality check on the task to be scheduled to obtain a target task to be scheduled that passes the check includes:
[0013] Detecting the legality of the format of each parameter in the task to be arranged, and obtaining the task to be arranged with a legal format;
[0014] Performing format conversion on the tasks to be arranged in a legal format to obtain the tasks to be arranged after format conversion;
[0015] The workflow legality of the tasks to be arranged after the format conversion is verified by the JSON workflow interpreter to obtain the target tasks to be arranged that pass the verification.
[0016] Optionally, the step of converting the format of the tasks to be arranged in a legal format to obtain the tasks to be arranged after the format conversion includes:
[0017] The tasks to be arranged in the legal format are converted into JSON format to obtain the tasks to be arranged after the format conversion.
[0018] Optionally, the step of splitting the target task to be scheduled into nodes according to node functions to obtain node tasks includes:
[0019] Get node type information;
[0020] The target task to be scheduled is split into node tasks corresponding to the node type according to the node type information.
[0021] Optionally, the step of allocating the node tasks to corresponding working nodes for action orchestration to obtain node orchestration results includes:
[0022] Get the current node resource information;
[0023] Determine the working node corresponding to the node task according to the current node resource information and the node type corresponding to the node task;
[0024] The node tasks are action orchestrated based on the working nodes to obtain a node orchestration result.
[0025] Optionally, the step of performing action orchestration on the node task based on the working node to obtain a node orchestration result includes:
[0026] Determine a target action corresponding to the node task based on the working node;
[0027] The target action is arranged according to the node task to obtain a node arrangement result.
[0028] Optionally, the step of arranging the target action according to the node task to obtain a node arrangement result includes:
[0029] Determine whether the target action exists in the action set;
[0030] If the target action exists in the action set, obtaining the call information of the target action;
[0031] The target action is called based on the calling information and the node task to obtain a node orchestration result.
[0032] Optionally, after the step of determining whether the target action exists in the action set, the method further includes:
[0033] If the target action does not exist in the action set, calling the language editor to dynamically write a script corresponding to the target action;
[0034] The script corresponding to the target action is stored in the action set.
[0035] Optionally, the step of generating the task scheduling result of the task to be scheduled according to the node scheduling result includes:
[0036] Determine the size of the action output result according to the node arrangement result;
[0037] Determine the delivery method of the node arrangement result based on the size of the output result of the action;
[0038] A task scheduling result of the task to be scheduled is generated according to the transfer mode and the node scheduling result.
[0039] Optionally, the step of generating the task scheduling result of the task to be scheduled according to the node scheduling result includes:
[0040] Determine the output parameter format of the node arrangement result;
[0041] When the output parameter format needs to be converted, the node arrangement result is converted into an output parameter format to obtain a node arrangement result in a target format;
[0042] The task orchestration result of the task to be orchestrated is generated based on the node orchestration result in the target format.
[0043] Optionally, after the step of allocating the node tasks to corresponding working nodes for action orchestration and obtaining the node orchestration result, the step further includes:
[0044] When the node orchestration result is an orchestration failure, obtaining a preset error execution strategy;
[0045] The preset error execution strategy is executed.
[0046] In addition, to achieve the above purpose, the present application also proposes a task scheduling device, which includes:
[0047] A node splitting module is used to respond to a task scheduling request and perform node splitting on the task to be scheduled corresponding to the task scheduling request to obtain a node task;
[0048] An action scheduling module is used to assign the node tasks to corresponding working nodes for action scheduling and obtain node scheduling results;
[0049] The scheduling result generating module is used to generate the task scheduling result of the task to be scheduled according to the node scheduling result.
[0050] Optionally, the node splitting module is further used to determine the task to be scheduled corresponding to the task scheduling request;
[0051] Performing a validity check on the tasks to be scheduled, and obtaining target tasks to be scheduled that have passed the check;
[0052] The target task to be scheduled is split into nodes according to the node type to obtain node tasks.
[0053] Optionally, the node splitting module is further used to detect the format legality of each parameter in the task to be arranged, and obtain the task to be arranged with a legal format;
[0054] Performing format conversion on the tasks to be arranged in a legal format to obtain the tasks to be arranged after format conversion;
[0055] The workflow legality of the tasks to be arranged after the format conversion is verified by the JSON workflow interpreter to obtain the target tasks to be arranged that pass the verification.
[0056] Optionally, the node splitting module is further used to convert the tasks to be arranged in a legal format into a JSON format to obtain the tasks to be arranged after the format conversion.
[0057] Optionally, the node splitting module is further used to obtain node type information;
[0058] The target task to be scheduled is split into node tasks corresponding to the node type according to the node type information.
[0059] Optionally, the action orchestration module is further used to obtain current node resource information;
[0060] Determine the working node corresponding to the node task according to the current node resource information and the node type corresponding to the node task;
[0061] The node tasks are action orchestrated based on the working nodes to obtain a node orchestration result.
[0062] Optionally, the action scheduling module is further used to determine the target action corresponding to the node task based on the working node;
[0063] The target action is arranged according to the node task to obtain a node arrangement result.
[0064] Optionally, the action arrangement module is further used to determine whether the target action exists in the action set;
[0065] If the target action exists in the action set, obtaining the call information of the target action;
[0066] The target action is called based on the calling information and the node task to obtain a node orchestration result.
[0067] Optionally, the action arrangement module is further configured to call a language editor to dynamically write a script corresponding to the target action if the target action does not exist in the action set;
[0068] The script corresponding to the target action is stored in the action set.
[0069] Optionally, the orchestration result generating module is further used to determine the size of the action output result according to the node orchestration result;
[0070] Determine the delivery method of the node arrangement result based on the size of the output result of the action;
[0071] A task scheduling result of the task to be scheduled is generated according to the transfer mode and the node scheduling result.
[0072] Optionally, the orchestration result generating module is further used to determine an output parameter format of the node orchestration result;
[0073] When the output parameter format needs to be converted, the node arrangement result is converted into an output parameter format to obtain a node arrangement result in a target format;
[0074] The task orchestration result of the task to be orchestrated is generated based on the node orchestration result in the target format.
[0075] Optionally, the action orchestration module is further configured to obtain a preset error execution strategy when the node orchestration result is an orchestration failure;
[0076] The preset error execution strategy is executed.
[0077] In addition, to achieve the above objectives, the present application also proposes a task scheduling device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the task scheduling method described above.
[0078] In addition, to achieve the above objectives, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the task scheduling method described above are implemented.
[0079] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the task scheduling method described above are implemented.
[0080] In response to a task scheduling request, the present application performs node splitting on the task to be scheduled corresponding to the task scheduling request to obtain node tasks; assigning the node tasks to corresponding working nodes for action scheduling to obtain node scheduling results; and generating task scheduling results for the task to be scheduled based on the node scheduling results. Since the present application splits the task to be scheduled into node tasks, assigns the node tasks to corresponding working nodes for action scheduling to obtain node scheduling results, and then generates task scheduling results for the task to be scheduled based on the node scheduling results. Compared with the existing method of developing new business processes that requires manual redevelopment, the above method of the present application can improve the efficiency of task development. BRIEF DESCRIPTION OF THE DRAWINGS
[0081] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0082] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0083] Figure 1 A flowchart of the first embodiment of the task arrangement method of this application is provided;
[0084] Figure 2 A schematic diagram of modules provided for the first embodiment of the task arrangement method of this application;
[0085] Figure 3 A flowchart of the second embodiment of the task arrangement method of this application is provided;
[0086] Figure 4 A flowchart of the third embodiment of the task arrangement method of this application is provided;
[0087] Figure 5 This is a schematic diagram of the module structure of the task scheduling device according to an embodiment of the present application;
[0088] Figure 6 Schematic diagram of the device structure of the hardware operating environment involved in the task scheduling method in the embodiment of the present application.
[0089] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0090] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0091] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0092] The main solution of the embodiment of the present application is: in response to a task scheduling request, the task to be scheduled corresponding to the task scheduling request is split into nodes to obtain node tasks; the node tasks are assigned to corresponding working nodes for action scheduling to obtain node scheduling results; and the task scheduling results of the task to be scheduled are generated according to the node scheduling results. Since the present application splits the task to be scheduled into node tasks, assigns the node tasks to corresponding working nodes for action scheduling to obtain node scheduling results, and then generates the task scheduling results of the task to be scheduled according to the node scheduling results. Compared with the existing method of developing new business processes, which requires manual redevelopment, the above method of the present application can improve the development efficiency of tasks.
[0093] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a task scheduling device, etc. The following takes the task scheduling device as an example to illustrate this embodiment and the following embodiments.
[0094] Based on this, the present application embodiment provides a task scheduling method, referring to Figure 1 , Figure 1 A flowchart of the first embodiment of the task scheduling method of this application is provided.
[0095] In this embodiment, the task scheduling method includes the following steps:
[0096] Step S10, in response to the task scheduling request, performing node splitting on the task to be scheduled corresponding to the task scheduling request to obtain node tasks;
[0097] It should be noted that the task scheduling request may be a workflow task scheduling command triggered by a user based on a visual interface provided by the task scheduling device. For example, a user may quickly build or adjust a business flow on the visual interface provided by the task scheduling device by dragging nodes, configuring parameters, and other operations to generate tasks to be scheduled. The node splitting of the task to be scheduled corresponding to the task scheduling request to obtain a node task may be splitting the task to be scheduled corresponding to the task scheduling request into a plurality of subtasks that can be executed in series to obtain a node task.
[0098] Step S20, assigning the node tasks to corresponding working nodes for action orchestration to obtain node orchestration results;
[0099] It should be noted that the working node can be a resource node used to complete the action orchestration corresponding to the node task. The working nodes include various types, such as ordinary nodes, FOR nodes, concurrent nodes, etc. The working nodes are connected in serial mode, and support branch processing through SWITCH logical nodes. Among them, the FOR node can select serial or parallel loop iteration objects, and can choose to aggregate the result set output; the concurrent node can be configured with multiple branches, and each branch can be configured with multiple sub-nodes. The branches are executed in parallel and isolated from each other. The isolation between the working nodes can use docker for environmental isolation to ensure the security of the nodes. The node task is assigned to the corresponding working node for action orchestration, and the node orchestration result obtained can be that the working node will execute the actions in the action set based on the assigned node task scheduling, and obtain the node orchestration result.
[0100] Furthermore, in order to improve the standardization of business development, after step S20, it also includes: when the node orchestration result is an orchestration failure, obtaining a preset error execution strategy; and executing the preset error execution strategy.
[0101] It should be noted that the preset error execution strategy may include predefined stop strategy, number of retries, and reporting of faults, etc., in the face of orchestration failure. For example, when the node orchestration result is orchestration failure, the preset error execution strategy executed is to stop the orchestration and prompt the user that the orchestration fails if the orchestration still fails after retrying once.
[0102] Step S30: generating a task scheduling result of the task to be scheduled according to the node scheduling result.
[0103] It should be noted that the task orchestration result of the task to be orchestrated generated according to the node orchestration result may be to summarize all node orchestration results corresponding to the node tasks after the task to be orchestrated is split, and to concatenate the node orchestration results in the order of execution of the node tasks to obtain the task orchestration result corresponding to the task to be orchestrated, and the task orchestration result may be the workflow corresponding to the task to be orchestrated.
[0104] Furthermore, in order to avoid performance bottlenecks caused by excessive data size and support large parameter transmission between nodes, the step S30 may include: determining the size of the action output result according to the node arrangement result;
[0105] Determine the delivery method of the node arrangement result based on the size of the output result of the action;
[0106] A task scheduling result of the task to be scheduled is generated according to the transfer mode and the node scheduling result.
[0107] It should be noted that the size of the action output result may include the output data size of each action in the node orchestration result and the output data size corresponding to the node task after the action is connected. The method of determining the transmission of the node orchestration result based on the size of the action output result may be to use an index method to transmit the output data of the node orchestration result when the size of the action output result exceeds a preset data transmission threshold. When the size of the action output result does not exceed the preset data transmission threshold, the output data of the node orchestration result is transmitted by value transmission. The preset data transmission threshold may be a data size threshold set in advance according to the performance of the task orchestration device, for example, it may be a value such as 200M or 100M.
[0108] In the specific implementation, the parameters in the task scheduling device are synchronously managed by the parameter cache service, and the parameter transfer is transmitted and stored in Parquet format. If the parameter does not exceed the preset data transfer threshold, such as 200MB, the parameter value is directly transferred. If the parameter size exceeds the preset data transfer threshold, it is transferred through the index, and each node can extract cached data from the parameter cache service on demand.
[0109] Further, in order to improve the stability of business operation, the step S30 may include: determining the output parameter format of the node orchestration result;
[0110] When the output parameter format needs to be converted, the node arrangement result is converted into an output parameter format to obtain a node arrangement result in a target format;
[0111] The task orchestration result of the task to be orchestrated is generated based on the node orchestration result in the target format.
[0112] It should be noted that the input and output parameter formats of various actions and node tasks in this embodiment may not be unified. Therefore, when connecting action choreography and node tasks, parameter format conversion or packaging is required.
[0113] In the specific implementation, please refer to Figure 2 , Figure 2 A module diagram provided for the first embodiment of the task scheduling method of this application, wherein the visual interface is used to provide an editable interface to the user; the JSON workflow interpreter is used to verify the workflow legitimacy of the task to be scheduled, the node scheduling engine is used to assign node tasks according to the status and resource information of each working node, the cache module is used for data caching, the working node is a distributed node for executing action scheduling, the log server is used to record the log data generated by each module in the task scheduling device, and the third-party service is used to provide and maintain the action set, and the third-party service includes multiple databases and data middleware for data synchronization and replication. Among them, the custom engine helps users search, manage and operate data according to specific needs by providing a series of tools and functions.
[0114] In the specific implementation, the user generates the task to be scheduled through the visual interface, and the task scheduling device detects the format validity of the parameters. After passing, the task to be scheduled is passed to the JSON workflow interpreter in JSON format, and the JSON workflow interpreter detects the workflow validity of the task to be scheduled again. After passing, the task to be scheduled is first split by node to obtain the node task, and the node task is passed to the scheduling engine. The scheduling engine will schedule and allocate according to the resource situation of each worker node by default. After the worker node receives the node task, it first performs the node input parameter conversion to determine whether it is necessary to obtain the complete node parameter data from the data cache service (i.e., the cache module) and whether it is necessary to perform format conversion packaging. Then, according to the node parameters, the target action in the action set is selected for serial or parallel execution. Each action execution obtains relevant parameters according to the configured API name, data conversion method, database ID or sub-workflow ID for calling. Each action will determine the size of the output result to decide whether to send it to the data cache service. If necessary, it will be sent to the data cache service for caching, and the index will be returned as the result. The action execution obtains relevant parameters according to the configured API name, data conversion method, database ID or sub-workflow ID, and calls it. If the execution fails, it will retry or return according to the error strategy of the action. Then the node output parameter conversion is executed, and the format conversion packaging is determined according to the action parameters. After the Worker node is executed, the output parameter conversion is performed and synchronized to the data cache service. The main process summarizes the task results produced by all workers, determines whether to perform data conversion packaging according to the node parameters, and sends it to the data cache service. Determine whether the node is the end node. If so, retrieve the result from the data cache service and save it. Among them, the input and output parameters can be packaged and converted through JQ expressions, and each node can contain one or more actions, and actions can be executed in parallel or serially. The node determines the next node through the nextStep parameter. If it is empty, it means it is the end node. The end node will trigger the solidification and saving of the workflow results.
[0115] In response to a task scheduling request, this embodiment performs node splitting on the task to be scheduled corresponding to the task scheduling request to obtain a node task; assigning the node task to the corresponding working node for action scheduling to obtain a node scheduling result; and generating a task scheduling result for the task to be scheduled based on the node scheduling result. Since this embodiment splits the task to be scheduled into node tasks, assigns the node tasks to the corresponding working nodes for action scheduling to obtain a node scheduling result, and then generates a task scheduling result for the task to be scheduled based on the node scheduling result. Compared with the existing method of developing new business processes, which requires manual redevelopment, the above method of this embodiment can improve the efficiency of task development.
[0116] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 3 , Figure 3 The flowchart provided for the second embodiment of the task arrangement method of the present application, the step S10 further includes the following steps:
[0117] Step S101: determining the task to be scheduled corresponding to the task scheduling request;
[0118] It should be noted that the task scheduling request may be a business development command triggered by a user through a visual interface of a task scheduling device, which includes the demand for task development, ie, the task to be scheduled.
[0119] Step S102: Performing a validity check on the task to be scheduled, and obtaining a target task to be scheduled that has passed the check;
[0120] It should be noted that the legitimacy check of the task to be scheduled may be to check the legitimacy of the parameters in the task to be scheduled and the legitimacy of the business process, and obtain the target task to be scheduled that passes the check. When the legitimacy check of the task to be scheduled fails, the reason and solution for the failure of the legitimacy check may be displayed to the user, prompting the user to make modifications.
[0121] Further, in order to improve the efficiency of task development, the step S102 may include: detecting the legality of the format of each parameter in the task to be arranged, and obtaining the task to be arranged with a legal format;
[0122] Performing format conversion on the tasks to be arranged in a legal format to obtain the tasks to be arranged after format conversion;
[0123] The workflow legality of the tasks to be arranged after the format conversion is verified by the JSON workflow interpreter to obtain the target tasks to be arranged that pass the verification.
[0124] It should be noted that the parameter format validity detection may include parameter format detection such as null pointer check, value range check, enumeration type validity check, etc. When the parameter validity detection fails, the user is prompted to modify. In order to support large parameter transmission between nodes, the parameter format validity detection in this embodiment also includes parameter size detection, specifically, detecting the parameter size of each parameter, when the parameter size exceeds the preset threshold, the parameter is transmitted and stored by indexing, and each working node can extract cache data on demand. This design ensures that when processing complex business processes, it can still run efficiently and avoid performance bottlenecks caused by excessive data scale. When the parameter size does not exceed the preset threshold, the parameter value is directly transmitted. The preset threshold can be determined according to the performance of the task scheduling device, for example: 200M, 300M, etc. The format conversion of the format-legal task to be scheduled to obtain the format-converted task to be scheduled can be to convert the format-legal task to be scheduled into JSON format to obtain the format-converted task to be scheduled. The workflow validity check may include data type verification, field existence verification, data association verification and other workflow validity verifications through the JSON workflow interpreter.
[0125] Step S103: split the target task to be scheduled into nodes according to the node type to obtain node tasks.
[0126] It should be noted that the node type may be the node type of each working node, which is related to the function of the working node. The node types in this embodiment include functional nodes such as ordinary nodes, FOR nodes, and concurrent nodes. The node splitting of the target task to be scheduled according to the node type to obtain the node task may be splitting the process in the target task to be scheduled according to the node type to obtain sub-processes of various types, i.e., node tasks.
[0127] This embodiment determines the task to be scheduled corresponding to the task scheduling request; performs a validity check on the task to be scheduled to obtain a target task to be scheduled that passes the check; and performs node splitting on the target task to be scheduled according to the node type to obtain a node task. This embodiment splits the target task to be scheduled according to the node type to obtain a node task, which can split complex business logic into simple node tasks for action scheduling, thereby improving business development efficiency.
[0128] Based on the above embodiments of the present application, in the third embodiment of the present application, the same or similar contents as those in the above embodiments can be referred to the above introduction, and will not be described in detail later. Figure 4 , Figure 4 The flowchart provided for the third embodiment of the task arrangement method of the present application, step S20, further includes the following steps:
[0129] Step S201: Obtain current node resource information;
[0130] It should be noted that this embodiment supports a distributed architecture, and the current node resource information may be the resource information and current status of multiple distributed nodes corresponding to the task scheduling device.
[0131] Step S202: determining a working node corresponding to the node task according to the current node resource information and the node type corresponding to the node task;
[0132] It should be noted that determining the working node corresponding to the node task based on the current node resource information and the node type corresponding to the node task can be selecting a working node that corresponds to the node type of the node task and is in an idle state based on the current node resource information, and allocating the node task to the corresponding working node for action orchestration.
[0133] Step S203: performing action orchestration on the node task based on the working node to obtain a node orchestration result.
[0134] It should be noted that the performing action orchestration on the node task based on the working node to obtain the node orchestration result may be that the working node calls the corresponding action according to the node task and executes the corresponding action to obtain the node orchestration result.
[0135] Further, in order to improve the efficiency of action arrangement, the step S203 may include: determining the target action corresponding to the node task based on the working node;
[0136] The target action is arranged according to the node task to obtain a node arrangement result.
[0137] It should be noted that the determining the target action corresponding to the node task based on the working node may be to analyze the node task using the working node, and then determine the action to be executed corresponding to the node task, and the target action may be a script to be executed, an API to be called, a sub-workflow, a data conversion method, etc. The arranging the target action according to the node task to obtain the node arrangement result may be to call the target action according to the workflow sequence corresponding to the node task to obtain the node arrangement result.
[0138] Furthermore, in order to achieve the reuse of target actions and improve the efficiency of action scheduling, the step of scheduling the target actions according to the node tasks to obtain the node scheduling results includes:
[0139] Determine whether the target action exists in the action set;
[0140] If the target action exists in the action set, obtaining the call information of the target action;
[0141] The target action is called based on the calling information and the node task to obtain a node orchestration result.
[0142] It should be noted that the action set maintains multiple actions and related information of the actions, including the action's API name, data conversion method, database ID, sub-workflow ID and other information. If the target action exists in the action set, the working node does not need to regenerate the code corresponding to the target action, and directly obtains the call information of the target action, which may be the API name, storage path, workflow ID, etc. Calling the target action based on the call information and the node task to obtain the node orchestration result can be based on the call information Calling the target action, and performing action orchestration according to the node task to obtain the node orchestration result. Among them, the action set can be deployed in a third-party service, and by directly accessing the third-party service, external services can be flexibly called in the process.
[0143] In order to avoid the situation where the target action corresponding to the node task does not exist in the action set, after the step of determining whether the target action exists in the action set, the method further includes:
[0144] If the target action does not exist in the action set, calling the language editor to dynamically write a script corresponding to the target action;
[0145] The script corresponding to the target action is stored in the action set.
[0146] It should be noted that the calling of the language editor to dynamically write the script corresponding to the target action can be to use the language editor to dynamically write a Python or JavaScript script to customize the construction action. In order to achieve action reuse, the script corresponding to the target action dynamically written by the language editor can also be stored in the action set for next use. In order to improve business development efficiency, before calling the language editor to dynamically write the script corresponding to the target action, a mature workflow with similar functions to the target action can also be obtained, and the mature workflow can be used as a sub-workflow, and further developed on the sub-workflow to obtain the script corresponding to the target action.
[0147] This embodiment obtains the current node resource information; determines the working node corresponding to the node task according to the current node resource information and the node type corresponding to the node task; performs action orchestration on the node task based on the working node to obtain a node orchestration result. This embodiment allocates the node task to the corresponding working node according to the current node resource information to perform action orchestration to obtain a node orchestration result, improves the stability of business operation by supporting a multi-node high-availability architecture, and can have dynamic horizontal expansion capabilities to improve development efficiency.
[0148] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the task scheduling method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0149] This application also provides a task scheduling device, please refer to Figure 5 , the task scheduling device comprises:
[0150] The node splitting module 10 is used to respond to the task scheduling request and perform node splitting on the task to be scheduled corresponding to the task scheduling request to obtain node tasks;
[0151] The action orchestration module 20 is used to assign the node tasks to the corresponding working nodes for action orchestration to obtain the node orchestration results;
[0152] The orchestration result generating module 30 is used to generate the task orchestration result of the task to be orchestrated according to the node orchestration result.
[0153] In response to a task scheduling request, this embodiment performs node splitting on the task to be scheduled corresponding to the task scheduling request to obtain a node task; assigning the node task to the corresponding working node for action scheduling to obtain a node scheduling result; and generating a task scheduling result for the task to be scheduled based on the node scheduling result. Since this embodiment splits the task to be scheduled into node tasks, assigns the node tasks to the corresponding working nodes for action scheduling to obtain a node scheduling result, and then generates a task scheduling result for the task to be scheduled based on the node scheduling result. Compared with the existing method of developing new business processes, which requires manual redevelopment, the above method of this embodiment can improve the efficiency of task development.
[0154] Based on the first embodiment of the task scheduling device of the present invention, a second embodiment of the task scheduling device of the present invention is proposed.
[0155] In this embodiment, the node splitting module 10 is further used to determine the task to be scheduled corresponding to the task scheduling request;
[0156] Performing a validity check on the tasks to be scheduled, and obtaining target tasks to be scheduled that have passed the check;
[0157] The target task to be scheduled is split into nodes according to the node type to obtain node tasks.
[0158] Furthermore, the node splitting module 10 is also used to detect the legality of the format of each parameter in the task to be arranged, and obtain the task to be arranged with a legal format;
[0159] Performing format conversion on the tasks to be arranged in a legal format to obtain the tasks to be arranged after format conversion;
[0160] The workflow legality of the tasks to be arranged after the format conversion is verified by the JSON workflow interpreter to obtain the target tasks to be arranged that pass the verification.
[0161] Furthermore, the node splitting module 10 is also used to convert the tasks to be arranged in a legal format into a JSON format to obtain the tasks to be arranged after the format conversion.
[0162] Furthermore, the node splitting module 10 is also used to obtain node type information;
[0163] The target task to be scheduled is split into node tasks corresponding to the node type according to the node type information.
[0164] Furthermore, the action arrangement module 20 is also used to obtain current node resource information;
[0165] Determine the working node corresponding to the node task according to the current node resource information and the node type corresponding to the node task;
[0166] The node tasks are action orchestrated based on the working nodes to obtain a node orchestration result.
[0167] Furthermore, the action scheduling module 20 is further used to determine the target action corresponding to the node task based on the working node;
[0168] The target action is arranged according to the node task to obtain a node arrangement result.
[0169] Furthermore, the action arrangement module 20 is also used to determine whether the target action exists in the action set;
[0170] If the target action exists in the action set, obtaining the call information of the target action;
[0171] The target action is called based on the calling information and the node task to obtain a node orchestration result.
[0172] Furthermore, the action arrangement module 20 is further configured to call a language editor to dynamically write a script corresponding to the target action if the target action does not exist in the action set;
[0173] The script corresponding to the target action is stored in the action set.
[0174] Furthermore, the orchestration result generating module 30 is further used to determine the size of the action output result according to the node orchestration result;
[0175] Determine the delivery method of the node arrangement result based on the size of the output result of the action;
[0176] A task scheduling result of the task to be scheduled is generated according to the transfer mode and the node scheduling result.
[0177] Furthermore, the arrangement result generating module 30 is also used to determine the output parameter format of the node arrangement result;
[0178] When the output parameter format needs to be converted, the node arrangement result is converted into an output parameter format to obtain a node arrangement result in a target format;
[0179] The task orchestration result of the task to be orchestrated is generated based on the node orchestration result in the target format.
[0180] Furthermore, the action orchestration module 20 is further configured to obtain a preset error execution strategy when the node orchestration result is an orchestration failure;
[0181] The preset error execution strategy is executed.
[0182] The task scheduling device provided by the present application adopts the task scheduling method in the above embodiment, which can solve the technical problem of low task development efficiency caused by the need for manual redevelopment when developing new business processes. Compared with the prior art, the beneficial effects of the task scheduling device provided by the present application are the same as the beneficial effects of the task scheduling method provided by the above embodiment, and other technical features in the task scheduling device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0183] The present application provides a task scheduling device, which includes: at least one processor; and a memory that is communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the task scheduling method in the above-mentioned embodiment 1.
[0184] Reference below Figure 6, which shows a schematic diagram of the structure of a task scheduling device suitable for implementing the embodiment of the present application. The task scheduling device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The task scheduling device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0185] like Figure 6 As shown, the task scheduling device may include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. Various programs and data required for the operation of the task scheduling device are also stored in the RAM 1004. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems may be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1009. The communication device 1009 may allow the task orchestration device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a task orchestration device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have instead.
[0186] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0187] The task scheduling device provided by the present application adopts the task scheduling method in the above embodiment, which can solve the technical problem of low task development efficiency caused by the need for manual redevelopment when developing new business processes. Compared with the prior art, the beneficial effects of the task scheduling device provided by the present application are the same as the beneficial effects of the task scheduling method provided by the above embodiment, and other technical features in the task scheduling device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0188] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0189] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0190] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, wherein the computer-readable program instructions are used to execute the task scheduling method in the above-mentioned embodiment.
[0191] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0192] The computer-readable storage medium may be included in the task scheduling device; or may exist independently without being installed in the task scheduling device.
[0193] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0194] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0195] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0196] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned task scheduling method, and can solve the technical problem of low task development efficiency caused by manual redevelopment when developing new business processes. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the task scheduling method provided by the above-mentioned embodiment, and will not be repeated here.
[0197] The present application also provides a computer program product, including a computer program, which implements the steps of the task scheduling method as described above when executed by a processor.
[0198] The computer program product provided by the present application can solve the technical problem of low task development efficiency caused by manual redevelopment when developing new business processes. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the task scheduling method provided by the above embodiment, which will not be described in detail here.
[0199] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
[0200] The present application discloses A1. A task scheduling method, the task scheduling method comprising the following steps: in response to a task scheduling request, performing node splitting on the task to be scheduled corresponding to the task scheduling request to obtain a node task;
[0201] The node tasks are assigned to corresponding working nodes for action orchestration to obtain node orchestration results; and task orchestration results of the tasks to be orchestrated are generated according to the node orchestration results.
[0202] A2. As described in A1, the task scheduling method, the step of performing node splitting on the task to be scheduled corresponding to the task scheduling request to obtain the node task, comprises:
[0203] Determine the task to be scheduled corresponding to the task scheduling request;
[0204] Performing a validity check on the tasks to be scheduled, and obtaining target tasks to be scheduled that have passed the check;
[0205] The target task to be scheduled is split into nodes according to the node type to obtain node tasks.
[0206] A3. The task scheduling method as described in A2, wherein the step of performing a legality check on the task to be scheduled to obtain a target task to be scheduled that has passed the check comprises:
[0207] Detect the format validity of each parameter in the task to be arranged to obtain a task to be arranged with a valid format; perform format conversion on the task to be arranged with a valid format to obtain a task to be arranged after format conversion; perform workflow validity verification on the task to be arranged after format conversion through a JSON workflow interpreter to obtain a target task to be arranged that passes the verification.
[0208] A4. The task scheduling method as described in A3, wherein the step of converting the format of the task to be scheduled in a legal format to obtain the task to be scheduled after the format conversion comprises:
[0209] The tasks to be arranged in the legal format are converted into JSON format to obtain the tasks to be arranged after the format conversion.
[0210] A5. The task scheduling method as described in A2, wherein the step of splitting the target task to be scheduled into nodes according to node functions to obtain node tasks comprises:
[0211] Get node type information;
[0212] The target task to be scheduled is split into node tasks corresponding to the node type according to the node type information.
[0213] A6. In the task scheduling method described in A1, the step of assigning the node tasks to corresponding working nodes for action scheduling to obtain node scheduling results comprises:
[0214] Get the current node resource information;
[0215] Determine the working node corresponding to the node task according to the current node resource information and the node type corresponding to the node task;
[0216] The node tasks are action orchestrated based on the working nodes to obtain a node orchestration result.
[0217] A7. In the task scheduling method described in A6, the step of performing action scheduling on the node task based on the working node to obtain the node scheduling result includes:
[0218] Determine a target action corresponding to the node task based on the working node;
[0219] The target action is arranged according to the node task to obtain a node arrangement result.
[0220] A8. The task scheduling method as described in A7, wherein the step of scheduling the target action according to the node task to obtain the node scheduling result comprises:
[0221] Determine whether the target action exists in the action set;
[0222] If the target action exists in the action set, obtaining the call information of the target action;
[0223] The target action is called based on the calling information and the node task to obtain a node orchestration result.
[0224] A9. The task scheduling method as described in A8, after the step of determining whether the target action exists in the action set, further includes:
[0225] If the target action does not exist in the action set, calling the language editor to dynamically write a script corresponding to the target action;
[0226] The script corresponding to the target action is stored in the action set.
[0227] A10. In the task scheduling method according to any one of A1-9, the step of generating the task scheduling result of the task to be scheduled according to the node scheduling result comprises:
[0228] Determine the size of the action output result according to the node arrangement result;
[0229] Determine the delivery method of the node arrangement result based on the size of the output result of the action;
[0230] A task scheduling result of the task to be scheduled is generated according to the transfer mode and the node scheduling result.
[0231] A11. In the task scheduling method according to any one of A1 to A9, the step of generating the task scheduling result of the task to be scheduled according to the node scheduling result comprises:
[0232] Determine the output parameter format of the node arrangement result;
[0233] When the output parameter format needs to be converted, the node arrangement result is converted into an output parameter format to obtain a node arrangement result in a target format;
[0234] The task orchestration result of the task to be orchestrated is generated based on the node orchestration result in the target format.
[0235] A12. The task scheduling method according to any one of A1 to A9, wherein after the step of assigning the node tasks to corresponding working nodes for action scheduling and obtaining the node scheduling results, further comprises:
[0236] When the node orchestration result is an orchestration failure, obtaining a preset error execution strategy;
[0237] The preset error execution strategy is executed.
[0238] The present application discloses B13. A task scheduling device, the task scheduling device comprising:
[0239] A node splitting module is used to respond to a task scheduling request and perform node splitting on the task to be scheduled corresponding to the task scheduling request to obtain a node task;
[0240] An action scheduling module is used to assign the node tasks to corresponding working nodes for action scheduling and obtain node scheduling results;
[0241] The scheduling result generating module is used to generate the task scheduling result of the task to be scheduled according to the node scheduling result.
[0242] B14. The task scheduling device as described in B13, wherein the node splitting module is further used to determine the task to be scheduled corresponding to the task scheduling request;
[0243] Performing a validity check on the tasks to be scheduled, and obtaining target tasks to be scheduled that have passed the check;
[0244] The target task to be scheduled is split into nodes according to the node type to obtain node tasks.
[0245] B15. The task scheduling device as described in B14, wherein the node splitting module is further used to detect the format legitimacy of each parameter in the task to be scheduled, and obtain a task to be scheduled in a legal format;
[0246] The format of the tasks to be arranged in a legal format is converted to obtain the tasks to be arranged after the format conversion; the workflow legality of the tasks to be arranged after the format conversion is verified by a JSON workflow interpreter to obtain the target tasks to be arranged that pass the verification.
[0247] B16. In the task scheduling device as described in B15, the node splitting module is further used to convert the tasks to be scheduled in a legal format into a JSON format to obtain the tasks to be scheduled after the format conversion.
[0248] B17. The task scheduling device as described in B14, wherein the node splitting module is further used to obtain node type information;
[0249] The target task to be scheduled is split into node tasks corresponding to the node type according to the node type information.
[0250] The present application discloses C18. a task scheduling device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the task scheduling method described in any one of A1 to A12.
[0251] The present application discloses D19. A storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the task scheduling method described in any one of A1 to A12 are implemented.
[0252] The present application discloses E20. A computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the task scheduling method described in any one of A1 to A12 are implemented.
Claims
1. A task scheduling method, characterized in that: The task scheduling method comprises the following steps: In response to a task scheduling request, performing node splitting on the task to be scheduled corresponding to the task scheduling request to obtain node tasks; Allocate the node tasks to corresponding working nodes for action scheduling, and obtain node scheduling results; Generate a task scheduling result of the task to be scheduled according to the node scheduling result.
2. The task scheduling method according to claim 1, characterized in that: The step of performing node splitting on the task to be scheduled corresponding to the task scheduling request to obtain node tasks includes: Determine the task to be scheduled corresponding to the task scheduling request; Performing a validity check on the tasks to be scheduled, and obtaining target tasks to be scheduled that have passed the check; The target task to be scheduled is split into nodes according to the node type to obtain node tasks.
3. The task scheduling method according to claim 2, characterized in that: The step of performing a legality check on the task to be scheduled to obtain a target task to be scheduled that passes the check includes: Detecting the legality of the format of each parameter in the task to be arranged, and obtaining the task to be arranged with a legal format; Performing format conversion on the tasks to be arranged in a legal format to obtain the tasks to be arranged after format conversion; The workflow legality of the tasks to be arranged after the format conversion is verified by the JSON workflow interpreter to obtain the target tasks to be arranged that pass the verification.
4. The task scheduling method according to claim 3, characterized in that: The step of converting the format of the tasks to be arranged in a legal format to obtain the tasks to be arranged after the format conversion includes: The tasks to be arranged in the legal format are converted into JSON format to obtain the tasks to be arranged after the format conversion.
5. The task scheduling method according to claim 2, characterized in that: The step of splitting the target task to be scheduled into nodes according to node functions to obtain node tasks includes: Get node type information; The target task to be scheduled is split into node tasks corresponding to the node type according to the node type information.
6. The task scheduling method according to claim 1, characterized in that: The step of allocating the node tasks to corresponding working nodes for action orchestration to obtain node orchestration results includes: Get the current node resource information; Determine the working node corresponding to the node task according to the current node resource information and the node type corresponding to the node task; The node tasks are action orchestrated based on the working nodes to obtain a node orchestration result.
7. A task scheduling device, characterized in that: The task scheduling device comprises: A node splitting module is used to respond to a task scheduling request and perform node splitting on the task to be scheduled corresponding to the task scheduling request to obtain a node task; An action scheduling module is used to assign the node tasks to corresponding working nodes for action scheduling and obtain node scheduling results; The scheduling result generating module is used to generate the task scheduling result of the task to be scheduled according to the node scheduling result.
8. A task scheduling device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the task scheduling method according to any one of claims 1 to 6.
9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the task scheduling method according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the task scheduling method according to any one of claims 1 to 6 are implemented.