A task scheduling method and device, electronic equipment and storage medium

By building and updating the connection entropy of the task pipeline, dynamic tasks are generated and executed, solving the problems of high task orchestration costs and inefficient resource utilization, and achieving flexible and efficient task scheduling.

CN117608802BActive Publication Date: 2026-06-30SHANGHAI SUIYUAN TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI SUIYUAN TECH CO LTD
Filing Date
2023-12-13
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Existing task orchestration methods have high learning and maintenance costs, lack concurrency control strategies, are inefficient in utilizing scheduling resources, and are difficult to adapt to various application scenarios.

Method used

By constructing a first pipeline for static tasks, determining the connection entropy based on the connection relationships and execution order, and generating a second pipeline for dynamic tasks, the executor executes the target dynamic tasks and updates the connection entropy in real time until all task processing is completed.

Benefits of technology

It reduces the learning and maintenance costs of task orchestration methods, improves the flexibility of task execution and resource utilization efficiency, and adapts to a variety of application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117608802B_ABST
    Figure CN117608802B_ABST
Patent Text Reader

Abstract

This invention discloses a task scheduling method, apparatus, electronic device, and storage medium, comprising: responding to user-configured target task information, constructing a first pipeline including multiple static tasks; determining the current connection entropy of each static task based on the connection relationships and execution order between the static tasks; generating a second pipeline including multiple dynamic tasks after detecting that the execution thread of the first pipeline has been triggered; determining a target dynamic task based on the current connection entropy of each dynamic task; executing the target dynamic task through an executor; updating the current connection entropy of the remaining dynamic tasks in the second pipeline in real time; returning to execute the operation of determining the target dynamic task based on the current connection entropy of each dynamic task; until all dynamic tasks have been processed. The technical solution of this invention can reduce the learning and maintenance costs of task orchestration methods and achieve efficient utilization of task scheduling resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a task scheduling method, apparatus, electronic device, and storage medium. Background Technology

[0002] A continuous processing pipeline includes continuous integration (CI), continuous delivery (CD), and continuous deployment (CD) processes. The pipeline can include multiple tasks, such as compilation, unit testing, code scanning, and integration testing, which can be executed sequentially or in parallel. Therefore, the proper orchestration and scheduling of tasks within the pipeline is crucial.

[0003] In existing technologies, task orchestration usually requires users to use code or static configuration files, resulting in high learning and maintenance costs and a lack of flexibility. Secondly, existing task scheduling methods lack concurrency control strategies and cannot efficiently utilize scheduling resources. The task execution environment is relatively fixed and singular, making it difficult to adapt to various application scenarios. Summary of the Invention

[0004] This invention provides a task scheduling method, apparatus, electronic device, and storage medium, which can reduce the learning and maintenance costs of task orchestration methods, achieve efficient utilization of task scheduling resources, and improve the flexibility of the task execution process.

[0005] According to one aspect of the present invention, a task scheduling method is provided, the method comprising:

[0006] In response to user-configured target task information, a first pipeline including multiple static tasks is constructed based on the target task information, and the current connection entropy corresponding to each static task is determined based on the connection relationship and execution order between the static tasks in the first pipeline.

[0007] After the first pipeline execution thread is detected to be triggered, a second pipeline including multiple dynamic tasks is generated based on each static task and the connection relationship between them.

[0008] Based on the current connection entropy corresponding to each dynamic task, the target dynamic task to be distributed is determined, and the target dynamic task is executed by the executor.

[0009] During the execution of the target dynamic task, the current connection entropy of the remaining dynamic tasks in the second pipeline is updated in real time according to the execution status of the target dynamic task.

[0010] Return to the execution process and determine the target dynamic task to be dispatched based on the current connection entropy corresponding to each dynamic task, until the processing of all dynamic tasks is completed.

[0011] According to another aspect of the present invention, a task scheduling apparatus is provided, the apparatus comprising:

[0012] The task response module is used to respond to the target task information configured by the user, construct a first pipeline including multiple static tasks according to the target task information, and determine the current connection entropy corresponding to each static task according to the connection relationship and execution order between the static tasks in the first pipeline.

