Summary of the invention
The embodiment of the present application provides a kind of task queue's response parameter evaluation method and device, it is intended to the case where surveying without pressure
Under, the steady state based on operation system, it carries out task queue with the state that Random Task coexists after reaching to timed task
Response parameter estimation carries out reasonable disposition for the system resource to operation system, shortens task queue's time, improves at task
Manage efficiency.
The embodiment of the present application adopts the following technical solutions:
In a first aspect, the embodiment of the present application provides a kind of task queue's response parameter evaluation method, comprising:
Determine the baseline probability array of operation system;Wherein, each element in the baseline probability array, indicates the industry
Business system probability corresponding to each Queued tasks amount under steady state;
According to the baseline probability array, determine under original state of the operation system when receiving timed task
Probability array;Wherein, each element in the probability array, indicates the operation system under the original state
Probability corresponding to each Queued tasks amount;
Based on the baseline probability array and the probability array, estimate the operation system from the original state
It is back to task queue's response parameter during the steady state.
Optionally, in task queue's response parameter evaluation method that the application first aspect provides, operation system is determined
Baseline probability array, comprising:
Obtain Random Task log;
Based on the Runtime parameter in the Random Task log, the baseline probability array is determined.
Optionally, in task queue's response parameter evaluation method that the application first aspect provides, the operation system exists
Task queue's model under steady state meets M/M/c/N/ ∞/FCFS model, wherein project c indicates the operation system
Parallel processing maximum task amount, project N indicate the largest buffered task amount of the operation system;
Then based on the Runtime parameter in the Random Task log, the baseline probability array is determined, comprising:
The Runtime parameter is inputted into M/M/c/N/ ∞/FCFS model, it is general that the benchmark is calculated
Rate array.
Optionally, in task queue's response parameter evaluation method that the application first aspect provides, when the task run
Between parameter include task receiving time and task processing the time;
The Runtime parameter is then inputted into M/M/c/N/ ∞/FCFS model, the benchmark is calculated
Probability array, comprising:
The time is handled according to the task receiving time and the task, determines the task receiving velocity of the operation system
With task processing speed;
By the task receiving velocity, the task processing speed, the parallel processing maximum task amount and the maximum
Task amount is cached as known quantity, substitutes into the state transfer based on birth and death process that M/M/c/N/ ∞/FCFS model uses
Equation, solution obtain the baseline probability array.
Optionally, in task queue's response parameter evaluation method that the application first aspect provides, the state transfer side
Journey are as follows:
Wherein, λ indicates that the task receiving velocity, μ indicate the task processing speed, PnIndicate that Queued tasks quantity is
The probability of n.
Optionally, general based on the benchmark in task queue's response parameter evaluation method that the application first aspect provides
Rate array and the probability array, estimate that the operation system is back to the mistake of the steady state from the original state
Task queue's response parameter in journey, comprising:
Based on the probability array, the task receiving velocity and the task processing speed, estimate and described first
The corresponding first sub- response parameter of beginning probability array;
According to the described first sub- response parameter, task queue's response parameter is determined.
Optionally, in task queue's response parameter evaluation method that the application first aspect provides, the method also includes:
Calculate the first distance between the probability array and the baseline probability array;
In the case where the first distance is less than the first pre-determined distance threshold value, according to the described first sub- response parameter, really
Fixed task queue's response parameter, specifically:
Described first sub- response parameter is determined as task queue's response parameter.
Optionally, in task queue's response parameter evaluation method that the application first aspect provides, in the first distance
In the case where more than or equal to the first pre-determined distance threshold value, the method also includes:
According to the state transition equation, destination probability array corresponding with object time, the object time are solved
For the operation system from the original state be back to the steady state during any moment;
Based on the destination probability array, the task receiving velocity and the task processing speed, estimation and the mesh
Mark the corresponding second sub- response parameter of probability array;
Calculate the second distance between the destination probability array and the baseline probability array;
In the case where the second distance is less than the second pre-determined distance threshold value, determine the operation system from described initial
State is back to the steady state;
In the case where the second distance is greater than or equal to the second pre-determined distance threshold value, the above step is repeated
Suddenly, until determining that the operation system is back to the steady state from the original state.
Optionally, in task queue's response parameter evaluation method that the application first aspect provides, according to first son
Response parameter determines task queue's response parameter, comprising:
According to the described first sub- response parameter and at least one described second sub- response parameter, determine that the task queue rings
Answer parameter.
Optionally, general according to the benchmark in task queue's response parameter evaluation method that the application first aspect provides
Rate array determines probability array, comprising:
Determine the timed task amount of the timed task;
According to the timed task amount and the baseline probability array, each element in the probability array is determined.
Optionally, in task queue's response parameter evaluation method that the application first aspect provides, appointed according to the timing
Business amount and the baseline probability array, determine each element in the probability array, comprising:
Being lined up the first probability assignment corresponding to task amount in the probability array first is zero, wherein described
First, which is lined up task amount, is less than the timed task amount;
Being lined up the second probability assignment corresponding to task amount in the probability array second is third probability;Its
In, described second, which is lined up task amount, is greater than or equal to the timed task amount and is less than the largest buffered task amount, and described the
Three probability are probability corresponding to third Queued tasks amount in the baseline probability array, and the third Queued tasks amount is described
Second is lined up the difference of task amount and the timed task amount;
It is the 5th probability by the 4th probability assignment corresponding to the 4th Queued tasks amount in the probability array;Its
In, the 4th Queued tasks amount is equal to the largest buffered task amount, and the 5th probability is in the baseline probability array
The sum of remaining all probability in addition to the third probability.
Optionally, in task queue's response parameter evaluation method that the application first aspect provides, the task queue rings
Answering parameter includes at least one of task waiting time, task residence time and task Loss Rate.
Second aspect, the embodiment of the present application provide a kind of task queue's response parameter estimation device, comprising:
First probability array determining module, for determining the baseline probability array of operation system;Wherein, the baseline probability
Each element in array indicates operation system probability corresponding to each Queued tasks amount under steady state;
Second probability array determining module, for determining that the operation system is being received according to the baseline probability array
The probability array under original state when to timed task;Wherein, each element in the probability array indicates institute
State operation system probability corresponding to each Queued tasks amount under the original state;
Parameter estimation module estimates the business for being based on the baseline probability array and the probability array
System from the original state be back to the steady state during task queue's response parameter.
The third aspect, the embodiment of the present application provide a kind of electronic equipment, comprising:
Processor;And
It is arranged to the memory of storage computer executable instructions, the executable instruction makes the place when executed
It manages device and executes following operation:
Determine the baseline probability array of operation system;Wherein, each element in the baseline probability array, indicates the industry
Business system probability corresponding to each Queued tasks amount under steady state;
According to the baseline probability array, determine under original state of the operation system when receiving timed task
Probability array;Wherein, each element in the probability array, indicates the operation system under the original state
Probability corresponding to each Queued tasks amount;
Based on the baseline probability array and the probability array, estimate the operation system from the original state
It is back to task queue's response parameter during the steady state.
Fourth aspect, the embodiment of the present application provide a kind of computer readable storage medium, the computer-readable storage medium
Matter stores one or more programs, one or more of programs when the electronic equipment for being included multiple application programs executes,
So that the electronic equipment executes following operation:
Determine the baseline probability array of operation system;Wherein, each element in the baseline probability array, indicates the industry
Business system probability corresponding to each Queued tasks amount under steady state;
According to the baseline probability array, determine under original state of the operation system when receiving timed task
Probability array;Wherein, each element in the probability array, indicates the operation system under the original state
Probability corresponding to each Queued tasks amount;
Based on the baseline probability array and the probability array, estimate the operation system from the original state
It is back to task queue's response parameter during the steady state.
The embodiment of the present application use at least one above-mentioned technical solution can reach it is following the utility model has the advantages that
In the embodiment of the present application, baseline probability array based on operation system under steady state determines and receives timing
Probability array under original state when task, and then steady shape is come back to operation system based on two probability arrays
The task processing capacity of state is estimated.Therefore, can to have in operation system timed task reach and coexisted with Random Task
The case where, without operation pressure measured data on operation system line, operation system can accurately be obtained by lesser operation cost
Task queue's response parameter, with for operation system system resource carry out reasonable disposition, reach shorten task queue when
Between, the purpose of task treatment effeciency is improved, and be conducive to promote user experience.
Specific embodiment
To keep the purposes, technical schemes and advantages of the application clearer, below in conjunction with the application specific embodiment and
Technical scheme is clearly and completely described in corresponding attached drawing.Obviously, described embodiment is only the application one
Section Example, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not doing
Every other embodiment obtained under the premise of creative work out, shall fall in the protection scope of this application.
As the maturation of the various informations processing techniques such as Queued tasks response is with development, the time that user responds task is wanted
It asks more and more harsh, then in order to carry out efficient response to task and complete to handle, needs to configure more reasonable system
System resource.
It is understood that task can be divided into Random Task and timing times according to the time that task reaches operation system
Business, specifically by taking network trading task as an example, the arrival time of some network trading tasks is random, for example user purchases on the net
A transaction of commodity generation is bought, which is random for operation system;And some network trading tasks
Be it is recurrent, such as user setting per hour by the money in oneself Alipay account go to appointed bank card in, the pen
Task of transferring accounts is timing for queuing system.
It for another example can also include: periodically to leave a message, regularly send mail, timing receipt mail etc. for above-mentioned timed task
Convenient for concentration and/or the task of batch processing.
After task arrival system, in order to know task queue's response parameter during system processing task, specifically
By taking task queue's response time as an example, on the one hand, can be directly in the case where there is pressure to survey, record traffic system is to each task
Processing delay time (i.e. task queue's response time), last statistical result, if operation system current task be lined up ring
Cannot reach between seasonable makes operation system maintain the expection steadily operated, then can adjust the related ginseng such as system configuration resource in time
Continue pressure after number to survey;It on the other hand, can be according to the ratio of queuing request quantity and throughput of system come calculating task row
Team's response time.
But the scheme operation cost that directly upper pressure is surveyed is relatively high, it usually needs many systems on line match combined pressure together
It surveys, and related service personnel need to take a long time that statistical result to the end could be obtained, and furthermore hold during pressing and surveying
The business on line is easily influenced, the probability for causing failure is considerably increased.And according only to queuing request quantity and throughput of system
The scheme of ratio calculation task queue response time, obtained result accuracy is relatively low, moreover, in view of due to it is random because
Some queuing situations caused by element.
Therefore, using method provided by the embodiments of the present application, in the case where not needing operation system operation pressure measured data,
Steady state based on operation system, the state coexisted after reaching to timed task with Random Task carry out task queue's response and join
Several accurate estimations, to handle task order layout for operation system, system resource configuration provides reference, enables operation system
Suitable for different business processing scenes, and as much as possible avoids the occurrence of Queued tasks congestion and can not handle and cause in time
The phenomenon that system crash, occurs, and achievees the purpose that raising task treatment effeciency.
Below in conjunction with attached drawing, the technical scheme provided by various embodiments of the present application will be described in detail.
Shown in Figure 1, the embodiment of the present application provides a kind of task queue's response parameter evaluation method, and this method can wrap
It includes:
Step S101: the baseline probability array of operation system is determined.
Wherein, each element in baseline probability array indicates that operation system each Queued tasks amount institute under steady state is right
The probability answered.
It is understood that when operation system is in steady state, in different moments, the task influx of operation system and
Task discharge is kept quite, so that the Queued tasks amount in operation system all keeps stable in different moments, that is to say, that industry
Business system will not go out the case where current task congestion, task processing delay because of the arrival of new task.
It is understood that said reference probability array is the set of at least one probability, to include more in baseline probability array
It is { P in baseline probability array for a probability0,P1,P2,……,PiIn the case where, wherein element P0Indicate that operation system exists
Corresponding probability, element P when Queued tasks amount is 0 under steady state1Indicate operation system Queued tasks amount under steady state
Corresponding probability when being 1, and so on, element PiIndicate that operation system is corresponding when Queued tasks amount is i under steady state
Probability.
The detailed process for determining the baseline probability array of operation system will be illustrated below.
It is shown in Figure 2, in the baseline probability array for determining operation system, may particularly include:
Step S1011: Random Task log is obtained.
Optionally, Random Task log is a part of running log on operation system line, running log in the partial line,
Random Task is persistently handled for operation system and log corresponding to the period of timed task does not occur.
The randomness of Random Task and the timeliness of processing Random Task are received in view of operation system, it is known that, business system
System just timely carry out task processing after receiving Random Task, in this way, only handling Random Task for operation system
In the case where, one new Random Task of reception enters the speed of task queue's queue and processing completes a Random Task and makes it
The speed for leaving task queue's queue is kept quite, then it is understood that during operation system only handles Random Task,
It is considered that there are steady states for operation system, then it can execute and baseline probability array is determined based on Random Task log as follows
Step.
Step S1013: based on the Runtime parameter in Random Task log, baseline probability array is determined.
It is understood that can will wherein include during determining baseline probability array using Random Task log
The Runtime parameter of Random Task used as known quantity, and in view of Runtime parameter is easy to collect,
The features such as statistics, then task based access control operation time parameters determine baseline probability array, can reach and improve baseline probability array
Determine the effect of efficiency.
Based on above content it is found that the baseline probability array of operation system needs to carry out really under steady state at which
Fixed, that is, the task influx and task discharge for needing to meet operation system in different moments keep stable requirement, then optional
, task queue model of the operation system under steady state can be made to meet M/M/c/N/ ∞/FCFS model, be derived from
Kendall (Ken Deer) is distributed symbol X/Y/Z/A/B/C.
Wherein, project X indicates the time interval distribution that task reaches, and project Y indicates the time point of server-side processing task
Cloth, project Z indicate information desk quantity arranged side by side, and project A indicates the power system capacity limitation of server-side, and project B indicates customer source
Total quantity and project C indicate the mode of task queue.
Then correspondingly, in M/M/c/N/ ∞/FCFS model, first item M indicate task reach operation system when
Between interval meet quantum condition entropy it will be appreciated that, the quantity that operation system is reached in the task unit time meets Poisson distribution.
Second item M indicates that the time of operation system processing task meets quantum condition entropy it will be appreciated that, task unit
The quantity that operation system is left in time meets Poisson distribution.
It is appreciated that Poisson distribution is common discrete probability distribution in probability theory, stochastic variable negated can only be born whole
Number.In the case where the process of process and operation system processing task that task reaches operation system belongs to Poisson process, task
The quantity that operation system is reached in unit time meet Poisson distribution and left in the task unit time operation system quantity it is full
Sufficient Poisson distribution;For Poisson process it is understood that task arrival event and operation system have handled a task events exists
It is random in a period of time to occur, and meet the following conditions:
(1) by this section of time limitless defense right at several minimum periods, each period close to
Zero, task reach operation system event occur primary probability and operation system handled task events occur it is primary general
Rate is directly proportional to the length of the period respectively.
(2) within each period, task reaches operation system event and probability and operation system twice or more occurs
It has handled task events and the equal identically vanishing of probability twice or more occurs.
(3) task is reached whether operation system event occurs in section in different times and is independent from each other, operation system
It has handled whether a task events occur in section in different times and has been independent from each other.
The parallel processing maximum task amount of project c expression operation system it will be appreciated that, operation system can be with parallel processing
Any task amount less than or equal to c.
The largest buffered task amount of project N expression operation system it will be appreciated that, i.e. N indicates the capacity limit of operation system
System, in the case where the task amount of operation system processing is greater than N, the partial task beyond system largest buffered task amount can be lost
It loses, which cannot be properly received by operation system and carry out response processing.
Project ∞ indicates that the task source sum of operation system is unlimited.
Project FCFS (First Come First Served, prerequisite variable) indicates that operation system obedience arrives first and first takes
Business principle.
Task based on the Runtime parameter and operation system in known Random Task log under steady state
Under the premise of queuing model meets M/M/c/N/ ∞/FCFS model, determine that baseline probability array may particularly include:
Runtime parameter is inputted into M/M/c/N/ ∞/FCFS model, baseline probability array is calculated.
Optionally, Runtime parameter includes task receiving time and task processing time it will be appreciated that, task
Receiving time can refer to Random Task reach operation system at the time of, task processing the time can refer to operation system handled this with
The time of machine required by task, time shaft as shown in Figure 3, task reach operation system at the t1 moment, leave business at the t2 moment
System, then it is understood that moment t1 indicates task receiving time, the difference expression task processing time of t2 and t1.
Then the process of baseline probability array is calculated in task based access control operation time parameters, may include:
The time is handled according to task receiving time and task, determines the task receiving velocity and task processing speed of operation system
Rate.
It is understood that can determine that operation system receives according to each task receiving time in Random Task log
The period △ t of Random Task, and the number based on the task receiving time extracted in period △ t, and consider industry
When business system is in steady state, the process that task reaches system is Poisson process, i.e., each moment only has a task and reaches,
It then can be using the number of the task receiving time of statistics as the Random Task that in period △ t, operation system is received
Quantity D, then task receiving velocity can be D/ △ t, i.e. new task in period △ t reaches the average of operation system
Amount;Similarly, when operation system is in steady state, the process that task leaves operation system is Poisson process, i.e., each moment
Only a task is left, then can count the number of the task processing time fallen in period △ t, exist as operation system
The quantity K of the Random Task handled in period △ t, then task processing speed can be K/ △ t, i.e. period △ t
Interior task leaves the par of operation system.
In addition, based in Random Task log task receiving time and task handle the time, pass through the test of fitness of fot
Method can also reversely verify operation system reception Random Task and whether the process of processing Random Task meets Poisson distribution.
Optionally, task receiving velocity, task processing speed and parallel processing maximum task amount and largest buffered are appointed
Business amount substitutes into the state transition equation based on birth and death process that M/M/c/N/ ∞/FCFS model uses, solves as known quantity
To baseline probability array.
It is understood that being connect for task queue's model meets the operation system of M/M/c/N/ ∞/FCFS model
The process of receipts task and the process of processing task meet Poisson distribution, then queuing process of the task in operation system meets life and go out
Process, and in view of operation system be in steady state, task receiving velocity and task processing speed keep stabilization and right
For each state in birth and death process, the expectation that operation system receives task is identical as the processing expectation of task, then combines
In the size relation of the task amount n of processing and c and N in operation system, available following state transition equation:
Wherein, λ indicates that task receiving velocity, μ indicate task processing speed, PnIndicate that Queued tasks quantity is the probability of n.
In above-mentioned state transition equation, the meaning that each equation respectively indicates can understand as follows:
(1) first equation indicates: in the case where the Queued tasks queue length of operation system is 0, receiving one
The probability of new task has handled the probability phase an of task in the case where the Queued tasks queue length of operation system is 1
Deng.
(2) it is less than the feelings of the parallel processing maximum task amount c of operation system in the Queued tasks queue length of operation system
Under condition, the global rate that operation system handles task depends on the quantity of task in queue, i.e., has the feelings of n task in the queue
Under condition, the global rate that operation system handles task is n μ, and the task receiving velocity λ of operation system is remained unchanged, then second
Equation indicates: be that (n-1) jumps to probability that queue length is n and be that (n+1) jumps to team from queue queue from queue length
Column length be n the sum of probability, with from queue length be n jump to queue length be (n+1) probability with from queue queue be n
It is equal to jump to the sum of probability that queue length is (n-1).
(3) it is greater than or equal to the parallel processing maximum task amount of operation system in the Queued tasks queue length of operation system
C, and be less than operation system largest buffered task amount N in the case where, operation system handle task global rate depend on simultaneously
Row handles maximum task amount c, i.e. the global rate of operation system processing task keeps c μ constant, and the task of operation system receives speed
Rate λ is remained unchanged, then third equation indicates: being that (n-1) jumps to probability that queue length be n and from queue from queue length
Queue is that (n+1) jumps to the sum of the probability that queue length be n, and is that n jumps to queue length as (n+1) from queue length
Probability is equal with being that n jumps to the sum of probability that queue length is (n-1) from queue queue.
(4) in the case where the Queued tasks queue length of operation system is equal to largest buffered task amount N, since network interface card holds
The limitation of amount etc., the new task beyond largest buffered task amount N will not be received by operation system, i.e., can not be aligned to operation system
Queued tasks queue in, will lead to task loss, then the 4th equation indicates: in the Queued tasks queue length of operation system
In the case where for (N-1), the probability of a new task is received, the feelings for being N with the Queued tasks queue length in operation system
Under condition, the probability for having handled a task is equal.
Wherein, above-mentioned state transition equation may be expressed as:
Then being applied to Gaussian elimination method solution (N+1) a equation can be obtained with successively solving to obtain (N+1) a probability
To baseline probability array { P0, P1, P2... ..., PN}。
Optionally, the state transition diagram of birth and death process can be found in Fig. 4, wherein number in circle 0,1,2,3 ..., c-
2, c-1, c ..., N-2, N-1, N indicate operation system in the task amount of processing, each circle then indicates the task amount in processing
State when for analog value, λ indicate that task receiving velocity, μ indicate task processing speed.
Based on diagram state transition diagram it is found that in the case where the parallel processing task amount of operation system is less than c, business system
Queued tasks quantity in system can increase from the latter state to preceding state with the increase of task quantity is run simultaneously
Add, that is to say, that in the case where the task amount of parallel processing parallel operation task amount less than normal and newly-increased is bigger than normal, i.e. λ > c μ, industry
Queued tasks amount in business system can be gradually increased until reaching N, and operation system is incited somebody to action after parallel processing task amount reaches c
Task processing speed c μ can be kept constant, at this point, operation system will be received no longer beyond the new task outside operation system caching, it should
Part new task will be lost.
In the actual motion of operation system, timed task can receive during handling Random Task, then in business
In the case that system has timed task and Random Task to exist simultaneously, operation system can welcome and appoint when receiving timed task
The peak of business processing, then within this period that timed task and Random Task coexist, if the parallel processing task triggered simultaneously
Amount has been more than the parallel processing maximum task amount c of operation system, then has task queue in operation system.
For there is the operation system of task queue, maximum rate c is handled less than task if can satisfy task receiving velocity λ
The condition of μ, then the task in operation system can constantly have been processed, and operation system can be from initial shape when receiving timed task
State gradually returns to steady state.
Based on above-mentioned, the original state of timed task can be received in operation system, the benchmark based on operation system is general
Rate array determines that it, in the probability array of original state, can be performed as following steps:
Step S103: it according to baseline probability array, determines under original state of the operation system when receiving timed task
Probability array;Wherein, each element in probability array indicates operation system each Queued tasks in the initial state
The corresponding probability of amount.
It is understood that above-mentioned probability array is the set of at least one probability, to include more in probability array
It is { P in probability array for a probability0,P1,P2,……,PiIn the case where, wherein element P0Indicate that operation system exists
Corresponding probability, element P when Queued tasks amount is 0 under original state1Indicate operation system Queued tasks amount in the initial state
Corresponding probability when being 1, and so on, element PiIndicate that operation system is corresponding when Queued tasks amount is i in the initial state
Probability.
The detailed process for determining the baseline probability array of operation system will be illustrated below.
It is shown in Figure 5, in the baseline probability array for determining operation system, may particularly include:
Step S1031: the timed task amount of timed task is determined.
Step S1033 determines each element in probability array according to timed task amount and baseline probability array.
It is understood that the number for the timed task amount that operation system was received in different moments, handles task to it
Stable state has an impact, and the timed task amount received the easier more, and to break operation system locating steady before receiving timed task
Therefore state in order to accurately estimate task queue's response parameter of operation system, is determining the initial shape for receiving timed task
When the corresponding probability array of state, it can be determined according to timed task amount.
Above-mentioned steps S1033 can be executed specifically as following examples, comprising:
Being lined up the first probability assignment corresponding to task amount in probability array first is zero, wherein first is lined up
Task amount is less than timed task amount.It can specifically be indicated i.e. with equation are as follows:
Pi=0 (i < Q),
Wherein, PiIndicate that first is lined up corresponding first probability when task amount is i, Q expression timed task amount.
Being lined up the second probability assignment corresponding to task amount in probability array second is third probability;Wherein,
Two Queued tasks amounts are greater than or equal to timed task amount and are less than largest buffered task amount, and third probability is benchmark probability array
Probability corresponding to middle third Queued tasks amount, third Queued tasks amount are the second difference for being lined up task amount and timed task amount.
It can specifically be indicated i.e. with equation are as follows:
Pi=Pn(Q≤i < N),
Wherein, PiIndicate that corresponding second probability, Q indicate timing when the second queuing task amount is i in probability array
Task amount, PnIndicate corresponding third probability when third Queued tasks amount is n in baseline probability array, and i=n+Q.
It is the 5th probability by the 4th probability assignment corresponding to the 4th Queued tasks amount in probability array;Wherein,
Four Queued tasks amounts are equal to largest buffered task amount, and the 5th probability is remaining all in addition to third probability in benchmark probability array
The sum of probability.It can specifically be indicated i.e. with equation are as follows:
Wherein, PiIndicate that corresponding 4th probability when the 4th Queued tasks amount is i=N in probability array, Q indicate fixed
When task amount, PnIndicate baseline probability array in addition to third probability remaining probability, the value range of n are as follows: Q≤n≤N, and
For integer;By upper it is understood that in the case where operation system is not collapsed, the largest buffered task amount N beyond operation system
New task will not be received by operation system, task lose, and continue with Queued tasks queue caching task.
For example, the N that operation system is arranged is taken as 6, determines that baseline probability array is { P0, P1, P2, P3, P4, P5, P6,
Then when the timed task amount Q received is 3, obtaining probability array through assignment is { 0,0,0, P0, P1, P2, P3+P4+P5+
P6}。
After determining that operation system receives the original state of timed task, based on task queue's model under steady state
During M/M/c/N/ ∞/FCFS handles timed task and Random Task, the task processing speed μ of operation system is kept not
Become, the task receiving velocity λ that operation system receives Random Task can both be remained unchanged, and can also be referred to according to the setting received
Order is set as other values, to consider different Random Task reception conditions to the shadow of task queue's response parameter of operation system
It rings.
It is understood that in timed task and Random Task treatment process, make sure business system when there is receiving new post
When the Queued tasks queue length of system exceeds the case where largest buffered task amount N of operation system, new task be will be lost, then right
In be arranged in operation system Queued tasks queue queue length be N the case where, be less than can satisfy task receiving velocity λ
When task handles the condition of maximum rate c μ, then with the continuous variation of time, operation system can return to flat from original state
Steady state.
During from original state back to this section of steady state, task queue of the operation system in different moments
Response condition can be realized based on following steps, may particularly include:
Step S105: being based on baseline probability array and probability array, and estimation operation system is back to from original state
Task queue's response parameter during steady state.
In embodiments herein, to thering is timed task to reach in operation system and the case where coexist with Random Task,
Without operation pressure measured data on operation system line, in the baseline probability array, reception for determining that operation system is under steady state
After probability array under to the original state of timed task, it can be used to complete to be back to operation system from original state
The estimation of task queue's response parameter during steady state, operation cost is smaller, and is inputted simultaneously based on specific operation,
It may insure the accuracy of task queue's response parameter estimated, rationally to be matched for the system resource to operation system
It sets, reaches and shorten task queue's time, improve the purpose of task treatment effeciency, to be conducive to promote user experience.
Optionally, task queue's response parameter include in task waiting time, task residence time and task Loss Rate extremely
One item missing.
It is understood that task waiting time indicates, task is started to process to it since operation system receives task
Elapsed time;Task residence time indicates, is passed through since operation system receives task to the processing of its completion task
Time;Task Loss Rate occurs, and it is that the Queued tasks queue length of operation system can be made super that operation system, which receives new task,
Out in the case where largest buffered task amount N, during operation system is back to steady state from original state, task is lost
Rate=(request enters the task amount that general assignment amount-operation system of operation system is properly received)/request enters operation system
General assignment amount.
During being back to steady state from original state in view of operation system, in addition to will constantly delay in operation system
The case where timed task and/or Random Task deposited have been handled, and there is also reception new Random Tasks, and then will lead to business system
Task queue's situation in system changes at random, then in order to which the task queue's response parameter for further increasing to operation system is estimated
The accuracy of calculation needs to fully consider during original state return steady state, one caused by arriving due to Random Task
A little task queues' situations, can different moments in this process, using the state transition diagram analog simulation industry of birth and death process
State change situation of the business system in different moments processing task.
In addition, operation system is when receiving different timed tasks, the pressure caused by system resource is also different, from connecing
Receive timed task original state be back to steady state process experienced also can different from, i.e. original state and steady
Gap between state also can be different.
Based on above content, the step S105 of the embodiment of the present application, as shown in fig. 6, can specifically include:
Step S1051: probability array, task receiving velocity and task processing speed, estimation and probability are based on
The corresponding first sub- response parameter of array.
Step S1053: according to the first sub- response parameter, task queue's response parameter is determined.
In embodiments herein, estimation operation system from original state be back to steady state during task row
Team's response parameter is optionally determined according to the first sub- response parameter corresponding with the probability array of operation system, should
First sub- response parameter is able to reflect, task processing capacity of the operation system under the original state for just receiving timed task,
To reflect whether the current system resource distribution situation of operation system can satisfy corresponding task processing requirements.
It is first based on operation system during realization determines task queue's response parameter according to the first sub- response parameter
Beginning state is different from the gap between steady state can different from.
Optionally, in embodiments herein, by calculating first between probability array and baseline probability array
Distance characterizes the gap between the original state of operation system and steady state.
Then in the case where first distance is less than the first pre-determined distance threshold value, above-mentioned steps S1053 can be specifically included: will
First sub- response parameter is determined as task queue's response parameter.
It is understood that probability array between baseline probability array at a distance from less than the first pre-determined distance threshold value, say
Bright operation system because of timed task is received, will not make the increase of task amount to be treated and occur to lose the feelings of new task
Condition is currently based on probability array, task receiving velocity and task processing speed, and what is estimated is corresponding with probability array
The first sub- response parameter, can reflect operation system after receiving timed task corresponding with probability array,
The system resource of current-configuration can be in the case where not losing new task, it is ensured that imitates to the processing of timed task and Random Task
Rate, it can determine that operation system is back to steady state from original state.
In addition, in the case where first distance is greater than or equal to the first pre-determined distance threshold value, as shown in fig. 7, above-mentioned steps
S1053 can be specifically included:
Step S10531: according to state transition equation, solving destination probability array corresponding with object time, when target
Carve be operation system from original state be back to steady state during any moment.
Optionally, at the time of object time can correspond to have executed following step S10534 every time;It may be basis
At the time of the time interval of setting jumps backward sequentially in time automatically.
Step S10532: destination probability array, task receiving velocity and task processing speed, estimation and destination probability are based on
The corresponding second sub- response parameter of array.
Step S10533: the second distance between destination probability array and baseline probability array is calculated;
Step S10534: judge second distance whether less than the second pre-determined distance threshold value, it is pre- less than second in second distance
If in the case where distance threshold, executing step S10535, the case where second distance is greater than or equal to the second pre-determined distance threshold value
Under, return repeats above step S10531~step S10534.
Step S10535: determine that operation system is back to steady state from original state.
Step S10536: according to the first sub- response parameter and at least one second sub- response parameter, determine that task queue rings
Answer parameter.
It is understood that probability array between baseline probability array at a distance from be greater than or equal to the first pre-determined distance threshold
Value illustrates that operation system because receiving timed task, can result in the need for the increase of the task amount of processing and occur to lose newly appointed
The case where business, needs the continuous variation with the time then for the ability of accurate evaluation operation system processing task, assesses in real time
Gap between different target moment corresponding dbjective state and steady state solves the corresponding destination probability of each object time
Second distance between array and baseline probability array.
Whether operation system is determined according to the size relation of second distance and the second pre-determined distance threshold value at each moment
It is back to steady state from original state, the comparable situation with first distance and the first pre-determined distance threshold value is managed, in destination probability
Array between baseline probability array at a distance from less than the second pre-determined distance threshold value in the case where, illustrate that operation system will not occur again
The case where losing new task, then in the case where determining that operation system is back to steady state from original state, can be based on mesh
Probability array, task receiving velocity and task processing speed are marked, the second son response corresponding with destination probability array estimated
After parameter, circulation is jumped out, and determine that final task responds based on the first sub- response parameter and all second sub- response parameter
Parameter, so that reasonable disposition system resource, layout task processing sequence etc. are referred to.
When destination probability array between baseline probability array at a distance from be greater than or equal to the second pre-determined distance threshold value feelings
Under condition, illustrate that operation system still then can receive speed based on destination probability array, task there is a situation where losing new task
Rate and task processing speed, after the second sub- response parameter corresponding with destination probability array estimated, return is successively held again
The step of row solves destination probability array, second distance and is compared second distance with the second pre-determined distance threshold value.
It is understood that the above-mentioned description to step S105, realizes after receiving timed task to operation system, from first
During beginning state is back to steady state, the analog simulation of the change procedure of the Queued tasks queue length of operation system.
Optionally, above-mentioned to be based on probability array, task receiving velocity and task processing speed, estimation and probability
The step of array corresponding first sub- response parameter, and based on destination probability array, task receiving velocity and task processing speed
It the step of rate, estimation the second sub- response parameter corresponding with destination probability array, can be realized according to following parameter calculation formula
The solution of task waiting time, task residence time response parameter:
PiIndicate corresponding when Queued tasks amount is i in each probability array
+ 1/ λ of probability and task residence time=task waiting time.
Optionally, above-mentioned first distance and second distance can Euclidean distances between array, for example, probability array
{P0, P1, P2, P3, P4And probability array { 0,0,0, P0, P1Between Euclidean distance be sqrt ((P0-0)2+(P1-0)2+(P2-0)2
+(P3-P0)2+(P4-P1)2), wherein sqrt indicates square root.Certainly, in the other embodiments of the application, above-mentioned first distance
It can also be other distances in addition to Euclidean distance, such as Pasteur's distance with second distance.
Optionally, above-mentioned first pre-determined distance threshold value and the second pre-determined distance threshold value can be identical preset value, can also
The selection for thinking different preset value and the first pre-determined distance threshold value and the second pre-determined distance threshold value, can be according to business system
The actual conditions such as the system resource configuration for uniting current, are set as any appropriate value.
The embodiment of the present application also provides a kind of task queue's response parameter estimation device, and shown in Figure 8, which can have
Body includes:
First probability array determining module 801, for determining the baseline probability array of operation system;Wherein, baseline probability
Each element in array indicates operation system probability corresponding to each Queued tasks amount under steady state;
Second probability array determining module 803, for determining that operation system is receiving timing according to baseline probability array
Probability array under original state when task;Wherein, each element in probability array indicates operation system first
Probability corresponding to each Queued tasks amount under beginning state;
Parameter estimation module 805, for being based on baseline probability array and probability array, estimation operation system is from initial
State be back to steady state during task queue's response parameter.
It is understood that task queue's response parameter provided by the embodiments of the present application estimates device, aforementioned implementation can be realized
The task queue's response parameter evaluation method provided in example, related illustrate about task queue's response parameter evaluation method are fitted
Device is estimated for task queue's response parameter, and details are not described herein again.
Fig. 9 is the structural schematic diagram of one embodiment electronic equipment of the application.Referring to FIG. 9, in hardware view, the electricity
Sub- equipment includes processor, optionally further comprising internal bus, network interface, memory.Wherein, memory may be comprising interior
It deposits, such as high-speed random access memory (Random-Access Memory, RAM), it is also possible to further include non-volatile memories
Device (non-volatile memory), for example, at least 1 magnetic disk storage etc..Certainly, which is also possible that other
Hardware required for business.
Processor, network interface and memory can be connected with each other by internal bus, which can be ISA
(Industry Standard Architecture, industry standard architecture) bus, PCI (Peripheral
Component Interconnect, Peripheral Component Interconnect standard) bus or EISA (Extended Industry Standard
Architecture, expanding the industrial standard structure) bus etc..The bus can be divided into address bus, data/address bus, control always
Line etc..Only to be indicated with a four-headed arrow in Fig. 9, it is not intended that an only bus or a type of convenient for indicating
Bus.
Memory, for storing program.Specifically, program may include program code, and said program code includes calculating
Machine operational order.Memory may include memory and nonvolatile memory, and provide instruction and data to processor.
Processor is from the then operation into memory of corresponding computer program is read in nonvolatile memory, in logical layer
Resource presentation device is formed on face estimates device.Processor executes the program that memory is stored, and is specifically used for executing following
Operation:
Determine the baseline probability array of operation system;Wherein, each element in the baseline probability array, indicates the industry
Business system probability corresponding to each Queued tasks amount under steady state;
According to the baseline probability array, determine under original state of the operation system when receiving timed task
Probability array;Wherein, each element in the probability array, indicates the operation system under the original state
Probability corresponding to each Queued tasks amount;
Based on the baseline probability array and the probability array, estimate the operation system from the original state
It is back to task queue's response parameter during the steady state.
The method that task queue's response parameter estimation device disclosed in the above-mentioned embodiment illustrated in fig. 1 such as the application executes can be with
It is realized applied in processor, or by processor.Processor may be a kind of IC chip, the processing energy with signal
Power.During realization, each step of the above method can pass through the integrated logic circuit or software of the hardware in processor
The instruction of form is completed.Above-mentioned processor can be general processor, including central processing unit (Central Processing
Unit, CPU), network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital
Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit,
ASIC), field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic
Device, discrete gate or transistor logic, discrete hardware components.It may be implemented or execute the public affairs in the embodiment of the present application
Each method, step and the logic diagram opened.General processor can be microprocessor or the processor be also possible to it is any often
The processor etc. of rule.The step of method in conjunction with disclosed in the embodiment of the present application, can be embodied directly in hardware decoding processor and hold
Row complete, or in decoding processor hardware and software module combine execute completion.Software module can be located at deposits at random
Reservoir, flash memory, read-only memory, this fields such as programmable read only memory or electrically erasable programmable memory, register
In mature storage medium.The storage medium is located at memory, and processor reads the information in memory, completes in conjunction with its hardware
The step of above method.
The electronic equipment can also carry out the method that Tu1Zhong task queue response parameter estimation device executes, and realize task
It is lined up the function of response parameter estimation device embodiment shown in Fig. 1, details are not described herein for the embodiment of the present application.
The embodiment of the present application also proposed a kind of computer readable storage medium, the computer-readable recording medium storage one
A or multiple programs, the one or more program include instruction, which holds when by the electronic equipment including multiple application programs
When row, the electronic equipment can be made to execute the method that task queue's response parameter estimation device executes in embodiment illustrated in fig. 1, and
Specifically for executing:
Determine the baseline probability array of operation system;Wherein, each element in the baseline probability array, indicates the industry
Business system probability corresponding to each Queued tasks amount under steady state;
According to the baseline probability array, determine under original state of the operation system when receiving timed task
Probability array;Wherein, each element in the probability array, indicates the operation system under the original state
Probability corresponding to each Queued tasks amount;
Based on the baseline probability array and the probability array, estimate the operation system from the original state
It is back to task queue's response parameter during the steady state.
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.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net
Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/or
The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium
Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM),
Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices
Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates
Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability
It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap
Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including described want
There is also other identical elements in the process, method of element, commodity or equipment.
It will be understood by those skilled in the art that embodiments herein can provide as method, system or computer program product.
Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the application
Form.It is deposited moreover, the application can be used to can be used in the computer that one or more wherein includes computer usable program code
The shape for the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)
Formula.
The above description is only an example of the present application, is not intended to limit this application.For those skilled in the art
For, various changes and changes are possible in this application.All any modifications made within the spirit and principles of the present application are equal
Replacement, improvement etc., should be included within the scope of the claims of this application.