CN112202732B - Protocol conversion method for ZigBee access to Ethernet - Google Patents

Protocol conversion method for ZigBee access to Ethernet Download PDF

Info

Publication number
CN112202732B
CN112202732B CN202010962703.8A CN202010962703A CN112202732B CN 112202732 B CN112202732 B CN 112202732B CN 202010962703 A CN202010962703 A CN 202010962703A CN 112202732 B CN112202732 B CN 112202732B
Authority
CN
China
Prior art keywords
network
zigbee
signal
distance
intermediate transmission
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
CN202010962703.8A
Other languages
Chinese (zh)
Other versions
CN112202732A (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.)
Zhongbiao Huian Information Technology Co Ltd
Original Assignee
Zhongbiao Huian Information Technology Co Ltd
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 Zhongbiao Huian Information Technology Co Ltd filed Critical Zhongbiao Huian Information Technology Co Ltd
Priority to CN202010962703.8A priority Critical patent/CN112202732B/en
Publication of CN112202732A publication Critical patent/CN112202732A/en
Application granted granted Critical
Publication of CN112202732B publication Critical patent/CN112202732B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/143Termination or inactivation of sessions, e.g. event-controlled end of session

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention provides a protocol conversion method for ZigBee access to Ethernet, which can save the occupancy rate of network resources by using a protocol conversion mode, and can save the deployment cost of network equipment, save the data transmission time and enhance the access stability between the ZigBee sensor network and the Ethernet by adopting a node ID for routing in the ZigBee sensor network and adopting an IP address for data source marking in the Ethernet.

Description

Protocol conversion method for ZigBee access to Ethernet
Technical Field
The invention relates to the technical field of wireless communication, in particular to a protocol conversion method for ZigBee access to Ethernet.
Background
The sensor network constructed by the ZigBee sensor has the advantages of low price, wide signal coverage range, low energy consumption and the like, and is widely popularized and applied. However, the ZigBee communication protocol based on the ZigBee sensor and the existing ethernet IP protocol are not well compatible, and in order to transmit and access the signal transmitted by the ZigBee sensor to the IP network, a corresponding gateway device is needed, the signal data transmitted by the ZigBee sensor is first transmitted to the ethernet gateway, and the ethernet gateway implements the TCO/IP protocol on hardware through a desired ethernet chip, thereby facilitating transmission of the signal data transmitted by the ZigBee sensor to the IP network. However, the above data transmission method based on the gateway needs to additionally arrange corresponding gateway devices, which increases the cost of network deployment, and a large amount of ZigBee sensor data is transmitted to the IP network through the gateway, which easily causes data loss and data transmission congestion, which seriously affects the user experience, and the ZigBee sensor needs to perform multiple data communication transmissions with the gateway, which increases the use power consumption of the ZigBee sensor, which is not favorable for the long-term stable operation of the device.
Disclosure of Invention
Aiming at the defects in the prior art, the invention provides a protocol conversion method for accessing ZigBee into Ethernet, which comprises the steps of packaging and converting an original message supporting ZigBee communication protocol in a ZigBee wireless module to obtain a new message with an IP protocol format, accessing the new message into a proper IP network according to a source IP address and a target IP address contained in the new message, determining a network transmission distance comparison relation between a ZigBee sensor and a target IP network in the ZigBee wireless module, and finally indicating the new message to carry out multi-hop transmission according to the network transmission distance comparison relation so as to transmit the new message to the corresponding target IP network; therefore, the protocol conversion method for accessing the ZigBee into the Ethernet carries out encapsulation conversion on the data sent by the ZigBee sensor so as to obtain a new message which is matched with the Ethernet and has an IP protocol format, and also stores the corresponding IP address package in the new message, which can facilitate the new message to be quickly and accurately identified by the Ethernet, and also carries out multi-hop transmission according to the corresponding network transmission distance contrast relation, thereby enabling the new message to be rapidly transmitted to the corresponding destination IP network along a predetermined transmission path, the method can be suitable for a protocol conversion mode, can save the occupancy rate of network resources, and can save the deployment cost of network equipment, save the data transmission time and enhance the access stability between the ZigBee sensor network and the Ethernet by adopting the node ID for routing in the ZigBee sensor network and adopting the IP address for marking the data source in the Ethernet.
The invention provides a protocol conversion method for ZigBee access to Ethernet, which is characterized by comprising the following steps:
step S1, in the ZigBee wireless module, the original message supporting the ZigBee communication protocol is encapsulated and converted, so as to obtain a new message with an IP protocol format;
step S2, according to the source IP address and the destination IP address contained in the new message, the new message is accessed to a proper IP network;
step S3, determining the network transmission distance comparison relation between the ZigBee sensor and the target IP network in the ZigBee wireless module;
step S4, according to the network transmission distance contrast relation, indicating the new message to carry out multi-hop transmission, thereby transmitting the new message to the corresponding destination IP network;
further, in the step S1, in the ZigBee wireless module, the encapsulating and converting the original message supporting the ZigBee communication protocol, so as to obtain a new message having an IP protocol format specifically includes,
step S101, determining the topological connection relation among all ZigBee sensors in the ZigBee wireless module, thereby determining the data communication link state of each ZigBee sensor;
step S102, configuring a corresponding communication message converter in each ZigBee sensor, and adjusting the communication message conversion frequency corresponding to the communication message converter according to the state of the data communication link;
step S103, packaging and converting original messages supporting the ZigBee communication protocol in the corresponding ZigBee sensors through the communication message converter so as to obtain the new messages with the IP protocol format;
further, in the step S102, adjusting the communication message conversion frequency corresponding to the communication message converter according to the data communication link state specifically includes,
step S1021, acquiring original message forming frequency supporting ZigBee communication protocol corresponding to each ZigBee sensor and data interaction frequency among different ZigBee sensors from the data communication link state;
step S1022, adjusting a communication message conversion frequency of the communication message converter to be consistent with the original message formation frequency or the data interaction frequency;
alternatively, the first and second electrodes may be,
in step S103, the encapsulating and converting, by the communication message converter, the raw message supporting the ZigBee communication protocol in the corresponding ZigBee sensor specifically includes,
converting the original message supporting the ZigBee communication protocol into an IP protocol load so as to obtain the new message with the IP protocol format;
further, in the step S2, accessing the new message to an appropriate IP network according to the source IP address and the destination IP address included in the new message specifically includes,
step S201, a source IP address and a destination IP address corresponding to the ZigBee sensor in the ZigBee wireless module are obtained;
step S202, the source IP address and the destination IP address are used as index information to be packaged into the new message;
step S203, according to the source IP address and the destination IP address, the new message is identified, so as to determine an IP network matched with the new message;
further, in step S203, according to the source IP address and the destination IP address, the new message is identified, so as to determine that the IP network matched with the new message specifically includes,
step S2031, generating transmission address information about the new message according to the source IP address and the destination IP address;
step S2032, matching the transmission address information with IP network addresses of a plurality of IP networks to be selected, and determining the IP network corresponding to the IP network address consistent with the transmission address information as the IP network matched with the new message;
further, after the step S203, the method further comprises the following step S204,
step S204, adjusting the connection duration length between the ZigBee sensor and the IP network according to the signal intensity of the ZigBee sensor or the distance between the ZigBee sensor and the IP network, when the signal intensity is larger than or equal to a preset signal intensity threshold value, reducing the connection duration length, otherwise, increasing the connection duration length,
alternatively, the first and second electrodes may be,
when the distance between the ZigBee sensor and the IP network is greater than or equal to a preset distance threshold, reducing the connection duration length, otherwise, increasing the connection duration length;
further, in the step S3, the determining a network transmission distance comparison relationship between the ZigBee sensor and the destination IP network in the ZigBee wireless module specifically includes,
step S301, determining the actual geographic distance between the ZigBee sensor and a target IP network;
step S302, determining the minimum intermediate transmission node ID and the signal transmission distance hop number required for transmitting the signal sent by the ZigBee sensor to the target IP network according to the actual geographic distance;
step S303, determining to form the network transmission distance comparison relationship according to the minimum intermediate transmission node ID and the signal transmission distance hop count, where the network transmission distance comparison relationship is a one-to-one correspondence relationship between the minimum intermediate transmission node ID and the signal transmission distance hop count;
further, in step S302, in determining the minimum intermediate transmission node ID and the hop count of the signal transmission distance required for transmitting the signal sent by the ZigBee sensor to the destination IP network according to the actual geographic distance, since the signal may have a path loss during transmission, the intermediate transmission node is set to correct the signal in each intermediate transmission node so as to reduce the path loss of the signal, first, a signal strength ratio during signal transmission needs to be obtained according to a propagation rule of the signal sent by the ZigBee sensor between the intermediate transmission nodes, since the signal cannot be completely eliminated by correcting the path loss, and then, a maximum distance allowed between adjacent intermediate transmission nodes needs to be obtained according to a maximum loss signal strength ratio corresponding to transmitting the signal sent by the ZigBee sensor to the destination IP network, and then, the actual geographic distance is combined to obtain the maximum distance required for transmitting the signal sent by the ZigBee sensor to the destination IP network The method comprises the following steps that the ID of a minimum intermediary transmission node and the hop count of the signal transmission distance are obtained, the maximum loss signal strength ratio refers to the signal strength ratio between a maximum loss receiving signal which is received by a target IP network and does not affect the internal data of the signal and a signal sent by a ZigBee sensor, and the process specifically comprises the following steps:
firstly, a relational expression of a signal intensity ratio of a signal received and corrected by a subsequent intermediate transmission node and a signal transmitted by a previous intermediate transmission node when a signal transmitted by a ZigBee sensor is propagated by adjacent intermediate transmission nodes and a distance between the adjacent intermediate transmission nodes is obtained by using the following formula (1)
Figure BDA0002681096710000051
In the above formula (1), Ji-1Represents the signal strength of the signal received and modified by the i-1 th intermediate transmission node, JiIndicating the signal strength, P, of the signal transmitted by the ith intermediate transmission nodeiRepresenting the transmission power of the signal sent by the ith intermediate transmission node, Ai-1The effective cross-sectional area of the antenna showing the i-1 th intermediate transmission node, AiDenotes the effective cross-sectional area of the ith intermediate transmission node antenna, f denotes the signal carrier frequency, d0Represents the distance between the ith-1 intermediate transmission node and the ith intermediate transmission node, and n represents the path loss coefficient;
secondly, a relational expression between the maximum loss signal strength ratio and the signal strength ratio of a signal received and corrected by a subsequent intermediate transmission node and a signal transmitted by a previous intermediate transmission node when a signal transmitted by the ZigBee sensor propagates through an adjacent intermediate transmission node is obtained by using the following formula (2)
Figure BDA0002681096710000052
In the formula (2), S represents the maximum loss signal strength ratio, m represents the number of theoretical minimum intermediate transmission nodes ID required for transmitting the signal sent by the ZigBee sensor to the destination IP network, d represents the actual geographical distance, and INT () represents the rounding operation symbol;
thirdly, the above equations (1) and (2) are combined to obtain m and d0According to the value solution of m, the distance which is not more than d is selected from all the intermediate transmission node paths of the target IP network for transmitting the signal sent by the ZigBee sensor0If no path exists, the intermediate transmission node ID corresponding to the path with the number m is ordered to m +1 to continuously select the intermediate transmission node ID with the distance not more thanGreater than d0And the number of the intermediate transmission node IDs corresponding to the paths with the number of m +1 is repeated until the selection of the intermediate transmission node IDs is finished; then the value obtained by adding 1 to m is the actual minimum number of intermediary transmission node IDs required for transmitting the signal sent by the ZigBee sensor to the target IP network, and the selected intermediary transmission node ID is the minimum intermediary transmission node ID required for transmitting the signal sent by the ZigBee sensor to the target IP network;
fourthly, the signal transmission distance hop count H is obtained by using the following formula (3)
Figure BDA0002681096710000061
In the above formula (3), (a)i,bi) A coordinate point corresponding to the ith intermediate transmission node selected in the previous process is represented (a)j,bj) Representing a coordinate point corresponding to the j-th intermediate transmission node selected in the previous process;
further, in the step S4, the indicating the new message to perform multi-hop transmission according to the network transmission distance comparison relationship, so that transmitting the new message to the corresponding destination IP network specifically includes,
step S401, according to the network transmission distance comparison relation, adding or reducing corresponding intermediary transmission nodes between the ZigBee sensor and the destination IP network so as to form a shortest signal transmission path between the ZigBee sensor and the destination IP network;
step S402, according to the network transmission distance contrast relation, indicating the new message to carry out multi-hop transmission along the shortest signal transmission path according to the preset signal transmission distance hop count, thereby transmitting the new message to the corresponding target IP network.
Compared with the prior art, the protocol conversion method for accessing the ZigBee into the Ethernet comprises the steps of packaging and converting original messages supporting the ZigBee communication protocol in a ZigBee wireless module to obtain new messages with an IP protocol format, accessing the new messages into a proper IP network according to a source IP address and a destination IP address contained in the new messages, determining a network transmission distance comparison relation between a ZigBee sensor and a destination IP network in the ZigBee wireless module, and finally indicating the new messages to carry out multi-hop transmission according to the network transmission distance comparison relation so as to transmit the new messages to the corresponding destination IP network; therefore, the protocol conversion method for accessing the ZigBee into the Ethernet carries out encapsulation conversion on the data sent by the ZigBee sensor so as to obtain a new message which is matched with the Ethernet and has an IP protocol format, and also stores the corresponding IP address package in the new message, which can facilitate the new message to be quickly and accurately identified by the Ethernet, and also carries out multi-hop transmission according to the corresponding network transmission distance contrast relation, thereby enabling the new message to be rapidly transmitted to the corresponding destination IP network along a predetermined transmission path, the method can save the occupancy rate of network resources by using a protocol conversion mode, and can save the deployment cost of network equipment, save data transmission time and enhance the access stability between the ZigBee sensor network and the Ethernet by adopting the node ID for routing in the ZigBee sensor network and adopting the IP address for data source marking in the Ethernet.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
The technical solution of the present invention is further described in detail by the accompanying drawings and embodiments.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a protocol conversion method for accessing an ethernet by ZigBee according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic flowchart of a protocol conversion method for accessing an ethernet to a ZigBee according to an embodiment of the present invention. The protocol conversion method for the ZigBee access to the Ethernet comprises the following steps:
step S1, in the ZigBee wireless module, the original message supporting the ZigBee communication protocol is encapsulated and converted, so as to obtain a new message with an IP protocol format;
step S2, according to the source IP address and the destination IP address contained in the new message, the new message is accessed to a proper IP network;
step S3, determining the network transmission distance comparison relation between the ZigBee sensor and the target IP network in the ZigBee wireless module;
step S4, according to the network transmission distance comparison relationship, indicating the new message to perform multi-hop transmission, so as to transmit the new message to the corresponding destination IP network.
The protocol conversion method for the ZigBee to access the Ethernet is different from the prior art that gateway equipment is additionally adopted to realize the access of the ZigBee sensors and the Ethernet, and the data of each ZigBee sensor is encapsulated and converted to obtain a new message with an IP protocol format, so that the data can be directly output to the Ethernet, and the new message can be subjected to multi-hop transmission to ensure that the new message can be subjected to rapid skip transmission among different ZigBee sensors, thereby saving the data transmission time and enhancing the access stability between the ZigBee sensor network and the Ethernet.
Preferably, in the step S1, in the ZigBee wireless module, the encapsulating and converting the original message supporting the ZigBee communication protocol, so as to obtain the new message having the IP protocol format specifically includes,
step S101, determining the topological connection relation among all ZigBee sensors in the ZigBee wireless module, thereby determining the data communication link state of each ZigBee sensor;
step S102, configuring a corresponding communication message converter in each ZigBee sensor, and adjusting the communication message conversion frequency corresponding to the communication message converter according to the state of the data communication link;
and step S103, packaging and converting the original message supporting the ZigBee communication protocol in the corresponding ZigBee sensor through the communication message converter so as to obtain the new message with the IP protocol format.
By adjusting the communication message conversion frequency according to the data communication link state, the situation that the power consumption of the ZigBee sensor is increased due to long-time and continuous packaging conversion of the data of the ZigBee sensor can be avoided, so that the power consumption of the ZigBee sensor is effectively reduced, and the service life of the ZigBee sensor is prolonged.
Preferably, in step S102, adjusting the communication message conversion frequency corresponding to the communication message converter according to the data communication link status specifically includes,
step S1021, acquiring original message forming frequency supporting ZigBee communication protocol corresponding to each ZigBee sensor and data interaction frequency among different ZigBee sensors from the data communication link state;
in step S1022, the communication message conversion frequency of the communication message converter is adjusted to be consistent with the original message forming frequency or the data interaction frequency.
Because the ZigBee sensor does not continuously generate original message data or request for data interaction, the communication message conversion frequency of the communication message converter is adjusted to be consistent with the original message forming frequency or the data interaction frequency, so that the data can be packaged and converted under the condition that the ZigBee sensor is in a working state for a long time, the power consumption is prevented from rising, and the ZigBee sensor is effectively ensured to be in a stable working state.
Preferably, in the step S103, encapsulating and converting the raw message supporting the ZigBee communication protocol in the corresponding ZigBee sensor by the communication message converter specifically includes,
and converting the original message supporting the ZigBee communication protocol into an IP protocol load so as to obtain the new message with the IP protocol format.
Preferably, in the step S2, accessing the new message to the appropriate IP network according to the source IP address and the destination IP address contained in the new message specifically includes,
step S201, a source IP address and a destination IP address corresponding to the ZigBee sensor in the ZigBee wireless module are obtained;
step S202, the source IP address and the destination IP address are used as index information to be packaged into the new message;
step S203, according to the source IP address and the destination IP address, performing identification processing on the new message, thereby determining an IP network matching the new message.
By encapsulating the source IP address and the destination IP address as index information to the new message, the transmission direction accuracy of the new message in the subsequent routing transmission process can be ensured.
Preferably, in step S203, the new message is identified according to the source IP address and the destination IP address, so as to determine that the IP network matching the new message specifically includes,
step S2031, generating transmission address information about the new message according to the source IP address and the destination IP address;
step S2032, matching the transmission address information with the IP network addresses of a plurality of IP networks to be selected, and determining the IP network corresponding to the IP network address consistent with the transmission address information as the IP network matched with the new message.
The IP network which is matched with the new message is determined by carrying out identification processing on the new message, so that the new message can be quickly and efficiently transmitted, and the transmission time of data is saved.
Preferably, after the step S203, the following step S204 is further included,
step S204, adjusting the connection duration length between the ZigBee sensor and the IP network according to the signal intensity of the ZigBee sensor or the distance between the ZigBee sensor and the IP network, and reducing the connection duration length when the signal intensity is greater than or equal to a preset signal intensity threshold value, or increasing the connection duration length;
alternatively, the first and second electrodes may be,
and when the distance between the ZigBee sensor and the IP network is greater than or equal to a preset distance threshold, reducing the connection duration length, otherwise, increasing the connection duration length.
The connection duration length between the ZigBee sensor and the IP network is adjusted according to the signal intensity of the ZigBee sensor or the distance between the ZigBee sensor and the IP network, so that the applicability of the ZigBee sensor to different communication network scenes can be improved, and the anti-interference performance of the ZigBee sensor can be improved.
Preferably, in the step S3, the determining of the network transmission distance comparison relationship between the ZigBee sensor and the destination IP network in the ZigBee wireless module specifically includes,
step S301, determining the actual geographic distance between the ZigBee sensor and a target IP network;
step S302, according to the actual geographic distance, determining the minimum intermediate transmission node ID and the signal transmission distance hop number required for transmitting the signal sent by the ZigBee sensor to the destination IP network;
step S303, determining to form the network transmission distance comparison relationship according to the minimum intermediate transmission node ID and the signal transmission distance hop count, wherein the network transmission distance comparison relationship is a one-to-one correspondence relationship between the minimum intermediate transmission node ID and the signal transmission distance hop count.
Preferably, in step S302, in determining the minimum intermediate transmission node ID and the signal transmission distance hop count required for transmitting the signal sent by the ZigBee sensor to the destination IP network according to the actual geographic distance, since the signal may have a path loss during transmission, the intermediate transmission node is set to correct the signal in each intermediate transmission node so as to reduce the path loss of the signal, first, a signal strength ratio during signal transmission needs to be obtained according to a propagation rule of the signal sent by the ZigBee sensor between the intermediate transmission nodes, since the signal cannot be completely eliminated by correcting the path loss, and then, a maximum distance allowed between adjacent intermediate transmission nodes needs to be obtained according to a maximum loss signal strength ratio corresponding to transmitting the signal sent by the ZigBee sensor to the destination IP network, and then, the minimum intermediate transmission node ID and the signal transmission distance hop count required for transmitting the signal sent by the ZigBee sensor to the destination IP network are obtained by combining the actual geographic distance The method comprises the following steps that point ID and signal transmission distance hop count are obtained, wherein the maximum loss signal strength ratio is the signal strength ratio between a maximum loss receiving signal which is received by a target IP network and does not affect internal data of a signal and a signal sent by a ZigBee sensor, and the process specifically comprises the following steps:
firstly, a relational expression of a signal intensity ratio of a signal received and corrected by a subsequent intermediate transmission node and a signal transmitted by a previous intermediate transmission node when a signal transmitted by a ZigBee sensor is propagated by adjacent intermediate transmission nodes and a distance between the adjacent intermediate transmission nodes is obtained by using the following formula (1)
Figure BDA0002681096710000121
In the above formula (1), Ji-1Represents the signal strength of the signal received and modified by the i-1 th intermediate transmission node, JiIndicating the signal strength, P, of the signal transmitted by the ith intermediate transmission nodeiRepresenting the transmission power of the signal sent by the ith intermediate transmission node, Ai-1The effective cross-sectional area of the antenna showing the i-1 th intermediate transmission node, AiDenotes the effective cross-sectional area of the ith intermediate transmission node antenna, f denotes the signal carrier frequency, d0Represents the distance between the ith-1 intermediate transmission node and the ith intermediate transmission node, and n represents the path loss coefficient;
secondly, a relational expression between the maximum loss signal strength ratio and the signal strength ratio of a signal received and corrected by a subsequent intermediate transmission node and a signal transmitted by a previous intermediate transmission node when a signal transmitted by the ZigBee sensor propagates in an adjacent intermediate transmission node is obtained by using the following formula (2)
Figure BDA0002681096710000122
In the formula (2), S represents the maximum loss signal strength ratio, m represents the number of theoretical minimum intermediate transmission nodes ID required for transmitting the signal sent by the ZigBee sensor to the destination IP network, d represents the actual geographical distance, and INT () represents the rounding operation symbol;
thirdly, the above equations (1) and (2) are combined to obtain m and d0According to the value solution of m, the distance which is not more than d is selected from all the intermediate transmission node paths of the target IP network for transmitting the signal sent by the ZigBee sensor0And the intermediate transmission node ID corresponding to the path with the number m, if no path exists, making m +1 continuously select the intermediate transmission node ID with the distance not greater than d0And the intermediate transmission node IDs corresponding to the paths with the number of m +1 are repeated until the selection of the intermediate transmission node IDs is finished; the value obtained by adding 1 to m is the actual minimum number of intermediary transmission node IDs required by the signal sent by the ZigBee sensor to be transmitted to the target IP network, and the selected intermediary transmission node ID is the minimum intermediary transmission node ID required by the signal sent by the ZigBee sensor to be transmitted to the target IP network;
fourthly, the signal transmission distance hop count H is obtained by using the following formula (3)
Figure BDA0002681096710000131
In the above formula (3), (a)i,bi) A coordinate point corresponding to the ith intermediate transmission node selected in the previous process is represented (a)j,bj) And indicating a coordinate point corresponding to the j-th intermediate transmission node selected in the previous process.
A relational expression between the signal intensity ratio of a signal received and corrected by a subsequent intermediate transmission node and a signal sent by a previous intermediate transmission node and the distance between the adjacent intermediate transmission nodes when the signal sent by the ZigBee sensor is transmitted by the adjacent intermediate transmission nodes is obtained by using a formula (1), so that the loss condition of the signal transmitted between the adjacent nodes is obtained by using the formula (1), and a foundation is laid for the subsequent calculation of the number of nodes; obtaining a relational expression between the maximum loss signal intensity ratio and the signal intensity ratio between a signal received and corrected by a subsequent intermediate transmission node and a signal sent by a previous intermediate transmission node when a signal sent by a ZigBee sensor is transmitted by an adjacent intermediate transmission node by using a formula (2), so that the maximum distance between adjacent nodes and the number of theoretical minimum node IDs can be calculated by combining the formula (2) with a formula (1), and the adaptive intermediate transmission node IDs are selected from all intermediate transmission node paths for transmitting the signal sent by the ZigBee sensor to a target IP network by using the two numerical values, namely the required minimum intermediate transmission node IDs; and then, the formula (3) is used for obtaining the hop count of the signal transmission distance, so that an algorithm for determining the minimum intermediate transmission node ID and the hop count of the signal transmission distance required by transmitting the signal sent by the ZigBee sensor to a target IP network according to the actual geographic distance is completed, the obtained data is attached to the actual data, and the automation degree of the algorithm is enhanced through the automatic calculation of the formula.
Preferably, in step S4, the step of instructing the new message to perform multi-hop transmission according to the network transmission distance comparison relationship, so that transmitting the new message to its corresponding destination IP network specifically includes,
step S401, according to the network transmission distance comparison relationship, adding or reducing corresponding intermediary transmission nodes between the ZigBee sensor and the destination IP network so as to form a shortest signal transmission path between the ZigBee sensor and the destination IP network;
step S402, according to the network transmission distance contrast relation, indicating the new message to perform multi-hop transmission along the shortest signal transmission path according to the preset signal transmission distance hop count, thereby transmitting the new message to the corresponding destination IP network.
In the transmission process, because the distances between different sensors and a target network are different, in order to ensure the stability of transmission, the data generated by the ZigBee sensors in the wireless sensor network adopts a multi-hop transmission mode, namely, the sensors are coordinated with each other, and the remote sensor data is forwarded to the target network through the midway sensors, so that the effectiveness of data transmission is ensured to the maximum extent.
As can be seen from the contents described in the above embodiments, the protocol conversion method for accessing the ZigBee into the ethernet includes encapsulating and converting an original message supporting the ZigBee communication protocol in the ZigBee wireless module, so as to obtain a new message having an IP protocol format, accessing the new message to a suitable IP network according to a source IP address and a destination IP address contained in the new message, determining a network transmission distance comparison relationship between the ZigBee sensor and the destination IP network in the ZigBee wireless module, and finally instructing the new message to perform multi-hop transmission according to the network transmission distance comparison relationship, so as to transmit the new message to the corresponding destination IP network; therefore, the protocol conversion method for accessing the ZigBee into the Ethernet carries out encapsulation conversion on the data sent by the ZigBee sensor so as to obtain a new message which is matched with the Ethernet and has an IP protocol format, and also stores the corresponding IP address package in the new message, which can facilitate the new message to be quickly and accurately identified by the Ethernet, and also carries out multi-hop transmission according to the corresponding network transmission distance contrast relation, thereby enabling the new message to be rapidly transmitted to the corresponding destination IP network along a predetermined transmission path, the method can save the occupancy rate of network resources by using a protocol conversion mode, and can save the deployment cost of network equipment, save data transmission time and enhance the access stability between the ZigBee sensor network and the Ethernet by adopting the node ID for routing in the ZigBee sensor network and adopting the IP address for data source marking in the Ethernet.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (7)

1. A protocol conversion method for ZigBee access to Ethernet is characterized by comprising the following steps:
step S1, in the ZigBee wireless module, the original message supporting the ZigBee communication protocol is encapsulated and converted, so as to obtain a new message with an IP protocol format;
step S2, according to the source IP address and the destination IP address contained in the new message, the new message is accessed to a proper IP network;
step S3, determining the network transmission distance comparison relation between the ZigBee sensor and the target IP network in the ZigBee wireless module;
step S4, according to the network transmission distance contrast relation, indicating the new message to carry out multi-hop transmission, thereby transmitting the new message to the corresponding destination IP network;
wherein, in the step S3, the step of determining the network transmission distance comparison relationship between the ZigBee sensor and the destination IP network in the ZigBee wireless module specifically comprises,
step S301, determining the actual geographic distance between the ZigBee sensor and a target IP network;
step S302, determining the minimum intermediate transmission node ID and the signal transmission distance hop number required for transmitting the signal sent by the ZigBee sensor to the target IP network according to the actual geographic distance;
step S303, determining to form the network transmission distance comparison relationship according to the minimum intermediate transmission node ID and the signal transmission distance hop count, where the network transmission distance comparison relationship is a one-to-one correspondence relationship between the minimum intermediate transmission node ID and the signal transmission distance hop count;
in step S302, in determining the minimum intermediate transmission node ID and the hop count of the signal transmission distance required for transmitting the signal sent by the ZigBee sensor to the destination IP network according to the actual geographic distance, since the signal may have a path loss during transmission, the intermediate transmission node is set to correct the signal in each intermediate transmission node so as to reduce the path loss of the signal, first, a signal strength ratio during signal transmission needs to be obtained according to a propagation rule of the signal sent by the ZigBee sensor between the intermediate transmission nodes, since the signal cannot be completely eliminated by correcting the path loss, and then, a maximum allowable distance between adjacent intermediate transmission nodes needs to be obtained according to a maximum loss signal strength ratio corresponding to transmitting the signal sent by the ZigBee sensor to the destination IP network, and then, the actual geographic distance is combined to obtain the maximum distance required for transmitting the signal sent by the ZigBee sensor to the destination IP network The method comprises the following steps of transmitting node ID and signal transmission distance hop count by less intermediaries, wherein the maximum loss signal strength ratio is the signal strength ratio between a maximum loss received signal which is received by a target IP network and does not affect internal data of the signal and a signal sent by a ZigBee sensor, and the process specifically comprises the following steps:
firstly, a relational expression of a signal intensity ratio of a signal received and corrected by a subsequent intermediate transmission node and a signal transmitted by a previous intermediate transmission node when a signal transmitted by a ZigBee sensor is propagated by adjacent intermediate transmission nodes and a distance between the adjacent intermediate transmission nodes is obtained by using the following formula (1)
Figure FDA0003057389310000021
In the above formula (1), Ji-1Is shown asSignal strength of signals received and modified by i-1 intermediate transmission nodes, JiIndicating the signal strength, P, of the signal transmitted by the ith intermediate transmission nodeiRepresenting the transmission power of the signal sent by the ith intermediate transmission node, Ai-1Denotes the effective cross-sectional area, A, of the i-1 th intermediate transmission node antennaiDenotes the effective cross-sectional area of the ith intermediate transmission node antenna, f denotes the signal carrier frequency, d0Represents the distance between the ith-1 intermediate transmission node and the ith intermediate transmission node, and n represents the path loss coefficient;
secondly, a relational expression between the maximum loss signal strength ratio and the signal strength ratio of a signal received and corrected by a subsequent intermediate transmission node and a signal transmitted by a previous intermediate transmission node when a signal transmitted by the ZigBee sensor propagates through an adjacent intermediate transmission node is obtained by using the following formula (2)
Figure FDA0003057389310000031
In the formula (2), S represents the maximum loss signal strength ratio, m represents the number of theoretical minimum intermediate transmission nodes ID required for transmitting the signal sent by the ZigBee sensor to the destination IP network, d represents the actual geographical distance, and INT () represents the rounding operation symbol;
thirdly, the above equations (1) and (2) are combined to obtain m and d0According to the value solution of m, the distance which is not more than d is selected from all the intermediate transmission node paths of the target IP network for transmitting the signal sent by the ZigBee sensor0And the intermediate transmission node ID corresponding to the path with the number m, if no path exists, making m +1 continuously select the intermediate transmission node ID with the distance not greater than d0And the number of the intermediate transmission node IDs corresponding to the paths with the number of m +1 is repeated until the selection of the intermediate transmission node IDs is finished; the value obtained by adding 1 to m is the actual minimum number of intermediary transmission nodes required by the signal sent by the ZigBee sensor to be transmitted to the target IP network, and the selected intermediary transmission node ID is the signal sent by the ZigBee sensorThe minimum intermediate transport node ID required to be sent to the destination IP network;
fourthly, the signal transmission distance hop count H is obtained by using the following formula (3)
Figure FDA0003057389310000032
In the above formula (3), (a)i,bi) A coordinate point corresponding to the ith intermediate transmission node selected in the previous process is represented (a)j,bj) And indicating a coordinate point corresponding to the j-th intermediate transmission node selected in the previous process.
2. The protocol conversion method for the ZigBee access ethernet according to claim 1, wherein: in the step S1, the encapsulating and converting the original message supporting the ZigBee communication protocol in the ZigBee wireless module, so as to obtain the new message having the IP protocol format specifically includes,
step S101, determining the topological connection relation among all ZigBee sensors in the ZigBee wireless module, thereby determining the data communication link state of each ZigBee sensor;
step S102, configuring a corresponding communication message converter in each ZigBee sensor, and adjusting the communication message conversion frequency corresponding to the communication message converter according to the state of the data communication link;
step S103, the original message which supports the ZigBee communication protocol in the corresponding ZigBee sensor is encapsulated and converted through the communication message converter, so that the new message with the IP protocol format is obtained.
3. The protocol conversion method for the ZigBee access ethernet according to claim 2, wherein: in step S102, adjusting the communication message conversion frequency corresponding to the communication message converter according to the data communication link status specifically includes,
step S1021, acquiring original message forming frequency supporting ZigBee communication protocol corresponding to each ZigBee sensor and data interaction frequency among different ZigBee sensors from the data communication link state;
step S1022, adjusting a communication message conversion frequency of the communication message converter to be consistent with the original message formation frequency or the data interaction frequency;
alternatively, the first and second electrodes may be,
in step S103, the encapsulating and converting, by the communication message converter, the raw message supporting the ZigBee communication protocol in the corresponding ZigBee sensor specifically includes,
and converting the original message supporting the ZigBee communication protocol into an IP protocol load so as to obtain the new message with the IP protocol format.
4. The protocol conversion method for the ZigBee access ethernet according to claim 1, wherein: in step S2, accessing the new message to an appropriate IP network according to the source IP address and the destination IP address included in the new message specifically includes,
step S201, a source IP address and a destination IP address corresponding to the ZigBee sensor in the ZigBee wireless module are obtained;
step S202, the source IP address and the destination IP address are used as index information to be packaged into the new message;
step S203, according to the source IP address and the destination IP address, the new message is identified, so as to determine the IP network matched with the new message.
5. The protocol conversion method for the ZigBee access Ethernet of claim 4, wherein: in step S203, according to the source IP address and the destination IP address, the new message is identified, so as to determine that the IP network matched with the new message specifically includes,
step S2031, generating transmission address information about the new message according to the source IP address and the destination IP address;
step S2032, matching the transmission address information with IP network addresses of a plurality of IP networks to be selected, and determining the IP network corresponding to the IP network address consistent with the transmission address information as the IP network matched with the new message.
6. The protocol conversion method for the ZigBee access Ethernet of claim 4, wherein: after the step S203, the following step S204 is also included,
step S204, adjusting the connection duration length between the ZigBee sensor and the IP network according to the signal intensity of the ZigBee sensor or the distance between the ZigBee sensor and the IP network, when the signal intensity is larger than or equal to a preset signal intensity threshold value, reducing the connection duration length, otherwise, increasing the connection duration length, or,
and when the distance between the ZigBee sensor and the IP network is greater than or equal to a preset distance threshold, reducing the connection duration length, otherwise, increasing the connection duration length.
7. The protocol conversion method for the ZigBee access ethernet according to claim 1, wherein: in step S4, the step of instructing the new message to perform multi-hop transmission according to the network transmission distance comparison relationship, so that transmitting the new message to the corresponding destination IP network specifically includes,
step S401, according to the network transmission distance comparison relation, adding or reducing corresponding intermediary transmission nodes between the ZigBee sensor and the destination IP network so as to form a shortest signal transmission path between the ZigBee sensor and the destination IP network;
step S402, according to the network transmission distance contrast relation, indicating the new message to carry out multi-hop transmission along the shortest signal transmission path according to the preset signal transmission distance hop count, thereby transmitting the new message to the corresponding target IP network.
CN202010962703.8A 2020-09-14 2020-09-14 Protocol conversion method for ZigBee access to Ethernet Active CN112202732B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010962703.8A CN112202732B (en) 2020-09-14 2020-09-14 Protocol conversion method for ZigBee access to Ethernet

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010962703.8A CN112202732B (en) 2020-09-14 2020-09-14 Protocol conversion method for ZigBee access to Ethernet

Publications (2)

Publication Number Publication Date
CN112202732A CN112202732A (en) 2021-01-08
CN112202732B true CN112202732B (en) 2021-07-27

Family

ID=74014913

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010962703.8A Active CN112202732B (en) 2020-09-14 2020-09-14 Protocol conversion method for ZigBee access to Ethernet

Country Status (1)

Country Link
CN (1) CN112202732B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101521895A (en) * 2009-04-03 2009-09-02 南京邮电大学 Forwarding method used for constructing multi-hop routing in wireless self-organizing network
CN103281804A (en) * 2013-05-23 2013-09-04 山西煤炭运销集团有限公司 Data collecting substation for mine laneway wireless sensor network
CN106209932A (en) * 2015-04-30 2016-12-07 中国电信股份有限公司 The remote communication method of ZigBee node and system, gateway device and ZigBee node
KR20170124055A (en) * 2016-04-29 2017-11-09 주식회사 맥스포 APPARATUS FOR COMPATIBILITY BETWEEN ZIGBEE AND CoAP
CN108135016A (en) * 2017-12-19 2018-06-08 国网辽宁省电力有限公司 A kind of radio network path planning method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101197703B (en) * 2006-12-08 2011-05-04 华为技术有限公司 Method, system and equipment for managing Zigbee network
KR101317178B1 (en) * 2009-12-21 2013-10-15 한국전자통신연구원 ZigBee Gateway and method for identifying message of the same
CN107040878B (en) * 2017-04-14 2020-01-17 河海大学 Non-layered communication method of multi-chain wireless sensor network

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101521895A (en) * 2009-04-03 2009-09-02 南京邮电大学 Forwarding method used for constructing multi-hop routing in wireless self-organizing network
CN103281804A (en) * 2013-05-23 2013-09-04 山西煤炭运销集团有限公司 Data collecting substation for mine laneway wireless sensor network
CN106209932A (en) * 2015-04-30 2016-12-07 中国电信股份有限公司 The remote communication method of ZigBee node and system, gateway device and ZigBee node
KR20170124055A (en) * 2016-04-29 2017-11-09 주식회사 맥스포 APPARATUS FOR COMPATIBILITY BETWEEN ZIGBEE AND CoAP
CN108135016A (en) * 2017-12-19 2018-06-08 国网辽宁省电力有限公司 A kind of radio network path planning method and device

