CN110502347A - Task load dispatching method and device - Google Patents

Task load dispatching method and device Download PDF

Info

Publication number
CN110502347A
CN110502347A CN201910800905.XA CN201910800905A CN110502347A CN 110502347 A CN110502347 A CN 110502347A CN 201910800905 A CN201910800905 A CN 201910800905A CN 110502347 A CN110502347 A CN 110502347A
Authority
CN
China
Prior art keywords
task
engine
pending
weight parameter
parameter value
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.)
Granted
Application number
CN201910800905.XA
Other languages
Chinese (zh)
Other versions
CN110502347B (en
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.)
Bank of China Ltd
Original Assignee
Bank of China 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 Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN201910800905.XA priority Critical patent/CN110502347B/en
Publication of CN110502347A publication Critical patent/CN110502347A/en
Application granted granted Critical
Publication of CN110502347B publication Critical patent/CN110502347B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G06F9/505Allocation 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 load
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5022Workload threshold

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multi Processors (AREA)
  • Stored Programmes (AREA)

Abstract

The present invention provides a kind of task load dispatching method and devices, wherein this method comprises: obtaining multiple pending tasks;According to preconfigured degree of parallelism parameter, the multiple pending task is distributed into multiple tasks execution unit;According to preconfigured task engine weight parameter, determine that each task executing units complete the task engine of pending task.Above-mentioned technical proposal relies on by force the scheme that task load balance dispatching can be realized without specific middleware and environment to be a kind of.

Description

Task load dispatching method and device
Technical field
The present invention relates to task schedule technical field of data processing, in particular to a kind of task load dispatching method and dress It sets.
Background technique
In software system design, multitask multi-host parallel scheduling assignment task problem is faced often, is related to loading at this time Balanced realization.There is different load balancing schemes in each manufacturer for itself product, such as the RAC mechanism of ORACLE, or It is applicable in Open Middlewares such as the Eureka in micro services system etc..But each manufacturer is when using non-self middleware software, It would generally be related to some problems: safety, privacy, expensive, difficult adaptation etc..So all big enterprises are simultaneously in practical applications It is not intended to solve the problems, such as load balancing by introducing third party software.
Summary of the invention
The embodiment of the invention provides a kind of task load dispatching methods, a kind of without specific middleware and ring to provide Border relies on by force the scheme that task load balance dispatching can be realized, this method comprises:
Obtain multiple pending tasks;
According to preconfigured degree of parallelism parameter, the multiple pending task is distributed into multiple tasks execution unit;
According to preconfigured task engine weight parameter, determine that each task executing units complete the task of pending task Machine.
The embodiment of the invention provides a kind of task load dispatching devices, a kind of without specific middleware and ring to provide Border relies on by force the scheme that task load balance dispatching can be realized, which includes:
Acquiring unit, for obtaining multiple pending tasks;
Task allocation unit, for according to preconfigured degree of parallelism parameter, the multiple pending task to be distributed to Multiple tasks execution unit;
Task engine determination unit, for determining each task executing units according to preconfigured task engine weight parameter Complete the task engine of pending task.
The embodiment of the invention also provides a kind of computer equipments, including memory, processor and storage are on a memory And the computer program that can be run on a processor, the processor realize above-mentioned task load when executing the computer program Dispatching method.
The embodiment of the invention also provides a kind of computer readable storage medium, the computer-readable recording medium storage There is the computer program for executing above-mentioned task load dispatching method.
The advantageous effects that the embodiment of the present invention provides technical solution are:
Task load scheduling scheme provided in an embodiment of the present invention passes through: obtaining multiple pending tasks;According to matching in advance The multiple pending task is distributed to multiple tasks execution unit by the degree of parallelism parameter set;According to preconfigured task Machine weight parameter determines that each task executing units complete the task engine of pending task, provides a kind of without specific centre Part and environment rely on by force the scheme that task load balance dispatching can be realized.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is the flow diagram of the task load dispatching method of the embodiment of the present invention;
Fig. 2 is the dispatcher of the embodiment of the present invention and the connected mode schematic diagram of task engine;
Fig. 3 is the process signal that multiple pending tasks are distributed to multiple tasks execution unit of the embodiment of the present invention Figure;
Fig. 4 is that the process for the task engine that each task executing units of determination of the embodiment of the present invention complete pending task is shown It is intended to;
Fig. 5 is the structural schematic diagram of the task load dispatching device of the embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that the described embodiment is only a part of the embodiment of the present invention, instead of all the embodiments.Based on this Embodiment in invention, every other reality obtained by those of ordinary skill in the art without making creative efforts Example is applied, shall fall within the protection scope of the present invention.
Inventor's discovery: current task load dispatching device usually requires reference third party software, but quotes third Square software usually along with some problems, such as: safety, privacy, it is expensive, it is difficult adaptation etc..So in practical application Middle all big enterprises are not intended to solve the problems, such as load balancing by introducing third party software.
Since inventor has found above-mentioned technical problem, a kind of scheme of task load scheduling is proposed, this programme passes through Connection is constructed between task engine and dispatcher, and the equilibrium selection of task is carried out in dispatcher based on simple mathematical method and is divided The case where sending scheduling, while passing through task engine feeds back progress weight adjustment and cooperates simple mathematical calculations, realizes load balancing and event Barrier transfer.
Based on the above it is found that the main purpose that the embodiment of the present invention provides scheme is to solve in task load dispatch The problems such as safety caused by other software, difficult adaptation are quoted in mode provides a kind of strong without specific middleware and environment Rely on the technology that task load balance dispatching can be realized.It describes in detail below to the task load scheduling scheme.
Fig. 1 is the flow diagram of the task load dispatching method of the embodiment of the present invention, as shown in Figure 1, this method comprises:
Step 101: obtaining multiple pending tasks;
Step 102: according to preconfigured degree of parallelism parameter, the multiple pending task being distributed into multiple tasks and is held Row unit;
Step 103: according to preconfigured task engine weight parameter, determining that each task executing units complete pending The task engine of business.
The advantageous effects that the embodiment of the present invention provides technical solution are:
Task load scheduling scheme provided in an embodiment of the present invention passes through: obtaining multiple pending tasks;According to matching in advance The multiple pending task is distributed to multiple tasks execution unit by the degree of parallelism parameter set;According to preconfigured task Machine weight parameter determines that each task executing units complete the task engine of pending task, provides a kind of without specific centre Part and environment rely on by force the scheme that task load balance dispatching can be realized.
When it is implemented, the task executing units mentioned in the embodiment of the present invention can be task process.
When it is implemented, as shown in Fig. 2, dispatcher is connected with multiple tasks machine.Scheduling journey provided in an embodiment of the present invention Sequence (process) (task load dispatching method) operates in dispatcher, carries out task assignment, executive process after obtaining task list After getting one or more tasks, it is dispatched to a certain task engine and executes.The target of scheduling load equilibrium is to make current task It is averagely allocated to each task process as far as possible, in each task engine, failure transfer is the average load as far as possible of each task process If target be to make some task engine when something goes wrong, task process does not work on this machine in distribution.
With reference to the accompanying drawing 2 to Fig. 4, it describes in detail to each step that present example is related to as follows.
One, above-mentioned steps 101 are introduced first.
Since this programme is not related to the generation of task, but depend on task list, it is therefore desirable to which other modules complete task Generate the premise work of task list.Before pending task refers to task allocation schedule, need other systems module or Program gets out the pending task generated, presents, i.e., deposits multiple pending tasks in the form of a list in the present embodiment Storage is in a pending task list, and each task has unique identification, such as unique unduplicated serial number.Wait hold The table structure of row task list can be as shown in table 1 below.
Table 1
Serial number SeqNo Other task definition description fields
1 ...
2 ...
3 ...
... ...
Two, above-mentioned steps 102 are secondly introduced.
In one embodiment, according to preconfigured degree of parallelism parameter, the multiple pending task is distributed to more A execution unit may include:
According to preconfigured degree of parallelism parameter and execution unit capacity parameter, taken out from the pending task list The pending task of preset number;
According to the mark of pending task, and to the modulo operation of preset number as a result, by the multiple pending Multiple tasks execution unit is distributed in business.
When it is implemented, according to preset degree of parallelism parameter P and task process capacity D, degree of parallelism parameter P represents maximum and deposits In how many a task process, and task process capacity D represents the task number of individual task process largest serial execution.Degree of parallelism Parameter P and task process capacity D can be adjusted according to the actual situation in the present embodiment.
When it is implemented, as shown in figure 3, disposably taking out N number of waiting task (N=P from to-be-processed task list × D), task is distributed for task process, distribution method is as follows: according to modulo operation Pid=(SeqNo+R1) mod P result Each task process is assigned the task to, wherein Pid is the process number (arriving P-1 serial number according to 0) of P task process, SeqNo is the serial number of waiting task, R1It is 0 to the random number between P-1, R1It can be set to constant 0, the setting of random number is To prevent some task process stuck the problem of causing follow-up work that can not distribute.
According to formula calculated result, the task process that each Pid is represented after modulo operation can obtain D task, each Task process can sequentially complete this D task when executing.
Three, above-mentioned steps 103 are finally introduced.
When it is implemented, the task engine that the embodiment of the present invention is mentioned also may be referred to execution machine, target machine.
In one embodiment, according to preconfigured task engine weight parameter, determine that each task process is completed wait hold The task engine of row task may include: to carry out the following operation for determining task engine to each task executing units:
Generate a random number;
According to the random number and the initial weight threshold of predetermined each task engine, random number pair is determined The initial weight threshold answered;
According to the corresponding initial weight threshold of random number, the corresponding task engine of random number is determined;
According to the corresponding task engine of random number and the corresponding task executing units of random number, each task execution is determined The task engine of the pending task of unit.
When it is implemented, by way of taking generation random number to drop to some weight threshold range, and then energy should The corresponding task process of random number distributes task engine corresponding to the weight threshold, with the size of the weight threshold of different task machine Difference can achieve the purpose that task process probability distribution.
In one embodiment, above-mentioned task load dispatching method can also include:
Obtain the current operating conditions of each task engine;
Weight parameter value is reduced according to the current operating conditions of each task engine and problem and task load reduces weight Parameter value adjusts the weight threshold of each task engine;
According to weight threshold adjusted, determine that each task executing units complete the task engine of pending task.
It is dropped to when it is implemented, can reduce or increase random number by the update to each task engine weight threshold The probability of each weight threshold, thus realize task process with task engine weight threshold distribute, so as to realize task into It is balanced between journey, the function of probability equilibrium between multimachine, and by can control single machine to the weight threshold upper limit and pre-seting for lower limit Upper loading limit.
In one embodiment, the weight parameter includes: and counts weight parameter, problem reduction weight parameter and task to bear Lotus reduces weight parameter;
Weight parameter is reduced according to the current operating conditions of each task engine and problem and task load reduces weight ginseng Number, adjusts the weight threshold of each task engine, comprising:
When detecting the current operating conditions exception of task engine:
It obtains corresponding problem and reduces weight parameter value and task load reduction weight parameter value;
Weight parameter value is reduced according to described problem and task load reduces weight parameter value, turns down counting weight parameter Value;
According to counting weight parameter value adjusted, the weight threshold adjusted of task engine is determined;
When the current operating conditions for detecting task engine are normal:
It obtains corresponding problem and reduces weight parameter value and task load reduction weight parameter value;
Weight parameter value is reduced according to described problem and task load reduces weight parameter value, is turned up and is counted weight parameter Value;
According to counting weight parameter value adjusted, the weight threshold adjusted of task engine is determined.
When it is implemented, when task carries out executing initial the initial of task engine can be set according to weight parameter value is counted Weight threshold, can be to sub-distribution at the beginning of task execution process according to initial weight threshold value.And weight is reduced aiming at the problem that this task It is preset, this problem reduction weight parameter value before follow-up work executes that parameter value, which reduces weight parameter value with task load, Reducing weight parameter value with task load is actual conditions (such as the complexity of task by user for pre-execution task Deng) sets itself.When the current operating conditions of Detection task machine, the problem of task has been executed according to task engine reduction power is understood Weight parameter value and task load reduce weight parameter value to adjust the technology weight parameter of current task machine, and then to adjust task The weight threshold of machine.
When it is implemented, be able to achieve task engine adjusted according to itself current task run situation itself reception task into The function of journey;Also it can guarantee that the weight threshold of problem machine will not be reduced to 0, and then be unable to get task process distribution, make to ask The detection that topic function can continue to obtain after going wrong scheduling process updates, to can continue to obtain task after Resolving probiems The mechanism of distribution, realizes and gradually exits, and there is the automatic function of bringing back to life mechanism;Also it can guarantee the weight threshold of task engine not It can infinitely increase, cause task distribution excessive and crash, realize the function of control single machine upper loading limit.
It, can containing parameter shown in the following table 2 in parameter list when it is implemented, weight parameter table preset for each target machine In the light of actual conditions it is arranged: counts weight parameter C, problem reduces weight parameter S, task load reduces weight parameter s.It is general next It says, C > s > S=0.
In the present embodiment, the current operating conditions of task engine extremely can for can not connection failure, distribution failure, execute in Task total amount number overload etc., there is corresponding problem to reduce weight parameter S for different abnormalities.
It is i to task engine number, defines target machine proportion range, proportion range lower limit CL isProportion range upper limit CU is
Table 2
Target machine number i C S s CL CU
0 50000 100 2500 0 50000
1 40000 200 2500 50000 90000
2 31000 100 2500 90000 121000
3 50000 104 2500 121000 171000
... ... ... ...
When it is implemented, scheduling each Pid task process of the continuous scan round of process, selects process to complete task engine for it. Detailed process is as shown in Figure 4.
When it is implemented, firstly, whether detection upper one process with Pid number is completed: if do not completed, skipping this Task process processing scans the task process of next Pid number;If be completed, the target of this Pid of last time operation is turned up The counting weight parameter value C of machinei=Ci+s+S。
In the present embodiment, C is less than or equal to the preset counting weight parameter of the task engine, if preset counting weight is joined The number upper limit is 50000, then 50000 is at most updated to, no more than the preset count weight parameter.
Secondly, taking a random integers R2, 0 < R2≤ sum (C).Judge R2Range intervals in which CL to CR, Work as R2It is in the weight threshold section i.e. CL of certain task enginei< R2≤CUiWhen, then the distribution of this task process is so far numbered as i's Task engine operation.
If the situation of task engine operating status exception is found during the process of distribution, according to different types of task engine The problem of abnormal operating condition, reduces weight parameter S, the counting weight parameter value C of Lai Gengxin target machinei=Ci-S.If there is Under abnormal conditions, when updated threshold value is less than N, then it is set to N, N is settable minimum access baseline threshold value.If distribute into Task engine operating status is normal during journey, then record the process run-time target numbers and updates the counting weight ginseng of this target machine Numerical value Ci=Ci- s, in the case where this normal operation, if updated weight threshold lower limit less than 0, by this weight threshold Lower limit is set to 0, is not negative.
Problem machine gradually exits, and there are problems that the mechanism for bringing back to life function automatically refers to that the weight threshold of guarantee machine will not It is reduced to 0, and then is unable to get task process distribution, makes problem function that can continue to obtain scheduling process after going wrong Detection updates, to can continue to obtain the mechanism of task distribution after Resolving probiems.
Scheduling process will constantly recycle each task process and adjust, until all pending TU task unit operations finish. It can reduce or increase the probability that random number drops to each weight threshold by the update to each task engine weight threshold, To realize that task process is distributed with the weight threshold of task engine, so as to realize balanced, probability between multimachine between task process Balanced function, and by can control single machine upper loading limit to the weight threshold upper limit and pre-seting for lower limit.
Based on the same inventive concept, a kind of task load dispatching device is additionally provided in the embodiment of the present invention, it is such as following Described in embodiment.Since the principle that task load dispatching device solves the problems, such as is similar to task load dispatching method, task The implementation of load dispatcher may refer to the implementation of task load dispatching method, and overlaps will not be repeated.It is following to be used , the combination of the software and/or hardware of predetermined function may be implemented in term " unit " or " module ".Although following embodiment institute The device of description preferably realized with software, but the combined realization of hardware or software and hardware be also may and quilt Conception.
Fig. 5 is the task load dispatching device structural schematic diagram of the embodiment of the present invention, as shown in figure 5, the device includes:
Acquiring unit 02, for obtaining multiple pending tasks;
Task allocation unit 04, for according to preconfigured degree of parallelism parameter, the multiple pending task to be distributed Give multiple tasks execution unit;
Task engine determination unit 06, for determining each task execution list according to preconfigured task engine weight parameter Member completes the task engine of pending task.
In one embodiment, the acquiring unit specifically can be used for: multiple pending tasks are stored in one wait hold In row task list;Each pending task has a unique identification;
The task allocation unit specifically can be used for:
According to preconfigured degree of parallelism parameter and execution unit capacity parameter, taken out from the pending task list The pending task of preset number;
According to the mark of pending task, and to the modulo operation of preset number as a result, by the multiple pending Multiple tasks execution unit is distributed in business.
In one embodiment, the task engine determination unit can be used for:
Generate a random number;
According to the random number and the initial weight threshold of predetermined each task engine, random number pair is determined The initial weight threshold answered;
According to the corresponding initial weight threshold of random number, the corresponding task engine of random number is determined;
According to the corresponding task engine of random number and the corresponding task executing units of random number, each task execution is determined The task engine of the pending task of unit.
In one embodiment, above-mentioned task load dispatching device can also include:
State acquiring unit, for obtaining the current operating conditions of each task engine;
Adjustment unit, for reducing weight parameter value according to the current operating conditions and problem of each task engine and appointing Business load reduces weight parameter value, adjusts the weight threshold of each task engine;
Unit is redefined, for it is pending to determine that each task executing units are completed according to weight threshold adjusted The task engine of task.
In one embodiment, the weight parameter may include: to count weight parameter, problem reduction weight parameter and appoint Business load reduces weight parameter;
Above-mentioned adjustment unit specifically can be used for:
When detecting the current operating conditions exception of task engine:
It obtains corresponding problem and reduces weight parameter value and task load reduction weight parameter value;
Weight parameter value is reduced according to described problem and task load reduces weight parameter value, turns down counting weight parameter Value;
According to counting weight parameter value adjusted, the weight threshold adjusted of task engine is determined;
When the current operating conditions for detecting task engine are normal:
It obtains corresponding problem and reduces weight parameter value and task load reduction weight parameter value;
Weight parameter value is reduced according to described problem and task load reduces weight parameter value, is turned up and is counted weight parameter Value;
According to counting weight parameter value adjusted, the weight threshold adjusted of task engine is determined.
The embodiment of the invention also provides a kind of computer equipments, including memory, processor and storage are on a memory And the computer program that can be run on a processor, the processor realize task load scheduling when executing the computer program Method.
The embodiment of the invention also provides a kind of computer readable storage medium, the computer-readable recording medium storage There is the computer program for executing above-mentioned task load dispatching method.
The advantageous effects that the embodiment of the present invention provides technical solution are:
Task load scheduling scheme provided in an embodiment of the present invention passes through: obtaining multiple pending tasks;According to matching in advance The multiple pending task is distributed to multiple tasks execution unit by the degree of parallelism parameter set;According to preconfigured task Machine weight parameter determines that each task executing units complete the task engine of pending task, provides a kind of without specific centre Part and environment rely on by force the scheme that task load balance dispatching can be realized.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more, The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces The form of product.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
The foregoing is only a preferred embodiment of the present invention, is not intended to restrict the invention, for the skill of this field For art personnel, the embodiment of the present invention can have various modifications and variations.All within the spirits and principles of the present invention, made Any modification, equivalent substitution, improvement and etc. should all be included in the protection scope of the present invention.

