CN107092528A - A kind of distributed task dispatching method, apparatus and system - Google Patents

A kind of distributed task dispatching method, apparatus and system Download PDF

Info

Publication number
CN107092528A
CN107092528A CN201611257139.XA CN201611257139A CN107092528A CN 107092528 A CN107092528 A CN 107092528A CN 201611257139 A CN201611257139 A CN 201611257139A CN 107092528 A CN107092528 A CN 107092528A
Authority
CN
China
Prior art keywords
task
database facility
unfinished
database
progress status
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
CN201611257139.XA
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.)
Beijing Xiaodu Information Technology Co Ltd
Original Assignee
Beijing Xiaodu Information 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 Beijing Xiaodu Information Technology Co Ltd filed Critical Beijing Xiaodu Information Technology Co Ltd
Priority to CN201611257139.XA priority Critical patent/CN107092528A/en
Publication of CN107092528A publication Critical patent/CN107092528A/en
Pending legal-status Critical Current

Links

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
    • 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

Abstract

The embodiments of the invention provide a kind of distributed task dispatching method, apparatus and system, the method for wherein controlling equipment side includes:When needing to perform first task, inquired about to database facility with the presence or absence of the second unfinished task, second task is the progress status that second task is recorded in the belonging to same task before the first task and with the first task of the task, the database facility;The first task is performed if there is no the first working equipment is then selected, and, the database facility is notified so that the progress status of first task described in the database facility start recording.Situation when task is performed every time in the present invention is transferred to be good at managing and inquire about the database facility of data to record, the decision logic of execution status of task also gives database facility inquiry, substantially increase the execution efficiency of decision logic, the number of times for decreasing the pressure of controlling equipment itself and being communicated with working equipment, improves reliability.

Description

A kind of distributed task dispatching method, apparatus and system
Technical field
The present invention relates to distributed scheduling system, more particularly to a kind of distributed task dispatching method, apparatus and system.
Background technology
Scheduling system generally refers to perform corresponding task on computers in the way of time triggered or event triggering System.Distribution is primarily referred to as task distribution to different computers, and tasks carrying has upstream and downstream, it is necessary to cooperate with completion task Working method.Scheduling system is often realized in a distributed fashion, that is, forms distributed scheduling system, is mainly used in computer Timing or being triggered by event for task are performed between cluster, upstream for example can be dispatch server, and downstream for example can be Work (work) server.
As an example, a kind of scene is:(such as 10min) is accomplished by from multiple dispatch server needs at regular intervals A workspace server is selected in workspace server to perform a subtask E, such as task E content (alternatively referred to as operator E) It is that the unfinished order that placed an order before 4h is all set to completion.
The content of the invention
Inventor has found that in the prior art, the workload of dispatch server is heavy, especially during the present invention is realized It is task frequently, task intussusception when.Such as dispatch server needs frequently to be communicated with each workspace server, in another example Task E is performed once will one opening and closing set of correspondence, scheduling clothes in the log file (such as journal file) of dispatch server Whether the task E that business device usually requires to perform every time by scanning whole log file just to can determine that has opening and closing imperfect (i.e. only Have start perform record, it is no perform complete record) situation.If the frequency of tasks carrying is very high, cause logic meter Extremely complex, not only the execution speed of logical calculated is slow, also the pressure of dispatch server can be caused especially big, or even presence is collapsed Routed excessive risk.
In order to solve the above technical problems, the embodiment of the present invention provides a kind of distributed task dispatching method, apparatus and system, With the efficiency for mitigating the pressure of controlling equipment and when improving tasks carrying.
First aspect according to embodiments of the present invention is there is provided a kind of distributed task dispatching method, and methods described is used to adjust Equipment is spent, methods described includes:
When needing to perform first task, inquired about to database facility with the presence or absence of the second unfinished task, wherein, institute It is the belonging to same task before the first task and with the first task of the task, the database to state the second task The progress status of second task is recorded in equipment;
If there is the second unfinished task, then refuse to perform the first task;
If there is no the second unfinished task, then select the first working equipment to perform the first task, and, The database facility is notified so that the progress status of first task described in the database facility start recording.
Optionally, the database facility also records the heartbeat message of all tasks;
Methods described also includes:
The heartbeat message of unfinished task is inquired about to the database server according to the first preset strategy;
If the heartbeat message of unfinished task does not update more than preset duration, to the execution unfinished task Working equipment send and terminate the instruction of the unfinished task.
Second aspect according to embodiments of the present invention is there is provided a kind of distributed task dispatching method, and methods described is used for the One working equipment, methods described includes:
Receive the instruction for the execution first task that controlling equipment is sent;
During the first task is performed, send described first to database facility according to the second preset strategy The progress status of business, so that the progress status of the first task of the database facility to being recorded is updated.
Optionally, methods described also includes:
During the first task is performed, described the is sent to the database facility according to the 3rd preset strategy The heartbeat message of one task, so that the heartbeat message of the first task of the database facility to being recorded is updated.
The third aspect according to embodiments of the present invention includes there is provided a kind of distributed task dispatching device, described device:
Task checks module, for when needing to perform first task, to database facility inquiry with the presence or absence of unfinished The second task, wherein, second task is before the first task and belongs to same with the first task The progress status of second task is recorded in the task of business, the database facility;
Task scheduling modules, for if there is the second unfinished task, then refusing to perform the first task;If In the absence of the second unfinished task, then select the first working equipment to perform the first task, and, notify the data Library facilities is so that the progress status of first task described in the database facility start recording.
Optionally, the database facility also records the heartbeat message of all tasks;
The task scheduling modules are additionally operable to:
The heartbeat message of unfinished task is inquired about to the database server according to the first preset strategy;If not complete Into the heartbeat message of task do not updated more than preset duration, then send and tie to the working equipment for performing the unfinished task The instruction of task unfinished Shu Suoshu.
Fourth aspect according to embodiments of the present invention includes there is provided a kind of distributed task dispatching device, described device:
Task receiving module, the instruction for receiving the execution first task that controlling equipment is sent;
Task reporting module, for during the first task is performed, according to the second preset strategy to database Equipment sends the progress status of the first task, so that the database facility is to the progress of the first task recorded State is updated.
Optionally, the task reporting module is additionally operable to:
During the first task is performed, described the is sent to the database facility according to the 3rd preset strategy The heartbeat message of one task, so that the heartbeat message of the first task of the database facility to being recorded is updated.
5th aspect according to embodiments of the present invention is there is provided a kind of distributed task dispatching system, and the system includes adjusting Spend equipment, the first working equipment and database facility;
The controlling equipment is used for:When needing to perform first task, to database facility inquiry with the presence or absence of unfinished The second task, wherein, second task is before the first task and belongs to same with the first task The progress status of second task is recorded in the task of business, the database facility;If there is unfinished Two tasks, then refuse to perform the first task;If there is no the second unfinished task, then the first working equipment is selected The first task is performed, and, the database facility is notified so that first described in the database facility start recording The progress status of business;
First working equipment is used for:Receive the instruction for the execution first task that controlling equipment is sent;It is described performing During first task, the progress status of the first task is sent to database facility according to the second preset strategy, so that The progress status of the first task of the database facility to being recorded is updated;
The database facility is used for:Indicated according to the record of the controlling equipment received, start recording first task Progress status;The progress status for the first task that the first working equipment according to receiving is sent, updates described the recorded The progress status of one task;Indicated according to the inquiry of the controlling equipment, inquiry whether there is unfinished task in record, And, Query Result is returned into the controlling equipment.
Optionally, the database facility also records the heartbeat message of all tasks;
The controlling equipment is additionally operable to:Unfinished task is inquired about to the database server according to the first preset strategy Heartbeat message;It is described unfinished to performing if the heartbeat message of unfinished task does not update more than preset duration The working equipment of task sends the instruction for terminating the unfinished task;
First working equipment is additionally operable to:During the first task is performed, according to the 3rd preset strategy to The database facility sends the heartbeat message of the first task so that the database facility to recorded described first The heartbeat message of task is updated;
The database facility is additionally operable to:The heartbeat letter for the first task that the first working equipment according to receiving is sent Breath, updates the heartbeat message of the first task recorded;Indicated, inquired about in record according to the inquiry of the controlling equipment The heartbeat message of unfinished task, and, Query Result is returned into the controlling equipment.
The embodiment of the present invention additionally provides a kind of computer-readable storage medium, for storing used in distributed task dispatching device Computer software instructions, it is included, and to be used to perform in above-mentioned first aspect distributed task dispatching method be distributed task scheduling tune Spend the program involved by device.
The embodiment of the present invention additionally provides a kind of computer-readable storage medium, for storing used in distributed task dispatching device Computer software instructions, it is included, and to be used to perform in above-mentioned second aspect distributed task dispatching method be distributed task scheduling tune Spend the program involved by device.
In a possible design, the structure of controlling equipment includes processor and memory, and the memory is used for Storage supports controlling equipment to perform the program of distributed task dispatching method in above-mentioned first aspect, and the processor is configured as For performing the program stored in the memory.The controlling equipment can also include communication interface, for controlling equipment with Other equipment or communication.
In a possible design, the structure of working equipment includes processor and memory, and the memory is used for Storage supports working equipment to perform the program of distributed task dispatching method in above-mentioned second aspect, and the processor is configured as For performing the program stored in the memory.The working equipment can also include communication interface, for working equipment with Other equipment or communication.
In embodiments of the present invention, situation when being performed every time to task E is transferred to be good at managing and inquire about the data of data Library facilities is recorded, and the decision logic of execution status of task also gives database facility inquiry, substantially increases decision logic Execution efficiency, and controlling equipment many times only need to be communicated with database facility, greatly reduce controlling equipment oneself The pressure of body and the number of times communicated with working equipment, improve reliability.In addition, working equipment meeting during execution task Heartbeat message is sent to database facility, is found in time when so also working equipment is broken down.
It should be appreciated that the general description of the above and detailed description hereinafter are only exemplary and explanatory, not Can the limitation present invention.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is the accompanying drawing used required in technology description to be briefly described, it should be apparent that, drawings in the following description are this hairs Some bright embodiments, for those of ordinary skill in the art, on the premise of not paying creative work, can be with root Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is a kind of flow chart of distributed task dispatching method according to an exemplary embodiment of the invention;
Fig. 2 is a kind of schematic diagram of a scenario of the prior art;
Fig. 3 is a kind of schematic diagram of a scenario according to an exemplary embodiment of the invention;
Fig. 4 is a kind of flow chart of distributed task dispatching method according to an exemplary embodiment of the invention;
Fig. 5 is a kind of flow chart of distributed task dispatching method according to an exemplary embodiment of the invention;
A kind of signalling diagram of distributed task dispatching methods of the Fig. 6 according to an exemplary embodiment of the invention;
A kind of block diagram of distributed task dispatching devices of the Fig. 7 according to an exemplary embodiment of the invention;
A kind of block diagram of distributed task dispatching devices of the Fig. 8 according to an exemplary embodiment of the invention.
Embodiment
In order that those skilled in the art more fully understand the present invention program, below in conjunction with the embodiment of the present invention Accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described.
In some flows of description in description and claims of this specification and above-mentioned accompanying drawing, contain according to Particular order occur multiple operations, but it should be clearly understood that these operation can not herein occur according to it is suitable Sequence is performed or performed parallel, and the sequence number such as 101,102 etc. of operation is only used for distinguishing each different operation, sequence number Any execution sequence is not represented for itself.In addition, these flows can include more or less operations, and these operations can To perform or perform parallel in order.It should be noted that the description such as " first ", " second " herein, is to be used to distinguish not Same message, equipment, module etc., does not represent sequencing, it is different types also not limit " first " and " second ".
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.It is based on Embodiment in the present invention, the every other implementation that those skilled in the art are obtained under the premise of creative work is not made Example, belongs to the scope of protection of the invention.
Fig. 1 is a kind of flow chart of distributed task dispatching method according to an exemplary embodiment of the invention.Make It can be used for controlling equipment, such as dispatch server for example methods described.
Shown in Figure 1, methods described may include steps of:
Step S101, when needing to perform first task, is inquired about with the presence or absence of second not completed to database facility Business, wherein, second task is the belonging to same task before the first task and with the first task of the task, The progress status of second task is recorded in the database facility.
Herein, task E needs to be repeatedly executed at predetermined intervals (such as daily timing perform), and task E can be with each perform It is referred to as E1, E2...En... successively, or E1, E2...En etc. can also be referred to as to a task E example.For task The particular content embodiment of the present invention and be not limited, for example can be to perform specify script, perform designated program sentence (such as SQL statement), perform assigned operation (for example call WebServiceAPI, perform special package operation such as hdfs execution snapshot, Upper transmitting files of ftp, etc.).
As a comparison, Fig. 2 is a kind of schematic diagram of a scenario of the prior art, and Fig. 3 is implemented according to the present invention one is exemplary A kind of schematic diagram of a scenario exemplified, under scene shown in Fig. 2, working equipment is three workspace servers B, C, D, controlling equipment It is dispatch server, when task E needs to be performed again and again, work in every is responsible for by dispatch server, including record is every time The implementation status of task, scans whole log file to judge that whether all tasks are all closed loops, namely whether be not carried out Task, when the frequency of tasks carrying is very high, it will cause extremely complex to the logical calculated for whetheing there is unfinished task, give Dispatch server brings very big pressure.
And in the distributed task dispatching system shown in Fig. 3 scenes, add database facility, i.e. database server H, situation when being performed every time to task E is transferred to more to be good at managing and inquire about the database server H of data to record, and task is held The decision logic of row state also gives database server H inquiries, so as to substantially increase the execution efficiency of decision logic, also greatly Reduce the pressure of dispatch server itself greatly.
Step S102, if there is the second unfinished task, then refuses to perform the first task.
The progress status for all second tasks that database facility itself is recorded by inquiring about, can know controlling equipment With the presence or absence of the second unfinished task.If there is the second unfinished task, execution first is not allowed in this case Task.
Step S103, if there is no the second unfinished task, then selects the first working equipment to perform described first Task, and, the database facility is notified so that the progress status of first task described in the database facility start recording.
In the present embodiment or some other embodiments of the invention, the database facility can also record all tasks Heartbeat message;
Accordingly, methods described can also include:
The heartbeat message of unfinished task is inquired about to the database facility according to the first preset strategy (such as timing);
If the heartbeat message of unfinished task does not update more than preset duration (such as 20s), to described in execution not The working equipment of the task of completion sends the instruction for terminating the unfinished task.
So communicated by heartbeat, abnormal conditions during tasks carrying can be found within a short period of time, and no longer needed The whether normal link of controlling equipment active inquiry working equipment tasks carrying, reduces the pressure of controlling equipment.
Fig. 4 is a kind of flow chart of distributed task dispatching method according to an exemplary embodiment of the invention.Make It can be used for working equipment, such as workspace server for example methods described.
Shown in Figure 4, methods described may include steps of:
Step S401, receives the instruction for the execution first task that controlling equipment is sent.
Step S402, during the first task is performed, according to the second preset strategy (such as timing) to data Library facilities sends the progress status of the first task, so that the database facility entering to the first task that is recorded Degree state is updated.
In the present embodiment or some other embodiments of the invention, methods described can also include:
During the first task is performed, according to the 3rd preset strategy (such as timing) to the database facility The heartbeat message of the first task is sent, so that the database facility is to the heartbeat message of the first task recorded It is updated.
Fig. 5 is a kind of flow chart of distributed task dispatching method according to an exemplary embodiment of the invention.Make It can be used for database facility, such as database server for example methods described.
Shown in Figure 5, methods described may include steps of:
Step S501, is indicated, the progress status of start recording first task according to the record of the controlling equipment received.
Step S502, the progress status for the first task sent according to the first working equipment received, renewal is recorded The first task progress status.
Step S503, is indicated according to the inquiry of the controlling equipment, and inquiry whether there is unfinished task in record, And, Query Result is returned into the controlling equipment.
In the present embodiment or some other embodiments of the invention, methods described can also include:
The heartbeat message for the first task that the first working equipment according to receiving is sent, updates described first recorded The heartbeat message of task;
Indicated according to the inquiry of the controlling equipment, the heartbeat message of unfinished task is inquired about in record, and, will Query Result returns to the controlling equipment.
In the present embodiment, situation when being performed every time to task E transfers to the database for being good at managing and inquiring about data to set Standby to record, the decision logic of execution status of task also gives database facility inquiry, substantially increase the execution of decision logic Efficiency, and controlling equipment many times only need to be communicated with database facility, greatly reduce controlling equipment itself Pressure and the number of times communicated with working equipment, improve reliability.In addition, working equipment can be to number during execution task Heartbeat message is sent according to library facilities, is found in time when so also working equipment is broken down.
The present invention program is further described with reference to concrete scene.
A kind of signalling diagram of distributed task dispatching methods of the Fig. 6 according to an exemplary embodiment of the invention.
Step S601, dispatch server A is 12:10 trigger the i.e. task E of a timed task example, i.e. task E1, by being communicated with database server H, it can be determined that above whether have the example for the task E not being performed.
Step S602, by database server H inquiry (such as can be inquired about by SQL statement), before discovery The example for the task E that face has not been performed, then dispatch server A execution task E1 instruction is assigned to workspace server B (can specifically include task operator E1), and to the synchronous state of database server H, inform task E1 12:10 by work Make server B execution.
Step S603, workspace server B receive the operator E1 that dispatch server A is sent, and perform the operator.Such as operator E1 purpose is the state for resetting backlog before 4h, and the particular content of operator can be a shell pin for performing Linux Sheet or other operations.The process E1 ' of an execution task is can behave as in operating system aspect.Meanwhile, perform task Database server H is given in interval (such as 5s) synchronous heartbeat and Task Progress of the process E1 ' meetings according to setting.
Dispatch server A, which can be timed on database server H, checks abortive heartbeat message, if more than Certain threshold value (such as 20s) is without renewal heartbeat message, then it is assumed that corresponding tasks carrying failure.
Step S604, dispatch server A is 12:20 start to trigger task E another example i.e. task E2, now adjust E1 before degree server A is inquired by database server H is not completed, then dispatch server refuses this timed task E2 Execution.
Step S605, dispatch server A is 12:30 start to trigger task E another example i.e. task E3, by with Database server H communicates, it can be determined that above whether have the example for the task E not being performed.
Step S606, by database server H inquiry, the example for the task E not being performed before discovery, Then dispatch server A is assigned to workspace server B (can certainly select other workspace servers, not reinflated explanation to this) Execution task E3 instruction (can specifically include task operator E3), and to the synchronous state of database server H, inform and appoint E3 be engaged in 12:30 are performed by workspace server B.
Step S607, workspace server B receive the operator E3 that dispatch server A is sent, and perform the operator.Simultaneously according to setting Database server H is given in fixed interval synchronization heartbeat and Task Progress.Such loop cycle is gone down.
In the present embodiment, situation when being performed every time to task E transfers to the database for being good at managing and inquiring about data to set Standby to record, the decision logic of execution status of task also gives database facility inquiry, substantially increase the execution of decision logic Efficiency, and controlling equipment many times only need to be communicated with database facility, greatly reduce controlling equipment itself Pressure and the number of times communicated with working equipment, improve reliability.In addition, working equipment can be to number during execution task Heartbeat message is sent according to library facilities, is found in time when so also working equipment is broken down.
Following is apparatus of the present invention embodiment, can be used for performing the inventive method embodiment.It is real for apparatus of the present invention The details not disclosed in example is applied, the inventive method embodiment is refer to.
A kind of block diagram of distributed task dispatching devices of the Fig. 7 according to an exemplary embodiment of the invention.Referring to Fig. 7 Shown, the device can include:
Task checks module 701, for when needing to perform first task, to database facility inquiry with the presence or absence of not complete Into the second task, wherein, second task is before the first task and belongs to same with the first task The progress status of second task is recorded in the task of task, the database facility;
Task scheduling modules 702, for if there is the second unfinished task, then refusing to perform the first task; If there is no the second unfinished task, then select the first working equipment to perform the first task, and, notify described Database facility is so that the progress status of first task described in the database facility start recording.
In the present embodiment or some other embodiments of the invention, the database facility also records the heart of all tasks Hop-information;
The task scheduling modules 702 can be also used for:
The heartbeat message of unfinished task is inquired about to the database server according to the first preset strategy;If not complete Into the heartbeat message of task do not updated more than preset duration, then send and tie to the working equipment for performing the unfinished task The instruction of task unfinished Shu Suoshu.
A kind of block diagram of distributed task dispatching devices of the Fig. 8 according to an exemplary embodiment of the invention.Referring to Fig. 8 Shown, the device can include:
Task receiving module 801, the instruction for receiving the execution first task that controlling equipment is sent;
Task reporting module 802, for during the first task is performed, according to the second preset strategy to data Library facilities sends the progress status of the first task, so that the database facility entering to the first task that is recorded Degree state is updated.
In the present embodiment or some other embodiments of the invention, the task reporting module 802 can be also used for:
During the first task is performed, described the is sent to the database facility according to the 3rd preset strategy The heartbeat message of one task, so that the heartbeat message of the first task of the database facility to being recorded is updated.
In the present embodiment, situation when being performed every time to task E transfers to the database for being good at managing and inquiring about data to set Standby to record, the decision logic of execution status of task also gives database facility inquiry, substantially increase the execution of decision logic Efficiency, and controlling equipment many times only need to be communicated with database facility, greatly reduce controlling equipment itself Pressure and the number of times communicated with working equipment, improve reliability.In addition, working equipment can be to number during execution task Heartbeat message is sent according to library facilities, is found in time when so also working equipment is broken down.
On the device in above-described embodiment, wherein unit module perform the concrete mode of operation relevant It is described in detail in the embodiment of this method, explanation will be not set forth in detail herein.
The invention also discloses a kind of distributed task dispatching system, the system includes controlling equipment, the first work and set Standby and database facility;
The controlling equipment is used for:When needing to perform first task, to database facility inquiry with the presence or absence of unfinished The second task, wherein, second task is before the first task and belongs to same with the first task The progress status of second task is recorded in the task of business, the database facility;If there is unfinished Two tasks, then refuse to perform the first task;If there is no the second unfinished task, then the first working equipment is selected The first task is performed, and, the database facility is notified so that first described in the database facility start recording The progress status of business;
First working equipment is used for:Receive the instruction for the execution first task that controlling equipment is sent;It is described performing During first task, the progress status of the first task is sent to database facility according to the second preset strategy, so that The progress status of the first task of the database facility to being recorded is updated;
The database facility is used for:Indicated according to the record of the controlling equipment received, start recording first task Progress status;The progress status for the first task that the first working equipment according to receiving is sent, updates described the recorded The progress status of one task;Indicated according to the inquiry of the controlling equipment, inquiry whether there is unfinished task in record, And, Query Result is returned into the controlling equipment.
In the present embodiment or some other embodiments of the invention, the database facility also records the heart of all tasks Hop-information;
The controlling equipment is additionally operable to:Unfinished task is inquired about to the database server according to the first preset strategy Heartbeat message;It is described unfinished to performing if the heartbeat message of unfinished task does not update more than preset duration The working equipment of task sends the instruction for terminating the unfinished task;
First working equipment is additionally operable to:During the first task is performed, according to the 3rd preset strategy to The database facility sends the heartbeat message of the first task so that the database facility to recorded described first The heartbeat message of task is updated;
The database facility is additionally operable to:The heartbeat letter for the first task that the first working equipment according to receiving is sent Breath, updates the heartbeat message of the first task recorded;Indicated, inquired about in record according to the inquiry of the controlling equipment The heartbeat message of unfinished task, and, Query Result is returned into the controlling equipment.
The invention also discloses a kind of controlling equipment, the structure of the controlling equipment includes processor and memory, institute State memory be used for store support the program of distributed task dispatching method in the above-mentioned first aspect of controlling equipment execution, institute Processor is stated to be configurable for performing the program stored in the memory.
Described program includes one or more computer instruction, wherein, one or more computer instruction is for described Processor calls execution.
The processor is used for:
When needing to perform first task, inquired about to database facility with the presence or absence of the second unfinished task, wherein, institute It is the belonging to same task before the first task and with the first task of the task, the database to state the second task The progress status of second task is recorded in equipment;
If there is the second unfinished task, then refuse to perform the first task;
If there is no the second unfinished task, then select the first working equipment to perform the first task, and, The database facility is notified so that the progress status of first task described in the database facility start recording.
The invention also discloses a kind of working equipment, the structure of the working equipment includes processor and memory, institute State memory be used for store support the program of distributed task dispatching method in the above-mentioned second aspect of working equipment execution, institute Processor is stated to be configurable for performing the program stored in the memory.
Described program includes one or more computer instruction, wherein, one or more computer instruction is for described Processor calls execution.
The processor is used for:
Receive the instruction for the execution first task that controlling equipment is sent;
During the first task is performed, send described first to database facility according to the second preset strategy The progress status of business, so that the progress status of the first task of the database facility to being recorded is updated.
The embodiment of the present invention additionally provides a kind of computer-readable storage medium, for storing used in distributed task dispatching device Computer software instructions, it is included, and to be used to perform in above-mentioned first aspect distributed task dispatching method be distributed task scheduling tune Spend the program involved by device.
The embodiment of the present invention additionally provides a kind of computer-readable storage medium, for storing used in distributed task dispatching device Computer software instructions, it is included, and to be used to perform in above-mentioned second aspect distributed task dispatching method be distributed task scheduling tune Spend the program involved by device.
It is apparent to those skilled in the art that, for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, may be referred to the corresponding process in preceding method embodiment, will not be repeated here.
Device embodiment described above is only schematical, wherein the unit illustrated as separating component can To be or may not be physically separate, the part shown as unit can be or may not be physics list Member, you can with positioned at a place, or can also be distributed on multiple NEs.It can be selected according to the actual needs In some or all of module realize the purpose of this embodiment scheme.Those of ordinary skill in the art are not paying creativeness Work in the case of, you can to understand and implement.
Through the above description of the embodiments, those skilled in the art can be understood that each embodiment can Realized by the mode of software plus required general hardware platform, naturally it is also possible to pass through hardware.Understood based on such, on The part that technical scheme substantially in other words contributes to prior art is stated to embody in the form of software product, should Computer software product can be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disc, CD, including some fingers Order is to cause a computer equipment (can be personal computer, server, or network equipment etc.) to perform each implementation Method described in some parts of example or embodiment.
Finally it should be noted that:The above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although The present invention is described in detail with reference to the foregoing embodiments, it will be understood by those within the art that:It still may be used To be modified to the technical scheme described in foregoing embodiments, or equivalent substitution is carried out to which part technical characteristic; And these modification or replace, do not make appropriate technical solution essence depart from various embodiments of the present invention technical scheme spirit and Scope.
The invention discloses A1, a kind of distributed task dispatching method, methods described is used for controlling equipment, methods described bag Include:
When needing to perform first task, inquired about to database facility with the presence or absence of the second unfinished task, wherein, institute It is the belonging to same task before the first task and with the first task of the task, the database to state the second task The progress status of second task is recorded in equipment;
If there is the second unfinished task, then refuse to perform the first task;
If there is no the second unfinished task, then select the first working equipment to perform the first task, and, The database facility is notified so that the progress status of first task described in the database facility start recording.
A2, the method as described in A1, the database facility also record the heartbeat message of all tasks;
Methods described also includes:
The heartbeat message of unfinished task is inquired about to the database server according to the first preset strategy;
If the heartbeat message of unfinished task does not update more than preset duration, to the execution unfinished task Working equipment send and terminate the instruction of the unfinished task.
The invention discloses B3, a kind of distributed task dispatching method, methods described is used for the first working equipment, the side Method includes:
Receive the instruction for the execution first task that controlling equipment is sent;
During the first task is performed, send described first to database facility according to the second preset strategy The progress status of business, so that the progress status of the first task of the database facility to being recorded is updated.
B4, the method as described in B3, methods described also include:
During the first task is performed, described the is sent to the database facility according to the 3rd preset strategy The heartbeat message of one task, so that the heartbeat message of the first task of the database facility to being recorded is updated.
The invention discloses C5, a kind of distributed task dispatching device, described device includes:
Task checks module, for when needing to perform first task, to database facility inquiry with the presence or absence of unfinished The second task, wherein, second task is before the first task and belongs to same with the first task The progress status of second task is recorded in the task of business, the database facility;
Task scheduling modules, for if there is the second unfinished task, then refusing to perform the first task;If In the absence of the second unfinished task, then select the first working equipment to perform the first task, and, notify the data Library facilities is so that the progress status of first task described in the database facility start recording.
C6, the device as described in C5, the database facility also record the heartbeat message of all tasks;
The task scheduling modules are additionally operable to:
The heartbeat message of unfinished task is inquired about to the database server according to the first preset strategy;If not complete Into the heartbeat message of task do not updated more than preset duration, then send and tie to the working equipment for performing the unfinished task The instruction of task unfinished Shu Suoshu.
The invention discloses D7, a kind of distributed task dispatching device, described device includes:
Task receiving module, the instruction for receiving the execution first task that controlling equipment is sent;
Task reporting module, for during the first task is performed, according to the second preset strategy to database Equipment sends the progress status of the first task, so that the database facility is to the progress of the first task recorded State is updated.
D8, the device as described in D7, the task reporting module are additionally operable to:
During the first task is performed, described the is sent to the database facility according to the 3rd preset strategy The heartbeat message of one task, so that the heartbeat message of the first task of the database facility to being recorded is updated.
The invention discloses E9, a kind of distributed task dispatching system, the system includes controlling equipment, the first work and set Standby and database facility;
The controlling equipment is used for:When needing to perform first task, to database facility inquiry with the presence or absence of unfinished The second task, wherein, second task is before the first task and belongs to same with the first task The progress status of second task is recorded in the task of business, the database facility;If there is unfinished Two tasks, then refuse to perform the first task;If there is no the second unfinished task, then the first working equipment is selected The first task is performed, and, the database facility is notified so that first described in the database facility start recording The progress status of business;
First working equipment is used for:Receive the instruction for the execution first task that controlling equipment is sent;It is described performing During first task, the progress status of the first task is sent to database facility according to the second preset strategy, so that The progress status of the first task of the database facility to being recorded is updated;
The database facility is used for:Indicated according to the record of the controlling equipment received, start recording first task Progress status;The progress status for the first task that the first working equipment according to receiving is sent, updates described the recorded The progress status of one task;Indicated according to the inquiry of the controlling equipment, inquiry whether there is unfinished task in record, And, Query Result is returned into the controlling equipment.
E10, the system as described in E9, the database facility also record the heartbeat message of all tasks;
The controlling equipment is additionally operable to:Unfinished task is inquired about to the database server according to the first preset strategy Heartbeat message;It is described unfinished to performing if the heartbeat message of unfinished task does not update more than preset duration The working equipment of task sends the instruction for terminating the unfinished task;
First working equipment is additionally operable to:During the first task is performed, according to the 3rd preset strategy to The database facility sends the heartbeat message of the first task so that the database facility to recorded described first The heartbeat message of task is updated;
The database facility is additionally operable to:The heartbeat letter for the first task that the first working equipment according to receiving is sent Breath, updates the heartbeat message of the first task recorded;Indicated, inquired about in record according to the inquiry of the controlling equipment The heartbeat message of unfinished task, and, Query Result is returned into the controlling equipment.
The invention also discloses F11, a kind of controlling equipment, including memory and processor;Wherein,
The memory is used to store one or more computer instruction, wherein, one or more computer instruction Execution is called for the processor;
The processor is used for:
When needing to perform first task, inquired about to database facility with the presence or absence of the second unfinished task, wherein, institute It is the belonging to same task before the first task and with the first task of the task, the database to state the second task The progress status of second task is recorded in equipment;
If there is the second unfinished task, then refuse to perform the first task;
If there is no the second unfinished task, then select the first working equipment to perform the first task, and, The database facility is notified so that the progress status of first task described in the database facility start recording.
The invention also discloses G12, a kind of working equipment, including memory and processor;Wherein,
The memory is used to store one or more computer instruction, wherein, one or more computer instruction Execution is called for the processor;
The processor is used for:
Receive the instruction for the execution first task that controlling equipment is sent;
During the first task is performed, send described first to database facility according to the second preset strategy The progress status of business, so that the progress status of the first task of the database facility to being recorded is updated.

Claims (10)

1. a kind of distributed task dispatching method, it is characterised in that methods described is used for controlling equipment, methods described includes:
When needing to perform first task, inquired about to database facility with the presence or absence of the second unfinished task, wherein, described the Two tasks are the belonging to same task before the first task and with the first task of the task, the database facility It is middle to record the progress status for having had second task;
If there is the second unfinished task, then refuse to perform the first task;
If there is no the second unfinished task, then select the first working equipment to perform the first task, and, notify The database facility is so that the progress status of first task described in the database facility start recording.
2. according to the method described in claim 1, it is characterised in that the database facility also records the heartbeat of all tasks Information;
Methods described also includes:
The heartbeat message of unfinished task is inquired about to the database server according to the first preset strategy;
If the heartbeat message of unfinished task does not update more than preset duration, to the work for performing the unfinished task Make equipment and send the instruction for terminating the unfinished task.
3. a kind of distributed task dispatching method, it is characterised in that methods described is used for the first working equipment, methods described bag Include:
Receive the instruction for the execution first task that controlling equipment is sent;
During the first task is performed, the first task is sent to database facility according to the second preset strategy Progress status, so that the progress status of the first task of the database facility to being recorded is updated.
4. method according to claim 3, it is characterised in that methods described also includes:
During the first task is performed, send described first to the database facility according to the 3rd preset strategy The heartbeat message of business, so that the heartbeat message of the first task of the database facility to being recorded is updated.
5. a kind of distributed task dispatching device, it is characterised in that described device includes:
Task checks module, for when needing to perform first task, being inquired about to database facility with the presence or absence of the not completed Two tasks, wherein, second task is before the first task and belongs to same task with the first task The progress status of second task is recorded in task, the database facility;
Task scheduling modules, for if there is the second unfinished task, then refusing to perform the first task;If do not deposited In the second unfinished task, then select the first working equipment to perform the first task, and, notify the database to set For so that the progress status of first task described in the database facility start recording.
6. device according to claim 5, it is characterised in that the database facility also records the heartbeat of all tasks Information;
The task scheduling modules are additionally operable to:
The heartbeat message of unfinished task is inquired about to the database server according to the first preset strategy;If do not completed The heartbeat message of task does not update more than preset duration, then is sent to the working equipment for performing the unfinished task and terminate institute State the instruction of unfinished task.
7. a kind of distributed task dispatching device, it is characterised in that described device includes:
Task receiving module, the instruction for receiving the execution first task that controlling equipment is sent;
Task reporting module, for during the first task is performed, according to the second preset strategy to database facility The progress status of the first task is sent, so that the database facility is to the progress status of the first task recorded It is updated.
8. device according to claim 7, it is characterised in that the task reporting module is additionally operable to:
During the first task is performed, send described first to the database facility according to the 3rd preset strategy The heartbeat message of business, so that the heartbeat message of the first task of the database facility to being recorded is updated.
9. a kind of distributed task dispatching system, it is characterised in that the system includes controlling equipment, the first working equipment and number According to library facilities;
The controlling equipment is used for:When needing to perform first task, inquired about to database facility with the presence or absence of the not completed Two tasks, wherein, second task is before the first task and belongs to same task with the first task The progress status of second task is recorded in task, the database facility;If there is unfinished second Business, then refuse to perform the first task;If there is no the second unfinished task, then the first working equipment is selected to perform The first task, and, the database facility is notified so that first task described in the database facility start recording Progress status;
First working equipment is used for:Receive the instruction for the execution first task that controlling equipment is sent;Performing described first During task, the progress status of the first task is sent to database facility according to the second preset strategy, so that described The progress status of the first task of the database facility to being recorded is updated;
The database facility is used for:Indicated according to the record of the controlling equipment received, the progress of start recording first task State;The progress status for the first task that the first working equipment according to receiving is sent, it is described first that renewal is recorded The progress status of business;Indicated according to the inquiry of the controlling equipment, inquiry whether there is unfinished task in record, with And, Query Result is returned into the controlling equipment.
10. system according to claim 9, it is characterised in that the database facility also records the heart of all tasks Hop-information;
The controlling equipment is additionally operable to:The heart of unfinished task is inquired about to the database server according to the first preset strategy Hop-information;If the heartbeat message of unfinished task does not update more than preset duration, to the execution unfinished task Working equipment send and terminate the instruction of the unfinished task;
First working equipment is additionally operable to:During the first task is performed, according to the 3rd preset strategy to described Database facility sends the heartbeat message of the first task, so that the database facility is to the first task that is recorded Heartbeat message be updated;
The database facility is additionally operable to:The heartbeat message for the first task that the first working equipment according to receiving is sent, more The heartbeat message of the first task newly recorded;Indicated according to the inquiry of the controlling equipment, inquire about not complete in record Into task heartbeat message, and, Query Result is returned into the controlling equipment.
CN201611257139.XA 2016-12-30 2016-12-30 A kind of distributed task dispatching method, apparatus and system Pending CN107092528A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611257139.XA CN107092528A (en) 2016-12-30 2016-12-30 A kind of distributed task dispatching method, apparatus and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611257139.XA CN107092528A (en) 2016-12-30 2016-12-30 A kind of distributed task dispatching method, apparatus and system

Publications (1)

Publication Number Publication Date
CN107092528A true CN107092528A (en) 2017-08-25

Family

ID=59646456

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611257139.XA Pending CN107092528A (en) 2016-12-30 2016-12-30 A kind of distributed task dispatching method, apparatus and system

Country Status (1)

Country Link
CN (1) CN107092528A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107832124A (en) * 2017-09-25 2018-03-23 阿里巴巴集团控股有限公司 A kind of method and apparatus that task is handled in document handling system
CN110895487A (en) * 2018-09-12 2020-03-20 北京奇虎科技有限公司 Distributed task scheduling system
CN112379986A (en) * 2020-11-16 2021-02-19 北京字跳网络技术有限公司 Task processing method and device and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104462302A (en) * 2014-11-28 2015-03-25 北京京东尚科信息技术有限公司 Distributed data processing coordination method and system
CN104750549A (en) * 2015-04-13 2015-07-01 飞狐信息技术(天津)有限公司 Computational task processing device, method and system
CN105100259A (en) * 2015-08-18 2015-11-25 北京京东尚科信息技术有限公司 Distributed timed task execution method and system
CN105468450A (en) * 2015-12-29 2016-04-06 华为技术有限公司 Task scheduling method and system
CN106095562A (en) * 2016-08-23 2016-11-09 北京云纵信息技术有限公司 The method and apparatus of Portable Batch System

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104462302A (en) * 2014-11-28 2015-03-25 北京京东尚科信息技术有限公司 Distributed data processing coordination method and system
CN104750549A (en) * 2015-04-13 2015-07-01 飞狐信息技术(天津)有限公司 Computational task processing device, method and system
CN105100259A (en) * 2015-08-18 2015-11-25 北京京东尚科信息技术有限公司 Distributed timed task execution method and system
CN105468450A (en) * 2015-12-29 2016-04-06 华为技术有限公司 Task scheduling method and system
CN106095562A (en) * 2016-08-23 2016-11-09 北京云纵信息技术有限公司 The method and apparatus of Portable Batch System

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107832124A (en) * 2017-09-25 2018-03-23 阿里巴巴集团控股有限公司 A kind of method and apparatus that task is handled in document handling system
CN110895487A (en) * 2018-09-12 2020-03-20 北京奇虎科技有限公司 Distributed task scheduling system
CN110895487B (en) * 2018-09-12 2023-03-10 北京奇虎科技有限公司 Distributed task scheduling system
CN112379986A (en) * 2020-11-16 2021-02-19 北京字跳网络技术有限公司 Task processing method and device and electronic equipment
CN112379986B (en) * 2020-11-16 2023-12-12 北京字跳网络技术有限公司 Task processing method and device and electronic equipment

