Background technology
Along with the fast development of radio network technique, the application of increasing wireless sensor network is dispersed throughout in the life of people, such as: the detection of surrounding air cleanliness, temperature/humidity detection, wind direction detection or the various data renewals etc. of public place.People plan to dispose substantial amounts of sensor node in target area, and these nodes can work some months or several years without maintenance.In these environment, battery replacement and manual powered almost cannot apply in practice.Accordingly, it is capable to source service efficiency is crucial.In many actual application, the collection of sensor measurement data is typically every several hours the most several days.Therefore, measurement data itself, such as temperature and humidity, only can represent by a numeral, the lowest data transfer rate.
For meeting the demand, the IEEE802.15.4 agreement in conventional art is that low rate wireless personal-area network specifies MAC sublayer and physical layer, and its target is the wireless network application of low rate, low energy consumption, low cost.
IEEE802.15.4 network in conventional art includes two kinds of nodes: coordinator and general node.General node is used for gathering sensing data;Coordinator is compared with general node, and in addition to directly participating in application, member identities to be completed management, link-state information manage and be grouped the tasks such as forwarding.
IEEE802.15.4 agreement provides beacon and enables communication pattern, it is allowed to periodically wake and node synchronous calibration.This pattern can play the effect of energy efficient for low-load cycle applications, and node can save energy in the most of the time in a dormant state.
Beacon enables communication pattern and defines the form of one " superframe ", coordinator superframe start send beacon frame, the inside is containing some sequential and the information of network, followed by contention access period, the most each node accesses channel with competitive way, followed by non-competing access period, node uses time-multiplexed mode to access channel, in followed by inactive period, node enters resting state, waits the beacon frame that next super frame period sends.
All nodes of the IEEE802.15.4 network in conventional art all work on the same channel, if neighbouring node sends data and is possible to clash simultaneously.Therefore, the CSMA/CA of all data separate timesharing exchanges between node and coordinator.
In IEEE802.15.4 agreement in conventional art, coordinator by the mode of time-division with node communication, but at most can only distribute 7 protection time slots to general node-node transmission data.Therefore, when a large amount of general nodes are simultaneously to coordinator request distribution protection time slot, the packet loss that blocks up can be caused.And in the case of beacon interval (time interval between twice adjacent beacon frame of transmission) is very big, the consumption keeping beacon synchronization is big, it is difficult to after synchronization loss recover to synchronize, causes traditional self-adaption wireless network method of attachment to there is the problem that efficiency of transmission is low.
Therefore, it is necessary to propose a kind of new self-adaption wireless network method of attachment and system to solve the problems referred to above.
Summary of the invention
The invention provides a kind of transmission speed transmission method realizing wireless network high, convenient and swift and system.
The present invention adopts the following technical scheme that
A kind of self-adaption wireless network method of attachment, described wireless network includes coordinator and the general node being connected with coordinator, below compares claims described transmission method of modifying and comprises the steps of
Step 001: the working hour of coordinator is divided into the sequence of time slots being made up of continuous slot, and is numbered the time slot in described sequence of time slots, the numbered sequence of the numbering composition of described time slot has periodically;
Step 002: the coordinator worked in the time slot in described sequence of time slots is invented the virtual coordinator corresponding with described time slot, and numbers the corresponding same virtual coordinator of identical time slot;
Step 003: the general node of current active sends connection request to described virtual coordinator;
Step 004: the quantity of the general node that the virtual coordinator of current active has connected according to each virtual coordinator sends connection request return information to the general node of current active;
Step 005: set up between described general node with described virtual coordinator and be connected and be transmitted data.
Preferably, the beacon interval of adjacent two virtual coordinators is identical.
Preferably, in described sequence of time slots, the time slot corresponding with described virtual coordinator is the active stage of described virtual coordinator, the maximum of the active stage length of active stage a length of all virtual coordinators of the virtual coordinator that the time slot the first with described sequence of time slots is corresponding.
Preferably, the implementation method of step 003 includes:
The general node of described current active is after receiving the beacon frame of virtual coordinator for the first time, randomly choose a virtual coordinator and enter dormancy, when the virtual coordinator randomly choosed described in until starts to send beacon frame, the general node of current active stops dormancy;
The general node of described current active receive described in after the beacon frame of virtual coordinator that randomly chooses, send connection request to the described virtual coordinator randomly choosed.
Preferably, the mode using carrier sense collision free sends connection request to the described virtual coordinator randomly choosed.
Preferably, also include after described step 004:
Determine that numbering is minimum and connected the number of nodes virtual actuator numbering less than maximum connectable device quantity;
After the general node of current active receives described connection request return information, number corresponding virtual coordinator with the virtual coordinator in return information and be successfully established connection.
Preferably, in described step 005, general node is set up with described virtual coordinator after being connected, and shortens the length in described sequence of time slots cycle.
Preferably, the method for the length in described shortening described sequence of time slots cycle includes: the quantity of the virtual coordinator that described coordinator is not zero according to the general number of nodes of connection, cancels part and connects the time slot of the virtual coordinator that number of nodes is zero.
nullA kind of self-adaption wireless network connection system,Including coordinator and the general node that is connected with coordinator,Working hour is divided into the sequence of time slots being made up of continuous slot by described coordinator,And the time slot in described sequence of time slots is numbered,And the coordinator worked in the time slot in described sequence of time slots is invented the virtual coordinator corresponding with described time slot,And number the corresponding same virtual coordinator of identical time slot,The numbered sequence of the numbering composition of described time slot has periodically,Wherein,The general node of current active is when described virtual coordinator sends connection request,The quantity of the general node that the virtual coordinator of current active has connected according to each virtual coordinator sends connection request return information to the general node of current active,To set up the connection between described general node and described virtual coordinator,And transmit data.
Preferably, described self-adaption wireless network connection system can be used for electronic bin tag system, described general node is the electronic shelf label using wireless telecommunications, the merchandise newss such as described coordinator is the wireless repeater of the pricing information in order to forwarding electronic shelf label, the price that electronic shelf label can be shown after receiving the information that described wireless repeater sends by described electronic shelf label are updated.
It is an advantage of the current invention that: the self-adaption wireless network method of attachment of the present invention, to the virtual coordinator forming multiple continuous work after a coordinator time division multiplex, each virtual coordinator both defines active stage or the time slot of oneself, so that the number of coordinator is extended, enabling be transmitted with more general nodes.Decrease the collision probability that the request of general node connects, accelerate connection speed and networking speed, thus reduce due to many concurrent caused packet loss that block up.
Simultaneously, owing to the general node of current active is when virtual coordinator sends connection request, the quantity of the general node that the virtual coordinator of current active has connected according to each virtual coordinator sends connection request return information to the general node of current active, to set up connection therebetween and to transmit data.All general nodes are connected by the virtual coordinator that overall arrangement is minimum with numbering, the general nodes only connected when certain virtual coordinator numbered reaches maximum number of connections amount, general node later just can be allowed to connect the virtual coordinator of next one numbering, this ensure that the peak use rate of virtual coordinator.Therefore, this kind of adaptive self-adaption wireless network method of attachment, it is particularly well-suited to the MANET application that the starting stage general number of nodes to needing connection is unknown, i.e. during the initialization of MANET, more virtual coordinator is set, thus reduce numerous general node and send the conflict of connection request, quickly networking.After all general nodes complete to connect, then adjust the quantity of virtual coordinator to the magnitude being suitable for, the efficiency of transmission of raising network.
Detailed description of the invention
In order to make the purpose of the present invention, technical scheme and advantage clearer, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
As it is shown in figure 1, a kind of self-adaption wireless network method of attachment, comprise the following steps:
Step S001: the working hour of coordinator is divided into the sequence of time slots being made up of continuous slot, and the time slot in this sequence of time slots is numbered, and the numbered sequence of the numbering composition of time slot has periodically.
In the present embodiment, wireless network is wireless sensor network based on IEEE802.15.4 agreement, including coordinator and general node.General node is the sensor for detecting environmental change, and coordinator is compared with general node, is applied not only to detect environmental change, also as the via node of detection data transmission.
In the present embodiment, being divided into the sequence of time slots with multiple time slot according to time-multiplexed mode the working hour of coordinator, each time slot in sequence of time slots has a numbering, and the numbered sequence that numbering corresponding to time slot is constituted has periodically.In the lump with reference to Fig. 2, the cycle of numbered sequence is K, therefore, it is possible to claim sequence of time slots to have periodically, K time slot in one cycle of sequence of time slots distinguish the most numbered 0,1,2 ..., K-1.
Step S002: the coordinator worked in the time slot in sequence of time slots is invented the virtual coordinator corresponding with this time slot, and numbers the corresponding same virtual coordinator of identical time slot.
In the present embodiment, as in figure 2 it is shown, same coordinator (actual device) is in when working in the different time-gap in aforesaid periodic sequence of time slots, become K virtual coordinator by virtual.Number the corresponding same virtual coordinator of identical time slot, that is, virtual coordinator is also numbered as 0,1,2 ..., i ..., K-1, the most numbered i virtual coordinator corresponding with the time slot of all numbered i in sequence of time slots, i is any one numbering of 1 to K-1.In other embodiments, it would however also be possible to employ random digit, random string is numbered.
The time slot corresponding with certain virtual coordinator is the active stage of this virtual coordinator, and the time slot the most corresponding with certain virtual coordinator is the nonmobile phase of this virtual coordinator.It is to say, the continuous print work process of a coordinator to be invented K the virtual coordinator process in different time-gap alternation, it it is a kind of time-multiplexed mode.
The virtual coordinator defining the time slot the first with being positioned at sequence of time slots corresponding is initial virtual coordinator.The active stage of initial virtual coordinator is the initial active phase.The most same virtual coordinator of beacon interval of virtual coordinator continuously transmits the time interval between twice beacon frame.
In the present embodiment, as it is shown on figure 3, the virtual coordinator in initial virtual coordinator that is No. 0 (numbered 0).Preferably, the beacon interval of all virtual coordinators is identical.The active stage length of virtual coordinator is the duration of certain time slot with this virtual coordinator with identical numbering.Preferably, the maximum of the active stage length of the active stage of initial virtual coordinator a length of all virtual coordinators.
K virtual coordinator works the most successively according to the order of numbering.That is, number bigger virtual coordinator and enter active stage, due to the periodicity of sequence of time slots, during an end cycle after the virtual coordinator that previous numbering is less enters nonmobile phase, when i.e. No. K-1 virtual coordinator enters nonmobile phase, No. 0 virtual coordinator is again introduced into active stage.
As shown in Figure 3 and Figure 4, the active stage of virtual coordinator, is divided into three time periods: broadcast beacon frame period, competition period and uncontested period.
In the broadcast beacon frame period, virtual coordinator broadcast beacon frame, beacon frame is for the clock of each node of synchronous radio network and to general node broadcasts announcement information.
The competition period is for receiving the protection time slot assignment request of general node.All general nodes section can only send protection time slot assignment request to virtual coordinator at this moment.
The non-competing period transmits for data, is divided into multiple protection time slot, preferably less than 7.The transformation task of one corresponding general node of protection time slot, time a length of general node of i.e. one protection time slot transmits the unit length of the time of data to virtual coordinator.If data volume is big, virtual coordinator can also be that certain general node distributes multiple protection time slots.It is to say, each virtual coordinator its active stage as the beacon enable pattern of IEEE802.15.4 agreement in being operated of coordinator independence of defined.
In the present embodiment, numbered K virtual coordinator order by number sequentially enters active stage, and to general node broadcasts beacon frame.From the time-multiplexed description previously with regard to coordinator, the same virtual coordinator of time only one of which is in active stage, and after a virtual coordinator enters nonmobile phase, another virtual coordinator enters active stage.
The beacon frame of broadcast mainly has two effects: notify that this virtual coordinator of each general node has been enter into active stage and will enter the competition period;Each general node and virtual coordinator synchronised clock, to ensure that communication will not make mistakes.
Step 003: the general node of current active sends connection request to virtual coordinator.
The method that general node sends connection request to virtual coordinator includes the following:
The general node of current active, after receiving for the first time the beacon frame of virtual coordinator, randomly chooses a virtual coordinator and enters dormancy, until described in the virtual coordinator that randomly chooses when starting to send beacon frame, the general node of current active stops dormancy;
The general node of current active receive described in after the beacon frame of virtual coordinator that randomly chooses, first synchronised clock, if the demand of the oriented virtual coordinator transmission data randomly choosed, the then competition period in this virtual coordinator active stage randomly choosed, send connection request to the described virtual coordinator randomly choosed.Preferably, the general node of current active sends connection request to virtual coordinator in the way of carrier sense collision free.
In the present embodiment, if virtual coordinator does not agree to the connection request of described general node, then general node waits several initial active after dates, restarts channel detecting, after the beacon frame receiving the broadcast of virtual coordinator, send connection request to virtual coordinator.The number of initial active phase waited is random integers, and more than 0 and be less than numbered sequence a cycle in the number of numbering.
For having the network of multiple coordinator, if general node connects certain coordinator failure, it is also possible to after the beacon frame receiving the broadcast of other coordinators, select to connect other coordinator.
The general node being successfully connected with virtual coordinator, is referred to as the child node of this virtual coordinator.
Step S004: the quantity of the general node that the virtual coordinator of current active has connected according to each virtual coordinator sends connection request return information to the general node of current active, and its step also includes:
Virtual coordinator receives after current general node sends connection request, agrees to that the connection request of current general node can be informed that in connection request return information numbering is minimum and connect the number of nodes numbering less than the virtual coordinator of maximum connectable device quantity;
After the general node of described current active receives connection request return information, number with the virtual coordinator in return information and be successfully established connection with corresponding virtual coordinator.
Step 005: be successfully established between described general node with described virtual coordinator after being connected, can carry out data transmission.In this preferred embodiment, typically it is successfully established after being connected between node with described virtual coordinator, coordinator is according to the quantity connecting the virtual coordinator that general number of nodes is not zero, cancel part and connect the time slot of the virtual coordinator that number of nodes is zero, to shorten the length in described sequence of time slots cycle.
In the present embodiment, the request that the requirement distribution protection time slot of general node carries out data transmission can meet with a response when protecting time slot assignment request to send successfully, virtual coordinator even at active stage cannot be this general node distribution protection time slot within the current active phase, but virtual coordinator can be by scheduling, the protection time slot of other virtual coordinators is distributed to this general node in the way of " reservation ", the competition period making this general node not be used in each virtual coordinator active stage is iteratively transmitted on protecting time slot assignment request, thus decrease general node and send the number of times of protection time slot assignment request, reduce the degree of Congestion of network.
Further, the numbering of this general node its virtual coordinator " preengage " and the transmission time of beacon frame due to virtual coordinator prior notice, therefore this general node can carry out dormancy before this virtual coordinator " preengage " enters active stage, i.e. close channel-monitoring and some other for data transmission the preparation that carries out, and wake up up again when will enter active stage to the virtual coordinator of " reservation ".This dormancy and the mode waken up up can further reduce the energy loss of general node, thus increase the energy flying power of general node.
nullA kind of system applying above-mentioned self-adaption wireless network method of attachment,Including coordinator and the general node that is connected with coordinator,Working hour is divided into the sequence of time slots being made up of continuous slot by described coordinator,And the time slot in described sequence of time slots is numbered,And the coordinator worked in the time slot in described sequence of time slots is invented the virtual coordinator corresponding with described time slot,And number the corresponding same virtual coordinator of identical time slot,The numbered sequence of the numbering composition of described time slot has periodically,The general node of current active is when described virtual coordinator sends connection request,The quantity of the general node that the virtual coordinator of current active has connected according to each virtual coordinator sends connection request return information to the general node of current active,To set up the connection between described general node and described virtual coordinator,And transmit data.
Preferably, self-adaption wireless network connection system can be used for electronic bin tag system, described general node is the electronic shelf label using wireless telecommunications, the merchandise newss such as described coordinator is the wireless repeater of the pricing information in order to forwarding electronic shelf label, the price that electronic shelf label can be shown after receiving the information that described wireless repeater sends by described electronic shelf label are updated.
The foregoing is only presently preferred embodiments of the present invention, not in order to limit the present invention, all any amendment, equivalent and improvement etc. made within the spirit and principles in the present invention, should be included within the scope of the present invention.