Claims (10)

1. a kind of task load dispatching method characterized by comprising
Obtain multiple pending tasks;
According to preconfigured degree of parallelism parameter, the multiple pending task is distributed into multiple tasks execution unit;
According to preconfigured task engine weight parameter, determine that each task executing units complete the task engine of pending task.
2. task load dispatching method as described in claim 1, which is characterized in that obtain multiple pending tasks, comprising: will Multiple pending tasks are stored in a pending task list;Each pending task has a unique identification;
According to preconfigured degree of parallelism parameter, the multiple pending task is distributed into multiple execution units, comprising:
According to preconfigured degree of parallelism parameter and execution unit capacity parameter, taken out from the pending task list default The pending task of number;
According to the mark of pending task, and to the modulo operation of preset number as a result, by the multiple pending task point Dispensing multiple tasks execution unit.
3. task load dispatching method as described in claim 1, which is characterized in that joined according to preconfigured task engine weight Number, determines that each task process completes the task engine of pending task, comprising: determined as follows to each task executing units The operation of task engine:
Generate a random number;
According to the random number and the initial weight threshold of predetermined each task engine, determine that random number is corresponding Initial weight threshold;
According to the corresponding initial weight threshold of random number, the corresponding task engine of random number is determined;
According to the corresponding task engine of random number and the corresponding task executing units of random number, each task executing units are determined The task engine of pending task.
4. task load dispatching method as described in claim 1, which is characterized in that the weight parameter includes: counting weight Parameter, problem reduce weight parameter and task load reduces weight parameter;
Further include:
Obtain the current operating conditions of each task engine;
Weight parameter value is reduced according to the current operating conditions of each task engine and problem and task load reduces weight parameter Value, adjusts the weight threshold of each task engine;
According to weight threshold adjusted, determine that each task executing units complete the task engine of pending task.
5. task load dispatching method as claimed in claim 4, which is characterized in that
Weight parameter value is reduced according to the current operating conditions of each task engine and problem and task load reduces weight parameter Value, adjusts the weight threshold of each task engine, comprising:
When detecting the current operating conditions exception of task engine:
It obtains corresponding problem and reduces weight parameter value and task load reduction weight parameter value;
Weight parameter value is reduced according to described problem and task load reduces weight parameter value, is turned down and is counted weight parameter value;
According to counting weight parameter value adjusted, the weight threshold adjusted of task engine is determined;
When the current operating conditions for detecting task engine are normal:
It obtains corresponding problem and reduces weight parameter value and task load reduction weight parameter value;
Weight parameter value is reduced according to described problem and task load reduces weight parameter value, is turned up and is counted weight parameter value;
According to counting weight parameter value adjusted, the weight threshold adjusted of task engine is determined.
6. a kind of task load dispatching device characterized by comprising
Acquiring unit, for obtaining multiple pending tasks;
Task allocation unit, for the multiple pending task being distributed to multiple according to preconfigured degree of parallelism parameter Task executing units;
Task engine determination unit, for determining that each task executing units are completed according to preconfigured task engine weight parameter The task engine of pending task.
7. task load dispatching device as claimed in claim 6, which is characterized in that the acquiring unit is specifically used for: will be more A pending task is stored in a pending task list;Each pending task has a unique identification;
The task allocation unit is specifically used for:
According to preconfigured degree of parallelism parameter and execution unit capacity parameter, taken out from the pending task list default The pending task of number;
According to the mark of pending task, and to the modulo operation of preset number as a result, by the multiple pending task point Dispensing multiple tasks execution unit.
8. task load dispatching device as claimed in claim 6, which is characterized in that the task engine determination unit is used for:
Generate a random number;
According to the random number and the initial weight threshold of predetermined each task engine, determine that random number is corresponding Initial weight threshold;
According to the corresponding initial weight threshold of random number, the corresponding task engine of random number is determined;
According to the corresponding task engine of random number and the corresponding task executing units of random number, each task executing units are determined The task engine of pending task.
9. a kind of computer equipment including memory, processor and stores the meter that can be run on a memory and on a processor Calculation machine program, which is characterized in that the processor realizes any side of claim 1 to 5 when executing the computer program Method.
10. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has perform claim It is required that the computer program of 1 to 5 any the method.
CN201910800905.XA 2019-08-28 2019-08-28 Task load scheduling method and device Active CN110502347B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910800905.XA CN110502347B (en) 2019-08-28 2019-08-28 Task load scheduling method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910800905.XA CN110502347B (en) 2019-08-28 2019-08-28 Task load scheduling method and device

