CN115037687A - Route establishing method and device based on multiple nodes and electronic equipment - Google Patents

Route establishing method and device based on multiple nodes and electronic equipment Download PDF

Info

Publication number
CN115037687A
CN115037687A CN202210396712.4A CN202210396712A CN115037687A CN 115037687 A CN115037687 A CN 115037687A CN 202210396712 A CN202210396712 A CN 202210396712A CN 115037687 A CN115037687 A CN 115037687A
Authority
CN
China
Prior art keywords
node
routing table
root
nodes
establishing
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
CN202210396712.4A
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.)
Beijing Yunlian Huitong Technology Co ltd
Original Assignee
Beijing Yunlian Huitong 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 Beijing Yunlian Huitong Technology Co ltd filed Critical Beijing Yunlian Huitong Technology Co ltd
Priority to CN202210396712.4A priority Critical patent/CN115037687A/en
Publication of CN115037687A publication Critical patent/CN115037687A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/20Hop count for routing purposes, e.g. TTL
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the application provides a method, a device, electronic equipment and a storage medium for establishing a route based on a plurality of nodes, wherein the method comprises the following steps: acquiring a data packet of a source node; establishing a routing table according to the data packet; selecting a neighbor node of the source node according to the routing table; if the adjacent node is a root node, establishing a route according to the source node and the root node; and if the adjacent node is a non-root node, selecting the adjacent node of the non-root node. By implementing the embodiment of the application, the consumption of network resources can be reduced, the established routing performance is good, and the communication capacity can meet the requirement.

Description

