CN115551048A - Wireless ad hoc network communication method and device and electronic equipment - Google Patents

Wireless ad hoc network communication method and device and electronic equipment Download PDF

Info

Publication number
CN115551048A
CN115551048A CN202211145746.2A CN202211145746A CN115551048A CN 115551048 A CN115551048 A CN 115551048A CN 202211145746 A CN202211145746 A CN 202211145746A CN 115551048 A CN115551048 A CN 115551048A
Authority
CN
China
Prior art keywords
node
wireless
broadcast message
network
hoc network
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.)
Pending
Application number
CN202211145746.2A
Other languages
Chinese (zh)
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.)
Shenzhen Crystal Video Technology Co ltd
Original Assignee
Shenzhen Crystal Video 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 Shenzhen Crystal Video Technology Co ltd filed Critical Shenzhen Crystal Video Technology Co ltd
Priority to CN202211145746.2A priority Critical patent/CN115551048A/en
Publication of CN115551048A publication Critical patent/CN115551048A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/06Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services
    • H04W4/08User group management
    • 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/248Connectivity information update
    • 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)
  • Multimedia (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The present application relates to the field of wireless communications, and in particular, to a wireless ad hoc network communication method and apparatus, and an electronic device. A wireless ad hoc network communication method is applied to wireless communication equipment, the wireless communication equipment is a first node, and the first node is any one node in the wireless ad hoc network, and the method comprises the following steps: a first node acquires a locally stored network topological graph, wherein the network topological graph comprises the connection relation of each node in a wireless ad hoc network; determining a second node and a third node according to the network topological graph; and determining a first value and a second value according to the network topological graph, comparing the first value with the second value, and if the first value is greater than the second value, the first node forbids to send the broadcast message to the second node. According to the method and the device, only one node sends the broadcast message to the second node in the forwarding process of the broadcast message, so that the repeated sending of the broadcast message is avoided, and the consumption of network resources is reduced.

Description

Wireless ad hoc network communication method and device and electronic equipment
Technical Field
The present application relates to the field of wireless communications, and in particular, to a wireless ad hoc network communication method and apparatus, and an electronic device.
Background
The wireless ad hoc network is a distributed wireless packet autonomous network, has no fixed infrastructure, has equal node positions, can freely move, has the characteristics of flexible networking, multi-hop relay, damage resistance, self-healing and the like, and has very wide application prospect.
In a wireless communication system, broadcast means that a node transmits and other nodes can receive. In the existing wireless ad hoc network system, the adjacent non-source node of the source node receives the broadcast message sent by the source node and forwards the broadcast message to the adjacent node of the non-source node, and the broadcast message is forwarded for multiple times to realize the whole network broadcast.
In view of the above-mentioned related technologies, the inventor believes that, in the process of implementing broadcast message whole-network broadcast, broadcast messages are repeatedly transmitted, which causes high consumption on the network, and if the broadcast messages are not controlled, the broadcast messages may be circularly transmitted, which leads to network paralysis and communication failure.
Disclosure of Invention
In order to solve the problem that the broadcast message is repeatedly sent in the whole network broadcast process of the broadcast message and the consumption of the network is high, and to avoid the network paralysis and the communication incapability caused by the cyclic sending of the broadcast message, the application provides a wireless ad hoc network communication method, a wireless ad hoc network communication device and electronic equipment.
In a first aspect of the present application, a wireless ad hoc network communication method is provided, which is applied to a wireless communication device, where the wireless communication device is a node in a wireless ad hoc network, and the method includes:
the first node acquires a locally stored network topology map, wherein the network topology map comprises the connection relation of each node in the wireless ad hoc network; determining a second node and a third node according to the network topological graph; the second node is a node connected with the first node, and the third node is a node connected with the second node; determining a first numerical value and a second numerical value according to the network topological graph; the first numerical value is the accumulated forwarding times of the broadcast message sent to the second node through the first node, and the second numerical value is the accumulated forwarding times of the broadcast message sent to the second node through the third node;
comparing the magnitude of the first and second numerical values; and if the first value is larger than the second value, the first node prohibits sending the broadcast message to the second node.
By adopting the technical scheme, the first node determines a second node connected with the first node and a third node connected with the second node according to a locally stored network topology map; and determining the accumulated forwarding times of the broadcast message sent to the second node through the first node and the third node respectively, wherein the nodes with more message forwarding times forbid sending the broadcast message to the second node, so that only one node sends the broadcast message to the second node in the forwarding process of the broadcast message, the repeated sending of the broadcast message is avoided, and the node with the least message forwarding times is selected to send the broadcast message, thereby effectively improving the message forwarding efficiency and reducing the consumption of network resources.
In a possible implementation manner, before the first node acquires the locally stored network topology map, the method further includes:
the first node detects the signal intensity between the first node and the second node, and when the signal intensity is greater than or equal to a preset signal intensity threshold value, the first node establishes a connection relation with the second node to construct a network topological graph.
In one possible embodiment, the method further comprises:
and the first node generates a node ID, locally stores the node ID and further updates the network topology map, wherein the node ID is obtained by adding 1 to the accumulated number of nodes in the wireless ad hoc network.
By adopting the technical scheme, the nodes in the wireless ad hoc network are marked by the node IDs, so that the connection relation between each node is conveniently recorded and analyzed.
In a possible embodiment, comparing the magnitudes of the first and second values comprises:
if the first value is equal to the second value, the node with smaller node ID in the first node and the third node sends the broadcast message to the second node.
By adopting the technical scheme, when the message forwarding times of forwarding the broadcast message from the source node to the second node through the first node or the third node are the same, the node with smaller node ID in the first node and the third node is specified to send the broadcast message to the second node, so that the phenomenon that the messages are repeatedly sent because a plurality of nodes send the broadcast message to the same node when the forwarding times are the same is avoided, and the consumption of network resources is reduced.
In one possible embodiment, the method further comprises:
after receiving the broadcast message sent by the fourth node, the first node updates a first message sending list to a second message sending list according to a preset rule, wherein the preset rule is that after receiving the broadcast message sent by the sending node, the receiving node is prohibited from sending the broadcast message to the sending node, the first message sending list comprises the fourth node, and the second message sending list does not comprise the fourth node.
By adopting the technical scheme, the first node does not send the broadcast message to the fourth node after receiving the broadcast message sent by the fourth node, thereby avoiding the message from being repeatedly sent to the fourth node and reducing the consumption of network resources.
In one possible embodiment, the method further comprises:
and the first node detects the signal intensity between the first node and the second node, and when the signal intensity between the first node and the second node is smaller than the preset signal intensity threshold value, the first node disconnects the connection relation with the second node and updates the network topological graph.
In one possible embodiment, the method further comprises:
and when the first node detects that the signal intensity between the first node and a fifth node is greater than or equal to the signal intensity threshold, establishing a connection relationship between the first node and the fifth node, and updating the network topological graph, wherein the fifth node is a newly added node in the wireless ad hoc network.
By adopting the technical scheme, when the nodes in the wireless ad hoc network are disconnected or a new node and the nodes in the wireless ad hoc network establish a connection relationship to change a network topology structure, each node in the wireless ad hoc network updates a network topology map and acquires the latest connection relationship of each node in the wireless ad hoc network.
In a possible implementation, the signal between the first node and the second node is a WiFi signal or a bluetooth signal.
In a second aspect of the present application, there is provided a wireless ad hoc network communication apparatus, the apparatus being a wireless communication device, the wireless communication device being a first node, the first node being any one node in the wireless ad hoc network, the apparatus comprising an obtaining unit, a determining unit, and a comparing unit, wherein,
the acquiring unit is configured to acquire a network topology map locally stored by the first node, where the network topology map includes a connection relationship between nodes in the wireless ad hoc network;
the determining unit is used for determining a first numerical value and a second numerical value according to the network topological graph; the first numerical value is the accumulated forwarding times of the broadcast message sent to the second node through the first node, and the second numerical value is the accumulated forwarding times of the broadcast message sent to the second node through the third node; the comparison unit is used for comparing the first numerical value with the second numerical value; and if the first value is larger than the second value, the first node prohibits sending the broadcast message to the second node.
In a possible implementation manner, the determining unit is further configured to detect a signal strength between the first node and the second node, and when the signal strength is greater than or equal to a preset signal strength threshold, the first node establishes a connection relationship with the second node to construct a network topology.
In a possible implementation manner, the apparatus further includes an updating unit, where the first node generates a node ID, and locally stores the node ID, so as to update the network topology, where the node ID is obtained by adding 1 to the number of nodes accumulated in the wireless ad hoc network.
In a possible implementation manner, if the first value is equal to the second value, the node with the smaller node ID of the first node and the third node sends the broadcast message to the second node.
In a possible implementation manner, the updating unit is further configured to update a message sending list, after the first node receives the broadcast message sent by a fourth node, the first message sending list is updated to a second message sending list according to a preset rule, the preset rule is that after the receiving node receives the broadcast message sent by the sending node, the receiving node is prohibited from sending the broadcast message to the sending node, the first message sending list includes the fourth node, and the second message sending list does not include the fourth node.
In a possible implementation manner, the first node detects a signal strength between the first node and the second node, and when the signal strength between the first node and the second node is smaller than the preset signal strength threshold, the first node disconnects a connection relationship with the second node, and updates the network topology map.
In a possible embodiment, the determining unit is further configured to detect signal strengths of the first node and the fifth node; when the first node detects that the signal intensity between the first node and the fifth node is greater than or equal to the signal intensity threshold value, the first node establishes a connection relationship with the fifth node, and updates the network topology map, wherein the fifth node is a newly added node in the wireless ad hoc network.
In a possible embodiment, the signal between the first node and the second node is a WiFi signal or a bluetooth signal.
In a third aspect of the application, there is provided an electronic device comprising a processor, a memory for storing instructions, a user interface and a network interface for communicating with other devices, and a processor for executing the instructions stored in the memory to cause the electronic device to perform the method of any one of the above.
In summary, the present application includes at least one of the following beneficial technical effects:
the first node determines a second node connected with the first node according to a locally stored network topological graph, and determines a third node connected with the second node; the accumulated forwarding times of the broadcast messages sent to the second node through the first node and the third node are respectively determined, the nodes with more message forwarding times forbid sending the broadcast messages to the second node, only one node sends the broadcast messages to the second node in the forwarding process of the broadcast messages, the broadcast messages are prevented from being sent repeatedly, and consumption of network resources is reduced;
in the process of sending the broadcast message, the path with the least forwarding times is selected to forward the broadcast message, and the message sending efficiency is improved.
Drawings
Fig. 1 is a flowchart illustrating a wireless ad hoc network communication method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a wireless ad hoc network according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a wireless ad hoc network communication device according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Description of reference numerals: 301. an acquisition unit; 302. a determination unit; 303. a comparison unit; 304. an update unit; 400. an electronic device; 401. a processor; 402. a communication bus; 403. a user interface; 404. a network interface; 405. a memory.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments.
In the description of the embodiments of the present application, "for example" is used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "for example" is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "such as" is intended to present relevant concepts in a concrete fashion.
In the description of the embodiments of the present application, the terms "first" and "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or to implicitly indicate the technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. The terms "include" and variations thereof mean "including, but not limited to," unless otherwise specifically noted.
The wireless communication device in the present application may be any electronic device with a wireless communication function, such as a mobile phone, a bluetooth speaker, a tablet computer, etc.
A wireless ad hoc network communication method is applied to wireless communication equipment, wherein the wireless communication equipment is a first node, and the first node is any one node in a wireless ad hoc network. There are several nodes in the wireless ad hoc network, and the embodiment only takes the first node as an example. In this embodiment, each node in the wireless ad hoc network stores connection relationship information of all nodes in the wireless ad hoc network, that is, stores a connection node list of all nodes, and constructs a network topology according to the connection node list of all nodes.
Referring to fig. 1, a method for wireless ad hoc network communication according to an embodiment of the present application is shown, the method including the following steps:
step S101: the first node acquires a locally stored network topology map, wherein the network topology map comprises the connection relation of each node in the wireless ad hoc network.
In a possible implementation manner, a first node detects signal strength between the first node and a second node, and when the signal strength between the first node and the second node is greater than or equal to a preset signal strength threshold value, that is, the signal strength between the first node and the second node reaches the signal strength capable of establishing a connection relationship, the first node establishes a connection relationship with the second node to construct a network topological graph; the first node obtains the node ID according to the rule of adding 1 on the basis of accumulating the number of nodes in the wireless ad hoc network, and locally stores the node ID so as to update the locally stored network topological graph.
When the network topology map is updated, the first node sends a broadcast message containing the locally stored network topology map to other nodes, receives the broadcast message containing the network topology map stored by the node sent by the other nodes, locally stores the connection relation in the network topology map of the other nodes, finishes updating the network topology map locally stored by the first node when the received network topology map is the same as the locally stored network topology map, and stops sending the broadcast message containing the locally stored network topology map.
Step S102: determining a second node and a third node according to the network topological graph; the second node is a node connected to the first node, and the third node is a node connected to the second node.
Step S103: determining a first value and a second value according to the network topological graph; the first value is the accumulated forwarding times of the broadcast message sent to the second node through the first node, and the second value is the accumulated forwarding times of the broadcast message sent to the second node through the third node.
It should be noted that the forwarding times disclosed in this specification must be directly transmitted by the forwarding node to the forwarded node, and must be the shortest forwarding path (i.e., the minimum forwarding times) that the forwarding node transmits to the forwarded node.
Step S104: and comparing the first value with the second value, and if the first value is larger than the second value, the first node forbids to send the broadcast message to the second node.
In a possible implementation manner, when the first node is not the source node, the first node receives a broadcast message including a source node ID sent by the fourth node, and updates the first message sending list to the second message sending list according to a preset rule; the preset rule is that after the receiving node receives the broadcast message sent by the sending node, the receiving node is prohibited from sending the broadcast message to the sending node, the first message sending list comprises the fourth node, and the second message sending list does not comprise the fourth node.
When the first node is a source node, the first message sending list is not required to be updated, and the first message sending list is a list of nodes connected with the first node.
The first node determines a second node connected with the first node according to the locally stored node connection relation, determines a third node connected with the second node, then determines the accumulated forwarding times of the broadcast message sent to the second node through the first node as a first numerical value according to the locally stored node connection relation and a source node ID in the broadcast message, determines the accumulated forwarding times of the broadcast message sent to the second node through the third node as a second numerical value, compares the first numerical value with the second numerical value, and judges whether the first node sends the broadcast message to the second node or not.
If the first value is larger than the second value, the first node forbids sending broadcast messages to the second node; if the first value is smaller than the second value, the first node sends a broadcast message to the second node.
In a possible embodiment, if the first value is equal to the second value, the node with the smaller node ID of the first node and the third node sends a broadcast message to the second node.
In a possible implementation manner, when the first node detects that the second node is not connected to a third node, the first node directly sends the broadcast message to the second node, and the number of message forwarding times required for sending the broadcast message from the source node to the second node through the first node does not need to be determined, so that the consumption of network resources is reduced.
When the first node detects that the signal intensity between the first node and the second node is smaller than a preset signal intensity threshold value, the first node disconnects the connection relation with the second node, and updates a locally stored network topological graph.
When the first node detects that the signal intensity between the first node and the new node is greater than or equal to a preset signal intensity threshold value, the first node establishes a connection relation with the new node and updates a locally stored network topological graph.
The signals between the nodes are WiFi signals or bluetooth signals, and may also be other wireless networking signals.
Referring to fig. 2, a schematic diagram of a wireless ad hoc network according to an embodiment of the present application is shown.
Taking the wireless ad hoc network of fig. 2 as an example, when the node 5 is a source node, the node 5 sends a broadcast message to its connected nodes, i.e., the node 5 sends the broadcast message to the nodes 1 and 6, and the nodes 1 and 6 prohibit sending the broadcast message to the node 5.
After receiving the broadcast message, the node 1 determines that the other connection nodes of the node 2 are the node 3, the node 7, and the node 9, that is, the node 1 determines that the number of message forwarding times required for sending the broadcast message from the source node to the node 2 through the node 3, the node 7, and the node 9 is 5, 3, and 4, and that the number of message forwarding times required for sending the broadcast message from the source node to the node 2 through the node 1 is 2, that is, the node 1 sends the broadcast message to the node 2.
After receiving the broadcast message, the node 6 determines the other connection nodes of the node 10 and the node 7, and if the node 10 does not have other connection nodes, the node 10 directly sends the broadcast message to the node 10. Determining other connection nodes to the node 7 as a node 2, a node 8 and a node 9, determining that the number of message forwarding times required for transmitting the broadcast message from the source node to the node 7 through the node 2, the node 8 and the node 9 is 3, 4 and 5, and the number of message forwarding times required for transmitting the broadcast message from the source node to the node 7 through the node 6 is 2, that is, the node 6 transmits the broadcast message to the node 7.
After receiving the broadcast message, the node 2 determines other connection nodes of the nodes 3, 7 and 9, determines that the other connection nodes of the node 3 are the nodes 9 and 4, and determines that the message forwarding times required for sending the broadcast message from the source node to the node 3 through the nodes 9, 4 and 2 are 4, 5 and 3, that is, the node 2 sends the broadcast message to the node 3. Determining other connection nodes to the node 7 as the node 6, the node 8 and the node 9, and determining that the message forwarding times required for sending the broadcast message from the source node to the node 7 through the node 6, the node 8, the node 9 and the node 2 are 2, 5, 4 and 3 respectively, namely the node 2 forbids sending the broadcast message to the node 7. Determining other connection nodes to the node 9 as the node 3, the node 4, the node 7 and the node 8, determining that the message forwarding times required for sending the broadcast message from the source node to the node 9 through the node 3, the node 4, the node 7, the node 8 and the node 2 respectively are 4, 5, 3, 4 and 3, that is, the message forwarding times required for sending the broadcast message from the source node to the node 9 through the node 7 and the node 2 respectively are the same, and at this time, sending the broadcast message to the node 9 by the node 2 with a smaller node ID.
After receiving the broadcast message, the node 7 determines other connection nodes of the node 2, the node 8 and the node 9, determines the other connection nodes of the node 2 to be the node 1, the node 3 and the node 9, and determines that the message forwarding times required for transmitting the broadcast message from the source node to the node 2 through the node 1, the node 3, the node 9 and the node 7 are 2, 5, 4 and 3, that is, the node 7 prohibits transmitting the broadcast message to the node 2. Determining other connecting nodes of the node 8 as the node 4 and the node 9, and determining that the message forwarding times required for transmitting the broadcast message from the source node to the node 8 through the node 4, the node 9 and the node 7 are 5, 4 and 3 respectively, namely the node 7 transmits the broadcast message to the node 8. Determining other connecting nodes of the node 9 as the node 2, the node 3, the node 4 and the node 8, and determining that the message forwarding times required for sending the broadcast message from the source node to the node 9 through the node 2, the node 3, the node 4, the node 8 and the node 7 are 3, 4, 5, 4 and 3, that is, the message forwarding times required for sending the broadcast message from the source node to the node 9 through the node 2 and the node 7 respectively are the same, and since the node ID of the node 7 is larger than that of the node 2, the node 7 prohibits sending the broadcast message to the node 9.
After the node 3 receives the broadcast message, the method for determining the broadcast message obtains that the node 3 prohibits sending the broadcast message to the node 9, and the node 3 sends the broadcast message to the node 4.
After the node 9 receives the broadcast message, the node 9 is obtained to prohibit sending the broadcast message to the node 3 by the same determination method; node 9 refrains from sending broadcast messages to node 4; node 9 inhibits sending broadcast messages to node 7 and node 9 inhibits sending broadcast messages to node 8.
After the node 8 receives the broadcast message, the method for determining the broadcast message obtains that the node 8 prohibits sending the broadcast message to the node 4, and the node 8 prohibits sending the broadcast message to the node 9.
After the node 4 receives the broadcast message, the node 4 is forbidden to send the broadcast message to the node 8 by the determination method; node 4 refrains from sending broadcast messages to node 9.
When the wireless ad hoc network structure and the source node are not changed, the broadcast message is sent for the second time without determining the sending path of the message again, and the whole network broadcast of the message can be directly completed according to the last path.
When the wireless ad hoc network structure changes, namely a new node is added into the wireless ad hoc network in a networking mode, a node in the wireless ad hoc network is disconnected and leaves the wireless ad hoc network, or the connection relation of the nodes in the wireless ad hoc network is changed due to route change, each node in the wireless ad hoc network updates a network topological graph, a sending path of a message is determined according to the determining method, a path with the minimum broadcast message forwarding frequency is selected to send the broadcast message, multiple nodes are prevented from sending the broadcast message to the same node, the high-efficiency sending of the broadcast message is achieved, and the utilization rate of network resources is improved.
Referring to fig. 3, which shows a schematic structural diagram of a wireless ad hoc network communication apparatus according to an embodiment of the present application, the apparatus is a wireless communication device, the wireless communication device is a first node, the first node is any one node in a wireless ad hoc network, and the apparatus includes an obtaining unit 301, a determining unit 302, and a comparing unit 303, where,
an obtaining unit 301, configured to obtain a network topology map locally stored in a first node, where the network topology map includes a connection relationship between nodes in a wireless ad hoc network;
a determining unit 302, configured to determine a second node and a third node according to the network topology; the second node is a node connected with the first node, and the third node is a node connected with the second node; determining a first value and a second value according to the network topological graph; the first numerical value is the accumulated forwarding times of the broadcast message sent to the second node through the first node, and the second numerical value is the accumulated forwarding times of the broadcast message sent to the second node through the third node;
a comparing unit 303, configured to compare magnitudes of the first value and the second value; and if the first value is larger than the second value, the first node forbids to send the broadcast message to the second node.
In a possible implementation manner, the determining unit 302 is further configured to detect a signal strength between the first node and the second node, and when the signal strength is greater than or equal to a preset signal strength threshold, the first node establishes a connection relationship with the second node to construct a network topology.
In a possible implementation manner, the apparatus further includes an updating unit 304, where the updating unit 304 is configured to generate a node ID, and locally store the node ID, and further update the network topology map, where the node ID is obtained by adding 1 to the number of nodes accumulated in the wireless ad hoc network.
In a possible embodiment, if the first value is equal to the second value, the node with the smaller node ID of the first node and the third node sends a broadcast message to the second node.
In a possible implementation manner, the updating unit 304 is further configured to update a message sending list of the first node; after receiving the broadcast message sent by the fourth node, the first node updates the first message sending list into a second message sending list according to a preset rule, the preset rule is that after the receiving node receives the broadcast message sent by the sending node, the receiving node is prohibited from sending the broadcast message to the sending node, the first message sending list comprises the fourth node, and the second message sending list does not comprise the fourth node.
In a possible implementation manner, when the signal strength between the first node and the second node is smaller than a preset signal strength threshold, the first node disconnects the connection relationship with the second node, and updates the network topology map.
In a possible implementation manner, the determining unit 302 is further configured to detect a signal strength between the first node and a fifth node, and when the signal strength between the first node and the fifth node is greater than or equal to a signal strength threshold, the first node establishes a connection relationship with the fifth node, and updates the network topology, where the fifth node is a newly added node in the wireless ad hoc network.
In one possible embodiment, the signal between the first node and the second node is a WiFi signal or a bluetooth signal.
It should be noted that, when the apparatus provided in the foregoing embodiment implements the functions thereof, only the division of the functional modules is illustrated, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure of the apparatus may be divided into different functional modules to implement all or part of the functions described above. In addition, the apparatus and method embodiments provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments for details, which are not described herein again.
Referring to fig. 4, a schematic structural diagram of an electronic device is provided for an embodiment of the present application. As shown in fig. 4, the electronic device 400 may include: at least one processor 401, at least one network interface 404, a user interface 403, memory 405, at least one communication bus 402.
Wherein a communication bus 402 is used to enable connective communication between these components.
The user interface 403 may include a Display screen (Display) and a Camera (Camera), and the optional user interface 403 may also include a standard wired interface and a wireless interface.
The network interface 404 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), among others.
Processor 401 may include one or more processing cores, among other things. The processor 401, using various interfaces and lines to connect various parts throughout the server, performs various functions of the server and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 405 and invoking data stored in the memory 405. Alternatively, the processor 401 may be implemented in at least one hardware form of Digital Signal Processing (DSP), field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 401 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 401, but may be implemented by a single chip.
The Memory 405 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 405 includes a non-transitory computer-readable medium. The memory 405 may be used to store instructions, programs, code sets, or instruction sets. The memory 405 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the various method embodiments described above, and the like; the storage data area may store the data and the like referred to above in the respective method embodiments. The memory 405 may alternatively be at least one memory device located remotely from the processor 401 as previously described. As shown in fig. 4, the memory 405, which is a computer storage medium, may include therein an operating system, a network communication module, a user interface module, and an application program of a wireless ad hoc network communication method.
In the electronic device 400 shown in fig. 4, the user interface 403 is mainly used as an interface for providing input for a user, and acquiring data input by the user; and processor 401 may be configured to invoke an application program stored in memory 405 that stores a wireless ad hoc network communication method, which when executed by one or more processors causes electronic device 400 to perform the method as described in one or more of the above embodiments.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required for this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
The above description is only an exemplary embodiment of the present disclosure, and the scope of the present disclosure should not be limited thereby. That is, all equivalent changes and modifications made in accordance with the teachings of the present disclosure are intended to be included within the scope of the present disclosure. Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (10)

