CN115344370A - Task scheduling method, device, equipment and storage medium - Google Patents

Task scheduling method, device, equipment and storage medium Download PDF

Info

Publication number
CN115344370A
CN115344370A CN202210993819.7A CN202210993819A CN115344370A CN 115344370 A CN115344370 A CN 115344370A CN 202210993819 A CN202210993819 A CN 202210993819A CN 115344370 A CN115344370 A CN 115344370A
Authority
CN
China
Prior art keywords
scheduling
task
scheduled
tasks
determining
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
CN202210993819.7A
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN202210993819.7A priority Critical patent/CN115344370A/en
Publication of CN115344370A publication Critical patent/CN115344370A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the application provides a task scheduling method, a task scheduling device and a task scheduling storage medium, wherein the method comprises the following steps: after a task scheduling instruction is detected, determining scheduling time and scheduling flow information corresponding to each task to be scheduled according to a pre-configured task scheduling information set; according to the scheduling time corresponding to each task to be scheduled, determining to perform asynchronous scheduling and/or synchronous scheduling on each task to be scheduled; and synchronously and/or asynchronously scheduling each task to be scheduled according to the scheduling flow information corresponding to each task to be scheduled. The problem that a lightweight task scheduling tool in the prior art cannot provide a relatively complete scheduling scheme and function for complex scheduling tasks can be solved, and the waste of development and test resources is avoided.

Description

Task scheduling method, device, equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for task scheduling.
Background
With the continuous development of software technology, many enterprises can utilize an open source system for convenience to schedule various tasks. Currently, open source systems common in the industry belong to lightweight task scheduling tools, which can be used alone or in combination with corresponding applications to create task scheduling projects. Lightweight task scheduling tools can only provide simple scheduling schemes and management functions to handle simple scheduled tasks. For complex scheduling tasks, for example, scheduling tasks of large enterprise-level systems, especially currently popular distributed systems and micro-service architecture systems, not only can relatively complete scheduling schemes and functions be not provided, but also system failures are easy to occur, which results in waste of development and test resources.
Disclosure of Invention
In view of this, embodiments of the present application provide a task scheduling method, a task scheduling apparatus, a task scheduling device, and a storage medium, so as to solve a problem that a lightweight task scheduling tool in the prior art cannot provide a relatively complete scheduling scheme and function for a complex task scheduling scenario, and to avoid waste of development and test resources.
A first aspect of an embodiment of the present application provides a task scheduling method, where the method includes:
after a task scheduling instruction is detected, determining scheduling time and scheduling flow information corresponding to each task to be scheduled according to a pre-configured task scheduling information set;
according to the scheduling time corresponding to each task to be scheduled, determining to perform asynchronous scheduling and/or synchronous scheduling on each task to be scheduled;
and synchronously and/or asynchronously scheduling each task to be scheduled according to the scheduling flow information corresponding to each task to be scheduled.
A second aspect of the embodiments of the present application provides a task scheduling apparatus, where the apparatus includes:
the first determining module is used for determining scheduling time and scheduling process information corresponding to each task to be scheduled according to a pre-configured task scheduling information set after a task scheduling instruction is detected;
the second determining module is used for determining to perform asynchronous scheduling and/or synchronous scheduling on each task to be scheduled according to the scheduling time corresponding to each task to be scheduled;
and the scheduling module is used for synchronously and/or asynchronously scheduling each task to be scheduled according to the scheduling flow information corresponding to each task to be scheduled.
A third aspect of the embodiments of the present application provides a task scheduling device, including a memory, a processor, and a computer program stored in the memory and executable on the on-line claim settlement device, where the processor implements the steps of the task scheduling method provided in the first aspect when scheduling the computer program.
A fourth aspect of embodiments of the present application provides a computer-readable storage medium, where a computer program is stored, and when the computer program is scheduled by a processor, the computer program implements the steps of the task scheduling method provided in the first aspect.
Compared with the prior art, according to the task scheduling method provided by the first aspect of the embodiment of the application, after a task scheduling instruction is detected, scheduling time and scheduling process information corresponding to each task to be scheduled are determined according to a pre-configured task scheduling information set; then according to the scheduling time corresponding to each task to be scheduled, determining to perform asynchronous scheduling and/or synchronous scheduling on each task to be scheduled; and finally, synchronously and/or asynchronously scheduling each task to be scheduled according to the scheduling flow information corresponding to each task to be scheduled. The method comprises the steps of determining scheduling time and scheduling process information corresponding to each task to be scheduled according to a preset scheduling information set, and further determining asynchronous scheduling and/or synchronous scheduling of each task to be scheduled according to the scheduling time corresponding to each task to be scheduled, so that the problem that a light-weight task scheduling tool in the prior art cannot provide a relatively complete scheduling scheme and function for complex scheduling tasks can be solved, and the waste of development and test resources is avoided.
The beneficial effects provided by the second aspect to the fourth aspect of the embodiments of the present application are the same as those provided by the first aspect of the embodiments of the present application, and are not described herein again.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a flowchart illustrating an implementation of a task scheduling method according to an embodiment of the present application;
fig. 2 is a schematic application scenario diagram of a front-end script monitoring method according to an embodiment of the present application;
fig. 3 is a schematic flowchart illustrating an implementation of a task scheduling method according to another embodiment of the present application;
FIG. 4 is a flowchart illustrating an implementation of a task scheduling method according to another embodiment of the present application;
fig. 5 is a block diagram of a task scheduling apparatus according to an embodiment of the present application;
fig. 6 is a block diagram of a task scheduling apparatus according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of and not restrictive on the broad application.
The task scheduling method according to the embodiment of the application can be realized by task scheduling equipment. The task scheduling device includes but is not limited to a terminal device or a server. The server may be a single server or a cloud server cluster, and the terminal device may be a personal digital device, a notebook, a desktop computer, a smart wearable device, or a robot. And is not particularly limited herein.
The task scheduling method provided by the embodiment of the application is applied to a complex task scheduling scene, for example, a task scheduling scene of a large enterprise-level system or a task scheduling scene of a micro service architecture system. According to the task scheduling method provided by the embodiment of the application, after a task scheduling instruction is detected, scheduling time and scheduling flow information corresponding to each task to be scheduled are determined according to a pre-configured task scheduling information set; then according to the scheduling time corresponding to each task to be scheduled, determining to perform asynchronous scheduling and/or synchronous scheduling on each task to be scheduled; and finally, synchronously and/or asynchronously scheduling each task to be scheduled according to the scheduling flow information corresponding to each task to be scheduled. The method comprises the steps of determining scheduling time and scheduling process information corresponding to each task to be scheduled according to a preset scheduling information set, and further determining asynchronous scheduling and/or synchronous scheduling of each task to be scheduled according to the scheduling time corresponding to each task to be scheduled, so that the problem that a light-weight task scheduling tool in the prior art cannot provide a relatively complete scheduling scheme and function for complex scheduling tasks can be solved, and the waste of development and test resources is avoided.
The following describes an exemplary task scheduling method provided in the embodiments of the present application with reference to the accompanying drawings.
Referring to fig. 1, fig. 1 is a flowchart illustrating an implementation of a task scheduling method according to an embodiment of the present disclosure. The task scheduling method provided by the embodiment of the application can be realized by scheduling of a terminal or a server. Alternatively, the front-end script monitoring method provided by the embodiment of the present application may be implemented by being executed by a terminal and a server together.
Exemplarily, as shown in fig. 2, fig. 2 is a schematic view of an application scenario of a task scheduling method according to an embodiment of the present application. As can be seen from fig. 2, in this embodiment, after detecting a task scheduling instruction, the terminal 202 may send the task scheduling instruction to the server 204, and the server 204 determines scheduling time and scheduling flow information corresponding to each task to be scheduled according to a pre-configured task scheduling information set; according to the scheduling time corresponding to each task to be scheduled, determining to perform asynchronous scheduling and/or synchronous scheduling on each task to be scheduled; and synchronously and/or asynchronously scheduling each task to be scheduled according to the scheduling flow information corresponding to each task to be scheduled.
In addition, the server 204 may also send the execution result of each task to be scheduled to the terminal 202 to be displayed through a preset interface provided by the terminal 202, so that the user may know the execution result of each task to be scheduled based on the preset interface of the terminal 202.
It should be understood that, in the application scenario, the computing capability of the corresponding terminal is limited, in order to improve the scheduling efficiency of each task to be scheduled, a user may select to trigger a task scheduling instruction through the terminal device, the terminal directly sends the task scheduling instruction to the server after detecting the task scheduling instruction, and the server performs asynchronous and/or synchronous scheduling on each task to be scheduled. The problem that a light-weight task scheduling tool in the prior art cannot provide a relatively complete scheduling scheme and function for complex scheduling tasks can be solved, and the waste of development and test resources is avoided.
In some application scenarios, when the computing power of the terminal is strong or the task to be scheduled is simple and the required computing power is not strong, the terminal can independently complete the scheduling of the task to be scheduled, and certainly, the server can independently complete the scheduling of the task to be scheduled.
As shown in fig. 1, the task scheduling method provided in this embodiment includes steps S101 to S103. The details are as follows:
s101, after a task scheduling instruction is detected, scheduling time and scheduling process information corresponding to each task to be scheduled are determined according to a pre-configured task scheduling information set.
In an embodiment, a user may perform task scheduling information configuration based on a task configuration interface displayed by the task scheduling device, and then the task scheduling device generates a corresponding task scheduling information set based on the task scheduling information configured by the user after detecting a task scheduling information configuration result configured by the user. Specifically, the task scheduling information set includes, but is not limited to, a name of each task to be scheduled, scheduling time of each task to be scheduled, scheduling process information of each task to be scheduled, and the like.
In specific implementation, the process of configuring the task to be scheduled based on the task configuration interface includes, but is not limited to, the following steps: initializing a task to be scheduled, setting task parameters of the task to be scheduled, configuring gateway information of the task to be scheduled, and configuring an end index of the task to be scheduled.
It should be understood that, depending on the task to be scheduled, some steps in the above process of configuring the task to be scheduled may be omitted, for example, when the concurrent number of the task to be scheduled is within a preset number range, such as within a range of several hundred, the configuration of the gateway information of the task to be scheduled may be omitted. Specifically, the steps included in the configuration process of the task to be scheduled may be flexibly selected, and are not limited herein.
The scheduling process information corresponding to each task to be scheduled comprises the scheduling sequence of each task to be scheduled and the dependency relationship among the tasks to be scheduled.
In an embodiment, determining scheduling time and scheduling process information corresponding to each task to be scheduled according to a pre-configured task scheduling information set includes: and according to a pre-configured task scheduling information set, determining that scheduling process information corresponding to each task to be scheduled comprises a scheduling sequence of each task to be scheduled and a dependency relationship between the tasks to be scheduled.
S102, according to the scheduling time corresponding to each task to be scheduled, determining to perform asynchronous scheduling and/or synchronous scheduling on each task to be scheduled.
In an embodiment, determining to perform asynchronous scheduling and/or synchronous scheduling on each task to be scheduled according to scheduling time corresponding to each task to be scheduled includes: if the scheduling time corresponding to the first preset number of tasks to be scheduled is the same, determining to synchronously schedule the first preset number of tasks to be scheduled; and if the scheduling time corresponding to the second preset number of the tasks to be scheduled is different, determining to perform asynchronous scheduling on the second preset number of the tasks to be scheduled.
It should be understood that, in specific implementation, if the number of the to-be-scheduled tasks that are scheduled synchronously exceeds a preset number range, for example, the number of the to-be-scheduled tasks that are scheduled synchronously is in ten thousand levels, gateway information of the to-be-scheduled tasks that are configured needs to be used for preventing a problem of network lease congestion from occurring in a process of synchronously scheduling a large batch of to-be-scheduled tasks.
The configured gateway information of the tasks to be scheduled comprises thread stack key information which is connected with a network, specifically, the thread stack key information comprises items which are executed by threads, whether each thread is blocked or not can be determined by obtaining the items which are executed by the threads which are connected with the network, and then the threads which are blocked are re-sequenced to form a new thread queue, so that the problem of network blocking in the synchronous scheduling process of a large batch of tasks to be scheduled is solved, and the thread safety and the task scheduling safety are improved.
S103, synchronously and/or asynchronously scheduling the tasks to be scheduled according to the scheduling flow information corresponding to the tasks to be scheduled.
In an embodiment, synchronously and/or asynchronously scheduling each task to be scheduled according to the scheduling flow information corresponding to each task to be scheduled, includes: respectively extracting a first task to be scheduled to be synchronously scheduled and a second task to be scheduled to be asynchronously scheduled from all tasks to be scheduled; dividing the first task to be dispatched into synchronous dispatching tasks of different dispatching batches according to the dispatching sequence of the first task to be dispatched and the dependency relationship between the first tasks to be dispatched; dividing the second tasks to be scheduled into asynchronous scheduling tasks of different scheduling batches according to the scheduling sequence of the second tasks to be scheduled and the dependency relationship between the second tasks to be scheduled; and respectively scheduling the synchronous scheduling tasks in batches, and respectively scheduling the asynchronous scheduling tasks in batches.
Illustratively, the scheduling the synchronous scheduling tasks in batches respectively, and the scheduling the asynchronous scheduling tasks in batches respectively may include: sequentially storing each synchronous scheduling task to a preset first message queue according to the corresponding batch; sequentially storing each asynchronous scheduling task to a preset second message queue according to each corresponding batch; synchronously scheduling each synchronous scheduling task in turn from the first message queue through the first interface according to the batch corresponding to each synchronous scheduling task; and sequentially and asynchronously scheduling the asynchronous scheduling tasks from the second message queue through the second interface according to the batches corresponding to the asynchronous scheduling tasks.
According to the analysis, the task scheduling method provided by the embodiment of the application determines the scheduling time and the scheduling flow information corresponding to each task to be scheduled according to the pre-configured task scheduling information set after the task scheduling instruction is detected; then according to the scheduling time corresponding to each task to be scheduled, determining to perform asynchronous scheduling and/or synchronous scheduling on each task to be scheduled; and finally, synchronously and/or asynchronously scheduling each task to be scheduled according to the scheduling flow information corresponding to each task to be scheduled. The method comprises the steps of determining scheduling time and scheduling flow information corresponding to each task to be scheduled according to a pre-configured scheduling information set, and further determining asynchronous scheduling and/or synchronous scheduling of each task to be scheduled according to the scheduling time corresponding to each task to be scheduled, so that the problem that a light-weight task scheduling tool in the prior art cannot provide a relatively complete scheduling scheme and function for complex scheduling tasks can be solved, and the waste of development and test resources is avoided.
Referring to fig. 3, fig. 3 is a schematic flow chart illustrating an implementation of a task scheduling method according to another embodiment of the present application. As shown in fig. 3, compared with the task scheduling method shown in fig. 1, the task scheduling method provided in this embodiment has the same specific implementation processes as those of S101 to S103 in S303 to S305, except that S301 and S302 are further included before S303. The details are as follows:
s301, based on a task scheduling request input by a user, displaying a task configuration interface to prompt the user to perform task scheduling information configuration based on the task configuration interface.
The task configuration interface may include, but is not limited to, a task issuing module, where the task issuing module includes a to-be-scheduled task information configuration item, and a user may configure to-be-scheduled task information through the task issuing module, and then trigger a to-be-scheduled task request to generate a task scheduling instruction, so that the task scheduling device detects the task scheduling instruction.
In addition, the task configuration interface can also comprise a task execution flow automatic issuing module, a task execution selection module and the like, which are used for facilitating the real-time adjustment and selection of task scheduling of a user based on the task configuration interface so as to more conveniently and effectively control the task scheduling.
S302, task scheduling information configured by a user based on the task configuration interface is obtained, and the task scheduling information set is generated, wherein the task scheduling information comprises the name of each task to be scheduled, the scheduling time of each task to be scheduled and the scheduling flow information of each task to be scheduled.
And S303, after the task scheduling instruction is detected, determining scheduling time and scheduling flow information corresponding to each task to be scheduled according to a pre-configured task scheduling information set.
S304, according to the scheduling time corresponding to each task to be scheduled, determining to perform asynchronous scheduling and/or synchronous scheduling on each task to be scheduled.
S305, synchronously and/or asynchronously scheduling the tasks to be scheduled according to the scheduling flow information corresponding to the tasks to be scheduled.
According to the analysis, the task scheduling method provided by the embodiment of the application determines the scheduling time and the scheduling flow information corresponding to each task to be scheduled according to the pre-configured task scheduling information set after the task scheduling instruction is detected; then according to the scheduling time corresponding to each task to be scheduled, determining to perform asynchronous scheduling and/or synchronous scheduling on each task to be scheduled; and finally, synchronously and/or asynchronously scheduling each task to be scheduled according to the scheduling flow information corresponding to each task to be scheduled. The method comprises the steps of determining scheduling time and scheduling flow information corresponding to each task to be scheduled according to a pre-configured scheduling information set, and further determining asynchronous scheduling and/or synchronous scheduling of each task to be scheduled according to the scheduling time corresponding to each task to be scheduled, so that the problem that a light-weight task scheduling tool in the prior art cannot provide a relatively complete scheduling scheme and function for complex scheduling tasks can be solved, and the waste of development and test resources is avoided.
Referring to fig. 4, fig. 4 is a flowchart illustrating a task scheduling method according to another embodiment of the present disclosure. As can be seen from fig. 4, in this embodiment, compared with the embodiment shown in fig. 3, the specific implementation processes of S401 to S405 are the same as those of S301 to S305, except that S406 is further included after S405. The details are as follows:
s401, based on a task scheduling request input by a user, displaying a task configuration interface to prompt the user to perform task scheduling information configuration based on the task configuration interface.
S402, acquiring task scheduling information configured by a user based on the task configuration interface, and generating the task scheduling information set, wherein the task scheduling information includes the name of each task to be scheduled, the scheduling time of each task to be scheduled, and the scheduling flow information of each task to be scheduled.
And S403, after the task scheduling instruction is detected, determining scheduling time and scheduling flow information corresponding to each task to be scheduled according to a pre-configured task scheduling information set.
S404, according to the scheduling time corresponding to each task to be scheduled, determining to perform asynchronous scheduling and/or synchronous scheduling on each task to be scheduled.
S405, according to the scheduling process information corresponding to each task to be scheduled, synchronously and/or asynchronously scheduling each task to be scheduled.
S406, displaying a task management interface to prompt a user to monitor task scheduling progress information based on the task management interface; wherein the task scheduling progress information includes: at least one of a scheduled task plan, a name of a task being scheduled, a processor of each task, an execution window of each task, a set of scheduled tasks, and a type of scheduled tasks.
According to the analysis, the task scheduling method provided by the embodiment of the application determines the scheduling time and the scheduling flow information corresponding to each task to be scheduled according to the pre-configured task scheduling information set after the task scheduling instruction is detected; then according to the scheduling time corresponding to each task to be scheduled, determining to perform asynchronous scheduling and/or synchronous scheduling on each task to be scheduled; and finally, synchronously and/or asynchronously scheduling each task to be scheduled according to the scheduling flow information corresponding to each task to be scheduled. The method comprises the steps of determining scheduling time and scheduling process information corresponding to each task to be scheduled according to a preset scheduling information set, and further determining asynchronous scheduling and/or synchronous scheduling of each task to be scheduled according to the scheduling time corresponding to each task to be scheduled, so that the problem that a light-weight task scheduling tool in the prior art cannot provide a relatively complete scheduling scheme and function for complex scheduling tasks can be solved, and the waste of development and test resources is avoided.
As shown in fig. 5, fig. 5 is a block diagram of a task scheduling device according to an embodiment of the present application. The task scheduling apparatus in this embodiment includes modules for executing the steps in the foregoing task scheduling method embodiment. Please refer to fig. 1 to 4 for the related description of the embodiments. For convenience of explanation, only the portions related to the present embodiment are shown. Referring to fig. 4, the task scheduler 50 includes:
a first determining module 501, configured to determine, after detecting a task scheduling instruction, scheduling time and scheduling process information corresponding to each task to be scheduled according to a pre-configured task scheduling information set;
a second determining module 502, configured to determine to perform asynchronous scheduling and/or synchronous scheduling on each task to be scheduled according to the scheduling time corresponding to each task to be scheduled;
the scheduling module 503 is configured to schedule the tasks to be scheduled synchronously and/or asynchronously according to the scheduling flow information corresponding to the tasks to be scheduled.
In one embodiment, the apparatus 50 further comprises:
the first display module is used for displaying a task configuration interface based on a task scheduling request input by a user so as to prompt the user to configure task scheduling information based on the task configuration interface;
and the generating module is used for acquiring task scheduling information configured by a user based on the task configuration interface and generating the task scheduling information set, wherein the task scheduling information comprises the name of each task to be scheduled, the scheduling time of each task to be scheduled and the scheduling flow information of each task to be scheduled.
In an embodiment, the scheduling process information includes a scheduling order of each task to be scheduled and a dependency relationship between the tasks to be scheduled.
In one embodiment, the scheduling module 503 includes:
the extracting unit is used for respectively extracting a first task to be scheduled needing synchronous scheduling and a second task to be scheduled needing asynchronous scheduling from all the tasks to be scheduled;
the first dividing unit is used for dividing the first tasks to be dispatched into synchronous dispatching tasks of different dispatching batches according to the dispatching sequence of the first tasks to be dispatched and the dependency relationship among the first tasks to be dispatched;
the second dividing unit is used for dividing the second tasks to be dispatched into asynchronous dispatching tasks of different dispatching batches according to the dispatching sequence of the second tasks to be dispatched and the dependency relationship among the second tasks to be dispatched;
and the dispatching unit is used for dispatching the synchronous dispatching tasks in batches respectively and dispatching the asynchronous dispatching tasks in batches respectively.
In one embodiment, the scheduling unit includes:
the first storage subunit is used for sequentially storing each synchronous scheduling task to a preset first message queue according to the corresponding batch;
the second storage subunit is used for sequentially storing the asynchronous scheduling tasks to a preset second message queue according to respective corresponding batches;
the first scheduling subunit is configured to sequentially and synchronously schedule each synchronous scheduling task from the first message queue through a first interface according to the batch corresponding to each synchronous scheduling task;
and the second subunit is used for sequentially and asynchronously scheduling each asynchronous scheduling task from the second message queue through a second interface according to the batch corresponding to each asynchronous scheduling task.
In one embodiment, the apparatus 50 further comprises:
the second display module is used for displaying a task management interface so as to prompt a user to monitor task scheduling progress information based on the task management interface; wherein the task scheduling progress information includes: at least one of a scheduled task plan, a name of a task being scheduled, a processor of each task, an execution window of each task, a set of scheduled tasks, and a type of scheduled tasks.
In one embodiment, the second determining module 502 includes:
the device comprises a first determining unit, a second determining unit and a scheduling unit, wherein the first determining unit is used for determining synchronous scheduling of a first preset number of tasks to be scheduled if scheduling time corresponding to the first preset number of tasks to be scheduled is the same;
and the second determining unit is used for determining to carry out asynchronous scheduling on the tasks to be scheduled in the second preset number if the scheduling time corresponding to the tasks to be scheduled in the second preset number is different.
It should be understood that, in the structural block diagram of the task scheduling device 50 shown in fig. 5, each module is used to execute each step in the embodiment corresponding to fig. 1 to fig. 4, and each step in the embodiment corresponding to fig. 1 to fig. 4 has been explained in detail in the above embodiment, and specific reference is made to the relevant description in the embodiment corresponding to fig. 1 to fig. 4, which is not repeated herein.
Referring to fig. 6, fig. 6 is a block diagram of a task scheduling apparatus according to an embodiment of the present disclosure. As shown in fig. 6, the task scheduling device 60 of this embodiment includes: a processor 610, a memory 620, and a computer program 630, such as a task scheduler, stored in the memory 620 and operable on the processor 610. The processor 610 implements the steps in the embodiments of the task scheduling methods described above, such as the steps shown in fig. 1 to 4, when scheduling the computer program 630. Alternatively, when the processor 610 executes the computer program 630, the functions of the modules or units in the embodiment corresponding to fig. 5, for example, the functions of the modules 501 to 503 shown in fig. 5, are implemented, for which reference is specifically made to the related description in the embodiment corresponding to fig. 5, and details are not repeated here.
Illustratively, the computer program 630 may be divided into one or more units, which are stored in the memory 620 and executed by the processor 610 to accomplish the present application. The one or more units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 630 in the task scheduling device 60. For example, the computer program 630 may be partitioned to include: the system comprises a first determining module, a second determining module and a scheduling module; the specific functions of the modules are described in fig. 5.
The task scheduling device 60 may include, but is not limited to, a processor 610 and a memory 620. It will be understood by those skilled in the art that fig. 6 is merely an example of the task scheduling device 60, and does not constitute a limitation of the task scheduling device 60, and may include more or less components than those shown, or combine some components, or different components, for example, the task scheduling device 60 may further include an input-output device, a network access device, a bus, etc.
The Processor 610 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Wherein, in one embodiment, the processor is configured to execute the computer program stored in the memory to perform the steps of:
after a task scheduling instruction is detected, determining scheduling time and scheduling flow information corresponding to each task to be scheduled according to a pre-configured task scheduling information set;
according to the scheduling time corresponding to each task to be scheduled, determining to perform asynchronous scheduling and/or synchronous scheduling on each task to be scheduled;
and synchronously and/or asynchronously scheduling each task to be scheduled according to the scheduling flow information corresponding to each task to be scheduled.
In an embodiment, before determining scheduling time and scheduling process information corresponding to each task to be scheduled according to a pre-configured task scheduling information set, the method further includes:
displaying a task configuration interface based on a task scheduling request input by a user to prompt the user to perform task scheduling information configuration based on the task configuration interface;
and acquiring task scheduling information configured by a user based on the task configuration interface, and generating the task scheduling information set, wherein the task scheduling information comprises the name of each task to be scheduled, the scheduling time of each task to be scheduled and the scheduling flow information of each task to be scheduled.
In an embodiment, the scheduling process information includes a scheduling order of each task to be scheduled and a dependency relationship between the tasks to be scheduled.
In an embodiment, the synchronously and/or asynchronously scheduling each task to be scheduled according to the scheduling process information corresponding to each task to be scheduled includes:
respectively extracting a first task to be scheduled to be synchronously scheduled and a second task to be scheduled to be asynchronously scheduled from the tasks to be scheduled;
dividing the first tasks to be dispatched into synchronous dispatching tasks of different dispatching batches according to the dispatching sequence of the first tasks to be dispatched and the dependency relationship between the first tasks to be dispatched;
dividing the second tasks to be scheduled into asynchronous scheduling tasks of different scheduling batches according to the scheduling sequence of the second tasks to be scheduled and the dependency relationship between the second tasks to be scheduled;
and respectively scheduling the synchronous scheduling tasks in batches, and respectively scheduling the asynchronous scheduling tasks in batches.
In an embodiment, the scheduling the synchronous scheduling tasks in batches respectively, and the scheduling the asynchronous scheduling tasks in batches respectively includes:
sequentially storing each synchronous scheduling task to a preset first message queue according to the corresponding batch;
sequentially storing the asynchronous scheduling tasks to a preset second message queue according to the corresponding batches;
sequentially and synchronously scheduling each synchronous scheduling task from the first message queue through a first interface according to the batch corresponding to each synchronous scheduling task;
and sequentially and asynchronously scheduling the asynchronous scheduling tasks from the second message queue through a second interface according to the batches corresponding to the asynchronous scheduling tasks.
In an embodiment, after synchronously and/or asynchronously scheduling each task to be scheduled according to the scheduling flow information corresponding to each task to be scheduled, the method further includes:
displaying a task management interface to prompt a user to monitor task scheduling progress information based on the task management interface; wherein the task scheduling progress information includes: at least one of a scheduled task plan, a name of a task being scheduled, a processor of each task, an execution window of each task, a set of scheduled tasks, and a type of scheduled tasks.
In an embodiment, the determining, according to the scheduling time corresponding to each task to be scheduled, to perform asynchronous scheduling and/or synchronous scheduling on each task to be scheduled includes:
if the scheduling time corresponding to a first preset number of tasks to be scheduled is the same, determining to synchronously schedule the first preset number of tasks to be scheduled;
and if the scheduling time corresponding to a second preset number of tasks to be scheduled is different, determining to perform asynchronous scheduling on the second preset number of tasks to be scheduled.
The storage 620 may be an internal storage unit of the task scheduling device 60, such as a hard disk or a memory of the task scheduling device 60. The memory 620 may also be an external storage device of the task scheduling device 60, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the task scheduling device 60. Further, the memory 620 may also include both an internal storage unit and an external storage device of the task scheduling device 60. The memory 620 is used for storing the computer programs and other programs and data required by the task scheduling device 60. The memory 620 may also be used to temporarily store data that has been output or is to be output.
In an embodiment of the present application, a computer-readable storage medium is further provided, where the computer-readable storage medium stores a computer program, the computer program includes program instructions, and the processor executes the program instructions to implement the steps of the task scheduling method provided in the foregoing embodiments of the present application.
The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, for example, a hard disk or a memory of the computer device. The computer readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, provided on the computer device.
The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the embodiments of the present application, and they should be construed as being included in the present application.

