Directional neighbor discovery method based on multiple tokens in underwater Internet of Things
By predicting and resetting the scanning beams of underwater sensor nodes through Kalman filtering and multi-token mechanisms, it solves the problems of long discovery time and high energy consumption caused by changes in neighbor relationships in underwater dynamic environments, and achieves more efficient neighbors. Discovery and longer-lived underwater IoT networks.
Patent Information
- Application Number
- CN202410758839.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-13
- Publication Date
- 2024-09-24
AI Technical Summary
Underwater sensor nodes are affected by factors such as ocean currents and marine life in a dynamic environment, resulting in inaccurate or invalid neighbor relationships built in the initial deployment stage, resulting in neighbor discovery taking too long and energy consumption being excessive. A method suitable for underwater dynamic environments is needed. directed neighbor discovery method.
The Kalman filter method is used to predict the node's own speed, estimate the speed and position of neighbor nodes, reset the scanning beam, and use the multi-token mechanism to control the neighbor discovery process to reduce unnecessary beam scanning and improve discovery efficiency.
By predicting and resetting scanning beams, neighbor discovery time is reduced, node energy consumption is reduced, the network life of underwater IoT is extended, and the problem of neighbor relationship changes in dynamic environments is solved.
Smart Images

Figure CN118695220A
Abstract
Description
Technical Field
[0001] The invention belongs to the field of directional neighbor discovery in underwater Internet of Things, and in particular relates to a directional neighbor discovery method based on multiple tokens in underwater Internet of Things. Background Art
[0002] In the initial deployment phase, underwater sensor nodes in the underwater Internet of Things obtain neighbor relationships through neighbor discovery to build network topology. However, the underwater dynamic environment allows static underwater sensor nodes to have a certain degree of mobility, resulting in inaccurate or invalid neighbor relationships built in the initialization phase, requiring re-neighbor discovery, maintenance, and updating of neighbor relationships. If the neighbor discovery method used in the initial deployment phase is continued to be used to update neighbor relationships, it will take too long for neighbor discovery to take place and the energy consumption of underwater sensor nodes will be too high. Therefore, in order to address the problem of changes in neighbor relationships of underwater sensor nodes under the influence of dynamic factors such as ocean currents and marine life, a directional neighbor discovery method suitable for underwater dynamic environments is needed. Summary of the invention
[0003] In order to solve the problem of changes in neighbor relations in an underwater dynamic environment, the present invention provides a directional neighbor discovery method based on multiple tokens in an underwater Internet of Things. The method adopts a Kalman filtering method to predict the node's own speed, and estimates the speed and position of the neighbor node according to the predicted own speed, and then resets the scanning beam to avoid scanning the beam where there is no neighbor node, thereby reducing the time of neighbor discovery. For the heterogeneity of the scanning beam after the reset, a multi-token mechanism is used to control the process of neighbor discovery.
[0004] In order to achieve the above-mentioned invention object and the above-mentioned technical effect, the present invention is implemented by the following technical solutions:
[0005] S1. Construct a network model of the underwater Internet of Things, which includes a number of underwater sensor nodes, surface aggregation nodes, and surface base stations. The underwater sensor nodes are randomly deployed in the monitored waters, collect perceived data from the surrounding environment, and transmit the collected data to the surface aggregation nodes and the surface base stations through multi-hop transmission. The underwater sensor nodes are affected by dynamic factors such as ocean currents and fish schools, have a certain degree of mobility, and the neighbor relationship will change;
[0006] S2. Predict the node's own speed. According to the node's geographic location information and neighbor information obtained by network initialization, the Kalman filter method is used to predict the node's own speed.
[0007] S3. Estimate the speed and position of neighbor nodes, and estimate the speed and position of neighbor nodes in the next stage according to the predicted node's own speed;
[0008] S4. Reset the scanning beam, reset the scanning beam according to the estimated position of the neighbor node in the next stage, screen out the beam direction that may find the neighbor node, and exclude the beam direction that cannot find the neighbor;
[0009] S5. Use the multi-token mechanism to perform neighbor discovery. The node holding the token is the active node, and the node not holding the token is the passive node. The active node can actively initiate neighbor discovery. After completing its own neighbor discovery, the depth-first search method is used to pass the token until all nodes have held the token.
[0010] Preferably, the underwater sensor nodes in S1 use a regular dodecahedron model to construct a beam model, each underwater sensor node is equipped with a wireless optical communication module based on a multi-transceiver to realize wireless optical communication, and different beam directions have their own unique numbers. The underwater environment is a three-dimensional space, and the beam direction of the three-dimensional node needs to be able to cover the entire three-dimensional space, so as to realize the directional transmission and reception of the underwater sensor node; each underwater sensor node is equipped with a pressure sensor for acquiring depth information, each of the underwater sensor nodes has a single beam, each beam has a unique number, and adopts a half-duplex working mode, that is, the underwater sensor node can only activate one beam at the same time, and can only be in sending mode, receiving mode or sleep mode.
[0011] Preferably, predicting the node's own speed in step S2 is specifically as follows: predicting the node's own speed using the Kalman filter method according to the node's geographic location information and neighbor information obtained by network initialization; assuming that each underwater sensor node records its own speed observation value and position coordinates, these data are stored in the form of sampling points, and after each sampling is completed, the underwater sensor node only stores the current sampling point information and discards the old sampling point information; using the mathematical model of the Kalman filter method to establish a state space model of the underwater sensor node speed, the model includes a state equation and an observation equation, the state equation describes the evolution of the system state over time, and the observation equation describes how to generate observation data from the state variable, the state space model is as follows:
[0012]
[0013] Among them, v(t) is the state vector at time t; A is the state transfer matrix, which transforms the state at time t-1 into the state at time t; Q is the covariance matrix of process noise; z(t) is the observation vector at time t, H is the conversion matrix, which transforms the state into output; R is the covariance matrix of measurement noise. By integrating the state equation and observation equation of the underwater sensor node velocity into the recursive formula of Kalman filtering, the optimal estimate of the underwater sensor node velocity can be derived.
[0014] Preferably, the estimation of the speed and position of the neighboring node in step S3 is specifically as follows: estimating the speed and position of the neighboring node in the next stage according to the predicted node speed; i Node i, based on its own predicted speed Then its depth can be estimated as z j The speed of neighbor node j is:
[0015]
[0016] Underwater sensor node i uses the above formula to estimate the speed U of all neighbor nodes in its neighbor table z j , and then use the position coordinates and predicted speed of the neighbor node to estimate the position of the neighbor node in the next cycle, and use the periodic position calculation algorithm to get the predicted position of the neighbor node:
[0017]
[0018] Among them, Position(x,y,z) is the position coordinate of the neighbor node in the neighbor table; Position'(x,y,z) is the predicted position of the neighbor node in the next cycle; T is a neighbor discovery cycle; Represents the estimated speed of the neighbor node.
[0019] Preferably, resetting the scanning beam in step S4 is specifically as follows: resetting the scanning beam according to the estimated position of the neighbor node in the next stage, screening out the beam directions that may detect the neighbor nodes, and excluding the beam directions that cannot detect the neighbors. The underwater sensor node uses the estimated position of the neighbor node to determine which beam directions will not have neighbor nodes during the next neighbor discovery, thereby excluding these redundant beams, and only needs to consider the beam directions where the neighbor nodes may exist, and renumber the screened beams.
[0020] Preferably, the multi-token mechanism is used for neighbor discovery in step S5 as follows: the node holding the token is the active node, and the node not holding the token is the passive node. The active node can actively initiate neighbor discovery, and after completing its own neighbor discovery, the depth-first search method is used to pass the token until all nodes have held the token; after the token mechanism is introduced in neighbor discovery, only the node holding the token can actively initiate neighbor discovery. The node holding the token is called the active node, and the remaining nodes are called passive nodes. The active node is in the sending mode, and the passive node is in the receiving mode. The process of neighbor discovery is divided into three stages: the scanning detection stage, the handshake stage, and the token transfer stage; the three stages are specifically:
[0021] S5-1: In the scanning detection phase, the passive node is always in the receiving mode, and starts from its own beam numbered 1 and scans all beams in order, waiting to receive the detection data packet sent by the active node. The time for each beam to stay is t r , t r The size of needs to ensure that a complete detection data packet can be received. Correspondingly, the active node is always in the sending mode when scanning the detection node, and scans all beams in order starting from its own beam numbered 1. The active node sends a detection data packet in each beam direction. The information in the detection data packet contains the time when the active node scans the current beam in the handshake phase, so that the active node and the passive node can align the beams in the handshake phase. The time the active node stays in each beam is:
[0022] t s =t r *K(4);
[0023] Where K is the number of beams of the node.
[0024] S5-2: After the node completes the scanning and detection phase, it enters the handshake phase. In the handshake phase, two handshakes are required. The active node is in the receiving mode and scans all beams in order starting from its own beam numbered 1, waiting for the passive node to send a request data packet. The dwell time of each beam is T shake , T shake The size of necessitates that the node be able to complete two handshakes:
[0025] T shake =2*t slot (5);
[0026] Among them, t slot represents a time slot, and the time slot size is the time required to complete a data packet transmission; the passive node is in the sending mode, and scans the beam of the detection data packet received by itself according to the agreed time in the scanning detection phase, and the time each beam stays is also T shake In T shake In the first time slot, the passive node sends a request data packet, and switches to the receiving mode in the second time slot, waiting for the confirmation data packet sent by the active node. After receiving the request data packet sent by the passive node in the first time slot, the active node parses the data packet and extracts the information of the passive node from it to see whether the passive node is a new neighbor node. If it is a new neighbor node, it updates its neighbor table and switches to the sending mode in the first time slot, sending a confirmation data packet. If it is a node that has been discovered, it updates the beam direction of the node, does not respond to the request data packet, and switches to the sleep mode in the second time slot;
[0027] S5-3: After the handshake phase, the active node ends its own neighbor discovery and then starts to pass the token. The token passing method adopts the depth-first search method. After the token is passed to the next underwater sensor node, it enters the scanning detection phase and the handshake phase again to complete its own neighbor discovery. Repeat S5-1 to S5-3 until each underwater sensor node has held the token.
[0028] Beneficial effects: The present invention provides a multi-token based directional neighbor discovery method in an underwater Internet of Things, which has the following advantages:
[0029] 1. The Kalman filter method is used to predict the node's own speed, thereby estimating the speed and position of neighbor nodes, providing prior knowledge for subsequent neighbor discovery.
[0030] 2. According to the estimated position of the neighboring nodes, the scanning beam is reset to exclude the beams where no neighboring nodes exist, thus reducing the number of beams that need to be scanned, thereby speeding up the neighbor discovery process.
[0031] 3. The multi-token mechanism is used to control the neighbor discovery process, which not only solves the problem of difficulty in neighbor discovery when the number of node beams is heterogeneous after the scanning beam is reset, but also reduces the probability of conflict between nodes, thereby reducing the neighbor discovery time and reducing node energy consumption, which is conducive to extending the network life of the underwater Internet of Things. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 A network structure diagram of the underwater Internet of Things of an embodiment;
[0033] Figure 2 A model diagram of an underwater sensor node of an embodiment;
[0034] Figure 3 Schematic diagram of scanning beam resetting in an embodiment. DETAILED DESCRIPTION
[0035] In order to enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application are clearly and completely described below. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.
[0036] A multi-token based directional neighbor discovery method in an underwater Internet of Things, the steps of which include:
[0037] S1. Constructing the network model of underwater Internet of Things
[0038] like Figure 1As shown, the underwater Internet of Things includes several underwater sensor nodes, surface aggregation nodes, and surface base stations. The underwater sensor nodes are randomly deployed in the monitored waters, collect perceived data from the surrounding environment, and transmit the collected data to the surface aggregation nodes and the surface base stations through multi-hop transmission. The underwater sensor nodes are affected by dynamic factors such as ocean currents and fish schools, and have a certain degree of mobility, which causes changes in neighbor relationships.
[0039] like Figure 2 As shown, the underwater sensor node uses a regular dodecahedron model to construct a beam model, and each underwater node is equipped with a wireless optical communication module based on a multi-transceiver to realize wireless optical communication. Different beam directions of each node have their own numbers. The underwater environment is a three-dimensional space. The beam direction of the three-dimensional node needs to be able to cover the entire three-dimensional space, so as to realize the directional transmission and reception of the underwater sensor node. Each underwater sensor node is equipped with a pressure sensor for obtaining depth information. Each of the underwater sensor nodes has a single beam, each beam has a unique number, and adopts a half-duplex working mode, that is, the underwater sensor node can only activate one beam at the same time, and can only be in the sending mode, receiving mode or sleep mode.
[0040] S2. Predict the node’s own speed.
[0041] According to the node geographic location information and neighbor information obtained by network initialization, the Kalman filter method is used to predict the node's own speed. Assume that each underwater sensor node records its own speed observation value and position coordinates. These data are stored in the form of sampling points. After each sampling is completed, the underwater sensor node only stores the current sampling point information and discards the information of the old sampling point;
[0042] The mathematical model of the Kalman filter method is used to establish the state space model of the underwater sensor node speed. The model includes the state equation and the observation equation. The state equation describes the evolution of the system state over time, while the observation equation describes how to generate observation data from the state variables. The state space model is as follows:
[0043]
[0044] Among them, v(t) is the state vector at time t; A is the state transfer matrix, which converts the state at time t-1 to the state at time t; Q is the covariance matrix of process noise; z(t) is the observation vector at time t, H is the conversion matrix, which converts the state to output; R is the covariance matrix of measurement noise.
[0045] By integrating the state equation and observation equation of the underwater sensor node velocity into the recursive formula of the Kalman filter, the optimal estimate of the underwater sensor node velocity can be derived.
[0046] S3. Estimate the speed and position of neighbor nodes.
[0047] Estimate the speed and position of the neighbor node in the next stage based on the predicted node's own speed. i Node i, based on its own predicted speed Then its depth can be estimated as z j The speed of neighbor node j is:
[0048]
[0049] Underwater sensor node i uses formula (2) to estimate the speed of all neighbor nodes in its neighbor table: Then, the position coordinates and predicted speed of the neighbor node are used to estimate the position of the neighbor node in the next cycle, and the predicted position of the neighbor node is obtained by using the periodic position calculation algorithm:
[0050]
[0051] Among them, Position(x,y,z) is the position coordinate of the neighbor node in the neighbor table; Position'(x,y,z) is the predicted position of the neighbor node in the next cycle; T is a neighbor discovery cycle; Represents the estimated speed of the neighbor node.
[0052] S4. Reset the scanning beam.
[0053] The underwater sensor node uses the estimated position of the neighbor node to determine which beam directions will not have neighbor nodes during the next neighbor discovery, thereby eliminating these redundant beams and only considering the beam directions where neighbor nodes may exist, and renumbering the screened beams. Figure 3 As shown, assuming that node A and node B originally have 8 beams, after screening, the beams that node A needs to scan are: S = {2, 3, 6, 8}, and the beams that node B needs to scan are: S = {2, 4, 6}. After screening out the beams where neighbor nodes may exist, the numbers of these beams are scattered and disordered. In order to facilitate the subsequent directional neighbor discovery, these beams need to be renumbered and the correspondence between the new and old numbers must be retained. After renumbering, the beams that node A needs to scan are S' = {1, 2, 3, 4}, and the beams that node B needs to scan are S' = {1, 2, 3}. Let the new number correspond to the old number one by one. For node A, when scanning beam 1, the actual scan is the original beam 2. When scanning beam 2, the actual scan is beam 3. When scanning beam 3, the actual scan is beam 6. When scanning beam 4, the actual scan is beam 8. For node B, scanning beam 1, actually scanning beam 2, scanning beam 2, actually scanning beam 4, scanning beam 3, actually scanning beam 6.
[0054] S5. Use multi-token mechanism for neighbor discovery.
[0055] After the token mechanism is introduced in neighbor discovery, only the node holding the token can actively initiate neighbor discovery. The node holding the token is called the active node, and the other nodes are called passive nodes. The active node is in the sending mode, and the passive node is in the receiving mode. The process of neighbor discovery is divided into three stages: scanning and detection stage, handshake stage, and token transfer stage.
[0056] S5-1: In the scanning detection phase, the passive node is always in the receiving mode, and scans all beams in order starting from its own beam numbered 1, waiting to receive the detection data packet sent by the active node. The time each beam stays is t r , t r The size of needs to ensure that a complete detection data packet can be received. Correspondingly, the active node is always in the sending mode when scanning the detection node, and scans all beams in order starting from its own beam numbered 1. The active node sends a detection data packet in each beam direction. The information in the detection data packet contains the time when the active node scans the current beam in the handshake phase, so that the active node and the passive node can align the beams in the handshake phase. The time the active node stays in each beam is:
[0057] t s =t r *K(4);
[0058] Where K is the number of beams of the node.
[0059] S5-2: After the node completes the scanning and detection phase, it enters the handshake phase. In the handshake phase, two handshakes are required. The active node is in the receiving mode and scans all beams in order starting from its own beam numbered 1, waiting for the passive node to send a request data packet. The dwell time of each beam is T shake , T shake The size of necessitates that the node be able to complete two handshakes:
[0060] T shake =2*t slot (5);
[0061] Among them, t slot Represents a time slot, where the time slot size is the time required to complete a data packet transmission;
[0062] The passive node is in the sending mode and scans the beams that receive the detection data packets according to the agreed time in the scanning detection phase. The time each beam stays is also T shake In T shakeIn the first time slot, the passive node sends a request data packet, and switches to the receiving mode in the second time slot, waiting for the confirmation data packet sent by the active node. After receiving the request data packet sent by the passive node in the first time slot, the active node parses the data packet and extracts the information of the passive node from it to see whether the passive node is a new neighbor node. If it is a new neighbor node, it updates its neighbor table and switches to the sending mode in the first time slot, sending a confirmation data packet. If it is a node that has been discovered, it updates the beam direction of the node, does not respond to the request data packet, and switches to the sleep mode in the second time slot;
[0063] S5-3: After the handshake phase, the active node ends its own neighbor discovery and then starts to pass the token. The token passing method adopts the DFS method. After the token is passed to the next underwater sensor node, it enters the scanning detection phase and the handshake phase again to complete its own neighbor discovery. Repeat S5-1 to S5-3 until each underwater sensor node has held the token.
[0064] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Two modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A multi-token based directional neighbor discovery method in underwater Internet of Things, characterized in that: The following steps are involved: S1: Construct an underwater Internet of Things network model, which includes a number of underwater sensor nodes, surface aggregation nodes, and surface base stations. The underwater sensor nodes are randomly deployed in the monitored waters, collect perceived data from the surrounding environment, and transmit the collected data to the surface aggregation nodes and the surface base stations through multi-hop transmission. The underwater sensor nodes have a certain degree of mobility, and the neighbor relationship will change; S2: The underwater sensor node predicts its own speed. According to the node geographic location information and neighbor information obtained by network initialization, the Kalman filter method is used to predict the node's own speed; S3: Estimate the speed and position of neighbor nodes, and estimate the speed and position of neighbor nodes in the next stage according to the predicted node's own speed; S4: The underwater sensor node resets the scanning beam according to the estimated position of the neighbor node in the next stage, selects the beam direction that can detect the neighbor node, and excludes the beam direction that cannot detect the neighbor; S5: Underwater sensor nodes use a multi-token mechanism to perform neighbor discovery. The node holding the token is the active node, and the node without the token is the passive node. The active node can actively initiate neighbor discovery. After completing its own neighbor discovery, the depth-first search method is used to pass the token until all nodes have held the token.
2. The multi-token based directional neighbor discovery method in underwater Internet of Things according to claim 1, characterized in that: The underwater sensor node in step S1 uses a regular dodecahedron model to construct a beam model. Each underwater sensor node is equipped with a wireless optical communication module based on a multi-transceiver to realize wireless optical communication, and different beams have their own unique numbers. The underwater environment is a three-dimensional space. The beam direction of the three-dimensional node needs to be able to cover the entire three-dimensional space, thereby realizing directional transmission and reception of the underwater sensor node.
3. The multi-token based directional neighbor discovery method in underwater Internet of Things according to claim 2, characterized in that: Each of the underwater sensor nodes is equipped with a pressure sensor for acquiring depth information. Each of the underwater sensor nodes has a single beam, each beam has a unique number, and adopts a half-duplex working mode, that is, the underwater sensor node can only activate one beam at the same time and can only be in sending mode, receiving mode or sleep mode.
4. The multi-token based directional neighbor discovery method in underwater Internet of Things according to claim 1, characterized in that: The specific method for the underwater sensor node to predict its own speed in step S2 is as follows: Assume that each underwater sensor node records its own speed observation value and position coordinates. These data are stored in the form of sampling points. After each sampling is completed, the underwater sensor node only stores the current sampling point information and discards the information of the old sampling point; The mathematical model of the Kalman filter method is used to establish the state space model of the underwater sensor node speed. The model includes the state equation and the observation equation. The state equation describes the evolution of the system state over time, while the observation equation describes how to generate observation data from the state variables. The state space model is as follows: Where v(t) is the state vector at time t; A is the state transfer matrix, which converts the state at time t-1 to the state at time t; Q is the covariance matrix of process noise; z(t) is the observation vector at time t, H is the conversion matrix, which converts the state to output; R is the covariance matrix of measurement noise; By integrating the state equation and observation equation of the underwater sensor node velocity into the recursive formula of Kalman filter, the optimal estimation value of the underwater sensor node velocity is derived.
5. The multi-token based directional neighbor discovery method in underwater Internet of Things according to claim 1, characterized in that: The specific method for estimating the speed and position of the neighboring node in step S3 is as follows: For depth z i Node i, according to its own predicted speed U z i , its estimated depth is z j The speed of neighbor node j is: Underwater sensor node i uses formula (2) to estimate the speed of all neighbor nodes in its neighbor table: Then, the position coordinates and predicted speed of the neighbor node are used to estimate the position of the neighbor node in the next cycle, and the predicted position of the neighbor node is obtained by using the periodic position calculation algorithm: Among them, Position(x,y,z) is the position coordinate of the neighbor node in the neighbor table; Position'(x,y,z) is the predicted position of the neighbor node in the next cycle; T is a neighbor discovery cycle; Represents the estimated speed of the neighbor node.
6. The multi-token based directional neighbor discovery method in underwater Internet of Things according to claim 1, characterized in that: The specific method for the underwater sensor node to reset the scanning beam in step S4 is as follows: The underwater sensor node uses the estimated position of the neighbor node to determine that when discovering neighbors next time, it will exclude the redundant beams of the neighbor nodes in the beam direction and consider the beam directions of the neighbor nodes, and renumber the screened beams.
7. The multi-token based directional neighbor discovery method in underwater Internet of Things according to claim 1, characterized in that: The specific method for the underwater sensor node to perform neighbor discovery using the multi-token mechanism in step S5 is as follows: After the token mechanism is introduced in neighbor discovery, only the node holding the token can actively initiate neighbor discovery. The node holding the token is called the active node, and the other nodes are called the passive nodes. The active node is in the sending mode, and the passive node is in the receiving mode. The process of neighbor discovery is divided into three stages: scanning detection stage, handshake stage, and token transfer stage; S5-1: In the scanning detection phase, the passive node is always in the receiving mode, and starts from its own beam numbered 1 and scans all beams in order, waiting to receive the detection data packet sent by the active node. The time for each beam to stay is t r , t r The size of needs to ensure that a complete detection data packet can be received. Correspondingly, the active node is always in the sending mode when scanning the detection node, and scans all beams in order starting from its own beam numbered 1. The active node sends a detection data packet in each beam direction. The information in the detection data packet contains the time when the active node scans the current beam in the handshake phase, so that the active node and the passive node can align the beams in the handshake phase. The time the active node stays in each beam is: t s =t r *K(4); Where K is the number of beams of the node; S5-2: After the node completes the scanning and detection phase, it enters the handshake phase. In the handshake phase, two handshakes are required. The active node is in the receiving mode and scans all beams in order starting from its own beam numbered 1, waiting for the passive node to send a request data packet. The stay time of each beam is T shake , T shake The size of necessitates that the node be able to complete two handshakes: T shake =2*t slot (5); Among them, t slot Represents a time slot, where the time slot size is the time required to complete a data packet transmission; The passive node is in the sending mode and scans the beams that receive the detection data packets according to the agreed time in the scanning detection phase. The time each beam stays is also T shake In T shake In the first time slot, the passive node sends a request data packet, and switches to the receiving mode in the second time slot, waiting for the confirmation data packet sent by the active node. After receiving the request data packet sent by the passive node in the first time slot, the active node parses the data packet and extracts the information of the passive node from it to see whether the passive node is a new neighbor node. If it is a new neighbor node, it updates its neighbor table and switches to the sending mode in the first time slot, sending a confirmation data packet. If it is a node that has been discovered, it updates the beam direction of the node, does not respond to the request data packet, and switches to the sleep mode in the second time slot; S5-3: After the handshake phase, the active node ends its own neighbor discovery and then starts to pass the token. The token passing method adopts the depth-first search method. After the token is passed to the next underwater sensor node, it enters the scanning detection phase and the handshake phase again to complete its own neighbor discovery. Repeat S5-1 to S5-3 until each underwater sensor node has held the token.
