Routing method and device in underwater acoustic communication network

文档序号:1508529 发布日期:2020-02-07 浏览:20次 中文

阅读说明:本技术 一种水声通信网络中的路由方法及装置 (Routing method and device in underwater acoustic communication network ) 是由 刘军 于美铭 王兴旺 关雯雪 张健瑀 潘晓鹤 崔军红 于 2019-11-07 设计创作,主要内容包括:本发明提供一种水声通信网络中的路由方法及装置,汇聚节点广播控制包,控制包更新传感器节点的路由表信息,将源节点作为发送节点,向相邻的中间节点发送数据包,将接收数据包相邻的中间节点作为待选节点,并向发送节点反馈ACK确认包,发送节点利用ACK确认包计算距离和相对速度,基于距离和相对速度计算待选节点的转发能力值,确定目标中间节点,并将其作为发送节点,向相邻的中间节点发送数据包,返回执行将接收到数据包的相邻的中间节点作为待选节点这一步骤,直至中继节点,确定由源节点、中间节点和中继节点构成的路由路径。利用ACK确认包计算相邻节点的距离,实现不需要增加额外的节点来计算相邻节点的距离,达到降低成本的目的。(The invention provides a routing method and a device in an underwater acoustic communication network.A sink node broadcasts a control packet, the control packet updates routing table information of a sensor node, a source node is taken as a sending node, a data packet is sent to an adjacent intermediate node, the adjacent intermediate node of a received data packet is taken as a node to be selected, an ACK (acknowledgement) packet is fed back to the sending node, the sending node calculates the distance and the relative speed by using the ACK packet, the forwarding capacity value of the node to be selected is calculated based on the distance and the relative speed, a target intermediate node is determined and taken as the sending node, the data packet is sent to the adjacent intermediate node, the step of taking the adjacent intermediate node of the received data packet as the node to be selected is executed in a returning mode until a relay node, and a routing path formed by the source node, the intermediate node and the relay node is determined. The distance between the adjacent nodes is calculated by using the ACK acknowledgement packet, so that the distance between the adjacent nodes is calculated without adding extra nodes, and the purpose of reducing the cost is achieved.)

1. A routing method in an underwater acoustic communication network, the method comprising:

the sink node broadcasts a control packet to the sensor node network at regular time;

each connected sensor node in the sensor node network updates respective routing table information based on the control packet, and the sensor node network comprises a relay node connected with the sink node, a source node and an intermediate node used for connecting the relay node and the source node;

taking the source node as a sending node, and sending a data packet to an adjacent intermediate node, wherein the data packet comprises routing table information;

taking an adjacent intermediate node receiving the data packet as a node to be selected, and feeding back an ACK (acknowledgement) packet to the sending node by the node to be selected, wherein the ACK packet comprises the residual energy and the sending power of the node to be selected;

the sending node calculates by using the ACK packet to obtain the distance and the relative speed between the sending node and the node to be selected;

the sending node calculates the forwarding capacity value of the node to be selected based on the distance and the relative speed, and determines a target intermediate node;

and taking the target intermediate node as a sending node, sending a data packet to the adjacent intermediate node, returning and continuously executing the step of taking the adjacent intermediate node receiving the data packet as a node to be selected until the relay node, and determining a routing path formed by the determined source node, the intermediate node and the relay node.

2. The method of claim 1, wherein the step of calculating, by the sending node, the distance and the relative speed between the sending node and the candidate node by using the ACK acknowledgement packet comprises:

the sending node acquires the residual energy and the sending power of the node to be selected in the ACK acknowledgement packet;

calculating the residual energy and the transmitting power based on the Doppler effect and the signal receiving strength to respectively obtain the relative speed V and the first distance L between the transmitting node and the node to be selected1

According to the formula L2=a(L1+(t0-t) V) calculating a second distance L between the sending node and the candidate node2Wherein L is2A is a constant close to 1, L, for said second distance1Is the first distance, t0For updating time, t is the current time, V is the relative velocity, and the second distance is more accurate than the first distance.

3. The method of claim 1, wherein the sending node calculates a forwarding capability value of the candidate node based on the distance and the relative speed, and determines a target intermediate node, comprising:

based on the formula

Figure FDA0002263896350000021

selecting the minimum value of the forwarding capacity value of the node to be selected based on the forwarding capacity value of the node to be selected;

and determining the node to be selected with the maximum forwarding capability value as the target intermediate node in the minimum value of the forwarding capability values of the nodes to be selected.

4. The method of claim 1, further comprising:

and if the sending node does not receive the ACK confirmation packet within the preset time, retransmitting the data packet until the ACK confirmation packet is received or the retransmission times exceed the preset times, and stopping sending the data packet.

5. The method of claim 1, further comprising:

when the target intermediate node receives the data packet, updating the routing table information of the target intermediate node according to the data packet, and resetting a timer corresponding to each node ID in the routing table information;

in the process of establishing the route, the target intermediate node monitors whether a timer corresponding to each node ID in the routing table information of the target intermediate node reaches a preset value;

and if the timer reaches the preset value, deleting the node information corresponding to the node ID from the routing table.

6. A routing device in an underwater acoustic communication network, the device comprising:

the broadcasting module is used for broadcasting the control packet to the sensor node network at fixed time by the sink node;

the updating module is used for updating respective routing table information of each connected sensor node in the sensor node network based on the control packet, and the sensor node network comprises a relay node connected with the sink node, a source node and an intermediate node used for connecting the relay node and the source node;

a first sending module, configured to send a data packet to an adjacent intermediate node, where the data packet includes routing table information, with the source node being a sending node;

a feedback module, configured to use an adjacent intermediate node that receives the data packet as a candidate node, where the candidate node feeds back an ACK acknowledgement packet to the sending node, where the ACK acknowledgement packet includes remaining energy and sending power of the candidate node;

the computing module is used for computing by the sending node through the ACK packet to obtain the distance and the relative speed between the sending node and the node to be selected;

the determining module is used for calculating the forwarding capacity value of the node to be selected by the sending node based on the distance and the relative speed, and determining a target intermediate node;

and the second sending module is used for sending a data packet to the adjacent intermediate node by taking the target intermediate node as a sending node, returning and continuously executing the step of taking the adjacent intermediate node which receives the data packet as a node to be selected until the relay node, and determining a routing path formed by the determined source node, the intermediate node and the relay node.

7. The apparatus of claim 6, wherein the computing module comprises:

an obtaining unit, configured to obtain, by the sending node, remaining energy and sending power of the node to be selected in the ACK acknowledgement packet;

a first calculating unit, configured to calculate the residual energy and the transmission power based on a doppler effect and a signal reception strength, and obtain a relative speed V between the transmission node and the node to be selected and a first distance L respectively1

A second calculation unit for calculating a second calculation result according to the formula L2=a(L1+(t0-t) V) calculating a second distance L between the sending node and the candidate node2Wherein L is2A is a constant close to 1, L, for said second distance1Is the first distance, t0For updating time, t is the current time, V is the relative velocity, and the second distance is more accurate than the first distance.

8. The apparatus of claim 6, wherein the determining module comprises:

a third calculation unit for calculating a formula based on

Figure FDA0002263896350000031

the selection unit is used for selecting the minimum value of the forwarding capacity value of the node to be selected based on the forwarding capacity value of the node to be selected;

and the determining unit is used for determining the node to be selected with the maximum forwarding capacity value as the target intermediate node in the minimum value of the forwarding capacity values of the nodes to be selected.

9. The apparatus of claim 6, further comprising:

and the stopping module is used for retransmitting the data packet if the sending node does not receive the ACK acknowledgement packet within the preset time until the ACK acknowledgement packet is received or the retransmission times exceed the preset times, and stopping sending the data packet.

10. The apparatus of claim 6, further comprising:

the reset module is used for updating the routing table information of the target intermediate node according to the data packet when the target intermediate node receives the data packet, and resetting a timer corresponding to each node ID in the routing table information;

the monitoring module is used for monitoring whether a timer corresponding to each node ID in the routing table information of the target intermediate node reaches a preset value or not in the process of establishing the routing;

and the deleting module is used for deleting the node information corresponding to the node ID from the routing table if the timer reaches the preset value.

Technical Field

The invention belongs to the technical field of computers, and particularly relates to a routing method and a routing device in an underwater acoustic communication network.

Background

At present, in an underwater acoustic communication network environment, the problem of node energy loss exists. Due to the fact that the power of data transmission of the nodes in the underwater environment is high, in addition, neighbor nodes near the receiving node are often used for data forwarding, energy consumption of the nodes is accelerated, and energy loss imbalance is caused. Therefore, the problem of unbalanced energy loss is solved by a routing protocol mode based on depth.

However, the depth-based routing protocol method needs to acquire depth information, and therefore, an additional node needs to be provided, which increases the cost.

Disclosure of Invention

In view of the above, an object of the present invention is to provide a routing method and apparatus in an underwater acoustic communication network, which are used to solve the problem that a depth-based routing protocol needs to acquire depth information, and therefore additional nodes need to be equipped, resulting in increased cost. The technical scheme is as follows:

the invention provides a routing method in an underwater acoustic communication network, which comprises the following steps:

the sink node broadcasts a control packet to the sensor node network at regular time;

each connected sensor node in the sensor node network updates respective routing table information based on the control packet, and the sensor node network comprises a relay node connected with the sink node, a source node and an intermediate node used for connecting the relay node and the source node;

taking the source node as a sending node, and sending a data packet to an adjacent intermediate node, wherein the data packet comprises routing table information;

taking an adjacent intermediate node receiving the data packet as a node to be selected, and feeding back an ACK (acknowledgement) packet to the sending node by the node to be selected, wherein the ACK packet comprises the residual energy and the sending power of the node to be selected;

the sending node calculates by using the ACK packet to obtain the distance and the relative speed between the sending node and the node to be selected;

the sending node calculates the forwarding capacity value of the node to be selected based on the distance and the relative speed, and determines a target intermediate node;

