Task scheduling method and device, electronic equipment, readable storage medium and computer program product

By decomposing user tasks into metatasks and generating template task chains, the existing task scheduling system is solved inadequate flexibility in complex and changing tasks, and efficient task scheduling and resource utilization are achieved.

CN119759520AActive Publication Date: 2025-04-04BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411814857.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-10
Publication Date
2025-04-04
Estimated Expiration
2044-12-10

AI Technical Summary

Technical Problem

Existing task scheduling systems are not flexible enough when facing changes and complex tasks, and it is difficult to provide reasonable dependency management, decomposition and scheduling, especially when tasks change frequently.

Method used

By decomposing user tasks into the smallest executable metatasks, building and storing corresponding metatask modules, generating template task chains, and finally executing the scheduling of user tasks in the task scheduling model.

Benefits of technology

It improves the efficiency and flexibility of task scheduling, can better adapt to complex and changing task needs, and enhances the utilization rate of system resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119759520A_ABST
    Figure CN119759520A_ABST
Patent Text Reader

Abstract

The invention provides a task scheduling method and device, electronic equipment, a readable storage medium and a computer program product, and relates to the field of computers, in particular to the field of task scheduling. According to the implementation scheme, the method comprises the steps of processing a user task to obtain task features of the user task; based on the task features, decomposing the user task into at least one meta-task; in response to determining that a meta-task module corresponding to at least a first meta-task of the at least one meta-task is not stored in the memory, constructing and storing the meta-task module corresponding to the at least first meta-task such that a meta-task module corresponding to each meta-task of the at least one meta-task is stored in the memory; inputting a meta-task module corresponding to each meta-task in the at least one meta-task into a task chain generation model to generate a template task chain corresponding to the user task; and inputting the template task chain into the task scheduling model, and executing the scheduling of the user task.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, in particular to the field of task scheduling, and specifically to a task scheduling method, device, electronic device, computer-readable storage medium, and computer program product. Background Art

[0002] With the development of computer technology, the amount of data and tasks has also exploded. Traditional task scheduling systems use predefined template task systems, such as common data pipelines and process automation (RPA) systems; in this type of solution, each step and template is fixed, which is only suitable for scenarios with relatively stable task structures, but is not flexible enough to deal with changes and complex tasks. Customize and modify each specific task manually; this type of system has high flexibility, but it is easy to increase maintenance costs in complex scenarios. In addition, due to manual management and combination of processes, when tasks change frequently, it is time-consuming to adjust the task chain. In the face of large-scale task flows with multiple stages that depend on each other, existing technologies usually find it difficult to provide reasonable dependency management, decomposition, and scheduling. Summary of the invention

[0003] The present disclosure provides a task scheduling method, device, electronic device, computer-readable storage medium, and computer program product.

[0004] According to one aspect of the present disclosure, a task scheduling method is provided, comprising: processing a user task to obtain a task feature of the user task; based on the task feature, decomposing the user task into at least one meta-task, wherein each meta-task in the at least one meta-task is the smallest executable unit of task scheduling; in response to determining that a meta-task module corresponding to at least a first meta-task in the at least one meta-task is not stored in a memory, constructing and storing a meta-task module corresponding to at least the first meta-task, so that a meta-task module corresponding to each meta-task in the at least one meta-task is stored in the memory; inputting the meta-task module corresponding to each meta-task in the at least one meta-task into a task chain generation model to generate a template task chain corresponding to the user task; and inputting the template task chain into the task scheduling model to execute scheduling of the user task.

[0005] According to a second aspect of the present disclosure, a task scheduling device is provided, comprising: a task parsing module, for processing a user task to obtain task features of the user task; a task decomposition module, for decomposing the user task into at least one meta-task, wherein each meta-task in the at least one meta-task is the smallest executable unit of task scheduling; a meta-task module construction module, in response to determining that a meta-task module corresponding to at least a first meta-task in the at least one meta-task is not stored in a memory, constructs and stores a meta-task module corresponding to at least the first meta-task, so that a meta-task module corresponding to each meta-task in the at least one meta-task is stored in the memory; a task chain generation module, for inputting the stored meta-task modules corresponding to each meta-task in the at least one meta-task into a task chain generation model to generate a template task chain corresponding to the user task; and a meta-task scheduling module, for inputting the template task chain into the task scheduling model to execute scheduling of the user task.

[0006] According to a third aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned physical examination report interpretation method.

[0007] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the processor implements the method for interpreting a physical examination report as described above.

[0008] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein the computer program implements the above-mentioned physical examination report interpretation method when executed by a processor.

[0009] According to one or more embodiments of the present disclosure, with meta-task as the core, an efficient task scheduling method and device are provided through a template task chain generation strategy and a system resource dynamic allocation mechanism.

[0010] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The accompanying drawings exemplarily illustrate the embodiments and constitute a part of the specification, and together with the text description of the specification, are used to explain the exemplary implementation of the embodiments. The embodiments shown are for illustrative purposes only and do not limit the scope of the claims. In all drawings, the same reference numerals refer to similar but not necessarily identical elements.