1. A wireless ad hoc network communication method is applied to a wireless communication device, wherein the wireless communication device is a first node, and the first node is any one node in the wireless ad hoc network, and the method comprises:
the first node acquires a locally stored network topology map, wherein the network topology map comprises the connection relation of each node in the wireless ad hoc network;
determining a second node and a third node according to the network topological graph; the second node is a node connected with the first node, and the third node is a node connected with the second node;
determining a first numerical value and a second numerical value according to the network topological graph; the first numerical value is the accumulated forwarding times of the broadcast message sent to the second node through the first node, and the second numerical value is the accumulated forwarding times of the broadcast message sent to the second node through the third node;
comparing the magnitude of the first and second values;
and if the first value is larger than the second value, the first node prohibits sending the broadcast message to the second node.
2. The wireless ad hoc network communication method according to claim 1, further comprising, before the first node acquires the locally stored network topology map:
the first node detects the signal intensity between the first node and the second node, and when the signal intensity is greater than or equal to a preset signal intensity threshold value, the first node establishes a connection relation with the second node to construct a network topological graph.
3. The wireless ad hoc network communication method according to claim 1, wherein the method further comprises:
and the first node generates a node ID, locally stores the node ID and further updates the network topology map, wherein the node ID is obtained by adding 1 to the accumulated number of nodes in the wireless ad hoc network.
4. The method of claim 3, wherein comparing the magnitudes of the first and second values comprises:
if the first value is equal to the second value, the node with smaller node ID in the first node and the third node sends the broadcast message to the second node.
5. The wireless ad hoc network communication method according to claim 1, wherein the method further comprises:
after receiving the broadcast message sent by a fourth node, the first node updates a first message sending list into a second message sending list according to a preset rule, wherein the preset rule is that after receiving the broadcast message sent by a sending node, the receiving node is prohibited from sending the broadcast message to the sending node, the first message sending list comprises the fourth node, and the second message sending list does not comprise the fourth node.
6. The wireless ad hoc network communication method according to claim 2, wherein the method further comprises:
and the first node detects the signal intensity between the first node and the second node, and when the signal intensity between the first node and the second node is smaller than the preset signal intensity threshold value, the first node disconnects the connection relation with the second node and updates the network topological graph.
7. The wireless ad hoc network communication method according to claim 2, wherein the method further comprises:
when the first node detects that the signal intensity between the first node and a fifth node is greater than or equal to the signal intensity threshold value, the first node establishes a connection relation with the fifth node, and updates the network topological graph, wherein the fifth node is a newly added node in the wireless ad hoc network.
8. The method of claim 2, wherein the signal between the first node and the second node is a WiFi signal or a bluetooth signal.
9. A wireless ad hoc network communication apparatus, wherein the apparatus is a wireless communication device, the wireless communication device is a first node, the first node is any one node in the wireless ad hoc network, the apparatus comprises an obtaining unit (301), a determining unit (302) and a comparing unit (303), wherein,
the obtaining unit (301) is configured to obtain a network topology map locally stored by the first node, where the network topology map includes a connection relationship between nodes in the wireless ad hoc network;
the determining unit (302) is used for determining a second node and a third node according to the network topological graph; the second node is a node connected with the first node, and the third node is a node connected with the second node; determining a first numerical value and a second numerical value according to the network topological graph; the first numerical value is the accumulated forwarding times of the broadcast message sent to the second node through the first node, and the second numerical value is the accumulated forwarding times of the broadcast message sent to the second node through the third node;
the comparison unit (303) is used for comparing the magnitude of the first numerical value and the second numerical value; and if the first value is larger than the second value, the first node prohibits sending the broadcast message to the second node.
10. An electronic device (400) comprising a processor (401), a memory (405), a user interface (403), and a network interface (404), the memory (405) being configured to store instructions, the user interface (403) and the network interface (404) being configured to communicate with other devices, the processor (401) being configured to execute the instructions stored in the memory (405) to cause the electronic device (400) to perform the method of any one of claims 1-8.
CN202211145746.2A 2022-09-20 2022-09-20 Wireless ad hoc network communication method and device and electronic equipment Pending CN115551048A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211145746.2A CN115551048A (en) 2022-09-20 2022-09-20 Wireless ad hoc network communication method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211145746.2A CN115551048A (en) 2022-09-20 2022-09-20 Wireless ad hoc network communication method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN115551048A true CN115551048A (en) 2022-12-30

