CN107885600A - Dispatching method, device and the computer equipment of batch timed task - Google Patents

Dispatching method, device and the computer equipment of batch timed task Download PDF

Info

Publication number
CN107885600A
CN107885600A CN201710980601.7A CN201710980601A CN107885600A CN 107885600 A CN107885600 A CN 107885600A CN 201710980601 A CN201710980601 A CN 201710980601A CN 107885600 A CN107885600 A CN 107885600A
Authority
CN
China
Prior art keywords
task
grouped
batch
dispatching
subregion
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
CN201710980601.7A
Other languages
Chinese (zh)
Inventor
姜璐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yonyou Network Technology Co Ltd
Original Assignee
Yonyou Network 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 Yonyou Network Technology Co Ltd filed Critical Yonyou Network Technology Co Ltd
Priority to CN201710980601.7A priority Critical patent/CN107885600A/en
Publication of CN107885600A publication Critical patent/CN107885600A/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/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a kind of dispatching method, device and the computer equipment of batch timed task.Wherein, a kind of dispatching method of batch timed task, including:Batch timed task is loaded, current system resource and batch timed task are analyzed, obtains systematic parameter, and the static nature of each timed task;According to systematic parameter and static nature, grouped task is carried out to batch timed task.The dispatching method of the offer of the present invention, batch tasks processing task is realized packet, to the time resource and hardware resource Optimum utilization of fixed period, improve flexibility, maintainability and the fault-tolerant ability of batch processing.

Description

Dispatching method, device and the computer equipment of batch timed task
Technical field
It is a kind of in particular to a kind of dispatching method of batch timed task the present invention relates to field of computer technology The dispatching device of batch timed task, a kind of computer equipment, a kind of computer-readable recording medium.
Background technology
Timed task scheduling is a scheduling strategy that can be automatically calculated, exported and pushed with property performance period.Such as number All it is timed task according to periodic refreshing, form subscription.
Because system is different, how scheduling engine realizes the scheduling of timed task also difference.
Most common scheme is by the timer completion timing task in Java in correlation technique.Java timer works Tool, appointed task is performed for the ready-made plan on a backstage.Under the solution, to be that each timed task is set One timer, the tasks carrying specified is notified that to execution time timer.But this scheduling mode, to the resource of system Consume larger, system operation may be caused slack-off.
Also some large scale systems control timed task by background thread.Newly-increased task can carry and perform time etc. Attribute, task is added in queue, play a thread loops queue, judge the time of current time and queue heads task, reach Scheduling time then task dequeue, is put into actuator and performs.The flow chart of its operation principle is as shown in Figure 1:
Step 102, task is added and treats scheduling queue;
Step 104, judge whether to reach scheduling time;
Step 106, when reaching scheduling time, task is added into pending queue;Otherwise, step 112 is performed;
Step 108, available free actuator is judged whether;
Step 110, if so, then performing;Otherwise, step 112 is performed;
Step 112, wait pending.
But in large scale system, there can be substantial amounts of batch tasks, will because batch tasks closeness may be very high Substantial amounts of system resource is taken, great pressure is brought to system, causes the processing speed of whole system to substantially reduce, or even meeting There is the risk for the machine of delaying, therefore the quantity of actuator would generally be limited.And this has a defect, when simultaneously the task of batch is asked During a small amount of actuator, might have a small amount of task can not perform on time, and cannot be guaranteed that task notifies in time, hold in time OK, can not be to time resource and hardware resource Optimum utilization in the batch play of fixed period, flexibility and maintainability be not high.
The content of the invention
It is contemplated that at least solves one of technical problem present in prior art or correlation technique.
Therefore, it is an aspect of the invention to propose a kind of dispatching method of batch timed task.
Another aspect of the present invention is to propose a kind of dispatching device of batch timed task.
Another aspect of the invention is to propose a kind of computer equipment.
Another aspect of the present invention is to propose a kind of computer-readable recording medium.
In view of this, an aspect of of the present present invention, it is proposed that a kind of dispatching method of batch timed task, including:Loading batch Timed task is measured, current system resource and batch timed task are analyzed, acquisition systematic parameter, and each timed task are quiet State feature;According to systematic parameter and static nature, grouped task is carried out to batch timed task.
, can be to current system resource (such as CPU, internal memory) according to the dispatching method of the batch timed task of the present invention Static nature analysis is carried out with batch tasks, obtains the static nature of each task, such as task execution time and weights;And base It is grouped in the static nature of each task of systematic parameter, to formulate optimal packet mode.Pass through tune provided by the invention Degree method, batch tasks processing task is set to realize packet, to the time resource and hardware resource Optimum utilization of fixed period, lifting The flexibility of batch processing, maintainability and fault-tolerant ability.
In addition, according to the dispatching method of the above-mentioned batch timed task of the present invention, there can also be technology additional as follows Feature:
In the above-mentioned technical solutions, it is preferable that the dispatching method also includes:According to static nature, each grouped task is calculated Group weights, and the dispatching sequence of each grouped task is determined according to group weights, based on dispatching sequence's definition of each grouped task Dispatching sequence;According to static nature, subregion is carried out to task in grouped task, and calculate the weights of each subregion;And according to The dispatching sequence of each subregion, secondary dispatching sequence is defined as by the dispatching sequence of each subregion in group in the weights determination group of subregion;It is right Batch timed task after packet, subregion is stored.
In the technical scheme, with reference to the static nature of each task, the group weights of each group task are calculated, for determining to lead Dispatching sequence;And the static nature progress subregion of each task is combined, the weights of each subregion are calculated, it is determined that each subregion in group Dispatching sequence, be secondary dispatching sequence;Based on master scheduling order and the secondary dispatching sequence, current group batch tasks are formed Scheduling strategy.For example, with reference to each task weights and perform the time, the group weights of each group task are calculated, for determining homophony Degree order;According to subregion weights, it is determined that in group each subregion dispatching sequence, be secondary dispatching sequence.Pass through the technology of the present invention Scheme, batch tasks processing task is set to realize that packet, the dimension of subregion two are concurrent, to the time resource and hardware resource of fixed period Optimum utilization, improve flexibility, maintainability and the fault-tolerant ability of batch processing.
In any of the above-described technical scheme, it is preferable that the dispatching method also includes:Task point is judged according to master scheduling order Whether the execution state of group is unlatching;If the execution state of grouped task creates timer to open, for grouped task, and counts When;When timing time reaches the execution time of grouped task, the task in grouped task is loaded onto task performer, according to Secondary dispatching sequence performs the task in grouped task.
In the technical scheme, the opening and closing state of each grouped task is judged according to master scheduling order, it is only in office In the case that the execution state of business packet is opens, scheduling engine can be just that the packet creates timer, and be arrived in timing time Up to the grouped task the execution time when, the task in grouped task is loaded onto task performer, held according to secondary dispatching sequence Task in row grouped task.Dispatching method provided by the invention, to multiple timed tasks using the scheduling mode concentrated, by one Individual timer is that multiple timed tasks carry out timing;This mode compared in traditional approach ' each timed task is set respectively Put a corresponding timer ', the quantity of timer is reduced, it is possible to reduce the consumption to system resource, even if having run multiple Timed task, the speed of service of system also will not be reduced significantly.Also, when system resource anxiety, in order to ensure key Tasks carrying, we can close the relatively low grouped task of weights, it is ensured that mission critical can be performed normally, further be improved The high efficiency and stability of system.
In any of the above-described technical scheme, it is preferable that static nature includes performing time and/or weights.
In the technical scheme, it should be appreciated by those skilled in the art that the static nature of each task includes but is not limited to Any one of following or its combination:The execution time of each task and weights.
In any of the above-described technical scheme, it is preferable that the dispatching method also includes:Set the static state of each timed task special Sign, mark, and the execution state of each grouped task.
In the technical scheme, user can set the static nature of each timed task automatically, such as perform time and power Value etc., it is grouped based on the dependence between each task, execution time, formulates optimal packet mode;It can set The unique mark of each task, by concentrating task management, each task has unique mark, and the execution of same task Time is fixed, in the case of repeating to add identical task, can prevent the repetition of timed task from adding, repeat Problem;And the opening and closing state of each grouped task can be controlled, is unlatching only in the execution state of grouped task In the case of, just scheduling engine, which can be the packet, creates timer, so when system resource anxiety, in order to ensure that mission critical is held OK, we can close the relatively low grouped task of weights, it is ensured that mission critical can be performed normally, further improve system High efficiency and stability.
Another aspect of the present invention, it is proposed that a kind of dispatching device of batch timed task, including:Analytic unit, it is used for Batch timed task is loaded, current system resource and batch timed task are analyzed, obtains systematic parameter, and each timing is appointed The static nature of business;Grouped element, for according to systematic parameter and static nature, grouped task to be carried out to batch timed task.
, can be to current system resource (such as CPU, internal memory) according to the dispatching device of the batch timed task of the present invention Static nature analysis is carried out with batch tasks, obtains the static nature of each task, such as task execution time and weights;And base It is grouped in the static nature of each task of systematic parameter, to formulate optimal packet mode.Pass through tune provided by the invention Degree method, batch tasks processing task is set to realize packet, to the time resource and hardware resource Optimum utilization of fixed period, lifting The flexibility of batch processing, maintainability and fault-tolerant ability.
In the above-mentioned technical solutions, it is preferable that the dispatching device also includes:Computing unit, for according to static nature, meter The group weights of each grouped task are calculated, and the dispatching sequence of each grouped task is determined according to group weights, by the scheduling of each grouped task Order is defined as master scheduling order;Zoning unit, for according to static nature, carrying out subregion to task in grouped task, and Calculate the weights of each subregion;And the dispatching sequence according to each subregion in the weights determination group of subregion, by the tune of each subregion in group Degree order is defined as secondary dispatching sequence;Memory cell, for being stored to the batch timed task after packet, subregion.
In the technical scheme, with reference to the static nature of each task, the group weights of each group task are calculated, for determining to lead Dispatching sequence;And the static nature progress subregion of each task is combined, the weights of each subregion are calculated, it is determined that each subregion in group Dispatching sequence, be secondary dispatching sequence;Based on master scheduling order and the secondary dispatching sequence, current group batch tasks are formed Scheduling strategy.For example, with reference to each task weights and perform the time, the group weights of each group task are calculated, for determining homophony Degree order;According to subregion weights, it is determined that in group each subregion dispatching sequence, be secondary dispatching sequence.Pass through the technology of the present invention Scheme, batch tasks processing task is set to realize that packet, the dimension of subregion two are concurrent, to the time resource and hardware resource of fixed period Optimum utilization, improve flexibility, maintainability and the fault-tolerant ability of batch processing.
In any of the above-described technical scheme, it is preferable that the dispatching device also includes:Scheduling unit, for according to master scheduling Order judges whether the execution state of grouped task is unlatching;If the execution state of grouped task is opens, for grouped task Create timer, and timing;Execution unit, for when timing time reach grouped task the execution time when, by grouped task Interior task is loaded onto task performer, and the task in grouped task is performed according to secondary dispatching sequence.
In the technical scheme, the opening and closing state of each grouped task is judged according to master scheduling order, it is only in office In the case that the execution state of business packet is opens, scheduling engine can be just that the packet creates timer, and be arrived in timing time Up to the grouped task the execution time when, the task in grouped task is loaded onto task performer, held according to secondary dispatching sequence Task in row grouped task.Dispatching method provided by the invention, to multiple timed tasks using the scheduling mode concentrated, by one Individual timer is that multiple timed tasks carry out timing;This mode compared in traditional approach ' each timed task is set respectively Put a corresponding timer ', the quantity of timer is reduced, it is possible to reduce the consumption to system resource, even if having run multiple Timed task, the speed of service of system also will not be reduced significantly.Also, when system resource anxiety, in order to ensure key Tasks carrying, we can close the relatively low grouped task of weights, it is ensured that mission critical can be performed normally, further be improved The high efficiency and stability of system.
In any of the above-described technical scheme, it is preferable that static nature includes performing time and/or weights.
In the technical scheme, it should be appreciated by those skilled in the art that the static nature of each task includes but is not limited to Any one of following or its combination:The execution time of each task and weights.
In any of the above-described technical scheme, it is preferable that the dispatching device also includes:Setting unit, for setting each timing The static nature of task, mark, and each grouped task are turned on and off state.
In the technical scheme, user can set the static nature of each timed task automatically, such as perform time and power Value etc., it is grouped based on the dependence between each task, execution time, formulates optimal packet mode;It can set The unique mark of each task, by concentrating task management, each task has unique mark, and the execution of same task Time is fixed, in the case of repeating to add identical task, can prevent the repetition of timed task from adding, repeat Problem;And the opening and closing state of each grouped task can be controlled, is unlatching only in the execution state of grouped task In the case of, just scheduling engine, which can be the packet, creates timer, so when system resource anxiety, in order to ensure that mission critical is held OK, we can close the relatively low grouped task of weights, it is ensured that mission critical can be performed normally, further improve system High efficiency and stability.
Another aspect of the invention, it is proposed that a kind of computer equipment, including memory, processor and it is stored in memory Computer program that is upper and can running on a processor, processor are used to perform such as the step of any one of above-mentioned technical scheme method Suddenly.
According to the computer equipment of the present invention, according to the computer equipment of the present invention, its processor included is used to hold In row technical scheme any as described above the step of the dispatching method of batch timed task, thus the computer equipment can realize this Whole beneficial effects of the dispatching method of batch timed task, will not be repeated here
Another aspect of the present invention, it is proposed that a kind of computer-readable recording medium, be stored thereon with computer program, count Calculation machine program is realized when being executed by processor such as the step of any one of above-mentioned technical scheme method.
According to the computer-readable recording medium of the present invention, the computer program stored thereon is realized when being executed by processor As described above in any technical scheme the step of the dispatching method of batch timed task, thus the computer-readable recording medium energy Whole beneficial effects of the dispatching method of the batch timed task are enough realized, will not be repeated here.
The additional aspect and advantage of the present invention will become obvious in following description section, or the practice by the present invention Recognize.
Brief description of the drawings
The above-mentioned and/or additional aspect and advantage of the present invention will become in the description from combination accompanying drawings below to embodiment Substantially and it is readily appreciated that, wherein:
Fig. 1 shows the schematic flow sheet of the task scheduling strategy in correlation technique;
Fig. 2 shows the schematic flow sheet of the dispatching method of batch timed task according to an embodiment of the invention;
Fig. 3 shows the flow signal of the dispatching method of batch timed task according to another embodiment of the invention Figure;
Fig. 4 shows the flow signal of the dispatching method of batch timed task according to still a further embodiment Figure;
Fig. 5 shows the schematic block diagram of the dispatching device of batch timed task according to an embodiment of the invention;
Fig. 6 shows the schematic block diagram of the dispatching device of batch timed task according to another embodiment of the invention;
Fig. 7 shows the schematic block diagram of the dispatching device of batch timed task according to still a further embodiment;
Fig. 8 shows the schematic block diagram of the dispatching device of batch timed task according to still another embodiment of the invention;
Fig. 9 shows the batch timed task various dimensions scheduling strategy device of a specific embodiment according to the present invention Schematic block diagram;
Figure 10 shows the original of the batch timed task various dimensions scheduling strategy of a specific embodiment according to the present invention Manage schematic diagram;
Figure 11 shows the stream of the batch timed task various dimensions scheduling strategy of a specific embodiment according to the present invention Journey schematic diagram;
Figure 12 shows the schematic diagram of computer equipment according to an embodiment of the invention.
Embodiment
It is below in conjunction with the accompanying drawings and specific real in order to be more clearly understood that the above objects, features and advantages of the present invention Mode is applied the present invention is further described in detail.It should be noted that in the case where not conflicting, the implementation of the application Feature in example and embodiment can be mutually combined.
Many details are elaborated in the following description to facilitate a thorough understanding of the present invention, still, the present invention may be used also To be different from other modes described here using other to implement, therefore, protection scope of the present invention is not by described below Specific embodiment limitation.
As shown in Fig. 2 the schematic flow sheet of the dispatching method of batch timed task according to an embodiment of the invention. Wherein, the dispatching method of the batch timed task, including:
Step 202, batch timed task is loaded, current system resource and batch timed task are analyzed, are System parameter, and the static nature of each timed task;
Step 204, according to systematic parameter and static nature, grouped task is carried out to batch timed task.
The dispatching method of batch timed task provided by the invention, can be to current system resource (such as CPU, internal memory) Static nature analysis is carried out with batch tasks, obtains the static nature of each task, such as task execution time and weights;And base It is grouped in the static nature of each task of systematic parameter, to formulate optimal packet mode.Pass through tune provided by the invention Degree method, batch tasks processing task is set to realize packet, to the time resource and hardware resource Optimum utilization of fixed period, lifting The flexibility of batch processing, maintainability and fault-tolerant ability.
As shown in figure 3, the flow signal of the dispatching method of batch timed task according to another embodiment of the invention Figure.Wherein, the dispatching method of the batch timed task, including:
Step 302, batch timed task is loaded, current system resource and batch timed task are analyzed, are System parameter, and the static nature of each timed task;
Step 304, according to systematic parameter and static nature, grouped task is carried out to batch timed task;
Step 306, according to static nature, the group weights of each grouped task are calculated, and each task point is determined according to a group weights The dispatching sequence of group, the dispatching sequence of each grouped task is defined as master scheduling order;
Step 308, according to static nature, subregion is carried out to task in grouped task, and calculate the weights of each subregion;With And the dispatching sequence according to each subregion in the weights determination group of subregion, it is suitable that the dispatching sequence of each subregion in group is defined as secondary scheduling Sequence;
Step 310, the batch timed task after packet, subregion is stored.
In this embodiment it is possible to static nature is carried out to current system resource (such as CPU, internal memory) and batch tasks Analysis, obtain the static nature of each task, such as task execution time and weights;And based on the quiet of each task of systematic parameter State feature is grouped, to formulate optimal packet mode.By dispatching method provided by the invention, appoint batch tasks processing Pragmatic existing packet, to the time resource and hardware resource Optimum utilization of fixed period, improves the flexibility of batch processing, can tie up Shield property and fault-tolerant ability
As shown in figure 4, the flow signal of the dispatching method of batch timed task according to still a further embodiment Figure.Wherein, the dispatching method of the batch timed task, including:
Step 402, batch timed task is loaded, current system resource and batch timed task are analyzed, are System parameter, and the static nature of each timed task;
Step 404, according to systematic parameter and static nature, grouped task is carried out to batch timed task;
Step 406, according to static nature, the group weights of each grouped task are calculated, and each task point is determined according to a group weights The dispatching sequence of group, the dispatching sequence of each grouped task is defined as master scheduling order;
Step 408, according to static nature, subregion is carried out to task in grouped task, and calculate the weights of each subregion;With And the dispatching sequence according to each subregion in the weights determination group of subregion, it is suitable that the dispatching sequence of each subregion in group is defined as secondary scheduling Sequence;
Step 410, the batch timed task after packet, subregion is stored;
Step 412, judge whether the execution state of grouped task is unlatching according to master scheduling order;
Step 414, if the execution state of grouped task is opens, timer, and timing are created for grouped task;
Step 416, when timing time reaches the execution time of grouped task, the task in the grouped task is loaded onto Task performer, the task in grouped task is performed according to secondary dispatching sequence;
Step 418, if the execution state of the grouped task does not do any processing to close to the grouped task.
In this embodiment, the opening and closing state of each grouped task is judged according to master scheduling order, only in task In the case that the execution state of packet is opens, scheduling engine can be just that the packet creates timer, and be reached in timing time During the execution time of the grouped task, the task in grouped task is loaded onto task performer, performed according to secondary dispatching sequence Task in grouped task.Dispatching method provided by the invention, to multiple timed tasks using the scheduling mode concentrated, by one Timer is that multiple timed tasks carry out timing;This mode compared in traditional approach ' each timed task is set respectively One corresponding timer ', the quantity of timer is reduced, it is possible to reduce the consumption to system resource, though run it is multiple fixed When task, the speed of service of system also will not reduce significantly.Also, when system resource anxiety, in order to ensure crucial appoint Business performs, and we can close the relatively low grouped task of weights, it is ensured that mission critical can be performed normally, further improve system The high efficiency and stability of system.
In any of the above-described embodiment, it is preferable that static nature includes performing time and/or weights.
In this embodiment, it should be appreciated by those skilled in the art that the static nature of each task include but is not limited to Any one of lower or its combination:The execution time of each task and weights.
In any of the above-described embodiment, it is preferable that the dispatching method of the batch timed task also includes:Each timing is set to appoint The static nature of business, mark, and each grouped task are turned on and off state.
In this embodiment, user can set the static nature of each timed task automatically, such as perform time and weights Deng, based on the dependence between each task, perform the time be grouped, formulate optimal packet mode;It can set each The unique mark of individual task, by concentrating task management, each task has unique mark, and during the execution of same task Between be it is fixed, repeat add identical task in the case of, can prevent the repetition of timed task from adding, what is repeated asks Topic;And the opening and closing state of each grouped task can be controlled, only grouped task execution state for open feelings Under condition, just scheduling engine, which can be the packet, creates timer, so when system resource anxiety, in order to ensure that mission critical is held OK, we can close the relatively low grouped task of weights, it is ensured that mission critical can be performed normally, further improve system High efficiency and stability.
As shown in figure 5, the schematic block diagram of the dispatching device of batch timed task according to an embodiment of the invention.Its In, the dispatching device 500 of the batch timed task, including:
Analytic unit 502, for loading batch timed task, current system resource and batch timed task are divided Analysis, obtain systematic parameter, and the static nature of each timed task;
Grouped element 504, for according to systematic parameter and static nature, grouped task to be carried out to batch timed task.
The dispatching device 500 of batch timed task provided by the invention, can be to current system resource (such as CPU, internal memory Deng) and batch tasks carry out static nature analysis, obtain the static nature of each task, such as task execution time and weights; And the static nature based on each task of systematic parameter is grouped, to formulate optimal packet mode.There is provided by the present invention Dispatching method, batch tasks processing task is realized packet, to the time resource and hardware resource Optimum utilization of fixed period, Improve flexibility, maintainability and the fault-tolerant ability of batch processing.
As shown in fig. 6, the schematic block diagram of the dispatching device of batch timed task according to another embodiment of the invention. Wherein, the dispatching device 600 of the batch timed task, including:
Analytic unit 602, for loading batch timed task, current system resource and batch timed task are divided Analysis, obtain systematic parameter, and the static nature of each timed task;
Grouped element 604, for according to systematic parameter and static nature, grouped task to be carried out to batch timed task
Computing unit 606, for according to static nature, calculating the group weights of each grouped task, and determine according to group weights The dispatching sequence of each grouped task, the dispatching sequence of each grouped task is defined as master scheduling order;
Zoning unit 608, for according to static nature, subregion being carried out to task in grouped task, and calculate each subregion Weights;And the dispatching sequence according to each subregion in the weights determination group of subregion, the dispatching sequence of each subregion in group is defined For secondary dispatching sequence;
Memory cell 610, for being stored to the batch timed task after packet, subregion.
In this embodiment, with reference to the static nature of each task, the group weights of each group task are calculated, for determining homophony Degree order;And the static nature progress subregion of each task is combined, the weights of each subregion are calculated, it is determined that each subregion in group Dispatching sequence, it is secondary dispatching sequence;Based on master scheduling order and the secondary dispatching sequence, the tune of formation current group batch tasks Degree strategy.For example, with reference to each task weights and perform the time, the group weights of each group task are calculated, for determining master scheduling Sequentially;According to subregion weights, it is determined that in group each subregion dispatching sequence, be secondary dispatching sequence.Pass through the technical side of the present invention Case, batch tasks processing task is set to realize that packet, the dimension of subregion two are concurrent, it is excellent to the time resource and hardware resource of fixed period Change and utilize, improve flexibility, maintainability and the fault-tolerant ability of batch processing.
As shown in fig. 7, the schematic block diagram of the dispatching device of batch timed task according to still a further embodiment. Wherein, the dispatching device 700 of the batch timed task, including:
Analytic unit 702, for loading batch timed task, current system resource and batch timed task are divided Analysis, obtain systematic parameter, and the static nature of each timed task;
Grouped element 704, for according to systematic parameter and static nature, grouped task to be carried out to batch timed task
Computing unit 706, for according to static nature, calculating the group weights of each grouped task, and determine according to group weights The dispatching sequence of each grouped task, the dispatching sequence of each grouped task is defined as master scheduling order;
Zoning unit 708, for according to static nature, subregion being carried out to task in grouped task, and calculate each subregion Weights;And the dispatching sequence according to each subregion in the weights determination group of subregion, the dispatching sequence of each subregion in group is defined For secondary dispatching sequence;
Memory cell 710, for being stored to the batch timed task after packet, subregion;
Scheduling unit 712, for judging whether the execution state of grouped task is unlatching according to master scheduling order;If task The execution state of packet then creates timer, and timing to open for grouped task;
Execution unit 714, for when timing time reach grouped task the execution time when, by the task in grouped task Task performer is loaded onto, the task in grouped task is performed according to secondary dispatching sequence.
In this embodiment, the opening and closing state of each grouped task is judged according to master scheduling order, only in task In the case that the execution state of packet is opens, scheduling engine can be just that the packet creates timer, and be reached in timing time During the execution time of the grouped task, the task in grouped task is loaded onto task performer, performed according to secondary dispatching sequence Task in grouped task.Dispatching method provided by the invention, to multiple timed tasks using the scheduling mode concentrated, by one Timer is that multiple timed tasks carry out timing;This mode compared in traditional approach ' each timed task is set respectively One corresponding timer ', the quantity of timer is reduced, it is possible to reduce the consumption to system resource, though run it is multiple fixed When task, the speed of service of system also will not reduce significantly.Also, when system resource anxiety, in order to ensure crucial appoint Business performs, and we can close the relatively low grouped task of weights, it is ensured that mission critical can be performed normally, further improve system The high efficiency and stability of system.
In any of the above-described embodiment, it is preferable that static nature includes performing time and/or weights.
In this embodiment, it should be appreciated by those skilled in the art that the static nature of each task include but is not limited to Any one of lower or its combination:The execution time of each task and weights.
As shown in figure 8, the schematic block diagram of the dispatching device of batch timed task according to still another embodiment of the invention. Wherein, the dispatching device 800 of the batch timed task, including:
Analytic unit 802, for loading batch timed task, current system resource and batch timed task are divided Analysis, obtain systematic parameter, and the static nature of each timed task;
Grouped element 804, for according to systematic parameter and static nature, grouped task to be carried out to batch timed task
Computing unit 806, for according to static nature, calculating the group weights of each grouped task, and determine according to group weights The dispatching sequence of each grouped task, the dispatching sequence of each grouped task is defined as master scheduling order;
Zoning unit 808, for according to static nature, subregion being carried out to task in grouped task, and calculate each subregion Weights;And the dispatching sequence according to each subregion in the weights determination group of subregion, the dispatching sequence of each subregion in group is defined For secondary dispatching sequence;
Memory cell 810, for being stored to the batch timed task after packet, subregion;
Scheduling unit 812, for judging whether the execution state of grouped task is unlatching according to master scheduling order;If task The execution state of packet then creates timer, and timing to open for grouped task;
Execution unit 814, for when timing time reach grouped task the execution time when, by the task in grouped task Task performer is loaded onto, the task in grouped task is performed according to secondary dispatching sequence;
Setting unit 816, for setting the static nature of each timed task, mark, and each grouped task unlatching or Closed mode.
In this embodiment, user can set the static nature of each timed task automatically, such as perform time and weights Deng, based on the dependence between each task, perform the time be grouped, formulate optimal packet mode;It can set each The unique mark of individual task, by concentrating task management, each task has unique mark, and during the execution of same task Between be it is fixed, repeat add identical task in the case of, can prevent the repetition of timed task from adding, what is repeated asks Topic;And the opening and closing state of each grouped task can be controlled, only grouped task execution state for open feelings Under condition, just scheduling engine, which can be the packet, creates timer, so when system resource anxiety, in order to ensure that mission critical is held OK, we can close the relatively low grouped task of weights, it is ensured that mission critical can be performed normally, further improve system High efficiency and stability
Specific embodiment, there is provided a kind of batch timed task various dimensions scheduling strategy device, as shown in figure 9, the batch The device 900 of timed task various dimensions scheduling strategy includes:Task parameters set device 902, and user can be set by the device The parameters of the device 900 are put, and each static nature such as the execution time of task can be set;Task loading device 904, For being pre-processed to batch tasks, system resource is analyzed, and the data obtained after pretreatment deposit data are deposited In storage device 906, optimal packet mode is customized;Scheduling engine device 908 is used to carry out timing to the task in packet, when having When the task of packet reaches the execution time, the task in group is loaded into task performer and performed;Task performer 910, use Task in grouped task is performed by different weights, different subregions.
If any four timed tasks, by parameter setting apparatus 902, it is arranged to hold every 1 minute for task 1 and task 2 Row is once;It is arranged to perform at intervals of two minutes once for task 3 and task 4;The weights of task 2 are higher than task 1, task 3 and task 4 weights are identical;After configuration terminates, task is loaded into task loading device 904, and task loading device 904 is appointed to four Business is pre-processed, analysis system resource service condition, and acquires the execution time of task, and the weights of four tasks, It is grouped by the execution time of task and the weights of task, the task 1 and task 2 with the close execution time are divided into a group A, Task 3 and task 4 are divided into a group B;Because task 1 is different with the weights of task 2, therefore task 1 and task 2 are divided again in group A For subregion 1 and subregion 2;And task 3 is identical with the weights of task 4, then an only packet in B is organized.Task after packet, subregion It is loaded into data storage device 906 and stores, and notifies scheduling engine device 908 to each point by task loading device 904 Group (group A and group B) carries out timing.After 1 minute, the group A execution times arrive, and scheduling engine device 908 can give notice, and will organize in A Task be loaded into task performer 910 and perform;If now task performer 910 can only run a thread, according to point Area, the task 1 organized in A subregions 1 first carry out, and task 2 performs again after execution.Likewise, after 2 minutes, the execution time for organizing B arrives, Scheduling engine device 908 is given notice, and the task in group B is loaded into task performer 910 and performed.Its principle such as Figure 10 institutes Show.
In addition, this mode that centralized dispatching is carried out to batch timed task, the repetition for being also prevented from timed task add Add problem.If system has multiple modules, when being related to multiple fields, in the case of more people's operations, it is possible to there are various mistakes, can Same task can be caused repeatedly to add, be performed a plurality of times.But by concentrating task management, each task has unique mark Know, the execution time of same task is fixed, in the case of repeating to add identical task, can be set by task parameters Put the setting of device 902 and only carry out a task.
Meanwhile the batch timed task various dimensions scheduling strategy device 900 also includes system parameter setting device 912, In system parameter setting device 912, user can set grouped task automatically, can check the situation of grouped task, subregion, and And the opening and closing state that can be grouped with control task.Only in the case where the execution state of grouped task is to open, adjust It can be just that the packet creates timer to spend engine apparatus 908.So when system resource anxiety, in order to ensure that mission critical is held OK, we can close the relatively low grouped task of weights, it is ensured that mission critical can be performed normally, improve the high efficiency of system And stability.
The batch timed task in system can be thus grouped, the centralized scheduling of subregion various dimensions, and it is right Scheduler task is managed collectively.
Workflow on the batch timed task various dimensions scheduling strategy device 900 is as shown in figure 11:
Step 1102, task is increased newly;
Step 1104, parameter configuration (task execution time etc.);
Step 1106, task pretreatment (analysis static attribute, and systematic parameter, be grouped);
Step 1108, data are fitted into (in the task deposit data storage device being divided into group);
Step 1110, monitor is registered into scheduling engine device;
Step 1112, judge whether grouped task is opened;
Step 1114, if opening, scheduling engine creates task timer;Otherwise, return to step 1108;
Step 1116, judge whether to reach and perform the time;
Step 1118, the time is performed if reaching, task performer to data storage device goes drawing task, and performs task; Otherwise, return to step 1116;
Step 1120, judge whether the number of actuator is enough;
Step 1122, if the number of actuator is enough, concurrently perform;
Step 1124, if the number of actuator is not enough, subregion performs.
As shown in figure 12, the schematic diagram of computer equipment according to an embodiment of the invention.The computer equipment 1 wraps Include memory 12, processor 14 and be stored in the computer program that can be run on memory 12 and on processor 14, processor 14 are used to perform such as the step of any one of above-mentioned embodiment method.
Computer equipment 1 provided by the invention, its processor 14 included be used to performing memory 12 stored as In any of the above-described embodiment the step of the dispatching method of batch timed task, thus the computer equipment 1 can realize the batch Whole beneficial effects of the dispatching method of timed task, will not be repeated here
Another aspect of the present invention, it is proposed that a kind of computer-readable recording medium, be stored thereon with computer program, count Calculation machine program is realized when being executed by processor such as the step of any one of above-mentioned embodiment method.
Computer-readable recording medium provided by the invention, the computer program stored thereon are realized when being executed by processor As in above-mentioned any embodiment the step of the dispatching method of batch timed task, thus the computer-readable recording medium can Whole beneficial effects of the dispatching method of the batch timed task are realized, will not be repeated here.
The preferred embodiments of the present invention are the foregoing is only, are not intended to limit the invention, for the skill of this area For art personnel, the present invention can have various modifications and variations.Within the spirit and principles of the invention, that is made any repaiies Change, equivalent substitution, improvement etc., should be included in the scope of the protection.

Claims (12)

  1. A kind of 1. dispatching method of batch timed task, it is characterised in that including:
    The batch timed task is loaded, current system resource and the batch timed task are analyzed, obtains system ginseng Number, and the static nature of each timed task;
    According to the systematic parameter and the static nature, grouped task is carried out to the batch timed task.
  2. 2. the dispatching method of batch timed task according to claim 1, it is characterised in that also include:
    According to the static nature, the group weights of each grouped task are calculated, and each described is determined according to described group of weights Be engaged in the dispatching sequence being grouped, and the dispatching sequence of each grouped task is defined as into master scheduling order;
    According to the static nature, subregion is carried out to task in the grouped task, and calculate the weights of each subregion;With And
    According to the dispatching sequence of each subregion in the weights determination group of the subregion, by the scheduling of each subregion in described group Order is defined as secondary dispatching sequence;
    The batch timed task after packet, subregion is stored.
  3. 3. the dispatching method of batch timed task according to claim 2, it is characterised in that also include:
    Judge whether the execution state of the grouped task is unlatching according to master scheduling order;
    If the execution state of the grouped task creates timer, and timing to open, for the grouped task;
    When timing time reaches the execution time of the grouped task, the task in the grouped task is loaded onto task and held Row device, the task in the grouped task is performed according to the secondary dispatching sequence.
  4. 4. the dispatching method of batch timed task according to any one of claim 1 to 3, it is characterised in that
    The static nature includes the execution time and/or the weights.
  5. 5. the dispatching method of batch timed task according to claim 4, it is characterised in that also include:
    The static nature of each timed task is set, identified, and the execution state of each grouped task.
  6. A kind of 6. dispatching device of batch timed task, it is characterised in that including:
    Analytic unit, for loading the batch timed task, current system resource and the batch timed task are divided Analysis, obtain systematic parameter, and the static nature of each timed task;
    Grouped element, for according to the systematic parameter and the static nature, task point to be carried out to the batch timed task Group.
  7. 7. the dispatching device of batch timed task according to claim 6, it is characterised in that also include:
    Computing unit, for according to the static nature, calculating the group weights of each grouped task, and according to described group of weights The dispatching sequence of each grouped task is determined, the dispatching sequence of each grouped task is defined as master scheduling order;
    Zoning unit, for according to the static nature, subregion being carried out to task in the grouped task, and calculate each described The weights of subregion;And
    According to the dispatching sequence of each subregion in the weights determination group of the subregion, by the scheduling of each subregion in described group Order is defined as secondary dispatching sequence;
    Memory cell, for being stored to the batch timed task after packet, subregion.
  8. 8. the dispatching device of batch timed task according to claim 7, it is characterised in that also include:
    Scheduling unit, for judging whether the execution state of the grouped task is unlatching according to master scheduling order;
    If the execution state of the grouped task creates timer, and timing to open, for the grouped task;
    Execution unit, for reach the grouped task when timing time the execution time when, by appointing in the grouped task Business is loaded onto task performer, and the task in the grouped task is performed according to the secondary dispatching sequence.
  9. 9. the dispatching device of the batch timed task according to any one of claim 6 to 8, it is characterised in that
    The static nature includes the execution time and/or the weights.
  10. 10. the dispatching device of batch timed task according to claim 9, it is characterised in that also include:
    Setting unit, for setting the static nature of each timed task, mark, and the execution shape of each grouped task State.
  11. 11. a kind of computer equipment, including memory, processor and it is stored on the memory and can be on the processor The computer program of operation, it is characterised in that the processor is used to perform the method as any one of claim 1 to 5 The step of.
  12. 12. a kind of computer-readable recording medium, is stored thereon with computer program, it is characterised in that the computer program The step of method as any one of claim 1 to 5 is realized when being executed by processor.
CN201710980601.7A 2017-10-19 2017-10-19 Dispatching method, device and the computer equipment of batch timed task Pending CN107885600A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710980601.7A CN107885600A (en) 2017-10-19 2017-10-19 Dispatching method, device and the computer equipment of batch timed task

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710980601.7A CN107885600A (en) 2017-10-19 2017-10-19 Dispatching method, device and the computer equipment of batch timed task

Publications (1)

Publication Number Publication Date
CN107885600A true CN107885600A (en) 2018-04-06

Family

ID=61781696

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710980601.7A Pending CN107885600A (en) 2017-10-19 2017-10-19 Dispatching method, device and the computer equipment of batch timed task

Country Status (1)

Country Link
CN (1) CN107885600A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108090731A (en) * 2016-11-23 2018-05-29 腾讯科技(深圳)有限公司 A kind of information processing method and equipment
CN109376189A (en) * 2018-09-13 2019-02-22 阿里巴巴集团控股有限公司 Processing method, device and the equipment of batch data operation
CN109542598A (en) * 2018-11-08 2019-03-29 泰康保险集团股份有限公司 Timing task management method and device
CN110083442A (en) * 2019-03-18 2019-08-02 咪咕文化科技有限公司 A kind of operating method of user task, server and can storage medium
WO2021035517A1 (en) * 2019-08-27 2021-03-04 Microsoft Technology Licensing, Llc Workflow-based scheduling and batching in multi-tenant distributed systems

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101038559A (en) * 2006-09-11 2007-09-19 中国工商银行股份有限公司 Batch task scheduling engine and dispatching method
US20070234363A1 (en) * 2006-03-31 2007-10-04 Ebay Inc. Batch scheduling

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070234363A1 (en) * 2006-03-31 2007-10-04 Ebay Inc. Batch scheduling
CN101038559A (en) * 2006-09-11 2007-09-19 中国工商银行股份有限公司 Batch task scheduling engine and dispatching method

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108090731A (en) * 2016-11-23 2018-05-29 腾讯科技(深圳)有限公司 A kind of information processing method and equipment
CN108090731B (en) * 2016-11-23 2021-10-15 腾讯科技(深圳)有限公司 Information processing method and device
CN109376189A (en) * 2018-09-13 2019-02-22 阿里巴巴集团控股有限公司 Processing method, device and the equipment of batch data operation
CN109542598A (en) * 2018-11-08 2019-03-29 泰康保险集团股份有限公司 Timing task management method and device
CN110083442A (en) * 2019-03-18 2019-08-02 咪咕文化科技有限公司 A kind of operating method of user task, server and can storage medium
CN110083442B (en) * 2019-03-18 2021-12-07 咪咕文化科技有限公司 User task operation method, server and storage medium
WO2021035517A1 (en) * 2019-08-27 2021-03-04 Microsoft Technology Licensing, Llc Workflow-based scheduling and batching in multi-tenant distributed systems