[0012] Figure 1 A schematic diagram showing an exemplary system in which the various methods described herein may be implemented according to an embodiment of the present disclosure;

[0013] Figure 2 A flowchart of a task scheduling method according to an embodiment of the present disclosure is shown;

[0014] Figure 3 Shown according to Figure 2 The workflow diagram of the task scheduling model in step S210 shown;

[0015] Figure 4 A block diagram of a task scheduling device according to an embodiment of the present disclosure is shown;

[0016] Figure 5 A structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0017] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0018] In the present disclosure, unless otherwise specified, the use of the terms "first", "second", etc. to describe various elements is not intended to limit the positional relationship, temporal relationship, or importance relationship of these elements, and such terms are only used to distinguish one element from another element. In some examples, the first element and the second element may refer to the same instance of the element, and in some cases, based on the description of the context, they may also refer to different instances.

[0019] The terms used in the description of various examples in this disclosure are only for the purpose of describing specific examples and are not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the element can be one or more. In addition, the term "and / or" used in this disclosure covers any one of the listed items and all possible combinations.

[0020] The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.

[0021] Figure 1 FIG. 1 is a schematic diagram of an exemplary system 100 in which various methods and apparatuses described herein may be implemented according to an embodiment of the present disclosure. Figure 1, the system 100 includes one or more client devices 101, 102, 103, 104, 105, and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. The client devices 101, 102, 103, 104, 105, and 106 may be configured to execute one or more applications.

[0022] In an embodiment of the present disclosure, the server 120 may run one or more services or software applications that enable the physical examination report interpretation method to be performed.

[0023] In some embodiments, server 120 may also provide other services or software applications, which may include non-virtualized environments and virtualized environments. In some embodiments, these services may be provided as web-based services or cloud services, such as provided to users of client devices 101, 102, 103, 104, 105, and / or 106 under a software as a service (SaaS) model.

[0024] exist Figure 1 In the configuration shown, the server 120 may include one or more components that implement the functions performed by the server 120. These components may include software components, hardware components, or a combination thereof that can be executed by one or more processors. Users operating client devices 101, 102, 103, 104, 105, and / or 106 may in turn utilize one or more client applications to interact with the server 120 to utilize the services provided by these components. It should be understood that a variety of different system configurations are possible, which may differ from the system 100. Therefore, Figure 1 is one example of a system for implementing the various methods described herein and is not intended to be limiting.

[0025] The user may use client devices 101, 102, 103, 104, 105 and / or 106 to interpret the medical examination report. The client device may provide an interface that enables the user of the client device to interact with the client device. The client device may also output information to the user via the interface. Figure 1 Only six client devices are depicted, but one skilled in the art will appreciate that the present disclosure may support any number of client devices.

[0026] Client devices 101, 102, 103, 104, 105 and / or 106 may include various types of computer devices, such as portable handheld devices, general-purpose computers (such as personal computers and laptop computers), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, game systems, thin clients, various messaging devices, sensors or other sensing devices, etc. These computer devices may run various types and versions of software applications and operating systems, such as MICROSOFT Windows, APPLE iOS, UNIX-like operating systems, Linux or Linux-like operating systems (such as GOOGLE Chrome OS); or include various mobile operating systems, such as MICROSOFT Windows Mobile OS, iOS, Windows Phone, Android. Portable handheld devices may include cellular phones, smart phones, tablet computers, personal digital assistants (PDAs), etc. Wearable devices may include head-mounted displays (such as smart glasses) and other devices. Game systems may include various handheld game devices, Internet-enabled game devices, etc. Client devices are capable of executing various different applications, such as various Internet-related applications, communication applications (such as email applications), short message service (SMS) applications, and may use various communication protocols.

[0027] The network 110 may be any type of network known to those skilled in the art that may support data communications using any of a variety of available protocols, including but not limited to TCP / IP, SNA, IPX, etc. By way of example only, the one or more networks 110 may be a local area network (LAN), an Ethernet-based network, a token ring, a wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a blockchain network, a public switched telephone network (PSTN), an infrared network, a wireless network (e.g., Bluetooth, WIFI), and / or any combination of these and / or other networks.