Family

ID=84727254

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211145746.2A Pending CN115551048A (en) 2022-09-20 2022-09-20 Wireless ad hoc network communication method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN115551048A (en)

Similar Documents

Publication Publication Date Title
US10212537B2 (en) D2D communication discovery method, apparatus, and system
KR102296162B1 (en) Method for connecting wlan communication and an electronic device thereof
KR20140049612A (en) Providing communication path information in hybrid networks
JP2021510997A (en) Methods, devices, and systems for configuring policies for UEs
CN112261702B (en) Wireless Mesh network routing method and device based on position and electronic equipment
CN111263338B (en) Network distribution method of Bluetooth Mesh network, related network distribution equipment and system
CN109729761A (en) Access method, terminal device and the network equipment of network
CN111698751B (en) Method and device for determining URSP rule priority
CN108270745B (en) Business customized information pushing method, terminal and master control Bluetooth device
CN108390824B (en) Ad-hoc network path construction system and node
US10631336B2 (en) Wireless communication terminal, wireless communication method, and recording medium
US20170171809A1 (en) Wireless access point power save mode
JP2021515429A (en) Network self-organization methods and devices
CN107465609B (en) Terminal routing method based on Internet of things and Internet of things terminal
CN114786241B (en) Network selection method, related device, network equipment and storage medium
US20170346891A1 (en) Communication method
CN105706524A (en) Systems, methods and devices for modifying relay operation of a wireless device
CN108243455B (en) Service data sending method, device and terminal
JP5867236B2 (en) Data collection method, mobile terminal and data storage device
CN115551048A (en) Wireless ad hoc network communication method and device and electronic equipment
US10694553B2 (en) Connection method of communication device and the communication device
CN111093291A (en) TDMA ad hoc network, construction method thereof, node and storage medium
JP5957494B2 (en) WiFi connection system, WiFi connection terminal, WiFi connection method, and WiFi connection program
CN111193805B (en) Resource discovery method and device
CN111787591B (en) Neighbor discovery method and node

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