Publications (2)

Publication Number Publication Date
CN110502347A true CN110502347A (en) 2019-11-26
CN110502347B CN110502347B (en) 2022-05-27

Family

ID=68590010

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910800905.XA Active CN110502347B (en) 2019-08-28 2019-08-28 Task load scheduling method and device

Country Status (1)

Country Link
CN (1) CN110502347B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114327817A (en) * 2021-12-22 2022-04-12 马上消费金融股份有限公司 Task fragmentation method and device and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541655A (en) * 2010-12-31 2012-07-04 中国银联股份有限公司 Method and device for implementing dynamic load balancing
CN106844037A (en) * 2017-02-22 2017-06-13 郑州云海信息技术有限公司 A kind of method of testing and system based on KNL
CN107515781A (en) * 2017-07-20 2017-12-26 哈尔滨工业大学(威海) A kind of multicomputer system deterministic schedule and load-balancing method
CN109189506A (en) * 2018-08-06 2019-01-11 北京奇虎科技有限公司 A kind of method and device based on PHP asynchronous process task
CN109918741A (en) * 2019-02-13 2019-06-21 北京科技大学 One kind being suitable for extensive hydrological simulation parameter calibration method and calibration device
CN110134516A (en) * 2019-05-16 2019-08-16 深圳前海微众银行股份有限公司 Finance data processing method, device, equipment and computer readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541655A (en) * 2010-12-31 2012-07-04 中国银联股份有限公司 Method and device for implementing dynamic load balancing
CN106844037A (en) * 2017-02-22 2017-06-13 郑州云海信息技术有限公司 A kind of method of testing and system based on KNL
CN107515781A (en) * 2017-07-20 2017-12-26 哈尔滨工业大学(威海) A kind of multicomputer system deterministic schedule and load-balancing method
CN109189506A (en) * 2018-08-06 2019-01-11 北京奇虎科技有限公司 A kind of method and device based on PHP asynchronous process task
CN109918741A (en) * 2019-02-13 2019-06-21 北京科技大学 One kind being suitable for extensive hydrological simulation parameter calibration method and calibration device
CN110134516A (en) * 2019-05-16 2019-08-16 深圳前海微众银行股份有限公司 Finance data processing method, device, equipment and computer readable storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114327817A (en) * 2021-12-22 2022-04-12 马上消费金融股份有限公司 Task fragmentation method and device and electronic equipment

Also Published As

Publication number Publication date
CN110502347B (en) 2022-05-27

Similar Documents

Publication Publication Date Title
US4642756A (en) Method and apparatus for scheduling the execution of multiple processing tasks in a computer system
CN107665144B (en) Balanced scheduling center, method, system and device for distributed tasks
US11030014B2 (en) Concurrent distributed graph processing system with self-balance
EP0194533A2 (en) Data processing system having tunable operating system means
CN107292741B (en) Resource allocation method and device
CN109408215A (en) A kind of method for scheduling task and device of calculate node
US9218210B2 (en) Distributed processing system
CN105487919A (en) Multi-core processor systems and methods for assigning tasks
CN110928655A (en) Task processing method and device
CN107515781B (en) Deterministic task scheduling and load balancing system based on multiple processors
CN110502347A (en) Task load dispatching method and device
CN104917839A (en) Load balancing method for use in cloud computing environment
CN106293917A (en) The optimization method of a kind of I O scheduling cfq algorithm and system
CN114911613A (en) Cross-cluster resource high-availability scheduling method and system in inter-cloud computing environment
CN109861791A (en) A kind of preiodic type data message transmission method, system, device and storage medium
CN115187097A (en) Task scheduling method and device, electronic equipment and computer storage medium
CN115511292A (en) Production scheduling method, system, intelligent terminal and storage medium
CN109086128A (en) Method for scheduling task and device
CN114138626A (en) Horizontally scalable distributed system for automated firmware testing and method thereof
US20140047454A1 (en) Load balancing in an sap system
CN114358577A (en) Order information processing method and device
CN113254200A (en) Resource arrangement method and intelligent agent
CN107741878A (en) Method for scheduling task, apparatus and system
CN112596884B (en) Task adjusting method and device
CN112631743B (en) Task scheduling method, device and storage medium

Legal Events

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