[0028] Server 120 may include one or more general purpose computers, dedicated server computers (e.g., PC (personal computer) servers, UNIX servers, mid-range servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and / or combination. Server 120 may include one or more virtual machines running virtual operating systems, or other computing architectures involving virtualization (e.g., one or more flexible pools of logical storage devices that may be virtualized to maintain a server's virtual storage device). In various embodiments, server 120 may run one or more services or software applications that provide the functionality described below.

[0029] The computing units in the server 120 may run one or more operating systems including any of the above operating systems and any commercially available server operating systems. The server 120 may also run any of a variety of additional server applications and / or middle-tier applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, etc.

[0030] In some implementations, server 120 may include one or more applications to analyze and consolidate data feeds and / or event updates received from users of client devices 101, 102, 103, 104, 105, and / or 106. Server 120 may also include one or more applications to display data feeds and / or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and / or 106.

[0031] In some embodiments, the server 120 may be a server of a distributed system, or a server combined with a blockchain. The server 120 may also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. A cloud server is a host product in a cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and virtual private servers (VPS) services.

[0032] The system 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data and other information. For example, one or more of the databases 130 may be used to store information such as audio files and video files. The databases 130 may reside in various locations. For example, the database used by the server 120 may be local to the server 120, or may be remote from the server 120 and may communicate with the server 120 via a network-based or dedicated connection. The databases 130 may be of different types. In some embodiments, the databases used by the server 120 may be, for example, relational databases. One or more of these databases may store, update, and retrieve data to and from the databases in response to commands.

[0033] In some embodiments, one or more of the databases 130 may also be used by applications to store application data. The databases used by the applications may be different types of databases, such as a key-value store, an object store, or a conventional store backed by a file system.

[0034] Figure 1The system 100 may be configured and operated in various ways to enable the application of various methods and apparatuses described in the present disclosure.

[0035] Figure 2 2 is a flowchart showing a task scheduling method 200 according to an embodiment of the present disclosure. Figure 2 As shown, the task scheduling method may include: step S202, processing the user task to obtain the task characteristics of the user task; step 204, based on the task characteristics, decomposing the user task into at least one meta-task, wherein each meta-task in the at least one meta-task is the smallest executable unit of task scheduling; step S206, in response to determining that the meta-task module corresponding to at least the first meta-task in the at least one meta-task is not stored in the memory, constructing and storing the meta-task module corresponding to at least the first meta-task, so that the meta-task module corresponding to each meta-task in the at least one meta-task is stored in the memory; step S208, inputting the meta-task module corresponding to each meta-task in the at least one meta-task into the task chain generation model to generate a template task chain corresponding to the user task; and step S210, inputting the template task chain into the task scheduling model to execute the scheduling of the user task.

[0036] In the task scheduling method according to the embodiment of the present disclosure, the meta-task is taken as the core, and the template task chain generation strategy is used to improve the efficiency of task scheduling; and combined with the task scheduling model based on the dynamic allocation mechanism of system resources, the utilization rate of system resources is effectively improved.

[0037] In some embodiments, in step S202, processing the user task to obtain the task features of the user task includes: using a pre-trained large language model to perform semantic understanding, structural analysis, and context extraction on the user task description, and obtaining the user task features based on the results of the analysis and extraction.

[0038] In some embodiments, in step S204, each meta-task is the smallest executable unit of task scheduling. The meta-task is described as structured data, and the structured data format includes the input parameters of the meta-task, the output parameters of the meta-task, and the execution logic of the meta-task. In this embodiment, the meta-task input parameters include the required external parameters and conditions; the output parameters of the meta-task include the output data or files provided in the form of a standard interface; the execution logic of the meta-task includes specific code logic or execution components, which can be a code script uploaded by the user to implement the meta-task execution logic, or a system-built-in module to implement the meta-task execution logic.

[0039] It should be added that if the user's input description itself is a complete and indivisible task, and does not depend on the output of other tasks or has no clear multi-step requirements, the task decomposition will be directly represented by a meta-task.

[0040] In some embodiments, when the user task requirement is: crawl the text content of a web page and save it to a file; in this case, the task itself has only one-step completion logic, and the system can directly match a predefined crawling meta-task module. The system understands that the user task requirement is an instantiation of a certain crawling task template. As a "unit operation" meta-task, there is no need to decompose the user task into multiple meta-tasks, and only the meta-task module of web page crawling needs to be called.

[0041] In some embodiments, complex tasks usually imply dependencies or multiple parts with different stage goals at the logic or step level. The following situations usually cause the task to be decomposed into at least two or more meta-tasks: when the user task description requires the conversion of certain intermediate steps; when the user task has clear upstream and downstream dependencies, the user task needs to be split; when for the sake of scalability, even if the task logic can be packaged into a meta-task, it tends to be split into the smallest granularity meta-tasks to support reuse; and in some special cases, a part of the user requirements cannot be mapped one by one to the predefined modules in the task library, and existing modules must be combined for processing.

[0042] In some embodiments, in step S206, the meta-task module corresponding to each meta-task in the at least one meta-task stores corresponding meta-task features, wherein the meta-task features include meta-task resource requirements, meta-task priority levels, and meta-task time constraints.

[0043] In this embodiment, unlike the application scenarios that do not consider the meta-task resource requirements, meta-task priority levels and meta-task time constraints at the same time, system resources are allocated according to the importance of the meta-task and the required resource amount, thereby effectively utilizing the system resources.

[0044] In some embodiments, the meta-task module of at least the first meta-task constructed is implemented as structured data through task tags and dependency management, and stored in the meta-task template task library. The structured data includes the meta-task ID, meta-task name, meta-task input parameters, meta-task output type, meta-task execution logic, and meta-task version number. Through standardized task definitions and structured storage, a template task chain that is easy to dynamically combine and reuse is formed to support efficient task processing in different complex scenarios. The meta-task module combines task dependency modeling, multi-scenario scalability, and dynamic configuration adjustment functions, so that the template task chain can be adjusted and reused in real time as demand changes.

[0045] In some embodiments, in step S208, the meta-task module corresponding to each meta-task in at least one meta-task is input into the task chain generation model to generate a template task chain corresponding to the user task, including: querying whether a template task chain consisting of meta-task modules corresponding to all meta-tasks in at least one meta-task is stored; in response to determining that a template task chain consisting of meta-task modules corresponding to all meta-tasks in at least one meta-task is not stored, constructing and storing a template task chain consisting of meta-task modules corresponding to all meta-tasks in at least one meta-task based on the meta-task modules corresponding to all meta-tasks in at least one meta-task.

[0046] In this embodiment, in the template task chain generation model, by querying and reusing the template task chain that matches the task requirements, the system resource consumption caused by repeatedly building the template task chain is effectively reduced.

[0047] In some embodiments, constructing and storing a template task chain consisting of meta-task modules corresponding to all meta-tasks in at least one meta-task includes: analyzing the dependency relationships between the meta-task modules corresponding to each meta-task in at least one meta-task; in response to determining that the dependency relationships form a closed loop, returning a conflict detection prompt; and in response to determining that the dependency relationships do not form a closed loop, setting execution rules between the meta-task modules corresponding to each meta-task in at least one meta-task based on the dependency relationships to generate and store a template task chain corresponding to a user task.

[0048] In this embodiment, a conflict detection mechanism is provided for the construction of the template task chain to avoid the formation of a closed-loop task chain, thereby improving the stability of task scheduling.

[0049] In some embodiments, the execution rules between the meta-task modules of each meta-task in at least one meta-task include one of the following: sequential execution, parallel execution, and conditional triggering. In this embodiment, sequential execution means that after all dependencies of the node task are completed, execution is started in sequence in a preset order; concurrent execution means that tasks with independent dependencies can be scheduled concurrently; conditional triggering means dynamically selecting a branch path based on task rules.

[0050] In this embodiment, specific reference rules for constructing a template task chain are provided: sequential execution, parallel execution, and conditional triggering, which is different from a solution that may only disclose one of the execution rules, thereby improving the adaptability of task scheduling.

[0051] It should be noted that the constructed template task chain is defined as a data structure corresponding to the template task chain, which includes template task chain classification information, template task chain keywords, and template task chain version number. The template task chain classification information indicates the field to which the template task chain is applicable, such as the field of text processing, scientific research, or data analysis; the template task chain keywords are used to quickly find field tasks associated with the template task chain; the template task chain version number is used to store multiple versions of the template task chain. Each dynamically adjusted task chain generates a new version, which is saved in the database for subsequent backtracking and optimization.

[0052] In some embodiments, a template task chain is constructed based on user task requirements, meta-task module execution rules and dependency generation mechanism, and the logical relationship is represented as a directed acyclic graph. The meta-task module is used as a node, and the execution dependency relationship and process control are used as the edges of the directed acyclic graph. For example: if task A must be completed after task B, connect A→B; add conditional judgment logic to form a branch path, for example, task C needs to be started after task A is completed and condition X is met, which is represented as: A(condition X)→C.

[0053] In some embodiments, when user needs, operating environment and other conditions change, the existing template task chain is also dynamically adjusted to ensure that the task can adapt to the new execution scenario. The triggering conditions for dynamic adjustment include manual adjustment of the template and reconstruction of the template task chain caused by the detection of external condition changes. Adjustment and reconstruction include adding meta-task modules, deleting meta-task modules, replacing meta-task modules and changes in meta-task module dependencies.

[0054] In some embodiments, Figure 3 Shown according to Figure 2 The workflow diagram of the task scheduling model in step S210 is shown in FIG. Figure 3As shown, the template task chain is input into the task scheduling model, and the scheduling of the user task is performed, including: step S302, obtaining the meta-task characteristics of each meta-task module in at least one meta-task module in the template task chain; step S304, based on the meta-task characteristics of each meta-task module in at least one meta-task module and historical task information, calculating the weight value of each meta-task module in at least one meta-task module; step S306, obtaining system resources and memory bandwidth, and generating a priority list of all meta-task modules of at least one meta-task module based on the system resources, memory bandwidth and the weight values ​​of all meta-task modules of at least one meta-task module; step S308, allocating system resources to each meta-task module in the priority list based on the priority list, and scheduling the task according to the priority list and the allocated system resources. Source, execute the scheduling of each meta-task module in the priority list; step S310, obtain the scheduling result after the execution of each meta-task module in the priority list, and re-acquire the system resources and memory bandwidth; step S312, based on the scheduling result after the execution of each meta-task module in the priority list, the weight value of the meta-task module, the re-acquired system resources and memory bandwidth, update the priority list of the meta-task modules to be executed in the priority list; and step S314, based on the updated priority list, reallocate system resources for the meta-task modules to be executed in the priority list, and execute the scheduling of the meta-task modules to be executed in the priority list according to the updated priority list and the reallocated system resources; until the scheduling of all meta-task modules of at least one meta-task module in the template task chain is completed.

[0055] In this embodiment, for the task scheduling model based on task weights, resource competition and allocation are performed according to task resource requirements and system conditions, and the system resource utilization is improved through a system resource dynamic allocation mechanism.

[0056] In some preferred implementations of the present embodiment, in step S314, based on the updated priority list, reallocating system resources for the meta-task modules to be executed in the priority list includes reallocating system resources for each meta-task module to be executed in the priority list; and scheduling the meta-task modules to be executed in the priority list according to the updated priority list and the reallocated system resources includes executing each meta-task module to be executed in the priority list.

[0057] In some embodiments, obtaining the meta-task features of each meta-task module in at least one meta-task module in a template task chain includes: traversing the meta-task modules in the template task chain, extracting the corresponding meta-task features stored in each meta-task module, and the meta-task features provide a structured context for the calculation of the task scheduling model.

[0058] In some embodiments, the calculation formula of the weight value of the meta-task module is as follows:

[0059] W = α × p + β × (R-1) + γ × (T-1)

[0060] Among them, W represents the weight value of the meta-task module, p represents the meta-task priority corresponding to the meta-task module, R represents the meta-task resource requirement corresponding to the meta-task module, T represents the meta-task time limit constraint corresponding to the meta-task module, and α, β, and γ represent the weight adjustment parameters of p, R, and T respectively. The larger the value of W, the higher the priority of the corresponding meta-task module; the meta-task resource requirement includes the number of CPU cores and GPU memory; the meta-task time limit constraint includes the start execution time and execution duration of the corresponding meta-task module.

[0061] In this embodiment, the meta-task module weight value is calculated by comprehensively considering the meta-task module priority, the meta-task module resource demand and the meta-task module time constraint, and the effectiveness of system resource allocation is improved according to the importance of the meta-task module and the system real-time resources.

[0062] In some embodiments, in step S310, historical task information is loaded from the task scheduling log, including the scheduling result data of the historical meta-task module, the scheduling results of the meta-task module include the actual resource usage, scheduling completion time and scheduling execution label, wherein the scheduling execution label includes scheduling success, scheduling failure, scheduling timeout, scheduling pause, scheduling cancellation, scheduling start and scheduling end.

[0063] In some optional implementations of this embodiment, the number of task scheduling retries may be specified, and after detecting that the scheduling execution tag is a scheduling failure, the process jumps to the backup process.

[0064] In this embodiment, the meta-task scheduling result provides parameters for dynamic allocation of resources, and the real-time integration of system resources is achieved through actual resource usage, scheduling completion time, and scheduling execution tags, so as to reduce the waste of system resources.

[0065] In some optional implementations of this embodiment, when the load exceeds the limit, the task scheduling model can immediately suspend the tasks after the set sequence number in the meta-task module priority list or adjust the resource allocation parameters. The set sequence number is adjusted according to the actual usage scenario and will not be repeated here.

[0066] In the task scheduling method according to the embodiment of the present disclosure, not only can the efficiency of task scheduling be improved through the template task chain generation strategy, but also the resource utilization rate can be improved through the dynamic allocation mechanism of system resources based on the meta-task module weight.

[0067] Figure 4 FIG. 4 is a block diagram of a task scheduling device 400 according to an embodiment of the present disclosure. Figure 4As shown, the task scheduling device 400 includes a task parsing module 402, a task decomposition module 404, a meta-task module construction module 406, a task chain generation module 408, and a meta-task scheduling module 410. The task parsing module 402 is used to process the user task to obtain the task characteristics of the user task; the task decomposition module 404 is used to decompose the user task into at least one meta-task, wherein each meta-task in the at least one meta-task is the smallest executable unit of task scheduling; the meta-task module construction module 406, in response to determining that the meta-task module corresponding to at least the first meta-task in the at least one meta-task is not stored in the memory, constructs and stores the meta-task module corresponding to at least the first meta-task, so that the meta-task module corresponding to each meta-task in the at least one meta-task is stored in the memory; the task chain generation module 408 is used to input the meta-task module corresponding to each meta-task in the at least one meta-task into the task chain generation model to generate a template task chain corresponding to the user task; and the meta-task scheduling module 410 is used to input the template task chain into the task scheduling model to perform the scheduling of the user task.

[0068] In some optional implementations of this embodiment, the meta-task module of each meta-task in at least one meta-task stores corresponding meta-task features, wherein the meta-task features include meta-task resource requirements, meta-task priority levels, and meta-task time constraints.

[0069] In some embodiments, the task chain generation module 408 further includes: a first sub-module, used to query whether a template task chain consisting of meta-task modules corresponding to all meta-tasks in at least one meta-task is stored; and a second sub-module, used to, in response to determining that a template task chain consisting of meta-task modules corresponding to all meta-tasks in at least one meta-task is not stored, construct and store a template task chain consisting of meta-task modules corresponding to all meta-tasks in at least one meta-task based on the meta-task modules corresponding to all meta-tasks in at least one meta-task.

[0070] In some optional implementations of this embodiment, the second sub-module further includes: a module for analyzing the dependency relationship between the meta-task modules corresponding to each meta-task in at least one meta-task; a module for returning a conflict detection prompt in response to determining that the dependency relationship forms a closed loop; and a module for setting execution rules between the meta-task modules corresponding to each meta-task in at least one meta-task based on the dependency relationship in response to determining that the dependency relationship does not form a closed loop, so as to generate and store a template task chain corresponding to the user task.

[0071] In some optional implementations of this embodiment, the execution rules between the meta-task modules of each meta-task in at least one meta-task include one of the following: sequential execution, parallel execution, and conditional triggering. In this embodiment, sequential execution means that after all dependencies of the node task are completed, execution is started in sequence in a preset order; concurrent execution means that tasks with independent dependencies can be scheduled concurrently; conditional triggering means dynamically selecting a branch path based on task rules.

[0072] In some embodiments, the meta-task scheduling module 410 further includes: a module for obtaining the meta-task characteristics of each meta-task module in at least one meta-task module in the template task chain; a module for calculating the weight value of each meta-task module in at least one meta-task module based on the meta-task characteristics of each meta-task module in at least one meta-task module and historical task information; a module for obtaining system resources and memory bandwidth, and generating a priority list of all meta-task modules of at least one meta-task module based on the system resources, memory bandwidth and the weight values ​​of all meta-task modules of at least one meta-task module; a module for allocating system resources to each meta-task module in the priority list based on the priority list, and executing the priority list according to the priority list and the allocated system resources. A module for scheduling each meta-task module in the list; a module for obtaining the scheduling result after execution of each meta-task module in the priority list, and reacquiring system resources and memory bandwidth; a module for updating the priority list of meta-task modules to be executed in the priority list based on the scheduling result after execution of each meta-task module in the priority list, the weight value of the meta-task module, and the reacquired system resources and memory bandwidth; and a module for reallocating system resources to the meta-task modules to be executed in the priority list based on the updated priority list, and scheduling the meta-task modules to be executed in the priority list according to the updated priority list and the reallocated system resources, until the scheduling of all meta-task modules of at least one meta-task module in the template task chain is completed.

[0073] In some preferred implementations of the present embodiment, based on the updated priority list, reallocating system resources for the meta-task modules to be executed in the priority list includes reallocating system resources for each meta-task module to be executed in the priority list; and scheduling the meta-task modules to be executed in the priority list according to the updated priority list and the reallocated system resources includes executing each meta-task module to be executed in the priority list.

[0074] In some optional implementations of this embodiment, the calculation formula of the weight value of the meta-task module is as follows:

[0075] W = α × p + β × (R-1) + γ × (T-1)

[0076] Among them, W represents the weight value of the meta-task module, p represents the meta-task priority corresponding to the meta-task module, R represents the meta-task resource demand corresponding to the meta-task module, T represents the meta-task time constraint corresponding to the meta-task module, and α, β and γ represent the weight adjustment parameters of p, R and T respectively.

[0077] In some optional implementations of this embodiment, the scheduling results of the meta-task module include actual resource usage, scheduling completion time, and scheduling execution tags, wherein the scheduling execution tags include scheduling success, scheduling failure, scheduling timeout, scheduling pause, scheduling cancellation, scheduling start, and scheduling end.

[0078] It should be noted that Figure 4 The various modules of the apparatus 400 shown in FIG. Figure 2 The steps in the method 200 described above correspond to each other. Therefore, the operations, features and advantages described above for the method 200 are also applicable to the device 400 and the modules and units included therein. For the sake of brevity, some operations, features and advantages are not repeated here.

[0079] According to an embodiment of the present disclosure, an electronic device, a readable storage medium and a computer program product are also provided.

[0080] refer to Figure 5 , a block diagram of an electronic device 500 that can be used as a server or client of the present disclosure will now be described, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0081] like Figure 5 As shown, the electronic device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 can also be stored. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0082] Multiple components in the electronic device 500 are connected to the I / O interface 505, including: an input unit 506, an output unit 507, a storage unit 508, and a communication unit 509. The input unit 506 can be any type of device that can input information to the electronic device 500. The input unit 506 can receive input digital or character information and generate key signal input related to user settings and / or function control of the electronic device, and can include but is not limited to a mouse, a keyboard, a touch screen, a track pad, a track ball, a joystick, a microphone, and / or a remote controller. The output unit 507 can be any type of device that can present information, and can include but is not limited to a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 508 can include but is not limited to a disk, an optical disk. The communication unit 509 allows the electronic device 500 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and can include but is not limited to a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth device, an 802.11 device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.

[0083] The computing unit 501 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 501 performs the various methods and processes described above, such as method 200. For example, in some embodiments, the method 200 may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 500 via ROM 502 and / or communication unit 509. When the computer program is loaded into RAM 503 and executed by the computing unit 501, one or more steps of the method 200 described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to perform the method 200 in any other appropriate manner (e.g., by means of firmware).

[0084] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0085] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0086] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0087] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0088] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), the Internet, and a blockchain network.

[0089] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0090] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0091] Although the embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it should be understood that the above-mentioned methods, systems and devices are merely exemplary embodiments or examples, and the scope of the present invention is not limited by these embodiments or examples, but only by the claims after authorization and their equivalent scope. Various elements in the embodiments or examples can be omitted or replaced by their equivalent elements. In addition, each step can be performed in an order different from that described in the present disclosure. Further, the various elements in the embodiments or examples can be combined in various ways. It is important that with the evolution of technology, many elements described herein can be replaced by equivalent elements that appear after the present disclosure.

Claims

1. A task scheduling method, comprising: Processing the user task to obtain the task characteristics of the user task; Based on the task feature, decomposing the user task into at least one meta-task, wherein each meta-task in the at least one meta-task is a minimum executable unit of task scheduling; In response to determining that the meta-task module corresponding to at least a first meta-task of the at least one meta-task is not stored in the memory, constructing and storing the meta-task module corresponding to the at least first meta-task, so that the meta-task module corresponding to each meta-task of the at least one meta-task is stored in the memory; Inputting the meta-task module corresponding to each meta-task of the at least one meta-task into a task chain generation model to generate a template task chain corresponding to the user task; and The template task chain is input into a task scheduling model to execute the scheduling of the user task.