[0013] The dynamic task generation module is used to generate a second pipeline that includes multiple dynamic tasks based on each static task and the connection relationship between them after the first pipeline execution thread is triggered.

[0014] The task execution module is used to determine the target dynamic task to be distributed based on the current connection entropy corresponding to each dynamic task, and to execute the target dynamic task through the executor;

[0015] The connection entropy update module is used to update the current connection entropy of the remaining dynamic tasks in the second pipeline in real time according to the execution status of the target dynamic task during the execution of the target dynamic task.

[0016] The loop execution module is used to return the operation of determining the target dynamic task to be dispatched based on the current connection entropy corresponding to each dynamic task, until the processing of all dynamic tasks is completed.

[0017] According to another aspect of the present invention, an electronic device is provided, the device comprising:

[0018] At least one processor; and

[0019] A memory communicatively connected to the at least one processor; wherein,

[0020] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the task scheduling method according to any embodiment of the present invention.

[0021] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the task scheduling method described in any embodiment of the present invention.

[0022] According to another aspect of the present invention, a computer program product is provided, the computer program product comprising a computer program that, when executed by a processor, implements the task scheduling method described in any embodiment of the present invention.

[0023] The technical solution provided by this invention, in response to user-configured target task information, constructs a first pipeline including multiple static tasks; determines the current connection entropy of each static task based on the connection relationships and execution order between them; after detecting that the execution thread of the first pipeline is triggered, generates a second pipeline including multiple dynamic tasks based on each static task and the connection relationships between them; determines the target dynamic task to be distributed based on the current connection entropy of each dynamic task, and executes the target dynamic task through an executor; updates the current connection entropy of the remaining dynamic tasks in the second pipeline in real time based on the execution status of the target dynamic task; and returns to execute the operation of determining the target dynamic task to be distributed based on the current connection entropy of each dynamic task, until all dynamic tasks are processed. This technical means can reduce the learning and maintenance costs of task orchestration methods, achieve efficient utilization of task scheduling resources, and improve the flexibility of the task execution process.

[0024] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0025] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0026] Figure 1 This is a flowchart of a task scheduling method provided according to an embodiment of the present invention;

[0027] Figure 2a This is a flowchart of another task scheduling method provided according to an embodiment of the present invention;

[0028] Figure 2b This is a schematic diagram of the structure of a first production line according to an embodiment of the present invention;

[0029] Figure 2c This is a schematic diagram of the attribute structure of a static task according to an embodiment of the present invention;

[0030] Figure 2dThis is a schematic diagram of the attribute structure of a dynamic task according to an embodiment of the present invention;

[0031] Figure 3 This is a flowchart of another task scheduling method provided according to an embodiment of the present invention;

[0032] Figure 4 This is a schematic diagram of the structure of a task scheduling device according to an embodiment of the present invention;

[0033] Figure 5 This is a schematic diagram of the electronic device structure for implementing the task scheduling method of this invention. Detailed Implementation

[0034] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0035] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0036] Figure 1 This is a flowchart of a task scheduling method provided in Embodiment 1 of the present invention. This embodiment is applicable to the orchestration and scheduling of tasks in a pipeline. The method can be executed by a task scheduling device, which can be implemented in hardware and / or software and can be configured in an electronic device. Figure 1 As shown, the method includes:

[0037] Step 110: In response to the target task information configured by the user, construct a first pipeline including multiple static tasks according to the target task information, and determine the current connection entropy corresponding to each static task according to the connection relationship and execution order between the static tasks in the first pipeline.

[0038] In this embodiment, user-configured target task information can be received through a visual static configuration management platform. The static configuration management platform can be an application platform including front-end and back-end components or a microservice, and multiple atomic tasks are pre-encapsulated as plugins within the platform.

[0039] Specifically, users can assemble pre-stored atomic tasks into target task information in the static configuration management platform according to actual task execution requirements, or develop target task information online through the static configuration management platform. This embodiment does not impose any restrictions on this. After obtaining the target task information configured by the user, the target task information (including the relative positional relationships between tasks and the execution order, etc.) can be stored in the database.

