CN104540171A - Wireless sensor network and node task distribution method thereof - Google Patents
Wireless sensor network and node task distribution method thereof Download PDFInfo
- Publication number
- CN104540171A CN104540171A CN201410765158.8A CN201410765158A CN104540171A CN 104540171 A CN104540171 A CN 104540171A CN 201410765158 A CN201410765158 A CN 201410765158A CN 104540171 A CN104540171 A CN 104540171A
- Authority
- CN
- China
- Prior art keywords
- node
- chromosome
- ordinary
- ordinary node
- task
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W28/00—Network traffic management; Network resource management
- H04W28/02—Traffic management, e.g. flow control or congestion control
- H04W28/08—Load balancing or load distribution
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W84/00—Network topologies
- H04W84/18—Self-organising networks, e.g. ad-hoc networks or sensor networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W88/00—Devices specially adapted for wireless communication networks, e.g. terminals, base stations or access point devices
- H04W88/16—Gateway arrangements
Abstract
The invention relates to a wireless sensor network and a node task distribution method thereof. The wireless sensor network comprises a gateway node and multiple common nodes. The wireless sensor network is characterized in that the gateway node and the multiple common nodes are formed through linkage in a wireless multi-hop mode, the gateway node is provided with power supply, and the common nodes are provided with no power supply, are randomly arranged and are moved no longer once the common nodes are arranged well. The gateway node in the wireless sensor network allocates interdependent subtasks based on a genetic algorithm, an integral incentive mechanism is introduced to an allocation algorithm, grading is conducted on the common nodes according to node integrals, accordingly loads of all nodes are balanced, and the life cycle of a network is prolonged. Under the situation that the nodes are unstable, uncompleted tasks on unstable points can be migrated to other appropriate nodes, task completion within time limit is ensured, and task allocation efficiency and completion quality are improved.
Description
Technical field
The invention belongs to wireless multimedia sensor network technical field, particularly a kind of node tasks distribution method based on genetic algorithm and integration incentive mechanism.
Background technology
Along with wireless sensor network application requirement of real-time is more and more higher, it is the essential condition ensureing whole application real-time that the task that node distributes is successfully completed in time limit.But in wireless sensor network environment, radio node is easy to because of energy exhaustion or is subject to the attack of malicious node and lost efficacy, so when a node of executing the task is about to lose efficacy, or during death, how to find a kind of can fast, the low consumption task immigration method that success rate is high again, go to be very important by the task immigration on failure node to other nodes, this when respective nodes lost efficacy, can ensure the smooth execution of task.
Summary of the invention
Compared with prior art, gateway node of the present invention distributes complementary subtask based on genetic algorithm, and integration incentive mechanism is incorporated in allocation algorithm, thus balances each node load, extends network lifecycle; When ordinary node lost efficacy, by task immigration that failure node does not complete on other suitable nodes, can ensure that task completed in time limit, improve task matching efficiency and difficulty action accomplishment; Meanwhile, by Revised genetic algorithum, improve the space exploration ability of algorithm, accelerate evolutionary rate, the allocative decision of node can be obtained within a short period of time, improve the reaction time of wireless sensor network; In addition, also add the step of according to nodal integration, ordinary node being carried out to divided rank, when can reduce task immigration by this step, select the scope of processing node, thus decrease unnecessary communication consumption, avoid network service blocking, improve the success rate of task immigration.
The invention provides a kind of wireless sensor network, comprise a gateway node and multiple ordinary node, it is characterized in that:
Described gateway node and ordinary node link in the mode of wireless multi-hop and form, and gateway node has supply of electric power, and ordinary node does not have supply of electric power, ordinary node random arrangement, once after arranging, just no longer move.
Present invention also offers a kind of method for allocating tasks in wireless sensor network based on genetic algorithm and incentive mechanism, it is characterized in that:
Step one, gateway node receive an application instruction, and the application in this instruction can be broken down into multiple complementary subtask, describes with DAG task image G=(T, E), the summit set T={T of DAG task image
1, T
2..., T
nrepresent, representative needs the subtask performed, and wherein n represents the number of subtask, and there is a time restriction deadline each subtask, and the execution of subtask must complete before the deadline specified, the limit E={E of DAG task image
1, E
2..., E
grepresent, represent the data dependence between subtask or control to rely on, wherein g represents the number on the limit of DAG task image, if from summit T
ito summit T
jthere is a directed edge E
ij, then subtask T is described
jexecution need subtask T
ioutput data; Gateway node adopts genetic algorithm manage the subtask in DAG task image and distribute, and concrete grammar is as follows:
(1) stochastic generation allocative decision and chromosome, builds chromosome congression S
Use S={C
1, C
2..., C
xrepresent all allocative decisions and chromosomal set, wherein C is a candidate scheme, and x is the number of all candidate schemes; Gateway node stochastic generation x allocative decision, each allocative decision is exactly a chromosome, and each chromosome 3 × n matrix C represents, n represents the total task number in DAG task image, (the T in Matrix C the first row
1... T
i... T
n) be subtask to be allocated, its order from left to right determines according to tasks carrying order in DAG task image, Matrix C second row (V
1... V
j... V
m) represent subtask map node, Matrix C the third line (ω
1... ω
i... ω
n) representing the amount of calculation of subtask, chromosome Matrix C is as follows:
(2) communication matrix E is built
Data transmission relations between task 3 × g matrix E represents i.e. communication matrix, and g is the sum on the limit of DAG task image, each row first element T in matrix E
iexpression task transmit leg, second element T
jfor task recipient, the 3rd element l
ijfor task T
iand T
jbetween transmit the size of data, wherein row of communication matrix E are as follows:
(3) the total reward points of chromosome is calculated
The reward points that every bar chromosome produces
refer to that gateway node is by certain chromosome C
kwhen carrying out task matching, complete the summation of the reward points paid needed for all subtasks in DAG task image:
Wherein, T
i∈ T represents all subtasks in DAG task image, V
j∈ C
krepresent chromosome C
kin involved all ordinary nodes,
for node V
jfinish the work T
irequired reward points;
(4) the chromosome deadline is calculated
Chromosome deadline WT (C
k) refer to that gateway node is by certain chromosome C
kwhen carrying out task matching, complete the time span required for all subtasks in DAG task image;
(5) construct fitness function, chromosome performance is assessed
Fitness represents chromosomal quality, fitness is higher, this chromosome is more excellent, then chromosome survival probability is higher, chromosomal fitness is calculated by structure fitness function, the structure target of fitness function finds total reward points little, the chromosome that the deadline is short, and fitness function is as follows:
Wherein, fit (C
i) be chromosome C
ifitness,
be the minimum value of total reward points in chromosome congression S, MIN_WT (S) is the minimum value of deadline in chromosome congression S, and β is customized parameter, regulates total reward points and the deadline weight in fitness function;
Calculate each chromosomal fitness, be stored in performance rate table by the fitness of chromosomal for x bar No. ID and correspondence and be used for classification and identifying, the descending by adaptive value in performance rate table sorts, and the chromosome that fitness is high comes the top of table;
(6) genetic manipulation is carried out to chromosome
1) operation is inherited
In performance rate table, before x chromosome, y% inherits in chromosome congression of future generation, and all the other x × (1-y%) bar chromosome produces through selection, intersection, variation step, and y% represents chromosomal excellent rate, wherein y ∈ [1,100];
2) operation is selected:
In performance rate table, select the interlace operation that two chromosomes carry out below, thus produce new chromosome, adopt the mode of roulette, chromosomal fitness is higher, higher by the probability selected;
3) interlace operation
Two the chromosome Matrix C selected
1and C
2as former generation's chromosome, interlace operation is to former generation's chromosome Matrix C
1and C
2carry out part restructuring, produce offspring's chromosome C
3and C
4, in interlace operation, chromosome matrix the first row remains unchanged, constant to ensure tasks carrying order, in former generation's chromosome Matrix C
1and C
2second row is selected a bit as crosspoint, Matrix C
1and C
2part behind second row crosspoint exchanges, thus produces offspring's chromosome Matrix C
3and C
4, calculate offspring's chromosome Matrix C
3and C
4fitness, and be stored in the relevant position of performance rate table;
4) mutation operation
Comprise two kinds of mutational formats, mode is a) sudden change of task based access control, and each chromosome has λ probability, by Stochastic choice duty mapping on another node; Or adopt mode b) based on chromosomal sudden change, the new chromosome that each chromosome has λ probability to be randomly generated is completely alternative, and wherein λ represents mutation rate, λ ∈ (0,1);
(7) said process is after the iterative operation of certain number of times, and gateway node selects the chromosome being in top as current allocative decision in performance rate table;
The ordinary node related in the allocative decision that step 2, gateway node are selected is active node, and active node obtains associated quad according to the nodal integration exchange rate and energy consumption of finishing the work;
Wherein, integration is used to the history performance that measurement node is finished the work, and for increasing the participation that node is executed the task, carry out quantizing examination with integration to the performance that node is finished the work, line item of going forward side by side, integration comprises reward points
with punishment integration
wherein T
i∈ T represents all subtasks in DAG task image; If active node is successfully completed task, corresponding reward points can be obtained
finish the work if unsuccessful, can be deducted and punish integration accordingly
the integration summation that active node is got up by accumulation of finishing the work is total mark
total mark
ordinary node V
jthe integration summation that accumulation of finishing the work is got up, namely all reward points sums deduct all punishment integration sums:
Wherein, V
j(T) be ordinary node V
jall tasks of upper distribution, T
sordinary node V
jon the task of being successfully completed, T
fordinary node V
jupper unsuccessful completing of task;
The described integration exchange rate is that node consumption unit energy should obtain integration, and it embodies the cost performance that node is finished the work, and uses
represent, wherein
for ordinary node V
jdump energy,
for node V
jtotal mark;
Step 3, gateway node, according to the total mark of ordinary node and quantity of finishing the work, construct ordinary node integral level
it represents the quality that ordinary node history is finished the work, according to
ordinary node is divided into senior ordinary node and rudimentary ordinary node by value, and senior common joint is than the task quantity performed of rudimentary ordinary node and better quality; Concrete partition process is as follows:
(1) ordinary node integral level is calculated
ordinary node V
jthe evaluation of the effect of finishing the work and the total mark of ordinary node and ordinary node receive an assignment several relevant, ordinary node V
jthe integral level of Processing tasks is expressed as follows:
Wherein,
represent ordinary node V
jthe total mark of finishing the work,
represent and be assigned to ordinary node V
jthe reward points summation of all tasks,
represent ordinary node V
jon the task quantity that is assigned to, N
totalrepresent the total quantity of the task that gateway node distributes;
(2) ordinary node grade classification: gateway node is to ordinary node integral level
sort, represent that senior ordinary node accounts for the ratio of all ordinary nodes with α, ordinary node integral level
the node division coming front α is senior ordinary node, and all the other ordinary nodes are divided into rudimentary ordinary node, and α dynamic regulates, α ∈ (0,1);
(3) gateway node ordinary node grade classification is good after, form ordinary node table of grading, in this table of grading, record No. ID, ordinary node, grade, ordinary node integral level that ordinary node is corresponding
with the ordinary node integration exchange rate, gateway node sends the message of grade residing for each ordinary node to each ordinary node, makes each ordinary node know grade residing for self;
(4) after each ordinary node processes task, self total mark, Processing tasks number all can change, after setting-up time or when new application instruction arrives gateway node, gateway node recalculates ordinary node integral level
grade is repartitioned to ordinary node, thus upgrades ordinary node table of grading; The ordinary node that message only sends to grade to change by gateway node, to reduce communication overhead, if the grade of ordinary node changes compared with before, grade after the ordinary node that then gateway node transmission message informing grade changes upgrades, if ordinary node grade does not change, then gateway node does not send message to this ordinary node;
If step 4 active node itself fail or be subject to other malicious nodes attack, it is then unstable node, if this unstable node has not complete task, exchanged for the cooperation of other ordinary nodes by the mode of redeem points, thus by task immigration on other ordinary nodes;
If step 5 active node is due to energy exhaustion or communication link fails can not communicate with other node, then this active node is death nodes, gateway node can find death nodes immediately, and not finishing the work on death nodes is re-assigned on other ordinary nodes.
Accompanying drawing explanation
Fig. 1 is wireless sensor network structure chart;
Fig. 2 is gateway node allocating task flow chart;
Fig. 3 is ordinary node task immigration flow chart;
Fig. 4 is the flow chart that gateway node divides ordinary node integral level.
Embodiment
Below in conjunction with the drawings and specific embodiments, the present invention is further detailed explanation, is not practical range of the present invention is confined to this.As shown in Figure 1:
Wireless sensor network generally includes a gateway node and some ordinary nodes, is formed by wireless multi-hop link.Gateway node disposal ability is powerful, has enough supplies of electric power.Ordinary node finite energy, does not have supply of electric power.Ordinary node is isomery, shows as processing speed difference, and node energy is different, but transmission characteristic is thought identical.Ordinary node random arrangement, once after arranging, just no longer moves.
Fig. 2,3,4 shows the method for allocating tasks based on genetic algorithm and integration incentive mechanism based on above-mentioned wireless sensor network, wherein gateway node exchanges the service of ordinary node for by being supplied to ordinary node reward on total mark, each subtask is made to be assigned on most suitable node, under the prerequisite meeting time limit task time, total number of points that gateway node is spent is minimum, thus complete all subtasks, specifically comprise following steps:
Step one, gateway node receive an application instruction, and the application in this instruction can be broken down into multiple complementary subtask, describes with directed acyclic graph DAG task image G=(T, E), the summit set T={T of DAG task image
1, T
2..., T
nrepresent, representative needs the subtask performed, and n represents the number of subtask, and there is a time restriction deadline each subtask, and the execution of subtask must complete before the deadline specified, the limit E={E of DAG task image
1, E
2..., E
grepresent, represent the data dependence between subtask or control to rely on, g represents the number on the limit of DAG task image, if from summit T
ito summit T
jthere is a directed edge E
ij, then subtask T is described
jexecution need subtask T
ioutput data; Gateway node adopt genetic algorithm the subtask in DAG task image is managed and distributes, concrete task management and distribution method as follows:
(1) stochastic generation allocative decision and chromosome, builds chromosome congression S
Use S={C
1, C
2..., C
xrepresent all allocative decisions and chromosomal set, wherein C is a candidate scheme, and x is the number of all candidate schemes; Gateway node stochastic generation x allocative decision, each allocative decision is exactly a chromosome, and each chromosome 3 × n matrix C represents, n represents the total task number in DAG task image, (the T in Matrix C the first row
1... T
i... T
n) representing subtask to be allocated, its order from left to right determines according to tasks carrying order in DAG task image, Matrix C second row (V
1... V
j... V
m) represent subtask map node, Matrix C the third line (ω
1... ω
i... ω
n) representing the amount of calculation of subtask, chromosome Matrix C is as follows:
(2) communication matrix E is built
Data transmission relations between task 3 × g matrix E represents i.e. communication matrix, and g is the sum on the limit of DAG task image, each row first element T in matrix E
iexpression task transmit leg, second element T
jfor task recipient, the 3rd element l
ijfor task T
iand T
jbetween transmit the size of data, a certain row of communication matrix E are as follows:
(2) the total reward points of chromosome is calculated
The reward points that every bar chromosome produces
refer to that gateway node is by certain chromosome C
kwhen carrying out task matching, complete the summation of the reward points paid needed for all subtasks in DAG task image:
Wherein, T
i∈ T represents all subtasks in DAG task image, V
j∈ C
krepresent chromosome C
kin involved all ordinary nodes.
for node V
jfinish the work T
irequired reward points;
(3) the chromosome deadline is calculated
Chromosome deadline WT (C
k) refer to that gateway node is by certain chromosome C
kwhen carrying out task matching, complete the time span required for all subtasks in DAG task image.
(4) construct fitness function, chromosome performance is assessed
Fitness represents chromosomal quality, fitness is higher, this chromosome is more excellent, then chromosome survival probability is higher, chromosomal fitness is calculated by structure fitness function, the structure target of fitness function finds total reward points little, the chromosome that the deadline is short, and fitness function is as follows:
Wherein, fit (C
i) be chromosome C
ifitness,
be the minimum value of total reward points in chromosome congression S, MIN_WT (S) is the minimum value of deadline in chromosome congression S, and β is customized parameter, regulates total reward points and the deadline weight in fitness function.
Calculate each chromosomal fitness, be stored in performance rate table by the fitness of chromosomal for x bar No. ID and correspondence and be used for classification and identifying, the descending by adaptive value in performance rate table sorts, and the chromosome that fitness is high comes the top of table;
(5) genetic manipulation is carried out to chromosome
1) operation is inherited
In performance rate table, before x chromosome, y% inherits in chromosome congression of future generation, and all the other x × (1-y%) bar chromosome produces through selection, intersection, variation step, and y% represents chromosomal excellent rate, wherein y ∈ [1,100];
2) operation is selected:
In performance rate table, select the interlace operation that two chromosomes carry out below, thus produce new chromosome, adopt the mode of roulette, chromosomal fitness is higher, higher by the probability selected;
3) interlace operation
Two the chromosome Matrix C selected
1and C
2as former generation's chromosome, interlace operation is to former generation's chromosome Matrix C
1and C
2carry out part restructuring, produce offspring's chromosome C
3and C
4, in interlace operation, chromosome matrix the first row remains unchanged, constant to ensure tasks carrying order, in former generation's chromosome Matrix C
1and C
2second row is selected a bit as crosspoint, Matrix C
1and C
2part behind second row crosspoint exchanges, thus produces offspring's chromosome Matrix C
3and C
4, calculate offspring's chromosome Matrix C
3and C
4fitness, and be stored in the relevant position of performance rate table;
4) mutation operation
Comprise two kinds of mutational formats, mode is a) sudden change of task based access control, and each chromosome has λ probability, by Stochastic choice duty mapping on another node; Or adopt mode b) based on chromosomal sudden change, the new chromosome that each chromosome has λ probability to be randomly generated is completely alternative, and wherein λ represents mutation rate, λ ∈ (0,1);
(5) said process is after the iterative operation of certain number of times, and gateway node selects the chromosome being in top as current allocative decision in performance rate table;
The ordinary node related in the allocative decision that step 2, gateway node are selected is active node, and active node, according to the nodal integration exchange rate and energy consumption of finishing the work, obtains associated quad; The described integration exchange rate is used
represent, be that node consumption unit energy should obtain integration, embody the cost performance that node is finished the work; Described integration is used to the history performance that measurement node is finished the work, and can increase the participation that node is executed the task, carry out quantizing examination, line item of going forward side by side with integration to the performance that node is finished the work, and be divided into reward points and punishment integration, described reward points is used
represent, punishment integration is used
represent; if the task of being successfully completed; corresponding reward points can be obtained; if finish the work unsuccessful, can be deducted and punish integration accordingly, described reward points refers to that node can obtain corresponding integration after being successfully completed task; described punishment integration refers to that node is unsuccessful and finishes the work; deduct corresponding integration, the integration summation that node is got up by accumulation of finishing the work is called total mark, uses
represent;
The detailed process obtaining integration is as follows:
First, ordinary node V
jfinish the work T in mandatory period deadline
i, think ordinary node V
jbe successfully completed task T
i, ordinary node V
jautomatic acquisition
individual reward points, and upgrade ordinary node V
jdump energy, total mark and the integration exchange rate, return to gateway node together with task result.Gateway node upgrades the dump energy of this ordinary node in node level table, total mark and the integration exchange rate;
Secondly, ordinary node V
jfail to finish the work T in mandatory period deadline
i, think ordinary node V
jfail the T that finishes the work
i, ordinary node V
jautomatically deduct in original total mark
individual punishment integration, ordinary node V
jupgrade dump energy, total mark and the integration exchange rate, send gateway node to by regular reporting, gateway node upgrades the dump energy of this ordinary node in node level table, total mark and the integration exchange rate;
The concrete computational process of integration is as follows:
First, the computing node integration exchange rate
represent ordinary node V
joften consume the energy of a joule, the reward points that should obtain, relevant with residue energy of node, node total mark, the nodal integration exchange rate is expressed as:
wherein
for ordinary node V
jdump energy,
for node V
jtotal mark;
Secondly, computing node is finished the work energy consumption, comprises and calculates energy consumption and communication energy consumption;
Wherein,
expression task T
iat ordinary node V
jon wastage in bulk or weight,
expression task T
iat ordinary node V
jon calculating consumption,
expression task T
iat ordinary node V
jon communication consumption;
Calculate and consume:
represent ordinary node V
javerage energy consumption,
expression task T
iat ordinary node V
jon time of implementation,
expression task T
iamount of calculation,
represent ordinary node V
jexecution speed;
Communication consumes:
wherein,
represent ordinary node V
jfor the T that finishes the work
ienergy consumption needed for transmission packet,
represent ordinary node V
jfor the T that finishes the work
ireceive energy consumption needed for packet.
L represents the data package size of transmission, and d represents the distance of sending node and receiving node, ξ
elec, ξ
fs, ξ
mphardware-related parameter, d
0for preset parameter;
Again, node tasks reward points
i.e. ordinary node V
jbe successfully completed task T
ithe integration that should obtain is:
Wherein
for ordinary node V
jthe integration exchange rate,
for ordinary node V
jfinish the work T
itotal power consumption;
Again, node tasks punishment integration
i.e. ordinary node V
jthe unsuccessful T that finishes the work
ithe integration that should deduct is:
Wherein β is customized parameter;
Finally, computing node total mark
ordinary node V
jthe integration summation that accumulation of finishing the work is got up, namely all reward points sums deduct all punishment integration sums;
Wherein, V
j(T) be ordinary node V
jall tasks of upper distribution, T
sordinary node V
jon the task of being successfully completed, T
fordinary node V
jupper unsuccessful completing of task;
Step 3, gateway node construct an ordinary node integral level according to the total mark of ordinary node and these two factors of quantity of finishing the work
represent the quality that node history is finished the work, according to
node is divided into two-stage by value: senior ordinary node and rudimentary ordinary node; Senior ordinary node represents that quantity of finishing the work is many, quality good, can provide the node of corresponding better service quality; Rudimentary ordinary node represents the node providing service quality not high; Concrete classification process is as follows:
(3a) ordinary node integral level is calculated
ordinary node V
jthe evaluation of the effect of finishing the work, receives an assignment several relevant with the total mark of ordinary node and ordinary node; Ordinary node V
jthe integral level of Processing tasks can be expressed as:
Wherein,
represent ordinary node V
jtotal mark,
represent and be assigned to ordinary node V
jthe reward points summation of all tasks,
represent ordinary node V
jon the task quantity that is assigned to, N
totalrepresent the total quantity of the task that gateway node distributes;
(3b) node level divides: gateway node is to ordinary node integral level
sort, represent that senior ordinary node accounts for the ratio of all ordinary nodes with α, ordinary node integral level
the node division coming front α is senior ordinary node, and all the other ordinary nodes are divided into rudimentary ordinary node, and α dynamic regulates, α ∈ (0,1);
(4c) gateway ordinary node grade classification is good after, form ordinary node table of grading, in table, record No. ID, ordinary node, corresponding grade, ordinary node integral level
the nodal integration exchange rate, gateway node sends the message of grade residing for each ordinary node to ordinary node, and each ordinary node knows grade residing for oneself;
(4d) after each ordinary node processes task, self total mark, Processing tasks number all can change, and after setting-up time time, or when new application instruction arrives gateway node, gateway node need recalculate ordinary node integral level
grade is repartitioned to ordinary node, thus upgrade ordinary node table of grading, the ordinary node that message only sends to grade to change by gateway node, thus minimizing communication overhead, if the grade of ordinary node with change before, grade after the ordinary node that then gateway node transmission news grade changes upgrades, if ordinary node grade does not change, then gateway node does not send message to this ordinary node.
If step 4 active node itself fail or be subject to other malicious nodes attack, namely unstable node is thought, if unstable node has not complete task, need the cooperation being exchanged for other ordinary nodes by the mode of redeem points, thus by task immigration on other ordinary nodes;
The process that unstable node redeem points seeks the cooperation of other ordinary nodes adopts auction mechanism, and improve auction formats, specific tasks transition process is as follows:
First, executing the task when the ordinary node discovery oneself of body is for unstable node when having, can not continue to perform the task of having distributed, so initiate the successor node that task is found in an auction, unstable node V
failurerepresent, the task T that unstable node does not complete
failurerepresent; Unstable node V
failuretender Tender (T is sent to other ordinary nodes as bid node
failure, deadline, Point
budget), include task description in bidding documents, mandatory period, and this node is the maximum budget Point that this task is paid
budget, maximum budget equals the total mark of this node
Secondly, when ordinary node receives tender Tender (T
failure, deadline, Point
budget) after, just according to the requirement in tender, own situation is passed judgment on, determine whether participating in competitive bidding, if do not participate in just refusing action, if participate in just providing quotation according to own situation; Determine that the process whether participating in competitive bidding is as follows:
First competitive bidding node considers time limit task time factor, if competitive bidding node has had original task of distributing, and the Estimated Time Of Completion of new task is greater than official hour time limit deadline in bidding documents, then do not participate in competitive bidding;
If competitive bidding node Estimated Time Of Completion is less than or equal to official hour time limit deadline in bidding documents, then calculate this task integration price
Wherein
for competitive bidding node V
jthe integration exchange rate,
for competitive bidding node V
jfinish the work T
failuretotal power consumption;
If the integration price that competitive bidding node is finished the work is greater than the budget in bidding documents, namely
then this competitive bidding node does not participate in competitive bidding,
If the integration price that competitive bidding node is finished the work is less than or equal to the budget in bidding documents, namely
then this competitive bidding node can participate in competitive bidding, and
as tender price;
(5c) bidding strategy of staggering the time is adopted when competitive bidding node is submitted a tender, namely different according to competitive bidding node place grade, thus make its bid time different, if competitive bidding node is senior ordinary node, then at time t
1inside submit a tender, if competitive bidding is rudimentary ordinary node, then at time t
2inside submit a tender, t
2> t
1, namely senior ordinary node has larger bid priority than rudimentary ordinary node;
Again, the competitive bidding node that bid sensor selection problem tender price is minimum is as acceptance of the bid node.After acceptance of the bid node is determined, bid node V
failureby task T
failureacceptance of the bid node is given in migration, deducts in total mark
individual integration.And report Report using the total mark after renewal, the integration exchange rate, acceptance of the bid node, migration mission bit stream as accident
emergencybe uploaded to gateway node;
Again, gateway node upgrades node level table again;
Again, acceptance of the bid node is executed the task, and obtains after being successfully completed task
individual reward points, and task result is returned to gateway node;
Finally, if at t
2without ordinary node acceptance of the bid in time, unstable node V
failureby task T
failureas accident report Report
emergencybe uploaded to gateway node, by gateway node by task T
failureassignment of allocation on other ordinary nodes, unstable node V
failurededuction punishes integration accordingly;
If step 5 active node is due to energy exhaustion or communication link fails can not communicate with other ordinary node, then this active node is called death nodes, gateway node can find death nodes immediately, and is re-assigned on other ordinary nodes by not finishing the work on death nodes;
Detailed process is as follows:
First, ordinary node needs regularly to send regular reporting Report to gateway node
periodic, comprise dump energy, total mark, integration exchange rate information, gateway node is according to regular reporting Report
periodic, regular update node level table;
Secondly, if at the appointed time, the regular reporting Report of certain ordinary node is not received
periodic, do not receive the accident report Report of this ordinary node yet
emergency, gateway node assert that this ordinary node is dead;
Finally, gateway node judges whether this death nodes there is not completing of task, if do not had, just directly upgrades node level table, is deleted by this node from table; If there is not completing of task, after first this not being finished the work and is redistributed, then upgrade node level table.
Above execution mode is only for illustration of the present invention; and be not limitation of the present invention; person skilled in the relevant technique; when not departing from the inventive method and scope; can also make a variety of changes; therefore all equivalent technical schemes also belong to category of the present invention, and scope of patent protection of the present invention should be defined by the claims.
Claims (2)
1. a wireless sensor network, comprises a gateway node and multiple ordinary node, it is characterized in that:
Described gateway node and ordinary node link in the mode of wireless multi-hop and form, and gateway node has supply of electric power, and ordinary node does not have supply of electric power, ordinary node random arrangement, once after arranging, just no longer move.
2. in wireless sensor network as claimed in claim 1 based on a method for allocating tasks for genetic algorithm and incentive mechanism, it is characterized in that:
Step one, gateway node receive an application instruction, and the application in this instruction can be broken down into multiple complementary subtask, describes with DAG task image G=(T, E), the summit set T={T of DAG task image
1, T
2..., T
nrepresent, representative needs the subtask performed, and wherein n represents the number of subtask, and there is a time restriction deadline each subtask, and the execution of subtask must complete before the deadline specified, the limit E={E of DAG task image
1, E
2..., E
grepresent, represent the data dependence between subtask or control to rely on, wherein g represents the number on the limit of DAG task image, if from summit T
ito summit T
jthere is a directed edge E
ij, then subtask T is described
jexecution need subtask T
ioutput data; Gateway node adopts genetic algorithm manage the subtask in DAG task image and distribute, and concrete grammar is as follows:
(1) stochastic generation allocative decision and chromosome, builds chromosome congression S
Use S={C
1, C
2..., C
xrepresent all allocative decisions and chromosomal set, wherein C is a candidate scheme, and x is the number of all candidate schemes; Gateway node stochastic generation x allocative decision, each allocative decision is exactly a chromosome, and each chromosome 3 × n matrix C represents, n represents the total task number in DAG task image, (the T in Matrix C the first row
1... T
i... T
n) be subtask to be allocated, its order from left to right determines according to tasks carrying order in DAG task image, Matrix C second row (V
1... V
j... V
m) represent subtask map node, Matrix C the third line (ω
1... ω
i... ω
n) representing the amount of calculation of subtask, chromosome Matrix C is as follows:
(2) communication matrix E is built
Data transmission relations between task 3 × g matrix E represents i.e. communication matrix, and g is the sum on the limit of DAG task image, each row first element T in matrix E
iexpression task transmit leg, second element T
jfor task recipient, the 3rd element l
ijfor task T
iand T
jbetween transmit the size of data, wherein row of communication matrix E are as follows:
(3) the total reward points of chromosome is calculated
The reward points that every bar chromosome produces
refer to that gateway node is by certain chromosome C
kwhen carrying out task matching, complete the summation of the reward points paid needed for all subtasks in DAG task image:
Wherein, T
i∈ T represents all subtasks in DAG task image, V
j∈ C
krepresent chromosome C
kin involved all ordinary nodes,
for node V
jfinish the work T
irequired reward points;
(4) the chromosome deadline is calculated
Chromosome deadline WT (C
k) refer to that gateway node is by certain chromosome C
kwhen carrying out task matching, complete the time span required for all subtasks in DAG task image;
(5) construct fitness function, chromosome performance is assessed
Fitness represents chromosomal quality, fitness is higher, this chromosome is more excellent, then chromosome survival probability is higher, chromosomal fitness is calculated by structure fitness function, the structure target of fitness function finds total reward points little, the chromosome that the deadline is short, and fitness function is as follows:
Wherein, fit (C
i) be chromosome C
ifitness,
be the minimum value of total reward points in chromosome congression S, MIN_WT (S) is the minimum value of deadline in chromosome congression S, and β is customized parameter, regulates total reward points and the deadline weight in fitness function;
Calculate each chromosomal fitness, be stored in performance rate table by the fitness of chromosomal for x bar No. ID and correspondence and be used for classification and identifying, the descending by adaptive value in performance rate table sorts, and the chromosome that fitness is high comes the top of table;
(6) genetic manipulation is carried out to chromosome
1) operation is inherited
In performance rate table, before x chromosome, y% inherits in chromosome congression of future generation, and all the other x × (1-y%) bar chromosome produces through selection, intersection, variation step, and y% represents chromosomal excellent rate, wherein y ∈ [1,100];
2) operation is selected:
In performance rate table, select the interlace operation that two chromosomes carry out below, thus produce new chromosome, adopt the mode of roulette, chromosomal fitness is higher, higher by the probability selected;
3) interlace operation
Two the chromosome Matrix C selected
1and C
2as former generation's chromosome, interlace operation is to former generation's chromosome Matrix C
1and C
2carry out part restructuring, produce offspring's chromosome C
3and C
4, in interlace operation, chromosome matrix the first row remains unchanged, constant to ensure tasks carrying order, in former generation's chromosome Matrix C
1and C
2second row is selected a bit as crosspoint, Matrix C
1and C
2part behind second row crosspoint exchanges, thus produces offspring's chromosome Matrix C
3and C
4, calculate offspring's chromosome Matrix C
3and C
4fitness, and be stored in the relevant position of performance rate table;
4) mutation operation
Comprise two kinds of mutational formats, mode is a) sudden change of task based access control, and each chromosome has λ probability, by Stochastic choice duty mapping on another node; Or adopt mode b) based on chromosomal sudden change, the new chromosome that each chromosome has λ probability to be randomly generated is completely alternative, and wherein λ represents mutation rate, λ ∈ (0,1);
(7) said process is after the iterative operation of certain number of times, and gateway node selects the chromosome being in top as current allocative decision in performance rate table;
The ordinary node related in the allocative decision that step 2, gateway node are selected is active node, and active node obtains associated quad according to the nodal integration exchange rate and energy consumption of finishing the work;
Wherein, integration is used to the history performance that measurement node is finished the work, and for increasing the participation that node is executed the task, carry out quantizing examination with integration to the performance that node is finished the work, line item of going forward side by side, integration comprises reward points
with punishment integration
wherein T
i∈ T represents all subtasks in DAG task image; If active node is successfully completed task, corresponding reward points can be obtained
finish the work if unsuccessful, can be deducted and punish integration accordingly
the integration summation that active node is got up by accumulation of finishing the work is total mark
total mark
ordinary node V
jthe integration summation that accumulation of finishing the work is got up, namely all reward points sums deduct all punishment integration sums:
Wherein, V
j(T) be ordinary node V
jall tasks of upper distribution, T
sordinary node V
jon the task of being successfully completed, T
fordinary node V
jupper unsuccessful completing of task;
The described integration exchange rate is that node consumption unit energy should obtain integration, and it embodies the cost performance that node is finished the work, and uses
Represent, wherein
for ordinary node V
jdump energy,
for node V
jtotal mark;
Step 3, gateway node, according to the total mark of ordinary node and quantity of finishing the work, construct ordinary node integral level
it represents the quality that ordinary node history is finished the work, according to
ordinary node is divided into senior ordinary node and rudimentary ordinary node by value, and senior common joint is than the task quantity performed of rudimentary ordinary node and better quality; Concrete partition process is as follows:
(1) ordinary node integral level is calculated
ordinary node V
jthe evaluation of the effect of finishing the work and the total mark of ordinary node and ordinary node receive an assignment several relevant, ordinary node V
jthe integral level of Processing tasks is expressed as follows:
Wherein,
represent ordinary node V
jthe total mark of finishing the work,
represent and be assigned to ordinary node V
jthe reward points summation of all tasks,
represent ordinary node V
jon the task quantity that is assigned to, N
totalrepresent the total quantity of the task that gateway node distributes;
(2) ordinary node grade classification: gateway node is to ordinary node integral level
sort, represent that senior ordinary node accounts for the ratio of all ordinary nodes with α, ordinary node integral level
the node division coming front α is senior ordinary node, and all the other ordinary nodes are divided into rudimentary ordinary node, and α dynamic regulates, α ∈ (0,1);
(3) gateway node ordinary node grade classification is good after, form ordinary node table of grading, in this table of grading, record No. ID, ordinary node, grade, ordinary node integral level that ordinary node is corresponding
with the ordinary node integration exchange rate, gateway node sends the message of grade residing for each ordinary node to each ordinary node, makes each ordinary node know grade residing for self;
(4) after each ordinary node processes task, self total mark, Processing tasks number all can change, after setting-up time or when new application instruction arrives gateway node, gateway node recalculates ordinary node integral level
grade is repartitioned to ordinary node, thus upgrades ordinary node table of grading; The ordinary node that message only sends to grade to change by gateway node, to reduce communication overhead, if the grade of ordinary node changes compared with before, grade after the ordinary node that then gateway node transmission message informing grade changes upgrades, if ordinary node grade does not change, then gateway node does not send message to this ordinary node;
If step 4 active node itself fail or be subject to other malicious nodes attack, it is then unstable node, if this unstable node has not complete task, exchanged for the cooperation of other ordinary nodes by the mode of redeem points, thus by task immigration on other ordinary nodes;
If step 5 active node is due to energy exhaustion or communication link fails can not communicate with other node, then this active node is death nodes, gateway node can find death nodes immediately, and not finishing the work on death nodes is re-assigned on other ordinary nodes.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410765158.8A CN104540171B (en) | 2014-12-15 | 2014-12-15 | A kind of node tasks distribution method in wireless sensor network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410765158.8A CN104540171B (en) | 2014-12-15 | 2014-12-15 | A kind of node tasks distribution method in wireless sensor network |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104540171A true CN104540171A (en) | 2015-04-22 |
CN104540171B CN104540171B (en) | 2017-09-08 |
Family
ID=52855604
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410765158.8A Active CN104540171B (en) | 2014-12-15 | 2014-12-15 | A kind of node tasks distribution method in wireless sensor network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104540171B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105577541A (en) * | 2015-12-21 | 2016-05-11 | 东北大学 | Dynamic gaming excitation method based on node dependence |
CN107832150A (en) * | 2017-11-07 | 2018-03-23 | 清华大学 | A kind of calculating task dynamic partition strategy |
CN109062272A (en) * | 2018-09-05 | 2018-12-21 | 佛山铮荣科技有限公司 | Rice irrigation intelligent observing and controlling system |
CN111130916A (en) * | 2018-10-31 | 2020-05-08 | 中国电信股份有限公司 | Network quality detection method and management device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101459915A (en) * | 2008-12-31 | 2009-06-17 | 中山大学 | Wireless sensor network node coverage optimization method based on genetic algorithm |
US7613165B2 (en) * | 2005-12-05 | 2009-11-03 | Electronics And Telecommunications Research Institute | Method for selecting broadcast routing path using genetic algorithm in Ad-hoc network |
CN104506576A (en) * | 2014-12-03 | 2015-04-08 | 常州大学 | Wireless sensor network and node task migration method thereof |
-
2014
- 2014-12-15 CN CN201410765158.8A patent/CN104540171B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7613165B2 (en) * | 2005-12-05 | 2009-11-03 | Electronics And Telecommunications Research Institute | Method for selecting broadcast routing path using genetic algorithm in Ad-hoc network |
CN101459915A (en) * | 2008-12-31 | 2009-06-17 | 中山大学 | Wireless sensor network node coverage optimization method based on genetic algorithm |
CN104506576A (en) * | 2014-12-03 | 2015-04-08 | 常州大学 | Wireless sensor network and node task migration method thereof |
Non-Patent Citations (1)
Title |
---|
张锋辉: "无线传感器网络粮情监测组网研究", 《中国博士学位论文全文数据库信息科技辑》 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105577541A (en) * | 2015-12-21 | 2016-05-11 | 东北大学 | Dynamic gaming excitation method based on node dependence |
CN107832150A (en) * | 2017-11-07 | 2018-03-23 | 清华大学 | A kind of calculating task dynamic partition strategy |
CN109062272A (en) * | 2018-09-05 | 2018-12-21 | 佛山铮荣科技有限公司 | Rice irrigation intelligent observing and controlling system |
CN111130916A (en) * | 2018-10-31 | 2020-05-08 | 中国电信股份有限公司 | Network quality detection method and management device |
CN111130916B (en) * | 2018-10-31 | 2022-02-08 | 中国电信股份有限公司 | Network quality detection method and management device |
Also Published As
Publication number | Publication date |
---|---|
CN104540171B (en) | 2017-09-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104506576A (en) | Wireless sensor network and node task migration method thereof | |
Xu et al. | Multi-objective artificial bee colony algorithm for multi-stage resource leveling problem in sharing logistics network | |
Trivedi et al. | Hybridizing genetic algorithm with differential evolution for solving the unit commitment scheduling problem | |
García-Álvarez et al. | Metaheuristics for solving a real-world electric vehicle charging scheduling problem | |
CN104102544A (en) | Multi QoS (quality of service)-constrained parallel task scheduling cost optimizing method under mixed cloud environment | |
CN108182109B (en) | Workflow scheduling and data distribution method in cloud environment | |
CN104572297B (en) | A kind of Hadoop job scheduling methods based on genetic algorithm | |
CN111325356A (en) | Neural network search distributed training system and training method based on evolutionary computation | |
CN104540171A (en) | Wireless sensor network and node task distribution method thereof | |
CN104077634B (en) | active-reactive type dynamic project scheduling method based on multi-objective optimization | |
Durgadevi et al. | Resource allocation in cloud computing using SFLA and cuckoo search hybridization | |
CN110097190B (en) | Crowd sensing task allocation method based on double time limits | |
Pizzocaro et al. | A distributed architecture for heterogeneous multi sensor-task allocation | |
Kang et al. | An enhanced model for the integrated production and transportation problem in a multiple vehicles environment | |
CN106650993B (en) | Dynamic resource optimization method based on Markov decision process | |
CN101944157A (en) | Biological intelligence scheduling method for simulation grid system | |
CN111885551B (en) | Selection and allocation mechanism of high-influence users in multi-mobile social network based on edge cloud collaborative mode | |
CN104869154A (en) | Distributed resource scheduling method for balancing resource credibility and user satisfaction | |
Zhang et al. | Individualized requirement-driven multi-task scheduling in cloud manufacturing using an extended multifactorial evolutionary algorithm | |
CN108664318A (en) | Computation migration method and server-side, boundary server-side for computation migration | |
CN110837950B (en) | Dynamic scheduling method of RGV (traffic volume group) trolley | |
CN115421885B (en) | Distributed multi-target cloud task scheduling method and device and cloud service system | |
CN116843121A (en) | Mobile crowd sensing task allocation method and management system based on level matching degree | |
Tripathi et al. | An ant based simulation optimization for vehicle routing problem with stochastic demands | |
Suma et al. | Study on multi-task oriented service composition and optimization problem of customer order scheduling problem using fuzzy min-max algorithm |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right |
Effective date of registration: 20220218 Address after: 213000 room 403-1, building 16, Tian'an Digital City, Wujin national high tech Industrial Development Zone, Changzhou City, Jiangsu Province Patentee after: Changzhou Chuxin Culture Technology Co.,Ltd. Address before: Gehu Lake Road Wujin District 213164 Jiangsu city of Changzhou province No. 1 Patentee before: CHANGZHOU University |
|
TR01 | Transfer of patent right |