Artificial intelligence-based task flow precise scheduling method and related device

By constructing a task link graph and a dependency graph, monitoring the status of task nodes, and calculating scheduling priorities, the problem of unconsidered dependencies in task flow scheduling is solved, and precise and adaptive scheduling of task flows is achieved.

CN115033365BActive Publication Date: 2026-02-17PING AN TECH (SHENZHEN) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210692590.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-17
Publication Date
2026-02-17
Estimated Expiration
2042-06-17

AI Technical Summary

Technical Problem

Existing technologies fail to effectively consider the dependencies between different task flows in task flow scheduling, resulting in low scheduling accuracy and an inability to achieve adaptive scheduling.

Method used

Construct a task link graph, draw a dependency graph, monitor the status of task nodes, calculate scheduling priorities based on status information, dependency graph, and cycle type, and schedule task flows according to priority order.

Benefits of technology

It achieves precise scheduling of task flow, improves the accuracy and adaptability of task flow scheduling, and ensures that the dependencies and status information between task nodes are fully considered.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115033365B_ABST
    Figure CN115033365B_ABST
Patent Text Reader

Abstract

The application provides an artificial intelligence-based task flow accurate scheduling method and device, electronic equipment and storage medium. The artificial intelligence-based task flow accurate scheduling method comprises the following steps: constructing a task link graph of each preset task flow, the preset task flow comprising a plurality of task nodes, the task link graph comprising a preset ID, a cycle type of the preset task flow and an upstream and downstream relationship of the task nodes; judging a dependency relationship between any task nodes in different task link graphs to draw a dependency graph, the dependency relationship comprising a dependent task node and a dependent cycle number; obtaining state information of each task node, the state information comprising a running queue and a running cycle number, the running queue comprising output results of the task nodes in each running cycle; calculating a scheduling priority of each task link graph based on the state information, the dependency graph, the cycle type and a preset priority; and scheduling the preset task flow corresponding to the task link graph according to the scheduling priority to obtain a scheduling result. The application can realize accurate scheduling of the task flow.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of artificial intelligence, and in particular to a task flow precision scheduling method and device based on artificial intelligence, an electronic device and a storage medium. BACKGROUND

[0002] With the rapid development of the Internet, e-commerce, finance and other industries, a large number of task flows are often needed to analyze and process a large amount of data to support business decision-making. At the same time, many task flows are waiting to be executed at the same time. In order to enable each work task to be optimally solved and to realize intelligent execution of work tasks, scheduling work tasks is an important task.

[0003] At present, the priority of different task flows is usually calculated according to the waiting time and cycle type of the task flow, and automatic scheduling of multiple task flows is realized according to the size of the priority. However, this method ignores the dependency relationship between different task flows and cannot realize adaptive scheduling of multiple task flows according to the requirements of the application scenario, so the precision of task flow scheduling is not high. SUMMARY

[0004] In view of the above, it is necessary to propose a task flow precision scheduling method based on artificial intelligence and related equipment to solve the technical problem of how to improve the precision of task flow scheduling, wherein the related equipment includes a task flow precision scheduling device based on artificial intelligence, an electronic device and a storage medium.

[0005] The present application provides a task flow precision scheduling method based on artificial intelligence, which comprises:

[0006] Constructing a task link graph of each preset task flow, the preset task flow comprising a plurality of task nodes, the task link graph comprising a preset ID, a cycle type and an upstream and downstream relationship of a task node of the preset task;

[0007] Judging the dependency relationship between any two task nodes in different task link graphs to draw a dependency graph, the dependency relationship comprising a dependent task node and a dependent cycle number;

[0008] Monitoring the execution state of all task nodes to obtain state information of each task node, the state information of the task node comprising a running queue and a running cycle number, the running queue comprising an output result of the task node under different running cycles;

[0009] Calculating the scheduling priority of each task link graph based on the state information, the dependency graph, the cycle type and a preset priority;

[0010] Scheduling the preset task flow corresponding to the task link graph in descending order of the scheduling priority to obtain a scheduling result.

[0011] In some embodiments, the method further comprises:

[0012] obtaining input information of a target node in a target task link graph as a target input, the target task link graph being any one of the task link graphs, the target node being any one of the task nodes in the target task link graph;

[0013] judging whether the target node has an external dependency based on the target input and the target task link graph, the external dependency being an output result of a task node other than the target task link graph included in the target input;

[0014] if the target node has no external dependency, the target node has no dependency relationship, and if the target node has an external dependency, querying a dependency relationship of the target node in all task nodes of each task link graph other than the target task link graph based on the target input, the dependency relationship including a dependent task node and a dependent period number;

[0015] when the dependency relationship of the target node is obtained, drawing a directed edge from the dependent task node to the target node and taking the dependent period number as an edge weight of the directed edge to obtain an initial dependency graph;

[0016] updating the initial dependency graph by traversing all task nodes in the target task link graph;

[0017] continuously updating the initial dependency graph by traversing all task link graphs, and stopping the update of the initial dependency graph to obtain a dependency graph when all task nodes of all task link graphs are traversed.

[0018] In some embodiments, the execution state of the task node includes three states of not started, in progress and completed, and before the method further comprises:

[0019] triggering a timer of the task node when the execution state of the task node changes to in progress;

[0020] obtaining a duration for which the execution state of the task node is in progress according to the timer;

[0021] comparing the duration with a preset time period to obtain a comparison result, wherein if the duration is greater than the preset time period, it is indicated that the task node executes the task overtime, and the comparison result is an abnormal node, and if the duration is not greater than the preset time period, the comparison result is a normal node;

[0022] if the comparison result is the abnormal node, determining an alarm strategy according to a preset priority of the task link graph in which the task node is located, and executing the alarm strategy to obtain an alarm result.

[0023] In some embodiments, the scheduling priority of each task link graph is calculated based on the state information, the dependency graph, the period type and a preset priority, comprising:

[0024] a time interval between a current time and a calling time of the task link graph is calculated as a waiting time of each task link graph;

[0025] an initial priority of each task link graph is calculated based on the period type and the waiting time, and the initial priority satisfies a relationship:

[0026]

[0027] wherein, r i is the preset priority of the task link graph i, Max(r) is a maximum value of the preset priority, D i is the waiting time of the task link graph i, and the unit of the waiting time is second; Z i is a period time obtained according to the period type of the task link graph i, and the unit of the period time is second; R i is the initial priority of the task link graph i;

[0028] the initial priority is adjusted based on the state information and the dependency graph to obtain the scheduling priority of each task link graph.

[0029] In some embodiments, the initial priority is adjusted based on the state information and the dependency graph to obtain the scheduling priority of each task link graph, comprising:

[0030] an arbitrary task link graph is selected as a task link graph to be adjusted;

[0031] whether all task nodes of the task link graph to be adjusted exist a dependency relationship is judged based on the dependency graph to obtain a judgment result;

[0032] if all task nodes of the task link graph to be adjusted do not exist a dependency relationship, the judgment result is that the task link graph to be adjusted does not need to be adjusted, and the initial priority of the task link graph to be adjusted is taken as the scheduling priority;