Also Published As

Publication number Publication date
CN112202732A (en) 2021-01-08

Similar Documents

Publication Publication Date Title
US11375430B2 (en) Multi-path wireless mesh networks
CN101331790B (en) Communications method and apparatus using physical attachment point identifiers
CN101341684B (en) Communications methods and apparatus using physical attachment point identifiers wich support dual communications links
CN107124363B (en) Message broadcasting method and device
CN104813621A (en) Link adaptation for multi-hop route in wireless mesh network
Maldonado Wireless sensor network for smart home services using optimal communications
CN106686679B (en) Energy-efficiency-based multi-hop D2D routing hop number limiting method in content-centric network
CN105072034A (en) Powerline communications (PLC) network routing method and system
CN114980175A (en) Wireless communication mode self-adaptive correction platform
JP5868551B2 (en) Wireless communication system and wireless communication method
Sokullu et al. Investigating energy efficiency and timeliness for linear wireless sensor networks
CN103179655B (en) Distributed node Poewr control method in mobile ad-hoc network
CN112202732B (en) Protocol conversion method for ZigBee access to Ethernet
Mahmud et al. Improved rpl for iot applications
CN104053208A (en) Route method and device based on channel allocation in wireless ad hoc network
LU501337B1 (en) Underwater Broadcast Transmission Method Based on Hierarchy and State
CN112788609B (en) Chain type wireless sensor network transmission method
CN104202245B (en) The intelligent transmission method and device of adaptive communications mode
CN108990128B (en) Route design method based on mobile perception in mobile network
CN105208620A (en) Transmitting-interference-oriented industrial wireless sensor network route construction method
CN113574954A (en) Receiver-centric communication over combinational network technologies for enhanced reliability
Saraswala et al. Impact of transmission power on performance of Zigbee network based on IEEE 802.15. 4 standard using AODV routing protocol
CN111490938A (en) Communication link checking method
CN104955120A (en) Wireless self-organizing network interference sensing real-time multicast method based on partial network coding
Zhu et al. A routing protocol for underwater acoustic-optical hybrid wireless sensor networks based on packet hierarchy and void processing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant