Routing method and routing node selection device for wireless network
Technical Field
The present invention relates to the field of wireless communications, and in particular, to a routing method and a routing node selection apparatus for a wireless network.
Background
With the rapid development and the increasing maturity of technologies such as wireless communication, integrated circuits, microelectronic systems, and the like, the mass production of low-cost, low-power consumption, multifunctional micro sensors becomes possible. These sensors typically integrate multiple functions of information acquisition, data processing, wireless communication, etc. within a small volume. The Wireless Sensor Network (WSN) is a multi-strip ad hoc Network system formed by radio communication of a large number of miniature Sensor nodes deployed in a monitoring area, and can realize data acquisition, quantization, processing, fusion and transmission. The system integrates advanced technologies such as a microelectronic technology, an embedded computing technology, a modern network and wireless communication technology, a distributed processing technology and the like, can cooperatively monitor and sense information of various environments or monitored objects in a network coverage area, processes the information, and transmits the processed information in a wireless mode and transmits the processed information to an observer in an ad hoc multi-hop network mode.
Due to the limitation of the transmitting power and the wireless communication distance of the wireless sensor network nodes, the coverage range of the cluster nodes is limited, and when the nodes communicate with the nodes in the coverage range, the single hop can realize mutual communication between the nodes; when the node needs to communicate with other nodes outside the coverage range of the cluster, multi-hop forwarding through an intermediate node is needed, so that the wireless sensor network is a multi-hop mode network, multi-hop is the basis for researching a routing protocol, and different from multi-hop routing of a fixed network, the multi-hop routing in the wireless sensor network is completed by a flexible network node instead of a special routing device.
In order to improve the QoS of the wireless sensor network, the prior art proposes many routing node selection methods, which have the following defects: when selecting the next hop node, the priority of each data packet is not considered, resulting in that all data packets get the same service, which cannot meet the requirements of some services requiring low latency.
The information disclosed in this background section is only for enhancement of understanding of the general background of the invention and should not be taken as an acknowledgement or any form of suggestion that this information forms the prior art already known to a person skilled in the art.
Disclosure of Invention
The present invention is directed to a routing method and a routing node selection apparatus for a wireless network, so as to overcome the disadvantages of the prior art.
To achieve the above object, the present invention provides a routing method for a wireless network, the routing method comprising: transmitting, by a data sink node, a broadcast message, wherein the broadcast message includes information for updating routing information; receiving, by the one or more second nodes, the broadcast message and determining a number of hops from the one or more second nodes to the data sink node based on the broadcast message; classifying, by the data source node, neighbor nodes of the data source node into a first class node, a second class node, and a third class node based on hop counts from one or more second nodes to the data sink node; calculating, by the data source node, a first link condition parameter, when the first link condition parameter is greater than a first threshold, performing the following: acquiring the priority of data to be transmitted by a data source node; when the priority of the data to be sent is greater than the second threshold, the data source node selects a next hop node from the first class of nodes and updates the first link condition parameter; when the priority of the data to be sent is smaller than a second threshold, the data source node selects a next hop node from the second class node or the third class node and updates the first link condition parameter; when the first link condition parameter is less than the first threshold, performing the following: selecting a next hop node from the neighbor node by the data source node, and updating the first link condition parameter; and transmitting, by the data source node, data to be transmitted to the selected next hop node.
Preferably, in the above technical solution, the hop count from each node in the first class of nodes to the data sink node is one less than the hop count from the data source node to the data sink node, the hop count from each node in the second class of nodes to the data sink node is the same as the hop count from the data source node to the data sink node, and the hop count from each node in the third class of nodes to the data sink node is one more than the hop count from the data source node to the data sink node.
Preferably, in the above technical solution, the first link condition parameter is calculated by the following formula:
wherein A isiIndicating the probability of a certain data packet arriving at the data sink node, esIndicates the channel error rate, hnRepresenting the number of hops to reach the data sink node.
Preferably, in the above technical solution, the updating of the first link condition parameter is implemented by the following formula:
wherein A isiIndicating the probability of a certain data packet arriving at the data sink node, esIndicates the channel error rate, hnRepresenting the number of hops to reach the data sink node.
Preferably, in the above technical solution, when the first link condition parameter is greater than the total number of neighboring nodes, the method includes: when the first link condition parameter is greater than the first threshold, performing the following: acquiring the priority of data to be transmitted by a data source node; copying data to be transmitted by a data source node to obtain a plurality of data to be transmitted; when the priority of the data to be sent is greater than the second threshold, the data source node selects a next hop node from the first class of nodes and updates the first link condition parameter; when the priority of the data to be sent is smaller than a second threshold, the data source node selects a next hop node from the second class node or the third class node and updates the first link condition parameter; when the first link condition parameter is less than the first threshold, performing the following: copying data to be transmitted by a data source node to obtain a plurality of data to be transmitted; selecting a next hop node from the neighbor node by the data source node, and updating the first link condition parameter; and transmitting, by the data source node, a plurality of data to be transmitted to the selected next hop node.
The invention also provides a routing node selection device for a wireless network, comprising: means for transmitting a broadcast message, wherein the broadcast message includes information for updating routing information; means for receiving the broadcast message and determining a hop count of the one or more second nodes to the data sink node based on the broadcast message; means for classifying neighbor nodes of the data source node as a first class node, a second class node, and a third class node based on hop counts of one or more second nodes to the data sink node; means for calculating a first link condition parameter, when the first link condition parameter is greater than a first threshold: acquiring the priority of data to be transmitted by a data source node; when the priority of the data to be sent is greater than the second threshold, the data source node selects a next hop node from the first class of nodes and updates the first link condition parameter; when the priority of the data to be sent is smaller than a second threshold, the data source node selects a next hop node from the second class node or the third class node and updates the first link condition parameter; means for performing the following when the first link condition parameter is less than a first threshold: selecting a next hop node from the neighbor node by the data source node, and updating the first link condition parameter; and means for transmitting data to be transmitted to the selected next hop node.
Preferably, in the above technical solution, the hop count from each node in the first class of nodes to the data sink node is one less than the hop count from the data source node to the data sink node, the hop count from each node in the second class of nodes to the data sink node is the same as the hop count from the data source node to the data sink node, and the hop count from each node in the third class of nodes to the data sink node is one more than the hop count from the data source node to the data sink node.
Preferably, in the above technical solution, the first link condition parameter is calculated by the following formula:
wherein A isiIndicating the probability of a certain data packet arriving at the data sink node, esIndicates the channel error rate, hnRepresenting the number of hops to reach the data sink node.
Preferably, in the above technical solution, the updating of the first link condition parameter is implemented by the following formula:
wherein A isiIndicating the probability of a certain data packet arriving at the data sink node, esIndicates the channel error rate, hnRepresenting the number of hops to reach the data sink node.
Preferably, in the above technical solution, the routing node selecting apparatus further includes: means for performing the following when the first link condition parameter is greater than the total number of neighbor nodes: when the first link condition parameter is greater than the first threshold, performing the following: acquiring the priority of data to be transmitted by a data source node; copying data to be transmitted by a data source node to obtain a plurality of data to be transmitted; when the priority of the data to be sent is greater than the second threshold, the data source node selects a next hop node from the first class of nodes and updates the first link condition parameter; when the priority of the data to be sent is smaller than a second threshold, the data source node selects a next hop node from the second class node or the third class node and updates the first link condition parameter; when the first link condition parameter is less than the first threshold, performing the following: copying data to be transmitted by a data source node to obtain a plurality of data to be transmitted; selecting a next hop node from the neighbor node by the data source node, and updating the first link condition parameter; and transmitting, by the data source node, a plurality of data to be transmitted to the selected next hop node.
Compared with the prior art, the invention has the following beneficial effects: 1. the invention takes into account the priority requirements of the data packets; 2. in the case of considering each priority packet, the channel condition is also considered in combination, and when the channel condition is poor, it is meaningless to perform different processing on different data packets based on the priority, and in this case, in order to reduce the operation burden of the system, the priority is no longer selected for each packet according to the priority.
Drawings
FIG. 1 is a schematic diagram of a method according to an embodiment of the invention.
Detailed Description
The following detailed description of the present invention is provided in conjunction with the accompanying drawings, but it should be understood that the scope of the present invention is not limited to the specific embodiments.
Throughout the specification and claims, unless explicitly stated otherwise, the word "comprise", or variations such as "comprises" or "comprising", will be understood to imply the inclusion of a stated element or component but not the exclusion of any other element or component. The concrete manufacturing method of the wall and the heat-insulating layer is a method known in the field. Each adhesive layer may be, for example, an epoxy adhesive.
Example 1
FIG. 1 is a schematic diagram of a method according to an embodiment of the invention. As shown in the figure, the method of the present invention comprises the steps of:
step 101: transmitting, by a data sink node, a broadcast message, wherein the broadcast message includes information for updating routing information;
step 102: receiving, by the one or more second nodes, the broadcast message and determining a number of hops from the one or more second nodes to the data sink node based on the broadcast message;
step 103: classifying, by the data source node, neighbor nodes of the data source node into a first class node, a second class node, and a third class node based on hop counts from one or more second nodes to the data sink node;
step 104: calculating a first link condition parameter by the data source node,
step 105: when the first link condition parameter is greater than the first threshold, performing the following: acquiring the priority of data to be transmitted by a data source node; when the priority of the data to be sent is greater than the second threshold, the data source node selects a next hop node from the first class of nodes and updates the first link condition parameter; when the priority of the data to be sent is smaller than a second threshold, the data source node selects a next hop node from the second class node or the third class node and updates the first link condition parameter;
step 106: when the first link condition parameter is less than the first threshold, performing the following: selecting a next hop node from the neighbor node by the data source node, and updating the first link condition parameter; and transmitting, by the data source node, data to be transmitted to the selected next hop node.
Of course, in order to finally select the routing path successfully, after the data source node sends the data to be sent to the selected next-hop node, the step 103 and 106 are executed again with the selected next-hop node as the source node.
Example 2
The hop count from each node in the first class of nodes to the data sink node is less than the hop count from the data source node to the data sink node by one, the hop count from each node in the second class of nodes to the data sink node is the same as the hop count from the data source node to the data sink node, and the hop count from each node in the third class of nodes to the data sink node is more than the hop count from the data source node to the data sink node by one. Specifically, under normal conditions, a high-priority data packet selects a first-class node, the first-class node is closer to the sink node, and the QoS requirement of the high-priority data packet is compounded.
Example 3
The first link condition parameter is calculated by the following formula:
wherein A isiIndicating the probability of a certain data packet arriving at the data sink node, esIndicates the channel error rate, hnRepresenting the number of hops to reach the data sink node. Specifically, AiAnd is also a parameter related to the priority of the data packet, and the higher the priority of the data packet is, the higher the probability that the data packet arrives at the sink node is.
Example 4
Updating the first link condition parameter is accomplished by the following equation:
wherein A isiIndicating the probability of a certain data packet arriving at the data sink node, esIndicates the channel error rate, hnRepresenting the number of hops to reach the data sink node.
Example 5
The invention also provides a routing node selection device for a wireless network, comprising: means for transmitting a broadcast message, wherein the broadcast message includes information for updating routing information; means for receiving the broadcast message and determining a hop count of the one or more second nodes to the data sink node based on the broadcast message; means for classifying neighbor nodes of the data source node as a first class node, a second class node, and a third class node based on hop counts of one or more second nodes to the data sink node; means for calculating a first link condition parameter, when the first link condition parameter is greater than a first threshold: acquiring the priority of data to be transmitted by a data source node; when the priority of the data to be sent is greater than the second threshold, the data source node selects a next hop node from the first class of nodes and updates the first link condition parameter; when the priority of the data to be sent is smaller than a second threshold, the data source node selects a next hop node from the second class node or the third class node and updates the first link condition parameter; means for performing the following when the first link condition parameter is less than a first threshold: selecting a next hop node from the neighbor node by the data source node, and updating the first link condition parameter; and means for transmitting data to be transmitted to the selected next hop node.
Example 6
The routing node selection apparatus further includes: means for performing the following when the first link condition parameter is greater than the total number of neighbor nodes: when the first link condition parameter is greater than the first threshold, performing the following: acquiring the priority of data to be transmitted by a data source node; copying data to be transmitted by a data source node to obtain a plurality of data to be transmitted; when the priority of the data to be sent is greater than the second threshold, the data source node selects a next hop node from the first class of nodes and updates the first link condition parameter; when the priority of the data to be sent is smaller than a second threshold, the data source node selects a next hop node from the second class node or the third class node and updates the first link condition parameter; when the first link condition parameter is less than the first threshold, performing the following: copying data to be transmitted by a data source node to obtain a plurality of data to be transmitted; selecting a next hop node from the neighbor node by the data source node, and updating the first link condition parameter; and transmitting, by the data source node, a plurality of data to be transmitted to the selected next hop node.
Example 7
The various modules and circuits described in connection with the invention may be implemented with a general purpose processor, an application specific integrated circuit, a field programmable gate array or discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general-purpose processor may be a microprocessor, which may be any commercially available processor, controller, microcontroller or state machine. The processor may be responsible for managing the bus and general processing, including the execution of software stored on a machine-readable medium. The processor may be implemented with one or more general-purpose and/or special-purpose processors. Software shall be construed broadly to mean instructions, data, or any combination thereof, whether referred to as software, firmware, middleware, microcode, hardware description language, or otherwise. By way of example, the machine-readable medium may comprise RAM, flash memory, ROM, PROM, EPROM, EEPROM, registers, magnetic disk, optical disk, or any combination thereof. In a hardware implementation, the machine-readable medium may be part of a processing system that is separate from the processor.
The foregoing descriptions of specific exemplary embodiments of the present invention have been presented for purposes of illustration and description. It is not intended to limit the invention to the precise form disclosed, and obviously many modifications and variations are possible in light of the above teaching. The exemplary embodiments were chosen and described in order to explain certain principles of the invention and its practical application to enable one skilled in the art to make and use various exemplary embodiments of the invention and various alternatives and modifications as are suited to the particular use contemplated. It is intended that the scope of the invention be defined by the claims and their equivalents.