[0033] if there is a dependency relationship in at least one task node in the to-be-adjusted task link graph, the determination result is that adjustment is needed, dependency relationship sets of the to-be-adjusted task link graph are stored by storing dependency relationships of all task nodes in the to-be-adjusted task link graph, and each dependency relationship includes a dependent task node and a dependent period number;

[0034] adjust an initial priority of the to-be-adjusted task link graph based on the state information, the dependency relationship sets, and a preset adjustment function to obtain a scheduling priority;

[0035] all task link graphs are traversed to obtain a scheduling priority of each task link graph.

[0036] In some embodiments, the preset adjustment function satisfies a relationship formula:

[0037]

[0038] wherein N represents a number of dependency relationships in the dependency relationship sets of the to-be-adjusted task link graph, b j is a dependent period number in the dependency relationship j, Num j is a running period number in the state information of the dependent task node in the dependency relationship j; R i is an initial priority of the to-be-adjusted task link graph, R' i is a scheduling priority of the to-be-adjusted task link graph, wherein F(X) is a self-defined function, and the self-defined function satisfies a relationship formula:

[0039] In some embodiments, scheduling the preset task flow corresponding to the task link graph in the order from large to small according to the scheduling priority to obtain a scheduling result includes:

[0040] the preset task flow corresponding to the task link graph is executed in the order from large to small according to the scheduling priority, and the task link graph and the preset task flow correspond to each other in a one-to-one manner;

[0041] if all task nodes in the task link graph do not have a dependency relationship, a preset task flow of the task link graph is directly executed to obtain a scheduling result;

[0042] if at least one task node in the task link graph has a dependency relationship, state information of a dependent task node in the dependency relationship is obtained, a dependent period number in the dependency relationship is obtained, an output result with a number of the dependent period number is extracted from a running queue in the state information of the dependent task node in the order from back to front according to an acquisition time, the output result is used as input information of the task node, and a preset task flow of the task link graph is executed to obtain a scheduling result;

[0043] All preset task flows are executed in the calling order to obtain a scheduling result.

[0044] The embodiment of the present application also provides a task flow accurate scheduling device based on artificial intelligence, which comprises:

[0045] A construction unit is configured to construct a task link graph of each preset task flow, wherein the preset task flow comprises a plurality of task nodes, and the task link graph comprises a preset ID, a period type of the preset task, and an upstream and downstream relationship of the task nodes.

[0046] A drawing unit is configured to judge a dependency relationship between any two task nodes in different task link graphs to draw a dependency graph, wherein the dependency relationship comprises a dependent task node and a dependent period number.

[0047] A monitoring unit is configured to monitor an execution state of all task nodes to obtain state information of each task node, wherein the state information of the task nodes comprises a running queue and a running period number, and the running queue comprises output results of the task nodes under different running periods.

[0048] A calculation unit is configured to calculate a scheduling priority of each task link graph based on the state information, the dependency graph, the period type and a preset priority.

[0049] A scheduling unit is configured to schedule the preset task flow corresponding to the task link graph in a descending order of the scheduling priority to obtain a scheduling result.

[0050] The embodiment of the present application also provides an electronic device, which comprises:

[0051] A memory is configured to store at least one instruction.

[0052] A processor is configured to execute the instruction stored in the memory to implement the task flow accurate scheduling method based on artificial intelligence.

[0053] The embodiment of the present application also provides a computer readable storage medium, wherein the computer readable storage medium stores at least one instruction, and the at least one instruction is executed by a processor in an electronic device to implement the task flow accurate scheduling method based on artificial intelligence.

[0054] To sum up, the present application can display preset task flows in the form of task link graphs, construct a dependency graph according to dependency information of task nodes in different task link graphs, further monitor state information of each task node, calculate a scheduling priority of each preset task flow based on state information, a dependency graph, a period type of a preset task flow and waiting time and other factors, and realize accurate scheduling of all preset task flows. BRIEF DESCRIPTION OF DRAWINGS

[0055] Figure 1 is a flow chart of a preferred embodiment of the task flow precision scheduling method based on artificial intelligence involved in the present application.

[0056] Figure 2 is a structural schematic diagram of a task link graph involved in the present application.

[0057] Figure 3 is a structural schematic diagram of a dependency graph involved in the present application.

[0058] Figure 4 is a functional module diagram of a preferred embodiment of the task flow precision scheduling device based on artificial intelligence involved in the present application.

[0059] Figure 5 is a structural schematic diagram of an electronic device of a preferred embodiment of the task flow precision scheduling method based on artificial intelligence involved in the present application. DETAILED DESCRIPTION

[0060] In order to more clearly understand the purpose, features and advantages of the present application, the present application will be described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict. In the following description, a large number of specific details are set forth in order to facilitate a full understanding of the present application, and the described embodiments are only some of the embodiments of the present application, but not all the embodiments.

[0061] In addition, the terms "first", "second" are only for the purpose of description, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of "a plurality of" is two or more, unless otherwise specifically limited.

[0062] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs. The terms used in the specification of the present application are only for the purpose of describing the specific embodiments, and are not intended to limit the present application. The term "and / or" used herein includes any and all combinations of one or more related listed items.

[0063] This application provides a precise task flow scheduling method based on artificial intelligence, which can be applied to one or more electronic devices. An electronic device is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions. Its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.

[0064] Electronic devices can be any electronic product that allows human-computer interaction with a customer, such as personal computers, tablets, smartphones, personal digital assistants (PDAs), game consoles, interactive network television (IPTV), smart wearable devices, etc.

[0065] Electronic devices may also include network devices and / or client devices. The network devices include, but are not limited to, a single network server, a server group consisting of multiple network servers, or a cloud based on cloud computing consisting of a large number of hosts or network servers.

[0066] The networks in which electronic devices are located include, but are not limited to, the Internet, wide area networks, metropolitan area networks, local area networks, and virtual private networks (VPNs).

[0067] like Figure 1 The diagram shown is a flowchart of a preferred embodiment of the AI-based precise task flow scheduling method of this application. Depending on different requirements, the order of the steps in this flowchart can be changed, and some steps can be omitted.

[0068] S10, construct a task link diagram for each preset task flow. The preset task flow includes multiple task nodes, and the task link diagram includes the preset ID, cycle type, and upstream and downstream relationships of the task nodes.

[0069] In an optional embodiment, one or more preset task flows are set for a business function of a business system, each preset task flow corresponding to a preset ID, which is a unique identifier of the preset task flow; the preset task flow refers to an operation flow formed by connecting multiple task nodes together in order to realize a specific business function, the task flow can reflect the upstream and downstream relationship of multiple task nodes, only when the upstream task node ends, the downstream task node can be started, the preset task flow corresponds to the business function one by one, for example, for the business function of user registration, the preset task flow of user registration can be "input registration name → input password → confirm password → confirm registration", the user performs the corresponding task node in the preset task flow of user registration according to the order, and the business function of user registration can be realized, wherein, input registration name, input password, confirm password and confirm registration are task nodes. It should be noted that the same task node can be included in different preset task flows.

