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

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

Info

Publication number
CN110727509A
CN110727509A CN201910907213.5A CN201910907213A CN110727509A CN 110727509 A CN110727509 A CN 110727509A CN 201910907213 A CN201910907213 A CN 201910907213A CN 110727509 A CN110727509 A CN 110727509A
Authority
CN
China
Prior art keywords
task
information
state
confirmation information
executor
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
CN201910907213.5A
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.)
Zhejiang Dasou Vehicle Software Technology Co Ltd
Original Assignee
Zhejiang Dasou Vehicle Software Technology 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 Zhejiang Dasou Vehicle Software Technology Co Ltd filed Critical Zhejiang Dasou Vehicle Software Technology Co Ltd
Priority to CN201910907213.5A priority Critical patent/CN110727509A/en
Publication of CN110727509A publication Critical patent/CN110727509A/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/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration

Abstract

The present application relates to the field of data processing technologies, and in particular, to a task scheduling method and apparatus, a computer device, and a storage medium. The method comprises the following steps: acquiring task information of a current unscheduled task; sending the task information to a scheduling node to obtain confirmation information; screening out a target actuator for executing a current unscheduled task from the scheduling node according to the confirmation information; sending response information of the confirmation information to the target actuator, wherein the response information is used for indicating the target actuator to execute the current unscheduled task; and modifying the state of the current unscheduled task from the non-executable state to the executable state. By adopting the method, the situation that the same task is repeatedly executed can be avoided.

Description

