CN111465074B - Method and terminal for generating topological relation in wireless ad hoc network - Google Patents

Method and terminal for generating topological relation in wireless ad hoc network Download PDF

Info

Publication number
CN111465074B
CN111465074B CN202010300700.8A CN202010300700A CN111465074B CN 111465074 B CN111465074 B CN 111465074B CN 202010300700 A CN202010300700 A CN 202010300700A CN 111465074 B CN111465074 B CN 111465074B
Authority
CN
China
Prior art keywords
node
management message
wireless
topology management
neighbor
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010300700.8A
Other languages
Chinese (zh)
Other versions
CN111465074A (en
Inventor
范信斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ankexun Fujian Technology Co ltd
Original Assignee
Ankexun Fujian Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ankexun Fujian Technology Co ltd filed Critical Ankexun Fujian Technology Co ltd
Priority to CN202010300700.8A priority Critical patent/CN111465074B/en
Publication of CN111465074A publication Critical patent/CN111465074A/en
Application granted granted Critical
Publication of CN111465074B publication Critical patent/CN111465074B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W40/00Communication routing or communication path finding
    • H04W40/02Communication route or path selection, e.g. power-based or shortest path routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W40/00Communication routing or communication path finding
    • H04W40/02Communication route or path selection, e.g. power-based or shortest path routing
    • H04W40/12Communication route or path selection, e.g. power-based or shortest path routing based on transmission quality or channel quality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W40/00Communication routing or communication path finding
    • H04W40/24Connectivity information management, e.g. connectivity discovery or connectivity update
    • H04W40/246Connectivity information discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/18Self-organising networks, e.g. ad-hoc networks or sensor networks

Landscapes

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

Abstract

The invention discloses a generating method and terminal of topological relation in wireless ad hoc network, which manages the forwarding of message by learning and topological management of the equipment name of the sending node and the wireless signal strength from the sending node to the receiving node through the neighbor node, each node in the wireless ad hoc network can learn the topological relation among all nodes in the whole network, the connection relation and the state change between the wireless ad hoc network and other nodes can be sensed in real time, the topological relation can be forwarded by each node without the help of an intermediate gateway node, and the forwarded chain link relation forms a netlike topological relation through a plurality of chain link relations, so that the topological structure and the change thereof in the network can be quickly learned, the latest topological relation can be automatically generated in real time, the manual intervention is not needed, the usability of the wireless ad hoc network is improved, and the experience effect of a user is improved.

Description

Method and terminal for generating topological relation in wireless ad hoc network
Technical Field
The invention relates to the field of wireless ad hoc networks, in particular to a method and a terminal for generating a topological relation in a wireless ad hoc network.
Background
With the higher pursuit of wireless network bandwidth and the diversification of services, the network mode is more and more complex, and the wireless spectrum resources are more and more precious. How to effectively merge heterogeneous networks and improve the utilization efficiency of wireless resources faces a great challenge. Therefore, the convergence of the cognitive and heterogeneous networks in the wireless environment has become a key point of research in the industry, and the hardware cost, the deployment cost and the maintenance cost of the future network are reduced while the existing network structure and the transmission quality are ensured.
The Wireless Mesh network is also called as a Wireless Mesh network (Wireless Mesh network), is a novel broadband Wireless network, has the characteristics different from the traditional Wireless network, has great advantages in various aspects of flexible networking, network coverage rate improvement, network capacity increase, early investment reduction and the like, and is particularly suitable for realizing Wireless access and coverage of network bandwidth under the condition of lacking of wired network resources. Currently, the wireless Mesh network has gained wide attention in international academia and industry, and is getting more and more widely applied.
The most remarkable characteristic of the wireless Mesh network is that the wireless Mesh network has self-organizing, self-repairing and self-balancing capabilities, each Mesh node forms a Mesh network topological structure, as shown in fig. 1, each Mesh node forms a Mesh network topological structure, the network has the remarkable characteristic of high reliability, as long as nodes within the reach range of wireless transmitting power can directly communicate, the fault of one node only affects wireless links directly related to the node, and other residual nodes can perform route self-adjustment, so that other nodes can still communicate with each other normally. However, the greatest challenge comes from an excessively complex network structure, which results in a very complex routing protocol, especially in a wireless environment, where nodes have mobility and the wireless environment is constantly changing, and the transmission power of the nodes is also often adjusted, which results in very frequent changes of a network topology structure, and each node in the network must be able to quickly learn the change of the topology structure in the network, so that any node at any time can sense the feature information of other nodes.
In fig. 1, mesh node a directly links to each other with mesh node B, F and E, does not have direct link to each other with mesh node C and D, can not directly perceive the existence of mesh node C and D from mesh node a's angle, therefore, just can't draw the network topology structure as shown in fig. 1 on mesh node a, among the prior art, generally realize through adding the gateway node in the ad hoc network, perceive its mesh node that can't perceive through the grid node, however, this kind of implementation not only increases the cost, and the formation efficiency of network topology relation is lower moreover.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: the method and the terminal for generating the topological relation in the wireless ad hoc network can enable each node in the wireless ad hoc network to quickly learn the topological structure in the network and quickly generate the topological relation.
In order to solve the technical problems, the invention adopts a technical scheme that:
a method for generating a topological relation in a wireless ad hoc network comprises the following steps:
s1, each node in the wireless ad hoc network learns the node directly connected with the node through a neighbor node learning algorithm, and determines the corresponding neighbor node;
s2, each node in the wireless ad hoc network periodically sends a corresponding topology management message to a neighbor node, wherein the topology management message comprises the equipment name of a sending node and the wireless signal strength from the sending node to a receiving node;
s3, storing the content of the topology management message and the wireless signal strength from the receiving node to the sending node by the receiving node which receives the topology management message from the sending node, judging whether the topology management message meets the forwarding condition, if so, adding the stored content in the corresponding topology management message, forwarding the corresponding topology management message to other neighbor nodes except the sending node, and returning to S3 until the topology management message does not meet the forwarding condition;
s4, each node in the wireless ad hoc network generates a topological relation with other nodes in the wireless ad hoc network according to the topological management message stored by the node and the wireless signal strength from the node to the neighbor node.
In order to solve the technical problem, the invention adopts another technical scheme as follows:
a terminal for generating a topological relation in a wireless ad hoc network comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor executes the computer program to realize the following steps:
s1, each node in the wireless ad hoc network learns the node directly connected with the node through a neighbor node learning algorithm, and determines the corresponding neighbor node;
s2, each node in the wireless ad hoc network periodically sends a corresponding topology management message to a neighbor node, wherein the topology management message comprises the equipment name of a sending node and the wireless signal strength from the sending node to a receiving node;
s3, storing the content of the topology management message and the wireless signal strength from the receiving node to the sending node by the receiving node which receives the topology management message from the sending node, judging whether the topology management message meets the forwarding condition, if so, adding the stored content in the corresponding topology management message, forwarding the corresponding topology management message to other neighbor nodes except the sending node, and returning to S3 until the topology management message does not meet the forwarding condition;
s4, each node in the wireless ad hoc network generates a topological relation with other nodes in the wireless ad hoc network according to the topological management message stored by the node and the wireless signal strength from the node to the neighbor node.
The invention has the beneficial effects that: through the forwarding of neighbor node study and including the equipment name of sending node and the wireless signal intensity topology management message of sending node to receiving node, make every node in the wireless ad hoc network can both learn the topology relation between all nodes in the whole network, can in real time perception wireless ad hoc network with the relation of connection and the state change between other nodes, need not be with the help of middle gateway node, every node all can forward the topology relation, and what forward is the chain link relation, finally through many chain link relations, form a netted topology relation, can learn the topology structure and change in the network fast, real-time automatic generation up-to-date topology relation, need not artificial intervention, improve the ease for use of wireless ad hoc network, improve user's experience effect.
Drawings
FIG. 1 is a schematic diagram of a topological relationship formed by nodes in a wireless ad hoc network;
fig. 2 is a flowchart illustrating steps of a method for generating a topology relationship in a wireless ad hoc network according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a terminal for generating a topological relation in a wireless ad hoc network according to an embodiment of the present invention;
fig. 4 is a topological relation diagram formed by nodes in the wireless ad hoc network according to the embodiment of the present invention;
FIG. 5 is a graph illustrating the learned neighbor relationship of node A in the topological graph of FIG. 4 according to an embodiment of the present invention;
FIG. 6 is a graph of the neighbor relation learned by node F in the topological relation graph of FIG. 4 according to an embodiment of the present invention;
fig. 7 is a topological information graph obtained after a node C in the topological relation graph shown in fig. 4 receives a topological management message of a node G in the embodiment of the present invention;
fig. 8 is a topological information diagram obtained after the node B, F, D in the topological relation diagram shown in fig. 4 receives a topological management packet of the node C in the embodiment of the present invention;
fig. 9 is a topological relation graph generated after any node acquires topological information of other nodes after neighbor learning and topological relation forwarding are performed in the embodiment of the present invention;
description of reference numerals:
1. a generating terminal of topological relation in wireless ad hoc network; 2. a memory; 3. a processor.
Detailed Description
In order to explain technical contents, achieved objects, and effects of the present invention in detail, the following description is made with reference to the accompanying drawings in combination with the embodiments.
Referring to fig. 2, a method for generating a topological relation in a wireless ad hoc network includes the steps of:
s1, each node in the wireless ad hoc network learns the node directly connected with the node through a neighbor node learning algorithm, and determines the corresponding neighbor node;
s2, each node in the wireless ad hoc network periodically sends a corresponding topology management message to a neighbor node, wherein the topology management message comprises the equipment name of a sending node and the wireless signal strength from the sending node to a receiving node;
s3, storing the content of the topology management message and the wireless signal strength from the receiving node to the sending node by the receiving node which receives the topology management message from the sending node, judging whether the topology management message meets the forwarding condition, if so, adding the stored content in the corresponding topology management message, forwarding the corresponding topology management message to other neighbor nodes except the sending node, and returning to S3 until the topology management message does not meet the forwarding condition;
s4, each node in the wireless ad hoc network generates a topological relation with other nodes in the wireless ad hoc network according to the topological management message stored by the node and the wireless signal strength from the node to the neighbor node.
As can be seen from the above description, the beneficial effects of the present invention are: through the forwarding of neighbor node study and including the equipment name of sending node and the wireless signal intensity topology management message of sending node to receiving node, make every node in the wireless ad hoc network can both learn the topology relation between all nodes in the whole network, can in real time perception wireless ad hoc network with the relation of connection and the state change between other nodes, need not be with the help of middle gateway node, every node all can forward the topology relation, and what forward is the chain link relation, finally through many chain link relations, form a netted topology relation, can learn the topology structure and change in the network fast, real-time automatic generation up-to-date topology relation, need not artificial intervention, improve the ease for use of wireless ad hoc network, improve user's experience effect.
Further, the S1 includes:
each node in the wireless ad hoc network periodically broadcasts a neighbor node discovery message, wherein the source MAC address of the neighbor node discovery message is the MAC address of a sending node;
and after receiving the neighbor node discovery message, the node directly connected with the sending node analyzes the neighbor node discovery message, acquires the source MAC address of the neighbor node discovery message, and records the source MAC address in a corresponding neighbor relation table.
As can be seen from the above description, the neighbor node discovery packet is periodically broadcast, and after receiving the neighbor node discovery packet, the receiving node analyzes the neighbor node discovery packet to obtain the source MAC address therein, and records the source MAC address into the corresponding neighbor relation table, so that the neighbor node of each node in the wireless ad hoc network can be quickly and reliably learned.
Further, the transfer spring in S3 includes:
the survival time of the topology management message is more than 0, and the receiving node is provided with other neighbor nodes besides the sending node;
and when the message is forwarded once, the survival time of the topology management message is reduced by 1.
According to the above description, the topology management message is set with the forwarding condition, and only if the forwarding condition is satisfied, the forwarding is allowed, wherein the forwarding condition includes that the lifetime of the topology management message is greater than 0 and the receiving node has other neighbor nodes besides the sending node, the reliability of forwarding the topology management message is ensured by setting the forwarding condition, and reliable and effective information can be provided for the formation of the subsequent topology relation.
Further, the S3 further includes:
when a receiving node receiving the topology management message from a sending node stores the content of the topology management message and the wireless signal strength from the receiving node to the sending node, recording the current timestamp of the receiving node, associating the timestamp with the sending node, and if the receiving node does not receive the topology management message from the sending node within a preset time, clearing the topology management message received from the sending node and the wireless signal strength from the receiving node to the sending node, which are stored by the receiving node.
According to the description, when the receiving node stores the content of the topology management message and the wireless signal strength from the receiving node to the sending node, the timestamp of the receiving node is recorded, if the receiving node does not receive the topology management message within the preset time, the stored content of the topology management message and the wireless signal strength from the receiving node to the sending node are cleared, outdated topology information can be cleared in time, the dynamic change of a wireless ad hoc network is adapted, and the correctness and the reliability of the generated topology relationship are guaranteed.
Referring to fig. 3, a terminal for generating a topological relation in a wireless ad hoc network includes a memory, a processor, and a computer program stored in the memory and running on the processor, where the processor executes the computer program to implement the following steps:
s1, each node in the wireless ad hoc network learns the node directly connected with the node through a neighbor node learning algorithm, and determines the corresponding neighbor node;
s2, each node in the wireless ad hoc network periodically sends a corresponding topology management message to a neighbor node, wherein the topology management message comprises the equipment name of a sending node and the wireless signal strength from the sending node to a receiving node;
s3, storing the content of the topology management message and the wireless signal strength from the receiving node to the sending node by the receiving node which receives the topology management message from the sending node, judging whether the topology management message meets the forwarding condition, if so, adding the stored content in the corresponding topology management message, forwarding the corresponding topology management message to other neighbor nodes except the sending node, and returning to S3 until the topology management message does not meet the forwarding condition;
s4, each node in the wireless ad hoc network generates a topological relation with other nodes in the wireless ad hoc network according to the topological management message stored by the node and the wireless signal strength from the node to the neighbor node.
As can be seen from the above description, the beneficial effects of the present invention are: through the forwarding of neighbor node study and including the equipment name of sending node and the wireless signal intensity topology management message of sending node to receiving node, make every node in the wireless ad hoc network can both learn the topology relation between all nodes in the whole network, can in real time perception wireless ad hoc network with the relation of connection and the state change between other nodes, need not be with the help of middle gateway node, every node all can forward the topology relation, and what forward is the chain link relation, finally through many chain link relations, form a netted topology relation, can learn the topology structure and change in the network fast, real-time automatic generation up-to-date topology relation, need not artificial intervention, improve the ease for use of wireless ad hoc network, improve user's experience effect.
Further, the S1 includes:
each node in the wireless ad hoc network periodically broadcasts a neighbor node discovery message, wherein the source MAC address of the neighbor node discovery message is the MAC address of a sending node;
and after receiving the neighbor node discovery message, the node directly connected with the sending node analyzes the neighbor node discovery message, acquires the source MAC address of the neighbor node discovery message, and records the source MAC address in a corresponding neighbor relation table.
As can be seen from the above description, the neighbor node discovery packet is periodically broadcast, and after receiving the neighbor node discovery packet, the receiving node analyzes the neighbor node discovery packet to obtain the source MAC address therein, and records the source MAC address into the corresponding neighbor relation table, so that the neighbor node of each node in the wireless ad hoc network can be quickly and reliably learned.
Further, the transfer spring in S3 includes:
the survival time of the topology management message is more than 0, and the receiving node is provided with other neighbor nodes besides the sending node;
and when the message is forwarded once, the survival time of the topology management message is reduced by 1.
According to the above description, the topology management message is set with the forwarding condition, and only if the forwarding condition is satisfied, the forwarding is allowed, wherein the forwarding condition includes that the lifetime of the topology management message is greater than 0 and the receiving node has other neighbor nodes besides the sending node, the reliability of forwarding the topology management message is ensured by setting the forwarding condition, and reliable and effective information can be provided for the formation of the subsequent topology relation.
Further, the S3 further includes:
when a receiving node receiving the topology management message from a sending node stores the content of the topology management message and the wireless signal strength from the receiving node to the sending node, recording the current timestamp of the receiving node, associating the timestamp with the sending node, and if the receiving node does not receive the topology management message from the sending node within a preset time, clearing the topology management message received from the sending node and the wireless signal strength from the receiving node to the sending node, which are stored by the receiving node.
According to the description, when the receiving node stores the content of the topology management message and the wireless signal strength from the receiving node to the sending node, the timestamp of the receiving node is recorded, if the receiving node does not receive the topology management message within the preset time, the stored content of the topology management message and the wireless signal strength from the receiving node to the sending node are cleared, outdated topology information can be cleared in time, the dynamic change of a wireless ad hoc network is adapted, and the correctness and the reliability of the generated topology relationship are guaranteed.
Example one
Referring to fig. 2, a method for generating a topological relation in a wireless ad hoc network includes the steps of:
s1, each node in the wireless ad hoc network learns the node directly connected with the node through a neighbor node learning algorithm, and determines the corresponding neighbor node;
specifically, each node in the wireless ad hoc network periodically broadcasts a neighbor node discovery message, and a source MAC address of the neighbor node discovery message is an MAC address of a sending node;
after receiving the neighbor node discovery message, the node directly connected with the sending node analyzes the neighbor node discovery message, acquires the source MAC address of the neighbor node discovery message, and records the source MAC address in a corresponding neighbor relation table;
as shown in fig. 4, which is a schematic diagram of a topological relation formed by all nodes in a wireless ad hoc network, the neighbor relation learned by the node a is shown in fig. 5, and the neighbor relation learned by the node F is shown in fig. 6 through the neighbor node learning;
s2, each node in the wireless ad hoc network periodically sends a corresponding topology management message to a neighbor node, wherein the topology management message comprises the equipment name of a sending node and the wireless signal strength from the sending node to a receiving node;
s3, storing the content of the topology management message and the wireless signal strength from the receiving node to the sending node by the receiving node which receives the topology management message from the sending node, judging whether the topology management message meets the forwarding condition, if so, adding the stored content in the corresponding topology management message, forwarding the corresponding topology management message to other neighbor nodes except the sending node, and returning to S3 until the topology management message does not meet the forwarding condition;
wherein, the forwarding condition comprises:
the survival time of the topology management message is more than 0, and the receiving node is provided with other neighbor nodes besides the sending node;
the survival time of the topology management message is reduced by 1 every time the topology management message is forwarded;
wherein, the time-To-live (ttl) live refers To the maximum number of network segments allowed To pass before an IP packet is discarded by a router, and plays a role in limiting the time of existence of an IP data packet in a computer network; when the IP data packet is forwarded, the router is required to reduce the TTL by at least 1, if the TTL is reduced to 0 before the IP packet reaches the target IP, the router discards the message;
here, the topology management packet in our wireless ad hoc network system refers to the TTL concept in the IP packet for determining the forwarding condition of the topology management packet;
s4, each node in the wireless ad hoc network generates a topological relation with other nodes in the wireless ad hoc network according to the stored topological management message and the wireless signal strength from the node to the neighbor node;
specifically, the method comprises the following steps:
a. each node in the ad hoc network periodically sends a topology management message to its neighboring node, and how to send and forward the topology management message is explained by taking a node G in fig. 4 as an example;
b. the node G sends a topology management message (PKT) to the neighbor node CGC) The message carries the wireless signal strength (RSSI) from node G to node CGC) And the device NAME (NAME) of node GG);
c. After receiving the topology management message of the node G, the node C stores the topology management message, namely, the RSSI (received signal strength indicator)GC) And nodeDevice NAME of G (NAME)G) And acquires and saves the wireless signal strength (RSSI) from node C to node GCG) At this time, node C may draw the topological information graph as shown in fig. 7;
d. the node C judges whether the received topology management packet meets the forwarding condition, that is:
1. the node receiving the message has other neighbor nodes except the node sending the message, in this example, the node C has neighbor nodes except the node G;
2. the lifetime (ttl) of the message is greater than 0, the initial lifetime of the message may be preset, for example, it may be set to 16, and the lifetime is reduced by 1 every time the message is forwarded, that is, the maximum number of times the message is forwarded is 16.
e. Node C judges topological management message (PKT)GC) Satisfies the forwarding condition, and adds the topology management message to the topological management message PKTGCOther nodes except the sending node C respectively forward the topology management message, namely forward the topology management message PKT to the node BCB(the message carries the Radio Signal Strength (RSSI) from node C to node BCB) And the device NAME (NAME) of node CC) Forward topology management message PKT to node DCD(the message carries the Radio Signal Strength (RSSI) from node C to node DCD) And the device NAME (NAME) of node CC) Forward topology management message PKT to node FCF(the message carries the Radio Signal Strength (RSSI) from node C to node FCF) And the device NAME (NAME) of node CC) And the wireless signal strength (RSSI) of the previous link is measuredGCAnd RSSICG) And equipment NAME (NAME)G) Adding the message into a message;
f. the nodes B, D and F receive the PKT respectivelyCB、PKTCDAnd PKTCFThen, the operation similar to step c is continued, the wireless signal strength and the device name of all the links in the message are stored, and at this time, the nodes B, D and F can respectively draw the topological relation graph shown in fig. 8;
g. the subsequent node processing will repeat the processing process of d-f until the topological management message does not accord with the forwarding condition, and then the topological management message is discarded;
h. after the forwarding is performed for multiple times, any node in the ad hoc network can know link information and characteristic information between other nodes, and then a topological relation graph of the whole ad hoc network as shown in fig. 9 can be depicted;
the wireless signal strength in a wireless network is an important factor in determining the link quality between two nodes. In the wireless ad hoc network topology, there may be multiple paths for the source node to send data to the destination node, and as shown in fig. 1, the a node sends data to the C node, which may be multiple transmission paths, i.e., a → B → C, A → F → C, A → E → F → C, A → E → D → C …, is the optimal path? The wireless signal strength among the nodes is a main consideration factor for calculating the optimal path, so that the wireless signal strength is added in the topological management message, on one hand, the topological relation can be determined by the wireless signal strength, and on the other hand, the optimal path can be determined in the subsequent routing process;
in order to represent the uniqueness of the node, the node can be generally identified by the MAC address or the IP address of the equipment, but in order to enable a user to visually see the characteristics of the node, a node is uniquely identified by naming the node, and the node name can be named by the user.
Example two
The present embodiment is different from the first embodiment in that the S3 further includes:
when a receiving node receiving the topology management message from a sending node stores the content of the topology management message and the wireless signal strength from the receiving node to the sending node, recording the current timestamp of the receiving node, associating the timestamp with the sending node, and clearing the topology management message received from the sending node and the wireless signal strength from the receiving node to the sending node, which are stored by the receiving node, if the receiving node does not receive the topology management message from the sending node within a preset time;
when a node receives a topology management message and performs storage operation, recording a timestamp of a current node, associating the timestamp with a sending node (namely, the topology management message sent by each sending node corresponds to one timestamp), starting timing from the timestamp of the current node, judging whether the node receives the topology management message sent by the sending node within a preset time, if not, clearing node information and link information which are stored by the node and are related to the topology management message of the sending node, and if the topology management message of the sending node is received, resetting a timer, re-recording the timestamp of the current node, and re-timing;
as shown in fig. 1, a node B periodically sends a topology management packet to a node a, and if it is assumed that this period is 100ms, the node a receives the topology management packet of the node B, stores corresponding data, records a current timestamp, and associates the timestamp with the node B; if the node B is suddenly turned off, the node a does not receive the topology management packet sent by the node B within a preset time (if 1S), and then the node a clears the data related to the node B, and similarly, the method is applied to other nodes in the topology network.
The aged node information can be cleared in time through a timeout mechanism, so that the latest data is kept in the whole topological network, and the nodes in the network can sense that other nodes leave or are closed in time.
EXAMPLE III
Referring to fig. 3, a terminal 1 for generating a topological relation in a wireless ad hoc network includes a memory 2, a processor 3, and a computer program stored in the memory 2 and executable on the processor 3, where the processor 3 implements the steps of the first embodiment or the second embodiment when executing the computer program.
In summary, in the process of generating the topological relation in the wireless ad hoc network, each node in the wireless ad hoc network can quickly learn the topological relation among all nodes in the whole network through the learning of the neighboring nodes and the forwarding of the topological relation without the aid of an additional gateway node, so that the connection relation and the state change between the wireless ad hoc network and other nodes can be sensed in real time, each node can forward the topological relation, the forwarded chain-shaped link relation is formed, finally, a net-shaped topological relation is formed through a plurality of chain-shaped relations, the topological structure and the change in the network can be quickly learned, the latest topological relation can be automatically generated in real time, the human intervention is not needed, the usability of the wireless ad hoc network is improved, the experience effect of a user is improved, and the outdated topological relation can be timely cleared, the dynamic change wireless ad hoc network is kept highly synchronous, the corresponding topological relation can be updated in time, the reliability is high, and the robustness is good.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all equivalent changes made by using the contents of the present specification and the drawings, or applied directly or indirectly to the related technical fields, are included in the scope of the present invention.

Claims (4)

1. A method for generating a topological relation in a wireless ad hoc network is characterized by comprising the following steps:
s1, each node in the wireless ad hoc network learns the node directly connected with the node through a neighbor node learning algorithm, and determines the corresponding neighbor node;
s2, each node in the wireless ad hoc network periodically sends a corresponding topology management message to a neighbor node, wherein the topology management message comprises the equipment name of a sending node and the wireless signal strength from the sending node to a receiving node;
s3, storing the content of the topology management message and the wireless signal strength from the receiving node to the sending node by the receiving node which receives the topology management message from the sending node, judging whether the topology management message meets the forwarding condition, if so, adding the stored content in the corresponding topology management message, forwarding the corresponding topology management message to other neighbor nodes except the sending node, and returning to S3 until the topology management message does not meet the forwarding condition;
s4, each node in the wireless ad hoc network generates a topological relation with other nodes in the wireless ad hoc network according to the stored topological management message and the wireless signal strength from the node to the neighbor node;
the S1 includes:
each node in the wireless ad hoc network periodically broadcasts a neighbor node discovery message, wherein the source MAC address of the neighbor node discovery message is the MAC address of a sending node;
after receiving the neighbor node discovery message, the node directly connected with the sending node analyzes the neighbor node discovery message, acquires the source MAC address of the neighbor node discovery message, and records the source MAC address in a corresponding neighbor relation table;
the transfer spring in the S3 includes:
the survival time of the topology management message is more than 0, and the receiving node is provided with other neighbor nodes besides the sending node;
and when the message is forwarded once, the survival time of the topology management message is reduced by 1.
2. The method for generating a topological relation in a wireless ad hoc network according to claim 1, wherein said S3 further comprises:
when a receiving node receiving the topology management message from a sending node stores the content of the topology management message and the wireless signal strength from the receiving node to the sending node, recording the current timestamp of the receiving node, associating the timestamp with the sending node, and if the receiving node does not receive the topology management message from the sending node within a preset time, clearing the topology management message received from the sending node and the wireless signal strength from the receiving node to the sending node, which are stored by the receiving node.
3. A terminal for generating a topological relation in a wireless ad hoc network, comprising a memory, a processor and a computer program stored in the memory and operable on the processor, wherein the processor executes the computer program to implement the following steps:
s1, each node in the wireless ad hoc network learns the node directly connected with the node through a neighbor node learning algorithm, and determines the corresponding neighbor node;
s2, each node in the wireless ad hoc network periodically sends a corresponding topology management message to a neighbor node, wherein the topology management message comprises the equipment name of a sending node and the wireless signal strength from the sending node to a receiving node;
s3, storing the content of the topology management message and the wireless signal strength from the receiving node to the sending node by the receiving node which receives the topology management message from the sending node, judging whether the topology management message meets the forwarding condition, if so, adding the stored content in the corresponding topology management message, forwarding the corresponding topology management message to other neighbor nodes except the sending node, and returning to S3 until the topology management message does not meet the forwarding condition;
s4, each node in the wireless ad hoc network generates a topological relation with other nodes in the wireless ad hoc network according to the stored topological management message and the wireless signal strength from the node to the neighbor node;
the S1 includes:
each node in the wireless ad hoc network periodically broadcasts a neighbor node discovery message, wherein the source MAC address of the neighbor node discovery message is the MAC address of a sending node;
after receiving the neighbor node discovery message, the node directly connected with the sending node analyzes the neighbor node discovery message, acquires the source MAC address of the neighbor node discovery message, and records the source MAC address in a corresponding neighbor relation table;
the transfer spring in the S3 includes:
the survival time of the topology management message is more than 0, and the receiving node is provided with other neighbor nodes besides the sending node;
and when the message is forwarded once, the survival time of the topology management message is reduced by 1.
4. The terminal for generating a topological relation in a wireless ad hoc network according to claim 3, wherein said S3 further comprises:
when a receiving node receiving the topology management message from a sending node stores the content of the topology management message and the wireless signal strength from the receiving node to the sending node, recording the current timestamp of the receiving node, associating the timestamp with the sending node, and if the receiving node does not receive the topology management message from the sending node within a preset time, clearing the topology management message received from the sending node and the wireless signal strength from the receiving node to the sending node, which are stored by the receiving node.
CN202010300700.8A 2020-04-16 2020-04-16 Method and terminal for generating topological relation in wireless ad hoc network Active CN111465074B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010300700.8A CN111465074B (en) 2020-04-16 2020-04-16 Method and terminal for generating topological relation in wireless ad hoc network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010300700.8A CN111465074B (en) 2020-04-16 2020-04-16 Method and terminal for generating topological relation in wireless ad hoc network

Publications (2)

Publication Number Publication Date
CN111465074A CN111465074A (en) 2020-07-28
CN111465074B true CN111465074B (en) 2022-04-26

Family

ID=71682684

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010300700.8A Active CN111465074B (en) 2020-04-16 2020-04-16 Method and terminal for generating topological relation in wireless ad hoc network

Country Status (1)

Country Link
CN (1) CN111465074B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102946649A (en) * 2012-10-30 2013-02-27 浙江理工大学 Wireless sensor network topology construction method based on spanning tree
CN103355005A (en) * 2011-01-31 2013-10-16 阿尔卡特朗讯公司 Method for improved topology mapping in wireless communication networks

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7522540B1 (en) * 2005-04-15 2009-04-21 Nvidia Corporation Extended service set mesh topology discovery
US8325627B2 (en) * 2007-04-13 2012-12-04 Hart Communication Foundation Adaptive scheduling in a wireless network
US7978632B2 (en) * 2008-05-13 2011-07-12 Nortel Networks Limited Wireless mesh network transit link topology optimization method and system
CN109831334B (en) * 2019-02-20 2022-03-08 普联技术有限公司 Network topology construction method and device and terminal equipment
CN110035468B (en) * 2019-03-26 2021-04-13 北京宇航系统工程研究所 High-reliability high-safety wireless network topology control system
CN110831104B (en) * 2019-12-04 2022-09-23 深圳市纽瑞芯科技有限公司 Routing method for linear topology wireless ad hoc network

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103355005A (en) * 2011-01-31 2013-10-16 阿尔卡特朗讯公司 Method for improved topology mapping in wireless communication networks
CN102946649A (en) * 2012-10-30 2013-02-27 浙江理工大学 Wireless sensor network topology construction method based on spanning tree