[0070] In this optional embodiment, the preset task flow is closely related to the specific business function, and the accuracy of the preset task flow directly affects the normal operation of the business system, so in the task flow scheduling and daily maintenance, different permission categories need to be allocated to different preset task flows in the business system for different users to prevent the preset task flow from being tampered with to affect the operation of the business system, the permission categories include viewing, modifying, calling, etc. It should be noted that after the user with the permission to modify modifies the preset task flow and tests it, the modified preset task flow is uploaded to a specified directory of the distributed file management system, which stores all preset task flows and log information generated during the modification process.

[0071] In this optional embodiment, in order to enable the user to intuitively view or modify the preset task flow, and to facilitate subsequent analysis and processing of the preset task flow, a task link diagram of each preset task flow is further constructed, the task link diagram includes the preset ID, the cycle type and the upstream and downstream relationship of the task nodes of the preset task, the cycle type reflects the time required to complete the preset task once, the cycle type includes hours, days, weeks, months, etc., the task link diagram corresponds to the preset task flow one by one, taking a task flow with a cycle type of days containing 6 task nodes as an example, a structural diagram of the task link diagram is shown in Figure 2

[0072] In this way, the task link diagram of each preset task flow can be obtained, which can intuitively display the upstream and downstream relationship of multiple task nodes in the preset task flow, and provide a data basis for subsequent accurate scheduling of the preset task flow.

[0073] ​S11, judging the dependency relationship between any two task nodes in different task link graphs to draw a dependency graph, the dependency relationship including a dependent task node and a dependent period number.

[0074] In an optional embodiment, after obtaining the task link graph of each preset task flow, a dependency graph is obtained according to the dependency relationship between any two task nodes in different task link graphs, the dependency graph including the dependency relationship between task nodes in all task link graphs, the dependency relationship including a dependent task node and a dependent period number. For example, if task node C needs the output result of task node A for two consecutive periods as input information, the dependent task node of the task node C is the task node A, and the dependent period number is 2.

[0075] In an optional embodiment, the judging the dependency relationship between any two task nodes in different task link graphs to draw a dependency graph, the dependency relationship including a dependent task node and a dependent period number, includes:

[0076] Obtaining input information of a target node in a target task link graph as a target input, the target task link graph being any one of all task link graphs, and the target node being any one of all task nodes in the target task link graph;

[0077] Judging whether the target node has an external dependency based on the target input and the target task link graph, the external dependency referring to the output result of a task node other than the target task link graph included in the target input;

[0078] If the target node does not have an external dependency, the target node does not have a dependency relationship. If the target node has an external dependency, the dependency relationship of the target node is queried in all task nodes of each task link graph other than the target task link graph based on the target input, the dependency relationship including a dependent task node and a dependent period number;

[0079] When the dependency relationship of the target node is obtained, a directed edge from the dependent task node to the target node is drawn, and the dependent period number is taken as the edge weight of the directed edge, to obtain an initial dependency graph;

[0080] Iterating all task nodes in the target task link graph to update the initial dependency graph;

[0081] Iterating all task nodes in the target task link graph to update the initial dependency graph;

[0082] It should be noted that if all input information of the task node comes from the task link graph to which the task node belongs, that is, if the task node does not have external dependencies, it is considered that the task node does not have dependencies.

[0083] In this optional embodiment, the judging whether the target node has external dependencies based on the target input and the target task link graph, the external dependencies refer to the output results of the task nodes other than the target task link graph included in the target input, including:

[0084] In the target task link graph, the output results of all adjacent upstream task nodes of the target node are taken as the supply input of the target node.

[0085] Comparing the supply input of the target node with the target input to obtain a judgment result.

[0086] If the supply input and the target input are the same, it means that the target task link graph can provide the required input information for the target node, and the judgment result is that the target node does not have external dependencies.

[0087] If the supply input and the target input are not the same, it means that the target task link graph cannot provide the required input information for the target node, and the judgment result is that the target node has external dependencies.

[0088] For example, it is assumed that the task link graph only includes the first task link graph and the second task link graph, and it is assumed that the task nodes with external dependencies are the task node C and the task node H in the second task link graph, the first task link graph and the second task link graph are described with reference to Figure 3 ; taking the target node as the task node C in the second task link graph as an example, the target input is the input information of the task node C: the output result of the task node E in the target task link graph, and the output result of the task node A in the first task link graph for two consecutive periods; since the target node has external dependencies, the target node has dependencies; in all nodes in the first task link graph, the task node A is found, and a directed edge AC from the task node A to the target node is drawn, and the edge weight b(A, C) of the directed edge AC is valued as 2; all task nodes of all task link graphs are traversed to obtain a dependency graph, and a structure diagram of the dependency graph is shown in Figure 3 .

[0089] In this way, the dependency graph is obtained based on all task link graphs, and the dependency graph can intuitively reflect the dependencies between any task nodes in different task link graphs, thereby providing a data basis for realizing accurate scheduling of task flow.

[0090] S12, monitoring execution states of all task nodes to obtain state information of each task node, the state information of the task node including a running queue and a running cycle number, the running queue including output results of the task node under different running cycles.

[0091] In an optional embodiment, execution states of all task nodes in each task link graph are monitored, the execution state of the task node including three states of not started, in progress and completed; when the execution state of the task node is completed, a new output result is generated by the task node, the new output result is stored in a running queue of the task node, the running cycle number of the task node is increased by one, and the running queue and the running cycle number are taken as the state information of the task node, wherein the output results in the running queue are arranged in the order of acquisition time.

[0092] It should be noted that the number of output results stored in the running queue is fixed, and the running queue conforms to the principle of first-in first-out; when a new output result is stored in the task queue, the earliest stored output result in the running queue is deleted from the running queue.

[0093] In the optional embodiment, the execution state of the task node includes three states of not started, in progress and completed, and before the step of monitoring the execution states of all task nodes to obtain the state information of each task node, the method further includes:

[0094] when the execution state of the task node changes to in progress, triggering a timer of the task node;

[0095] obtaining a duration that the execution state of the task node is in progress according to the timer;

[0096] comparing the duration with a preset time period to obtain a comparison result; if the duration is greater than the preset time period, it indicates that the task node executes the task overtime, and the comparison result is an abnormal node; if the duration is not greater than the preset time period, the comparison result is a normal node;

[0097] if the comparison result is the abnormal node, determining an alarm strategy according to a preset priority of the task link graph where the task node is located, and executing the alarm strategy to obtain an alarm result.

[0098] The preset time period is 1 minute.

[0099] In the optional embodiment, the preset priority of the task link diagram can reflect the importance of different task link diagrams in different application scenarios. In a specific application scenario, the more important the task link diagram is, the greater the preset priority corresponding to the task link diagram is. Meanwhile, the administrator with the authority can modify the preset priority of different task link diagrams to adapt to different application scenarios. Different alerting strategies are set for the preset priority of the task link diagram, including telephone alarm, email alarm, internal communication software alarm, etc. The alerting strategy is determined according to the preset priority of the task link diagram where the task node is located, and the alerting result is obtained by executing the alerting strategy to remind the worker to check the abnormal node.

