Task scheduling method, device, computer equipment and storage medium

By receiving task reset instructions, establishing task association tables and obtaining task scripts, determining the tasks to be reset and reissuing and executing, the traditional task management platform's shortcomings in task scheduling accuracy and improving the accuracy and reliability of task scheduling.

CN112363814BActive Publication Date: 2025-05-02CHINA PING AN PROPERTY INSURANCE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011314173.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-20
Publication Date
2025-05-02
Estimated Expiration
2040-11-20

AI Technical Summary

Technical Problem

Traditional task management platforms have low accuracy when scheduling tasks, especially when tasks are modified or wrong, which can easily lead to errors or omissions in related tasks.

Method used

By receiving task reset instructions, establishing a task association table for recursive query, obtaining task scripts for parsing, determining the task to be reset, and reissuing and executing.

Benefits of technology

Improve the accuracy of task scheduling, ensuring that relevant tasks can be accurately identified and reissued when tasks are modified or errored, reducing errors and omissions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112363814B_ABST
    Figure CN112363814B_ABST
Patent Text Reader

Abstract

The embodiment of the present application belongs to the field of research and development management, and relates to a task scheduling method, including receiving a task reset instruction, wherein the task reset instruction includes a task to be processed and task reset information; recursively querying the task to be processed in a pre-established task association table to obtain a task association tree; obtaining the task script of each task in the task association tree; script parsing the obtained task script, and determining the task to be reset from the task association tree according to the task reset information; issuing and executing the task to be reset. The present application also provides a task scheduling device, a computer device and a storage medium. In addition, the present application also relates to blockchain technology, and the task association table can be stored in the blockchain. The present application improves the accuracy of task scheduling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of R&D management technology, and in particular to a task scheduling method, device, computer equipment and storage medium. Background Art

[0002] Production activities can be divided into tasks. With the development of computer technology, production activities are increasingly using computers for task control. For example, in big data projects, business intelligence projects, data mining projects, and financial settlement projects, a task management platform can be built according to actual scenarios. The task management platform controls the relationship and schedules the execution of tasks, including the deployment and handover of tasks, deployment and launch, scheduled execution, and re-execution.

[0003] However, the control and scheduling of traditional task management platforms are limited to a single task. When a task is modified or an error occurs, all downstream tasks associated with this task need to be reset, that is, re-issued. When there are many modified or erroneous tasks, a large number of tasks will be issued, which is prone to errors or omissions in related tasks, resulting in low accuracy in task scheduling. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a task scheduling method, apparatus, computer equipment and storage medium to solve the problem of low task scheduling accuracy.

[0005] In order to solve the above technical problems, the present application embodiment provides a task scheduling method, which adopts the following technical solution:

[0006] Receiving a task reset instruction, wherein the task reset instruction includes a task to be processed and task reset information;

[0007] Recursively query the pending tasks in a pre-established task association table to obtain a task association tree;

[0008] Obtaining the task script of each task in the task association tree;

[0009] Parsing the acquired task script, and determining the task to be reset from the task association tree according to the task reset information;

[0010] Send and execute the task to be reset.

[0011] Furthermore, before the step of recursively querying the to-be-processed tasks in the pre-established task association table to obtain the task association tree, the method further includes:

[0012] Obtain the task script deployed in the data management platform;

[0013] Extracting task-related information from the acquired task script;

[0014] Identifying a first task and a second task in the task association information, wherein the first task is an upstream task of the second task;

[0015] A task association table is obtained according to the determined first task and second task.

[0016] Furthermore, the step of parsing the acquired task script and determining the task to be reset from the task association tree according to the task reset information includes:

[0017] Taking the root node in the task association tree as the initial node, obtaining the associated task pair of the initial node;

[0018] For each associated task pair, semantic recognition is performed on the task script of the task in the associated task pair to determine the data acquisition statement in the task script;

[0019] Determine whether the downstream task in the associated task pair is a task to be reset according to the data retrieval statement and the task reset information;

[0020] When the downstream task is a task to be reset, the downstream task is used as an initial node to continue searching for the task to be reset until the associated task pairs in the task association tree are searched and the task to be reset in the task association tree is obtained.

[0021] Furthermore, for each associated task pair, the step of performing semantic recognition on the task script of the task in the associated task pair to determine the data acquisition statement in the task script includes:

[0022] For each associated task pair, extract the task scripts of the downstream tasks in the associated task pair;

[0023] Segmenting the task script;

[0024] Perform semantic recognition on the task script after word segmentation according to a preset semantic library to determine the key fields for data acquisition from the task script;

[0025] The data acquisition statement in the task script is determined according to the determined data acquisition key field.

[0026] Furthermore, after the step of parsing the acquired task script and determining the task to be reset from the task association tree according to the task reset information, the method further includes:

[0027] Sending the task association tree and the task to be reset to a preset terminal logged in with a task administrator account;

[0028] Receiving a task adjustment instruction returned by the preset terminal according to the task association tree and the task to be reset;

[0029] Modify the task to be reset according to the task adjustment instruction.

[0030] Further, the step of issuing and executing the task to be reset includes:

[0031] Performing a breadth traversal on each task to be reset in the task association tree, and adding each task to be reset to an execution queue in a traversal order;

[0032] The tasks to be reset are issued and executed according to the order in which the tasks in the execution queue are arranged.

[0033] Furthermore, the step of issuing and executing the tasks to be reset according to the task arrangement order in the execution queue includes:

[0034] For each task to be reset in the execution queue, when the triggering condition of the task to be reset is met, an execution check is performed on the upstream task of the task to be reset, wherein the execution check includes a data volume check and a data warning check;

[0035] When the upstream task passes the execution verification, the task to be reset is issued and executed.

[0036] In order to solve the above technical problems, the embodiment of the present application further provides a task scheduling device, which adopts the following technical solution:

[0037] An instruction receiving module, used for receiving a task reset instruction, wherein the task reset instruction includes a task to be processed and task reset information;

[0038] A task query module, used for recursively querying the to-be-processed tasks in a pre-established task association table to obtain a task association tree;

[0039] A script acquisition module, used to acquire the task script of each task in the task association tree;

[0040] A script parsing module, used to parse the acquired task script and determine the task to be reset from the task association tree according to the task reset information;

[0041] The task issuing module is used to issue and execute the task to be reset.

[0042] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:

[0043] Receiving a task reset instruction, wherein the task reset instruction includes a task to be processed and task reset information;

[0044] Recursively query the pending tasks in a pre-established task association table to obtain a task association tree;

[0045] Obtaining the task script of each task in the task association tree;

[0046] Parsing the acquired task script, and determining the task to be reset from the task association tree according to the task reset information;

[0047] Send and execute the task to be reset.

[0048] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:

[0049] Receiving a task reset instruction, wherein the task reset instruction includes a task to be processed and task reset information;

[0050] Recursively query the pending tasks in a pre-established task association table to obtain a task association tree;

[0051] Obtaining the task script of each task in the task association tree;

[0052] Parsing the acquired task script, and determining the task to be reset from the task association tree according to the task reset information;

[0053] Send and execute the task to be reset.

[0054] Compared with the prior art, the embodiments of the present application mainly have the following beneficial effects: after receiving a task reset instruction, the pending tasks that need to be reset and the corresponding task reset information are obtained from the task reset instruction; a pre-established task association table is obtained, and a recursive query is performed on the pending tasks in the task association table, and tasks associated with the pending tasks can be preliminarily queried to obtain a task association tree; then the task scripts of each task in the task association tree are obtained, and the task scripts are used to execute tasks, and the task scripts are parsed. The affected tasks can be accurately determined based on the task reset information, and the determined tasks are treated as tasks to be reset and reissued, so as to automatically realize task scheduling and improve the accuracy of task scheduling. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0056] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;

[0057] Figure 2 is a flow chart of an embodiment of a task scheduling method according to the present application;

[0058] Figure 3 is a structural diagram of an embodiment of a task scheduling device according to the present application;

[0059] Figure 4 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION

[0060] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.

[0061] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0062] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.

[0063] like Figure 1As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0064] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0065] Terminal devices 101, 102, 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 (Moving Picture Experts Group Audio Layer IV) players, laptop computers, desktop computers, etc.

[0066] The server 105 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal devices 101 , 102 , and 103 .

[0067] It should be noted that the task scheduling method provided in the embodiment of the present application is generally executed by a server, and accordingly, the task scheduling device is generally set in the server.