and taking the target intermediate node as a sending node, sending a data packet to the adjacent intermediate node, returning and continuously executing the step of taking the adjacent intermediate node receiving the data packet as a node to be selected until the relay node, and determining a routing path formed by the determined source node, the intermediate node and the relay node.

Preferably, the obtaining, by the sending node, the distance and the relative speed between the sending node and the node to be selected by using the ACK packet calculation includes:

the sending node acquires the residual energy and the sending power of the node to be selected in the ACK acknowledgement packet;

calculating the residual energy and the transmitting power based on the Doppler effect and the signal receiving strength to respectively obtain the relative speed V and the first distance L between the transmitting node and the node to be selected1

According to the formula L2=a(L1+(t0-t) V) calculating a second distance L between the sending node and the candidate node2Wherein L is2A is a constant close to 1, L, for said second distance1Is the first distance, t0For updating time, t is the current time, V is the relative velocity, and the second distance is more accurate than the first distance.

Preferably, the step of the sending node calculating a forwarding capability value of the node to be selected based on the distance and the relative speed, and determining a target intermediate node includes:

based on the formula

Figure BDA0002263896360000021

Calculating the forwarding capacity value of the node to be selected, wherein Y is the forwarding capacity value of the node to be selected, E is the residual energy value of the node to be selected, k is the ratio of the ACK acknowledgement packet loss energy sent by the node to be selected to the data packet loss energy sent by the sending node, and P is the ratio of the ACK acknowledgement packet loss energy sent by the node to be selected to the data packet loss energy sent by the sending nodee(l, f, n, p) is the energy loss of the sending node for successfully transmitting the data packet to the node to be selected;

selecting the minimum value of the forwarding capacity value of the node to be selected based on the forwarding capacity value of the node to be selected;

and determining the node to be selected with the maximum forwarding capability value as the target intermediate node in the minimum value of the forwarding capability values of the nodes to be selected.

Preferably, the method further comprises the following steps:

and if the sending node does not receive the ACK confirmation packet within the preset time, retransmitting the data packet until the ACK confirmation packet is received or the retransmission times exceed the preset times, and stopping sending the data packet.

Preferably, the method further comprises:

when the target intermediate node receives the data packet, updating the routing table information of the target intermediate node according to the data packet, and resetting a timer corresponding to each node ID in the routing table information;

in the process of establishing the route, the target intermediate node monitors whether a timer corresponding to each node ID in the routing table information of the target intermediate node reaches a preset value;

and if the timer reaches the preset value, deleting the node information corresponding to the node ID from the routing table.

The present invention also provides a routing apparatus in an underwater acoustic communication network, the apparatus comprising:

the broadcasting module is used for broadcasting the control packet to the sensor node network at fixed time by the sink node;

the updating module is used for updating respective routing table information of each connected sensor node in the sensor node network based on the control packet, and the sensor node network comprises a relay node connected with the sink node, a source node and an intermediate node used for connecting the relay node and the source node;

a first sending module, configured to send a data packet to an adjacent intermediate node, where the data packet includes routing table information, with the source node being a sending node;

a feedback module, configured to use an adjacent intermediate node that receives the data packet as a candidate node, where the candidate node feeds back an ACK acknowledgement packet to the sending node, where the ACK acknowledgement packet includes remaining energy and sending power of the candidate node;

the computing module is used for computing by the sending node through the ACK packet to obtain the distance and the relative speed between the sending node and the node to be selected;

the determining module is used for calculating the forwarding capacity value of the node to be selected by the sending node based on the distance and the relative speed, and determining a target intermediate node;

and the second sending module is used for sending a data packet to the adjacent intermediate node by taking the target intermediate node as a sending node, returning and continuously executing the step of taking the adjacent intermediate node which receives the data packet as a node to be selected until the relay node, and determining a routing path formed by the determined source node, the intermediate node and the relay node.

Preferably, the calculation module includes:

an obtaining unit, configured to obtain, by the sending node, remaining energy and sending power of the node to be selected in the ACK acknowledgement packet;

a first calculating unit, configured to calculate the residual energy and the transmission power based on a doppler effect and a signal reception strength, and obtain a phase of the transmission node and the candidate node respectivelyFor velocity V and first distance L1

A second calculation unit for calculating a second calculation result according to the formula L2=a(L1+(t0-t) V) calculating a second distance L between the sending node and the candidate node2Wherein L is2A is a constant close to 1, L, for said second distance1Is the first distance, t0For updating time, t is the current time, V is the relative velocity, and the second distance is more accurate than the first distance.

Preferably, the determining module includes:

a third calculation unit for calculating a formula based on

Figure BDA0002263896360000041

Calculating the forwarding capacity value of the node to be selected, wherein Y is the forwarding capacity value of the node to be selected, E is the residual energy value of the node to be selected, k is the ratio of the ACK acknowledgement packet loss energy sent by the node to be selected to the data packet loss energy sent by the sending node, and P is the ratio of the ACK acknowledgement packet loss energy sent by the node to be selected to the data packet loss energy sent by the sending nodee(l, f, n, p) is the energy loss of the sending node for successfully transmitting the data packet to the node to be selected;

the selection unit is used for selecting the minimum value of the forwarding capacity value of the node to be selected based on the forwarding capacity value of the node to be selected;