[0100] In this way, the state information of each task node is obtained by monitoring the execution state of all task nodes, and the state information includes the number of running cycles and the output result of different cycles, which provides a data basis for precise scheduling of the task flow. Meanwhile, when the task node is abnormal, an alarm can be sent in time to remind the worker to check.

[0101] S13, calculating the scheduling priority of each task link diagram based on the state information, the dependency graph, the cycle type and the preset priority.

[0102] In an optional embodiment, the cycle type can reflect the time consumption information of different task link diagrams, the preset priority can reflect the importance of different task link diagrams in different application scenarios, and the greater the preset priority is, the greater the scheduling priority of the task link diagram is. The dependency graph can reflect the dependency relationship between any task nodes of different task link diagrams, and the state information can be used to determine whether the number of running cycles of the task node meets the dependency relationship between the task nodes.

[0103] In the optional embodiment, the user needs to call different task link diagrams to complete the business requirement, and multiple task link diagrams exist at the same time and wait to be executed. In order to realize precise scheduling of the task flow, the scheduling priority of each task link diagram needs to be calculated.

[0104] In the optional embodiment, the calculation of the scheduling priority of each task link diagram based on the state information, the dependency graph, the cycle type and the preset priority includes:

[0105] The time interval between the current time and the calling time of the task link diagram is calculated as the waiting time of each task link diagram;

[0106] The initial priority of each task link diagram is calculated based on the cycle type and the waiting time, and the initial priority satisfies the following relationship:

[0107]

[0108] wherein, r i is a preset priority of the task link graph i, Max(r) is a maximum value of the preset priority, D i is a waiting time of the task link graph i, the unit of the waiting time being second; Z i is a cycle time obtained according to a cycle type of the task link graph i, the unit of the cycle time being second; R i is an initial priority of the task link graph i;

[0109] adjusting the initial priority based on the state information and the dependency graph to obtain a scheduling priority of each task link graph.

[0110] wherein, as the waiting time increases, the initial priority of the task link graph also increases.

[0111] In the optional embodiment, due to the dependency relationship between the task nodes in different task link graphs, the dependent task node can only obtain all the input information when the output result of the dependent task node meets the dependency cycle number.

[0112] In the optional embodiment, the adjusting the initial priority based on the state information and the dependency graph to obtain a scheduling priority of each task link graph comprises:

[0113] selecting an arbitrary task link graph as a task link graph to be adjusted;

[0114] judging whether all the task nodes of the task link graph to be adjusted have a dependency relationship based on the dependency graph to obtain a judgment result;

[0115] if all the task nodes of the task link graph to be adjusted do not have a dependency relationship, the judgment result is that no adjustment is needed, and the initial priority of the task link graph to be adjusted is taken as the scheduling priority;

[0116] if at least one task node of the task link graph to be adjusted has a dependency relationship, the judgment result is that adjustment is needed, the dependency relationship of all the task nodes of the task link graph to be adjusted is stored to obtain a dependency relationship set of the task link graph to be adjusted, and each dependency relationship comprises a dependent task node and a dependency cycle number;

[0117] adjusting the initial priority of the task link graph to be adjusted based on the state information, the dependency relationship set and a preset adjustment function to obtain a scheduling priority;

[0118] traversing all the task link graphs to obtain a scheduling priority of each task link graph.

[0119] wherein, the preset adjustment function satisfies the relationship:

[0120]

[0121] wherein, N represents the number of dependency relationship in the dependency relationship set of the task link graph to be adjusted, b j is the number of dependency period in the dependency relationship j, Num j is the number of running period in the state information of the dependent task node in the dependency relationship j; R i is the initial priority of the task link graph to be adjusted, R′ i is the scheduling priority of the task link graph to be adjusted, wherein, F(X) is a self-defined function, and the self-defined function satisfies the following relationship: wherein, when the result of N indicates that the number of running period of the dependent task node satisfies the number of dependency period.

[0122] For example, taking the second task link graph in Figure 3 as an example, assuming that the preset priority of the second task link graph is 6, and the maximum value of the preset priority is 10, since the period type of the second task link graph is day, the period time of the second task link graph is 86400 seconds, when the waiting time is half day, i.e. 43200 seconds, the initial priority of the second task link graph is as follows:

[0123]

[0124] Further, since the second task link graph has external dependency, the dependency relationship set of the second task link graph is obtained, and the dependency relationship set includes two dependency relationships: (A, 2) and (D, 3). In the dependency relationship (A, 2), the dependent task node is A and the number of dependency period is 2; assuming that the number of running period in the state information of the task node A is 2, and the number of running period in the state information of the task node D is 2, then the result of 1 is not equal to the number of dependency relationship, and the scheduling priority of the second task link graph is R′ i = 0.

[0125] In this way, the scheduling priority of each task link graph can be obtained, and the scheduling priority comprehensively considers the preset priority related to the application scenario, the dependency relationship and the waiting time, the period type and other factors, so as to ensure the accuracy of the scheduling priority.

[0126] S14, scheduling the preset task flow corresponding to the task link graph in the order from large to small according to the scheduling priority to obtain a scheduling result.

[0127] In an optional embodiment, the method comprises the following steps:

[0128] The preset task flows corresponding to the task link graphs are executed in the order of the scheduling priorities from large to small, and the task link graphs correspond to the preset task flows one by one.

[0129] If all the task nodes in the task link graph do not have a dependency relationship, the preset task flow of the task link graph is directly executed to obtain a scheduling result.

[0130] If at least one task node in the task link graph has a dependency relationship, the state information of the dependent task nodes in the dependency relationship is obtained, the number of dependent periods in the dependency relationship is obtained, the output results with the number of dependent periods are extracted from the running queue in the order from the back to the front according to the acquisition time as the input information of the task node, and the preset task flow of the task link graph is executed to obtain a scheduling result.

[0131] All the preset task flows are executed in the calling order to obtain a scheduling result.

[0132] The multiple preset task flows with the same scheduling priority can be executed in parallel to improve the execution efficiency of the preset task flows.

[0133] In the optional embodiment, the scheduling process of the preset task flow and the modification, testing and other processes of the preset task flow are independent of each other, the modification, testing and other processes of the preset task flow do not affect the scheduling process of the preset task flow, the one-key deployment of the modified preset task flow can be realized, and the development efficiency of the preset task flow is improved under the condition of meeting the business requirements.

[0134] In this way, the accurate scheduling of all the preset task flows is realized based on the scheduling priority.

[0135] As can be seen from the above technical solutions, the preset task flow can be displayed in the form of a task link graph, a dependency graph is constructed according to the dependency information of the task nodes in different task link graphs, the state information of each task node is further monitored, the scheduling priority of each preset task flow is calculated based on the state information, the dependency graph, the period type and the waiting time of the preset task flow and other factors, and the accurate scheduling of all the preset task flows is realized.

[0136] Please refer to Figure 4 , Figure 4is a functional module diagram of a preferred embodiment of the task flow precision scheduling device based on artificial intelligence of the present application. The task flow precision scheduling device 11 based on artificial intelligence comprises a construction unit 110, a drawing unit 111, a monitoring unit 112, a calculation unit 113, and a scheduling unit 114. The module / unit referred to in the present application refers to a series of computer readable instruction segments capable of being executed by the processor 13 and capable of completing a fixed function, which are stored in the memory 12. In the present embodiment, the functions of each module / unit will be described in detail in subsequent embodiments.

[0137] In an optional embodiment, the construction unit 110 is configured to construct a task link graph of each preset task flow, the preset task flow comprising a plurality of task nodes, and the task link graph comprising a preset ID, a cycle type of the preset task, and an upstream and downstream relationship of the task nodes.

[0138] In an optional embodiment, one or more preset task flows are set for a business function of a business system, each preset task flow corresponding to a preset ID, the preset ID being a unique identifier of the preset task flow; the preset task flow refers to an operation process formed by connecting a plurality of task nodes together in order to achieve a specific business function, the task flow can reflect the upstream and downstream relationship of the plurality of task nodes, and only when the upstream task node ends, the downstream task node can be started, the preset task flow corresponds to the business function one by one, for example, for the business function of user registration, the preset task flow of the user registration can be "input registration name → input password → confirm password → confirm registration", and the user can implement the business function of user registration by performing the corresponding task nodes in the preset task flow of the user registration in the order. Among them, input registration name, input password, confirm password and confirm registration are task nodes. It should be noted that the same task nodes can be included in different preset task flows.

[0139] In this optional embodiment, the preset task flow is closely related to the specific business function, and the accuracy of the preset task flow directly affects the normal operation of the business system, so in the task flow scheduling and daily maintenance, different permission categories need to be allocated to different preset task flows in the business system for different users to prevent the preset task flow from being tampered with to affect the operation of the business system, the permission categories including viewing, modifying, calling, etc. It should be noted that after the user with the permission to modify modifies the preset task flow and tests it, the modified preset task flow is uploaded to a specified directory of a distributed file management system, and the distributed file management system stores all preset task flows and log information generated during the modification process.

[0140] In the optional embodiment, in order to allow the user to intuitively view or modify the preset task flow, and in order to facilitate subsequent analysis and processing of the preset task flow, a task link diagram of each preset task flow is further constructed, the task link diagram includes a preset ID of the preset task, a cycle type, and an upstream and downstream relationship of the task node, the cycle type reflects a time required for completing the preset task once, and the cycle type includes hours, days, weeks, months, and the like, the task link diagram corresponds to the preset task flow one by one, and a structural schematic diagram of the task link diagram is shown in FIG. 8. Figure 2

[0141] In an optional embodiment, the drawing unit 111 is configured to judge a dependency relationship between any two task nodes in different task link diagrams to draw a dependency diagram, and the dependency relationship includes a dependent task node and a dependent cycle number.

[0142] In an optional embodiment, after obtaining the task link diagram of each preset task flow, a dependency diagram is obtained according to the dependency relationship between any two task nodes in different task link diagrams, the dependency diagram includes the dependency relationship between the task nodes in all task link diagrams, and the dependency relationship includes the dependent task node and the dependent cycle number. For example, if the task node C needs the output result of the task node A for two consecutive cycles as input information, the dependent task node of the task node C is the task node A, and the dependent cycle number is 2.

[0143] In an optional embodiment, the judgment of the dependency relationship between any two task nodes in different task link diagrams to draw the dependency diagram includes the following steps.

[0144] The input information of a target node in a target task link diagram is obtained as a target input, the target task link diagram is any one of all task link diagrams, and the target node is any one of all task nodes in the target task link diagram.

[0145] Based on the target input and the target task link diagram, it is judged whether the target node has external dependency, and the external dependency refers to the output result of a task node other than the target task link diagram in the target input.

[0146] If the target node does not have external dependency, the target node does not have a dependency relationship, and if the target node has external dependency, the dependency relationship of the target node is queried in all task nodes of each task link diagram other than the target task link diagram based on the target input, and the dependency relationship includes a dependent task node and a dependent cycle number.

[0147] ​When the dependency relationship of the target node is acquired, a directed edge from the dependent task node to the target node is drawn and the dependency cycle number is taken as the edge weight of the directed edge, to obtain an initial dependency graph;

[0148] All task nodes in the target task link graph are traversed to update the initial dependency graph;

[0149] All task nodes in the target task link graph are traversed to update the initial dependency graph;

[0150] It should be noted that if all input information of a task node comes from the task link graph to which the task node belongs, that is, if the task node has no external dependency, it is considered that the task node has no dependency relationship.

[0151] In the optional embodiment, the judging whether the target node has external dependency based on the target input and the target task link graph includes:

[0152] In the target task link graph, the output results of all adjacent upstream task nodes of the target node are taken as the supply input of the target node;

[0153] The supply input of the target node is compared with the target input to obtain a judgment result;

[0154] If the supply input and the target input are the same, it indicates that the target task link graph can provide the required input information for the target node, and the judgment result is that the target node has no external dependency;

[0155] If the supply input and the target input are not the same, it indicates that the target task link graph cannot provide the required input information for the target node, and the judgment result is that the target node has external dependency.

[0156] For example, it is assumed that the task link graph only includes a first task link graph and a second task link graph, and it is assumed that the task nodes C and H in the second task link graph have external dependency, and the first task link graph and the second task link graph are described with reference to Figure 3; taking task node C in the target task link graph as an example, the target input is input information of the task node C, which is output result of task node E in the target task link graph and output result of task node A in the first task link graph in two continuous periods; since the target node has external dependency, the target node has a dependency relationship; task node A is queried in all nodes in the first task link graph, a directed edge AC from the task node A to the target node is drawn, and an edge weight b(A, C) of the directed edge AC is valued as 2; a dependency graph is obtained by traversing all task nodes of all task link graphs, and a structural diagram of the dependency graph is as shown in Figure 3

[0157] In an optional embodiment, the monitoring unit 112 is configured to monitor execution states of all task nodes to obtain state information of each task node, the state information of the task node including a running queue and a running period number, and the running queue including output results of the task node in different running periods.

[0158] In an optional embodiment, execution states of all task nodes in each task link graph are monitored, the execution state of the task node including three states of not started, in progress and completed; when the execution state of the task node is completed, a new output result is generated, the new output result is stored in a running queue of the task node, the running period number of the task node is increased by one, and the running queue and the running period number are taken as the state information of the task node, wherein the output results in the running queue are arranged in the order of acquisition time; according to the above method, the state information of all task nodes in each task link graph can be obtained.

[0159] It should be noted that the number of output results stored in the running queue is fixed, and the running queue meets the first-in first-out principle; when a new output result is stored in the task queue, the earliest stored output result in the running queue is deleted from the running queue.

[0160] In the optional embodiment, the execution state of the task node includes three states of not started, in progress and completed, and before the execution state of all task nodes is monitored to obtain the state information of each task node, the method further includes:

[0161] When the execution state of the task node changes to in progress, a timer of the task node is triggered;

[0162] The duration that the execution state of the task node is in progress is obtained according to the timer;

[0163] ​comparing the duration with a preset time period to obtain a comparison result, wherein if the duration is greater than the preset time period, it indicates that the task node executes the task overtime, and the comparison result is an abnormal node, and if the duration is not greater than the preset time period, the comparison result is a normal node;

