Summary of the invention
Goal of the invention: the defect existed for above-mentioned prior art, it is desirable to provide a kind of wireless cooperation thin cloud system
The resource regulating method of system, by the cooperative scheduling by some AP, is allowed to be jointly processed by a workflow, decreases single work
The average handling time of stream, improves systematic function.Meanwhile, by the distribution of resource, the equilibrium of load makes the utilization of resource
Rate increases.
Technical scheme: the resource allocation methods of a kind of wireless cloud computing system, comprises the following steps:
(1) the task n task node weights of calculation workflow and task n take office the weights on m limit;
(2) priority of each task is calculated;
(3) finding task n that residue task medium priority is the highest, PCP is initialized by n.If the rear-guard task of task n
There is r, respectively m1, m2 ..., mr;
(4) m1, m2 are removed ..., in mr, forerunner is the most all assigned to the task of any PCP section, takes in remaining task
The task of priority value maximum adds this section of PCP, and distribution always is gone down, until there is no qualified task, and this section of PCP distribution
Complete;
(5) check the task in this section of PCP one by one, complete the distribution of new one section of PCP, until all of task is the most allocated
To PCP section;
(6) if there is no AP can be distributed, then it is set to distribute by all of AP, finds the AP that can distribute PCP section, meter
Calculate the EFT that the distribution of PCP section extremely can distribute AP, compare the EFT that one section of PCP can distribute in AP at each, choose and make EFT have minimum
The AP of value is as the mapping AP of this section of PCP;
(7) during choosing, choose EFT that AP obtains when being infinite, analyze the task in this section of PCP one by one, if
The forerunner of task is infinite to this multiplexed transport time, route;
(8) determine starting point AP and terminal AP, then find out the path being connected two AP by the shortest jumping figure, this path is made
For routed path.
Further, task n task node weights described in step (1) are the task process time delay of this nodeWherein I is the task amount of task,Processing speed for average each AP;Described task n takes office the weights on m limit
For transmission delayWherein Transferdata is the task amount of transmission between task,For flat between AP
All bandwidth of link.
Further, described step (2) is particularly as follows: calculate each task node to the n that ends taskexitLongest path
Value, using this value as the priority of each task.
Further, each task node is calculated to the n that ends taskexitThe method of longest path particularly as follows: set n and appoint
The rear-guard task of business has r, respectively m1,m2,...,mr, then the priority of task n isWherein initialization
I.e. ending task nexitPriorityIexitTask amount for the task that ends up.
Further, step (4), particularly as follows: assume two set α and β, is put into inside α and has been assigned to appointing of PCP
Business, puts into the unallocated task to PCP in β, the initial value of α is an empty set, afterwards according to the order of priority rank, finds
PCP section;For m1,m2,...,mrMiddle task mi, wherein miAll of predecessor task have q, respectively l1,l2,...,lq, as
Really l1,l2,...,lqThe most in α, then miRetained, and continued distribution, until there is no qualified task, this section
PCP is assigned.
Further, step (5) is particularly as follows: the task of checking one by one in this section of PCP, if the task in this section of PCP
The forerunner that there is this task in rear-guard task all distributes the task to PCP, then start to be allocated next section of PCP, directly
All it is assigned in PCP section to all of task.
Further, described step (8) is particularly as follows: set and need to carry out the initial AP that route as APfrom, the terminal AP of route
For APtoIf jumping through one and increase jumping figure, finding out APfromThe AP that can arrive, if in the middle of there is no APto, then route is continually looked for
Path, finds out double bounce APfromThe AP that can arrive, if the most still not having APto, then continue to increase jumping figure, can until finding out
To arrive APtoPath till, using this path as routed path.
Beneficial effect: first, the present invention proposes the task method of salary distribution of a kind of Based PC P, by the mapping of PCP
Journey, completes the mapping process to task, and task of making relatedness stronger during this is allocated in the middle of same AP, decreases task
Between transmission time of data.Secondly, take into account in the assigning process of PCP and allow the mapping of PCP to AP more equalize, with
Toward the PCP method of salary distribution in, the when of excessively little of the channel width between AP, if according to optimum selection mode, can
Some AP can be caused forever to distribute less than PCP, and the present invention can not distribute two kinds of shapes by forcing to be set to distribute by AP
State, it is to avoid this situation.Finally, the present invention is directed in radio communication the situation of not full UNICOM between AP, be provided with route
Some AP are coupled together by algorithm, are allowed to cooperation and get up to process a workflow, decrease the process time of single workflow,
Improve systematic function.
Detailed description of the invention
Below by a most preferred embodiment and combine accompanying drawing the technical program is described in detail.
All forerunners that in task flow, task has certain sequencing, all of task to have to wait for it are carried out complete
Just can perform, then we need setting priority to remove the execution sequence of measurement task.In task to AP (Wireless
Access Point) mapping process in the middle of, can be can to distribute at same PCP by having certain contextual task
In (Partial Critical Path) section, it is positioned at the task in same section of PCP and is necessarily allocated in same AP, then this section of PCP
The interior data transmission period between task is 0, is so assigned to AP by PCP and decreases the total amount of data of transmission between AP.Upper
State in PCP mapping process, need to consider two conditions, on the one hand, wish that each PCP section is distributed in AP more evenly, can
More equalize with proof load, on the other hand, need PCP to choose the AP of local optimum so that it is to be done within the shorter time.
When depositing the situation of Fei Quan UNICOM between the aps, the data between task cannot directly arrive, and needs the AP by being routed to other
The transmission of complete paired data.
As it is shown in figure 1, the resource allocation methods of a kind of wireless cloud computing system, comprise the following steps:
(1) Mobile solution is broken down into multiple task block, has data dependence relation between task, forms a job
Stream, as in figure 2 it is shown, as a example by a simple workflow, wherein there are corresponding weights, first calculation workflow in the inside of workflow
Task n task node weights and task n take office the weights on m limit;Task n task node weights are that the task process of this node is prolonged
TimeWherein I is the task amount of task,Processing speed for average each AP;Described task n takes office the power on m limit
Value is transmission delayWherein Transferdata is the task amount of transmission between task,For between AP
The bandwidth of average link.
(2) priority of each task is calculated, particularly as follows: calculate each task node to the n that ends taskexitThe longest
The value in path, using this value as the priority of each task.Calculate each task node to the n that ends taskexitLongest path
The method in footpath particularly as follows: the rear-guard task setting n task has r, respectively m1,m2,...,mr, then the priority of task n is Wherein initialization
I.e. ending task nexitPriorityIexitTask amount for the task that ends up.
As shown in Figure 4, search for the most forward by ending task, when the priority of the rear-guard task of a task known it
After, can be in the hope of the value of the priority of this task.We assume that there is a set x, wherein put into the volume task of known priority,
The priority of the task that first ends up can be asked, and puts it in x and initializes, and for all tasks in set x, finds out these tasks
Forerunner, duplicate removal is also put in set temp, is analyzed the task in temp the most one by one, if all rear-guard tasks of this task
All in x, this task is retained, then by with upper type, in temp, the priority of task can be asked, and updates task in x simultaneously,
Proceed as described above, until all of task is all in set x.
(3) as it is shown in figure 5, find task n that residue task medium priority is the highest, n is firstly added in this section of PCP, i.e. n pair
PCP initializes, if its rear-guard task has r, and respectively m1, m2 ..., mr;
(4) m1, m2 are removed ..., in mr, forerunner is the most all assigned to the task of any PCP section, takes in remaining task
The task of priority value maximum adds this section of PCP, and distribution always is gone down, until there is no qualified task, and this section of PCP distribution
Complete;Particularly as follows: assume two set α and β, inside α, put into the task of being assigned to PCP, put in β unallocated extremely
The task of PCP, the initial value of α is an empty set, afterwards according to the order of priority rank, finds PCP section;For m1,
m2,...,mrMiddle task mi, wherein miAll of predecessor task have q, respectively l1,l2,...,lqIf, l1,l2,...,
lqThe most in α, then miRetained, and continued distribution, until not having qualified task, this section of PCP to be assigned.
(5) check the task in this section of PCP one by one, complete the distribution of new one section of PCP, until all of task is the most allocated
To PCP section;Particularly as follows: checking one by one in this section of PCP of task, if there is this task in the rear-guard of the task in this section of PCP
Forerunner all distribute the task to PCP, then start new one section of PCP and be allocated, repeat above procedure set up new PCP section
Until all of task is all assigned in PCP section α.
(6) as shown in Figure 6, by previous step, have found each section of PCP, the most in order, each section of PCP is mapped
To AP.If there is no AP can be distributed, then it is set to distribute by all of AP, finds the AP that can distribute PCP section, calculate
The distribution of PCP section extremely can distribute the EFT (Estimated Finish Time) of AP, compares one section of PCP and can distribute in AP at each
EFT, chooses the AP mapping AP as this section of PCP of the value making EFT have minimum;
Concrete: for an AP, it has two states to distribute and can not distribute.As an AP that can distribute state
After being allocated to certain PCP, dress is become distributing by its state.So PCP is distributed down always, until all
AP when all becoming indistributable state, by the state reduction of all AP for distributing, proceed the mapping of PCP afterwards
Process.For one section of PCP, using the EFT of this section of last task of PCP as the EFT of this section of PCP, exist by comparing one section of PCP
Each can distribute the EFT in AP, chooses and makes AP minimum for its EFT as selecting AP.Assume for task m, all of forerunner of m
Task has q, is set to l1, l2 ..., lq, task m is allocated in APi, cuts and is now already allocated to the task of APi and has k, respectively
For t1, t2 ..., tk, then, shown in the EFT of task m such as formula (2), wherein EST (Estimated Start Time) is expressed as
Formula (3), in formula, (3) RRT (Resource Ready Time) is expressed as formula (4), TRT (TAsk Ready Time) table
Being shown as formula (5), wherein formula (5) needs illustratively, distributes same AP's when there being two tasks front and back driving relation
Time, between two tasks, data transmission period i.e. TT is 0.The EFT of PCP task is then gradually tried to achieve by above formula,
The EFT of this section of PCP can be obtained.
EFT (m)=EST (m)+ETm (2)
EST (m)=max{RRT (APi),TRT(m)} (3)
RRT(APi)=max{EFT (t1),EFT(t2),...,EFT(tk)} (4)
(7) during choosing, choose EFT that AP obtains when being infinite, need to carry out routeing to reach the transmission of data,
Now, this section of PCP has chosen AP to be distributed.First, analyze the task in this section of PCP one by one, if before task
It is infinite for being driven to this multiplexed transport time, then find two AP that cannot be directly connected to, and finds routed path, route;
(8) determine starting point AP and terminal AP, then find out the path being connected two AP by the shortest jumping figure, this path is made
For routed path;If needing the initial AP carrying out routeing is APfrom, the terminal AP of route is APtoIf jumping to increase through one and jumping
Number, finds out APfromThe AP that can arrive, if in the middle of there is no APto, then continually look for routed path, find out double bounce APfromPermissible
The AP arrived, if the most still not having APto, then continue to increase jumping figure, repeating said process, AP can be arrived until finding outto
Path till, using this path as routed path.
Here in Fig. 2 10 workflows are given one example.Assume for 10 workflows, its structure such as Fig. 2 institute
Show, concrete parameter is provided below, it is assumed that processing speed P of each AP is 10000MIPS (Million Instruction
Per Second), thenIn data transmission procedure, if between AP, bandwidth B is all 106bit/s, thenThe task amount I that its task number is corresponding is as shown in table 1, and its unit is MI (Million Instruction).
Table 1 task amount
Task number |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
Task amount |
0 |
1339000 |
1383000 |
1336000 |
1378000 |
1037000 |
1059000 |
1088000 |
1755000 |
0 |
Between its task, data volume Transferdata of transmission is as shown in table 2, and data volume unit is bit.
Data volume Transferdata of transmission between table 2 task
Assuming there are 4 AP, its UNICOM's situation is as shown in table 5, and wherein the value in table is this path UNICOM of 1 expression, is 0 expression
Not UNICOM, such as, what in form, the 2nd row the 3rd arranged is numbered 1, represents from AP1 to AP2 UNICOM.
Annexation between table 3AP
No. AP |
1 |
2 |
3 |
4 |
1 |
0 |
1 |
0 |
0 |
2 |
1 |
0 |
1 |
0 |
3 |
0 |
1 |
0 |
1 |
4 |
0 |
0 |
1 |
0 |
The mapping process of task is completed below as step:
1. by data in table 1 divided byIn table 2 data divided byI.e. can get in Fig. 2
Each task node weights of workflow and limit weights.
②The then rank value of task 9The rear-guard of task 6 is only
There is task 9 thenIn like manner According to above-mentioned
Method, obtains rank value such as table 4.
Table 4 each task node rank value
~first 3. selecting task 1 to begin look for, task 1 is put in the middle of PCP, see afterwards the rear-guard of task 1 i.e. [2,3,
4,5], the forerunner of four tasks is task 1, then the task 5 selecting rank value maximum is put in the middle of this section of PCP, sees afterwards
The rear-guard task 8 of task 5, the forerunner of task 8 is [2,4,5], wherein task 2, and 4 are not previously allocated any one section of PCP of entrance, then
This section of PCP has found, and this section of PCP is [1,5], next analyzes this PCP.The unassigned rear-guard [2,3,4] of task 1,
Taking the task of rank maximum in unallocated going out of task, for task 3, its rear-guard is 7, and for task 7, its forerunner is for appointing
Business [3,4], task 4 is not allocated away, then this section of PCP is assigned, and for [3], next analyzes this section of PCP, does not sends out
Existing satisfactory task, terminates.Return to the analysis to task 1, the rear-guard [2,4] that it is unassigned, take rank bigger
Namely task 2, the rear-guard of task 2 is [6,8], neither meets addition PCP, and this section of PCP distribution terminates.According to above-mentioned side
Method is taken off always.The result such as table 5 of its PCP distribution.
Table 5PCP allocation result
PCP label |
1 |
2 |
3 |
4 |
5 |
6 |
Comprise task |
1,5 |
3 |
2 |
4,8 |
7 |
6,9,10 |
6.~8. for first paragraph PCP i.e. [1,5], its distribution is to AP1, and for task 1, its EFT is 0, for task 5,
Its forerunner only has task 1, then EFT (i.e. the EFT of the task 5) 1378000/P=137.8 of this section of PCP, and now AP1 is set to not
Can distribute.Next distribution second segment PCP is i.e. [3], and the forerunner of task 3 is task 1, and the EFT of task 1 is 0, can distribute in residue
AP2, in AP3, AP4, their RRT is 0, then the EFT (i.e. the EFT of task 3) distributing to AP1 of PCP is max{0+0/
B, 0}+1383000/P=138.3, in like manner calculate this section of PCP can distribute the EFT of AP3 and AP4 be respectively 138.3 with
138.3, the most in order this section of PCP is mapped to AP2, the EFT obtaining task 3 is 138.3, and now AP2 is set to inseparable
Join.The 3rd section of PCP of distribution is i.e. [2] afterwards, and its forerunner is task 1, and its EFT is 0, and it is remaining assignable AP3, in AP4
RRT be all 0, then PCP distributes to the EFT of AP3 is max{0+0/B, 0}+1339000/P=133.9, in like manner this section of PCP distribution
Also be 133.9 at the EFT (i.e. the EFT of task 2) of AP4, then we sequentially select to be mapped to this section of PCP AP3, the EFT of task 2
Being 133.9, AP3 is set to distribute.Then being allocated the 4th section of PCP i.e. [4,8], the most assignable AP is AP4,
Its RRT is 0, and for task 4, the EFT of its predecessor task 1 is 0, then the EFT=max{0+0/B of task 4,0}+1336000/P=
133.6, for task 8, its forerunner is [2,4,5], these forerunners distribution No. AP be [3,4,1], for task 4, it with
Task 8 is in same PCP, and both transmission delays are disregarded, and for task 2, it is mapped in AP3, and AP3 to AP4 can be direct
Transmission, transmission delay is 8.873456.For task 5, it is positioned at AP1, and AP1 to AP4 cannot directly transmit, it would be desirable to seek
Looking for the routed path of AP1 to AP4, the access path of AP1 is AP2, then with AP1 as starting point, the path of route one jumping is [1,2],
Do not arrive AP3, continually look for.With AP1 as starting point, all routed paths routeing two are [1,2,1], and [1,2,3] does not has yet
Having arrival AP4, with AP1 as starting point, all routed paths of route three jumping are [1,2,1,2], [1,2,3,2], [1,2,3,4],
After wherein, a paths arrives AP4, then selecting this paths is routed path, and now the RRT of AP4 is the EFT of task 4, is
133.6, then the EFT of task 8 is max{max{137.8+7853276/B*3,1383+8873456/B, 133.6}, 133.6}+
1088000/P=270.1598, now AP4 is set to distribute.The most all of AP is both configured to be assigned with, then weigh
Newly all of AP is set to distribute.Continue according to the method, until all of PCP section is assigned, then complete
The task mapping process to AP.
Below it is only the preferred embodiment of the present invention, it should be pointed out that: those skilled in the art are come
Saying, under the premise without departing from the principles of the invention, it is also possible to make some improvements and modifications, these improvements and modifications also should be regarded as
Protection scope of the present invention.