[0040] In this embodiment, after saving the target task information to the database, a first pipeline including multiple static tasks can be constructed based on the target task information. Then, based on the connection relationships and execution order between the static tasks in the first pipeline, the current connection entropy of each static task is calculated. Specifically, the current connection entropy of a certain static task can be used to reflect the execution information of other tasks whose execution order precedes that static task.

[0041] Step 120: After the first pipeline execution thread is detected to be triggered, a second pipeline including multiple dynamic tasks is generated based on each static task and the connection relationship between each static task.

[0042] In this embodiment, after detecting that the user has triggered the execution thread of the first pipeline, or after detecting that the execution thread of the first pipeline has been triggered according to a preset trigger timer, a second pipeline including multiple dynamic tasks can be generated.

[0043] In one specific embodiment, optionally, each static task and task attribute in the first pipeline can be copied to obtain multiple corresponding dynamic tasks.

[0044] Step 130: Determine the target dynamic task to be distributed based on the current connection entropy corresponding to each dynamic task, and execute the target dynamic task through the executor.

[0045] In this embodiment, specifically, the scheduler can traverse the dynamic tasks in the second pipeline, determine the target dynamic task based on the current connection entropy of each dynamic task, distribute the target dynamic task, and execute the target dynamic task through the executor.

[0046] Step 140: During the execution of the target dynamic task, the current connection entropy of the remaining dynamic tasks in the second pipeline is updated in real time according to the execution status of the target dynamic task.

[0047] In this implementation, the execution state of the target dynamic task includes a running state and a final state. The running state can include waiting and running, and the final state can include success, failure, cancellation, skipping, timeout, etc.

[0048] Step 150: Determine whether the processing of all dynamic tasks has been completed. If yes, the task scheduling process is considered complete. If not, return to step 130 to determine the target dynamic task to be distributed based on the current connection entropy of each dynamic task, until the processing of all dynamic tasks is completed.

[0049] In this embodiment, by providing a visual static configuration management platform to respond to user-orchestrated task information, the learning and maintenance costs of task orchestration methods can be reduced. Secondly, the target task configuration information can include serial and parallel execution strategies. The scheduler determines the target dynamic task to be distributed based on the current connection entropy corresponding to each dynamic task, and the executor executes the target dynamic task, thereby achieving efficient utilization of scheduling resources. Furthermore, the executor in this embodiment can be adapted to various application scenarios (such as containers, Pods, physical machines, virtual machines, mobile terminals, and in-vehicle operating systems), thereby improving the flexibility of the task execution process.

[0050] The technical solution provided by this invention, in response to user-configured target task information, constructs a first pipeline including multiple static tasks; determines the current connection entropy of each static task based on the connection relationships and execution order between them; after detecting that the execution thread of the first pipeline is triggered, generates a second pipeline including multiple dynamic tasks based on each static task and the connection relationships between them; determines the target dynamic task to be distributed based on the current connection entropy of each dynamic task, and executes the target dynamic task through an executor; updates the current connection entropy of the remaining dynamic tasks in the second pipeline in real time based on the execution status of the target dynamic task; and returns to execute the operation of determining the target dynamic task to be distributed based on the current connection entropy of each dynamic task, until all dynamic tasks are processed. This technical means can reduce the learning and maintenance costs of task orchestration methods, achieve efficient utilization of task scheduling resources, and improve the flexibility of the task execution process.

[0051] Figure 2a This is a flowchart of a task scheduling method provided in Embodiment 2 of the present invention. This embodiment is a further refinement of the above embodiment. Figure 2a As shown, the method includes:

[0052] Step 210: In response to the target task information configured by the user, construct a first pipeline including multiple static tasks based on the target task information, and sequentially obtain a static task as the current task in the first pipeline.

[0053] Step 220: Determine the output information entropy of the previous task located before the current task based on the connection relationship and execution order between the static tasks in the first pipeline.

[0054] Step 230: Obtain the number of task branches preceding the current task, and determine the current connection entropy corresponding to the current task based on the output information entropy of the previous task and the number of task branches.

