CN117971433A - Task scheduling method, device, electronic equipment and readable medium - Google Patents

Task scheduling method, device, electronic equipment and readable medium Download PDF

Info

Publication number
CN117971433A
CN117971433A CN202410223115.0A CN202410223115A CN117971433A CN 117971433 A CN117971433 A CN 117971433A CN 202410223115 A CN202410223115 A CN 202410223115A CN 117971433 A CN117971433 A CN 117971433A
Authority
CN
China
Prior art keywords
task
allocated
information
resource combination
acquiring
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410223115.0A
Other languages
Chinese (zh)
Inventor
张骞丹
邓宗平
蔡平
程宏达
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China International Marine Containers Group Co Ltd
CIMC Container Group Co Ltd
CIMC IoT Technology Co Ltd
Shenzhen CIMC Smart Parking Co Ltd
Original Assignee
China International Marine Containers Group Co Ltd
CIMC Container Group Co Ltd
CIMC IoT Technology Co Ltd
Shenzhen CIMC Smart Parking Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China International Marine Containers Group Co Ltd, CIMC Container Group Co Ltd, CIMC IoT Technology Co Ltd, Shenzhen CIMC Smart Parking Co Ltd filed Critical China International Marine Containers Group Co Ltd
Priority to CN202410223115.0A priority Critical patent/CN117971433A/en
Publication of CN117971433A publication Critical patent/CN117971433A/en
Pending legal-status Critical Current

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application belongs to the technical field of data processing, and particularly relates to a task scheduling method, a task scheduling device, electronic equipment and a readable medium. The method comprises the following steps: when a task allocation trigger signal is detected, resource allocation information of a task to be allocated is obtained, wherein the resource allocation information represents a subtask to be allocated, which needs to be subjected to reallocation, in the task to be allocated; based on constraint conditions associated with the subtasks, acquiring a target resource combination for receiving the tasks to be allocated; acquiring task allocation information of the target resource combination, wherein the task allocation information represents a current execution task of each target device in the target resource combination; and distributing the task to be distributed to the target resource combination based on the task distribution information and the resource distribution information to obtain task redistribution information. The application can improve the efficiency of task execution and the utilization degree of execution resources.

Description

Task scheduling method, device, electronic equipment and readable medium
Technical Field
The application belongs to the technical field of data processing, and particularly relates to a task scheduling method, a task scheduling device, electronic equipment and a readable medium.
Background
Tasks in a business scenario generally need to be executed together with hardware resources, so that when the tasks are scheduled again, the tasks are generally allocated to corresponding hardware resources in combination with the occupation condition of the hardware resources and the execution time of the overall tasks.
When one of the hardware resources fails, the reassignment of the task is triggered, generally, each task is assigned to other hardware resources without failure, if the relevance on the hardware resources exists among the tasks, the assignment mode cannot guarantee the optimal solution of reassignment, namely, the executable performance and the execution time of the task cannot be guaranteed, and the execution efficiency of the task is not facilitated.
Disclosure of Invention
The application aims to provide a task scheduling method, a task scheduling device, electronic equipment/computer readable media, which can improve task execution efficiency and execution resource utilization degree.
According to an aspect of the embodiment of the present application, there is provided a task scheduling method, including:
When a task allocation trigger signal is detected, resource allocation information of a task to be allocated is obtained, wherein the resource allocation information represents a subtask to be allocated, which needs to be subjected to reallocation, in the task to be allocated, and the task to be allocated consists of a plurality of subtasks to be allocated, which have a front-back sequence;
Acquiring a target resource combination for receiving the task to be allocated based on a constraint condition associated with a subtask, wherein the constraint condition associated with the subtask represents that the subtask with an association relationship is executed by equipment with the association relationship;
acquiring task allocation information of the target resource combination, wherein the task allocation information represents a current execution task of each target device in the target resource combination;
and distributing the task to be distributed to the target resource combination based on the task distribution information and the resource distribution information to obtain task redistribution information.
According to an aspect of an embodiment of the present application, there is provided a task scheduling device including:
The system comprises a task to be allocated information acquisition module, a task allocation triggering module and a task allocation module, wherein the task to be allocated information acquisition module is used for acquiring resource allocation information of a task to be allocated when a task allocation triggering signal is detected, the resource allocation information represents a subtask to be allocated which needs to be subjected to reallocation in the task to be allocated, and the task to be allocated consists of a plurality of subtasks to be allocated in a front-back sequence;
The target combination searching module is used for acquiring a target resource combination for receiving the task to be allocated based on a constraint condition associated with a subtask, wherein the constraint condition associated with the subtask represents that the subtask with an association relationship is executed by equipment with the association relationship;
The resource acquisition module is used for acquiring task allocation information of the target resource combination, wherein the task allocation information represents the current execution task of each target device in the target resource combination;
And the task reassignment module is used for assigning the task to be assigned to the target resource combination based on the task assignment information and the resource assignment information to obtain task reassignment information.
According to an aspect of an embodiment of the present application, there is provided an electronic apparatus including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the task scheduling method as in the above technical solution via execution of the executable instructions.
According to an aspect of the embodiments of the present application, there is provided a computer-readable medium having stored thereon a computer program which, when executed by a processor, implements a task scheduling method as in the above technical solution.
According to an aspect of embodiments of the present application, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions so that the computer device performs the task scheduling method as in the above technical solution.
In the technical scheme provided by the embodiment of the application, when a task allocation trigger signal is detected, resource allocation information of a task to be allocated is obtained, the resource allocation information represents a subtask to be allocated which needs to be allocated in the task to be allocated, a target resource combination for receiving the task to be allocated is obtained according to constraint conditions associated with the subtask, the task allocation information of the target resource combination is obtained, the task to be allocated is allocated to the target resource combination based on the task allocation information and the resource allocation information, the task reallocation information is obtained, when the task allocation trigger signal is detected, the task to be allocated cannot be executed according to an original plan, therefore, the resource allocation information of the task to be allocated needs to be obtained, the target resource combination for receiving the task to be allocated is obtained according to constraint conditions associated with the subtask, the constraint conditions associated with the subtask represent that the subtask to be allocated can be executed by equipment with an association relation, the execution effect of the task to be allocated can be guaranteed according to the front and back sequence of each subtask to be allocated, the task allocation information and the resource allocation information of the task to be allocated are allocated, the execution efficiency of the task to be allocated to the task allocation information is guaranteed, and the resource allocation efficiency of the task allocation to be allocated to a certain degree is improved.
Other features and advantages of the application will be apparent from the following detailed description, or may be learned by the practice of the application.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application. It is evident that the drawings in the following description are only some embodiments of the present application and that other drawings may be obtained from these drawings without inventive effort for a person of ordinary skill in the art.
Fig. 1 shows a flow chart of a task scheduling method according to an embodiment of the present application.
Fig. 2 schematically shows a block diagram of a task scheduling device according to an embodiment of the present application.
Fig. 3 schematically shows a block diagram of a computer system suitable for use in implementing an embodiment of the application.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the application may be practiced without one or more of the specific details, or with other methods, components, devices, steps, etc. In other instances, well-known methods, devices, implementations, or operations are not shown or described in detail to avoid obscuring aspects of the application.
The block diagrams depicted in the figures are merely functional entities and do not necessarily correspond to physically separate entities. That is, the functional entities may be implemented in software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
The flow diagrams depicted in the figures are exemplary only, and do not necessarily include all of the elements and operations/steps, nor must they be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the order of actual execution may be changed according to actual situations.
Fig. 1 shows a flow chart of a task scheduling method according to an embodiment of the present application. As shown in fig. 1, the task scheduling method includes:
S100, when a task allocation trigger signal is detected, resource allocation information of tasks to be allocated is obtained, wherein the resource allocation information represents sub-tasks to be allocated, which are required to be allocated again, in the tasks to be allocated, and the tasks to be allocated are composed of a plurality of sub-tasks to be allocated, which are arranged in sequence.
Specifically, the task allocation trigger signal indicates that the task cannot continue to execute according to the original plan.
The reason why the task allocation trigger signal is detected may be that a part of the devices are damaged and that there are tasks that have been allocated but have not yet been executed, and that the tasks need to be reallocated; or the execution time of part of tasks is too long, so that the subsequent tasks in the same resource combination cannot be executed to cause blockage.
When the task allocation trigger signal is detected, resource allocation information of the tasks to be allocated is acquired, wherein the task allocation information consists of a plurality of sub-tasks to be allocated, and the sub-tasks to be allocated have a front-back sequence.
S200, acquiring a target resource combination for receiving the task to be allocated based on constraint conditions associated with the subtasks, wherein the constraint conditions associated with the subtasks represent that the subtasks with the association relationship are executed by equipment with the association relationship.
The constraint condition associated with a specific subtask refers to that the subtask with the association relationship is executed through the device with the association relationship. The subtasks with the association relation refer to the subtasks to be distributed, which have a front-to-back sequence, in the tasks to be distributed. Devices with an association relationship refer to devices belonging to the same resource combination.
Based on constraint conditions associated with the subtasks, a target resource combination capable of receiving the to-be-allocated tasks and the target resource combination is an execution resource combination composed of a plurality of devices and capable of executing a plurality of to-be-allocated subtasks in the to-be-allocated tasks.
The tasks to be allocated are illustratively a car taking task, which includes an AGV subtask, a transfer task, an elevator subtask, and a car hall subtask.
An apparatus for performing a target resource combination of a pick-up task includes: elevator, car hall, middle indexing. Wherein the elevator is used for executing elevator subtasks, the car hall is used for executing car hall subtasks, and the transfer is used for executing transfer tasks.
The same device in the target resource combination may have one or more.
S300, task allocation information of the target resource combination is obtained, wherein the task allocation information represents the current execution task of each target device in the target resource combination.
Specifically, when the target resource combination is obtained, and the target resource combination has a task being executed, task allocation information of the target resource combination needs to be obtained, and the task allocation information represents a currently executed task of each target device in the target resource combination.
It should be noted that there may be multiple types of target devices in the target resource combination, where the types of tasks performed by the different types of target devices are different, and the number of target devices of the same type is more than one.
The task allocation information can indicate which target devices are in an idle state and which target devices are in a busy state and the time required for the target devices in the busy state to perform all tasks.
S400, based on the task allocation information and the resource allocation information, the task to be allocated is allocated to the target resource combination, and task reallocation information is obtained.
Specifically, determining target equipment capable of being allocated with tasks in a target resource combination according to the task allocation information, and obtaining task reallocation information of target equipment corresponding to a subtask allocation value to be allocated according to the resource allocation information.
The task allocation information is used for ensuring that target equipment capable of executing sub-tasks to be allocated in the target resource combination can ensure that all the sub-tasks to be allocated can be executed in time on one hand. Meanwhile, the resource allocation information also indicates the front-back sequence of each sub-task to be allocated, and only after the execution of the former sub-task to be allocated is completed, the subsequent sub-task to be allocated can be executed.
Therefore, when the task is reassigned, the front-back sequence of the sub-tasks to be assigned needs to be considered, so that the sub-tasks to be assigned with the front sequence can be guaranteed to be executed and completed preferentially, the sub-tasks to be assigned with the rear sequence are guaranteed not to be blocked, and therefore the execution effect of the tasks to be assigned is guaranteed. In the embodiment of the application, when a task allocation trigger signal is detected, resource allocation information of a task to be allocated is obtained, the resource allocation information is used for representing sub-tasks to be allocated which need to be allocated in the task to be allocated, a target resource combination for receiving the task to be allocated is obtained according to constraint conditions associated with the sub-tasks, the task allocation information of the target resource combination is obtained, and the information to be allocated is allocated to the target resource combination based on the task allocation information and the resource allocation information, so that task allocation information is obtained. When the task allocation trigger signal is detected, the task to be allocated cannot be executed according to the original plan, so that the resource allocation information of the task to be allocated needs to be acquired, and the target resource combination of the task to be allocated received by the user is acquired according to the constraint condition associated with the subtask. The constraint conditions associated with the subtasks indicate that the subtasks to be allocated of the tasks can be executed by the equipment with the association relation, so that the target resource combination can ensure that the execution of the subtasks to be allocated is performed in sequence, the execution effect of the tasks to be allocated is ensured, the task execution efficiency is ensured, and the utilization degree of execution resources is improved to a certain extent.
Further, S100, when detecting the task allocation trigger signal, acquires resource allocation information of a task to be allocated, including:
S110, acquiring a plurality of subtasks forming the task to be distributed and an execution body of each subtask.
S120, task execution history information and task execution states of each execution subject are obtained, and subtasks which are not executed in the tasks to be distributed are determined.
And S130, confirming the resource allocation information of the task to be allocated according to the subtasks which are not executed yet.
Specifically, a plurality of subtasks of a task to be allocated and an execution body of each subtask are acquired. And determining task execution history information and task execution states of the execution main body, and determining sub-tasks which are not executed in the tasks to be allocated so as to determine resource allocation information which needs to be reallocated.
The execution subject of each subtask refers to the subject that executes the subtask, and may specifically be a target device in a target resource combination.
The task execution history information and the task execution state of each execution subject are acquired, and it can be determined which subtasks in the tasks to be allocated have been executed or are being executed.
The subtasks that have not yet been executed need to be reassigned, as an alternative implementation, when the subtasks are in execution, but the execution time is too long to cause the blocking of the subsequent tasks of the execution body, the execution state of the subtasks can be interrupted, and the subtasks can be classified into the subtasks that have not yet been executed, and the subtasks are waiting for reassignment as resource assignment information.
In this embodiment, by acquiring a plurality of subtasks of a task to be allocated and an execution subject of each subtask, acquiring task execution history information and task execution status of each execution subject, determining subtasks which are not yet executed in the task to be allocated, and recording the subtasks which are not yet executed in the resource allocation information as the subtasks to be allocated, resource waste caused by repeated execution of the subtasks can be avoided, in addition, when the execution process of the subtasks is too long to cause task blocking, the subtasks can be recorded in the resource allocation information, and task execution resource tension caused by too long execution process is avoided.
Further, S200, based on constraint conditions associated with the subtasks, obtaining a target resource combination for receiving the task to be allocated, includes:
S210, acquiring an initial resource combination for executing the task to be allocated before the task allocation trigger information is detected.
S220, acquiring a target resource combination matched with the equipment type information according to the equipment type information of the initial resource combination, wherein the equipment type information represents the equipment type required by executing the task to be allocated.
Specifically, the initial resource combination is an execution resource that executes the task to be allocated before the task allocation trigger signal is detected. When the task allocation trigger signal is detected, the initial resource combination is indicated to be incapable of continuously executing the task to be allocated, and in order to be capable of sequentially executing the task to be allocated, a target resource combination matched with the equipment type information of the initial resource combination is required to be acquired, and the target resource combination is used for receiving and executing the task to be allocated.
The device type information indicates device type information required to perform a task to be allocated, for example, a device type is capable of performing a subtask of a corresponding type, and thus the device type included in the target resource combination needs to be the same as the device type of the initial resource combination.
In this embodiment, an initial execution main body of the task to be allocated, that is, an initial resource combination is obtained, and a matched target resource combination is obtained according to device type information of the initial resource combination, so as to ensure that the task to be allocated can continue to be executed, and ensure execution efficiency of the task.
Further, S220, according to the device type information of the initial resource combination, acquires a target resource combination matched with the device type information, including:
S221, searching a plurality of alternative resource combinations matched with the device type information of the initial resource combination based on the device type information of the initial resource combination.
S222, obtaining the number of tasks to be executed of the alternative resource combination and the total execution time of the tasks.
S223, determining the number of tasks to be executed and the alternative resource combination of which the total execution time of the tasks meets the preset condition as a target resource combination.
Specifically, the device type information indicates a type composition of the target device in the alternative resource information.
The device types included in the initial resource information are, for example, type a, type B, and type C.
The alternative resource combinations need to include at least type a, type B, and type C.
After a plurality of alternative resource combinations are found according to the equipment type information, the number of execution tasks of each alternative resource combination and the total execution time of the tasks are obtained.
And determining the candidate resource combination with the number of the executed tasks and the total execution time of the tasks meeting the preset condition as the target resource combination.
Optionally, whether the number of the execution tasks meets a preset condition or whether the total execution time of the tasks meets the preset condition can be independently judged to determine the target resource combination.
On the basis, if the number of the alternative resource combinations meeting one of the conditions is too large, the alternative resource combinations meeting the two conditions are taken as target resource combinations.
As an alternative implementation manner, the alternative resource combination of the subtasks to be allocated, which can be rapidly executed in the preceding order, may be preferentially selected as the target resource combination according to the order of the subtasks to be allocated.
Illustratively, the first-order subtask to be assigned requires the use of a target device of device type A. The alternative resource combination 1 comprises two target devices of device type a, and the alternative resource combination 2 comprises one target device of device type a, but since both target devices of device type a in the alternative resource combination 1 have a task being performed, the target device of device type a in the alternative resource combination 2 has no task being performed.
For fast execution of the sub-tasks to be allocated with the preceding order, an alternative resource combination 2 is selected as the target resource combination.
In this embodiment, in order to ensure that the task to be allocated can be quickly executed, a plurality of selection conditions are set to select a target resource combination from the candidate resource combinations.
Further, S300, obtaining task allocation information of the target resource combination includes:
S310, a current execution task of the target resource combination is acquired to determine a subtask of the current execution task.
S320, acquiring a corresponding execution subject according to the task identification of the subtask.
S330, task information of the execution subject is obtained, and task allocation information of the target resource combination is obtained.
Specifically, the current execution task of the target resource combination is obtained, each subtask is determined by the current execution task of each target resource combination, the corresponding execution main body is obtained based on the task representation of the subtask, the task information of the execution main body is obtained, and the task allocation information of the target resource combination is obtained.
The task identification of the subtask indicates the type of the execution main body of the subtask, the execution main body of the type is searched in the target resource combination, the task information of the execution main body of the type is obtained, and the task allocation information of the target resource combination is obtained.
Further, S400, based on the task allocation information and the resource allocation information, allocates the task to be allocated to the target resource combination to obtain task reallocation information, including:
S410, obtaining equipment type information of the target resource combination, and determining equipment to be allocated according to the equipment type information and the resource allocation information, wherein the equipment to be allocated is used for executing subtasks to be allocated.
S420, the subtasks to be distributed are distributed to the corresponding devices to be distributed, and task reassignment information is obtained.
Specifically, the task allocation information indicates the task execution state of each target device in the target resource combination, and the device type corresponding to each subtask to be allocated is determined according to the resource allocation information, so that the target device capable of receiving the subtask to be allocated in the target resource combination is screened and used as the device to be allocated.
In this embodiment, the device to be allocated is determined according to the device type information and the resource allocation information, so as to quickly determine the execution subject of the subtask to be allocated, and ensure the execution effect of the subtask to be allocated.
Further, S420, allocating the subtasks to be allocated to the corresponding devices to be allocated, to obtain task reallocation information, including:
s421, task identifiers of subtasks to be distributed are obtained, and the number of corresponding devices to be distributed is obtained according to the task identifiers.
S422, the number of tasks to be executed of each device to be allocated is obtained, subtasks are allocated to the devices to be allocated with fewer execution tasks, and task reallocation information is obtained.
As an alternative implementation manner, in order to enable each subtask to be allocated to be executed quickly, when a plurality of devices to be allocated of the same type exist, the subtask to be allocated is allocated to one with a smaller number of tasks to be executed, so that the subtask to be allocated can be executed quickly, and the execution duration of the irritability to be allocated is reduced.
After the task reassignment information is formed, the utilization rate of the target resource combination can be improved, and meanwhile, the execution time of all the tasks is not improved, so that the execution efficiency of the tasks to be assigned is ensured.
Fig. 2 schematically shows a block diagram of a task scheduling device according to an embodiment of the present application.
As shown in fig. 2, the task scheduling device includes:
The task to be allocated information obtaining module 21 is configured to obtain resource allocation information of a task to be allocated when a task allocation trigger signal is detected, where the resource allocation information indicates a subtask to be allocated, which needs to be allocated again, in the task to be allocated, and the task to be allocated is composed of a plurality of subtasks to be allocated in a front-to-back order.
The target combination searching module 22 is configured to obtain a target resource combination for receiving a task to be allocated based on a constraint condition associated with a subtask, where the constraint condition associated with the subtask indicates that the subtask with an association relationship is executed by a device with an association relationship.
The resource obtaining module 23 is configured to obtain task allocation information of the target resource combination, where the task allocation information indicates a currently executed task of each target device in the target resource combination.
The task reassignment module 24 is configured to assign the task to be assigned to the target resource combination based on the task assignment information and the resource assignment information, and obtain task reassignment information.
Further, the task information to be distributed acquisition module 21 includes:
And the execution body confirming unit is used for acquiring a plurality of subtasks forming the task to be distributed and the execution body of each subtask.
And the unexecuted subtask confirming unit is used for acquiring the task execution history information and the task execution state of each execution main body and determining the subtasks which are not executed in the tasks to be distributed.
And the resource allocation information confirming unit is used for confirming the resource allocation information of the task to be allocated according to the subtasks which are not executed yet.
Further, the target combination lookup module 22 includes:
And the initial resource combination acquisition unit is used for acquiring the initial resource combination for executing the task to be allocated before the task allocation triggering information is detected.
And the target resource combination confirming unit is used for acquiring a target resource combination matched with the equipment type information according to the equipment type information of the initial resource combination, wherein the equipment type information represents the equipment type required by executing the task to be allocated.
Further, the target resource combination confirmation unit includes:
an alternative resource combination searching subunit, configured to search, based on the device type information of the initial resource combination, a plurality of alternative resource combinations that match the device type information of the initial resource combination.
And the task information confirming subunit is used for acquiring the number of tasks to be executed of the alternative resource combination and the total execution time of the tasks.
And the target resource combination confirming subunit is used for determining the candidate resource combinations with the number of the tasks to be executed and the total execution time of the tasks meeting the preset conditions as target resource combinations.
Further, the resource obtaining module 23 includes:
the current execution task acquisition unit is used for acquiring the current execution task of the target resource combination so as to determine the subtasks of the current execution task.
And the execution main body confirming unit is used for acquiring the corresponding execution main body according to the task identification of the subtask.
The task allocation information acquisition unit is used for acquiring the task information of the execution subject and obtaining the task allocation information of the target resource combination.
Further, the task reassignment module 24 includes:
The equipment to be allocated confirming unit is used for acquiring equipment type information of the target resource combination, determining equipment to be allocated according to the equipment type information and the resource allocation information, and executing subtasks to be allocated by the equipment to be allocated.
And the task reassignment unit is used for assigning the subtasks to be assigned to the corresponding devices to be assigned to obtain task reassignment information.
Further, the task reassignment unit includes:
The current execution task acquisition subunit is used for acquiring task identifiers of the subtasks to be distributed, and acquiring the number of corresponding devices to be distributed according to the task identifiers.
And the task reassignment subunit is used for acquiring the number of the tasks to be executed of each device to be assigned, assigning the subtasks to the devices to be assigned with fewer execution tasks, and obtaining task reassignment information.
Fig. 3 schematically shows a block diagram of a computer system of an electronic device for implementing an embodiment of the application.
It should be noted that, the computer system 700 of the electronic device shown in fig. 3 is only an example, and should not impose any limitation on the functions and the application scope of the embodiments of the present application.
As shown in fig. 3, the computer system 700 includes a central processing unit 701 (Central Processing Unit, CPU) that can perform various appropriate actions and processes according to a program stored in a Read-Only Memory 702 (ROM) or a program loaded from a storage section 708 into a random access Memory 703 (Random Access Memory, RAM). In the random access memory 703, various programs and data necessary for the system operation are also stored. The central processing unit 701, the read only memory 702, and the random access memory 703 are connected to each other via a bus 704. An Input/Output interface 705 (i.e., an I/O interface) is also connected to bus 704.
The following components are connected to the input/output interface 705: an input section 706 including a keyboard, a mouse, and the like; an output portion 707 including a Cathode Ray Tube (CRT), a Liquid crystal display (Liquid CRYSTAL DISPLAY, LCD), and a speaker, etc.; a storage section 708 including a hard disk or the like; and a communication section 709 including a network interface card such as a local area network card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. The drive 710 is also connected to the input/output interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read therefrom is mounted into the storage section 708 as necessary.
In particular, the processes described in the various method flowcharts may be implemented as computer software programs according to embodiments of the application. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 709, and/or installed from the removable medium 711. The computer programs, when executed by the central processor 701, perform the various functions defined in the system of the present application.
It should be noted that, the computer readable medium shown in the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-Only Memory (ROM), an erasable programmable read-Only Memory (Erasable Programmable Read Only Memory, EPROM), a flash Memory, an optical fiber, a portable compact disc read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present application, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functions of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the application. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, and includes several instructions to cause a computing device (may be a personal computer, a server, a touch terminal, or a network device, etc.) to perform the method according to the embodiments of the present application.
Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains.
It is to be understood that the application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (10)