[0164] if the comparison result is the abnormal node, determining an alarm strategy according to a preset priority of the task link graph where the task node is located, and executing the alarm strategy to obtain an alarm result.

[0165] The preset time period is 1 minute.

[0166] In the optional embodiment, the preset priority of the task link graph can reflect the importance of different task link graphs in different application scenarios. In a specific application scenario, the more important the task link graph is, the greater the preset priority corresponding to the task link graph is. Meanwhile, an administrator with the permission can modify the preset priority of different task link graphs to adapt to different application scenarios. Different alarm strategies are set for the preset priority of the task link graph, and the alarm strategies include telephone alarm, email alarm, internal communication software alarm, etc. The alarm strategy is determined according to the preset priority of the task link graph where the task node is located, and the alarm strategy is executed to obtain an alarm result, reminding the staff to check the abnormal node.

[0167] In an optional embodiment, the computing unit 113 is configured to calculate a scheduling priority of each task link graph based on the state information, the dependency graph, the cycle type and a preset priority.

[0168] In an optional embodiment, the cycle type can reflect the time consumption information of different task link graphs, the preset priority can reflect the importance of different task link graphs in different application scenarios, and the greater the preset priority is, the greater the scheduling priority of the task link graph is. The dependency graph can reflect the dependency relationship between any task nodes of different task link graphs, and the state information can be used to determine whether the number of running cycles of the task node meets the dependency relationship between the task nodes.

[0169] In the optional embodiment, the user needs to call different task link graphs to complete the business requirement, and at the same time, multiple task link graphs are waiting to be executed. In order to realize accurate scheduling of the task flow, the scheduling priority of each task link graph needs to be calculated.

[0170] In the optional embodiment, the calculation of the scheduling priority of each task link graph based on the state information, the dependency graph, the cycle type and the preset priority includes:

[0171] The time interval between the current time and the calling time of the task link graph is calculated as the waiting time of each task link graph.

[0172] calculating an initial priority of each task link graph based on the period type and the waiting time, the initial priority satisfying a relationship:

[0173]

[0174] wherein r i is a preset priority of the task link graph i, Max(r) is a maximum value of the preset priority, D i is the waiting time of the task link graph i, the unit of the waiting time being second; Z i is a period time obtained according to the period type of the task link graph i, the unit of the period time being second; R i is the initial priority of the task link graph i;

[0175] adjusting the initial priority based on the state information and the dependency graph to obtain a scheduling priority of each task link graph.

[0176] wherein the initial priority of the task link graph increases with the increase of the waiting time.

[0177] In the optional embodiment, due to the dependency relationship between the task nodes in different task link graphs, the dependent task node can obtain all the input information only when the output result of the dependent task node meets the dependency period number.

[0178] In the optional embodiment, the adjusting the initial priority based on the state information and the dependency graph to obtain a scheduling priority of each task link graph comprises:

[0179] selecting an arbitrary task link graph as a task link graph to be adjusted;

[0180] judging whether all the task nodes of the task link graph to be adjusted have dependency relationship based on the dependency graph to obtain a judgment result;

[0181] if all the task nodes of the task link graph to be adjusted do not have dependency relationship, the judgment result is that no adjustment is needed, and the initial priority of the task link graph to be adjusted is taken as the scheduling priority;

[0182] if at least one task node of the task link graph to be adjusted has dependency relationship, the judgment result is that adjustment is needed, and the dependency relationship of all the task nodes of the task link graph to be adjusted is stored to obtain a dependency relationship set of the task link graph to be adjusted, each dependency relationship comprising a dependent task node and a dependency period number;

[0183] adjust the initial priority of the to-be-adjusted task link graph based on the state information, the set of dependency relations and a preset adjustment function to obtain a scheduling priority;

[0184] traverse all the task link graphs to obtain the scheduling priority of each task link graph.

[0185] wherein the preset adjustment function satisfies a relationship:

[0186]

[0187] wherein N represents the number of dependency relations in the set of dependency relations of the to-be-adjusted task link graph, b j is the number of dependency periods in the dependency relation j, Num j is the number of running periods in the state information of the dependent task node in the dependency relation j; R i is the initial priority of the to-be-adjusted task link graph, R' i is the scheduling priority of the to-be-adjusted task link graph, wherein F(X) is a self-defined function, and the self-defined function satisfies a relationship: wherein when the result of N indicates that the number of running periods of the dependent task node satisfies the number of dependency periods.

[0188] For example, taking the second task link graph in Figure 3 as an example, assuming that the preset priority of the second task link graph is 6, and the maximum value of the preset priority is 10, since the cycle type of the second task link graph is day, the cycle time of the second task link graph is 86400 seconds, when the waiting time is half a day, i.e. 43200 seconds, the initial priority of the second task link graph is as follows:

[0189]

[0190] Further, since the second task link graph has external dependency, the set of dependency relations of the second task link graph is obtained, the set of dependency relations includes two dependency relations: (A, 2) and (D, 3), in the dependency relation (A, 2), the dependent task node is A and the number of dependency periods is 2; assuming that the number of running periods in the state information of the task node A is 2, and the number of running periods in the state information of the task node D is 2, then the result of N is 1, 1 is not equal to the number of dependency relations, and the scheduling priority of the second task link graph is R' i = 0.

[0191] In an optional embodiment, the scheduling unit 114 is configured to schedule the preset task flow corresponding to the task link graph in a descending order of the scheduling priority to obtain a scheduling result.

[0192] In an optional embodiment, the preset task flow corresponding to the task link graph is scheduled according to the scheduling priority in descending order to obtain a scheduling result, including:

[0193] The preset task flow corresponding to the task link graph is executed according to the scheduling priority in descending order, and the task link graph and the preset task flow correspond one-to-one.

[0194] If all task nodes in the task link graph do not have a dependency relationship, the preset task flow of the task link graph is directly executed to obtain a scheduling result.

[0195] If at least one task node in the task link graph has a dependency relationship, the state information of the dependent task node in the dependency relationship is obtained for the task node with the dependency relationship, and the number of dependent periods in the dependency relationship is obtained. The output result with the number of dependent periods is extracted from the running queue in the order from the back to the front according to the acquisition time as the input information of the task node, and then the preset task flow of the task link graph is executed to obtain a scheduling result.

[0196] All preset task flows are executed according to the calling order to obtain a scheduling result.

[0197] In which, multiple preset task flows with the same scheduling priority can be executed in parallel to improve the execution efficiency of the preset task flow.

[0198] In this optional embodiment, the scheduling process of the preset task flow and the modification, testing and other processes of the preset task flow are independent of each other, and the modification, testing and other processes of the preset task flow will not affect the scheduling process of the preset task flow. The one-key deployment of the modified preset task flow can be realized to improve the development efficiency of the preset task flow while meeting the business requirements.

[0199] As can be seen from the above technical solutions, the preset task flow can be displayed in the form of a task link graph, and a dependency graph can be constructed according to the dependency information of the task nodes in different task link graphs. Further, the state information of each task node is monitored, and the scheduling priority of each preset task flow is calculated based on the state information, the dependency graph, the period type and the waiting time of the preset task flow, and the like. The precise scheduling of all preset task flows is realized.