[0055] In this embodiment, Figure 2b This can be a schematic diagram of a first pipeline structure, which may include multiple static tasks (e.g. Figure 2b (As shown in the rectangle in the image). After obtaining the first pipeline, the entire first pipeline can be traversed, and the current connection entropy of each static task can be calculated. Specifically, as shown in the rectangle in the image. Figure 2b As shown, a strategy of "branching and doubling, summing and adding" can be used to calculate the current connection entropy of each static task in the first pipeline. The numbers in the rectangles represent the current connection entropy of the static tasks, and the numbers above the connecting lines between the rectangles represent the output information entropy of the tasks.

[0056] In one specific embodiment Figure 2c It can be a schematic diagram of the attribute structure of a static task, such as... Figure 2c As shown, after determining the current connection entropy corresponding to a static task, the current connection entropy, unique identifier, label, running script, current position, and next set of tasks corresponding to the static task can be saved as attribute information of the static task to the database.

[0057] Step 240: After the first pipeline execution thread is detected to be triggered, a second pipeline including multiple dynamic tasks is generated based on each static task and the connection relationship between each static task.

[0058] In this embodiment, after the first pipeline execution thread is detected to be triggered, the static tasks in the first pipeline and the attributes of each static task can be copied to obtain the second pipeline.

[0059] In one specific embodiment Figure 2d It can be a schematic diagram of the attribute structure of a dynamic task, such as Figure 2dAs shown, the attributes of a dynamic task include not only the attributes of the corresponding static task, but also attributes used to record the execution information of the dynamic task, such as running status, running log, timestamp, and unique identifier.

[0060] Step 250: Based on the current connection entropy corresponding to each dynamic task, select the dynamic task with a current connection entropy of zero as the target dynamic task and distribute the target dynamic task to the message queue.

[0061] In this step, the scheduler can iterate through the dynamic tasks in the second pipeline and extract the dynamic tasks with zero connection entropy to distribute to the message queue. If there are no dynamic tasks with zero connection entropy in the second pipeline, it continues to wait.

[0062] Step 260: The executor sequentially retrieves each target dynamic task from the message queue and executes each target dynamic task.

[0063] In this embodiment, since the number of executors is limited, task load balancing and traffic shaping can be achieved by distributing the target dynamic tasks to the buffered message queue and then having the executors pull each target dynamic task from the message queue in sequence.

[0064] Step 270: During the execution of the target dynamic task, the current connection entropy of the remaining dynamic tasks in the second pipeline is updated in real time according to the execution status of the target dynamic task.

[0065] Step 280: Determine whether the processing of all dynamic tasks is complete. If yes, the task scheduling process is considered complete. If not, return to step 250 and perform the operation of taking the dynamic task with the current connection entropy of zero as the target dynamic task based on the current connection entropy of each dynamic task, until the processing of all dynamic tasks is complete.

[0066] The technical solution provided by this invention, in response to user-configured target task information, constructs a first pipeline including multiple static tasks, sequentially obtains one static task as the current task, determines the output information entropy of the previous task before the current task based on the connection relationship and execution order between static tasks, obtains the number of task branches before the current task, determines the current connection entropy of the current task based on the output information entropy of the previous task and the number of task branches, and after detecting that the execution thread of the first pipeline is triggered, generates a second pipeline including multiple dynamic tasks, distributes the dynamic tasks with a current connection entropy of zero as target dynamic tasks to a message queue, sequentially pulls each target dynamic task from the message queue through the executor, executes each target dynamic task, updates the current connection entropy of the remaining dynamic tasks in the second pipeline in real time, and determines whether the processing of all dynamic tasks is complete. If not, it returns to the operation of taking the dynamic task with a current connection entropy of zero as the target dynamic task based on the current connection entropy of each dynamic task until the processing of all dynamic tasks is completed. This technical means can reduce the learning and maintenance costs of task orchestration methods, efficiently utilize task scheduling resources, and achieve task load balancing and traffic shaping.

[0067] Figure 3 This is a flowchart of another task scheduling method provided in Embodiment 3 of the present invention. This embodiment is a further refinement of the above embodiments. Figure 3 As shown, the method includes:

[0068] Step 310: In response to the target task information configured by the user, construct a first pipeline including multiple static tasks according to the target task information, and determine the current connection entropy corresponding to each static task according to the connection relationship and execution order between the static tasks in the first pipeline.

[0069] Step 320: After the first pipeline execution thread is detected to be triggered, a second pipeline including multiple dynamic tasks is generated based on each static task and the connection relationship between them.

[0070] Step 330: Based on the current connection entropy corresponding to each dynamic task, take the dynamic task with a current connection entropy of zero as the target dynamic task, and distribute the target dynamic task to the target message queue that matches the task tag according to the task tag.

[0071] In this step, the scheduler can distribute the target dynamic task to the target message queue that matches the task tag, based on the task tag corresponding to the target dynamic task.

[0072] In this embodiment, different message queues correspond to different task labels, and different executors correspond to different task labels.

[0073] Step 340: Using the target executor that matches the task tag, sequentially retrieve each target dynamic task from the target message queue and execute each target dynamic task.

[0074] In one embodiment of this example, the target executor sequentially retrieves each target dynamic task from the target message queue and executes each target dynamic task, including: sequentially retrieving each target dynamic task from the target message queue through the execution controller in the target executor, distributing each target dynamic task to each execution unit, and executing each target dynamic task through each execution unit; when it is detected that the number of currently running execution units meets a preset number threshold, controlling the execution controller to stop retrieving target dynamic tasks.

[0075] In a specific embodiment, after the execution controller retrieves the target dynamic task, it can start the execution unit and distribute the target dynamic task to the execution unit. After the execution unit completes the execution of the target dynamic task, it can feed back the execution result and running status corresponding to the target dynamic task to the execution controller, which then feeds back the execution result and running status to the scheduler.

[0076] In one specific embodiment, the execution controller in the target executor sequentially retrieves each target dynamic task from the target message queue, including: obtaining the task priority corresponding to each target dynamic task in the target message queue; and retrieving each target dynamic task sequentially according to the task priority corresponding to each target dynamic task in the target message queue through the execution controller in the target executor.

[0077] Step 350: During the execution of the target dynamic task, the current connection entropy of the remaining dynamic tasks in the second pipeline is updated in real time according to the execution status of the target dynamic task.

[0078] Step 360: Determine whether the processing of all dynamic tasks is complete. If yes, the task scheduling process is considered complete. If not, return to step 330 and perform the operation of taking the dynamic task with the current connection entropy of zero as the target dynamic task based on the current connection entropy of each dynamic task, until the processing of all dynamic tasks is complete.

[0079] The technical solution provided by this invention constructs a first pipeline including multiple static tasks in response to user-configured target task information. Based on the connection relationships and execution order of the static tasks in the first pipeline, the current connection entropy corresponding to each static task is determined. After detecting that the execution thread of the first pipeline is triggered, a second pipeline including multiple dynamic tasks is generated. Based on the current connection entropy corresponding to each dynamic task, the dynamic task with a current connection entropy of zero is selected as the target dynamic task. The target dynamic task is then distributed to a target message queue matching the task tag. The target executor matching the task tag sequentially retrieves each target dynamic task from the target message queue and executes it. The current connection entropy of the remaining dynamic tasks in the second pipeline is updated in real time based on the execution status of the target dynamic tasks. It is then determined whether the processing of all dynamic tasks is complete. If not, the process returns to the previous one, selecting the dynamic task with a current connection entropy of zero as the target dynamic task, until the processing of all dynamic tasks is completed. This technical approach reduces the learning and maintenance costs of task orchestration methods and efficiently utilizes task scheduling resources.

[0080] Figure 4 This is a schematic diagram of a task scheduling device provided in Embodiment 4 of the present invention. The device includes: a task response module 410, a dynamic task generation module 420, a task execution module 430, a connection entropy update module 440, and a loop execution module 450.

[0081] The task response module 410 is used to respond to the target task information configured by the user, construct a first pipeline including multiple static tasks according to the target task information, and determine the current connection entropy corresponding to each static task according to the connection relationship and execution order between the static tasks in the first pipeline.

[0082] The dynamic task generation module 420 is used to generate a second pipeline including multiple dynamic tasks based on each static task and the connection relationship between each static task after detecting that the first pipeline execution thread is triggered.

[0083] The task execution module 430 is used to determine the target dynamic task to be distributed based on the current connection entropy corresponding to each dynamic task, and to execute the target dynamic task through the executor.

[0084] The connection entropy update module 440 is used to update the current connection entropy of the remaining dynamic tasks in the second pipeline in real time according to the execution status of the target dynamic task during the execution of the target dynamic task.

[0085] The loop execution module 450 is used to return the operation of determining the target dynamic task to be dispatched based on the current connection entropy corresponding to each dynamic task, until the processing of all dynamic tasks is completed.

[0086] The technical solution provided by this invention, in response to user-configured target task information, constructs a first pipeline including multiple static tasks; determines the current connection entropy of each static task based on the connection relationships and execution order between them; after detecting that the execution thread of the first pipeline is triggered, generates a second pipeline including multiple dynamic tasks based on each static task and the connection relationships between them; determines the target dynamic task to be distributed based on the current connection entropy of each dynamic task, and executes the target dynamic task through an executor; updates the current connection entropy of the remaining dynamic tasks in the second pipeline in real time based on the execution status of the target dynamic task; and returns to execute the operation of determining the target dynamic task to be distributed based on the current connection entropy of each dynamic task, until all dynamic tasks are processed. This technical means can reduce the learning and maintenance costs of task orchestration methods, achieve efficient utilization of task scheduling resources, and improve the flexibility of the task execution process.

[0087] Based on the above embodiments, the task response module 410 includes:

[0088] The static task acquisition unit is used to sequentially acquire one static task as the current task from all static tasks included in the first pipeline;

[0089] The information entropy determination unit is used to determine the output information entropy of the previous task located before the current task based on the connection relationship and execution order between each static task in the first pipeline.

[0090] The current connection entropy determination unit is used to obtain the number of task branches preceding the current task, and determine the current connection entropy corresponding to the current task based on the output information entropy of the previous task and the number of task branches.

[0091] Task execution module 430 includes:

[0092] The target task determination unit is used to identify dynamic tasks with a current connection entropy of zero as target dynamic tasks based on the current connection entropy corresponding to each dynamic task, and to distribute the target dynamic tasks to the message queue.

[0093] An executor execution unit is used to sequentially pull each target dynamic task from the message queue through the executor and execute each target dynamic task.

[0094] The task tag matching unit is used to distribute the target dynamic task to the target message queue that matches the task tag according to the task tag corresponding to the target dynamic task;

[0095] The executor label matching unit is used to sequentially retrieve each target dynamic task in the target message queue through the target executor that matches the task label, and execute each target dynamic task.

[0096] The actuator control unit is used to sequentially retrieve each target dynamic task from the target message queue through the execution controller in the target executor, and distribute each target dynamic task to each execution unit for execution.

[0097] The quantity detection unit is used to control the execution controller to stop pulling the target dynamic task when it detects that the number of currently running execution units meets the preset quantity threshold.

[0098] The task priority acquisition unit is used to acquire the task priority corresponding to each target dynamic task in the target message queue;

[0099] The priority processing unit is used to sequentially retrieve each target dynamic task in the target message queue according to the task priority corresponding to each target dynamic task in the target executor through the execution controller in the target executor.

[0100] The above-described apparatus can execute the methods provided in all the foregoing embodiments of the present invention, and has the corresponding functional modules and beneficial effects for executing the above methods. Technical details not described in detail in the embodiments of the present invention can be found in the methods provided in all the foregoing embodiments of the present invention.

[0101] Figure 5 A schematic diagram of the structure of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the invention described and / or claimed herein.

[0102] like Figure 5As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0103] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0104] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as task scheduling methods.

[0105] In some embodiments, the task scheduling method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or mounted on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the task scheduling method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the task scheduling method by any other suitable means (e.g., by means of firmware).

[0106] Various embodiments 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-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0107] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0108] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0109] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device 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 provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, 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 sound input, voice input, or tactile input).

[0110] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0111] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through a communication network. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0112] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0113] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A task scheduling method, characterized in that, The method includes: In response to user-configured target task information, a first pipeline including multiple static tasks is constructed based on the target task information, and the current connection entropy corresponding to each static task is determined based on the connection relationship and execution order between the static tasks in the first pipeline. After the first pipeline execution thread is detected to be triggered, a second pipeline including multiple dynamic tasks is generated based on each static task and the connection relationship between them. Based on the current connection entropy corresponding to each dynamic task, the target dynamic task to be distributed is determined, and the target dynamic task is executed by the executor. During the execution of the target dynamic task, the current connection entropy of the remaining dynamic tasks in the second pipeline is updated in real time according to the execution status of the target dynamic task. Return to the execution process and determine the target dynamic task to be dispatched based on the current connection entropy corresponding to each dynamic task, until the processing of all dynamic tasks is completed.

2. The method according to claim 1, characterized in that, Based on the connection relationships and execution order among the static tasks in the first pipeline, the current connection entropy corresponding to each static task is determined, including: In the first pipeline, one static task is selected as the current task from all static tasks included in the first pipeline. Based on the connection relationship and execution order between the static tasks in the first pipeline, determine the output information entropy of the previous task that precedes the current task; Obtain the number of task branches preceding the current task, and determine the current connection entropy corresponding to the current task based on the output information entropy of the previous task and the number of task branches.