2. The task scheduling method according to claim 1, wherein: The meta-task module corresponding to each meta-task of the at least one meta-task stores corresponding meta-task features, wherein the meta-task features include meta-task resource requirements, meta-task priority levels, and meta-task time constraints.

3. The task scheduling method according to claim 1 or 2, wherein: The step of inputting the meta-task module corresponding to each meta-task in the at least one meta-task into a task chain generation model to generate a template task chain corresponding to the user task comprises: query whether a template task chain consisting of meta-task modules corresponding to all meta-tasks of the at least one meta-task is stored; and In response to determining that a template task chain consisting of meta-task modules corresponding to all meta-tasks in the at least one meta-task is not stored, a template task chain consisting of meta-task modules corresponding to all meta-tasks in the at least one meta-task is constructed and stored based on the meta-task modules corresponding to all meta-tasks in the at least one meta-task.

4. The task scheduling method according to claim 3, wherein: The step of constructing and storing a template task chain consisting of meta-task modules corresponding to all meta-tasks in the at least one meta-task comprises: Analyzing the dependency relationship between the meta-task modules corresponding to each meta-task in the at least one meta-task; In response to determining that the dependency relationship forms a closed loop, returning a conflict detection prompt; and In response to determining that no closed loop exists in the dependency relationship, an execution rule between the meta-task modules corresponding to each meta-task in the at least one meta-task is set based on the dependency relationship to generate and store a template task chain corresponding to the user task.

5. The task scheduling method according to claim 4, wherein: The execution rules between the meta-task modules of each meta-task in the at least one meta-task include one of the following: sequential execution, parallel execution, and conditional triggering.

6. The task scheduling method according to claim 3 or 5, wherein: The step of inputting the template task chain into a task scheduling model and executing the scheduling of the user task includes: Acquire a meta-task feature of each meta-task module in at least one meta-task module in the template task chain; Calculate a weight value of each meta-task module in the at least one meta-task module based on the meta-task feature of each meta-task module in the at least one meta-task module and the historical task information; Acquire system resources and memory bandwidth, and generate a priority list of all meta-task modules of the at least one meta-task module based on the system resources, memory bandwidth, and weight values ​​of all meta-task modules of the at least one meta-task module; Allocate system resources to each meta-task module in the priority list based on the priority list, and perform scheduling of each meta-task module in the priority list according to the priority list and the allocated system resources; Obtaining the scheduling result after execution of each meta-task module in the priority list, and re-obtaining system resources and memory bandwidth; Based on the scheduling result after execution of each meta-task module in the priority list, the weight value of the meta-task module, the reacquired system resources and memory bandwidth, updating the priority list of the meta-task modules to be executed in the priority list; and Based on the updated priority list, system resources are reallocated for the meta-task modules to be executed in the priority list, and scheduling of the meta-task modules to be executed in the priority list is performed according to the updated priority list and the reallocated system resources until the scheduling of all meta-task modules of at least one meta-task module in the template task chain is completed.

