Summary of the invention
Main purpose of the present invention is to provide a kind of node dormancy method and device, to address the above problem at least.
According to an aspect of the present invention, a kind of node dormancy method is provided, said node is arranged in the network of tree structure, and this method comprises the steps: that said node receives the synchronization frame of gateway sink node broadcasts; Said node is dispatched the time slot of this node according to the degree of depth of this node in said tree structure, and wherein, the timeslot scheduling of the node of same depth is identical, and the timeslot scheduling of the node of different depth is different; Said node carries out transfer of data and gets into resting state according to the time slot after dispatching.
Preferably; Before time slot after said node is according to scheduling carries out transfer of data; Said method also comprises: said node receives the information from other nodes; Wherein, this information carries the identification information of the employed channel of sending node of this information, and said channel comprises the channel that is used to receive the channel of data and/or is used to send data; Said node is confirmed the employed channel of said node place transmission data according to the degree of depth and the employed channel of said sending node of said sending node in said tree structure, and wherein, the channel that the node that the degree of depth is identical uses is different.
Preferably, the employed channel difference of the node that the degree of depth is identical comprises: the node that the degree of depth is identical uses different channels to receive data at receiving slot, and child node is used its father node to receive the employed channel of data at sending time slots and sent data.
Preferably; Said node confirms that according to the degree of depth and the employed channel of said sending node of said sending node in said tree structure the said node place employed channel of transmission data comprises: said sending node for the situation of said node with the node of the degree of depth under, the channel that being used in the said information of said nodes records sent data is used channel; Be that the channel that said node selects being used in the said information to receive data is that said node sends the employed channels of data under the situation of father node of said node at said sending node.
Preferably; Said node carries out transfer of data according to the time slot after dispatching and comprises: after said node and other nodes transmission data collisions with the degree of depth; Said node sends data with the first predetermined probability P at current sending time slots, sends data with the sending time slots of second predetermined probability after current sending time slots.
Preferably, said node and other nodes with the degree of depth send data collisions and surpass after the pre-determined number, and said node postpones maximum mutual frame after the required time with the 3rd predetermined probability, begins to retreat.
Preferably; Receive at said node before the synchronization frame of said sink node broadcasts, said method also comprises: the said synchronization frame of said sink node periodic broadcasting, wherein; Carry the timeslot scheduling mode in the said synchronization frame, said timeslot scheduling mode is used to adjust the size of time slot.
Preferably, also carry the information that is used to adjust duty ratio in the said synchronization frame.
Preferably, said node is dispatched the time slot of this node according to the degree of depth in said tree structure of this node and comprised: said node is according to the time slot of himself depth value ring shift left and the depth value respective amount timeslot scheduling as this node.
Preferably, the time slot of said node comprises synchronization slot, sending time slots, receiving slot and dormancy time slot.
According to another aspect of the present invention, a kind of node dormancy device is provided also, said device is arranged in the network of tree structure, and said device comprises: first receiver module is used to receive the synchronization frame of gateway sink node broadcasts; Scheduler module is used for the time slot of this node being dispatched in the degree of depth of said tree structure according to this node, and wherein, the timeslot scheduling of the node of same depth is identical, and the timeslot scheduling of the node of different depth is different; Transport module is used for carrying out transfer of data and getting into resting state according to the time slot after the scheduling.
Preferably; Said node also comprises: second receiver module is used to receive the information from other nodes, wherein; This information carries the employed channel logo information of sending node of this information, and said channel comprises the channel that is used to receive the channel of data and/or is used to send data; Determination module is used for confirming transmission data employed channel in said node place according to said sending node at the degree of depth and the employed channel of said sending node of said tree structure that wherein, the channel that the node that the degree of depth is identical uses is different.
Preferably, the node that the degree of depth is identical uses different channels to receive data at receiving slot, and child node is used its father node to receive the employed channel of data at sending time slots and sent data.
Preferably, said scheduler module is used for according to himself the time slot of depth value ring shift left and depth value respective amount as the timeslot scheduling of this node.
Through the present invention, solved that the node in the network of tree structure can't get into the problem of resting state in the prior art, and then can make node get into resting state, effectively saved energy.
Embodiment
Hereinafter will and combine embodiment to specify the present invention with reference to accompanying drawing.Need to prove that under the situation of not conflicting, embodiment and the characteristic among the embodiment among the application can make up each other.
Consider in the prior art that the MAC Research on Saving Energy mainly concentrates on Star Network under beacon patterns; Only limit to the modification of parameter to the research under the non-beacon patterns; Do not relate to the research how node gets into resting state; In following examples, provide under the network of tree structure, the node dormancy scheme under the non-beacon patterns of 802.15.4 need to prove; Though following examples for the dormancy under the non-beacon patterns that solves 802.15.1, also can be applied in other the sight that has similar problem.
A kind of node dormancy method is provided in the present embodiment, and node is arranged in the network of tree structure, and Fig. 1 is the flow chart according to the node dormancy method of the embodiment of the invention, and is as shown in Figure 1, and this flow process comprises the steps:
Step S102, node receive the synchronization frame of gateway (sink) node broadcasts; In this step, the communication range of sink node is adjustable, and maximum can cover whole network.
Step S104, node is dispatched the time slot of this node according to the degree of depth of this node in tree structure, and wherein, the timeslot scheduling of the node of same depth is identical, and the timeslot scheduling of the node of different depth is different.
Step S106, this node carries out transfer of data and gets into resting state according to the time slot after dispatching.
Pass through above-mentioned steps; It is the time slot difference of the node of different depth; So just the data transmission and the reception of the node of different depth are dispatched, when other nodes send and/or receive, if taken the time slot of this node at time slot; This node just can get into resting state so, thereby has practiced thrift energy.
For the node of same depth; Because the time slot of its scheduling is identical; The data of the node of same depth transmission also possibly produce conflict so, for the problem that manages conflict, can adopt the mode that manages conflict among the existing IEEE 802.15.4 to solve.In the present embodiment, a kind of problem that preferred embodiment also can manage conflict to a certain extent is provided, has described in the face of this preferred implementation down.
In this preferred implementation; Before time slot after node is according to scheduling carries out transfer of data; This node can receive the information from other nodes; Wherein, this information carries the identification information of the employed channel of sending node of this information, and this channel comprises the channel that is used to receive the channel of data and/or is used to send data; This node is confirmed the employed channel of node place transmission data according to the degree of depth and the employed channel of sending node of sending node in tree structure, and wherein, the channel that the node that the degree of depth is identical uses is different.In the preferred embodiment mode, the employed channel of the node of different depth is different, the problem that so just can avoid conflict to a certain extent.Consider the structure of tree network; Data major part in this tree network is to flow to the sink node from ordinary node; Promptly send data to father node from child node; In this preferred embodiment, can make the identical node of the degree of depth use different channels to receive data, and child node use its father node to receive the employed channel transmission of data data at sending time slots at receiving slot.
For example, sending node be with the situation of this node with the node of the degree of depth under, the channel that being used in this nodes records information sent data is used channel; Be that the channel that being used in this node selection information receives data is that node sends the employed channels of data under the situation of father node of this node at sending node.
Certainly; Even adopted above-mentioned preferred implementation still might clash (certainly, the probability that clashes can reduce a lot), in the present embodiment; A kind of preferred conflict resolution also is provided; Promptly after this node and other nodes transmission data collisions with the degree of depth, this node sends data with the first predetermined probability P at current sending time slots, sends data with the sending time slots of second predetermined probability after current sending time slots.For example, this node can send data at current sending time slots with 50% probability, and resends data with 50% probability at next sending time slots.
More preferably; This node can send after data collisions surpass pre-determined number with other nodes with the degree of depth; Postpone maximum mutual frame after the required time with the 3rd predetermined probability, begin to retreat and (promptly stop to send data, and then begin again sometime to send; This moment can be at random, but is not limited thereto).Therefore avoided the generation of conflict to a certain extent.For example, this node sends data failures continuous three times, and then afterwards the starting point of sending time slots postpones maximum mutual frame after the needed time with 0.5 probability, just begins to retreat.
Another preferred embodiment in, for fear of clock drift and/or increase extensibility, the sink node can the periodic broadcasting synchronization frame (for example; Periodic broadcasting); Wherein, carry the timeslot scheduling mode in the synchronization frame, the timeslot scheduling mode is used to adjust the size of time slot.More preferably, can also carry the information that is used to adjust duty ratio in the synchronization frame.
The mode of according to the degree of depth in tree structure of this node the time slot of this node being dispatched for node can have a variety of, as long as can reach the timeslot scheduling various objectives of node of the identical different depth of timeslot scheduling of the node of same depth.For example, node can be according to himself the time slot of depth value ring shift left and depth value respective amount as the timeslot scheduling of this node.This only is the illustrative of scheduling mode, is not limited to this.
A kind of node dormancy device also is provided in the present embodiment; This device is applied in the network of tree structure, this device is used to realize the foregoing description and preferred embodiment, has carried out explanation; Repeat no more, describe in the face of relating to module in this node down.As following employed, the combination of the software and/or the hardware of predetermined function can be realized in term " module ".Although the described system and method for following examples is preferably realized with software, hardware, perhaps the realization of the combination of software and hardware also maybe and be conceived.
Fig. 2 is the structured flowchart according to the node dormancy device of the embodiment of the invention, and is as shown in Figure 1, and this device comprises: first receiver module 22, scheduler module 24 and transport module 26 describe in the face of this structure down.
First receiver module 22 is used to receive the synchronization frame of gateway sink node broadcasts; Scheduler module 24 is connected to first receiver module 22, and this module is used for according to the degree of depth in tree structure of this node the time slot of this node being dispatched, and wherein, the timeslot scheduling of the node of same depth is identical, and the timeslot scheduling of the node of different depth is different; Transport module 26 is connected to scheduler module 24, and this module is used for carrying out transfer of data and getting into resting state according to the time slot after the scheduling.
Fig. 3 is the preferred structure block diagram according to the node dormancy device of the embodiment of the invention, and is as shown in Figure 2, and this device also comprises: second receiver module 32 and determination module 34 describes in the face of this preferred structure down.
Second receiver module 32 is used to receive the information from other nodes, and wherein, this information carries the employed channel of sending node of this information, and wherein, channel comprises the channel that is used to receive the channel of data and/or is used to send data; Determination module 34 these modules are connected to second receiver module 32 and transport module 26; Be used for confirming the employed channel of node place transmission data at the degree of depth and the employed channel of sending node of tree structure according to sending node; Wherein, the channel that the node that the degree of depth is identical uses is different.
Preferably, scheduler module 26 is used for according to himself the time slot of depth value ring shift left and depth value respective amount as the timeslot scheduling of this node.
Describe below in conjunction with preferred embodiment, the preferred embodiment has combined the foregoing description and preferred implementation.
In this preferred embodiment; Being that example describes based on the improved MAC agreement of the non-beacon patterns of IEEE 802.15.4; Pass through timeslot scheduling; Overcome the limitation aspect energy-conservation of MAC agreement under the existing non-beacon patterns, made node under non-beacon patterns, can get into resting state, saved energy.More preferably, adopt different channels and effective back-off mechanism, can effectively reduce conflict.
This preferred describing for example of implementing with radio sensing network (Wireless Sensor Network abbreviates WSN as).This network application Routing Protocol is tree type route (Hierarchy Tree Rout abbreviates HTR as), and promptly each node all has the degree of depth separately.Because in WSN; The data major part is to flow to the sink node from ordinary node, promptly sends data to father node from child node, therefore; It is different time slots that present embodiment adopts the node visit channel distribution with different depth, and the node of the same degree of depth adopts unified timeslot scheduling mode.Through reasonable distribution time slot branch, reached and reduced conflict, the purpose of saving energy.
In this preferred embodiment, the communication range of sink node is adjustable, and maximum can cover whole network.And the sink node is the personal area network, is also referred to as territory net (Personal Area Network abbreviates PAN an as) telegon.The time slot of node is divided into synchronization slot, dormancy time slot, receiving slot and sending time slots.Synchronization slot is used for realizing that all nodes are synchronous in the net, in this time slot, has only the sink node to send synchronization frame, and other nodes all are in accepting state; The dormancy time slot is used for the node shutter transceiver, gets into resting state; Receiving slot is used for node and is in accepting state, and can reply ACK; Sending time slots is used for node and sends Frame or command frame, also can receive corresponding ACK, and if the free of data transmission, but can also shutter transceiver.
In this preferred embodiment, because what adopt is timeslot scheduling, so node carries out strict synchronism, as execution mode preferably, can adopt sink node broadcasts synchronization frame, and this synchronization frame has comprised the timeslot scheduling mode.Sink node all nodes in network send synchronization frame, and the node of different depth (H) is adjusted time slot (for example, a ring shift left H time slot) according to the depth value of node own after receiving synchronization frame, and with the timeslot scheduling of this adjustment mode as this node itself.Preferably, this synchronization frame can also be dispatched duty ratio according to the application need of sink node image data, mainly considers upstream data at this this sink node; But be not limited to this; For example, if there is order to issue, also can in synchronization slot, consider to issue from sink.Further, the sink node can the periodic broadcasting synchronization frame, thereby has avoided clock drift, can increase extensibility simultaneously.
In this preferred embodiment, a receiving slot can receive 2 frames at least.Calculate with largest frames, the mutual required time of largest frames does
T=t
max_backoff+t
CCA+t
aTurnaroundTime+t
DATA+t
aTurnaroundTime+t
ACK
=160+8+12+266+12+22=480 symbol, wherein, t
Max_backoffFor maximum is retreated the time, t
ATurnaroundTimeBe transceiver change-over time, t
CCABe clean channel estimation (Clear Channel Assessment abbreviates CCA as) time, t
DATABe long data frame transmitting time, t
ACKFor sending the ACK time.
If a receiving slot receives 2 maximum frame lengths, then a time slot size is T
SlotThe basic superframe T of=2T=960 symbol and IEEE802.15.4
ABaseSuperframeDurationSize is the same.
Through above-mentioned execution mode, can merge effectively data, thereby reduce redundant.
As one preferred embodiment, the sink node can also be adjusted the time slot size through regular transmission synchronization frame according to the needs of collected data.
Preferably, in the present embodiment, can adopt multichannel; Like this with the node of the different father node of the degree of depth each other during concealed terminal, when clashing, for example; Fig. 4 divides sketch map according to time slot of the node that is positioned at different depth of the embodiment of the invention, and is as shown in Figure 4, and this figure is the sketch map that the node with the different father node of the degree of depth clashes; Node 3 or 4 is given out a contract for a project to father node 1, can interfere with node 5 and give out a contract for a project to father node 2.Node 3 and node 5 can not monitor the other side's transmission, clash easily, and after bag clashes, retransmit and also can conflict, and waste energy greatly.Through (for example adopting multichannel; Use different channel received frames with degree of depth node at receiving slot; Corresponding child node uses the channel identical with father node to come transmit frame at sending time slots); Avoided node conflict, and can preferably utilize effective back-off mechanism, can reduce to a certain extent with the node conflict of the degree of depth with father node with the different father node of the degree of depth.
In another preferred embodiment below, a kind of channel allocation algorithm with degree of depth node is provided, has need to prove that this algorithm is not limited to this, any algorithm that can carry out reasonable distribution to the channel with degree of depth node is all passable.Describe in the face of this algorithm down.
(for example, WSN) after the foundation, before the sink node sent synchronization frame, the sink node was with the power broadcast channel assigned command frame (ChanAllot) that can cover the whole network at network.
After other node is received ChanAllot in the network, postpone TDelay, can select one at random with the untapped channel of degree of depth node; The channel recv_chan that uses as receiving slot, and on the sink channel broadcast channel select command frame (ChanChosen), wherein; ChanChosen comprises the depth value of this node; Receiving slot channel recv_chan, sending time slots channel send_chan, the child node number (NonAckNum) of ChanChosen and the address list (AddrList) of corresponding child node received unconfirmed; If send_chan is unknown, then be-1.Receive ChanChosen in order to ensure child node; A table to be confirmed of node maintenance (WaitAckTable); Wherein, this WaitAckTable comprises child node number (NonAckNum) and the corresponding child node address list (AddrList) of the ChanChosen of receiving unconfirmed.If after the wait regular hour (Twait) (for example, surpassing the time threshold that is provided with), the NonAckNum among the WaitAckTable is not 0 still, node then resends ChanChosen.
After node is received ChanChosen,, then write down send_chan among the ChanChosen for using channel if source node is the node with the degree of depth; If source node is its child node, and the send_chan among the ChanChosen is identical with node recv_chan, and source address is in WaitAckTable, and then the NonAckNum of WaitAckTable subtracts 1, deletes corresponding child node address among the AddrList; If source node is its father node, then the recv_chan assignment among the ChanChosen is given the send_chan of node; If node is in the AddrList of ChanChosen, and node sent ChanChosen, and then node will send ChanChosen once more.
It is in order to avoid a conflict that node postpones TDelay broadcasting ChanChosen, in this preferred embodiment, the account form of a kind of TDelay is provided, and is being not limited to this.Describe in the face of this account form down.
TDelay=γ * h+Rand (0, TC), wherein; γ is a depth coefficient, and h is a depth value, and Rand (0; TC) return a random value between 0~TC, wherein the TC value is sent ChanChosen less than γ earlier to guarantee the little node of depth value; Rand (0, TC) reduce the probability of sending out ChanChosen with degree of depth node simultaneously.Preferably, the Twait value should be more than or equal to 2 γ, can guarantee that like this father node can receive the ChanChosen of child node at Twait.
As shown in Figure 4, node 3 is given out a contract for a project to father node 1, can interfere with node 4 and give out a contract for a project to father node 1.If node 3 and 4 is concealed terminal each other, node 3 and 4 can not monitor the other side's transmission, leads to a conflict; This shows,, clash easily each other during concealed terminal with the node of father node with the degree of depth; Conflict is serious; And after bag clashes, also can conflict the waste significant amount of energy in next sending time slots repeating transmission.
The non-time slot CSMA/CA algorithm of a kind of improved IEEE 802.15.4 is provided in the present embodiment.In this algorithm, after node sends data,, continue to send at current sending time slots with 0.5 probability if confiscate ACK, resend data with 0.5 probability at next sending time slots.If continuous three retransmission datas failure of node, then later sending time slots starting point postpones to begin to retreat behind the mutual required time of largest frames (for example, 480 symbols) with 0.5 probability.CSMA/CA after this improvement has reduced conflict to a great extent.
Fig. 4 divides sketch map according to a time slot of the node that is positioned at different depth of the embodiment of the invention, and as shown in Figure 4, depth H+2 nodes are in sending time slots, and depth H+1 node is in receiving slot, and depth H+3 are in the dormancy time slot with the depth H node.When the degree of depth is the node of H+2 when giving out a contract for a project node to depth H+1, depth H+3 nodes can not receive that destination address is not the bag of node own, thereby have reduced cross-talk; Simultaneously, can not give out a contract for a project yet, thereby reduce the collision conflict to the node of depth H+2.In like manner, the node of depth H can not given out a contract for a project to the node of depth H+1 yet.In addition, if node does not have child node, then can receiving slot be become the dormancy time slot.Shown in depth H among Fig. 4+4 nodes.
Fig. 5 is the timeslot scheduling sketch map according to the node of the embodiment of the invention, and is as shown in Figure 5, and the degree of depth is 1 node with timeslot scheduling mode 1 time slot that moves to left, and obtains the timeslot scheduling of oneself.
Fig. 6 is the sketch map according to the preferred exemplary of the node timeslot scheduling of the embodiment of the invention; As shown in Figure 6, after the node of different depth receives the synchronization frame of sink node transmission, according to the degree of depth adjustment timeslot scheduling of this node itself; That is, the node of each degree of depth is dispatched according to the time slot of itself.In a dispatching cycle, the degree of depth is that the time slot of the node of H moves to left and is dormancy behind H the time slot, and dormancy receives, send, the degree of depth be H+1 node be scheduling to dormancy, receive, send, dormancy, the degree of depth be H+3 node be scheduling to transmission, dormancy, dormancy receives.When the degree of depth was sent for the H+2 node, depth H+1 node just in time was in accepting state, and depth H+3 nodes are in resting state, received unnecessary data of being sent for the H+2 node by the degree of depth, thereby had avoided to a certain extent crosstalking.
Through the foregoing description and preferred embodiment, reached and let the purpose of node dormancy under the non-beacon enable mode of IEEE 802.15.4 network, and saved energy.Simultaneously, for the collision problem that timeslot scheduling exists,, thereby avoided node conflict with the different father node of the degree of depth through employing multichannel and effective back-off mechanism.
In another embodiment, a kind of software is provided also, this software is used for carrying out the technical scheme that the foregoing description and preferred embodiment are described.
In another embodiment, a kind of storage medium is provided also, has stored above-mentioned software in this storage medium, this storage medium includes but not limited to: CD, floppy disk, hard disk, scratch pad memory etc.
Obviously; It is apparent to those skilled in the art that above-mentioned each module of the present invention or each step can realize that they can concentrate on the single calculation element with the general calculation device; Perhaps be distributed on the network that a plurality of calculation element forms; Alternatively, they can be realized with the executable program code of calculation element, carried out by calculation element thereby can they be stored in the storage device; Perhaps they are made into each integrated circuit modules respectively, perhaps a plurality of modules in them or step are made into the single integrated circuit module and realize.Like this, the present invention is not restricted to any specific hardware and software combination.
The above is merely the preferred embodiments of the present invention, is not limited to the present invention, and for a person skilled in the art, the present invention can have various changes and variation.All within spirit of the present invention and principle, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.