Task scheduling method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a task scheduling method and apparatus, a computer device, and a storage medium.
Background
With the development of internet science and technology, the cluster technology is continuously improved, task scheduling is a key technology in a cluster system, and the task scheduling calculates and distributes service data, so that the data processing efficiency can be directly influenced, and the task submitting capability of a processing object can also be influenced.
However, in the current task scheduling manner, when the processor receives the task from the scheduling center, the response to the task fails due to network jitter and the like, and the scheduling center continues to search for the next processor to process the task, so that the task scheduling that needs to be executed only once is executed on multiple machines for multiple times, and the service content is wrong.
Disclosure of Invention
In view of the above, it is necessary to provide a task scheduling method, apparatus, computer device, and storage medium capable of preventing repeated execution of tasks in response to the above technical problems.
A method of task scheduling, the method comprising:
acquiring task information of a current unscheduled task;
sending the task information to a scheduling node to obtain confirmation information;
screening out a target actuator for executing the current unscheduled task from the scheduling node according to the confirmation information;
sending response information together with the confirmation information to the target executor, wherein the response information is used for indicating the target executor to execute the current unscheduled task;
and modifying the state of the current unscheduled task from an unexecutable state to an executable state.
In one embodiment, the screening out, from the scheduling node, a target executor for executing the currently unscheduled task according to the acknowledgement information includes:
acquiring feedback duration corresponding to the confirmation information;
comparing the feedback duration to obtain the shortest feedback duration, and inquiring confirmation information corresponding to the shortest feedback duration;
and taking the executor corresponding to the inquired confirmation information as a target executor for executing the current unscheduled task.
In one embodiment, the method further comprises:
detecting whether an abnormal interaction state occurs when information interaction is carried out with the actuator;
when the actuator is subjected to information interaction, an abnormal interaction state occurs, and the state of the actuator is marked as abnormal;
the sending of the task information of the current unscheduled task to the executor includes:
acquiring the state of an actuator;
and sending the task information of the current unscheduled task to an executor with a non-abnormal state.
In one embodiment, the abnormal interaction state includes:
the state of network abnormity when the information interaction is carried out with the actuator is represented, and/or the state of abnormal duration when the actuator feeds back the confirmation information is represented.
In one embodiment, after the sending the task information to the scheduling node to obtain the confirmation information, the method further includes:
when the information quantity of the confirmation information is a preset quantity, sending response information corresponding to the confirmation information to an actuator corresponding to the confirmation information, wherein the response information is used for indicating the target actuator to execute the current unscheduled task;
and modifying the state of the current unscheduled task from an unexecutable state to an executable state.
In one embodiment, the method further comprises:
receiving a trigger instruction of a current unscheduled task, and extracting a time parameter from the trigger instruction;
judging whether the trigger instructions with the same time parameters exist or not;
when there are trigger instructions with the same time parameter, then only one of the trigger instructions with the same time parameter is executed.
A task scheduling apparatus, the apparatus comprising:
the acquisition module is used for acquiring task information of a current unscheduled task;
the sending module is used for sending the task information to the scheduling node to obtain confirmation information;
the screening module is used for screening out a target executor used for executing the current unscheduled task from the scheduling node according to the confirmation information;
a second sending module, configured to send, to the target executor, response information associated with the acknowledgement information, where the response information is used to instruct the target executor to execute the current unscheduled task;
and the modification module is used for modifying the state of the current unscheduled task from the non-executable state to the executable state.
In one embodiment, the apparatus further comprises:
the second obtaining module is used for obtaining the feedback duration corresponding to the confirmation information;
the comparison module is used for comparing the feedback duration to obtain the shortest feedback duration and inquiring the confirmation information corresponding to the shortest feedback duration;
and the target executor confirming module is used for taking an executor corresponding to the inquired confirmation information as a target executor for executing the current unscheduled task.
A computer device comprising a memory storing a computer program and a processor implementing the steps of the above method when executing the computer program.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method.
In order to prevent the task from being executed by a multi-actuator during task scheduling, when the server sends the task information of the current unscheduled task to the actuator, the task state of the current unscheduled task is in an unexecutable state; after receiving confirmation information fed back by the executor according to the task information, the server screens out a target executor used for executing a current unscheduled task from the scheduling node according to the confirmation information, and sends response information of the confirmation information to the target executor, wherein the response information is used for indicating the target executor to execute the current unscheduled task; and modifying the state of the current unscheduled task from the non-executable state to the executable state. The current non-scheduling task which is not executable is sent to the executor, the target executor is screened according to the confirmation information to execute the current non-scheduling task, and the state of the current non-scheduling task is changed from the non-executable state to the executable state, so that the phenomenon that the same task is repeatedly executed and service content is influenced is avoided.
Drawings
FIG. 1 is a diagram illustrating an exemplary implementation of a task scheduling method;
FIG. 2 is a flowchart illustrating a task scheduling method according to an embodiment;
FIG. 3 is a flow diagram that illustrates the unscheduled task avoiding repetitive triggering steps in one embodiment;
FIG. 4 is a timing diagram of a task scheduling method in one embodiment;
FIG. 5 is a block diagram showing the construction of a task scheduler in one embodiment;
FIG. 6 is a diagram illustrating an internal structure of a computer device according to an embodiment.
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 the present application and are not intended to limit the present application.
The task scheduling method provided by the application can be applied to the application environment shown in fig. 1. Wherein the server 102 communicates with the executor 104 through a network. When the server 102 sends the task information of the current unscheduled task to the executor 104, the task state of the current unscheduled task is an unexecutable state; after receiving the task information, the executor 104 cannot execute the unexecutable task, but can feed back confirmation information to the server 102 according to the information content of the task information, and after receiving the fed back confirmation information, the server 102 screens out a target executor used for executing the current unscheduled task from the executor 104 according to the confirmation information, and sends response information with the confirmation information to the target executor, wherein the response information is used for indicating the target executor to execute the current unscheduled task; the server 102 modifies the state of the current unscheduled task from the non-executable state to the executable state, thereby avoiding the situation that the same task is repeatedly executed on a plurality of executors, and ensuring that one-time scheduled task is executed only once. The server 102 may be implemented by an independent server or a server cluster composed of a plurality of servers, and the executor 104 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices.
In one embodiment, as shown in fig. 2, a task scheduling method is provided, which is described by taking the method as an example applied to the server 102 in fig. 1, and includes the following steps:
step 202, task information of a current unscheduled task is obtained.
Specifically, the unscheduled tasks may be various types of tasks to be executed received by the server, and are scheduled by the server to each executor to be completed. The server acquires the task information of the current unscheduled task, and can send the task information of the unscheduled task to a plurality of executors in the scheduling nodes of the executors after receiving the current unscheduled task, and change the task state of the unscheduled task into an unexecutable state, wherein the task in the unexecutable state cannot be started by any node, and the situation that the same task is executed on a plurality of executors is avoided. In addition, before the server schedules the unscheduled task, the unscheduled task can be added through the console, and then the task is triggered through a scheduling framework (such as quartz) to start a subsequent task scheduling process.
And step 204, sending the task information to the scheduling node to obtain confirmation information.
Specifically, the acknowledgement information is reply information, such as ack (acknowledgement) information, which indicates that the data has been received, and is fed back to the server by the scheduling node. After the information server sends the task information of the unscheduled task to the scheduling node, the scheduling node which schedules the task information confirms the task information according to the task information sent by the server, after the unscheduled task is confirmed to be executed, the confirmation information of the task information is fed back to the server, and the server receives the fed-back confirmation information.
And step 206, screening out target executors for executing the current unscheduled tasks from the scheduling nodes according to the confirmation information.
Specifically, the selecting, by the server, a target executor that is selected by the server from the scheduling node to execute a current unscheduled task, and after receiving the acknowledgement information fed back by each executor, the server may select, according to the information attribute of the acknowledgement information and then according to the information attribute of the acknowledgement information, a target executor that executes the current unscheduled task from the corresponding executors, where the specifically selecting the information attribute of the acknowledgement information of the target executor may include: the feedback time length of the confirmation information, the communication address of the actuator corresponding to the confirmation information and other attributes.
And step 208, sending response information of the confirmation information to the target executor, wherein the response information is used for indicating the target executor to execute the current unscheduled task.
Specifically, the response information is information replied by the server according to the confirmation information sent by the target executor after the target executor is determined. The response information sent by the server to the target executor may be used to instruct the target executor to execute the current unscheduled task according to the previously received task information of the unscheduled task.
And step 210, modifying the state of the current unscheduled task from the non-executable state to an executable state.
Specifically, after the server sends response information for instructing the target executor to execute the current unscheduled task to the target executor, in order to ensure that the target executor successfully executes the current unscheduled task, the unexecutable state of the current unscheduled task is modified into an executable state, and the method ensures that the current unexecutable state can only be executed by the target executor and cannot be executed by other executors. And after the target executor executes and completes the unscheduled task, the information that the task is completed can be generated and sent to the server, and after the server receives the information that the unscheduled task is completed, the task state of the unscheduled task can be modified to be completed.
In the task scheduling method, when the server sends the task information of the current unscheduled task to the actuator, the task state of the current unscheduled task is an unexecutable state; after receiving confirmation information fed back by the executor according to the task information, the server screens out a target executor used for executing a current unscheduled task from the scheduling node according to the confirmation information, and sends response information of the confirmation information to the target executor, wherein the response information is used for indicating the target executor to execute the current unscheduled task; and modifying the state of the current unscheduled task from the non-executable state to the executable state. By sending unexecutable unscheduled tasks to the executors, screening the target executors to execute the unscheduled tasks according to the confirmation information, and modifying the state of the unscheduled tasks from the unexecutable state to the executable state, the situation that the same task is repeatedly executed on a plurality of executors to influence the service content is avoided.
In one embodiment, the task scheduling method for screening out a target executor used for executing a currently unscheduled task from a scheduling node according to the confirmation information may include: acquiring feedback duration corresponding to the confirmation information; comparing the feedback duration to obtain the shortest feedback duration, and inquiring confirmation information corresponding to the shortest feedback duration; and taking the executor corresponding to the inquired confirmation information as a target executor for executing the current unscheduled task.
Specifically, the feedback duration may be a duration from when the server sends task information of a current unscheduled task to the executor to when confirmation information fed back by the executor is received, after the server receives the confirmation information fed back by each executor according to the task information, the duration for feeding back the confirmation information by each executor is obtained according to the time for receiving the confirmation information, the feedback durations for feeding back the confirmation information by each executor are compared, the confirmation information with the shortest feedback duration is selected, and the executor corresponding to the confirmation information with the shortest feedback duration is used as a target executor for executing the current unscheduled task.
In the task scheduling method, the server executes the current unscheduled task by selecting the actuator with the shortest feedback time length, so that the time length of task scheduling is shortened, and the speed of completing the current unscheduled task is further improved.
In one embodiment, the task scheduling method for screening out a target executor used for executing a currently unscheduled task from the executors according to the confirmation information may include: acquiring a communication address of an actuator corresponding to the confirmation information; calculating the communication distance between the actuator and the actuator according to the communication address of the actuator; and comparing the communication distances to obtain the shortest communication distance, and taking the actuator corresponding to the shortest communication distance as a target actuator for executing the current unscheduled task.
Specifically, after the server receives confirmation information fed back by each actuator according to the task information, the communication address of each actuator corresponding to the confirmation information is obtained, the communication distance between the server and each actuator is calculated according to the communication address of each actuator, the communication distances between the server and each actuator are compared, and the actuator with the shortest communication distance to the server is selected as a target actuator for executing the current unscheduled task.
In the task scheduling method, the server executes the current unscheduled task by selecting the actuator with the shortest communication distance, so that the task scheduling time is shortened, and the completion speed of the current unscheduled task is further improved.
In one embodiment, the task scheduling method further includes: detecting whether an abnormal interaction state occurs when information interaction is carried out with an actuator; when the actuator is subjected to information interaction, an abnormal interaction state occurs, and the state of the actuator is marked as abnormal; the abnormal interaction state includes: the state of network abnormity when the information interaction is carried out with the actuator is represented and/or the state of abnormal duration when the actuator feeds back the confirmation information is represented; sending task information of a current unscheduled task to an executor, comprising: acquiring the state of an actuator; and sending the task information of the current unscheduled task to an executor with a non-abnormal state.
Specifically, the information interaction between the server and the executor may include an interaction process in which the server sends task information of a currently unscheduled task to the executor, and the executor feeds back confirmation information to the server according to the task information, and sends response information to the executor according to the confirmation information. The abnormal interaction may be an abnormal condition occurring in the interaction process, for example, a state of network abnormality (network abnormality, such as network fluctuation, etc., occurs between the server and the actuator) when the server performs information interaction with the actuator, a state of time length abnormality (time length of time.
In the task scheduling method, the server determines the abnormal executor according to the abnormal interaction state and shields the abnormal executor when sending the task information, so that the server does not select the abnormal executor as a task execution object when scheduling the task, and the unscheduled task is prevented from being executed by the abnormal executor.
In an embodiment, after the task scheduling method sends the task information to the scheduling node to obtain the confirmation information, the method may further include: when the information quantity of the confirmation information is a preset quantity, sending response information corresponding to the confirmation information to an actuator corresponding to the confirmation information, wherein the response information is used for indicating a target actuator to execute a current unscheduled task; and modifying the state of the current unscheduled task from the non-executable state to the executable state.
Specifically, the preset number may be preset by the server, may be set to 1, or may be set according to the number of the actuators required by the unscheduled task, after receiving the acknowledgement information fed back by the actuators, the server detects the number of the received acknowledgement information, and when the number of the acknowledgement information is the preset number, skips the screening stage of the target actuator, directly sends response information indicating that the target actuator executes the current unscheduled task to the actuator corresponding to the acknowledgement information, and modifies the state of the current unscheduled task from the unexecutable state to the executable state, so that the actuator corresponding to the acknowledgement information executes the task.
In the task scheduling method, the server skips the screening stage of the target actuator and directly schedules the task by detecting the quantity of the confirmation information and when the quantity of the confirmation information is the preset quantity, so that the server can omit the screening stage of the target actuator and reduce the task scheduling time.
In one embodiment, as shown in fig. 3, the task scheduling method further includes:
step 302, receiving a trigger instruction of a current unscheduled task, and extracting a time parameter from the trigger instruction.
Specifically, the trigger instruction may be an instruction for starting execution of a task in an unscheduled task, the time parameter may be a time for starting execution of the task, and the time parameter in the trigger instruction may be a time instruction for starting execution of the task, for example, the trigger instruction may be: and starting the task A at the point 2, starting the task B at the point 4 by 30, and executing the instructions of the task B once every 10 minutes. And after receiving the current trigger instruction, the server extracts the time parameter from the trigger instruction.
Step 304, determine whether there is a trigger command with the same time parameter.
Specifically, after extracting the time parameter in the trigger instruction, the server determines whether there is a trigger instruction with the same time parameter, for example, if the trigger instruction is a 2-point start a task, and detects whether there is a trigger instruction with the same time parameter as the 2-point, the trigger instruction is a 4-point 30-division start B task, and the B task is performed every 10 minutes, then it detects whether there is a trigger instruction with the same time parameter as the 4-point 30-minute, 4-point 40-minute, 4-point 50-minute, 5-point 10-minute, and the like.
And step 306, when the trigger instructions with the same time parameters exist, only one of the trigger instructions with the same time parameters is executed.
Specifically, when the server detects that a plurality of trigger instructions with the same time parameter exist, the server may execute only one of the plurality of trigger instructions with the same time parameter, for example, the server may only perform task scheduling on a currently unscheduled task corresponding to one of the trigger instructions no matter how many trigger instructions that start the task a at point 2 are detected.
In the task scheduling method, the server detects the time parameter in the trigger instruction, and the trigger instruction with the same time parameter is not triggered repeatedly after the trigger instruction with the same time parameter is detected, so that the server can avoid repeated triggering of the current unscheduled task, and resources are saved.
In one embodiment, the task scheduling method may be as shown in fig. 4, where the Server may be divided into a Database (DB) part and a control center (Server) part, the control center adds an unscheduled task through a console, then triggers a task through a scheduling framework, starts subsequent task scheduling, and sends a state of task creation to a database (Client), after sending task information of a current unscheduled task in an unexecutable state to an executor, modifies the state of the database to a found executor (notify ied), the executor feeds back confirmation information of the task information, the control center screens a target executor according to the confirmation information, sends response information of the confirmation information to the target executor, modifies the state of the database to be in execution (RUNNING), and modifies the state of the unscheduled task to be in an executable state, and after the target executor finishes executing the task, the generated information of task completion is sent to the control center, and after the control center receives the information of task completion of the unscheduled task, the task state of the unscheduled task in the database can be modified to be COMPLETED (COMPLETED). For example, after receiving a task a requiring task scheduling, the server sends task information of the unexecutable task a to B, C, D three executors, and receives confirmation information fed back by the three executors, and the server selects a B executor with the shortest feedback time from the feedback times of the confirmation information as a target executor, sends response information of the confirmation information to the B executor, instructs the B executor to execute the task a, and modifies the task a from the unexecutable state to the executable state, thereby avoiding the occurrence of the situation that multiple executors repeatedly execute the same task.
It should be understood that, although the steps in the flowcharts of fig. 2 and 3 are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2 and 3 may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the sub-steps or stages is not necessarily sequential, but may be performed alternately or alternately with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 5, there is provided a task scheduling apparatus including: an obtaining 402, a first sending module 404, a screening module 406, a second sending module 408, and a modifying module 410, wherein:
an obtaining module 402, configured to obtain task information of a current unscheduled task.
And a first sending module 404, configured to send the task information to the scheduling node to obtain the confirmation information.
And the screening module 406 is configured to screen out a target executor for executing the currently unscheduled task from the scheduling node according to the confirmation information.
And a second sending module 408, configured to send response information with the confirmation information to the target executor, where the response information is used to instruct the target executor to execute the currently unscheduled task.
And a modification module 410, configured to modify the state of the currently unscheduled task from an unexecutable state to an executable state.
In one embodiment, the apparatus may further comprise:
and the second acquisition module is used for acquiring the feedback duration corresponding to the confirmation information.
And the comparison module is used for comparing the feedback duration to obtain the shortest feedback duration and inquiring the confirmation information corresponding to the shortest feedback duration.
And the target executor determining module is used for taking the executor corresponding to the inquired confirmation information as a target executor for executing the current unscheduled task.
In one embodiment, the apparatus may further comprise:
and the detection module is used for detecting whether an abnormal interaction state occurs when the information interaction is carried out with the actuator.
And the marking module is used for marking the state of the actuator as abnormal when an abnormal interaction state occurs during information interaction with the actuator.
And the third sending module is used for acquiring the state of the actuator and sending the task information of the current unscheduled task to the actuator with the non-abnormal state.
In one embodiment, the apparatus may further comprise:
and the abnormity interaction module is used for representing the state of network abnormity when the information interaction is carried out with the actuator and/or representing the state of abnormity of the time length when the actuator feeds back the confirmation information.
In one embodiment, the apparatus may further comprise:
and the fourth sending module is used for sending response information corresponding to the confirmation information to the executor corresponding to the confirmation information when the information quantity of the confirmation information is the preset quantity, and the response information is used for indicating the target executor to execute the current unscheduled task.
And the second modification module is used for modifying the state of the current unscheduled task from the non-executable state to the executable state.
In one embodiment, the apparatus may further comprise:
and the receiving module is used for receiving the trigger instruction of the current unscheduled task and extracting the time parameter from the trigger instruction.
And the judging module is used for judging whether the triggering instructions with the same time parameters exist.
And the execution module is used for only executing one of the trigger instructions with the same time parameter when the trigger instructions with the same time parameter exist.
For specific limitations of the task scheduling device, reference may be made to the above limitations of the task scheduling method, which is not described herein again. The modules in the task scheduling device can be implemented in whole or in part by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 6. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing task data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of task scheduling.
Those skilled in the art will appreciate that the architecture shown in fig. 6 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, there is provided a computer device comprising a memory storing a computer program and a processor implementing the following steps when the processor executes the computer program: acquiring task information of a current unscheduled task; sending the task information to a scheduling node to obtain confirmation information; screening out a target actuator for executing a current unscheduled task from the scheduling node according to the confirmation information; sending response information of the confirmation information to the target actuator, wherein the response information is used for indicating the target actuator to execute the current unscheduled task; and modifying the state of the current unscheduled task from the non-executable state to the executable state.
In one embodiment, the screening out, from the scheduling node, a target executor for executing the currently unscheduled task according to the acknowledgement information, which is involved when the processor executes the computer program, may include: acquiring feedback duration corresponding to the confirmation information; comparing the feedback duration to obtain the shortest feedback duration, and inquiring confirmation information corresponding to the shortest feedback duration; and taking the executor corresponding to the inquired confirmation information as a target executor for executing the current unscheduled task.
In one embodiment, the processor, when executing the computer program, further performs the steps of: detecting whether an abnormal interaction state occurs when information interaction is carried out with an actuator; when the actuator is subjected to information interaction, an abnormal interaction state occurs, and the state of the actuator is marked as abnormal; sending task information of a current unscheduled task to an executor, comprising: acquiring the state of an actuator; and sending the task information of the current unscheduled task to an executor with a non-abnormal state.
In one embodiment, the abnormal interaction state involved in the execution of the computer program by the processor may include: the state of the network anomaly when the information interaction is carried out with the actuator is represented, and/or the state of the abnormal duration when the actuator feeds back the confirmation information is represented.
In an embodiment, after the sending of the acknowledgement information to the scheduling node according to the task information to obtain the acknowledgement information fed back by the acknowledgement information receiving executor according to the task information when the processor executes the computer program, the method may further include: when the information quantity of the confirmation information is a preset quantity, sending response information corresponding to the confirmation information to an actuator corresponding to the confirmation information, wherein the response information is used for indicating a target actuator to execute a current unscheduled task; and modifying the state of the current unscheduled task from the non-executable state to the executable state.
In one embodiment, the processor, when executing the computer program, further performs the steps of: receiving a trigger instruction of a current unscheduled task, and extracting a time parameter from the trigger instruction; judging whether trigger instructions with the same time parameters exist or not; when there are trigger instructions with the same time parameter, then only one of the trigger instructions with the same time parameter is executed.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: acquiring task information of a current unscheduled task; sending the task information to a scheduling node to obtain confirmation information; screening out a target actuator for executing a current unscheduled task from the scheduling node according to the confirmation information; sending response information of the confirmation information to the target actuator, wherein the response information is used for indicating the target actuator to execute the current unscheduled task; and modifying the state of the current unscheduled task from the non-executable state to the executable state.
In one embodiment, the screening out, from the scheduling node, a target executor for executing a currently unscheduled task based on the acknowledgement information, which is involved in the execution of the computer program by the processor, may include: acquiring feedback duration corresponding to the confirmation information; comparing the feedback duration to obtain the shortest feedback duration, and inquiring confirmation information corresponding to the shortest feedback duration; and taking the executor corresponding to the inquired confirmation information as a target executor for executing the current unscheduled task.
In one embodiment, the computer program when executed by the processor further performs the steps of: detecting whether an abnormal interaction state occurs when information interaction is carried out with an actuator; when the actuator is subjected to information interaction, an abnormal interaction state occurs, and the state of the actuator is marked as abnormal; sending task information of a current unscheduled task to an executor, comprising: acquiring the state of an actuator; and sending the task information of the current unscheduled task to an executor with a non-abnormal state.
In one embodiment, the abnormal interaction state involved in the execution of the computer program by the processor may include: the state of the network anomaly when the information interaction is carried out with the actuator is represented, and/or the state of the abnormal duration when the actuator feeds back the confirmation information is represented.
In one embodiment, after the computer program is executed by the processor and gets the confirmation information according to the task information sent to the scheduling node, the method may further include: when the information quantity of the confirmation information is a preset quantity, sending response information corresponding to the confirmation information to an actuator corresponding to the confirmation information, wherein the response information is used for indicating a target actuator to execute a current unscheduled task; and modifying the state of the current unscheduled task from the non-executable state to the executable state.
In one embodiment, the computer program when executed by the processor further performs the steps of: receiving a trigger instruction of a current unscheduled task, and extracting a time parameter from the trigger instruction; judging whether trigger instructions with the same time parameters exist or not; when there are trigger instructions with the same time parameter, then only one of the trigger instructions with the same time parameter is executed.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method of task scheduling, the method comprising:
acquiring task information of a current unscheduled task;
sending the task information to a scheduling node to obtain confirmation information;
screening out a target actuator for executing the current unscheduled task from the scheduling node according to the confirmation information;
sending response information together with the confirmation information to the target executor, wherein the response information is used for indicating the target executor to execute the current unscheduled task;
and modifying the state of the current unscheduled task from an unexecutable state to an executable state.
2. The method of claim 1, wherein the screening the scheduling node for a target executor to execute the currently unscheduled task according to the acknowledgement information comprises:
acquiring feedback duration corresponding to the confirmation information;
comparing the feedback duration to obtain the shortest feedback duration, and inquiring confirmation information corresponding to the shortest feedback duration;
and taking the executor corresponding to the inquired confirmation information as a target executor for executing the current unscheduled task.
3. The method of claim 1, further comprising:
detecting whether an abnormal interaction state occurs when information interaction is carried out with the actuator;
when the actuator is subjected to information interaction, an abnormal interaction state occurs, and the state of the actuator is marked as abnormal;
and sending the task information of the current unscheduled task to an executor with a non-abnormal state.
4. The method of claim 3, wherein the abnormal interaction state comprises:
the state of network abnormity when the information interaction is carried out with the actuator is represented, and/or the state of abnormal duration when the actuator feeds back the confirmation information is represented.
5. The method of claim 1, wherein after obtaining the acknowledgement information according to the task information sent to the scheduling node, further comprising:
when the information quantity of the confirmation information is a preset quantity, sending response information corresponding to the confirmation information to an actuator corresponding to the confirmation information, wherein the response information is used for indicating the target actuator to execute the current unscheduled task;
and modifying the state of the current unscheduled task from an unexecutable state to an executable state.
6. The method of claim 1, further comprising:
receiving a trigger instruction of a current unscheduled task, and extracting a time parameter from the trigger instruction;
judging whether the trigger instructions with the same time parameters exist or not;
when there are trigger instructions with the same time parameter, then only one of the trigger instructions with the same time parameter is executed.
7. A task scheduling apparatus, characterized in that the apparatus comprises:
the acquisition module is used for acquiring task information of a current unscheduled task;
the first sending module is used for sending the task information to the scheduling node to obtain confirmation information;
the screening module is used for screening out a target executor used for executing the current unscheduled task from the scheduling node according to the confirmation information;
a second sending module, configured to send, to the target executor, response information associated with the acknowledgement information, where the response information is used to instruct the target executor to execute the current unscheduled task;
and the modification module is used for modifying the state of the current unscheduled task from the non-executable state to the executable state.
8. The apparatus of claim 7, wherein the apparatus comprises:
the second obtaining module is used for obtaining the feedback duration corresponding to the confirmation information;
the comparison module is used for comparing the feedback duration to obtain the shortest feedback duration and inquiring the confirmation information corresponding to the shortest feedback duration;
and the target executor confirming module is used for taking an executor corresponding to the inquired confirmation information as a target executor for executing the current unscheduled task.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
CN201910907213.5A 2019-09-24 2019-09-24 Task scheduling method and device, computer equipment and storage medium Pending CN110727509A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910907213.5A CN110727509A (en) 2019-09-24 2019-09-24 Task scheduling method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910907213.5A CN110727509A (en) 2019-09-24 2019-09-24 Task scheduling method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN110727509A true CN110727509A (en) 2020-01-24

Family

ID=69219405

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910907213.5A Pending CN110727509A (en) 2019-09-24 2019-09-24 Task scheduling method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110727509A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112766768A (en) * 2021-01-26 2021-05-07 云账户技术(天津)有限公司 Contract flow management method and device, electronic equipment and readable storage medium
CN113282383A (en) * 2020-02-19 2021-08-20 中科寒武纪科技股份有限公司 Task scheduling method, task processing method and related products

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060190943A1 (en) * 2005-02-22 2006-08-24 Northrop Grumman Corporation System and a method for scheduling tasks
CN106227596A (en) * 2016-07-13 2016-12-14 百度在线网络技术(北京)有限公司 Mission Monitor method and apparatus for task scheduling server
CN107291946A (en) * 2017-07-13 2017-10-24 深圳乐信软件技术有限公司 Big data ETL method for scheduling task and device
CN109684064A (en) * 2018-12-26 2019-04-26 亚信科技(中国)有限公司 A kind of method for scheduling task and task scheduling equipment
CN109743390A (en) * 2019-01-04 2019-05-10 深圳壹账通智能科技有限公司 Method for scheduling task, device, computer equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060190943A1 (en) * 2005-02-22 2006-08-24 Northrop Grumman Corporation System and a method for scheduling tasks
CN106227596A (en) * 2016-07-13 2016-12-14 百度在线网络技术(北京)有限公司 Mission Monitor method and apparatus for task scheduling server
CN107291946A (en) * 2017-07-13 2017-10-24 深圳乐信软件技术有限公司 Big data ETL method for scheduling task and device
CN109684064A (en) * 2018-12-26 2019-04-26 亚信科技(中国)有限公司 A kind of method for scheduling task and task scheduling equipment
CN109743390A (en) * 2019-01-04 2019-05-10 深圳壹账通智能科技有限公司 Method for scheduling task, device, computer equipment and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113282383A (en) * 2020-02-19 2021-08-20 中科寒武纪科技股份有限公司 Task scheduling method, task processing method and related products
CN113282383B (en) * 2020-02-19 2024-03-12 中科寒武纪科技股份有限公司 Task scheduling method, task processing method and related products
CN112766768A (en) * 2021-01-26 2021-05-07 云账户技术(天津)有限公司 Contract flow management method and device, electronic equipment and readable storage medium
CN112766768B (en) * 2021-01-26 2022-05-17 云账户技术(天津)有限公司 Contract flow management method and device, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
CN109743390B (en) Task scheduling method and device, computer equipment and storage medium
CN109788032B (en) Method and device for acquiring mirror image file, computer equipment and storage medium
CN110750267B (en) Service information updating method, device, computer equipment and storage medium
CN110399241B (en) Task exception handling method, device, computer equipment and readable storage medium
CN110928653B (en) Cross-cluster task execution method and device, computer equipment and storage medium
CN110955508B (en) Asynchronous task scheduling method and device based on distributed architecture and computer equipment
CN109634730A (en) Method for scheduling task, device, computer equipment and storage medium
CN110851159B (en) Business rule updating method and device, computer equipment and storage medium
CN110704312B (en) Method, device, computer equipment and storage medium for pressure test
CN110727509A (en) Task scheduling method and device, computer equipment and storage medium
CN109918187B (en) Task scheduling method, device, equipment and storage medium
CN110555769A (en) Block chain transaction data processing method and device, computer equipment and storage medium
CN111176767A (en) Table data processing method and device, computer equipment and storage medium
CN110704095A (en) Workflow-based configuration processing method and device, computer equipment and storage medium
CN112527357A (en) Service hot loading updating method and device, computer equipment and storage medium
CN112132652B (en) Order information acquisition method and device, computer equipment and storage medium
CN114237628A (en) Microservice arranging and calling method and device, computer equipment and storage medium
CN113377669A (en) Automatic testing method and device, computer equipment and storage medium
CN113190371A (en) Task compensation method and device, electronic equipment and readable storage medium
CN111026988A (en) Page loading method, device and system and computer equipment
CN113590494B (en) Automatic testing method for cloud native environment vulnerability
CN112395057A (en) Data processing method and device based on timing task and computer equipment
CN109901998B (en) Resource recovery method, device, system, computer equipment and storage medium
CN111581042B (en) Cluster deployment method, deployment platform and server to be deployed
CN110245009B (en) Periodic task allocation method, device, computer equipment and storage medium

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200124