7. The task scheduling method according to claim 6, wherein: The calculation formula of the weight value of the meta-task module is as follows: W = α × p + β × (R-1) + γ × (T-1) Among them, W represents the weight value of the meta-task module, p represents the meta-task priority corresponding to the meta-task module, R represents the meta-task resource demand corresponding to the meta-task module, T represents the meta-task time constraint corresponding to the meta-task module, and α, β and γ represent the weight adjustment parameters of p, R and T respectively.

8. The task scheduling method according to claim 6 or 7, wherein: The scheduling result of the meta-task module includes actual resource usage, scheduling completion time and scheduling execution label, wherein the scheduling execution label includes scheduling success, scheduling failure, scheduling timeout, scheduling pause, scheduling cancellation, scheduling start and scheduling end.

9. A task scheduling device, comprising: A task parsing module, used for processing user tasks to obtain task features of the user tasks; A task decomposition module, used for decomposing the user task into at least one meta-task, wherein each meta-task in the at least one meta-task is the smallest executable unit of task scheduling; a meta-task module construction module, in response to determining that the meta-task module corresponding to at least a first meta-task in the at least one meta-task is not stored in the memory, constructing and storing the meta-task module corresponding to the at least first meta-task, so that the meta-task module corresponding to each meta-task in the at least one meta-task is stored in the memory; a task chain generation module, configured to input the meta-task module corresponding to each meta-task in the at least one meta-task into a task chain generation model to generate a template task chain corresponding to the user task; and The meta-task scheduling module is used to input the template task chain into the task scheduling model to execute the scheduling of the user task.