3. The method according to claim 1, characterized in that, Based on the current connection entropy corresponding to each dynamic task, determine the target dynamic tasks to be distributed, including: Based on the current connection entropy corresponding to each dynamic task, the dynamic task with a current connection entropy of zero is taken as the target dynamic task, and the target dynamic task is distributed to the message queue. Executing the target dynamic task through an executor includes: The executor sequentially pulls each target dynamic task from the message queue and executes each target dynamic task.

4. The method according to claim 3, characterized in that, Distributing the target dynamic task to the message queue includes: Based on the task tag corresponding to the target dynamic task, the target dynamic task is distributed to the target message queue that matches the task tag; The executor sequentially retrieves each target dynamic task from the message queue and executes each target dynamic task, including: The target executor, which matches the task tag, sequentially retrieves each target dynamic task from the target message queue and executes each target dynamic task.

5. The method according to claim 4, characterized in that, The target executor sequentially retrieves each target dynamic task from the target message queue and executes each target dynamic task, including: The execution controller in the target executor sequentially retrieves each target dynamic task from the target message queue and distributes each target dynamic task to each execution unit, which then executes each target dynamic task. When the number of currently running execution units is detected to meet a preset threshold, the execution controller is controlled to stop fetching the target dynamic task.

6. The method according to claim 5, characterized in that, The execution controller in the target executor sequentially retrieves each target dynamic task from the target message queue, including: Retrieve the task priority corresponding to each target dynamic task in the target message queue; The execution controller in the target executor retrieves each target dynamic task sequentially according to the task priority corresponding to each target dynamic task in the target message queue.

7. A task scheduling device, characterized in that, The device includes: The task response module is used to respond to the target task information configured by the user, construct a first pipeline including multiple static tasks according to the target task information, and determine the current connection entropy corresponding to each static task according to the connection relationship and execution order between the static tasks in the first pipeline. The dynamic task generation module is used to generate a second pipeline that includes multiple dynamic tasks based on each static task and the connection relationship between them after the first pipeline execution thread is triggered. The task execution module is used to determine the target dynamic task to be distributed based on the current connection entropy corresponding to each dynamic task, and to execute the target dynamic task through the executor; The connection entropy update module is used to update the current connection entropy of the remaining dynamic tasks in the second pipeline in real time according to the execution status of the target dynamic task during the execution of the target dynamic task. The loop execution module is used to return the operation of determining the target dynamic task to be dispatched based on the current connection entropy corresponding to each dynamic task, until the processing of all dynamic tasks is completed.

8. An electronic device, characterized in that, The device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the task scheduling method according to any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the task scheduling method of any one of claims 1-6.

10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the task scheduling method according to any one of claims 1-6.