CN102523594B - Method and system for acquiring node loss information based on ZigBee protocol - Google Patents

Method and system for acquiring node loss information based on ZigBee protocol Download PDF

Info

Publication number
CN102523594B
CN102523594B CN201110391507.0A CN201110391507A CN102523594B CN 102523594 B CN102523594 B CN 102523594B CN 201110391507 A CN201110391507 A CN 201110391507A CN 102523594 B CN102523594 B CN 102523594B
Authority
CN
China
Prior art keywords
node
loss
information
data
hop node
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.)
Active
Application number
CN201110391507.0A
Other languages
Chinese (zh)
Other versions
CN102523594A (en
Inventor
俞雪婷
陈岚
李莹
龚关飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Institute of Microelectronics of CAS
Original Assignee
Institute of Microelectronics of CAS
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Institute of Microelectronics of CAS filed Critical Institute of Microelectronics of CAS
Priority to CN201110391507.0A priority Critical patent/CN102523594B/en
Publication of CN102523594A publication Critical patent/CN102523594A/en
Application granted granted Critical
Publication of CN102523594B publication Critical patent/CN102523594B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a method and a system for acquiring node loss information based on a ZigBee protocol. The method comprises the steps of: when data are needed to be sent to other nodes, determining a next-hop node according to target node information in the data to be sent and sending the data; judging whether the next-hop node is lost or not according to the receiving state of the data to be sent, generating loss indication information indicating that the next-hop node is lost when the next-hop node is lost, and reporting the loss indicating information to a ZigBee equipment object of an application layer; and analyzing network information of the next-hop node from the loss indicating information received by the ZigBee equipment object, and reporting the network information of the next-hop node, as the loss node information, to an application object. According to the method disclosed by the invention, the loss information of the node can be acquired without adding extra data expenses.

Description

Based on Zigbee protocol, obtain the method and system of node loss information
Technical field
The present invention relates to short-distance wireless communication technology field, relate in particular a kind of method and system that obtains node loss information based on Zigbee protocol.
Background technology
ZigBee is a kind of emerging wireless communication technology with features such as short distance, low rate, low-power consumption, high reliability, transmitted in both directions.Network based on Zigbee protocol can mutually coordinate to realize communication between thousands of nodes, node in network only needs energy seldom, just can by radio wave, data be sent to another node from a node in the mode of relay, communication efficiency is very high.
Node generation power down in the network based on Zigbee protocol, mistake, leave or when signal weaker can not be detected by other nodes, be called as node loss.The existing method of obtaining node loss situation based on Zigbee protocol completes based on inquiry testing mechanism, that is to say, when certain node higher level protocol suite (application in application layer) is wanted to get the loss situation of other nodes, the higher level protocol suite of this node every some cycles to the node broadcasts Query Information to be checked in network, when the node to be checked in the network based on Zigbee protocol can normally be replied this Query Information, just think that node to be checked is still in this network; Otherwise think the node deviated from network that this is to be checked, this node loss to be checked.For example, whether node A needs query node B to lose, and node A periodically sends Query Information to Node B, when the Node B query messages that recovery of node A sends normally, just thinks that Node B is still in network; Otherwise think that Node B loses.
When if the application in the Zigbee protocol stack of node self need to obtain the loss situation information of other nodes, need in application, periodically construct data query bag, and outwards send, can cause a large amount of accessing cost for datas like this, increased system energy consumption.Because nodes quantity is more, if each node all adopts periodic transmission data query to obtain the loss situation of other nodes, can, because the total amount of data that each node sends is excessive, increase the load of network simultaneously.Therefore those skilled in the art's technical problem in the urgent need to address is, how can realize and increasing under the prerequisite that accessing cost for data and system resource takies, and gets the information of node loss situation.
Summary of the invention
In view of this, the invention provides a kind of method and system that obtains node loss information based on Zigbee protocol, in obtaining the process of node loss information, without increasing extra accessing cost for data, and can not affect under the prerequisite of data transmission in network speed, get the drop-out of node.
For achieving the above object, the invention provides as follows a kind of method of obtaining node loss information based on Zigbee protocol, having comprised:
When needs send data to other nodes, according to the destination node information in data to be sent, determine next-hop node, and described data to be sent are sent to described next-hop node;
According to the accepting state of described data to be sent, judge whether described next-hop node is lost, and when described next-hop node is lost, generate the loss Indication message that the described next-hop node of indication is lost, and described loss Indication message is reported to the ZigBee device object of application layer, the network information that comprises described next-hop node in described loss Indication message;
The loss Indication message receiving from described ZigBee device object, parse the network information of described next-hop node, and the network information of described next-hop node is reported to application as losing nodal information, to get described loss nodal information by application.
Preferably, the described loss Indication message receiving from described ZigBee device object, parse the network information of next-hop node, and described next-hop network information reported to application as losing nodal information, comprising:
When receiving described loss Indication message in ZigBee device object, call the step-out indicator function in ZigBee device object;
Using the network information of the next-hop node in described loss Indication message as losing nodal information, and the parameter information of described step-out indicator function is set according to described loss nodal information, generates and comprise the node loss situation report of losing nodal information;
Described node loss situation report is reported in the messaging interface of application framework appointment, by described messaging interface, the loss nodal information in described node loss report is reported to described application.
Preferably, before described node loss situation report is reported to the messaging interface of application framework appointment, also comprise: the task that described node loss situation report is set is processed sign;
Described described node loss situation report is reported in the messaging interface of application framework appointment, comprising:
According to described task, process sign, described node loss situation report is reported with this task and processed in messaging interface corresponding to sign.
Preferably, the described accepting state according to described data to be sent judges that whether described next-hop node is lost, and comprising:
In judging whether at the appointed time, receive the message that confirmation that described next-hop node returns receives described data to be sent, if not, described next-hop node is lost.
Preferably, the child node that described next-hop node is this node or be the father node of this node.
Preferably, the method also comprises:
According to the loss nodal information getting in described application, by the drop-out of described next-hop node, notify other nodes.
Preferably, described need to, to other nodes transmission data, comprising:
The destination node that receives other nodes transmissions is not the data of this node;
Or this node construction data also need to send to other nodes.
The present invention also provides a kind of system of obtaining node loss information based on Zigbee protocol on the other hand, comprising:
Data transmission unit, for when needs send data to other nodes, determines next-hop node according to the destination node information in data to be sent, and described data to be sent is sent to described next-hop node;
Node loss detecting unit, for judging according to the accepting state of described data to be sent whether described next-hop node is lost, and when described next-hop node is lost, generate the loss Indication message that the described next-hop node of indication is lost, and described loss Indication message is reported to the ZigBee device object of application layer, the network information that comprises described next-hop node in described loss Indication message;
Node loss information reporting unit, for the loss Indication message receiving from described ZigBee device object, parse the network information of described next-hop node, and the network information of described next-hop node is reported to application as losing nodal information, to get described loss nodal information by application.
Preferably, described node loss information reporting unit, comprising:
Function calling cell, for when when ZigBee device object receives described loss Indication message, calls the step-out indicator function in ZigBee device object;
Parameter set unit, be used for using the network information of the next-hop node of described loss Indication message as losing nodal information, and according to described loss nodal information, the parameter information of described step-out indicator function is set, generate and comprise the node loss situation report of losing nodal information;
Information capture unit, for described node loss situation report being reported to the messaging interface of application framework appointment, reports described application by described messaging interface by the loss nodal information in described node loss report.
Preferably, node loss information reporting unit also comprises: sign setting unit, and for being set, the task of described node loss situation report processes sign;
Described information capture unit, comprising:
Information reporting subelement, for processing sign according to described task, reports described node loss situation report with this task and processes in messaging interface corresponding to sign.
Preferably, described node loss detecting unit, comprising:
Node loss confirmation unit, receives the message of described data to be sent for receiving confirmation that described next-hop node returns in judging whether at the appointed time, if not, described next-hop node is lost.
Preferably, this system also comprises:
Notification unit, for the loss nodal information getting according to described application, notifies other nodes by the drop-out of described next-hop node.
Known via above-mentioned technical scheme, compared with prior art, the present invention openly provides a kind of method and system that obtains node loss information based on Zigbee protocol, in the process sending in data, when receiving the situation of these data according to this next-hop node and determine this next-hop node and lose, generate the loss Indication message that this next-hop node is lost, and report the ZigBee device object of application layer, and then by ZigBee device object, get the network information of the next-hop node in this loss Indication message, and using the network information of this next-hop node as the application of losing nodal information and report application layer, thereby make application capture the drop-out of next-hop node.The method is without periodically build data query in application, as long as this node has data to send or forwards, application just can capture the loss situation information of next-hop node, thereby has reduced data resource consumption and constructed the resource occupation that data query brings.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, to the accompanying drawing of required use in embodiment or description of the Prior Art be briefly described below, apparently, accompanying drawing in the following describes is only embodiments of the invention, for those of ordinary skills, do not paying under the prerequisite of creative work, other accompanying drawing can also be provided according to the accompanying drawing providing.
Fig. 1 is a kind of schematic flow sheet that obtains an embodiment of method of node loss information based on Zigbee protocol in the present invention;
Fig. 2 is the schematic flow sheet that calls the step-out indicator function generation node loss situation report of ZDO in the embodiment of the present invention;
Fig. 3 is that a kind of network configuration and the data based on Zigbee protocol send the schematic diagram flowing to;
Fig. 4 is a kind of structural representation that obtains an embodiment of system of node loss information based on Zigbee protocol of the present invention;
Fig. 5 is the structural representation of another embodiment of a kind of system of obtaining node loss information based on Zigbee protocol of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Embodiment based in the present invention, those of ordinary skills, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
For under reducing system data resource consumption and reducing the prerequisite of the impact of data transmission in network speed, make application in node can get other node loss information, so that user is known the drop-out of other nodes, the invention provides a kind of method of obtaining node loss information based on Zigbee protocol, referring to Fig. 1, the schematic flow sheet that shows an embodiment of a kind of method of obtaining node loss information based on Zigbee protocol of the present invention, the method comprises:
Step 101: when needs send data to other nodes, determine next-hop node according to the destination node information in data to be sent, and these data to be sent are sent to this next-hop node.
Wherein, when needs send data to other nodes, can comprise multiple situation, can be the construction data of this node outwards transmission, as, this joint structure message, and this message is sent to other nodes; Also can be when the bottom stack of this node, to receive the data of other nodes transmissions, determine that by analysis the destination node of these data is not this node, in network layer, need to determine next-hop node, and then this data retransmission is gone out.
No matter be the data of this joint structure, still receive other nodes data that send and that need this node to forward, all can be using these data as data to be sent, and in network layer, obtain the destination node of these data to be sent, and then inquire about the routing table that this node is preserved, determine next-hop node.As, node A is the message of node D to destination node, needs to pass through successively node A, Node B and node C, and forward the packet to node D by node C in the process that sends this message.In this process, when needing first this message, node A sends to Node B, and Node B is the next-hop node of node A, and with should Node B receiving after this message, this Node B need to forward the packet to node C, the next-hop node that node C is this Node B.When determining in network layer after next-hop node, just can be by these data to be sent to the following protocol layer transmission of network layer in Zigbee protocol stack, and these data send to this next-hop node the most at last.
It should be noted that, the said data of the present invention can be arbitrary data, as being the data relevant to protocol stack, can be also common communications data of this node or other joint structures etc.
Step 102: judge according to the accepting state of these data to be sent whether this next-hop node is lost, and when this next-hop node is lost, generate the loss Indication message that this next-hop node of indication is lost, and this loss Indication message is reported to the ZigBee device object of application layer, wherein, the network information that comprises this next-hop node in this loss Indication message.
After by this, data to be sent send to this next-hop node, if this next-hop node still in network, this next-hop node is not lost, this next-hop node can receive this data to be sent.If this next-hop node is lost, the Zigbee protocol stack bottom of this node (being the protocol layer below application layer) can know that this next-hop node does not receive this data to be sent, generates the loss Indication message that this next-hop node of indication is lost in this bottom stack simultaneously.In the present invention when generate this loss Indication message in bottom stack after, this loss Indication message successively can be reported, the final ZigBee device object (ZDO of application layer that this loss Indication message reported by network layer, Zigbee Device Obiect), so that the ZigBee device object of application layer gets the information that this next-hop node is lost in Zigbee protocol stack.
Determine that the mode whether this next-hop node receives these data to be sent has multiple, wherein a kind of mode can be: judge in Zigbee protocol stack bottom at the appointed time, whether to receive the message that confirmation that this next-hop node returns receives described data to be sent, if so, this next-hop node in network; If not, next-hop node is lost.That is to say, if this next-hop node receives after these data to be sent, this next-hop node can be replied an acknowledge message to this this node, to determine that it receives this data to be sent.As, this next-hop node receives after this receiving literary composition waiting of this node transmission, and this next-hop node is replied answer signal to this node.Protocol layer in this node below application layer does not detect or receives the acknowledge message that this next-hop node returns at the appointed time, in Zigbee protocol stack, in the protocol layer below application layer, generates the loss Indication message that this next-hop node of indication is lost.
Wherein, the network information of next-hop node can comprise: the network address of this next-hop node, and the correspondence of this next-hop node and this node, as, the information of the father node that the child node that this next-hop node is this node or this next-hop node are this node.Certainly can also comprise other information such as time that this next-hop node is lost.
Wherein, child node and father node are to divide according to the node communication relation in the network based on Zigbee protocol.When certain equipment in network adds network by another equipment, these two equipment have just formed set membership, and the equipment of new access becomes child node, and another equipment is called the father node of this child node.For example, device A joins in this ZigBee-network by equipment B, and device A is called child node, and equipment B is called the father node of this child node of device A.
Step 103: the network information that parses next-hop node the loss Indication message receiving from ZigBee device object, and described next-hop network information is reported to application as losing nodal information, to get described loss nodal information by application.
While receiving the loss Indication message of this next-hop node loss of indication in the ZigBee device object in application layer, in order to allow application know the information of the loss of this next-hop node, the present invention has increased using the network information of this next-hop node as losing nodal information, and report the operation of application by losing nodal information, and then make application get the information of losing node.
In the embodiment of the present invention, when needs send data to other nodes, data to be sent are sent to the next-hop node of determining, if do not receive the message that confirmation that this next-hop node returns receives these data to be sent, in the Zigbee protocol layer below application layer, generate the loss Indication message of this next-hop node loss of indication and send in the ZigBee device object in application layer, and then the loss Indication message receiving from this ZigBee device object, get the network information of this next-hop node, and the network information of this next-hop node is reported to application as losing nodal information, thereby make application can capture loss nodal information.Like this, when the application of application layer need to obtain the loss situation of other nodes, without periodically constructing, detect data, also without specially sending detection data, carry out node state node, just can this node carry out getting the loss situation of other nodes in the process of data transmission or forwarding, thereby reduced data resource consumption.
By the method for obtaining node loss information of the present invention, can in application, capture the loss situation information of other nodes, without manually in application layer, add corresponding program, just can be so that user be known the loss situation of other nodes, and then make user can learn more easily the loss situation of other nodes.
The present invention parses after the network information of this next-hop node when receiving from this ZigBee device object to lose Indication message, has multiplely using this next-hop node as the mode of losing nodal information and report application layer, can set as required.Wherein mode can complete the operation that this loss nodal information is reported to application by the step-out indicator function calling in ZigBee device object (ZDO, Zigbee Device Obiect), and this process can comprise:
When receiving loss Indication message in ZigBee device object, call the step-out indicator function in ZigBee device object;
Using the network information of the next-hop node in this loss Indication message as losing nodal information, and the parameter information of step-out indicator function is set according to loss nodal information, generates and comprise the node loss situation report of losing nodal information;
Described node loss situation report is reported in the messaging interface of application framework appointment, and the loss nodal information in by the messaging interface of this appointment, node loss being reported reports the application of application layer.
When at ZigBee device object (ZDO, while Zigbee Device Obiect) receiving the loss Indication message that network layer reports, call the step-out indicator function in ZigBee device object, and using the network information of this down hop as the parameter information of losing nodal information and arrange this step-out indicator function, to generate node loss situation report.By being reported to the task layer of appointment in application framework to process this node loss situation report, and the node loss situation report after processing is reported in the messaging interface of appointment, to can this node loss situation report be reported to application by this messaging interface in application framework, thereby complete the operation that application is caught this loss nodal information.
The task that wherein, this node loss situation report can also be set after generating node loss situation report is processed sign.Correspondingly, node loss situation report is reported in the messaging interface of application framework appointment and can comprise: the task according to this node loss situation report is processed sign, node loss situation report is reported with this task and processed in messaging interface corresponding to sign.That is to say, when generating in ZigBee device object after node loss situation report, by the message id of this node loss situation report is set in ZigBee device object, and according to this message id, this is comprised to the report message of losing nodal information and send in application layer operating system message queue, operating system can be responsible for this node loss situation report to send in the reception task of specifying level.
In order clearly to introduce in the present invention the process to application by the node loss information reporting in the loss Indication message receiving in ZigBee device object (ZDO, Zigbee Device Obiect), below an instantiation be introduced.Referring to Fig. 2, for the loss nodal information obtaining in ZDO being reported to the schematic flow sheet of application, wherein, the step-out indicator function calling is specially void the ZDO_SyncIndicationCB () function calling in ZDO, as, void ZDO_SyncIndicationCB (byte type, uint1 6shortAddr), and utilize this step-out indicator function to generate node loss report, and be reported to application layer, this flow process comprises:
1, call void ZDO_SyncIndicationCB (byte type, uint16shortAddr), and the parameter information of this step-out indicator function is set according to the loss nodal information comprising in loss Indication message, generate node loss situation report.
For example, the program code of this node loss situation report generating function can be:
Wherein, in this function, comprise the type of message of node loss situation report, this node and the correspondence of losing node, and the network address of losing node.Wherein, this loss node is next-hop node wherein, and the correspondence of this node of type value representation and this next-hop node, when type is: during 0-child, represent the child node that next-hop node is this node; When type is: during 1-parent, represent the father node that next-hop node is this node.Wherein, shortAddr represents the network address of next-hop node.
2, the message of node loss situation report is sent to the appointed task layer in application framework (APP, the Application framework) layer in application layer.
For example, the operation code of this step can be:
osal_msg_send(NwkChange_TaskID,(byte*)msgPtr);
Send a message to the NwkChange_TaskID task layer of APP layer, in operating system queue, process.In this step, the message task ID of node loss situation report can be set, according to this message task, ID sends to appointed task layer by node loss situation report.
3, the Processing Interface of the message of this node loss report is set in APP layer, this message is done to further processing, to finally can capture this loss nodal information in application.
For example, this message can be sent in the NWK_STATE_CHANGE Processing Interface in APP layer.
Wherein, in the present invention, working as node carries out in the process of data retransmission or transmission, can get in bottom stack the loss situation of next-hop node corresponding to data to be sent, if this next-hop node is lost, in the network layer in Zigbee protocol stack or the protocol layer below network layer, generate the loss Indication message that this next-hop node of indication is lost, and this loss Indication message is reported to the ZDO layer of application layer, and then call the step-out indicator function in this ZDO, and the loss nodal information in foundation loss Indication message arranges the parameter information generation node loss situation report of this step-out indicator function, and then the node loss situation report of generation is reported to application by the messaging interface in application framework, thereby detect data and send to other nodes without application structure, just can capture the information of losing node.
When getting in application, lose after nodal information, can also, according to the loss nodal information getting in application, by the drop-out of this next-hop node, notify other nodes.As, the drop-out of this next-hop node is sent to gateway node.Certainly, when capture node loss information in application after, can also, by the prompting that gives the alarm, make user know the information with this node with this next-hop node loss of communication relation.
It should be noted that, the information that the information of the loss node capturing in application is the next-hop node determined in carrying out data communication process, this next-hop node can or be the father node of this node for the child node of this section point.The concrete correspondence of this next-hop node and this node, the detailed process that need to send according to data in network is determined.
The data that in the present invention, node sent and forwarded can be arbitrary data, and the node in network carries out, in the transmission of data and the process of forwarding, just can getting the loss situation with this node with other nodes of correspondence.In other words, so long as have joint structure in network and send data, the source node of construction data all can, in carrying out the process of data retransmission, get the loss whether information of other nodes with it with correspondence to all nodes on the path of destination node.
In order clearly to introduce the present invention, obtain the method for node loss information, with a concrete application scenarios, be described in detail below, referring to Fig. 3, for a kind of schematic network structure based on Zigbee protocol, at this network, form structure and comprise gateway node, a plurality of routing nodes and a plurality of terminal node, in this network, arbitrary node all can be used as the source node that data send, source node all can be by the method for obtaining node loss information of the present invention to the arbitrary node on the transmit path of destination node, in the application of application layer, capture the loss situation information of its next-hop node.
Especially, when gateway node is as the source node that sends data, and during the destination node using certain leaf node as these data, can be in the process of transmitting of a secondary data, complete this gateway node to the detection of each node loss situation on this leaf node.Wherein, leaf node refers to the node in lowermost end in tree network, and this node does not have child node.In Fig. 3, terminal node 1, terminal node 2, routing node 4 and terminal node 3 are leaf node.In figure, the direction of arrow represents the data flow in data transmission procedure.
The gateway node of take in Fig. 3 be to send the source node of data, terminal node 1 for the destination node of these data be that example is described the process of catching other node loss situation information in the application in each node in path 1.Specifically comprise:
A, first this gateway node structure destination node is the packet of terminal node 1, and using this packet as data to be sent, the next-hop node of determining these data to be sent is routing node 1, these data to be sent are sent to routing node, and starter node lost condition testing mechanism in definite data to be sent and when carrying out data transmission, namely start corresponding detection node and lose program.
B, start after the testing mechanism of self when this gateway node, in judgement at the appointed time, whether Zigbee protocol stack bottom (protocol layer below middle finger application layer of the present invention) receives the message that confirmation that this routing node 1 returns receives these data, if not, in bottom stack, generate the loss Indication message that this routing node 1 of indication is lost, and this loss Indication message is reported to the ZigBee device object of application layer.The loss Indication message that application program receives from ZigBee device object afterwards, parse out the network information of next-hop node, it is the network information of routing node 1, and the step-out indicator function in Zigbee device object, using the network information of routing node 1 as losing nodal information, and foundation is lost the parameter information generation node loss situation report that nodal information arranges this step-out indicator function, and then this node loss situation report is reported to application, so that application captures the information that this routing node 1 is lost.If the Zigbee protocol stack bottom of this gateway node receives the message that confirmation that this routing node 1 returns receives these data at the appointed time, routing node 1 is described and in network, routing node 1 will carry out the forwarding operation of data, enter step C.
C, routing node 1 receive the data of the transmission of this gateway node, in the network layer of this routing node 1 self protocol stack to this data analysis, the destination node of judging these data is not self, and the next-hop node of confirming these data is routing node 2, routing node 1 is using these data as data to be sent, and these data to be sent are sent to routing node 2, and when determining data to be sent and sending data, open the node loss testing mechanism of routing node 1 self.
D, routing node 1 starts after the node loss trace routine of self, if routing node 2 is lost, in the bottom stack of routing node 1, can not receive the message of definite these data of reception of returning of this routing node 2, and then generate in its bottom stack the loss Indication message that this routing node 2 of indication is lost, and this loss Indication message is reported in ZigBee device object, and then call the step-out indicator function in ZigBee device object, and using the network information of routing node 2 as the information of losing node, the parameter information that this step-out indicator function is set obtains node loss situation report, and this node loss situation report is reported to application, make the application of the application layer of routing node 1 capture the drop-out of routing node 2.
If E routing node 2 is not lost, routing node 2 receives after the data of routing node 1 transmission, routing node 2 is using the data that receive as data to be sent, analyzing these data and determining next-hop node is terminal node 1, routing node 2 sends to terminal node 1 by these data, and starts the node loss testing mechanism of self, determines whether terminal node 1 is lost, the application of this process and routing node 1 obtains the similar process whether routing node 2 is lost, and repeats no more.Certainly, if terminal node 1 is not lost, terminal node 1 can receive the data that this routing node 2 forwards.
By above steps A, can be found out to E, at gateway node, to terminal node 1, send in the process of data, each node in path 1 in Fig. 3 is in the process of transmission or forwarding data, just can in application, catch the loss situation of its next-hop node, without each node, construct and send separately detection data, save data resource consumption, and then also reduced the data volume of transmitting in network.
Wherein, the data that this gateway node sends can be the data of the query node loss situation of its structure, general data or the message that also can use for communication.Arbitrary node in this path 1 captures after its next-hop node loss in application, and this node can, according to the information of the next-hop node obtaining in its application, be notified the loss situation of this next-hop node to other nodes.As, the application of routing node 1 captures after routing node 2 loss, should in the application layer of routing node 1, construct the message that comprises these routing node 2 drop-outs, and this message was sent to gateway node, so that gateway node obtains the drop-out of this routing node 2.
In above application scenarios, with gateway node, to certain leaf node, sending data instance is introduced, therefore, at gateway node, to terminal node 1, send in the process of data, the drop-out of its next-hop node that each node captures in application, is the loss situation information of its child node.That is to say, in above scene, the next-hop node of each node is its child node.
When in Fig. 3, leaf node sends data to gateway node arbitrarily,, on the transmit path of data, the next-hop node of each node is its father node.As, the message that routing node 4 structure destination nodes are gateway node, when this routing node 4 sends this message, the next-hop node of routing node 4 is the father node of routing node 4, it is routing node 3, in the process that routing node 4 sends in data, can start the program of the detection node loss of self, if routing node 3 is lost, in the application of routing node 4, also can capture the information that this routing node 3 is lost.
Certainly, the application that the present invention obtains the method for node loss information is not limited to be sent data or by leaf node, sent the process of data to leaf node by gateway node, while sending data between arbitrary node, the node on data transmit path all can adopt method of the present invention in its application, to capture the loss situation information of its next-hop node.As, the Data Concurrent that routing node 2 structure destination nodes are gateway node send, and, in this data transmission procedure, if routing node 1 is lost, routing node 2 also can capture the drop-out of this routing node 1 in its application.
Corresponding method of the present invention, referring to Fig. 4, the structural representation that shows an embodiment of a kind of system of obtaining node loss information based on Zigbee protocol of the present invention, this system comprises: data transmission unit 410, node loss detecting unit 420 and node loss information reporting unit 430.
Data transmission unit 410, for when needs send data to other nodes, determines next-hop node according to the destination node information in data to be sent, and these data to be sent is sent to next-hop node.
Wherein, when needs send data to other nodes, can comprise multiple situation, can be the construction data of this node outwards transmission; Also can be when this node is in the data that receive other nodes transmissions, after the destination node of definite these data is not this node by analysis, in network layer, needs to determine next-hop node, and then this data retransmission is gone out.
These data to be sent can be arbitrary data, as being the data relevant to Zigbee protocol stack, can be also common communications data of this node or other joint structures etc.
Node loss detecting unit 420, for judging according to the accepting state of these data to be sent whether this next-hop node is lost, and when this next-hop node is lost, generate the loss Indication message that indication next-hop node is lost, and will lose Indication message and report the ZigBee device object of application layer, wherein, lose the network information that comprises described next-hop node in Indication message.
Wherein, the network information of next-hop node can comprise: the network address of this next-hop node, and the correspondence of this next-hop node and this node, as, the information of the father node that the child node that this next-hop node is this node or this next-hop node are this node.Certainly can also comprise the information such as time of determining that this next-hop node is lost.
Node loss information reporting unit 430, for the loss Indication message receiving from ZigBee device object, parse the network information of next-hop node, and the network information of next-hop node is reported to application as losing nodal information, to capture described loss nodal information in application.
When node loss detecting unit detects Zigbee protocol stack bottom and does not receive confirmation that next-hop node returns and receive the information of these data, can generate and lose Indication message at Zigbee protocol stack bottom, and this loss Indication message be reported to the ZigBee equipment of application layer.And the ZigBee device object that node loss detecting unit detects in application layer is while receiving the loss Indication message that this indication next-hop node loses, node loss detecting unit can be using the network information of this next-hop node as losing nodal information, and report the operation of application by losing nodal information, and then make application get the information of losing node.
Referring to Fig. 5, show a kind of structural representation that obtains another embodiment of system of node loss information based on Zigbee protocol of the present invention, be that with the difference of a upper embodiment node loss information reporting unit 430 in this embodiment specifically comprises:
Function calling cell 431, for when receiving loss Indication message at ZigBee device object, calls the step-out indicator function in ZigBee device object.
Parameter set unit 432, be used for using the network information of the next-hop node of loss Indication message as losing nodal information, and according to the parameter information of losing nodal information and arrange described step-out indicator function, generate and comprise the node loss situation report of losing nodal information.
Information capture unit 433, for node loss situation report being reported to the messaging interface of application framework appointment, the loss nodal information in by the messaging interface of this appointment, node loss being reported reports application.
Further, this node loss information reporting unit 430 can also comprise: sign setting unit, and for being set, the task of described node loss situation report processes sign.
Corresponding, this information capture unit 433, can comprise: information reporting subelement, for the task according to this node loss situation report, process sign, and node loss situation report is reported with this task and processed in messaging interface corresponding to sign.
In addition, the mode that in the present invention, whether definite this next-hop node of node loss detecting unit 420 receives these data to be sent has multiple, wherein a kind of mode can be: whether judgement receives the message that confirmation that this next-hop node returns receives described data to be sent at the appointed time, if so, this next-hop node in network; If not, next-hop node is lost.Corresponding, this loss node detecting unit 420 can comprise:
Node loss confirmation unit 421, receives the message of these data to be sent for receiving confirmation that described next-hop node returns in judging whether at the appointed time, if not, next-hop node is lost.
When getting in application, lose after nodal information, can also be according to the loss nodal information getting in application, by the drop-out of this next-hop node, notify other nodes, in order to realize this function, in the system of this embodiment, also comprise: notification unit 440, for the loss nodal information getting according to application, by the drop-out of this next-hop node, notify other nodes.
In this specification, each embodiment adopts the mode of going forward one by one to describe, and each embodiment stresses is the difference with other embodiment, between each embodiment identical similar part mutually referring to.For the disclosed system of embodiment, because it corresponds to the method disclosed in Example, so description is fairly simple, relevant part partly illustrates referring to method.
Above-mentioned explanation to the disclosed embodiments, makes professional and technical personnel in the field can realize or use the present invention.To the multiple modification of these embodiment, will be apparent for those skilled in the art, General Principle as defined herein can, in the situation that not departing from the spirit or scope of the present invention, realize in other embodiments.Therefore, the present invention will can not be restricted to these embodiment shown in this article, but will meet the widest scope consistent with principle disclosed herein and features of novelty.

Claims (12)

1. based on Zigbee protocol, obtain a method for node loss information, it is characterized in that, comprising:
When needs send data to other nodes, according to the destination node information in data to be sent, determine next-hop node, and described data to be sent are sent to described next-hop node;
According to the accepting state of described data to be sent, judge whether described next-hop node is lost, and when described next-hop node is lost, generate the loss Indication message that the described next-hop node of indication is lost, and described loss Indication message is reported to the ZigBee device object of application layer, the network information that comprises described next-hop node in described loss Indication message;
The loss Indication message receiving from described ZigBee device object, parse the network information of described next-hop node, and the network information of described next-hop node is reported to application as losing nodal information, to get described loss nodal information by application.
2. method according to claim 1, it is characterized in that, the described loss Indication message receiving from described ZigBee device object, parse the network information of next-hop node, and described next-hop network information reported to application as losing nodal information, comprising:
When receiving described loss Indication message in ZigBee device object, call the step-out indicator function in ZigBee device object;
Using the network information of the next-hop node in described loss Indication message as losing nodal information, and the parameter information of described step-out indicator function is set according to described loss nodal information, generates and comprise the node loss situation report of losing nodal information;
Described node loss situation report is reported in the messaging interface of application framework appointment, by described messaging interface, the loss nodal information in described node loss situation report is reported to described application.
3. method according to claim 2, is characterized in that, before described node loss situation report is reported to the messaging interface of application framework appointment, also comprises: the task that described node loss situation report is set is processed sign;
Described described node loss situation report is reported in the messaging interface of application framework appointment, comprising:
According to described task, process sign, described node loss situation report is reported with this task and processed in messaging interface corresponding to sign.
4. method according to claim 1, is characterized in that, the described accepting state according to described data to be sent judges that whether described next-hop node is lost, and comprising:
In judging whether at the appointed time, receive the message that confirmation that described next-hop node returns receives described data to be sent, if not, described next-hop node is lost.
5. according to the method described in claim 1 to 4 any one, it is characterized in that the child node that described next-hop node is this node or be the father node of this node.
6. method according to claim 1, is characterized in that, also comprises:
According to the loss nodal information getting in described application, by the drop-out of described next-hop node, notify other nodes.
7. method according to claim 1, is characterized in that, described need to, to other nodes transmission data, comprising:
The destination node that receives other nodes transmissions is not the data of this node;
Or this node construction data also need to send to other nodes.
8. based on Zigbee protocol, obtain a system for node loss information, it is characterized in that, comprising:
Data transmission unit, for when needs send data to other nodes, determines next-hop node according to the destination node information in data to be sent, and described data to be sent is sent to described next-hop node;
Node loss detecting unit, for judging according to the accepting state of described data to be sent whether described next-hop node is lost, and when described next-hop node is lost, generate the loss Indication message that the described next-hop node of indication is lost, and described loss Indication message is reported to the ZigBee device object of application layer, the network information that comprises described next-hop node in described loss Indication message;
Node loss information reporting unit, for the loss Indication message receiving from described ZigBee device object, parse the network information of described next-hop node, and the network information of described next-hop node is reported to application as losing nodal information, to get described loss nodal information by application.
9. system according to claim 8, is characterized in that, described node loss information reporting unit, comprising:
Function calling cell, for when when ZigBee device object receives described loss Indication message, calls the step-out indicator function in ZigBee device object;
Parameter set unit, be used for using the network information of the next-hop node of described loss Indication message as losing nodal information, and according to described loss nodal information, the parameter information of described step-out indicator function is set, generate and comprise the node loss situation report of losing nodal information;
Information capture unit, for described node loss situation report being reported to the messaging interface of application framework appointment, reports described application by described messaging interface by the loss nodal information in described node loss situation report.
10. system according to claim 9, is characterized in that, node loss information reporting unit also comprises: sign setting unit, and for being set, the task of described node loss situation report processes sign;
Described information capture unit, comprising:
Information reporting subelement, for processing sign according to described task, reports described node loss situation report with this task and processes in messaging interface corresponding to sign.
11. systems according to claim 8, is characterized in that, described node loss detecting unit, comprising:
Node loss confirmation unit, receives the message of described data to be sent for receiving confirmation that described next-hop node returns in judging whether at the appointed time, if not, described next-hop node is lost.
12. systems according to claim 8, is characterized in that, also comprise:
Notification unit, for the loss nodal information getting according to described application, notifies other nodes by the drop-out of described next-hop node.
CN201110391507.0A 2011-11-30 2011-11-30 Method and system for acquiring node loss information based on ZigBee protocol Active CN102523594B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110391507.0A CN102523594B (en) 2011-11-30 2011-11-30 Method and system for acquiring node loss information based on ZigBee protocol

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110391507.0A CN102523594B (en) 2011-11-30 2011-11-30 Method and system for acquiring node loss information based on ZigBee protocol

Publications (2)

Publication Number Publication Date
CN102523594A CN102523594A (en) 2012-06-27
CN102523594B true CN102523594B (en) 2014-11-05

Family

ID=46294362

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110391507.0A Active CN102523594B (en) 2011-11-30 2011-11-30 Method and system for acquiring node loss information based on ZigBee protocol

Country Status (1)

Country Link
CN (1) CN102523594B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107231669B (en) * 2016-03-23 2021-04-30 中兴通讯股份有限公司 Data transmission device method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7203743B2 (en) * 2001-12-28 2007-04-10 Nortel Networks Limited Hierarchical tree-based protection scheme for mesh networks
JP4209758B2 (en) * 2003-11-20 2009-01-14 富士通株式会社 Detour communication route design method
CN101141391A (en) * 2007-10-09 2008-03-12 中兴通讯股份有限公司 Method for implementing fault switching
CN101483548B (en) * 2009-02-26 2011-01-19 中国人民解放军信息工程大学 Method and system for distance vector routing protocol self-recovery

Also Published As

Publication number Publication date
CN102523594A (en) 2012-06-27

Similar Documents

Publication Publication Date Title
CN101247321B (en) Method, device and system for routing diagnosis in network based on diameter protocol
CN102664719B (en) Distributed secure transmission method applied to distributed control system (DCS)
Yi et al. Evaluation of routing protocol for low power and Lossy Networks: LOADng and RPL
CN107947994B (en) Network topology self-discovery method and device, network equipment and computer storage medium
EP3766276B1 (en) Methods and nodes for obtaining information regarding a bluetooth mesh network
CN101094121B (en) Method, system and device for detecting Ethernet links among not direct connected devices
CN102035694A (en) Link detection device and method
CN108770009B (en) Link fault positioning method, device, equipment and readable storage medium
Wenning et al. Environmental monitoring aware routing: making environmental sensor networks more robust
CN101729307A (en) Failure detecting method, communication equipment and network system
CN111934936A (en) Network state detection method and device, electronic equipment and storage medium
CN102711159B (en) The method and system of node is lost based on Zigbee protocol process
CN103905268A (en) GRE link detection method and device, main control board and communication protection system
CN102685009B (en) A kind of detection method of multicast transmission path and device
JP5512641B2 (en) Wireless terminal, emergency information distribution system, and program
CN102523594B (en) Method and system for acquiring node loss information based on ZigBee protocol
JP6066292B2 (en) Multifunction information terminal and communication method of mobile ad hoc network architecture
CN114337942B (en) Message retransmission method and device and electronic equipment
US7756160B2 (en) Packet consolidation
CN101478775A (en) Detection method, system and equipment for multi-neighbor connection state
WO2012133857A1 (en) Communication device, path search method and path search program
Ammar et al. From modeling with SysML to simulation with Contiki Cooja simulator of wireless sensor networks
CN110086580A (en) A kind of environment monitoring method and device based on artificial intelligence
Rodenas-Herráiz et al. A handheld diagnostic system for 6LoWPAN networks
CN105700457A (en) Method for intelligent control and automatic monitoring of short-wave communication network remote control cables

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant