A kind of wireless body area network route method based on Region dividing
Technical field
The present invention relates to a kind of wireless body area network cluster routing method based on Region dividing, mainly utilize the method for Region dividing to improve wireless body area network nodal information efficiency of transmission, belong to the interleaving techniques field of computer network, wireless body area network and embedded system.
Background technology
The progress of microelectronics, computer and wireless communication technology, promote the fast development of low-power consumption Multifunction Sensor, make it can integrated information collection in micro volume, data processing, with several functions such as radio communications, wireless sensor network is the ad hoc network system of the multi-hop formed by communication by the sensor node be deployed in monitored area, its objective is the information of perceptive object in collaborative sensing, acquisition and processing network's coverage area, and sends to observer.Information world in logic and physical world objectively merge by wireless sensor network, change the mankind and natural interactive mode, are listed in one of the ten large technology in the 21 century change world.Wireless sensor network is the Comprehensive Science research field of a multi-crossed disciplines, can can monitor in real time the information of the various environment in its distributed areas and detected object, perception and collection, these information can also be processed, wirelessly send by aggregation node, be transferred to monitoring host computer or needing to use the user of these information.
Wireless sensor network development rapidly, can be widely used in public safety, ecological, environmental protective, environment measuring, emergency command and biomedical sector.Sensor technology early has application at biomedical sector, but does not bring great convenience.Traditional medical monitoring, uses wired transducer, and these transducers are delivered to medical centre physiological data and other information, reach the effect of monitoring.But this medical monitoring systems limits the mobility of monitored object, for the object that those need to carry out for a long time medical monitoring and health care, also have impact on the normal life of people.The introducing of wireless technology, makes modern health care field have fast development.Medical sensor is worn on human body or is implanted in human body, monitoring obtains the medical data of patient, by the radio-frequency technique of low-power consumption, these medical datas are sent to convergence center, carry out the process of data by aggregation node or be sent to medical monitoring center, such sensor network is exactly wireless body area network.Compared with common sensor network, due to the introducing of human body medium and the particularity of medical application, this network has specific requirement in scale, reliability, continuation etc., and certain power saving is also the problem of wireless body area network overriding concern.
Adopting in cluster structured wireless body area network, bunch head to bear Data Collection, polymerization process and bunch between forwarding task, its power consumption is much larger than a bunch member node.In order to the energy consumption of equalizing network interior joint, cluster wireless body area network generally runs by wheel, carry out a bunch great wheel and change when often wheel starts, energy expense is evenly distributed to each node in the mode of serving as bunch head in turn by node, carries out communication and cluster-level routing repeatedly bunch afterwards; In bunch, communication generally connects people's scheduling based on time division multiple access, and bunch head is that each member node distributes different communication time slots.Communication Jamming between adjacent cluster is generally dispatched by two-layer TDMA or multichannel is avoided; Data retransmission general carrier sense multiple access between bunch head meets people to avoid channel contention.Therefore bunch in most of cluster wireless body area network, bunch member is with single-hop mode and bunch head communication, and in, communication generally does not exist routing issue, and between bunch head, then mostly employing multi-hop mode carries out transfer of data, and therefore bunch head Routing Protocol is indispensable.And, under the two-layer data-collecting mode of cluster wireless body area network, primary cluster parting by failure the sensing data of a bunch of a period of time will be caused all to lose, therefore bunch parting is by most important in clustering wireless sensor network.
Summary of the invention
Technical problem: the characteristic of cluster wireless body area network makes its bunch of parting face a lot of problem by design, current a lot of bunches of head selection modes can cause following result: the distribution bunch in a network generated is even not, increase overall network energy ezpenditure, decrease the life span of network.The object of this invention is to provide a kind of wireless body area network cluster routing method based on Region dividing, select at bunch head, bunch between made improvement in data transfer mode etc., solve the problem.
Technical scheme: of the present invention based in the cluster routing method of Region dividing, cluster wireless body area network is by being worn on human body or being implanted in human body, having the distributed network that the self-organizing of uniquely identified sensor node forms, whole cellular logic to be divided into bunch, each bunch comprises leader cluster node, non-leader cluster node, and aggregation node can carry out radio communication, receive and dispatch human body information with all the sensors node.
Wireless body area network route method based on Region dividing comprises following steps:
1) after all nodes of wireless body area network start, predefined bunch of head is elected to marking variable by each sensor node, a next round bunch head is elected to marking variable and is set to 0, transmits oneself mark, present energy and location coordinate information to aggregation node; The all nodes of described wireless body area network comprise aggregation node, sensor node, all the sensors node forms sub-clustering, each sub-clustering has oneself bunch interior nodes, these bunch of interior nodes comprises a bunch head, non-leader cluster node, wherein some sensor nodes are as a bunch head, and other sensor nodes are non-leader cluster nodes.
2) aggregation node to receive these information storage after sensor node information, according to the optimum bunch head number n preset, whole network area is divided into n sub regions equably, distributes a mark to each subregion;
3) after completing sub-zone dividing, in the subregion that each sensor node is divided in corresponding to it in the position of human body according to it by aggregation node, form corresponding sub-clustering, and send the mark of subregion to node;
4) aggregation node is fallen into a trap in each sub regions respectively and is calculated the center-of-mass coordinate of each sub regions, distance between the node of each sub regions and barycenter;
5) aggregation node its barycenter of chosen distance in each sub regions nearest, identify bunch head of minimum sensor node as the first run, a bunch head for this sensor node is elected to marking variable and is set to 1; The next round of this sensor node bunch head, as bunch head of next round, is elected to marking variable and is all set to 1 by the secondary near sensor node of chosen distance barycenter;
6) aggregation node is to all the sensors node broadcasts information in network, this packets of information contain each sensor node the first run home cluster, whether be the first run bunch header, whether be next round bunch header;
7) all the sensors node is stored after receiving the information coming from aggregation node, the first run bunch head whether is set to according to this information check oneself, if bunch head, be just oneself bunch in non-leader cluster node distribution time slot, generate Schedule, then the non-leader cluster node in Schedule information being sent to bunch, then enters step 8);
8) each non-leader cluster node also send to its bunch of hair the data perceived, closed communication module time not in the time slot of oneself as required according to the Schedule information that persistent collection is monitored in the time slot of oneself;
9) each bunch of head collects the data of the non-leader cluster node in all bunches, and carries out data fusion to these data, also receives other bunch of head in addition and forwards the data of coming;
10) each bunch of head by bunch in merge after data or other bunch of head forward the data come and send to aggregation node, the operation that each bunch of head adopts is as follows:
101) broadcast the mark of oneself, current energy consumption, bunch head identity information, receive and record the corresponding informance that adjacent cluster hair sends here;
102) in the neighbours' bunch head set of oneself, select other each bunch of head one by one, and calculate through the communication cost of selected bunch head to aggregation node transmission data;
103) communication cost be less than directly transfer data to aggregation node time communication cost bunch head in, select energy value maximum, identify minimum bunch head as via node, by this data retransmission this bunch of head; If there is no qualified bunch of head as via node, then directly transfer data to aggregation node;
104) by selecting via node in other bunch of head, the data mode of multi-hop is adopted to send data to aggregation node;
105) in transmission once before data, communication interaction obtains the energy of current hop node, if find this via node energy lower and can not bear forwarding task, then forwards step 103 to);
11) network one cycle of taking turns does not terminate, and enters step 8); Network one cycle of taking turns terminates, enters step 12);
12) according to task performance, aggregation node determines that whether carrying out next round bunch head selects, if task has completed or each sensor node energy loss causes network normally not run, then radio network end of run information, otherwise broadcast next round bunch head selects message, enters step 13).
13) network receives the next round bunch head selection message of aggregation node broadcast transmission, and when the time limit in next round cycle arrives, network starts next round bunch head and selects, and concrete operations are as follows:
131) first each sensor node checks the state of oneself, if this sensor node is a bunch head at epicycle task role, just oneself becomes the message of bunch head to wireless body area network broadcast, waits for that other sensor nodes add as non-leader cluster node; If node is not a bunch head at epicycle task role, just wait for that each bunch of hair send broadcast message, after have received bunch head broadcast message, bunch head that chosen distance oneself is nearest in all bunches of head set, node identification is minimum adds corresponding sub-clustering, send to this bunch of hair comprise node current remaining, the request of node identification adds information, waits for that a bunch hair send Schedule information.
132) each bunch of head receives after request that other sensor nodes send adds information, it can be used as non-leader cluster node, record the information of these non-leader cluster nodes, then calculate the average energy value of all non-leader cluster nodes in human body position and dump energy information according to these the non-leader cluster nodes received, node dump energy being greater than or equal to the average energy value forms bunch head set of a candidate, distance current cluster head node is selected nearest from bunch head set of this candidate, identify minimum node as next round bunch head, and by time slot allocation information, next round bunch head be elected to information to send to bunch in all non-leader cluster node.
133) each non-leader cluster node receives time slot allocation information that its bunch of hair come and after a next round bunch head is elected to information, if oneself be next round bunch head, the next round of oneself a bunch head is elected to marking variable and is set to 1, if oneself be not next round bunch head, the next round of oneself a bunch head is elected to marking variable and is set to 0, enter step 8).
Beneficial effect: the method for routing based on Region dividing that the present invention proposes is applicable to wireless body area network, has following beneficial effect:
(1) the inventive method makes full use of the unrestricted feature of aggregation node energy, before first run choosing bunch, network monitor Region dividing is become multiple bunches of class regions, then in each bunch, select suitable node as bunch head of next round according to node in human body position information and energy information, node average energy efficiency obviously improves.
(2) consider the suitable node of the selecting factors such as energy and cluster-level routing cost as the next-hop node of bunch head, between bunch head, transmit data to aggregation node in a multi-hop fashion, network life cycle is obviously improved.
Accompanying drawing explanation
Fig. 1 is cluster wireless BA-MWSN structural representation;
Fig. 2 is the wireless body area network route method schematic flow sheet based on Region dividing.
Embodiment
One. architecture
In concrete enforcement, all nodes in wireless body area network of the present invention are randomly dispersed in a tetragonality region, and as shown in Figure 1, and this network meets the following conditions:
(1) all nodes are distributed in wireless body area network according to human body requirements, and are all actionless.
(2) each node in network knows the position coordinates of oneself, and can know oneself present energy.
(3) all nodes except aggregation node are homogeneity isomorphisms, and primary power is equal, except the energy of aggregation node be unrestricted except, other all node energy is limited.
(4) power of node is enough large, directly can communicate with other node in network.
(5) node can calculate distance between sending node according to received signal strength.
(6) node power is controlled, recently can adjust transmitting power according to the distance with receiving node.
(7) the monitoring peripheral region of node keeps, and send image data to affiliated bunch of head in the time of oneself.
(8) data that the very near node of mutual distance collects have data dependence, so the data of adjacent node have very large redundancy, redundant data is useless for observer.
Two. method flow
Provide the more detailed description that the present invention specifically implements below:
1. bunch head is selected
Step one: each in wireless body area network node on health transmits oneself information to aggregation node i, this packets of information contains the position coordinates of the mark of node, the energy of node and node.
Step 2: aggregation node i receives by these information storage after nodal information, then according to the optimum bunch head number of pre-selected, whole wireless body area web area is divided n subdomain according to each node in human body position by operation area partitioning algorithm.
Step 3: after completing Region dividing, in the region that each node is divided in corresponding to it in the position of human body according to it by aggregation node i, and puts on area identification.
Step 4: aggregation node i falls into a trap in each sub regions respectively and calculates the center-of-mass coordinate of each sub regions, then calculates node (j, k, the l of each sub regions respectively ...) and barycenter between distance.
Step 5: the aggregation node i node that its barycenter of chosen distance is nearest in each human region is as bunch head of the first run, and the secondary near node of chosen distance barycenter is as bunch head of next round simultaneously.
Step 6: aggregation node i is to all node broadcasts information in wireless body area network, and this packets of information contains each node at the home cluster of the first run, the state (member node or leader cluster node) of node and the node identification becoming next round bunch head.
Step 7: node j is stored after receiving the information coming from aggregation node, whether be set to the first run bunch head according to this information check oneself, if bunch head, just for oneself bunch in member distribute time slot, generate Schedule, member node in then being sent to by Schedule bunch.
Step 8: leader cluster node CH broadcasts oneself information in network, sets up routing table, then enter stable data transfer phase according to the adjacent cluster head node CH1 information received.
2. next round bunch head is selected
Step one: after each node receives the broadcast message in the next round bunch head selection time limit that aggregation node sends, when the time limit in next round cycle arrives, first they check oneself state, if node a is a bunch head at epicycle task role, in wireless body area network, just broadcast the message oneself becoming bunch head, the adding of member node in waiting for bunch.
Step 2: if node b is non-leader cluster node, just wait for that each bunch of hair send broadcast message, have received a bunch head broadcast message, bunch head that just chosen distance oneself is nearest in all bunches of head set, as bunch head wanting to add, then send to this bunch of hair the information of joining request.This packets of information contains the current dump energy of node and mark, then waits for that a bunch hair send time slot allocation information.
Step 3: bunch head a receive node send request add information after, record the information of each node.Then calculate the average energy value of this bunch of member node in human body position and dump energy information according to the node received, node dump energy being greater than or equal to the average energy value forms a candidate cluster head node set.The nearest node of distance current cluster head node is selected as next round formal bunch of head from this candidate cluster head set of node.Member node in this information being sent to bunch along band when sending time slots allocation table.
The next round of oneself bunch leader will is set to 1 or 0, in the time slot of oneself, then send the data of perception according to Schedule as required to bunch hair after receiving the next Schedule of bunch hair and next polling bunch information by step 4: member node j.
3. Route establishment
Step one: each leader cluster node CH (1,2,3..), when aggregation node carries out data transmission, adopts the data mode of multi-hop to send data to aggregation node by selecting via node.
Step 2: in concrete enforcement, when choosing via node, if the energy of node is lower, just no longer serves as via node, selecting next via node by rotation.
Step 3: in concrete enforcement, assuming that described node communication uses free space model, distance between node between communication cost and node square proportional, node b wants to transmit data to aggregation node i, first it select each leader cluster node one by one in the neighbours' leader cluster node set of oneself, and calculate through the communication cost of this node to aggregation node transmission data.Transmission path cost through via node is less than the node composition both candidate nodes collection of direct transmission cost.Then the energy value of more each node and the size of this node energy value successively in both candidate nodes set, will be more than or equal to the node of this node energy value as formal relaying bunch head.If bunch head having multiple energy large all satisfies condition, then select energy value maximum as relaying bunch head.If candidate cluster head set for not having qualified bunch of head in empty or the set of candidate leader cluster node, then directly transfers data to aggregation node.
4. transfer of data
In concrete enforcement, each takes turns after a bunch head determines, bunch head according to bunch in membership be that in each bunch, member distributes time slot.Then, member in the slot table distributed sends to bunch by bunch head, the information of bunch head broadcast oneself sets up cluster-level routing path.After a bunch establishment stage completes, path bunch between head and bunch head has just been set up, member node persistent collection ambient condition information in bunch, is then distributing to bunch head in the time slot to oneself, the data of collection being sent to this member node place bunch in the mode that jumps.Node not in the transmission time of oneself with regard to closed communication module to reduce energy ezpenditure.The data collected, after the data receiving all bunches of interior nodes, are carried out data fusion by bunch head, then the data after merging are transferred to aggregation node.Within the time period that one takes turns, stable data transfer phase will be longer than a bunch establishment stage.Collecting data each time bunch is a frame, often takes turns transmit stage and carries out multiframe Data Collection, will reduce bunch number of times set up like this, will more multi-energy be used for above transfer of data, and improve capacity usage ratio.
In concrete enforcement, after transfer of data runs a period of time, according to task performance, aggregation node determines that whether carrying out next round bunch head selects, if task has completed or node energy loss causes network normally not run, then radio network ending message, otherwise the time limit that next round bunch head is selected is carried out in broadcast.