Summary of the invention
In view of this; The application provides a kind of control method and wireless network of wireless network; The a plurality of distributed wireless gateways of this method flexible configuration in same wireless sensor network are so that realize each control domain carries out local distributed management and monitoring through the local gateway that connects separately to the data in the on-site wireless sensor network nodes function.
To achieve these goals, the control method of a kind of wireless network of providing of the application is following:
A kind of control method of wireless network; Be applied to have in the wireless network of several radio nodes; It is characterized in that; Be provided with in the said wireless network primary gateway with at least one from gateway, said primary gateway, be connected with each self-corresponding control domain respectively from gateway, this method may further comprise the steps:
Said primary gateway detect in the said wireless network from gateway;
Said primary gateway is set up radio node in the said wireless network to detected from the routed path between the gateway, and is said routed path Resources allocation;
Saidly receive the data of said radio node through said routed path, and the data that receive are sent to the control domain that is connected with self from gateway.
Preferably, said primary gateway detects the detailed process from gateway in the said wireless network and is:
Said primary gateway is sent the broadcast message of equipment in the said wireless network of inquiry;
In the said wireless network all receive said broadcast message from gateway, and after receiving said broadcast message, send the response message that comprises equipment of itself address and gateway type to said primary gateway;
Said primary gateway receives said response message, and reads all device address and gateway types from the response message that gateway sends.
Preferably, when in the said wireless network when gateway just powers on, this method further comprises:
What just power on saidly judges from gateway whether self receives the broadcast message from the primary gateway the said wireless network in Preset Time;
What powered on originally is said when gateway does not receive the broadcast message from primary gateway the said wireless network in Preset Time, and self is switched to primary gateway.
Preferably, during the broadcast message of equipment, this method further comprises in the requester network that other primary gateway is sent in the primary gateway in the said wireless network is received from said wireless network:
Primary gateway in the said wireless network selects a primary gateway as new primary gateway between himself and pairing other primary gateway of broadcast message of receiving, and non-selected primary gateway switches to from gateway.
Preferably, this method further comprises:
Said primary gateway set up said primary gateway and all between the gateway, all are from gateway routed path each other, and are the routed path Resources allocation of being set up;
Said primary gateway and all between the gateway, all send the unicast info that comprises equipment of itself address and gateway type mutually at the routed path that communication dispatch separately passes through in the cycle to be set up each other from gateway;
In the said wireless network each is resolved the unicast info that receives from gateway; The device address and the gateway type of the gateway of all and its communication are noted; Generate the pass address list of throwing the net, and upgrades this gateway address in the cycle at each communication dispatch and tabulate.
Preferably, the method for described renewal gateway address tabulation is:
In the said wireless network from gateway each communication dispatch judge in the cycle device address that comprises the unicast info that receives whether with self gateway address tabulation in the device address of record corresponding one by one;
When the record in self gateway address tabulation not of the device address certain unicast info that certain receives from gateway, then should resolve this unicast info from gateway, this device address and gateway type are added to during self gateway address tabulates;
When certain does not all receive the unicast info from certain device address self gateway address tabulation from gateway at preset communication dispatch in the cycle, then should be from gateway gateway information that this device address is corresponding from self gateway address tabulation deletion.
Preferably, when in the said wireless network from gateway when preset communication dispatch all do not receive the unicast info from the primary gateway the gateway address tabulation in the cycle, this method further comprises:
In the said wireless network from gateway preset communication dispatch week after date from gateway, select one to replace said primary gateway as new primary gateway at all from gateway.
Preferably, the selection course of new primary gateway comprises:
The device address of the primary gateway comparison in the said wireless network self and pairing other primary gateway of broadcast message that receives selects the minimum gateway in device address as new primary gateway;
Perhaps, the gateway address tabulation in the said wireless network from gateway inspection self, the device address of more online gateway selects the minimum gateway in device address as new primary gateway.
Preferably, said radio node is wireless instrument or wireless adapter.
To achieve these goals, the application also provides a kind of wireless network:
A kind of wireless network; Comprise: several radio nodes; It is characterized in that, also comprise in the said wireless network: primary gateway with at least one from gateway, said primary gateway, be connected with said radio node respectively from an end of gateway; The other end is connected with each self-corresponding control domain respectively, wherein:
Said radio node is the terminal of wireless network, is distributed widely in the wireless sensor network, is used for measuring and obtaining data;
One end of said primary gateway is connected with said radio node; The other end is connected with corresponding control domain; Be used to receive the data of said radio node; And be used for detecting said wireless network from gateway, and when detecting from gateway, set up radio node from said wireless network to detected from the routed path the gateway and be said routed path Resources allocation;
A said end from gateway is connected with said radio node, and the other end is connected with corresponding control domain, is used for receiving through said routed path the data of said radio node;
Said control domain is connected with said primary gateway or from gateway to concern one to one respectively; As the external equipment control end of wireless network, be used for said radio node being carried out data communication and management through the said primary gateway that is connected with self or from gateway.
Visible by above technical scheme, the control method of a kind of wireless network that the application provides and wireless network compared with prior art have following beneficial effect:
The application provides a kind of control method and wireless network of wireless network; In industrial wireless sensor network, introduced primary gateway and from the notion of gateway; Flexible configuration realizes a plurality of distributed network gates in same wireless sensor network; Utilization in the gateway monitoring wireless network node data and transmit to being attached thereto the control domain that connects; Utilize primary gateway inquiry regularly and collecting device information and management and scheduling to comprise from the topological sum resource of the whole wireless network of gateway; So just can effectively utilize the node resource in the wireless network, realize that each control domain is directly through being attached thereto local distributed management and the monitoring for the node data in the on-site wireless sensor network of the local gateway that connects.
In addition, respectively also can substitute the function of primary gateway in the wireless sensor network, in network, working, avoid the systemic breakdown that lost efficacy and cause because of gateway in original technology, improve the reliability of system as primary gateway in the primary gateway back of losing efficacy from gateway.
Embodiment
In order to make those skilled in the art person understand the technical scheme among the application better; To combine the accompanying drawing among the application embodiment below; Technical scheme among the application embodiment is carried out clear, intactly description; Obviously, described embodiment only is the application's part embodiment, rather than whole embodiment.Based on the embodiment among the application, those of ordinary skills are not making the every other embodiment that is obtained under the creative work prerequisite, all should belong to the scope of the application's protection.
Embodiment one:
The control method flow chart of a kind of wireless network that Fig. 1 provides for the application embodiment.
In the application embodiment, be provided with in the wireless network primary gateway with at least one from gateway and several radio nodes, and primary gateway, be connected with each self-corresponding control domain respectively from gateway.
The control domain here can be the external equipment Control Network that is used for the node data of monitoring wireless network; Also can be to be used for wireless network server that the node data of wireless network is managed concentratedly, control domain need carry out data interaction through the radio node in gateway and the wireless network.
With reference to shown in Figure 1, this method may further comprise the steps:
S100: primary gateway detect in the wireless network from gateway.
In the prior art; Unique gateway is present in the wireless network as a kind of input or output interface of communication in the wireless network; Be connected with radio node with control domain respectively; Regularly outwards send broadcast message, the topological sum resource of inquiry and collecting device information and management and the whole wireless network of scheduling.
In the present embodiment; Introduced primary gateway and from the notion of gateway; In wireless network, be provided with a primary gateway with at least one from gateway; Transmit by the node data in gateway monitoring wireless network and to being attached thereto the control domain that connects, regularly outwards send broadcast message by primary gateway, inquiry and collecting device information and management and scheduling comprise from the topological sum resource of the whole wireless network of gateway; Therefore need be the topological sum resource of distributing wireless network from gateway by primary gateway, and needed at first before distributing that primary gateway finds to exist in the network from gateway and with respectively get in touch from gateway foundation.
Fig. 2 detects the method flow diagram from gateway for the primary gateway that the application embodiment provides.
With reference to shown in Figure 2, in the application embodiment, step S100 can may further comprise the steps:
S101: primary gateway is sent the broadcast message of equipment in the requester network.
In the application embodiment; It is identical with prior art that primary gateway is sent the action of the broadcast message of equipment in the requester network, can regularly carry out, and also can carry out at interval as required or at preset timed intervals; And the form of broadcast message can be packet or other form here, does not do qualification here.
S102: in all wireless networks from the equal receiving broadcasting information of gateway, and after receiving the broadcast message of primary gateway, send the response message comprise equipment of itself address and gateway type to primary gateway.
In the application embodiment; Gateway in the wireless network each has its fixing device address; It for example is the unique intrinsic address of devices allocation by equipment vendors; And each gateway itself is all preserved the indicating self primary gateway or from the information of gateway identity, and described device address and identity information are used to set up between each gateway of communication to be discerned each other.
S103: primary gateway receives all response messages from gateway, and reads device address and the gateway type in all response messages.
In the application embodiment; Primary gateway can also be to reading respectively writing down and preserve from gateway device address and gateway type of obtaining; The result who preserves can make things convenient for the back to use as other purposes; For example inquiry etc., but that the process of this record is not a present embodiment is necessary, repeats no more at this.
S200: primary gateway is set up radio node in the wireless network to detected from the routed path between the gateway, and is the routed path Resources allocation.
In the prior art, each radio node in the wireless network all has the routed path that leads to gateway, and gateway is through the node data in the routed path monitoring wireless network.
In the application embodiment; Primary gateway according to from the device address of gateway feedback and gateway type confirmed to exist the network from gateway and physical location thereof; Dispatch the topological resource in the wireless network then; Foundation is by routed path and the Resources allocation from gateway of each radio node in the wireless network to this physical location; All have routed path to lead to each till the gateway up to each radio node, said routed path to the passage from gateway transmission data, is used for realizing follow-up from the data decryptor function of gateway for the wireless network radio node as radio node.
S300: pass through the data that routed path receives radio node from gateway, and the data that receive are sent to the control domain that is connected with self.
The control domain here can be the external equipment Control Network that is used for the node data of monitoring wireless network; Also can be to be used for wireless network server that the node data of wireless network is managed concentratedly, control domain need carry out data interaction through the radio node in gateway and the wireless network.
In the prior art; There is and has only a gateway (perhaps redundant a pair of gateway) in the wireless sensor network; The control domain of all external equipments all must be connected to and this unique control domain that (or a pair of) gateway device is connected through the wired or wireless network of one deck with management for the data communication of wireless sensor network node; And then be connected to wireless sensor network node by this control domain through this unique (or a pair of) gateway device and could realize; This just requires whole coverings of upper strata control domain network; Cause the input cost of the network equipment higher, the configuration of network and management are comparatively complicated, can not realize that control domain passes through local distributed management and the monitoring of local gateway for field data.
And in the application embodiment; Each gateway in the wireless network all is connected with each self-corresponding control domain, and all control domains can directly carry out data communication and management for wireless sensor network node through direct-connected local gateway separately.
Therefore; Compared with prior art; This method that the application embodiment provides can realize that each control domain is through local distributed management and the monitoring of local gateway for wireless sensor network data; Simplified the configuration and the management of network, node data in the wireless network has been become be easy to obtain and control.
Embodiment two:
The control method flow chart of the another kind of wireless network that Fig. 3 provides for the application embodiment.
In the actual application of the control method of the wireless network that the foregoing description one is provided; Need be in the state of working on power from gateway for the monitoring of data the radio node; And by primary gateway be power on distribute its routed path from gateway to radio node, and when when gateway just powers on, if do not exist primary gateway or primary gateway to be in failure state in the network; Then this control method can not realize, this just need provide a kind of method of being avoided the control method inefficacy of this wireless network.
Therefore, with reference to shown in Figure 3, on the basis of embodiment one, when when gateway just powers on, this method that present embodiment provides can also may further comprise the steps:
S400: what just power on judges from gateway whether self receives the broadcast message from the primary gateway the wireless network in Preset Time.
S500: powered on originally when gateway does not receive the broadcast message from primary gateway the wireless network in Preset Time, self is switched to primary gateway.
In the application embodiment; After when gateway just powers on, in Preset Time, not receiving the broadcast message of primary gateway; Then self is switched to primary gateway; Replace in the network original primary gateway regularly outwards to send broadcast message, and inquiry and collecting device information and management and scheduling comprise from the topological sum resource of the whole wireless network of gateway, so just solved the problem of primary gateway inefficacy among the embodiment one.
Yet need guarantee in this application has and has only a primary gateway in the network, in order to avoid cause the generation of situation such as network confusion, but in this embodiment.A plurality ofly power on simultaneously if under the situation that primary gateway lost efficacy, have from gateway; Will occur so a plurality ofly all switching to the situation that primary gateway causes existing the network a plurality of primary gateways from gateway; In order to address this problem; After step S500, during the broadcast message of equipment, this method can also comprise in the requester network that other primary gateway is sent in the primary gateway in the said wireless network is received from said wireless network:
S600: the primary gateway in the wireless network selects a primary gateway as new primary gateway between self and pairing other primary gateway of broadcast message of receiving, and non-selected primary gateway switches to from gateway.
In practical application; Primary gateway of said selection can be set according to different needs differences as the method for new primary gateway; Preferably, in the application embodiment, when selecting new primary gateway; Can select according to following rule: the device address of the primary gateway comparison in the wireless network self and pairing other primary gateway of broadcast message that receives, select the minimum gateway in device address as new primary gateway.
Embodiment three:
The control method flow chart of another wireless network that Fig. 4 provides for the application embodiment.
Embodiment two provides before powering on from the gateway primary gateway solution under the failure conditions, and in practical application, the inefficacy of primary gateway possibly occur in any case; Such as being in the state of operational excellence when wireless network; Be under the normal operating conditions that has powered on from gateway, primary gateway power down this moment or broke down when losing efficacy paralyses for fear of network; Safeguard under this kind situation also need be set, increase the reliability of network.
Therefore, with reference to shown in Figure 4, based on above embodiment, the method that present embodiment provides also comprises:
S700: primary gateway set up primary gateway and all between the gateway, all are from gateway routed path each other, and are the routed path Resources allocation of being set up.
In embodiment one; Primary gateway only need be set up in the wireless network each radio node to respectively realizing the monitor function from gateway from the routed path of gateway; In the application embodiment, paralysed because primary gateway lost efficacy for fear of the wireless network that is in the normal operating conditions, need to set up in the security mechanism that detects under the primary gateway failure conditions from gateway; Therefore need set up primary gateway and from writing to each other between the gateway; Also just to need primary gateway be primary gateway and respectively set up routed path and Resources allocation from gateway, simultaneously, respectively loses scheduling from gateway under the primary gateway failure conditions and be absorbed in disturbance state; Also need guarantee also just needs primary gateway for respectively setting up routed path and Resources allocation each other from gateway from the contact of gateway between mutually.
S800: primary gateway and all between the gateway, all send the unicast info that comprises equipment of itself address and gateway type mutually at the routed path that communication dispatch separately passes through in the cycle to be set up each other from gateway.
In the application embodiment; Primary gateway and between the gateway, and only need send the information that shows self location and identity to the other side from gateway communication process each other makes clear and definite oneself existence and the normal operating conditions of the other side; Need not receive the feedback to this information from the other side; Therefore only need to send mutually and receive unicast info to get final product, the form and the broadcast message of this unicast info are similar, can adopt multiple form equally; Preferably, the form of this unicast info is a packet.
S900: each in the wireless network is resolved the unicast info that receives from gateway; The device address and the gateway type of the gateway of all and its communication are noted; Generate the pass address list of throwing the net, and upgrades this gateway address in the cycle at each communication dispatch and tabulate.
In practical application, respectively should be one-to-one relationship the tabulation of self gateway address from gateway type and the device address of each gateway of communication with it that gateway is preserved, can select as required and upgrade the method that this gateway address tabulates.
The flow chart of the gateway address list updating method that Fig. 5 provides for the application embodiment.
With reference to shown in Figure 5, in the application embodiment, the method for the renewal gateway address of selection tabulation can may further comprise the steps:
S901: in the wireless network from gateway each communication dispatch judge in the cycle device address that comprises the unicast info that receives whether with self gateway address tabulation in the device address of record corresponding one by one.
In the application embodiment; The time length in described communication dispatch cycle can be setting wireless network by primary gateway; Also can artificially set as required, for the operating state that detects each gateway in the network in real time with in time take counter-measure, can be set in each communication dispatch and all move this step in the cycle; In practical application, this step also can be set in certain several communication dispatch cycle and accomplish.
S902: when the record in self gateway address tabulation not of the device address certain unicast info that certain receives from gateway, then should resolve this unicast info, this device address and gateway type are added to during self gateway address tabulates from gateway.
S903: when certain does not all receive the unicast info from certain device address self gateway address tabulation from gateway at preset communication dispatch in the cycle, then should be from gateway gateway information that this device address is corresponding from self gateway address tabulation deletion.
In the application embodiment; Receive the unicast info that comprises each gateway device address and gateway type from gateway in cycle at communication dispatch from each gateway; Compare in device address in the gateway address tabulation of preserving the device address of the unicast info that receives and self, unwritten new gateway is added the gateway address tabulation, record was arranged originally but do not receive judge whether in cycle to receive at a preset communication dispatch; If still do not receive; Then that this device address is corresponding gateway address deletion, a preset communication dispatch cycle of being said here also can repeat no more at this through primary gateway or artificial the setting.
In the application embodiment; The systemic breakdown that causes for fear of the primary gateway inefficacy; Need pay close attention to primary gateway, therefore, with reference to shown in Figure 4; When in the said wireless network from gateway when preset communication dispatch all do not receive the unicast info from the primary gateway the gateway address tabulation in the cycle, this method also comprises:
S1000: in the wireless network from gateway preset communication dispatch week after date all from gateway, selects one from gateway replacement primary gateway as new primary gateway.
Similar as the method for new primary gateway with primary gateway of selection described in the foregoing description two, the application does not do any qualification to this method, in practical application; Select a primary gateway can set according to different needs differences as the method for new primary gateway, preferably, in the application embodiment; Preferably; In the application embodiment, when selecting new primary gateway, can select: the gateway address tabulation in the wireless network from gateway inspection self according to following rule; The device address of more online gateway selects the minimum gateway in device address as new primary gateway.
Embodiment four:
A kind of wireless network sketch map that Fig. 7 provides for the application embodiment.
The application also provides a kind of wireless network, and in the application embodiment, this wireless network comprises: control domain, primary gateway, from gateway and wireless sensor network node; Wherein: primary gateway has and has only one, from gateway at least one, remainder quantity does not limit; Primary gateway be identical gateway device from gateway; One end is connected with the control domain of external equipment, and the other end is connected with radio node in the wireless network, why distinguishes primary gateway and from gateway; For no other reason than that the effect of performance is different separately in the application embodiment, thereby in conceptive difference to some extent.
With reference to shown in Figure 7, in the application embodiment:
Radio node is the terminal of wireless network, is distributed widely in the wireless sensor network, is used for measuring and obtaining data.
One end of primary gateway is connected with radio node; The other end is connected with corresponding control domain; Be used to receive the data of radio node; And be used for detecting wireless network from gateway, and when detecting from gateway, set up radio node from wireless network to detected from the routed path the gateway and be the routed path Resources allocation.
Be connected with radio node from an end of gateway, the other end is connected with corresponding control domain, is used for receiving through routed path the data of radio node.
Control domain is connected with primary gateway or from gateway with relation one to one respectively, as the external equipment control end of wireless network, is used for through the primary gateway that is connected with self or from gateway radio node being carried out data communication and management.
In the application embodiment; Wireless sensor network node is generally wireless instrument or wireless adapter, as the terminal of wireless network, is used for measuring and obtaining data; Control domain is through carrying out communication with self direct-connected gateway and wireless sensor network node; Data in the radio node are diagnosed and managed, and primary gateway is regularly outwards sent the broadcast message of equipment in the requester network, when primary gateway detect in the network from gateway the time; For from gateway distribution network topological sum resource, thereby can utilize the node data the routed path monitoring wireless network that primary gateway distributes and send to the control domain of correspondence from gateway.
Simultaneously, primary gateway and between the gateway and each other can mutual communication, when finding when powering on that from gateway primary gateway lost efficacy from gateway; Can automatically switch to new primary gateway; When primary gateway with all be in normal operating conditions primary gateway of following time from gateway and lost efficacy, then select the primary gateway that makes new advances through predetermined manner from gateway, replace original primary gateway work; Can avoid the paralysis of wireless network, improve the reliability of system.
Predetermined manner described here can be for multiple; Such as being chosen in the minimum or maximum gateway in device address that gauze closes as new primary gateway etc.; Preferably, in the application embodiment, predetermined manner is: the gateway address tabulation from gateway inspection self in the wireless network; The device address of more online gateway selects the minimum gateway in device address as new primary gateway.
In addition; In order to guarantee the orderly function of wireless network; Need to guarantee that the primary gateway in the netting twine network has and have only one; And above-mentioned respectively all changeable for the method for primary gateway causes occurring simultaneously the network a plurality of primary gateways easily from gateway, therefore when primary gateway detects in the network other primary gateway of existence, can also select a new primary gateway through predetermined manner.
Predetermined manner described here can be for multiple; Such as being chosen in the minimum or maximum gateway in device address that gauze closes as new primary gateway etc.; Preferably; In the application embodiment, predetermined manner is: the device address of the primary gateway comparison in the wireless network self and pairing other primary gateway of broadcast message that receives, and select the minimum gateway in device address as new primary gateway.
The control method of a kind of wireless network that is provided by above the application and wireless network are visible, and method that the application provides and network compared with prior art have following beneficial effect:
The control method of a kind of wireless network that the application provides and wireless network; In industrial wireless sensor network, introduced primary gateway and from the notion of gateway; The a plurality of distributed network gates of flexible configuration in same wireless sensor network; Utilization in the gateway monitoring wireless network node data and transmit to being attached thereto the control domain that connects; Utilize primary gateway inquiry regularly and collecting device information and management and scheduling to comprise from the topological sum resource of the whole wireless network of gateway; So just can effectively utilize the node resource in the wireless network, realize that each control domain is directly through being attached thereto local distributed management and the monitoring for the node data in the on-site wireless sensor network of the local gateway that connects.
In addition, respectively also can substitute the function of primary gateway in the wireless sensor network, in network, working, avoid the systemic breakdown that lost efficacy and cause because of gateway in original technology, improve the reliability of system as primary gateway in the primary gateway back of losing efficacy from gateway.
Need to prove; The above only is a part of preferred embodiment of present techniques scheme; Make those skilled in the art can make much of or realize the application; Rather than whole embodiment, defined General Principle can realize under the situation of spirit that does not break away from the application or scope in other embodiments among this paper.Therefore, based on above embodiment, for those skilled in the art; Do not break away from the application's principle, do not making under the creative work prerequisite, can also make multiple conspicuous modification and retouching; Through the every other embodiment that these modification and retouchings obtained; Can be applied to the present techniques scheme, these do not influence the application's realization, all should belong to the application's protection range.Therefore, the application will can not be restricted to these embodiment shown in this paper, but will meet and principle disclosed herein and features of novelty the wideest corresponding to scope.