Route establishing method and device based on multiple nodes and electronic equipment
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for establishing a route based on multiple nodes, an electronic device, and a computer-readable storage medium.
Background
Compared with wired communication, one of the biggest defects of wireless communication is that the reliability of a network is low, and in order to improve the reliability of the network, the scale of the network and the communication capacity, the wireless communication is realized by methods such as a network structure, a networking mode and channel allocation.
In the wireless communication process, when two communicating nodes are not in the communication range of each other, a message between the two nodes needs to be relayed by a relay node, however, in the prior art, an optimal route needs to be established in a dynamically changing network, huge network resources need to be consumed, or the established route has a poor state, which cannot meet the network communication requirements, and has poor communication capability and poor reliable transmission performance.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method and an apparatus for establishing a route based on multiple nodes, an electronic device, and a computer-readable storage medium, which can reduce consumption of network resources, so that the established route has good performance, and the communication capability can meet the requirements.
In a first aspect, an embodiment of the present application provides a method for establishing a route based on multiple nodes, where the method includes:
acquiring a data packet of a source node;
establishing a routing table according to the data packet;
selecting a neighbor node of the source node according to the routing table;
if the adjacent node is a root node, establishing a route according to the source node and the root node; and if the adjacent node is a non-root node, selecting the adjacent node of the non-root node.
In the implementation process, the routing table is established according to the source node, and then the adjacent node is selected according to the routing table, so that the effectiveness of the routing is ensured, the transmission efficiency of the routing is improved, the established routing has good performance, and the communication capacity can meet the requirements.
Further, the step of establishing a routing table according to the data packet includes:
analyzing the data packet to obtain destination address data;
if the destination address data is a terminal node address, establishing a downlink routing table according to the terminal node address;
and if the destination address data is a special address, establishing an uplink routing table according to the special address.
In the implementation process, the downlink routing table and the uplink routing table are respectively established according to different terminal node addresses and special addresses in the destination address data, so that the source node and the terminal node of the established route are more definite, and the transmission path of the root node is ensured not to be in error and to be relatively optimal.
Further, the step of selecting the neighboring node of the source node according to the routing table includes:
obtaining RSSI parameters of each candidate adjacent node in the routing table and hop count data in the routing table;
and selecting the adjacent node according to the RSSI parameter of each candidate adjacent node in the routing table and the hop count data in the routing table.
In the implementation process, according to the RSSI parameter of each candidate neighbor node and hop data in the routing table, the characteristics of each candidate neighbor node can be considered more comprehensively, so that the selection of the neighbor nodes is more flexible and changeable, the transmission efficiency of the neighbor nodes is ensured, and the routing performance is further improved.
Further, the step of selecting a neighbor node according to the RSSI parameter of each candidate neighbor node in the routing table and the hop count data in the routing table includes:
and selecting the candidate neighbor node with the RSSI parameter larger than the threshold value and the hop count data being the minimum in the routing table, and determining the candidate neighbor node as the neighbor node.
In the implementation process, the RSSI parameter of each candidate adjacent node in the routing table and the hop data in the routing table are compared with a threshold value, and a node with better performance is selected as a relay node in the transmission process, so that the transmission efficiency of the route is ensured.
Further, the step of selecting a neighbor node according to the RSSI parameter of each candidate neighbor node in the routing table and the hop count data in the routing table further includes:
and if the hop count data of any two candidate neighbor nodes in the routing table are the same, selecting the candidate neighbor node with the RSSI parameter larger than the threshold value and the RSSI parameter larger than the threshold value, and determining the candidate neighbor node as the neighbor node.
In the implementation process, when the hop data of the two candidate neighbor nodes are the same, the candidate neighbor node with the RSSI parameter larger than the threshold and the RSSI parameter larger is selected as the neighbor node, and the selected neighbor node is further ensured to be the candidate neighbor node with the highest efficiency.
Further, the step of selecting the neighboring node of the non-root node if the neighboring node is the non-root node further includes:
generating a response data packet according to the adjacent node;
and returning the response data packet to the source node.
In the implementation process, the response data packet generated by the adjacent node is returned to the source node, so that the source node can obtain the specific information of the adjacent node, and the source node is ensured to select the adjacent node in a short time to establish the route.
Further, after the step of selecting the neighboring node of the non-root node if the neighboring node is the non-root node, the method further includes:
and judging whether the neighbor nodes of the non-root nodes are root nodes or not, if so, establishing a route according to the source node and the neighbor nodes of the non-root nodes.
In the implementation process, if the neighbor node of the non-root node is the root node, the route is established according to the source node and the neighbor node of the non-root node, so that the reliability of establishing the route is ensured.
In a second aspect, an embodiment of the present application further provides a device for establishing a route based on multiple nodes, where the device includes:
the acquisition module is used for acquiring a data packet of a source node;
a routing table establishing module for establishing a routing table according to the data packet;
a selecting module, configured to select a neighboring node of the source node according to the routing table;
a route establishing module, configured to establish a route according to the source node and the root node if the neighboring node is the root node; and if the adjacent node is a non-root node, selecting the adjacent node of the non-root node.
In the implementation process, the routing table is established according to the source node, and then the adjacent node is selected according to the routing table, so that the effectiveness of the routing is ensured, the transmission efficiency of the routing is improved, the established routing has good performance, and the communication capacity can meet the requirements.
In a third aspect, an electronic device provided in an embodiment of the present application includes: memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the method according to any of the first aspect when executing the computer program.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium having instructions stored thereon, which when executed on a computer cause the computer to perform the method according to any one of the first aspect.
In a fifth aspect, embodiments of the present application provide a computer program product, which when run on a computer, causes the computer to perform the method according to any one of the first aspect.
Additional features and advantages of the disclosure will be set forth in the description which follows, or in part may be learned by the practice of the above-described techniques of the disclosure, or may be learned by practice of the disclosure.
The present invention can be implemented in accordance with the content of the specification, and the following detailed description of the preferred embodiments of the present application is made with reference to the accompanying drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a schematic flowchart of a route establishment method based on multiple nodes according to an embodiment of the present application;
fig. 2 is a schematic structural component diagram of a routing establishment apparatus based on multiple nodes according to an embodiment of the present application;
fig. 3 is a schematic structural component diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only for distinguishing the description, and are not construed as indicating or implying relative importance.
The following detailed description of embodiments of the present application will be described in conjunction with the accompanying drawings and examples. The following examples are intended to illustrate the present application but are not intended to limit the scope of the present application.
Example one
Fig. 1 is a schematic flowchart of a method for establishing a route based on multiple nodes according to an embodiment of the present application, and as shown in fig. 1, the method includes:
s1, acquiring a data packet of the source node;
s2, establishing a routing table according to the data packet;
s3, selecting the neighbor node of the source node according to the routing table;
s4, if the adjacent node is the root node, establishing a route according to the source node and the root node; and if the adjacent node is a non-root node, selecting the adjacent node of the non-root node.
In the implementation process, the routing table is established according to the source node, and then the adjacent node is selected according to the routing table, so that the effectiveness of the routing is ensured, the transmission efficiency of the routing is improved, the established routing has good performance, and the communication capacity can meet the requirements.
The embodiment of the application can be applied to a narrowband ad hoc network communication protocol of a plurality of nodes, wherein the nodes include a relay node and a terminal node besides a root node, the network can include a plurality of root nodes, a plurality of relay nodes and a plurality of terminal nodes, and the nodes can be fixed nodes or mobile nodes.
In S1, a packet of the source node is acquired.
Optionally, the source node is a root node, and when the root node is powered on, the root node initiates a route establishment process and obtains a data packet of the source node.
At S2, a routing table is established based on the packet, including:
analyzing the data packet to obtain destination address data;
if the destination address data is the terminal node address, establishing a downlink routing table according to the terminal node address;
and if the destination address data is the special address, establishing an uplink routing table according to the special address.
Illustratively, the network structure of the embodiment of the present application is a mesh topology structure, and the route establishment procedure includes uplink route establishment and downlink route establishment. The downlink route establishment is initiated by a root node, the root node sends broadcast messages on a control channel after the system is started, and each root node establishes a route table.
Optionally, if the route establishment process is downlink route establishment, the data transmission adopts a broadcast mode, each root node does not need to establish a new routing table, only the routing table of the previous node needs to be stored, the routing table is small no matter the number of the nodes, and no limitation is imposed on the number of the nodes.
The destination nodes corresponding to the uplink routing table are root nodes, all data are transmitted to the root nodes, the uplink routing table of each node comprises 1 main route and 2 standby routes, and addresses are represented by 4 bytes.
The downlink routing table adopts a broadcast mode, namely each root node needs to send a broadcast message, and when the power is turned on, if the root node receives messages sent by other nodes, the downlink routing table is initially established according to the received messages.
In the implementation process, the downlink routing table and the uplink routing table are respectively established according to different terminal node addresses and special addresses in the destination address data, so that the source node and the terminal node of the established route are more definite, and the transmission path of the root node is ensured not to be wrong and is relatively optimal.
In S3, selecting a neighboring node of the source node according to the routing table includes:
obtaining RSSI parameters of each candidate adjacent node in a routing table and hop data in the routing table;
and selecting the adjacent node according to the RSSI parameter of each candidate adjacent node in the routing table and the hop count data in the routing table.
In the implementation process, according to the RSSI parameter of each candidate neighbor node and hop data in the routing table, the characteristics of each candidate neighbor node can be considered more comprehensively, so that the selection of the neighbor nodes is more flexible and changeable, the transmission efficiency of the neighbor nodes is ensured, and the routing performance is further improved.
The RSSI parameter needs to be considered when the route is selected, and when the RRSI is larger than a threshold UT1 (the threshold UT1 is the RSSI parameter determined when the signal is good and serves as the threshold), the adjacent node with the least hop count data is selected; if all the neighbor nodes have RSSI parameters less than the threshold UT1 and greater than the threshold UT2 (the RRSI parameter determined at the time of signal difference, as the threshold), then the neighbor node with the largest RSSI parameter is selected.
Further, the step of selecting the neighbor node according to the RSSI parameter of each candidate neighbor node in the routing table and the hop count data in the routing table includes:
and selecting the candidate neighbor node with the RSSI parameter larger than the threshold value and the hop count data being the minimum in the routing table, and determining the candidate neighbor node as the neighbor node.
In the implementation process, the RSSI parameter of each candidate adjacent node in the routing table and the hop count data in the routing table are compared with a threshold value, and a node with better performance is selected as a relay node in the transmission process, so that the transmission efficiency of the route is ensured.
Further, the step of selecting the neighbor node according to the RSSI parameter of each candidate neighbor node in the routing table and the hop count data in the routing table further comprises:
and if the hop count data of any two candidate neighbor nodes in the routing table are the same, selecting the candidate neighbor node with the RSSI parameter larger than the threshold value and the RSSI parameter larger than the threshold value, and determining the candidate neighbor node as the neighbor node.
In the implementation process, when the hop data of the two candidate neighbor nodes are the same, the candidate neighbor node with the RSSI parameter larger than the threshold and the RSSI parameter larger is selected as the neighbor node, and the selected neighbor node is further ensured to be the candidate neighbor node with the highest efficiency.
At S4, the response packet is sent regardless of whether the neighboring node is a root node or a non-root node. And the destination address in the response data packet of the root node is the address of the terminal node. And the address is a special address FFFFH, wherein the FFFFH represents all root nodes, and each root node has a unique address.
Fields in the response packet are initialized. The type field is set to 00H, indicating that the message is a route request message and originated by the root node. The hop count data is set to 0. The address (SA) of the source node and the address (DA) of the destination node are set as the source node address and the destination address, respectively, and the TA is the node address for sending or forwarding the routing message, and is set as the address of the node.
Further, if the neighboring node is a non-root node, the step of selecting the neighboring node of the non-root node further includes:
generating a response data packet according to the adjacent node;
and returning the response data packet to the source node.
In the implementation process, the response data packet generated by the adjacent node is returned to the source node, so that the source node can obtain the specific information of the adjacent node, and the source node is ensured to select the adjacent node to establish the route in a short time.
The adjacent node may be a relay node or a terminal node, the relay node reads the RSSI parameter while receiving the response packet, if the RSSI parameter is smaller than the threshold UT2, the response packet is not forwarded, and if the RSSI parameter is larger than the threshold UT2, the response packet is forwarded, and a corresponding routing table is established. And if the root node receives a plurality of response data packets from the same source node forwarded by a plurality of relay nodes, updating the routing table in time. And after receiving the response data packet, the relay node forwards the response data packet.
After receiving the response data packet, the node generates a response data packet if the RSSI parameter is greater than UT2, selects an adjacent node according to the RSSI parameter, and then sends the response data packet; if the RSSI parameter is less than UT2, no reply packet is generated.
Further, if the neighboring node is a non-root node, after the step of selecting the neighboring node of the non-root node, the method further includes:
and judging whether the neighbor nodes of the non-root nodes are root nodes or not, if so, establishing a route according to the source node and the neighbor nodes of the non-root nodes.
In the implementation process, if the neighbor node of the non-root node is the root node, the route is established according to the source node and the neighbor node of the non-root node, so that the reliability of establishing the route is ensured.
And when the node receives the response data packets of other nodes, analyzing the response data packets, and searching corresponding items in the routing table through the address of the source node. Because each node downlink routing table structure has a main route and a standby route to other nodes, whether the address of the node exists to the source node is checked firstly, if the address does not exist, the address of a sending node in a response data packet is used as the address of an adjacent node of the main route, and the hop count data plus 1 is used as the hop count data to the source node. Otherwise, checking whether the standby route exists, if not, taking the address of the sending node in the message as the address of the adjacent node of the standby route, and adding 1 to the hop count data to be taken as the hop count data of the source node. If the main route and the backup route exist at the same time, the hop count data is added by 1 and compared with the hop count data of the backup route and the main route.
If the hop count data in the response data packet is smaller than the hop count data of the main route in the routing table and the RSSI parameter is also larger than the RSSI value in the routing table, updating the routing table corresponding to the main route, and if the hop count data is larger than the main route and smaller than the hop count data of the standby route, updating the routing table of the standby route. And after the routing table is updated, continuously reloading the response data packet and forwarding. And if the hop count data is larger than the standby route hop count data, discarding the corresponding route request data in the response data packet.
Example two
In order to implement a corresponding method in the foregoing embodiments to achieve corresponding functions and technical effects, the following provides a routing establishment apparatus based on multiple nodes, as shown in fig. 2, the apparatus includes:
an obtaining module 1, configured to obtain a data packet of a source node;
a routing table establishing module 2, configured to establish a routing table according to the data packet;
a selecting module 3, configured to select a neighboring node of the source node according to the routing table;
the route establishing module 4 is used for establishing a route according to the source node and the root node if the adjacent node is the root node; and if the adjacent node is a non-root node, selecting the adjacent node of the non-root node.
The routing table establishing module 2 is further configured to:
analyzing the data packet to obtain destination address data;
if the destination address data is the terminal node address, establishing a downlink routing table according to the terminal node address;
and if the destination address data is the special address, establishing an uplink routing table according to the special address.
The selecting module 3 is further configured to:
obtaining RSSI parameters of each candidate adjacent node in a routing table and hop data in the routing table;
and selecting the adjacent node according to the RSSI parameter of each candidate adjacent node in the routing table and the hop count data in the routing table.
The selecting module 3 is further configured to:
and selecting the candidate neighbor node with the RSSI parameter larger than the threshold value and the hop count data being the minimum in the routing table, and determining the candidate neighbor node as the neighbor node.
The selecting module 3 is further configured to:
and if the hop count data of any two candidate neighbor nodes in the routing table are the same, selecting the candidate neighbor node with the RSSI parameter larger than the threshold value and the RSSI parameter larger than the threshold value, and determining the candidate neighbor node as the neighbor node.
The route establishing module 4 is further configured to:
generating a response data packet according to the adjacent node;
and returning the response data packet to the source node.
The route establishing module 4 is further configured to:
and judging whether the neighbor nodes of the non-root nodes are root nodes or not, if so, establishing a route according to the source node and the neighbor nodes of the non-root nodes.
The above-mentioned route establishing apparatus based on multiple nodes may implement the method of the first embodiment. The alternatives in the first embodiment are also applicable to the present embodiment, and are not described in detail here.
The rest of the embodiments of the present application may refer to the contents of the first embodiment, and in this embodiment, details are not repeated.
EXAMPLE III
An embodiment of the present application provides an electronic device, which includes a memory and a processor, where the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the multi-root-node-based route establishment method according to the first embodiment.
Optionally, the electronic device may be a server.
Referring to fig. 3, fig. 3 is a schematic structural composition diagram of an electronic device according to an embodiment of the present disclosure. The electronic device may include a processor 31, a communication interface 32, a memory 33, and at least one communication bus 34. Wherein the communication bus 34 is used for realizing direct connection communication of these components. The communication interface 32 of the device in the embodiment of the present application is used for performing signaling or data communication with other node devices. The processor 31 may be an integrated circuit chip having signal processing capabilities.
The Processor 31 may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor 31 may be any conventional processor or the like.
The Memory 33 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like. The memory 33 has stored therein computer readable instructions which, when executed by the processor 31, enable the apparatus to perform the various steps involved in the method embodiment of fig. 1 described above.
Optionally, the electronic device may further include a memory controller, an input output unit. The memory 33, the memory controller, the processor 31, the peripheral interface, and the input/output unit are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, these components may be electrically connected to each other via one or more communication buses 34. The processor 31 is adapted to execute executable modules stored in the memory 33, such as software functional modules or computer programs comprised by the device.
The input and output unit is used for providing a task for a user to create and start an optional time period or preset execution time for the task creation so as to realize the interaction between the user and the server. The input/output unit may be, but is not limited to, a mouse, a keyboard, and the like.
It will be appreciated that the configuration shown in fig. 3 is merely illustrative and that the electronic device may include more or fewer components than shown in fig. 3 or have a different configuration than shown in fig. 3. The components shown in fig. 3 may be implemented in hardware, software, or a combination thereof.
In addition, an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the method for establishing a route based on multiple nodes according to the first embodiment is implemented.
Embodiments of the present application further provide a computer program product, which when running on a computer, causes the computer to execute the method described in the method embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative and, for example, the flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based devices that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
It should be noted that, in this document, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.

Claims (10)

1. A method for establishing a route based on a plurality of nodes is characterized in that the method comprises the following steps:
acquiring a data packet of a source node;
establishing a routing table according to the data packet;
selecting a neighbor node of the source node according to the routing table;
if the adjacent node is a root node, establishing a route according to the source node and the root node; and if the adjacent node is a non-root node, selecting the adjacent node of the non-root node.
2. The method for establishing a routing table according to claim 1, wherein the step of establishing a routing table according to the packet comprises:
analyzing the data packet to obtain destination address data;
if the destination address data is a terminal node address, establishing a downlink routing table according to the terminal node address;
and if the destination address data is a special address, establishing an uplink routing table according to the special address.
3. The method for establishing a routing based on multiple nodes according to claim 2, wherein the step of selecting the neighboring node of the source node according to the routing table comprises:
obtaining RSSI parameters of each candidate adjacent node in the routing table and hop count data in the routing table;
and selecting the adjacent nodes according to the RSSI parameters of each candidate adjacent node in the routing table and the hop count data in the routing table.
4. The method of claim 3, wherein the step of selecting the neighbor node according to the RSSI parameter of each candidate neighbor node in the routing table and the hop count data in the routing table comprises:
and selecting the candidate neighbor node with the RSSI parameter larger than the threshold value and the hop count data being the minimum in the routing table, and determining the candidate neighbor node as the neighbor node.
5. The method of claim 4, wherein the step of selecting the neighboring node according to the RSSI parameter of each candidate neighboring node in the routing table and the hop count data in the routing table further comprises:
and if the hop count data of any two candidate adjacent nodes in the routing table are the same, selecting the candidate adjacent node with the RSSI parameter larger than the threshold value and the RSSI parameter larger than the threshold value, and determining the candidate adjacent node as the adjacent node.
6. The method for establishing a route according to claim 1, wherein the step of selecting the neighbor node of the non-root node if the neighbor node is a non-root node further comprises:
generating a response data packet according to the adjacent node;
and returning the response data packet to the source node.
7. The multi-root node-based routing setup device of claim 6, wherein after the step of selecting the neighbor nodes of the non-root nodes if the neighbor nodes are non-root nodes, further comprising:
and judging whether the neighbor nodes of the non-root nodes are root nodes or not, if so, establishing a route according to the source node and the neighbor nodes of the non-root nodes.
8. An apparatus for route establishment based on a plurality of nodes, the apparatus comprising:
the acquisition module is used for acquiring a data packet of a source node;
a routing table establishing module for establishing a routing table according to the data packet;
a selecting module, configured to select a neighboring node of the source node according to the routing table;
a route establishing module, configured to establish a route according to the source node and the root node if the neighboring node is the root node; and if the adjacent node is a non-root node, selecting the adjacent node of the non-root node.
9. An electronic device, comprising a memory for storing a computer program and a processor for executing the computer program to cause the electronic device to execute the multi-root node based route establishment method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that it stores a computer program which, when executed by a processor, implements the multi-root node based route establishment method according to any one of claims 1 to 7.
CN202210396712.4A 2022-04-15 2022-04-15 Route establishing method and device based on multiple nodes and electronic equipment Pending CN115037687A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210396712.4A CN115037687A (en) 2022-04-15 2022-04-15 Route establishing method and device based on multiple nodes and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210396712.4A CN115037687A (en) 2022-04-15 2022-04-15 Route establishing method and device based on multiple nodes and electronic equipment