Similar Documents

Publication Publication Date Title
CN107885600A (en) Dispatching method, device and the computer equipment of batch timed task
CN107888669B (en) Deep learning neural network-based large-scale resource scheduling system and method
Wu et al. A closed-form solution for schedulability and optimal scheduling of dual-arm cluster tools with wafer residency time constraint based on steady schedule analysis
Wu et al. A Petri net method for schedulability and scheduling problems in single-arm cluster tools with wafer residency time constraints
Yang et al. Scheduling of single-arm cluster tools for an atomic layer deposition process with residency time constraints
Jia et al. Ant colony optimization algorithm for scheduling jobs with fuzzy processing time on parallel batch machines with different capacities
Fan et al. Deep reinforcement agent for scheduling in HPC
CN110096349A (en) A kind of job scheduling method based on the prediction of clustered node load condition
Dong et al. Scheduling mixed real-time and non-real-time applications in mapreduce environment
Wu et al. Analysis of wafer sojourn time in dual-arm cluster tools with residency time constraint and activity time variation
CN109471727A (en) A kind of task processing method, apparatus and system
CN105260237B (en) The task scheduling system and its dispatching method of heterogeneous polynuclear platform
CN107193652B (en) The flexible resource dispatching method and system of flow data processing system in container cloud environment
CN111026549B (en) Automatic test resource scheduling method for power information communication equipment
CN109597685A (en) Method for allocating tasks, device and server
CN110740079B (en) Full link benchmark test system for distributed scheduling system
CN109857535B (en) Spark JDBC-oriented task priority control implementation method and device
CN101271405A (en) Bidirectional grade gridding resource scheduling method based on QoS restriction
Pan et al. A configurable state class method for temporal analysis of time Petri nets
Yang et al. Optimal one-wafer cyclic scheduling of time-constrained hybrid multicluster tools via Petri nets
CN105868222A (en) Task scheduling method and device
CN109117269A (en) A kind of distributed system dispatching method of virtual machine, device and readable storage medium storing program for executing
Saravanan et al. Advance Map Reduce Task Scheduling algorithm using mobile cloud multimedia services architecture
Yang et al. A fully hybrid algorithm for deadline constrained workflow scheduling in clouds
CN110287006A (en) A kind of data dispatching method and system

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: 20180406