[0068] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.

[0069] Continue to refer Figure 2 , shows a flow chart of an embodiment of a task scheduling method according to the present application. The task scheduling method comprises the following steps:

[0070] Step S201, receiving a task reset instruction, wherein the task reset instruction includes a task to be processed and task reset information.

[0071] In this embodiment, the task scheduling method is executed on the electronic device (eg Figure 1The server shown in the figure) can communicate with the terminal through a wired connection or a wireless connection. It should be noted that the above wireless connection method may include but is not limited to 3G / 4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultrawideband) connection, and other wireless connection methods currently known or to be developed in the future.

[0072] Specifically, a task management platform is deployed on the server, and the task management platform is configured with a platform management page, and platform users can control tasks on the platform management page. When a task is modified or erroneous, the platform user can input the modified or erroneous task, i.e., the pending task, and input the modified or erroneous information in the task, i.e., the task reset information. The terminal generates a task reset instruction based on the pending task and the task reset information, and sends it to the server. The task management platform can also automatically detect tasks, and automatically generate a task reset instruction when it detects that a task is modified or erroneous.

[0073] Step S202: recursively query the tasks to be processed in the pre-established task association table to obtain a task association tree.

[0074] Specifically, a pre-established task association table is stored in the server, and the task association table records association information between tasks. The server performs a recursive query on the pending tasks in the task association table based on a recursive algorithm.

[0075] Specifically, the server queries the downstream tasks associated with the task to be processed, and then queries the tasks associated with the downstream tasks with the downstream tasks as the main body, until the queried tasks have no downstream tasks. All the queried tasks form a task association tree.

[0076] The server can send the task association tree to the platform management page for display. The task association tree displays the associations between tasks in the form of a tree structure. The pending task in the task reset instruction is the root node of the task association tree.

[0077] Step S203, obtaining the task script of each task in the task association tree.

[0078] Specifically, a task corresponds to a task script, and the execution of the task is achieved by executing the task script corresponding to the task. The server obtains the task name of each task in the task association tree, searches for the task script according to the task name in the task script library, and obtains the task script of each task in the task association tree. Among them, the task script library stores the task scripts of each task in the task management platform.

[0079] Step S204, parsing the acquired task script, and determining the task to be reset from the task association tree according to the task reset information.

[0080] The task to be reset may be a task that needs to be re-issued and executed.

[0081] Specifically, when two tasks are related to each other, the modification or error of the upstream task does not necessarily affect the downstream task. For example, if the calculation rule of a field in the upstream task needs to be modified, but the downstream task does not use this field for calculation, then the downstream task is not really affected. Therefore, it is necessary to determine the tasks that are actually affected by the pending task from the task association tree.

[0082] The execution of tasks is achieved by executing task scripts. Any associations between tasks are recorded in the scripts. Therefore, the task scripts can be parsed to determine whether downstream tasks are affected by the reset of upstream tasks, thereby determining the tasks that are actually affected by this task reset in the task association tree.

[0083] For example, if Task A fails and Task A and tasks associated with Task A need to be reissued, it is found that Task B and Task C are associated with Task A, and Task D is associated with both Task B and Task C. Then the task association tree includes Task A, Task B, Task C, and Task D.

[0084] Assume that an error occurs in field A1 in task A. Through script analysis, it is determined that task B is not associated with field A1, so task B is not substantially affected. Field C1 in task C has a calculation association relationship with field A1, and field D1 in task D has a calculation association relationship with field C1. Then both task C and task D are substantially affected by the task reset information. Task B can be removed from the task association tree, and tasks A, C, and D will be retained in the task association tree as tasks to be reset.

[0085] Step S205: issuing and executing the task to be reset.

[0086] Specifically, after determining the tasks to be reset in the task association tree, each task to be reset is added to an execution queue, and each task script in the task queue is executed, so as to achieve re-issuance and re-execution of the tasks.

[0087] In one embodiment, the server can manage multiple task execution nodes through the task management platform, and each task execution node can execute different types of tasks. When a task to be reset is issued, the task execution node that can execute the task to be reset is queried, and the load information of each task execution node is obtained. The task execution node with the lowest load is determined based on the load information, and the task execution node with the lowest load is instructed to execute the task to be reset, so as to balance the task execution nodes and avoid running errors caused by excessive load on a task execution node. The load information can be the memory utilization of the task execution node; then, the task execution node with the lowest memory utilization is the task execution node with the lowest load.

[0088] In this embodiment, after receiving the task reset instruction, the pending tasks that need to be reset and the corresponding task reset information are obtained from the task reset instruction; a pre-established task association table is obtained, and a recursive query is performed on the pending tasks in the task association table, and tasks associated with the pending tasks can be preliminarily queried to obtain a task association tree; then the task scripts of each task in the task association tree are obtained, and the task scripts are used to execute tasks. The task scripts are parsed, and the affected tasks can be accurately determined based on the task reset information, and the determined tasks are treated as tasks to be reset and reissued, thereby automatically realizing task scheduling and improving the accuracy of task scheduling.

[0089] Furthermore, before the above step S202, it may also include: obtaining a task script deployed in the data management platform; extracting task association information from the obtained task script; identifying the first task and the second task in the task association information, wherein the first task is an upstream task of the second task; and obtaining a task association table based on the determined first task and second task.

[0090] Specifically, during the development and deployment phase of a task, a developer writes a task script, and the task script contains task association information, which records the dependencies between tasks. Among them, the task association information can be written by the developer. For example, if the task association information of task B records that task B is associated with task A, then task B depends on task A, task A is the upstream task of task B, and task B is the downstream task of task A. After the server obtains the task association information, it determines task A as the first task and task B as the second task. It can be understood that for a certain task, the task can depend on one task or multiple tasks; the task can be dependent on one task or multiple tasks. By reading the task association information of all task scripts, the task association table can be automatically obtained.

[0091] The task association table can also be stored in a tree structure. It can be understood that the task association tree is a substructure obtained from the task association table.

[0092] In this embodiment, by extracting task association information from the task script, the association and dependency relationship between tasks can be obtained, thereby accurately and quickly establishing a task association table.

[0093] Furthermore, the above step S204 may include: taking the root node in the task association tree as the initial node, obtaining the associated task pair of the initial node; for each associated task pair, performing semantic recognition on the task script of the task in the associated task pair to determine the data retrieval statement in the task script; determining whether the downstream task in the associated task pair is the task to be reset based on the data retrieval statement and the task reset information; when the downstream task is the task to be reset, continuing to search for the task to be reset with the downstream task as the initial node until the associated task pairs in the task association tree are searched, and the task to be reset in the task association tree is obtained.

[0094] Specifically, the server starts from the root node of the task association tree and searches for the tasks that are actually affected in the task association tree. Two tasks that are related to each other form an associated task pair. The root node is used as the initial node, and the associated task pair of the initial node is obtained. When there are multiple associated task pairs at the initial node, the associated task pairs are processed one by one.

[0095] The server obtains the task script of the task in the associated task pair. There is a data acquisition statement in the task script, and the data acquisition statement has a preset expression form. Based on the expression form of the code in the script, it is possible to find which codes express the data acquisition semantics, thereby determining the data acquisition statement.

[0096] The task reset information can indicate which fields in the pending task are erroneous or modified. By combining the task reset information and the data retrieval statement, it can be determined whether the downstream task is actually affected by the task reset information.

[0097] When a downstream task is affected by task reset information, the downstream task is marked as a task to be reset. The downstream task is used as a new initial node to continue searching for tasks to be reset until all associated task pairs in the task association tree are checked, and then the tasks to be reset in the task association tree can be obtained.

[0098] After getting the new initial node, you can find the task to be reset based on the task reset information, the affected fields in the initial node, and the data access statement of the new downstream task. For example, when calculating field B1 in task B, field A1 in task A to be processed is used. According to the task reset information, field A1 is wrong, so it can be known that field B1 in task B needs to be recalculated, and task B is affected by the task reset information. Task B has a downstream task C. When searching for the task to be reset with task B as the initial node, you can determine whether task C is the task to be reset based on the task reset information, field B1, and the data access statement of task C.

[0099] In this embodiment, semantic recognition is performed on the task script to determine the data retrieval statements in the task script. The data retrieval statements can determine the data association between different tasks. Therefore, the associated task pairs in the task association tree are checked one by one, and the tasks to be reset in the task association tree can be accurately found.

[0100] Furthermore, the above-mentioned step of performing semantic recognition on the task script of the task in the associated task pair for each associated task pair to determine the data retrieval statement in the task script may include: for each associated task pair, extracting the task script of the downstream task in the associated task pair; segmenting the task script; performing semantic recognition on the segmented task script according to a preset semantic library to determine the data retrieval key field from the task script; and determining the data retrieval statement in the task script according to the determined data retrieval key field.

[0101] Specifically, for each associated task pair, the task script of the downstream task in the associated task pair is obtained. The task script is segmented to obtain a preset semantic library, which defines the meaning of key fields that may appear in the script.

[0102] The fields obtained after word segmentation are queried in the semantic library to determine the key fields related to data acquisition. After the key fields are identified, the data acquisition statements can be determined according to the code structure in the script.

[0103] For example, the data retrieval statement is select A1 from form_A where A1>1, where from is the key field for data retrieval, where is the end field, and select is the reference field. When the three fields appear in the same statement, it indicates that the statement is a data retrieval statement.

[0104] In this embodiment, semantic recognition is performed on the task script after word segmentation, so that the key fields for obtaining data in the task script can be determined, and the data obtaining statements can be accurately found from the task script.

[0105] Furthermore, after the above step S204, it may also include: sending the task association tree and the task to be reset to a preset terminal logged in with a task administrator account; receiving a task adjustment instruction returned by the preset terminal according to the task association tree and the task to be reset; and modifying the task to be reset according to the task adjustment instruction.

[0106] Specifically, the server can automatically search for tasks to be reset from the task association tree, or send the task association tree and tasks to be reset to a preset terminal logged in by the task administrator account, so that the task administrator can view the task association tree and tasks to be reset on the preset terminal. The task administrator can adjust the tasks to be reset through the preset terminal, such as increasing or decreasing the tasks to be reset according to the actual situation, without having to rely entirely on the tasks to be reset screened by the server.

[0107] After the task administrator adjusts the task to be reset, the preset terminal triggers the task adjustment instruction and sends it to the server. After receiving the task reset instruction, the server adjusts or modifies the task to be reset according to the task reset instruction.

[0108] The task administrator may also not adjust the task to be reset, and after sending a confirmation instruction through a preset terminal, instruct the server to send and execute the task to be reset.

[0109] In this embodiment, the task association tree and the tasks to be reset are sent to a preset terminal logged in by the task administrator account, and the tasks to be reset can be manually adjusted, thereby improving the flexibility of task scheduling.

[0110] Furthermore, the above step S205 may include: performing a breadth traversal on each task to be reset in the task association tree, and adding each task to be reset to the execution queue in the traversal order; and issuing and executing each task to be reset in the order in which the tasks are arranged in the execution queue.

[0111] Specifically, the tasks to be reset exist in the task association tree. The server can perform a breadth traversal on each task to be reset in the task association tree, add the task script of each task to be reset to the execution queue in the traversal order, and issue and execute each task script in the order of task arrangement of each task to be reset in the execution queue.

[0112] In the breadth traversal, the earlier the task to be reset is traversed, the higher the degree of dependency of other tasks to be reset, that is, the more tasks to be reset are dependent on. The task to be reset that is traversed first can be executed first, so that its downstream tasks can be executed based on the task to be reset, ensuring the orderly execution of the tasks to be reset.

[0113] In this embodiment, the task association tree is breadth-wise traversed, and the tasks to be reset are added to the execution queue in the traversal order. The order of task arrangement in the execution queue is consistent with the association relationship between the tasks, thereby ensuring the orderly execution of the tasks to be reset.

[0114] Furthermore, the above-mentioned step of issuing and executing each task to be reset according to the order of task arrangement in the execution queue may include: for each task to be reset in the execution queue, when the triggering condition of the task to be reset is met, performing an execution check on the upstream task of the task to be reset, wherein the execution check includes a data volume check and a data warning check; when the upstream task passes the execution check, issuing and executing the task to be reset.

[0115] Specifically, for each task to be reset in the execution queue, when the trigger condition of the task to be reset is reached, the upstream task of the task to be reset is first executed and verified. The execution condition of the task to be reset can be that the upstream task of the task to be reset is completed, or the task execution time in the task script is reached.

[0116] In one embodiment, a directed acyclic graph may be generated according to the association relationship between the tasks to be reset, and the execution of the tasks to be reset may be scheduled and controlled through the directed acyclic graph.

[0117] In order to ensure the accuracy of task execution, the upstream task of the task to be reset can be executed and verified. Execution verification includes data volume verification and data warning verification. When the task is correct and the dimensions of each field in the data table corresponding to the task are well constrained, the data volume of the data table corresponding to the task can be determined, and the data volume of the data table of the upstream task can be detected. If the data volume of the upstream task data table is within the preset data volume range, the data volume verification passes. The task management platform can also provide a data warning function, which can call the data warning interface to warn the data in the upstream task data table and verify whether the data value in the upstream task data table is within the preset range. When the upstream task passes the data volume verification and data warning verification at the same time, the task to be reset is issued and executed.

[0118] In this embodiment, by performing data volume verification and data warning verification on the upstream task of the task to be reset, it can be determined whether the upstream task is executed correctly, thereby ensuring the correct execution of the task to be reset.

[0119] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0120] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0121] Further references Figure 3 , as a response to the above Figure 2 The present application provides an embodiment of a task scheduling device, and the embodiment of the device is similar to Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0122] like Figure 3 As shown, the task scheduling device 300 described in this embodiment includes: an instruction receiving module 301, a task query module 302, a script acquisition module 303, a script parsing module 304 and a task issuing module 305, wherein:

[0123] The instruction receiving module 301 is used to receive a task reset instruction, which includes a task to be processed and task reset information.

[0124] The task query module 302 is used to perform a recursive query on the tasks to be processed in the pre-established task association table to obtain a task association tree.

[0125] The script acquisition module 303 is used to acquire the task script of each task in the task association tree.

[0126] The script parsing module 304 is used to parse the acquired task script and determine the task to be reset from the task association tree according to the task reset information.

[0127] The task issuing module 305 is used to issue and execute the task to be reset.

[0128] In this embodiment, after receiving the task reset instruction, the pending tasks that need to be reset and the corresponding task reset information are obtained from the task reset instruction; a pre-established task association table is obtained, and a recursive query is performed on the pending tasks in the task association table, and tasks associated with the pending tasks can be preliminarily queried to obtain a task association tree; then the task scripts of each task in the task association tree are obtained, and the task scripts are used to execute tasks. The task scripts are parsed, and the affected tasks can be accurately determined based on the task reset information, and the determined tasks are treated as tasks to be reset and reissued, thereby automatically realizing task scheduling and improving the accuracy of task scheduling.

[0129] In some optional implementations of this embodiment, the task scheduling device 300 further includes: an acquisition module, an information acquisition module, a task identification module, and an association table determination module, wherein:

[0130] The acquisition module is used to obtain the task scripts deployed in the data management platform.

[0131] The information acquisition module is used to extract task-related information from the acquired task script.

[0132] The task identification module is used to identify a first task and a second task in the task association information, wherein the first task is an upstream task of the second task.

[0133] The association table determination module is used to obtain a task association table according to the determined first task and second task.

[0134] In this embodiment, by extracting task association information from the task script, the association and dependency relationship between tasks can be obtained, thereby accurately and quickly establishing a task association table.

[0135] In some optional implementations of this embodiment, the script parsing module 304 may include: a task pair acquisition submodule, a semantic recognition submodule, a task determination submodule, and a task search submodule, wherein:

[0136] The task pair acquisition submodule is used to take the root node in the task association tree as the initial node and acquire the associated task pair of the initial node.

[0137] The semantic recognition submodule is used to perform semantic recognition on the task script of the task in each associated task pair to determine the data acquisition statement in the task script.

[0138] The task determination submodule is used to determine whether the downstream task in the associated task pair is a task to be reset according to the data acquisition statement and the task reset information.

[0139] The task search submodule is used to, when the downstream task is a task to be reset, continue to search for the task to be reset with the downstream task as the initial node until the associated task pairs in the task association tree are searched and the task to be reset in the task association tree is obtained.

[0140] In this embodiment, semantic recognition is performed on the task script to determine the data retrieval statements in the task script. The data retrieval statements can determine the data association between different tasks. Therefore, the associated task pairs in the task association tree are checked one by one, and the tasks to be reset in the task association tree can be accurately found.

[0141] In some optional implementations of this embodiment, the semantic recognition submodule may include: a script extraction unit, a script word segmentation unit, a semantic recognition unit, and a sentence determination unit, wherein:

[0142] The script extraction unit is used to extract the task script of the downstream task in each associated task pair.

[0143] The script segmentation unit is used to segment the task script.

[0144] The semantic recognition unit is used to perform semantic recognition on the task script after word segmentation according to a preset semantic library to determine the key fields for data acquisition from the task script.

[0145] The statement determination unit is used to determine the data acquisition statement in the task script according to the determined key data acquisition field.

[0146] In this embodiment, semantic recognition is performed on the task script after word segmentation, so that the key fields for obtaining data in the task script can be determined, and the data obtaining statements can be accurately found from the task script.

[0147] In some optional implementations of this embodiment, the task scheduling device 300 further includes: a sending module, an instruction receiving module and a task modification module, wherein:

[0148] The sending module is used to send the task association tree and the task to be reset to the preset terminal logged in with the task administrator account.

[0149] The instruction receiving module is used to receive the task adjustment instruction returned by the preset terminal according to the task association tree and the task to be reset.

[0150] The task modification module is used to modify the task to be reset according to the task adjustment instruction.

[0151] In this embodiment, the task association tree and the tasks to be reset are sent to a preset terminal logged in by the task administrator account, and the tasks to be reset can be manually adjusted, thereby improving the flexibility of task scheduling.

[0152] In some optional implementations of this embodiment, the task issuing module 305 may include: a task traversal submodule and a task execution submodule, wherein:

[0153] The task traversal submodule is used to perform a breadth traversal on each task to be reset in the task association tree, and add each task to be reset to the execution queue in the traversal order.

[0154] The task execution submodule is used to issue and execute each task to be reset according to the order in which the tasks are arranged in the execution queue.

[0155] In this embodiment, the task association tree is breadth-wise traversed, and the tasks to be reset are added to the execution queue in the traversal order. The order of task arrangement in the execution queue is consistent with the association relationship between the tasks, thereby ensuring the orderly execution of the tasks to be reset.

[0156] In some optional implementations of this embodiment, the task execution submodule may include: a task verification unit and a task issuing unit, wherein:

[0157] The task verification unit is used to perform execution verification on the upstream task of each task to be reset in the execution queue when the triggering condition of the task to be reset is met, wherein the execution verification includes data volume verification and data warning verification.

[0158] The task sending unit is used to send and execute the task to be reset when the upstream task passes the execution verification.

[0159] In this embodiment, by performing data volume verification and data warning verification on the upstream task of the task to be reset, it can be determined whether the upstream task is executed correctly, thereby ensuring the correct execution of the task to be reset.

[0160] To solve the above technical problems, the present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.

[0161] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 4 with components 41-43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.

[0162] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.

[0163] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk equipped on the computer device 4, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions of the task scheduling method, etc. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.

[0164] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run computer-readable instructions stored in the memory 41 or process data, such as computer-readable instructions for running the task scheduling method.

[0165] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.

[0166] The computer device provided in this embodiment can execute the steps of the above-mentioned task scheduling method. The steps of the task scheduling method here can be the steps of the task scheduling method in each of the above-mentioned embodiments.

[0167] In this embodiment, after receiving the task reset instruction, the pending tasks that need to be reset and the corresponding task reset information are obtained from the task reset instruction; a pre-established task association table is obtained, and a recursive query is performed on the pending tasks in the task association table, and tasks associated with the pending tasks can be preliminarily queried to obtain a task association tree; then the task scripts of each task in the task association tree are obtained, and the task scripts are used to execute tasks. The task scripts are parsed, and the affected tasks can be accurately determined based on the task reset information, and the determined tasks are treated as tasks to be reset and reissued, thereby automatically realizing task scheduling and improving the accuracy of task scheduling.

[0168] The present application also provides another implementation, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the task scheduling method as described above.