Publications (1)

Publication Number Publication Date
CN115037687A true CN115037687A (en) 2022-09-09

Family

ID=83119577

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210396712.4A Pending CN115037687A (en) 2022-04-15 2022-04-15 Route establishing method and device based on multiple nodes and electronic equipment

Country Status (1)

Country Link
CN (1) CN115037687A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101047638A (en) * 2006-06-28 2007-10-03 华为技术有限公司 Mesh network route method and device
CN105992300A (en) * 2015-02-12 2016-10-05 北京信威通信技术股份有限公司 Clustering routing method and system based on static formation in ad hoc network
CN108076498A (en) * 2016-11-15 2018-05-25 电信科学技术研究院 A kind of data transmission method and node
CN110519167A (en) * 2019-10-15 2019-11-29 大唐终端技术有限公司 A kind of implementation method of the modified OLSR Routing Protocol based on RSSI
CN110995333A (en) * 2019-11-29 2020-04-10 北京航空航天大学 Cluster QoS route design method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101047638A (en) * 2006-06-28 2007-10-03 华为技术有限公司 Mesh network route method and device
CN105992300A (en) * 2015-02-12 2016-10-05 北京信威通信技术股份有限公司 Clustering routing method and system based on static formation in ad hoc network
CN108076498A (en) * 2016-11-15 2018-05-25 电信科学技术研究院 A kind of data transmission method and node
CN110519167A (en) * 2019-10-15 2019-11-29 大唐终端技术有限公司 A kind of implementation method of the modified OLSR Routing Protocol based on RSSI
CN110995333A (en) * 2019-11-29 2020-04-10 北京航空航天大学 Cluster QoS route design method

Similar Documents

Publication Publication Date Title
KR101986929B1 (en) A method for routing packets, a multi-hop wireless network, and a node that routes packets
EP2915296B1 (en) Push-based short-cut requests within a directed acyclic graph
US7586853B2 (en) Network location management system
EP1407368A1 (en) System and method for load balancing in ad hoc networks
US7715395B2 (en) System and method for expanding the range of a mesh network
WO2019224643A1 (en) Systems and methods of propagating data packets in a network of nodes
CN111886843B (en) Low power consumption Bluetooth network maintenance method, electronic device, bluetooth network and medium
CN110430135B (en) Message processing method and device
WO2012060686A1 (en) Method of communication in wireless sensor networks
CN110662258A (en) Message forwarding method, device and medium
CN106878182B (en) Data transmission method and equipment
JP5673303B2 (en) Wireless terminal device, wireless system, and wireless communication method
CN115037687A (en) Route establishing method and device based on multiple nodes and electronic equipment
CN111869246B (en) Message transmission method, BLE equipment and BLE chip
CN114124275B (en) Time synchronization method, device, equipment and storage medium
CN111247819B (en) Device management method and BLE device
JP2007221522A (en) Polling device, terminal device, polling method and program
JP4613967B2 (en) Communication path setting method, communication path setting program, communication terminal, wireless network system
CN111247818A (en) Path selection method and BLE device
CN114828138A (en) Communication method and device based on single node, and electronic equipment
CN115412480B (en) Communication method and electronic equipment
CN103701696A (en) Method and device for supporting FA (Forwarding Address) in IS-IS (Intermediate System-to-Intermediate System) protocol
US10404652B2 (en) Communication device, communication method, and program
WO2023246425A1 (en) Communication method and related device
CN117579542A (en) Anycast method based on bit index screening and related equipment

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