Similar Documents

Publication Publication Date Title
CN100479575C (en) Method and apparatus for realizing scheduled operation in equipment management
JP4786139B2 (en) Planning and scheduling for failure recovery systems and methods
CN110447206A (en) Automatic fault recovery system, control equipment, program creation equipment and computer readable storage medium
CN110807064B (en) Data recovery device in RAC distributed database cluster system
CN107092521A (en) A kind of distributed task dispatching method, apparatus and system
CN105487924A (en) Batch processing controlling method and device
CN105653322B (en) The processing method of O&M server and server event
CN109760041A (en) Cloud management system and its operating method based on chat robots
CN104135378B (en) The method and things-internet gateway management and control entity of control are managed to things-internet gateway
CN107092528A (en) A kind of distributed task dispatching method, apparatus and system
CN113163414B (en) Information processing method and near-real-time radio access network controller
CN102081554A (en) Cloud computing operating system as well as kernel control system and method thereof
CN109271602A (en) Deep learning model dissemination method and device
CN109978290A (en) A kind of operation flow backspacing processing method of extensive makeup, flow engine and operation system
CN103905225A (en) Service control method, service control device and service system
CN111400011B (en) Real-time task scheduling method, system, equipment and readable storage medium
CN106685894B (en) Risk identification method, device and system
WO2023066084A1 (en) Computing power distribution method and apparatus, and computing power server
CN109787858A (en) A kind of method and terminal of batch issuing service
CN107944842A (en) List triggering method, storage medium and equipment based on interface configurations
CN107357831A (en) Configurable flow instance data distribution formula storage method and system
CN107168813A (en) Task processing method and system
WO2006129277A2 (en) Method and hardware node for customized upgrade control
CN112035240A (en) Task management method, device and system
CN107423097A (en) The management method and device of a kind of application program

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
CB02 Change of applicant information

Address after: 100085 Beijing, Haidian District on the road to the information on the ground floor of the 1 to the 3 floor of the 2 floor, room 11, 202

Applicant after: Beijing Xingxuan Technology Co.,Ltd.

Address before: 100085 Beijing, Haidian District on the road to the information on the ground floor of the 1 to the 3 floor of the 2 floor, room 11, 202

Applicant before: Beijing Xiaodu Information Technology Co.,Ltd.

CB02 Change of applicant information
RJ01 Rejection of invention patent application after publication

Application publication date: 20170825

RJ01 Rejection of invention patent application after publication