A kind of conversion method of wireless sensor network protocols
Technical field
The invention belongs to wireless communication technology field, relate in particular to a kind of conversion method of wireless sensor network protocols.
Background technology
Wireless sensor network is made up of the miniature node of a large amount of low-power consumption, low rate, low cost, low complex degree, adopts the multi-hop mobility peer-to-peer network of communication and dynamic group net, has self and self-healing ability.Utilize sensor network can realize that the collection of data is merged, transmission is used and the Long-distance Control visit,, thereby improve people's quality of life and operating efficiency for the user provides information needed.
To the demand of this low rate, low-cost wireless network, in December, 2000, IEEE set up IEEE802.15.4 working group, was devoted to define the wireless connect technology of a kind of cheapness, portable, mobile, low-cost, low complex degree, low energy consumption and low rate.IEEE802.15.4 has mainly formulated physical layer and MAC agreement, and outstanding advantage is: networking capability is strong, and is widely applicable, and reliability is high, good energy saving property.It has defined two physical layer standards, is respectively 2.4GHz physical layer and 868/915Mhz physical layer, and each frequency range provides different data transmission rates; Functions such as automatic frame acknowledgment and data check are provided.MAC layer channel access mechanism is CSMA/CA; Support Beacon (beacon) and two kinds of mode of operations of Beaconless (no beacon).In the 2.4GHz ISM band, defined 16 channels, the wide 3MHz of each channel, channel center is spaced apart 5MHz, makes the frequency interval that leaves 2MHz between adjacent channel.802.15.4 agreement has obtained using widely in wireless sensor network.Though the IEEE802.15.4 agreement has flexibly, fast, the advantage of low cost and low-power consumption, in the face of transmission range is long, data volume is big or when needing the emergency message of response fast, it is unable to do what one wishes to seem.
In wireless-transmission network, another kind of common wireless transmission protocol is IEEE 802.11b.At 802.11 protocol definitions on the basis of physical layer and MAC layer, 802.11b is as replenishing version, defined on the 2.4GHz frequency range data transfer rate up to the physical layer of 11Mbps.802.11b WLAN has been introduced CSMA/CA mechanism.Having with hundred meters is the transmission range of unit.In addition, 802.11b also has scalability, and maximum three accessing points can be positioned in effective scope of application simultaneously, uses the voice-and-data interactive information simultaneously to support up to a hundred users.Communication between two equipment can be adopted the Ad-hoc mode, also can be in the base station (Base Station, BS) or accessing points (Access Point carries out under coordination AP).IEEE 802.11b protocol technology is full-fledged; And have better fail safe and network service quality assurance compared with IEEE 802.15.4; Have more fail safe and high efficiency; Especially for the bigger data of data volumes such as image, audio frequency, perhaps need make the transmission of the emergency message of response fast, have very big advantage.
The IEEE802.15.4 agreement has different performance characteristics with IEEE 802.11b agreement, can satisfy the requirement of different pieces of information service in the wireless sensor network, and Fig. 1 is the performance comparison sheet of two kinds of agreements.In wireless sensor network, the transmission of various data all has different service requests, in order to improve service quality, to need a kind of mechanism and comes to be every kind of services selection agreement more suitably.
Summary of the invention
The objective of the invention is to; Make the sensor node of supporting IEEE802.15.4 agreement and IEEE 802.11b agreement according to wireless sensor network transmission service and transmission type of data; Adopt different communication protocol to communicate, thereby improve network transmission performance.
Technical scheme is: a kind of conversion method of wireless sensor network protocols is characterized in that said method comprises the following steps:
Step 1: the sensor node memory address binding information of supporting two agreements;
Step 2: support the sensor node of two agreements to confirm the required agreement of transmission data;
Step 3: after carrying out handled according to transmission data required agreement, return step 2.
The sensor node of the two agreements of said support specifically is a sensor node of supporting IEEE 802.15.4 agreement and IEEE802.11b agreement.
The sensor node memory address binding information of the two agreements of said support specifically comprises:
Step 11: support the sensor node of two agreements to create an address binding table;
Step 12: support the sensor node of sensor node two agreements of other supports in wireless network of two agreements to send broadcast packet, confirm IEEE 802.15.4 protocol address and IEEE 802.11b protocol address that other support the sensor node of two agreements;
Step 13: support the sensor node of sensor node two agreements of other supports in wireless network of two agreements to send bind request; Request binds together the calculated address binding information with oneself IEEE 802.15.4 protocol address and IEEE 802.11b protocol address through pointer;
Step 14: after the sensor node of the two agreements of support is received request, support the address binding information stores of the sensor node of two agreements to arrive the address binding table self and other.
Said address binding table comprises field: sensor node sign, IEEE 802.15.4 protocol address and the IEEE 802.11b protocol address of supporting two agreements.
The sensor node of the two agreements of said support confirms that the required agreement of transmission data specifically comprises:
Step 21: sensor node resolution data type and the COS from the packet that receives of supporting two agreements;
Step 22:, judge whether data waiting for transmission are sensed data, if then execution in step 23 according to data type; Otherwise be non-sensed data, execution in step 25;
Step 23: according to COS, judge whether sensed data is emergency message, if then transmitting the required agreement of data is IEEE 802.11b agreement; Otherwise, execution in step 24;
Step 24: relatively adopt IEEE 802.15.4 protocol transmission data and the energy consumption that adopts IEEE 802.11b protocol transmission data to be produced; If adopt IEEE 802.11b protocol transmission data energy consumption less, then transmitting the required agreement of data is IEEE 802.11b agreement; Otherwise, execution in step 25;
Step 25: judge whether buffer area is sent in the sensor node judgement of supporting two agreements full, if full, then transmitting the required agreement of data is IEEE 802.11b agreement; Otherwise the required agreement of transmission data is an IEEE 802.15.4 agreement.
Said sensed data specifically is meant: the big data that perhaps need long Distance Transmission of data volume comprise temperature, humidity, pressure, image, audio frequency.
Said non-sensed data specifically is meant: data volume is little and need not the data of long Distance Transmission, comprises networking request, announcement, control information, bind request.
Other support the sensor node transmission broadcast packet of two agreements specifically to be to the sensor node of the two agreements of said support in wireless network, and the sensor node of the two agreements of support adopts IEEE 802.11b agreement, and other support the sensor node transmission broadcast packet of pair agreements in wireless network.
Saidly carry out handled specifically according to transmission data required agreement:
When transmission data required agreement is IEEE 802.15.4 agreement, support the sensor node of two agreements need to judge whether translation-protocol, if need not translation-protocol, be that the packet of IEEE 802.15.4 form sends out then with data encapsulation; Translation-protocol if desired then with the effective information in the former packet, is write in the packet of IEEE 802.15.4 form and is sent out;
When the required agreement of transmission data is IEEE 802.11b agreement, support the sensor node of two agreements need to judge whether translation-protocol, if need not translation-protocol, then directly former packet is sent out; Translation-protocol if desired then encapsulates data in the packet of IEEE 802.11b form and sends out.
Said effective information comprises: IEEE 802.15.4 source address, destination address, payload user data.
The effect of invention is, solved the protocol conversion problem of IEEE 802.15.4 and IEEE 802.11b in the wireless sensor network, and the efficiency of transmission of raising wireless sensor network cuts down the consumption of energy, and improves the performance of network.
Description of drawings
Fig. 1 is IEEE802.15.4 agreement and IEEE 802.11b protocol capabilities comparison sheet;
Fig. 2 is a system assumption diagram of realizing wireless sensor network of the present invention;
Fig. 3 is an address binding table of supporting the sensor node of two agreements;
Fig. 4 supports the sensor node of two agreements to confirm the required protocol flow chart of transmission data;
Fig. 5 is IEEE802.15.4 agreement and IEEE 802.11b agreement energy consumption sketch map.
Embodiment
Below in conjunction with accompanying drawing, preferred embodiment is elaborated.Should be emphasized that following explanation only is exemplary, rather than in order to limit scope of the present invention and application thereof.
Fig. 2 is a system assumption diagram of realizing wireless sensor network of the present invention.Fig. 2 has described the architecture of the wireless sensor network with protocol conversion mechanism.Contain single protocol node and two protocol nodes in the network, single protocol node only possesses IEEE 802.15.4 agreement, and two protocol node has the port of IEEE 802.15.4 and two kinds of agreements of IEEE 802.11b, is responsible for the implementation agreement conversion.Among Fig. 2, all nodes distribute fixing and are evenly distributed in the monitored area relatively.
Practical implementation process of the present invention is:
Comprise the following steps:
Step 1: support the sensor node memory address binding information of two agreements, specifically:
Step 11: support the sensor node of two agreements to create an address binding table.
Step 12: support the sensor node of sensor node two agreements of other supports in wireless network of two agreements to send broadcast packet, confirm IEEE 802.15.4 protocol address and IEEE 802.11b protocol address that other support the sensor node of two agreements.
Step 13: support the sensor node of sensor node two agreements of other supports in wireless network of two agreements to send bind request; Request binds together the calculated address binding information with oneself IEEE 802.15.4 protocol address and IEEE 802.11b protocol address through pointer.
Among Fig. 2, the 802.15.4 address of two protocol nodes 1 is 3ffe:3240:8007:1004::1009, and the address of 802.11b is 2001:da8:205:fe8e::1009; This node is accomplished after the networking through 802.15.4, sends the broadcast message of 802.11 agreements, finds another pair protocol node 2; Send the address binding request to node 2 more afterwards; Comprise its 802.11 address in the bind request bag, each node all can be created an address binding table, is used for storage oneself and other address of node binding informations; Can represent with the form of chained list, save memory space.
Step 14: after the sensor node of the two agreements of support is received request, support the address binding information stores of the sensor node of two agreements to arrive the address binding table self and other.
Fig. 3 is an address binding table of supporting the sensor node of two agreements, and wherein PAN is the unique identification of sensor network nodes.
Step 2: support the sensor node of two agreements to confirm the required agreement of transmission data.Fig. 4 supports the sensor node of two agreements to confirm the required agreement flow chart of transmission data, confirms that the required agreement detailed process of transmission data is:
Step 21: sensor node resolution data type and the COS from the packet that receives of supporting two agreements.
Step 22:, judge whether data waiting for transmission are sensed data, if then execution in step 23 according to data type; Otherwise be non-sensed data, execution in step 25.
Sensed data specifically is meant: the big data that perhaps need long Distance Transmission of data volume comprise temperature, humidity, pressure, image, audio frequency.At this moment need further to judge.
Non-sensed data specifically is meant: data volume is little and need not the data of long Distance Transmission, comprises networking request, announcement, control information, bind request.The data volume of this type data is all very little, and need not long Distance Transmission, in most cases adopts IEEE 802.15.4 protocol transmission to meet the demands, but when the buffer area of the sensor node of supporting two agreements has been expired, then will adopt IEEE 802.11b agreement.
Step 23: according to COS, judge whether sensed data is emergency message, if then transmitting the required agreement of data is IEEE 802.11b agreement; Otherwise, execution in step 24.
When running into major accident, disaster early warning, emergency, can message send to specified node fast and accurately and count for much.The transmission of isometric distance, IEEE 802.11b agreement has overwhelming superiority compared with IEEE 802.15.4 agreement.For this special sensed data, adopt IEEE 802.11b protocol transmission.Emergency message is to be sent by the specified sensor node, and in a single day this category node monitors abnormal data, just adopts the IEEE802.11b agreement.
Step 24: relatively adopt IEEE 802.15.4 protocol transmission data and the energy consumption that adopts IEEE 802.11b protocol transmission data to be produced; If adopt IEEE 802.11b protocol transmission data energy consumption less, then directly adopt IEEE 802.11b protocol transmission data; Otherwise, execution in step 25.
Adopt IEEE 802.15.4 protocol transmission data and the energy that adopts IEEE 802.11b protocol transmission data consumes, determine by the transmission range of jumping figure, valid data field length, every jumping and the average transmit power of 802.15.4 agreement or 802.11b agreement.Wherein, the valid data field length is meant and in packet, removes the field that packet header, address etc. take, the field length that real data takies.
Fig. 5 is IEEE802.15.4 agreement and IEEE 802.11b agreement energy consumption sketch map.Among Fig. 5,, therefore can be less than the jumping figure of IEEE802.15.4 agreement from the jumping figure of node 3 to node 4 owing to IEEE 802.11b protocol transmission distance.But; Because the average transmit power of IEEE802.15.4 is less than the average transmit power of IEEE802.11b agreement; Therefore; When comparing IEEE802.15.4 agreement and IEEE 802.11b agreement ability consumption energy consumption, take all factors into consideration the average transmit power of transmission range and the 802.15.4 agreement or the 802.11b agreement of jumping figure, valid data field length, every jumping.
Step 25: judge whether buffer area is sent in the sensor node judgement of supporting two agreements full, if full, then transmitting the required agreement of data is IEEE 802.11b agreement; Otherwise the required agreement of transmission data is an IEEE 802.15.4 agreement.
Adopting IEEE 802.15.4 protocol transmission data after a period of time, network burden can progressively increase the weight of, and when the transmission buffer area has been expired, can IEEE 802.11b agreement be carried out transfer of data as host-host protocol, in order to share network burden.Block up and judge that through data transmission buffer area the data transmit queue is full when pointing to, and shows that then network is in congestion status now, need use IEEE 802.11b protocol transmission instead.
Step 3: carry out handled according to the required agreement of transmission data.
When the required agreement of transmission data is IEEE 802.15.4 agreement; Support the sensor node of two agreements need to judge whether translation-protocol; If the agreement that the sensor node of the two agreements of support originally transmitted data to be adopted also is an IEEE 802.15.4 agreement; Then need not translation-protocol, is that the packet of IEEE 802.15.4 form sends out with data encapsulation.If the agreement that the sensor node of the two agreements of support originally transmitted data to be adopted is an IEEE 802.11b agreement; Then need translation-protocol; With the effective information in the former packet; Comprise: IEEE 802.15.4 source address, destination address, payload user data, write in the packet of IEEE 802.15.4 form and send out.
When the required agreement of transmission data is IEEE 802.11b agreement; Support the sensor node of two agreements need to judge whether translation-protocol; If the agreement that the sensor node of the two agreements of support originally transmitted data to be adopted also is an IEEE 802.11b agreement; Then need not translation-protocol, directly former packet is sent out.If the agreement of supporting the sensor node of two agreements originally to transmit data to be adopted is an IEEE 802.15.4 agreement, then need translation-protocol, then encapsulate data in the packet of IEEE 802.11b form and send out.Behind the Data Transfer Done, return step 2, support the sensor node of two agreements to transmit next packet.
The above; Be merely the preferable embodiment of the present invention, but protection scope of the present invention is not limited thereto, any technical staff who is familiar with the present technique field is in the technical scope that the present invention discloses; The variation that can expect easily or replacement all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of claim.