and the determining unit is used for determining the node to be selected with the maximum forwarding capacity value as the target intermediate node in the minimum value of the forwarding capacity values of the nodes to be selected.

Preferably, the apparatus further comprises:

and the stopping module is used for retransmitting the data packet if the sending node does not receive the ACK acknowledgement packet within the preset time until the ACK acknowledgement packet is received or the retransmission times exceed the preset times, and stopping sending the data packet.

Preferably, the apparatus further comprises:

the reset module is used for updating the routing table information of the target intermediate node according to the data packet when the target intermediate node receives the data packet, and resetting a timer corresponding to each node ID in the routing table information;

the monitoring module is used for monitoring whether a timer corresponding to each node ID in the routing table information of the target intermediate node reaches a preset value or not in the process of establishing the routing;

and the deleting module is used for deleting the node information corresponding to the node ID from the routing table if the timer reaches the preset value.

Compared with the prior art, the technical scheme provided by the invention has the following advantages:

the sink node broadcasts a control packet to the sensor node network at regular time, routing table information of each sensor node is updated based on the control packet, a source node is used as a sending node, a data packet is sent to an adjacent intermediate node, the adjacent intermediate node receiving the data packet is used as a candidate node, the candidate node feeds back an ACK (acknowledgement) packet to the sending node, the sending node uses the ACK packet to calculate to obtain the distance and the relative speed between the sending node and the candidate node, the sending node calculates the forwarding capacity value of the candidate node based on the distance and the relative speed, a target intermediate node is determined, the target intermediate node is used as the sending node, the data packet is sent to the adjacent intermediate node, the step of taking the adjacent intermediate node receiving the data packet as the candidate node is executed until a relay node, the determined source node is determined, and the intermediate node and the relay node form a routing path. The distance between the adjacent nodes is calculated by using the ACK acknowledgement packet, so that the distance between the adjacent nodes is calculated without adding extra nodes, and the purpose of reducing the cost is achieved. The problem that the routing protocol based on the depth needs to acquire the depth information, so that extra nodes need to be equipped to calculate the distance, and the cost is increased is solved.

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 introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.

Fig. 1 is a flowchart of a routing method in an underwater acoustic communication network according to an embodiment of the present invention;

fig. 2 is a flowchart illustrating that a sending node obtains a distance and a relative speed between the sending node and a node to be selected by using ACK acknowledgement packet calculation according to an embodiment of the present invention;

fig. 3 is a flowchart illustrating a sending node determining a target intermediate node by calculating a forwarding capability value of a candidate node based on a distance and a relative speed according to an embodiment of the present invention;

fig. 4 is a flowchart of a routing method in an underwater acoustic communication network according to another embodiment of the present invention;

fig. 5 is a flowchart of a routing method in an underwater acoustic communication network according to another embodiment of the present invention;

fig. 6 is a schematic structural diagram of a routing apparatus in an underwater acoustic communication network according to an embodiment of the present invention.

Detailed Description

The invention provides a routing method and a routing device in an underwater acoustic communication network, which are used for solving the problem that the cost is increased because extra nodes are required to be equipped because the depth information needs to be acquired in a depth-based routing protocol mode.

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 some, not all, embodiments of the present invention. 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.

As shown in fig. 1, a flowchart of a routing method in an underwater acoustic communication network according to an embodiment of the present invention is shown, where the method includes the following steps:

and S101, the sink node broadcasts the control packet to the sensor node network at regular time.

In S101, the sink node is referred to as a sink node in the sensor node network, and is mainly responsible for the connection between the sensor node network and an external network (e.g., gprs, internet, etc.), and may be regarded as a gateway node,

in the process of implementing S101 specifically, the sink node broadcasts a control packet to the sensor node network periodically, and the control packet is transmitted between adjacent nodes in the sensor node network until the control packet is transmitted to the last sensor node, i.e., the source node.

For example: the sink node broadcasts a control packet to the sensor node network every 10 minutes, and then the control packet is transmitted between adjacent sensor nodes in the sensor node network, if the sensor node 1 receives the control packet, the sensor node 2 is used as an adjacent node of the sensor node 1, and the sensor node 1 transmits the control packet to the sensor node 2 until the control packet is transmitted to the last sensor node, namely a source node in the sensor node network.

It should be noted that, each time the sink node broadcasts a control packet to the sensor node network, the control packet is transmitted between adjacent nodes in the sensor node network, which is different from the previous process of broadcasting the control packet by the sink node and then transmitting between adjacent nodes in the sensor node network.

And S102, updating respective routing table information of each connected sensor node in the sensor node network based on the control packet.

In S102, the sensor node network includes a sink node connected to the sink node, a source node, and an intermediate node for connecting to the relay node. It should be noted that the sink node, the relay node, the source node, and the intermediate node are all sensor nodes.

In the process of implementing S102 specifically, each connected sensor node in the sensor node network initializes its own routing table information based on the control packet, and obtains the latest routing table information.

And S103, taking the source node as a sending node, and sending the data packet to an adjacent intermediate node.

In S103, the data packet includes routing table information, where the routing table information includes at least a sending node ID, a sending node level, and remaining energy of the sending node, and the data packet of the source node itself is sent to an adjacent intermediate node, and the data packet is transmitted upward layer by layer through the intermediate node until being transmitted to the relay node, and then the data packet is transmitted to the sink node through the relay node.

And S104, taking the adjacent intermediate node receiving the data packet as a node to be selected, and feeding back an ACK (acknowledgement) packet to the sending node by the node to be selected.

In S104, the ACK acknowledgement packet includes the remaining energy and the transmission power of the candidate node. For the sending node, the number of the neighboring nodes may be multiple, so that each neighboring node neighboring the sending node is used as a candidate node, and each candidate node feeds back an ACK acknowledgement packet to the sending node.

And S105, the sending node calculates by using the ACK packet to obtain the distance and the relative speed between the sending node and the node to be selected.

It should be noted that, based on the above-mentioned process of S105, the specific implementation process that the sending node obtains the distance and the relative speed between the sending node and the node to be selected by using ACK acknowledgement packet calculation, as shown in fig. 2, mainly includes:

s201, the sending node acquires the residual energy and the sending power of the node to be selected in the ACK acknowledgement packet.

In the process of specifically implementing S201, the node to be selected feeds back an ACK acknowledgement packet to the sending node, and the sending node receives the ACK acknowledgement packet and obtains the remaining energy and the sending power carried by the ACK acknowledgement packet.

S202, calculating residual energy and transmitting power based on Doppler effect and signal receiving strength to respectively obtain relative speed V of a transmitting node and a node to be selected and first distance L1

In the process of implementing S202, first, the relative speed V of data transmission between the sending node and the node to be selected is obtained based on the doppler effect, and then the first distance L between the sending node and the node to be selected is obtained according to the signal receiving strength1Wherein, the relative error ratio of the first distance is larger, the accuracy is lower, and the first distance cannot be adjustedAnd the distance between the sending node and the node to be selected is truly reflected. Therefore, a more accurate distance between the sending node and the node to be selected needs to be obtained according to the first distance and the relative speed between the sending node and the node to be selected.

S203, calculating a second distance L between the sending node and the node to be selected according to the formula (1)2

In the process of implementing S203 specifically, the second distance between the sending node and the node to be selected is calculated, and may be calculated based on formula (1).

L2=a(L1+(t0-t)V) (1)

Wherein L is2Is a second distance, a is a constant close to 1, L1Is a first distance, t0For updating time, t is the current time, V is the relative velocity, and the second distance is more accurate than the first distance.

It should be noted that, a more accurate distance between the sending node and the candidate node can be obtained through the formula (1).

The second distance obtained based on the formula (1) is a more accurate distance between the sending node and the node to be selected, and provides an important guarantee for calculating the forwarding capability value of the node to be selected later.

And S106, the sending node calculates the forwarding capacity value of the node to be selected based on the distance and the relative speed, and determines a target intermediate node.

It should be noted that, based on the foregoing information in S106, the sending node calculates the forwarding capability value of the candidate node based on the distance and the relative speed, and determines a specific implementation process of the target intermediate node, as shown in fig. 3, the specific implementation process mainly includes:

and S301, calculating the forwarding capability value of the node to be selected based on the algorithm (2).

In the process of specifically implementing S301, the forwarding capability value of the candidate node is calculated, which may be calculated based on formula (2).

Wherein Y is a node to be selectedThe forwarding capacity value, E is the residual capacity value of the node to be selected, k is the ratio of the energy loss of the ACK acknowledgement packet sent by the node to be selected to the energy loss of the data packet sent by the sending node, Pe(l, f, n, P) is the energy loss of the sending node in successfully transmitting the data packet to the node to be selected, wherein P ise(L, f, n, p) by transmission power p, transmission frequency f and distance L2And (6) calculating.

And S302, selecting the minimum value of the forwarding capacity value of the node to be selected based on the forwarding capacity value of the node to be selected.

In the process of implementing S302 specifically, there are multiple nodes to be selected, and the forwarding capability value of each node to be selected is different.

For example: there are 5 sensor nodes N1, N2, N3, N4, and N5, where N1 is used as a sending node, N2 and N3 are used as candidate nodes for N1, N4 and N5 are used as candidate nodes for N2, and N4 and N5 are also used as candidate nodes for N3. The forwarding capability value of N2 between N2 and N4 is 4, and the forwarding capability value of N2 between N2 and N5 is 5, so the forwarding capability value of N2 between N2 and N4 is selected as the minimum value, and similarly, the forwarding capability value of N3 between N3 and N4 is 8, and the forwarding capability value of N3 between N3 and N5 is 3, so the forwarding capability value of N3 between N3 and N5 is selected as the minimum value.

And S303, determining the node to be selected with the maximum forwarding capacity value as the target intermediate node in the minimum value of the forwarding capacity values of the nodes to be selected.

In the process of implementing S303 specifically, according to the minimum value of the forwarding capabilities of the selected candidate nodes, the maximum forwarding capability value of the candidate node is determined from the minimum values of the forwarding capabilities of all the candidate nodes, and then the candidate node is used as the target intermediate node.

For example: based on the example mentioned in S302 above, the forwarding capability value of N2 between N2 and N4 is 4, the forwarding capability value of N3 between N3 and N5 is 3, and the forwarding capability values of N2 and N3 are compared, and it is determined that the forwarding capability value of N2 is greater than the forwarding capability value of N3, so N2 is selected as the target intermediate node.

And S107, taking the target intermediate node as a sending node, sending the data packet to the adjacent intermediate node, returning and continuously executing the step of taking the adjacent intermediate node receiving the data packet as a node to be selected until the relay node, and determining a routing path formed by the determined source node, the intermediate node and the relay node.

In the process of implementing S107 specifically, after the intermediate node is determined, the intermediate node is used as a sending node, a data packet is sent to an adjacent intermediate node, then the process returns to execute S104 until the data packet is sent to the relay node, and finally a routing path formed by the determined source node, the intermediate node and the relay node is determined.

According to the routing method in the underwater acoustic communication network disclosed by the embodiment of the invention, the sink node broadcasts the control packet to the sensor node network at regular time, the routing table information of each sensor node is updated based on the control packet, the source node is used as the sending node, the data packet is sent to the adjacent intermediate node, the adjacent intermediate node receiving the data packet is used as the candidate node, the candidate node feeds back the ACK confirmation packet to the sending node, the sending node uses the ACK confirmation packet for calculation to obtain the distance and the relative speed between the sending node and the candidate node, the sending node calculates the forwarding capacity value of the candidate node based on the distance and the relative speed, determines the target intermediate node, uses the target intermediate node as the sending node, sends the data packet to the adjacent intermediate node, and returns to execute the step of using the adjacent intermediate node receiving the data packet as the candidate node, and determining a routing path formed by the determined source node, the intermediate node and the relay node until reaching the relay node. The distance between the adjacent nodes is calculated by using the ACK acknowledgement packet, so that the distance between the adjacent nodes is calculated without adding extra nodes, and the purpose of reducing the cost is achieved. The problem that the routing protocol based on the depth needs to acquire the depth information, so that extra nodes need to be equipped to calculate the distance, and the cost is increased is solved.

As shown in fig. 4, a flowchart of another routing method in an underwater acoustic communication network according to an embodiment of the present invention includes:

s401, the sink node broadcasts the control packet to the sensor node network at regular time.

And S402, updating respective routing table information of each connected sensor node in the sensor node network based on the control packet.

And S403, taking the source node as a sending node, and sending the data packet to an adjacent intermediate node.

S404, taking the adjacent intermediate node receiving the data packet as a node to be selected, and feeding back an ACK (acknowledgement) packet to the sending node by the node to be selected.

The execution principle of S401 to S404 is the same as that of S101 to S104, and is not described herein again.

S405, whether the sending node receives the ACK confirmation packet within the preset time is judged, if not, S406 is executed, and if yes, S407 is executed.

And S406, retransmitting the data packet until the ACK confirmation packet is received or the retransmission times exceed the preset times, and stopping transmitting the data packet.

In the process of implementing S406 specifically, if the sending node does not receive the ACK acknowledgement packet fed back by the node to be selected, the sending node resends the data packet until receiving the ACK acknowledgement packet fed back by the node to be selected.

Optionally, if the sending node does not receive the ACK acknowledgement packet fed back by the node to be selected, the sending node resends the data packet, and when the number of times of resending exceeds the preset number of times, the sending node stops sending the data packet.

And S407, the sending node calculates by using the ACK packet to obtain the distance and the relative speed between the sending node and the node to be selected.

And S408, the sending node calculates the forwarding capacity value of the node to be selected based on the distance and the relative speed, and determines a target intermediate node.

And S409, taking the target intermediate node as a sending node, sending a data packet to the adjacent intermediate node, returning and continuously executing the step of taking the adjacent intermediate node receiving the data packet as a node to be selected until the relay node, and determining a routing path formed by the determined source node, the intermediate node and the relay node.

The execution principle of S407 to S409 is the same as that of S105 to S107 described above, and is not described herein again.

According to the routing method in the underwater acoustic communication network disclosed by the embodiment of the invention, the sink node broadcasts the control packet to the sensor node network at regular time, the routing table information of each sensor node is updated based on the control packet, the source node is used as the sending node, the data packet is sent to the adjacent intermediate node, the adjacent intermediate node receiving the data packet is used as the candidate node, the candidate node feeds back the ACK confirmation packet to the sending node, the sending node uses the ACK confirmation packet for calculation to obtain the distance and the relative speed between the sending node and the candidate node, the sending node calculates the forwarding capacity value of the candidate node based on the distance and the relative speed, determines the target intermediate node, uses the target intermediate node as the sending node, sends the data packet to the adjacent intermediate node, and returns to execute the step of using the adjacent intermediate node receiving the data packet as the candidate node, and determining a routing path formed by the determined source node, the intermediate node and the relay node until reaching the relay node. The distance between the adjacent nodes is calculated by using the ACK acknowledgement packet, so that the distance between the adjacent nodes is calculated without adding extra nodes, and the purpose of reducing the cost is achieved. The problem that the routing protocol based on the depth needs to acquire the depth information, so that extra nodes need to be equipped to calculate the distance, and the cost is increased is solved.

As shown in fig. 5, a flowchart of a routing method in an underwater acoustic communication network according to another embodiment of the present invention includes:

s501, the sink node broadcasts the control packet to the sensor node network at regular time.

And S502, updating respective routing table information of each connected sensor node in the sensor node network based on the control packet.

And S503, taking the source node as a sending node, and sending the data packet to the adjacent intermediate node.

S504, taking the adjacent intermediate node receiving the data packet as a node to be selected, and feeding back an ACK (acknowledgement) packet to the sending node by the node to be selected.

And S505, the sending node calculates by using the ACK packet to obtain the distance and the relative speed between the sending node and the node to be selected.

S506, the sending node calculates the forwarding capacity value of the node to be selected based on the distance and the relative speed, and determines a target intermediate node.

The execution principle of S501 to S506 is the same as that of S101 to S106, and will not be described again here.

And S507, when the target intermediate node receives the data packet, updating the routing table information of the target intermediate node according to the data packet, and resetting a timer corresponding to each node ID in the routing table information.

And S508, the target intermediate node monitors whether the timer corresponding to each node ID in the routing table information of the target intermediate node reaches a preset value, if so, S509 is executed, and if not, S510 is executed.

S509, the node information corresponding to the node ID is deleted from the routing table.

And S510, forbidding to delete the node information corresponding to the node ID from the routing table.

And S511, taking the target intermediate node as a sending node, sending the data packet to the adjacent intermediate node, returning and continuously executing the step of taking the adjacent intermediate node receiving the data packet as a node to be selected until the relay node, and determining a routing path formed by the determined source node, the intermediate node and the relay node.

The execution principle of S511 is the same as that of S107 described above, and is not described herein again.

According to the routing method in the underwater acoustic communication network disclosed by the embodiment of the invention, the sink node broadcasts the control packet to the sensor node network at regular time, the routing table information of each sensor node is updated based on the control packet, the source node is used as the sending node, the data packet is sent to the adjacent intermediate node, the adjacent intermediate node receiving the data packet is used as the candidate node, the candidate node feeds back the ACK confirmation packet to the sending node, the sending node uses the ACK confirmation packet for calculation to obtain the distance and the relative speed between the sending node and the candidate node, the sending node calculates the forwarding capacity value of the candidate node based on the distance and the relative speed, determines the target intermediate node, uses the target intermediate node as the sending node, sends the data packet to the adjacent intermediate node, and returns to execute the step of using the adjacent intermediate node receiving the data packet as the candidate node, and determining a routing path formed by the determined source node, the intermediate node and the relay node until reaching the relay node. The distance between the adjacent nodes is calculated by using the ACK acknowledgement packet, so that the distance between the adjacent nodes is calculated without adding extra nodes, and the purpose of reducing the cost is achieved. The problem that the routing protocol based on the depth needs to acquire the depth information, so that extra nodes need to be equipped to calculate the distance, and the cost is increased is solved.

Based on the routing method in the underwater acoustic communication network disclosed in the embodiment of the present invention, the embodiment of the present invention further discloses a routing apparatus in the underwater acoustic communication network correspondingly, as shown in fig. 6, which is a schematic structural diagram of the routing apparatus in the underwater acoustic communication network provided in the embodiment of the present invention, and the routing method mainly includes: a broadcasting module 60, an updating module 61, a first transmitting module 62, a feedback module 63, a calculating module 64, a determining module 65 and a second transmitting module 66.

And a broadcasting module 60, configured to broadcast the control packet to the sensor node network at regular time by the sink node.

And the updating module 61 is used for updating respective routing table information of each connected sensor node in the sensor node network based on the control packet, wherein the sensor node network comprises a relay node connected with the sink node, a source node and an intermediate node used for connecting the relay node and the source node.

And a first sending module 62, configured to send a data packet to an adjacent intermediate node, where the data packet includes routing table information, with the source node being a sending node.

And a feedback module 63, configured to use an adjacent intermediate node that receives the data packet as a candidate node, where the candidate node feeds back an ACK acknowledgement packet to the sending node, where the ACK acknowledgement packet includes remaining energy and sending power of the candidate node.

And the calculating module 64 is configured to calculate, by using the ACK acknowledgement packet, the distance and the relative speed between the sending node and the node to be selected.

And the determining module 65 is configured to calculate, by the sending node, a forwarding capability value of the node to be selected based on the distance and the relative speed, and determine the target intermediate node.

And a second sending module 66, configured to send the data packet to the adjacent intermediate node with the target intermediate node as the sending node, return to and continue to execute the step of taking the adjacent intermediate node that receives the data packet as the candidate node until the relay node, and determine a routing path formed by the determined source node, the intermediate node, and the relay node.

An optional structure of the calculation module 64 in the embodiment of the present invention is: the calculation module 64 includes an acquisition unit, a first calculation unit, and a second calculation unit.

And the acquisition unit is used for the sending node to acquire the residual energy and the sending power of the node to be selected in the ACK packet.

A first calculating unit, configured to calculate residual energy and transmission power based on the doppler effect and the signal reception strength, and obtain a relative speed V between the transmission node and the node to be selected and a first distance L1

A second calculation unit for calculating a second calculation result according to the formula L2=a(L1+(t0-t) V), calculating a second distance L between the sending node and the node to be selected2Wherein L is2Is a second distance, a is a constant close to 1, L1Is a first distance, t0For updating time, t is the current time, V is the relative velocity, and the second distance is more accurate than the first distance.

An optional structure of the determination module 65 in the embodiment of the present invention is: the determination module 65 includes a third calculation unit, a selection unit, and a determination unit.

A third calculation unit for calculating a formula based on

Figure BDA0002263896360000131

Calculating the forwarding capacity value of the node to be selected, wherein Y is the forwarding capacity value of the node to be selected, E is the residual energy value of the node to be selected, k is the ratio of the ACK acknowledgement packet loss energy sent by the node to be selected to the data packet loss energy sent by the sending node, and P is the sum of the ACK acknowledgement packet loss energy and the data packet loss energy sent by the sending nodeeAnd (l, f, n, p) is the energy loss of the sending node for successfully transmitting the data packet to the node to be selected.

And the selection unit is used for selecting the minimum value of the forwarding capacity value of the node to be selected based on the forwarding capacity value of the node to be selected.

And the determining unit is used for determining the node to be selected with the maximum forwarding capacity value as the target intermediate node in the minimum value of the forwarding capacity values of the nodes to be selected.

According to the routing device in the underwater acoustic communication network disclosed in the embodiment of the present invention, the sink node broadcasts the control packet to the sensor node network at regular time, updates the routing table information of each sensor node based on the control packet, uses the source node as the sending node, sends the data packet to the adjacent intermediate node, uses the adjacent intermediate node receiving the data packet as the candidate node, the candidate node feeds back the ACK acknowledgement packet to the sending node, the sending node calculates by using the ACK acknowledgement packet to obtain the distance and the relative speed between the sending node and the candidate node, the sending node calculates the forwarding capability value of the candidate node based on the distance and the relative speed, determines the target intermediate node, uses the target intermediate node as the sending node, sends the data packet to the adjacent intermediate node, and returns to execute the step of using the adjacent intermediate node receiving the data packet as the candidate node, and determining a routing path formed by the determined source node, the intermediate node and the relay node until reaching the relay node. The distance between the adjacent nodes is calculated by using the ACK acknowledgement packet, so that the distance between the adjacent nodes is calculated without adding extra nodes, and the purpose of reducing the cost is achieved. The problem that the routing protocol based on the depth needs to acquire the depth information, so that extra nodes need to be equipped to calculate the distance, and the cost is increased is solved.

Based on the routing device in the underwater acoustic communication network disclosed by the embodiment of the present invention, the routing device in the underwater acoustic communication network further includes: and stopping the module.

And the stopping module is used for retransmitting the data packet if the sending node does not receive the ACK confirmation packet within the preset time, and stopping sending the data packet until the ACK confirmation packet is received or the retransmission times exceed the preset times.

Based on the routing device in the underwater acoustic communication network disclosed by the embodiment of the present invention, the routing device in the underwater acoustic communication network further includes: the device comprises a resetting module, a monitoring module and a deleting module.

And the resetting module is used for updating the routing table information of the target intermediate node according to the data packet when the target intermediate node receives the data packet, and resetting the timer corresponding to each node ID in the routing table information.

And the monitoring module is used for monitoring whether the timer corresponding to each node ID in the routing table information of the target intermediate node reaches a preset value or not in the routing establishment process.

And the deleting module is used for deleting the node information corresponding to the node ID from the routing table if the timer reaches a preset value.

According to the routing device in the underwater acoustic communication network disclosed in the embodiment of the present invention, the sink node broadcasts the control packet to the sensor node network at regular time, updates the routing table information of each sensor node based on the control packet, uses the source node as the sending node, sends the data packet to the adjacent intermediate node, uses the adjacent intermediate node receiving the data packet as the candidate node, the candidate node feeds back the ACK acknowledgement packet to the sending node, the sending node calculates by using the ACK acknowledgement packet to obtain the distance and the relative speed between the sending node and the candidate node, the sending node calculates the forwarding capability value of the candidate node based on the distance and the relative speed, determines the target intermediate node, uses the target intermediate node as the sending node, sends the data packet to the adjacent intermediate node, and returns to execute the step of using the adjacent intermediate node receiving the data packet as the candidate node, and determining a routing path formed by the determined source node, the intermediate node and the relay node until reaching the relay node. The distance between the adjacent nodes is calculated by using the ACK acknowledgement packet, so that the distance between the adjacent nodes is calculated without adding extra nodes, and the purpose of reducing the cost is achieved. The problem that the routing protocol based on the depth needs to acquire the depth information, so that extra nodes need to be equipped to calculate the distance, and the cost is increased is solved.

It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the device-like embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.

Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

20页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:数据传输方法和装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!