Claims (10)

1. A method for task scheduling, the method comprising:
after a task scheduling instruction is detected, determining scheduling time and scheduling flow information corresponding to each task to be scheduled according to a pre-configured task scheduling information set;
according to the scheduling time corresponding to each task to be scheduled, determining to perform asynchronous scheduling and/or synchronous scheduling on each task to be scheduled;
and synchronously and/or asynchronously scheduling each task to be scheduled according to the scheduling flow information corresponding to each task to be scheduled.
2. The method of claim 1, wherein before determining scheduling time and scheduling flow information corresponding to each task to be scheduled according to a pre-configured task scheduling information set, the method further comprises:
displaying a task configuration interface based on a task scheduling request input by a user to prompt the user to perform task scheduling information configuration based on the task configuration interface;
and acquiring task scheduling information configured by a user based on the task configuration interface, and generating the task scheduling information set, wherein the task scheduling information comprises the name of each task to be scheduled, the scheduling time of each task to be scheduled and the scheduling flow information of each task to be scheduled.
3. The method of claim 1, wherein the scheduling flow information includes a scheduling order of each task to be scheduled and a dependency relationship between each task to be scheduled.
4. The method according to claim 3, wherein said synchronously and/or asynchronously scheduling each task to be scheduled according to the scheduling flow information corresponding to each task to be scheduled comprises:
respectively extracting a first task to be scheduled to be synchronously scheduled and a second task to be scheduled to be asynchronously scheduled from the tasks to be scheduled;
dividing the first tasks to be dispatched into synchronous dispatching tasks of different dispatching batches according to the dispatching sequence of the first tasks to be dispatched and the dependency relationship between the first tasks to be dispatched;
dividing the second tasks to be dispatched into asynchronous dispatching tasks of different dispatching batches according to the dispatching sequence of the second tasks to be dispatched and the dependency relationship among the second tasks to be dispatched;
and respectively scheduling the synchronous scheduling tasks in batches, and respectively scheduling the asynchronous scheduling tasks in batches.
5. The method of claim 4, wherein dispatching the synchronous dispatch tasks separately for the sub-batches, and dispatching the asynchronous dispatch tasks separately for the sub-batches comprises:
sequentially storing each synchronous scheduling task to a preset first message queue according to the corresponding batch;
sequentially storing the asynchronous scheduling tasks to a preset second message queue according to the corresponding batches of the asynchronous scheduling tasks;
sequentially and synchronously scheduling each synchronous scheduling task from the first message queue through a first interface according to the batch corresponding to each synchronous scheduling task;
and sequentially and asynchronously scheduling each asynchronous scheduling task from the second message queue through a second interface according to the batch corresponding to each asynchronous scheduling task.
6. The method according to claim 1, wherein after said scheduling the tasks to be scheduled synchronously and/or asynchronously according to the scheduling flow information corresponding to the tasks to be scheduled, further comprising:
displaying a task management interface to prompt a user to monitor task scheduling progress information based on the task management interface; wherein the task scheduling progress information includes: at least one of a scheduled task plan, a name of a task being scheduled, a processor of each task, an execution window of each task, a set of scheduled tasks, and a type of scheduled tasks.
7. The method according to claim 1, wherein the determining to perform asynchronous scheduling and/or synchronous scheduling on the tasks to be scheduled according to the scheduling time corresponding to the tasks to be scheduled comprises:
if the scheduling time corresponding to a first preset number of tasks to be scheduled is the same, determining to synchronously schedule the first preset number of tasks to be scheduled;
and if the scheduling time corresponding to a second preset number of tasks to be scheduled is different, determining to perform asynchronous scheduling on the second preset number of tasks to be scheduled.
8. A task scheduling apparatus, characterized in that the apparatus comprises:
the first determining module is used for determining scheduling time and scheduling process information corresponding to each task to be scheduled according to a pre-configured task scheduling information set after a task scheduling instruction is detected;
the second determining module is used for determining asynchronous scheduling and/or synchronous scheduling of each task to be scheduled according to the scheduling time corresponding to each task to be scheduled;
and the scheduling module is used for synchronously and/or asynchronously scheduling the tasks to be scheduled according to the scheduling flow information corresponding to the tasks to be scheduled.
9. A task scheduling device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the task scheduling method according to any one of claims 1 to 7 when scheduling the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being scheduled by a processor, carries out the steps of a method for task scheduling according to any one of claims 1 to 7.
CN202210993819.7A 2022-08-18 2022-08-18 Task scheduling method, device, equipment and storage medium Pending CN115344370A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210993819.7A CN115344370A (en) 2022-08-18 2022-08-18 Task scheduling method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210993819.7A CN115344370A (en) 2022-08-18 2022-08-18 Task scheduling method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115344370A true CN115344370A (en) 2022-11-15

Family

ID=83953041

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210993819.7A Pending CN115344370A (en) 2022-08-18 2022-08-18 Task scheduling method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115344370A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116503138A (en) * 2023-05-04 2023-07-28 杭州妙壹科技有限公司 Telephone fee recharging order scheduling method and system based on asynchronous programming

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116503138A (en) * 2023-05-04 2023-07-28 杭州妙壹科技有限公司 Telephone fee recharging order scheduling method and system based on asynchronous programming
CN116503138B (en) * 2023-05-04 2023-10-31 杭州妙壹科技有限公司 Telephone fee recharging order scheduling method and system based on asynchronous programming

Similar Documents

Publication Publication Date Title
CN106802826B (en) Service processing method and device based on thread pool
CN109634728B (en) Job scheduling method and device, terminal equipment and readable storage medium
CN113535367B (en) Task scheduling method and related device
EP4113299A2 (en) Task processing method and device, and electronic device
EP3893112A2 (en) Method and apparatus for scheduling deep learning reasoning engines, device, and medium
CN109656782A (en) Visual scheduling monitoring method, device and server
CN111459659A (en) Data processing method, device, scheduling server and medium
CN110825535A (en) Job scheduling method and system
CN106557369A (en) A kind of management method and system of multithreading
EP2977899A2 (en) Integrating execution of computing analytics within a mapreduce processing environment
CN111104210A (en) Task processing method and device and computer system
CN110611707A (en) Task scheduling method and device
CN110673959A (en) System, method and apparatus for processing tasks
CN114564294A (en) Intelligent service arranging method and device, computer equipment and storage medium
JP2020053013A (en) Request processing method and device
CN115344370A (en) Task scheduling method, device, equipment and storage medium
CN115756822A (en) Method and system for optimizing performance of high-performance computing application
CN112231073A (en) Distributed task scheduling method and device
CN112395062A (en) Task processing method, device, equipment and computer readable storage medium
CN111831408A (en) Asynchronous task processing method and device, electronic equipment and medium
CN116820714A (en) Scheduling method, device, equipment and storage medium of computing equipment
CN111679899B (en) Task scheduling method, device, platform equipment and storage medium
CN114358577A (en) Order information processing method and device
CN111290868B (en) Task processing method, device and system and flow engine
CN114911538A (en) Starting method of running system and computing 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