Also Published As

Publication number Publication date
CN111465074A (en) 2020-07-28

Similar Documents

Publication Publication Date Title
Cuomo et al. Routing in ZigBee: benefits from exploiting the IEEE 802.15. 4 association tree
Campista et al. Routing metrics and protocols for wireless mesh networks
Alvi et al. Energy efficient green routing protocol for internet of multimedia things
Gnawali et al. Collection tree protocol
EP2652905B1 (en) Increased communication opportunities with low-contact nodes in a computer network
CN106686659B (en) AOMDV-based energy perception node disjoint multipath routing algorithm
TWI381683B (en) Method and system of routing in a utility smart-grid network
TWI418183B (en) Method and system of routing in a utility smart-grid network
Herberg et al. A comparative performance study of the routing protocols load and rpl with bi-directional traffic in low-power and lossy networks (lln)
US9712433B2 (en) Maintaining and communicating nodal neighboring information
CN106454984B (en) Routing method and device
JP2006319676A (en) Frame transmitting method, topology acquiring method and radio communication system
CN106954243B (en) Route realizing method based on wireless chain network
Hussain et al. Constructing a cds-based network backbone for energy efficiency in industrial wireless sensor networks
Gharavi et al. Multigate mesh routing for smart grid last mile communications
Fan et al. A multi-hop energy-efficient sleeping MAC protocol based on TDMA scheduling for wireless mesh sensor networks
CN110809305A (en) Multi-node low-overhead wireless routing method
JP2009260720A (en) Route control method, communication system and communication apparatus
Liu et al. Performance evaluation of BATMAN-Adv wireless mesh network routing algorithms
CN111465074B (en) Method and terminal for generating topological relation in wireless ad hoc network
CN116746128A (en) Optimized routing of time critical traffic in a mesh network
Wei et al. SRPA: SDN-based routing protocol for ad hoc networks
Ramrekha et al. Standardisation advancements in the area of routing for mobile ad-hoc networks
Bai et al. Hello message scheme enhancement in CRMANET
Ge et al. Implementation of multiple border routers for 6LoWPAN with ContikiOS

Legal Events

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