[0200] Please refer to Figure 5 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. The electronic device 1 comprises a memory 12 and a processor 13. The memory 12 is used to store computer readable instructions, and the processor 13 is used to execute the computer readable instructions stored in the memory to realize the precise scheduling method of the task flow based on artificial intelligence according to any one of the above embodiments.

[0201] In an optional embodiment, the electronic device 1 further comprises a bus, a computer program stored in the memory 12 and executable on the processor 13, such as an artificial intelligence-based task flow accurate scheduling program.

[0202] Figure 5 Only the electronic device 1 with the memory 12 and the processor 13 is shown, and those skilled in the art can understand that, Figure 5 The structure shown does not constitute a limitation on the electronic device 1, and can include fewer or more components than shown, or combine certain components, or different component arrangements.

[0203] In combination Figure 1 The memory 12 in the electronic device 1 stores a plurality of computer readable instructions to implement an artificial intelligence-based task flow accurate scheduling method, and the processor 13 can execute the plurality of instructions to implement:

[0204] Constructing a task link graph of each preset task flow, the preset task flow including a plurality of task nodes, the task link graph including a preset ID, a cycle type of the preset task, and an upstream and downstream relationship of the task nodes;

[0205] Judging a dependency relationship between any two task nodes in different task link graphs to draw a dependency graph, the dependency relationship including a dependent task node and a dependent cycle number;

[0206] Monitoring an execution state of all task nodes to obtain state information of each task node, the state information of the task node including a running queue and a running cycle number, the running queue including output results of the task node under different running cycles;

[0207] Calculating a scheduling priority of each task link graph based on the state information, the dependency graph, the cycle type, and a preset priority;

[0208] Scheduling the preset task flow corresponding to the task link graph in descending order of the scheduling priority to obtain a scheduling result.

[0209] Specifically, the specific implementation method of the processor 13 on the above instructions can refer to Figure 1 the description of related steps in the corresponding embodiments, which will not be repeated here.

[0210] Those skilled in the art can understand that the schematic diagram is only an example of the electronic device 1 and does not constitute a limitation on the electronic device 1, and the electronic device 1 can be a bus structure or a star structure, and the electronic device 1 can further include more or fewer other hardware or software than shown, or different component arrangements, such as the electronic device 1 can further include an input and output device, a network access device, etc.

[0211] It should be noted that the electronic device 1 is only an example, and other existing or future electronic products can also be applicable to the present application and should be included in the protection scope of the present application.

[0212] The memory 12 includes at least one type of readable storage medium, which can be non-volatile or volatile. The readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (e.g., an SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. The memory 12 can be an internal storage unit of the electronic device 1 in some embodiments, such as a mobile hard disk of the electronic device 1. The memory 12 can also be an external storage device of the electronic device 1 in other embodiments, such as a plug-in mobile hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 1. The memory 12 can be used to store application software and various data installed on the electronic device 1, such as the code of the artificial intelligence-based task flow accurate scheduling program, and can also be used to temporarily store data that has been output or will be output.

[0213] The processor 13 can be composed of an integrated circuit in some embodiments, such as a single packaged integrated circuit or a plurality of packaged integrated circuits with the same or different functions, including one or more combinations of a central processing unit (CPU), a microprocessor, a digital processing chip, a graphics processor, and various control chips, etc. The processor 13 is the control unit of the electronic device 1, which connects all components of the electronic device 1 through various interfaces and lines, executes programs or modules stored in the memory 12 (such as the artificial intelligence-based task flow accurate scheduling program, etc.), and calls data stored in the memory 12 to execute various functions of the electronic device 1 and process data.

[0214] The processor 13 executes the operating system and various application programs installed on the electronic device 1. The processor 13 executes the application programs to implement the steps in each of the above artificial intelligence-based task flow accurate scheduling method embodiments, such as Figure 1 the steps shown.

[0215] The computer program can be divided into one or more modules / units, which are stored in the memory 12 and executed by the processor 13 to complete the present application. The one or more modules / units can be a series of computer-readable instruction segments capable of completing a specific function, which are used to describe the execution process of the computer program in the electronic device 1. For example, the computer program can be divided into a construction unit 110, a drawing unit 111, a monitoring unit 112, a calculation unit 113, and a scheduling unit 114.

[0216] The integrated units in the form of software function modules described above can be stored in a computer-readable storage medium. The software function modules described above are stored in a storage medium, including a plurality of instructions for causing a computer device (which can be a personal computer, a computer device, or a network device, etc.) or a processor to execute part of the task flow accurate scheduling method based on artificial intelligence described in various embodiments of the present application.

[0217] The modules / units integrated in the electronic device 1, if realized in the form of software function units and sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above-mentioned embodiment methods can also be instructed by a computer program to complete related hardware devices, and the computer program can be stored in a computer-readable storage medium. The computer program can be executed by the processor to implement the steps of each method embodiment.

[0218] The computer program includes computer program code, which can be in the form of source code, object code, executable files, or some intermediate forms, etc. The computer-readable medium can include any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory, and other memories, etc.

[0219] Further, the computer-readable storage medium can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required by a function, etc.; and the data storage area can store data created according to the use of the blockchain node, etc.

[0220] The blockchain referred to in the present application is a new application mode of distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm and other computer technologies. The blockchain is essentially a decentralized database, which is a series of data blocks associated using cryptographic methods, each data block containing information of a batch of network transactions, used to verify the validity (anti-fake) of the information and generate the next block. The blockchain can include a blockchain underlying platform, a platform product service layer, and an application service layer, etc.

[0221] The bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one arrow is used in Figure 5 , but it does not mean that there is only one bus or one type of bus. The bus is arranged to realize the connection and communication between the memory 12, the at least one processor 13, etc.

[0222] The embodiment of the present application also provides a computer readable storage medium (not shown in the figure), which stores computer readable instructions. The computer readable instructions are executed by a processor in an electronic device to realize the artificial intelligence-based task flow accurate scheduling method described in any of the above embodiments.

[0223] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. In actual implementation, there can be another division manner.

[0224] The modules described as separate components can or can not be physically separated, and the components displayed as modules can or can not be physical units, i.e. they can be located in one place, or distributed on multiple network units. According to actual needs, part or all of the modules can be selected to achieve the purpose of the present embodiment.

[0225] In addition, each functional module in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically independently, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of hardware plus software functional modules.

[0226] Furthermore, the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural and vice-versa, unless the context clearly requires these exclusions. The description set forth herein illustrates the technical solution of the present application by means of examples, but the present application is not limited to these examples.

[0227] Finally, it should be noted that the above-mentioned embodiments are merely used to illustrate the technical solutions of the present application, rather than limit the present application. Although the present application has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application can be modified or equivalent replaced without departing from the spirit and scope of the present application.

Claims

1. A method for accurate scheduling of a task flow based on artificial intelligence, characterized in that, The method comprises: constructing a task link graph of each preset task flow, the preset task flow comprising a plurality of task nodes, the task link graph comprising a preset ID, a cycle type and an upstream and downstream relationship of the task nodes of the preset task; judging a dependency relationship between any two task nodes in different task link graphs to draw a dependency graph, the dependency relationship comprising a dependent task node and a dependent cycle number; monitoring an execution state of all task nodes to obtain state information of each task node, the state information of the task node comprising a running queue and a running cycle number, the running queue comprising an output result of the task node under different running cycles; calculating a scheduling priority of each task link graph based on the state information, the dependency graph, the cycle type and a preset priority; scheduling the preset task flow corresponding to the task link graph in the order of the scheduling priority from large to small to obtain a scheduling result, comprising: executing the preset task flow corresponding to the task link graph in the order of the scheduling priority from large to small, the task link graph corresponding to the preset task flow one by one; if all task nodes in the task link graph do not have a dependency relationship, directly executing the preset task flow of the task link graph to obtain the scheduling result; if at least one task node in the task link graph has a dependency relationship, obtaining a running queue in the state information of the dependent task node in the dependency relationship, and simultaneously obtaining a dependent cycle number in the dependency relationship, extracting the output result with the number of the dependent cycle number from the running queue in the order from later to earlier according to the acquisition time as the input information of the task node, and then executing the preset task flow of the task link graph to obtain the scheduling result; executing all preset task flows in the calling order to obtain the scheduling result.

2. The artificial intelligence-based task flow accurate scheduling method of claim 1, wherein, The judgment of the dependency relationship between any two task nodes in different task link graphs to draw a dependency graph, the dependency relationship comprising a dependent task node and a dependent cycle number, comprises: obtaining input information of a target node in a target task link graph as a target input, the target task link graph being any one of all task link graphs, and the target node being any one of all task nodes in the target task link graph; judging whether the target node has an external dependency based on the target input and the target task link graph, the external dependency referring to the output result of the task node other than the target task link graph in the target input; if the target node does not have an external dependency, the target node does not have a dependency relationship, and if the target node has an external dependency, querying the dependency relationship of the target node in all task nodes of each task link graph other than the target task link graph based on the target input, the dependency relationship comprising a dependent task node and a dependent cycle number; when the dependency relationship of the target node is obtained, drawing a directed edge from the dependent task node to the target node and taking the dependent cycle number as the edge weight of the directed edge to obtain an initial dependency graph; updating the initial dependency graph by traversing all task nodes in the target task link graph; updating the initial dependency graph by traversing all task link graphs, and stopping the updating of the initial dependency graph when all task nodes of all task link graphs are traversed to obtain a dependency graph. 3.The AI-based task flow accurate scheduling method of claim 1, wherein, The execution state of the task node includes three states of not started, in progress, and completed, and the method further includes the following steps before monitoring the execution state of all task nodes to obtain the state information of each task node: triggering a timer of the task node when the execution state of the task node changes to in progress; obtaining the duration for which the execution state of the task node is in progress according to the timer; comparing the duration with a preset time period to obtain a comparison result, wherein if the duration is greater than the preset time period, it indicates that the task node executes a task overtime, and the comparison result is an abnormal node, and if the duration is not greater than the preset time period, the comparison result is a normal node; if the comparison result is an abnormal node, determining an alarm strategy according to a preset priority of the task link graph where the task node is located, and executing the alarm strategy to obtain an alarm result.

4. The artificial intelligence-based task flow accurate scheduling method of claim 1, wherein, The method of calculating the scheduling priority of each task link graph based on the state information, the dependency graph, the cycle type, and a preset priority includes the following steps: calculating the time interval between the current time and the calling time of the task link graph as the waiting time of each task link graph; calculating the initial priority of each task link graph based on the cycle type and the waiting time, wherein the initial priority satisfies the following relationship: wherein, is a preset priority of the task link graph i, Max(r) is a maximum value of the preset priority, is a latency of the task link graph i, the unit of the latency being second; is a cycle time obtained according to a cycle type of the task link graph i, the unit of the cycle time being second; is an initial priority of the task link graph i; adjusting the initial priority based on the state information and the dependency graph to obtain the scheduling priority of each task link graph.

5. The artificial intelligence-based task flow accurate scheduling method of claim 4, wherein, The method of adjusting the initial priority based on the state information and the dependency graph to obtain the scheduling priority of each task link graph includes the following steps: selecting an arbitrary task link graph as a task link graph to be adjusted; judging whether all task nodes of the task link graph to be adjusted have a dependency relationship based on the dependency graph to obtain a judgment result; if all task nodes of the task link graph to be adjusted do not have a dependency relationship, the judgment result is that no adjustment is needed, and the initial priority of the task link graph to be adjusted is taken as the scheduling priority; if at least one task node of the task link graph to be adjusted has a dependency relationship, the judgment result is that adjustment is needed, the dependency relationship of all task nodes of the task link graph to be adjusted is stored to obtain a dependency relationship set of the task link graph to be adjusted, and each dependency relationship includes a dependent task node and a dependent cycle number; adjusting the initial priority of the task link graph to be adjusted based on the state information, the dependency relationship set, and a preset adjustment function to obtain a scheduling priority; traversing all task link graphs to obtain the scheduling priority of each task link graph.

6. The artificial intelligence-based task flow accurate scheduling method of claim 5, wherein, The preset adjustment function satisfies the following relationship: wherein N represents the number of dependency relations in a dependency relation set of a task chain link diagram to be adjusted, is the number of dependency periods in the dependency relation j, is the number of running periods in the state information of the dependent task node in the dependency relation j; is the initial priority of the task chain link diagram to be adjusted, is the scheduling priority of the task chain link diagram to be adjusted, wherein, is a self-defined function, and the self-defined function satisfies a relationship: .

7. An artificial intelligence-based task flow accurate scheduling device, characterized in that, The device is used to implement the method of accurately scheduling a task flow based on artificial intelligence according to any one of claims 1 to 6, and the device includes: The constructing unit is configured to construct a task link graph of each preset task flow, the preset task flow comprising a plurality of task nodes, the task link graph comprising a preset ID, a cycle type of the preset task, and an upstream and downstream relationship of the task nodes; The drawing unit is configured to judge a dependency relationship between any two task nodes in different task link graphs to draw a dependency graph, the dependency relationship comprising a dependent task node and a dependent cycle number; The monitoring unit is configured to monitor an execution state of all the task nodes to obtain state information of each task node, the state information of the task nodes comprising a running queue and a running cycle number, the running queue comprising output results of the task nodes under different running cycles; The computing unit is configured to calculate a scheduling priority of each task link graph based on the state information, the dependency graph, the cycle type, and a preset priority; The scheduling unit is configured to schedule the preset task flows corresponding to the task link graphs in a descending order of the scheduling priorities to obtain a scheduling result.

8. An electronic device, comprising: The electronic device comprises: a memory storing computer readable instructions; and a processor executing the computer readable instructions stored in the memory to implement the artificial intelligence-based task flow accurate scheduling method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer readable instructions, and the computer readable instructions are executed by the processor to implement the artificial intelligence-based task flow accurate scheduling method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Application program starting method and device, storage medium and electronic equipment

    CN110442396A

  • Education cloud big data task scheduling method and system

    CN110647387A

  • Abnormal task recognition method, system and application

    CN114020596A