[0169] In this embodiment, after receiving the task reset instruction, the pending tasks that need to be reset and the corresponding task reset information are obtained from the task reset instruction; a pre-established task association table is obtained, and a recursive query is performed on the pending tasks in the task association table, and tasks associated with the pending tasks can be preliminarily queried to obtain a task association tree; then the task scripts of each task in the task association tree are obtained, and the task scripts are used to execute tasks. The task scripts are parsed, and the affected tasks can be accurately determined based on the task reset information, and the determined tasks are treated as tasks to be reset and reissued, thereby automatically realizing task scheduling and improving the accuracy of task scheduling.

[0170] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0171] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.

Claims

1. A task scheduling method, characterized in that: The steps include: Receiving a task reset instruction, wherein the task reset instruction includes a task to be processed and task reset information; Recursively query the pending tasks in a pre-established task association table to obtain a task association tree; Obtaining the task script of each task in the task association tree; Parsing the acquired task script, and determining the task to be reset from the task association tree according to the task reset information; Issue and execute the task to be reset; The task reset information is used to indicate an error field or a modified field in the task to be processed, and the step of parsing the acquired task script and determining the task to be reset from the task association tree according to the task reset information includes: Taking the root node in the task association tree as the initial node, obtaining the associated task pair of the initial node; For each associated task pair, semantic recognition is performed on the task script of the task in the associated task pair to determine the data acquisition statement in the task script; Determine whether the downstream task in the associated task pair is a task to be reset according to the data retrieval statement and the task reset information; When the downstream task is a task to be reset, the downstream task is used as an initial node to continue searching for the task to be reset until the associated task pairs in the task association tree are searched and the task to be reset in the task association tree is obtained.

2. The task scheduling method according to claim 1, characterized in that: Before the step of recursively querying the to-be-processed tasks in the pre-established task association table to obtain the task association tree, the method further includes: Obtain the task script deployed in the data management platform; Extracting task-related information from the acquired task script; Identifying a first task and a second task in the task association information, wherein the first task is an upstream task of the second task; A task association table is obtained according to the determined first task and second task.

3. The task scheduling method according to claim 1, characterized in that: The step of performing semantic recognition on the task script of the task in the associated task pair for each associated task pair to determine the data fetching statement in the task script comprises: For each associated task pair, extract the task scripts of the downstream tasks in the associated task pair; Segmenting the task script; Perform semantic recognition on the task script after word segmentation according to a preset semantic library to determine the key fields for data acquisition from the task script; The data acquisition statement in the task script is determined according to the determined data acquisition key field.

4. The task scheduling method according to claim 1, characterized in that: After the step of parsing the acquired task script and determining the task to be reset from the task association tree according to the task reset information, the method further includes: Sending the task association tree and the task to be reset to a preset terminal logged in with a task administrator account; Receiving a task adjustment instruction returned by the preset terminal according to the task association tree and the task to be reset; Modify the task to be reset according to the task adjustment instruction.

5. The task scheduling method according to claim 1, characterized in that: The step of issuing and executing the task to be reset includes: Performing a breadth traversal on each task to be reset in the task association tree, and adding each task to be reset to an execution queue in a traversal order; The tasks to be reset are issued and executed according to the order in which the tasks in the execution queue are arranged.

6. The task scheduling method according to claim 5, characterized in that: The step of issuing and executing the tasks to be reset according to the order in which the tasks are arranged in the execution queue comprises: For each task to be reset in the execution queue, when the triggering condition of the task to be reset is met, an execution check is performed on the upstream task of the task to be reset, wherein the execution check includes a data volume check and a data warning check; When the upstream task passes the execution verification, the task to be reset is issued and executed.

7. A task scheduling device, characterized in that: The task scheduling device is used to implement the task scheduling method according to any one of claims 1 to 6, and the task scheduling device includes: An instruction receiving module, used for receiving a task reset instruction, wherein the task reset instruction includes a task to be processed and task reset information; A task query module, used for recursively querying the to-be-processed tasks in a pre-established task association table to obtain a task association tree; A script acquisition module, used to acquire the task script of each task in the task association tree; A script parsing module, used to parse the acquired task script and determine the task to be reset from the task association tree according to the task reset information; The task issuing module is used to issue and execute the task to be reset.

8. A computer device, comprising a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the task scheduling method according to any one of claims 1 to 6 when executing the computer-readable instructions.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the task scheduling method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Visualization method, device and system for dependence relation of global task nodes

    CN106293928A

  • Task scheduling management method, device and equipment and storage medium

    CN111708628A