10. The task scheduling device according to claim 9, wherein: The meta-task module corresponding to each meta-task in the at least one meta-task stores corresponding meta-task features, wherein the meta-task features include meta-task resource requirements, meta-task priority levels, and meta-task time constraints.

11. The task scheduling device according to claim 9 or 10, wherein: The task chain generation module further includes: A first submodule is used to query whether a template task chain consisting of meta-task modules corresponding to all meta-tasks of the at least one meta-task is stored; and The second submodule is used for constructing and storing a template task chain consisting of meta-task modules corresponding to all meta-tasks in the at least one meta-task in response to determining that the template task chain consisting of meta-task modules corresponding to all meta-tasks in the at least one meta-task is not stored, based on the meta-task modules corresponding to all meta-tasks in the at least one meta-task.

12. The task scheduling device according to claim 11, wherein: The second submodule further comprises: a module for analyzing dependencies between the meta-task modules corresponding to each meta-task in the at least one meta-task; A module for returning a conflict detection prompt in response to determining that the dependency relationship forms a closed loop; and A module for setting, in response to determining that no closed loop exists in the dependency relationship, execution rules between the meta-task modules corresponding to each meta-task in the at least one meta-task based on the dependency relationship to generate and store a template task chain corresponding to the user task.

13. The task scheduling device according to claim 12, wherein: The execution rules between the meta-task modules corresponding to each meta-task in the at least one meta-task include one of the following: sequential execution, parallel execution and conditional triggering.

14. The task scheduling device according to claim 11 or 13, wherein: The meta-task scheduling module further includes: A module for obtaining meta-task features of each meta-task module in at least one meta-task module in the template task chain; A module for calculating a weight value of each meta-task module in the at least one meta-task module based on the meta-task features of each meta-task module in the at least one meta-task module and historical task information; A module for obtaining system resources and memory bandwidth, and generating a priority list of all meta-task modules of the at least one meta-task module based on the system resources, memory bandwidth and weight values ​​of all meta-task modules of the at least one meta-task module; A module for allocating system resources to each meta-task module in the priority list based on the priority list, and executing the scheduling of each meta-task module in the priority list according to the priority list and the allocated system resources; A module for obtaining the scheduling result after execution of each meta-task module in the priority list, and re-acquiring system resources and memory bandwidth; a module for updating a priority list of meta-task modules to be executed in the priority list based on a scheduling result after execution of each meta-task module in the priority list, a weight value of the meta-task module, the reacquired system resources and memory bandwidth; and A module for reallocating system resources for the meta-task modules to be executed in the priority list based on the updated priority list, and executing the scheduling of the meta-task modules to be executed in the priority list according to the updated priority list and the reallocated system resources, until the scheduling of all meta-task modules of at least one meta-task module in the template task chain is completed.

15. The task scheduling device according to claim 14, wherein: The calculation formula of the weight value of the meta-task module is as follows: W = α × p + β × (R-1) + γ × (T-1) Among them, W represents the weight value of the meta-task module, p represents the meta-task priority corresponding to the meta-task module, R represents the meta-task resource demand corresponding to the meta-task module, T represents the meta-task time constraint corresponding to the meta-task module, and α, β and γ represent the weight adjustment parameters of p, R and T respectively.

16. The task scheduling device according to claim 14 or 15, wherein: The scheduling result of the meta-task module includes actual resource usage, scheduling completion time and scheduling execution label, wherein the scheduling execution label includes scheduling success, scheduling failure, scheduling timeout, scheduling pause, scheduling cancellation, scheduling start and scheduling end.

17. An electronic device comprising: at least one processor; as well as a memory communicatively coupled to the at least one processor; in The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 8.

18. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-8.

19. A computer program product comprising a computer program, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

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

    CN112948079A

  • Task scheduling method and device, electronic equipment, storage medium and program product

    CN117234693A

  • Fault diagnosis execution method, fault diagnosis execution system, electronic equipment and storage medium

    CN117873909A

  • Multi-agent task processing method and device, computer equipment and storage medium

    CN117992231A

  • Task execution method and device based on large model

    CN118519680A