1. A method for task scheduling, comprising:
When a task allocation trigger signal is detected, resource allocation information of a task to be allocated is obtained, wherein the resource allocation information represents a subtask to be allocated, which needs to be subjected to reallocation, in the task to be allocated, and the task to be allocated consists of a plurality of subtasks to be allocated, which have a front-back sequence;
Acquiring a target resource combination for receiving the task to be allocated based on a constraint condition associated with a subtask, wherein the constraint condition associated with the subtask represents that the subtask with an association relationship is executed by equipment with the association relationship;
acquiring task allocation information of the target resource combination, wherein the task allocation information represents a current execution task of each target device in the target resource combination;
and distributing the task to be distributed to the target resource combination based on the task distribution information and the resource distribution information to obtain task redistribution information.
2. The task scheduling method according to claim 1, wherein when the task allocation trigger signal is detected, acquiring resource allocation information of the task to be allocated includes:
acquiring a plurality of subtasks forming the task to be distributed and an execution main body of each subtask;
Acquiring task execution history information and task execution states of each execution subject, and determining sub-tasks which are not executed yet in the tasks to be distributed;
and confirming the resource allocation information of the task to be allocated according to the sub-task which is not executed yet.
3. The task scheduling method according to claim 1, wherein the obtaining a target resource combination for receiving the task to be allocated based on a constraint condition associated with a subtask includes:
Acquiring an initial resource combination for executing the task to be allocated before the task allocation triggering information is detected;
and acquiring a target resource combination matched with the equipment type information according to the equipment type information of the initial resource combination, wherein the equipment type information represents the equipment type required by executing the task to be allocated.
4. The task scheduling method of claim 3, wherein the obtaining, according to the device type information of the initial resource combination, a target resource combination that matches the device type information includes:
Searching a plurality of alternative resource combinations matched with the equipment type information of the initial resource combination based on the equipment type information of the initial resource combination;
Acquiring the number of tasks to be executed of the alternative resource combination and the total execution time of the tasks;
and determining the number of the tasks to be executed and the candidate resource combination of which the total execution time meets a preset condition as the target resource combination.
5. The task scheduling method according to claim 1, wherein the obtaining task allocation information of the target resource combination includes:
Acquiring a current execution task of the target resource combination to determine a subtask of the current execution task;
Acquiring a corresponding execution subject according to the task identification of the subtask;
And acquiring the task information of the execution subject to obtain the task allocation information of the target resource combination.
6. The task scheduling method according to claim 1, wherein the task to be allocated is allocated to the target resource combination based on the task allocation information and the resource allocation information to obtain task reallocation information, including:
Acquiring equipment type information of the target resource combination, and determining equipment to be allocated according to the equipment type information and the resource allocation information, wherein the equipment to be allocated is used for executing the subtasks to be allocated;
and distributing the subtasks to be distributed to the corresponding equipment to be distributed to obtain task redistribution information.
7. The method for task scheduling according to claim 6, wherein the allocating the subtasks to be allocated to the corresponding devices to be allocated to obtain task reallocation information includes:
acquiring a task identifier of the subtask to be allocated, and acquiring the number of corresponding equipment to be allocated according to the task identifier;
and acquiring the number of tasks to be executed of each device to be allocated, and allocating the subtasks to the devices to be allocated with fewer execution tasks to obtain the task reallocation information.
8. A task scheduling device, comprising:
The system comprises a task to be allocated information acquisition module, a task allocation triggering module and a task allocation module, wherein the task to be allocated information acquisition module is used for acquiring resource allocation information of a task to be allocated when a task allocation triggering signal is detected, the resource allocation information represents a subtask to be allocated which needs to be subjected to reallocation in the task to be allocated, and the task to be allocated consists of a plurality of subtasks to be allocated in a front-back sequence;
The target combination searching module is used for acquiring a target resource combination for receiving the task to be allocated based on a constraint condition associated with a subtask, wherein the constraint condition associated with the subtask represents that the subtask with an association relationship is executed by equipment with the association relationship;
The resource acquisition module is used for acquiring task allocation information of the target resource combination, wherein the task allocation information represents the current execution task of each target device in the target resource combination;
And the task reassignment module is used for assigning the task to be assigned to the target resource combination based on the task assignment information and the resource assignment information to obtain task reassignment information.
9. An electronic device, comprising:
A processor; and
A memory for storing executable instructions of the processor;
wherein the processor is configured to cause the electronic device to perform the task scheduling method of any one of claims 1 to 7 via execution of the executable instructions.
10. A computer readable medium, characterized in that the computer readable medium has stored thereon a computer program which, when executed by a processor, implements the task scheduling method of any one of claims 1 to 7.
CN202410223115.0A 2024-02-28 2024-02-28 Task scheduling method, device, electronic equipment and readable medium Pending CN117971433A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410223115.0A CN117971433A (en) 2024-02-28 2024-02-28 Task scheduling method, device, electronic equipment and readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410223115.0A CN117971433A (en) 2024-02-28 2024-02-28 Task scheduling method, device, electronic equipment and readable medium

Publications (1)

Publication Number Publication Date
CN117971433A true CN117971433A (en) 2024-05-03

Family

ID=90859634

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410223115.0A Pending CN117971433A (en) 2024-02-28 2024-02-28 Task scheduling method, device, electronic equipment and readable medium

Country Status (1)

Country Link
CN (1) CN117971433A (en)

Similar Documents

Publication Publication Date Title
CN108537543B (en) Parallel processing method, device, equipment and storage medium for blockchain data
US7779413B2 (en) Method of assigning available resources for internal and external users at start time of scheduled time period based on program reservations information
US6560628B1 (en) Apparatus, method, and recording medium for scheduling execution using time slot data
CN111768006A (en) Artificial intelligence model training method, device, equipment and storage medium
CN110413412B (en) GPU (graphics processing Unit) cluster resource allocation method and device
CN109669775B (en) Distributed task scheduling method, system and storage medium
CN108829512B (en) Cloud center hardware accelerated computing power distribution method and system and cloud center
CN109840149B (en) Task scheduling method, device, equipment and storage medium
EP3208709B1 (en) Batch processing method and device for system invocation commands
CN107515781B (en) Deterministic task scheduling and load balancing system based on multiple processors
CN111190712A (en) Task scheduling method, device, equipment and medium
CN113448743A (en) Method, electronic device and computer program product for task processing
CN105824705B (en) A kind of method for allocating tasks and electronic equipment
CN110543352B (en) Task allocation method of scheduling system and related device thereof
CN111338779B (en) Resource allocation method, device, computer equipment and storage medium
CN107977275B (en) Task processing method based on message queue and related equipment
CN106775975B (en) Process scheduling method and device
CN112286688A (en) Memory management and use method, device, equipment and medium
CN116166395A (en) Task scheduling method, device, medium and electronic equipment
CN115509704A (en) Task scheduling method, device, equipment and storage medium
CN111831411A (en) Task processing method and device, storage medium and electronic equipment
CN111143063B (en) Task resource reservation method and device
CN116881003A (en) Resource allocation method, device, service equipment and storage medium
CN111831408A (en) Asynchronous task processing method and device, electronic equipment and medium
CN116260876A (en) AI application scheduling method and device based on K8s and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination