Background technology
Wireless sensor network has boundless application prospect as the interface of real world and digital world in fields such as military affairs, industrial or agricultural, city management, digital building, environmental monitoring, rescue and relief work, deathtrap remote monitoring.
The MAC agreement is one of key network agreement that guarantees the wireless sensor network efficient communication, the occupation mode of its decision wireless channel, between sensor node, distribute limited radio channel resource, be used for making up the underlying basis framework of wireless sensor network system, the performance of wireless sensor network is had very important influence.
At present, the wireless sensor network MAC agreement mainly contains three classes: the first kind is based on the MAC agreement of competition; Its basic thought is when data need send, and sensor node is by the competition access channel; If clash, then adopt certain strategy to resend data, send success or abandon transmission until data.This quasi-protocol adopts the carrier sense mode of operation usually, and in conjunction with collision avoidance mechanism, handshake with keep out of the way the possibility that access mechanism reduces conflict.Its advantage be agreement simple, can expand; Shortcoming is to have problems such as collision, cross-talk, fairness difference and channel utilization are low.Second class is based on the MAC agreement of scheduling; Its basic thought be adopt certain dispatching algorithm make each sensor node only in given time period/sub-band/orthogonal code access channel communicate, do not participate in nodes in communication and enter sleep state with energy-conservation, its major advantage be can realize not having conflict communication, the duty ratio controllability is good, network energy efficient is high, shortcoming is poor expandability, requires height and scheduled maintenance expense big etc. synchronously.The 3rd class is a hybrid MAC protocols, and its basic thought is in conjunction with based on the MAC agreement of competition with based on the advantage of MAC agreement of scheduling, avoids shortcoming separately simultaneously.When time-space domain or the change of certain network condition, this quasi-protocol still shows as based on certain quasi-protocol, and other agreement is the characteristic of assisting.The major advantage of agreement is to help the network global optimization, and weak point is the common more complicated of algorithm.
There is following common defects in more than existing wireless sensor network MAC agreement: the real-time Transmission that can't guarantee periodicity perception data and bursty data simultaneously; The channel that can't guarantee the heterogeneous sensor node uses fairness; Can't satisfy the QoS needs of heterogeneous sensor different business grade, these problems cause existing MAC agreement can't adapt to the complicated applications occasion of the heterogeneous sensor network of recurrent event perception and event-driven perception coexistence.
Summary of the invention
The objective of the invention is to overcome the weak point of existing wireless sensor network MAC agreement, heterogeneous sensor network at recurrent event perception and event-driven perception coexistence is used, a kind of wireless sensor network ADAPTIVE MIXED MAC agreement is proposed, the real-time Transmission of sexy data of cycle and bursty data during the solution wireless sensor network is used, heterogeneous sensor node channel inserts fairness, problems such as the different QoS needs of heterogeneous sensor different business grade can be supported recurrent event perception and event-driven perception task simultaneously for wireless sensor network technical support is provided.
A kind of wireless sensor network ADAPTIVE MIXED MAC agreement of the present invention may further comprise the steps:
1, a kind of wireless sensor network ADAPTIVE MIXED MAC agreement is characterized in that, may further comprise the steps:
1) network is three etale topology structures;
Network is made up of aggregation node, backbone node and ordinary node, and ordinary node sends to backbone node with perception data, is transmitted to aggregation node after finishing data fusion by backbone node;
2) the cross time-slot allocation algorithm of frame length based on fixedly the time;
21) time frame is represented with TF, and time slot represents with TS, then TF=3 * 2
kTS (0≤k≤15), wherein k is determined by bunch amount of capacity, TS determines by data packet size, message transmission rate and clock drift parameter, time frame begin to use the time frame beacon identity, wherein comprise parameters such as subnet number, beacon time stamp, beacon duration, time slot sum, remaining time slots number;
22) time frame is divided into three groups of A, B, C, every group comprises 2
kIndividual time slot, the time slot in every group all distributes a call number, and span is 0~2
k-1.The time slot of the time slot of each time slot group and other time slot group replaces layout: A-0, and B-0, C-0, A-1, B-1, C-1 ..., A-2
k-1, B-2
k-1, C-2
k-1;
23) A-0, B-0, C-0 be for reserving time slot, and wherein to be used for backbone node smart synchronous with aggregation node for A-0; B-0 is used for newly-increased node and networks essence synchronously, and C-0 is used for newly-increased node receiving slot allocation of parameters;
24) do not comprise the reservation time slot, A group time slot is a fixedly time slot of distributing to ordinary node, is used for ordinary node and sends data to backbone node; B group time slot is public competition slot, is used for ordinary node and sends bursty data to backbone node; C group time slot is that backbone node is reserved time slot, is used for backbone node and sends data to aggregation node;
25) according to the QoS demand, each node can distribute a plurality of time slots, is called the time slot piece, and the size of time slot piece is levied by the repetition rate numerical table, the repetition rate number equal distribute the logarithm of number of time slots, node n institute distributed time slot piece can be expressed as:
Wherein A represents that the time slot piece of node n is the subclass of A group time slot,
The initial time slot index value of time slot piece of expression node n, R
nThe time slot repetition rate value of expression node n, each time slot index in the time slot piece can be expressed as:
Wherein the value of m is
When 26) the network initial topology formed, backbone node is distributed to the A group time slot of ordinary node can not organize 80% of total timeslot number above A, and except that reserving time slot, unallocated time slot is the newly-increased standby time slot of node;
3) influence counteracting method based on the clock drift that sends the protection of shake and propagation delay;
The time precision of sensor node descends along with the drift of local clock, and in the beginning of sending time slots with finish to reserve the transmission conflict that time-interleaving that a period of time Δ t can the offset clock drift produces causes, Δ t is by there being following formula to provide:
Frame length when wherein TF is,
Be sensor node local clock drift rate;
4) based on the cross time-slot block-distributing algorithm of grade of service weighting;
Utilize step 2) described time slot block-distributing algorithm, the node high for the grade of service distributes more time slot;
5) based on the thick synchronously and as required smart synchronous synchronized algorithm of aggregation node-backbone node-ordinary node classification;
51) form the stage in network topology, aggregation node is periodically broadcasted the networking sync message, comprises the current time of aggregation node in this sync message; Backbone node is realized synchronously thick according to the local zone time of the networking sync message adjustment that receives oneself.After slightly finishing synchronously, backbone node adopts CSMA/CA and random back mechanism access channel, realizes networking synchronously smart by bi-directional exchanging mechanism and aggregation node;
52) in the network operation stage, the time precision of backbone node can descend along with the drift of local clock, therefore need synchronous again, backbone node is according to the time precision class requirement, in time slot A-0, adopt CSMA/CA and random back mechanism access channel as required, realize synchronously smart by bi-directional exchanging mechanism and aggregation node;
53) form the stage in network topology, after backbone node realization and aggregation node essence are synchronous, begin periodically broadcast beacon, comprise information such as subnet number, time stamp, transmitting power in the beacon; After ordinary node is received beacon,, realize synchronously thick according to the time of beacon time stamp adjustment oneself; Ordinary node may be received a plurality of different backbone node beacons that come from, and ordinary node selects suitable aggregation node to send the request of networking according to the intensity that receives beacon power; Backbone node distributes the corresponding time slot piece according to the characteristic parameter (comprising dump energy, the grade of service, application number of time slots etc.) of networking requesting node for each node; It is synchronously smart that each node utilization distributes the initial time slot of time slot piece to finish with the networking of backbone node;
54) in the network operation stage, the time precision of ordinary node can descend along with the drift of local clock, therefore needs synchronous again; Ordinary node is according to the time precision class requirement, as required at the initial time slot of time slot piece distribution, realizes synchronously smartly by bi-directional exchanging mechanism and backbone node, do not need when synchronous, distribute the initial time slot of time slot piece to be used for transmitting data;
55) in the network operation stage, it is synchronously thick that newly-increased node utilizes the time frame beacon to network, and realizes essence synchronously at the B-0 time slot by bi-directional exchanging mechanism and backbone node then, and the time slot allocation parameter that receives backbone node at the C-0 time slot networks;
6) based on the burst transfers of data method of public competition slot piece;
Need the node of transmitting burst data to organize time slot (except the B-0) by CSMA/CA competition mechanism access channel at B;
7) the CSMA/CA algorithm that weighting is kept out of the way based on the grade of service;
Sensor node is classified according to the grade of service, and node back off time in the competition slot piece that the grade of service is high is shorter, thereby obtains higher channel access probability.
The invention has the beneficial effects as follows the weak point that can overcome existing wireless sensor network MAC agreement; The real-time Transmission of recurrent event perception and event-driven perception data, heterogeneous sensor node channel inserted the problems such as different QoS needs of fairness, heterogeneous sensor different business grade during the solution wireless sensor network was used, and can support recurrent event perception and event-driven perception task simultaneously for wireless sensor network technical support is provided.
Embodiment
The present invention is described in detail below in conjunction with drawings and Examples, as shown in Figure 1, 2, the present invention includes following steps:
(1) form the stage in network topology, aggregation node is periodically broadcasted the networking sync message, comprises the current time of aggregation node in this sync message; Backbone node is realized synchronously thick according to the local zone time of the networking sync message adjustment that receives oneself.After slightly finishing synchronously, backbone node adopts CSMA/CA and random back mechanism access channel, realizes networking synchronously smart by bi-directional exchanging mechanism and aggregation node.
(2) form the stage in network topology, after backbone node realization and aggregation node essence are synchronous, begin periodically broadcast beacon, comprise information such as subnet number, time stamp, transmitting power in the beacon; After ordinary node is received beacon,, realize synchronously thick according to the time of beacon time stamp adjustment oneself; Ordinary node may be received a plurality of different backbone node beacons that come from, and ordinary node is selected suitable backbone node according to the intensity that receives beacon power, and adopts CSMA/CA and random back mechanism access channel to send the request of networking; Backbone node distributes the corresponding time slot piece according to the characteristic parameter (comprising dump energy, the grade of service, application number of time slots etc.) of networking requesting node for each node; It is synchronously smart that each node utilization distributes the initial time slot of time slot piece to finish with the networking of backbone node.
(3) in the network operation stage, the time precision of backbone node can descend along with the drift of local clock, therefore needs synchronous again.Backbone node adopts CSMA/CA and random back mechanism access channel as required according to the time precision class requirement in time slot A-0, realize synchronously smart by bi-directional exchanging mechanism and aggregation node.
(4) in the network operation stage, the time precision of ordinary node can descend along with the drift of local clock, therefore needs synchronous again.Ordinary node at the initial time slot of time slot piece distribution, is realized synchronously smart by bi-directional exchanging mechanism and backbone node according to the time precision class requirement as required.Do not need when synchronous, distribute the initial time slot of time slot piece to be used for transmitting data.
(5) in the network operation stage, it is synchronously thick that newly-increased node utilizes the time frame beacon to network, and realizes synchronously smart at the B-0 time slot by bi-directional exchanging mechanism and backbone node then.
(6) in the network operation stage, if current time slots just in time belongs to a certain node, then this node can utilize current time slots to send the data to affiliated backbone node.
(7) in the network operation stage, if the perception data of a certain node exceeds the setting thresholding, the data that then need will transfinite in the shortest time send to affiliated backbone node.If current time slots just in time belongs to this node, then this node can utilize current time slots to send the data to affiliated backbone node; If current time slots does not belong to this node, and belong to step 24) the B group time slot of regulation, then this node adopts CSMA/CA and random back mechanism access channel, sends the data to affiliated backbone node; If current time slots belongs to step 24) the C group time slot of regulation, then need to wait for next time slot, if next time slot belongs to this node, then this node can utilize next time slot to send the data to affiliated backbone node, otherwise wait for a time slot again, adopt CSMA/CA and random back mechanism access channel, send the data to affiliated backbone node.
(8) in the network operation stage, backbone nodes use step 24) C of regulation group time slot sends the data to aggregation node.
The above; only be the specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, anyly is familiar with those skilled in the art in scope disclosed by the invention; the variation that can expect easily or replacement all should be encompassed in the protection range of claim of the present invention.