WO2020156340A1 - Data transmission method and apparatus - Google Patents

Data transmission method and apparatus Download PDF

Info

Publication number
WO2020156340A1
WO2020156340A1 PCT/CN2020/073325 CN2020073325W WO2020156340A1 WO 2020156340 A1 WO2020156340 A1 WO 2020156340A1 CN 2020073325 W CN2020073325 W CN 2020073325W WO 2020156340 A1 WO2020156340 A1 WO 2020156340A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
transmission path
neighbor
nodes
backbone
Prior art date
Application number
PCT/CN2020/073325
Other languages
French (fr)
Chinese (zh)
Inventor
王峰
方婧华
刘刚
Original Assignee
电信科学技术研究院有限公司
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 电信科学技术研究院有限公司 filed Critical 电信科学技术研究院有限公司
Publication of WO2020156340A1 publication Critical patent/WO2020156340A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W40/00Communication routing or communication path finding
    • H04W40/02Communication route or path selection, e.g. power-based or shortest path routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W40/00Communication routing or communication path finding
    • H04W40/24Connectivity information management, e.g. connectivity discovery or connectivity update
    • 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
    • H04W40/00Communication routing or communication path finding
    • H04W40/24Connectivity information management, e.g. connectivity discovery or connectivity update
    • H04W40/26Connectivity information management, e.g. connectivity discovery or connectivity update for hybrid routing by combining proactive and reactive routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/18Self-organising networks, e.g. ad-hoc networks or sensor networks

Definitions

  • This application relates to the field of communication technology, and in particular to a method and device for transmitting data.
  • the mobile ad hoc network is a centerless, multi-hop, temporary autonomous system formed by a group of nodes with both terminal and routing functions through transmission links.
  • the types of nodes in the mobile ad hoc network are ordinary nodes or backbone nodes.
  • the backbone node is responsible for data broadcasting and routing in the network.
  • the backbone node is equivalent to the collection of cluster heads and gateways in the clustered network.
  • a common node is a one-hop neighbor of the backbone node, and it can directly communicate with the backbone node or with other common neighbor nodes within one hop.
  • the backbone node and the common node complete the data transmission according to the corresponding routing protocol. Routing protocols include single-path routing protocols.
  • the single-path routing protocol is specifically as follows: each node in the mobile ad hoc network broadcasts periodically to maintain a routing table containing the paths to all other nodes, and update the routing table at any time according to changes in the network topology. When using the single-path routing protocol for data transmission, each node selects the next hop node according to the routing table. Because the routing table stores a single transmission path between two nodes, the address of the next hop node corresponding to the routing table is also unique. Therefore, when the next hop node moves or the transmission link changes, it is easy to cause errors in the data transmission process. It can be seen that the single-path routing protocol is used for data transmission, and the reliability of data transmission is low.
  • This application provides a method and device for transmitting data, which are used to improve the reliability of the data transmission process.
  • a data transmission method which is applied to a first node of a mobile ad hoc network, and the method includes:
  • N is a positive integer greater than or equal to 1 and less than the maximum number of hops of the mobile ad hoc network, and the destination node is the The node corresponding to the destination address;
  • the first transmission path is determined according to the neighbor list; wherein, the neighbor list includes the communication distance with the first node The address of the neighbor node within the N hop range, the node type of the neighbor node whose communication distance with the first node is within the N hop range, and at least each node from the first node to the neighbor node within the N hop range A transmission path, the first transmission path including addresses of nodes passing through from the first node to the destination node;
  • the first data is transmitted through the first transmission path.
  • the first node selects a transmission path from at least one transmission path in the neighbor list to transmit the first data, even if it is the first transmission path.
  • the first node can still complete the transmission of the first data through other paths in the neighbor list.
  • the data transmission method in the implementation of this application is more adaptable to mobile ad hoc networks, and the reliability of data transmission is higher.
  • the data is transmitted by storing the multi-path routing protocol from the first node to each node of the mobile ad hoc network.
  • the data is transmitted by storing the multi-path routing protocol from the first node to each node of the mobile ad hoc network.
  • only the neighbors within the N hop range of the first node are stored.
  • the method of at least one transmission path of the node has smaller calculation and storage overhead than the method of transmitting data through a multi-path routing protocol.
  • the method further includes:
  • a second transmission path is obtained according to a routing table; wherein, the routing table includes each of the first node to the other nodes A transmission path of a node, the second transmission path includes the address of a second node, the second node is the next hop of the first node indicated in the second transmission path, and the other nodes are Refers to nodes other than the first node in the mobile ad hoc network;
  • the first data is transmitted according to the second transmission path.
  • the backbone node compares the information in the routing table and the neighbor list to determine whether the second node is the next hop of the first node, and if so, then through the second transmission
  • the path transmits the first data to ensure the reliability of the second transmission path and further improve the reliability of data transmission.
  • the method further includes:
  • the second node If it is determined that in the neighbor list, the second node is not the next hop of the first node and is a neighbor node within the N hop range of the first node, then determine the first node according to the neighbor list Three transmission paths; wherein the third transmission path includes addresses of nodes passing through from the first node to the second node;
  • the first data is transmitted through the third transmission path.
  • the backbone node compares the information in the routing table and the neighbor list. If the information in the routing table and the neighbor list are inconsistent, it means that the local topology of the first node may have occurred
  • the second node is also a neighbor node within the N hop range of the first node
  • the first node can directly determine a transmission path according to the neighbor list, so as to transmit the first data to the second node. Since the neighbor list is generally updated faster, when the local topology of the first node changes, the neighbor list is used to transmit data. Compared with the method of determining the transmission path directly based on the routing table, this solution can ensure data transmission. The reliability of the path further improves the reliability of data transmission.
  • the method further includes:
  • a fourth transmission path is determined according to the neighbor list; wherein, the fourth transmission path Including addresses of nodes passing through from the first node to a third node, where the third node is a backbone node within an N hop range of the first node;
  • the first data is transmitted through the fourth transmission path.
  • the backbone node compares the information in the routing table and the neighbor list. If the information in the routing table and the neighbor list are inconsistent, and the topology of the first node may change too much or When the topology is under maintenance, the second node is not a neighbor node within the N hop range of the first node.
  • the first node can directly determine a backbone node within the N hop range based on the neighbor list, and transmit the first data to the node. Therefore, even if the topological structure of the first node changes too much or the topological structure is in a maintenance state, the first node can still successfully complete the data transmission process, which further ensures the reliability of data transmission.
  • the data transmission method in this solution has good adaptability to changes in the mobile ad hoc network, and the data transmission has high robustness.
  • the ordinary node refers to a node other than a backbone node in the mobile ad hoc network
  • the method further includes:
  • a fifth transmission path is determined according to the neighbor list; wherein, the fifth transmission path includes from the first node to An address of a node passed by the fourth node, where the fourth node is a backbone node among neighbor nodes whose communication distance with the first node is within N hops;
  • the first data is transmitted through the fifth transmission path.
  • the first node when the first node is a normal node, if the communication distance between the destination node and the first node is greater than N hops, the first node can use the backbone nodes within the N hop range to pass the first data through the The node transmits to the destination address.
  • the fourth node is the backbone node with the largest dominance factor among the N-hop neighbor nodes of the first node, and the dominance factor is used to characterize the first node to the fourth node The quality of the transmission link.
  • selecting the backbone node with a larger dominance factor as the fourth node can ensure the quality of the transmission link between the first node and the fourth node, thereby further improving the quality of data transmission.
  • the method further includes:
  • the neighbor maintenance data frame carries the node type of each node and the information of each node Address and node type of neighbor nodes within at least 1 hop;
  • a neighbor list of the first node is generated.
  • the first node generates the neighbor list of the first node according to the neighbor maintenance data frame by receiving the neighbor maintenance data frame broadcast by the neighbor node.
  • the method of generating the neighbor list in this solution is simple and straightforward.
  • the method when the node type of the first node is a backbone node, the method includes:
  • the other backbone nodes refer to the backbone nodes other than the first node in the mobile ad hoc network;
  • a routing table of the first node is generated.
  • the first node generates a routing table through routing control data frames broadcast by other backbone nodes, without the need for ordinary nodes to participate in the establishment of the routing table, and relatively reduces computational overhead.
  • generating the routing table of the first node according to the routing control data frame includes:
  • a transmission path from the first node to each of the other nodes is established according to the routing control data frame, so as to obtain Describe the routing table of the first node.
  • the first node when the first node receives the routing control data frame, it first determines whether it is the first time it has received it. If it is the first time it has received the data frame, it then establishes a routing table based on the data frame.
  • the method further includes:
  • TTL lifetime
  • selectively updating the routing table can reduce the computational overhead of the first node and can also ensure the quality of the transmission path in the routing table.
  • a device for transmitting data serves as a first node of a mobile ad hoc network, and the device includes:
  • Memory used to store instructions
  • the processor is configured to read instructions in the memory and execute the following process:
  • N Used to determine whether the communication distance between the destination node and the first node is less than or equal to N hops, where N is a positive integer greater than or equal to 1 and less than the maximum number of hops of the mobile ad hoc network, and the destination node is The node corresponding to the destination address;
  • the first transmission path is determined according to the neighbor list; wherein, the neighbor list includes the communication distance with the first node The address of the neighbor node within the N hop range, the node type of the neighbor node whose communication distance with the first node is within the N hop range, and at least each node from the first node to the neighbor node within the N hop range A transmission path, the first transmission path including addresses of nodes passing through from the first node to the destination node;
  • the transceiver is used to send and receive information under the control of the processor.
  • the processor is further configured to:
  • a second transmission path is obtained according to a routing table; wherein, the routing table includes each of the first node to the other nodes A transmission path of a node, the second transmission path includes the address of a second node, the second node is the next hop of the first node indicated in the second transmission path, and the other nodes are Refers to nodes other than the first node in the mobile ad hoc network;
  • the processor is further configured to determine whether the second node is the next hop of the first node in the neighbor list according to the address of the second node;
  • the first data is transmitted according to the second transmission path.
  • the processor is also used for:
  • the second node determines the first node according to the neighbor list Three transmission paths; wherein the third transmission path includes the addresses of nodes that are transmitted from the first node to the second node;
  • the first data is transmitted through the third transmission path.
  • the processor is also used for:
  • a fourth transmission path is determined according to the neighbor list; wherein, the fourth transmission path Including addresses of nodes passing through from the first node to a third node, where the third node is a backbone node within an N hop range of the first node;
  • the first data is transmitted through the fourth transmission path.
  • the normal node refers to a node other than the backbone node in the mobile ad hoc network
  • the processor is also used for :
  • a fifth transmission path is determined according to the neighbor list; wherein, the fifth transmission path includes from the first node to An address of a node passed by the fourth node, where the fourth node is a backbone node among neighbor nodes whose communication distance with the first node is within N hops;
  • the first data is transmitted through the fifth transmission path.
  • the fourth node is the backbone node with the largest dominance factor among the N-hop neighbor nodes of the first node, and the dominance factor is used to characterize the first node to the fourth node The quality of the transmission link.
  • the processor is also used for:
  • the neighbor maintenance data frame carries the node type of each node and the information of each node Address and node type of neighbor nodes within at least 1 hop;
  • a neighbor list of the first node is generated.
  • the processor is further configured to:
  • the other backbone nodes refer to the backbone nodes other than the first node in the mobile ad hoc network;
  • a routing table of the first node is generated.
  • the processor is specifically used for:
  • a transmission path from the first node to each of the other nodes is established according to the routing control data frame, so as to obtain Describe the routing table of the first node.
  • the processor is also used for:
  • a device for transmitting data serves as a first node of a mobile ad hoc network, and the device includes:
  • a receiving module configured to receive first data, where the first data carries a destination address
  • the processing module is used to determine whether the communication distance between the destination node and the first node is less than or equal to N hops, where N is a positive integer greater than or equal to 1 and less than the maximum number of hops of the mobile ad hoc network, and The destination node is the node corresponding to the destination address;
  • the processing module is further configured to, if it is determined that the communication distance between the destination node and the first node is less than or equal to N hops, determine the first transmission path according to the neighbor list; wherein, the neighbor list includes and The address of the neighbor node whose communication distance is within N hops of the first node, the node type of the neighbor node whose communication distance is within N hops of the first node, and the distance from the first node to the N hop range At least one transmission path of each node in the neighbor nodes, the first transmission path including the address of the node passing by from the first node to the destination node;
  • the sending module is configured to transmit the first data through the first transmission path.
  • a computer-readable storage medium stores computer instructions.
  • the computer instructions When the computer instructions are executed on a computer, the computer executes the method described in any one of the first aspects. method.
  • FIG. 1 is a schematic diagram of an application scenario provided by an embodiment of the application
  • FIG. 2 is a flowchart of a method for transmitting data according to an embodiment of the application
  • FIG. 3 is a structural diagram 1 of a mobile ad hoc network provided by an embodiment of this application.
  • FIG. 4 is a flowchart of a method for transmitting data according to an embodiment of the application
  • FIG. 5 is a second structural diagram of a mobile ad hoc network provided by an embodiment of this application.
  • FIG. 6 is a flowchart of a method for transmitting data provided by an embodiment of the application.
  • FIG. 7 is a third structural diagram of a mobile ad hoc network provided by an embodiment of this application.
  • FIG. 8 is a structural diagram of a data transmission device provided by an embodiment of the application.
  • FIG. 9 is a structural diagram of a data transmission device provided by an embodiment of the application.
  • a mobile ad hoc network (Ad hoc) is a centerless, multi-hop, and temporary autonomous system formed by a group of nodes with both terminal and routing functions through transmission links.
  • Cluster head a cluster in a wireless network is composed of a group of nodes. Generally, a group of nodes in the neighboring area form a cluster, and a coordinating node (central node) coordinates and controls the behavior of the nodes in the cluster. This coordination The node (central node) is called the cluster head.
  • Virtual backbone network The connected dominance set of the network is called the virtual backbone network, and the set of all cluster heads and gateways in the network is defined as the network dominance set. For a network where the distance between all nodes in the cluster and the cluster head is one hop , The network dominance set is equal to the connectivity dominance set, that is, the virtual backbone network. In practical applications, the virtual backbone network elected by different algorithms is different, and as time changes, the virtual backbone network is constantly updated and changed. The virtual backbone network is a connected subset of the mobile ad hoc network.
  • Backbone nodes which can also be called virtual backbone network nodes, central nodes or control nodes, refer to nodes in the virtual backbone network.
  • the virtual backbone network is a connected subset of the mobile ad hoc network.
  • the node type of any node in the mobile ad hoc network is a backbone node or a common node.
  • the node type of a node is not fixed, that is, the node type of a node may be a backbone node before, and then the node type of the node may become a normal node, or before the node
  • the node type of is a normal node, which may become a backbone node later.
  • Time To Live refers to the maximum number of network segments that data is allowed to pass through before being discarded. In the transmission process, each time data is forwarded, the TTL of the data is reduced by one.
  • Terminal equipment which can be a wireless terminal or a wired terminal.
  • a wireless terminal can be a device that provides voice and/or other service data connectivity to the user, a handheld device with wireless connection function, or other connected to a wireless modem Processing equipment.
  • a wireless terminal can communicate with one or more core networks via a Radio Access Network (RAN).
  • the wireless terminal can be a mobile terminal, such as a mobile phone (or "cellular" phone) and a computer with a mobile terminal For example, they can be portable, pocket-sized, handheld, computer-built or vehicle-mounted mobile devices, which exchange language and/or data with the wireless access network.
  • Wireless terminal can also be called system, subscriber unit (Subscriber Unit), subscriber station (Subscriber Station), mobile station (Mobile Station), mobile station (Mobile), remote station (Remote Station), remote terminal (Remote Terminal), connection Incoming terminal (Access Terminal), user terminal (User Terminal), user agent (User Agent), and user equipment (User Device or User Equipment).
  • FIG. 1 is a diagram of an application scenario in an embodiment of this application.
  • the mobile ad hoc network includes multiple backbone nodes (indicated by M in Figure 1) and multiple ordinary nodes (indicated by D in Figure 1).
  • the backbone node can communicate with one-hop ordinary nodes, and the ordinary nodes can directly communicate with other ordinary neighbor nodes within one hop.
  • the number of backbone nodes is 4 as an example, and the number of ordinary nodes is 5 as an example, but the number of backbone nodes and ordinary nodes is actually not limited.
  • the backbone nodes and ordinary nodes may both be routing devices, and the routing devices may specifically be access, aggregation, core routers, enterprise network routers (such as enterprise network edge routers), or home gateways.
  • the backbone node and the common node can also be terminal devices, and the terminal device accesses the Internet through the home gateway to communicate with another terminal device.
  • Some of the backbone nodes are routing devices, and some of the backbone nodes are terminal devices.
  • Some common nodes among the multiple common nodes are routing devices, and some common nodes are terminal devices.
  • Common nodes and backbone nodes can complete data transmission through a single-path routing protocol.
  • the single-path routing protocol stores a single transmission path between two nodes, when a node on the transmission path moves or the transmission link changes, packet loss is likely to occur, or when When the transmission data load is large, the transmission path is prone to blockage. It can be seen that the use of a single-path routing protocol for data transmission has poor adaptability to conditions such as node movement or link changes in the mobile ad hoc network, and the reliability of data transmission is poor.
  • an embodiment of the present application provides a data transmission method, which is suitable for the scene graph shown in FIG. 1, and the method is executed by the first node in the mobile ad hoc network.
  • the first node is any node in the mobile organization network.
  • the node type of the first node is a backbone node or a normal node. Please refer to Fig. 2, the flow of the method will be described in detail below.
  • Step 201 Receive first data, where the first data carries a destination address
  • Step 202 Determine whether the communication distance between the destination node and the first node is less than or equal to N hops, where N is a positive integer greater than or equal to 1 and less than the maximum number of hops of the mobile ad hoc network, and the destination node Is the node corresponding to the destination address;
  • Step 203 If it is determined that the communication distance between the destination node and the first node is less than or equal to N hops, determine the first transmission path according to the neighbor list; wherein, the neighbor list includes the communication distance with the first node The address of the neighbor node whose communication distance is within the range of N hops and the node type of the neighbor node whose communication distance with the first node is within the range of N hops, and the first transmission path includes transferring the first data from the first node The address of the node through which the destination address is transmitted;
  • Step 204 Transmit the first data through the first transmission path.
  • step 201 when the first node is the source node for transmitting the first data, the first node generates the first data according to the data acquisition request of other nodes, which is equivalent to receiving the first data.
  • the data acquisition request includes the destination address and the identification of the requested data.
  • other nodes in the mobile ad hoc network send the first data to the first node, and the first node receives the first data from the other nodes.
  • the first data is data to be transmitted.
  • the first data carries the destination address.
  • the destination address refers to the address corresponding to the destination node, and can also be called the destination network address.
  • the destination address is, for example, the Internet Protocol Address (IP) address of the destination node, or the unique identity (identification, ID) of the destination node in the mobile organization network.
  • IP Internet Protocol Address
  • ID unique identity
  • the first data also includes data content to be transmitted.
  • the first node After the first node receives the first data, the first node performs step 202, which is to determine whether the communication distance between the destination node and the first node is less than or equal to N hops.
  • N is a positive integer greater than or equal to 1 and less than the maximum number of hops of the mobile ad hoc network.
  • the maximum number of hops of the mobile ad hoc network refers to the communication distance between the source node and the destination node in the longest transmission link of the mobile ad hoc network at the current moment.
  • step 202 The following is an example of how to perform step 202.
  • the first way to perform step 202 is:
  • the first node determines the communication distance between the destination node and the first node according to the neighbor list, so as to determine whether the communication distance between the destination node and the first node is less than or equal to N hops.
  • the first node needs to obtain the neighbor list first.
  • the method for obtaining the neighbor list will be described below as an example.
  • the first node receives the neighbor maintenance data frame broadcast by each of the neighbor nodes within the N-1 hop range, and the first node generates the neighbor list of the first node according to the neighbor maintenance data frames.
  • each node in the mobile ad hoc network is synchronized, but each node does not know what its neighbor nodes are. Therefore, the first node needs to discover its neighbor nodes first.
  • N-hop neighbor nodes There are many ways to discover N-hop neighbor nodes, the following is an example.
  • the first node can periodically broadcast detection data packets, receive and according to other nodes' response data packets, find neighbor nodes within the N hop range.
  • the range of N hops refers to neighbor nodes whose communication distance with the first node is less than or equal to N hops.
  • the Exploring Packet (EP) includes the address of the current detecting node.
  • the response packet (RP) includes the address of the current node and the path from the current response node to the current detection node.
  • the first node After the first node can discover neighbor nodes within the N hop range, the first node and other nodes will broadcast their neighbor data maintenance frames. The first node will receive the neighbor maintenance data frames broadcast by each of the neighbor nodes within the N-1 hop range, and the first node maintains the data frames according to these neighbors, thereby establishing the neighbor list of the first node.
  • the neighbor maintenance data frame carries the node type of each node, and the addresses and node types of neighbor nodes within at least one hop of each node.
  • the node type is the backbone node or common node mentioned in the previous article.
  • the neighbor maintains a data frame such as a hello packet.
  • the specific format and content of the neighbor maintenance data frame can be set according to actual needs, and this article does not make specific restrictions.
  • the neighbor list can be understood as the local topology of the first node, that is, the relationship between the first node and neighbor nodes within the N hop range.
  • the neighbor list includes the addresses of neighbor nodes whose communication distance with the first node is within N hops, the node type of neighbor nodes whose communication distance with the first node is within N hops, and the neighbor nodes from the first node to N hops. At least one transmission path for each node in. There are many specific forms of the neighbor list, and this article does not limit the specific form of the neighbor list.
  • the neighbor data maintenance frame further includes a unique identifier, and the unique identifier is used to distinguish the neighbor data maintenance frames broadcast by the node in different periods.
  • the first node will periodically receive the neighbor maintenance data frame broadcast by each of the neighbor nodes within the N-1 hop range. After receiving the neighbor data maintenance frame, the first node can determine the first node according to the unique identifier. Whether a node receives the neighbor data maintenance frame for the first time, if it is not the first time to receive the neighbor data maintenance frame, it will periodically update the neighbor list according to the neighbor data maintenance frame to ensure that the information in the neighbor list can be Accurately reflect the current topology of the mobile ad hoc network.
  • the first node can query the neighbor list according to the destination address. If the neighbor list has the destination address, it means that the destination node is The communication distance of the first node is within N hops, so the first node can determine that the communication distance between the destination node and itself is less than or equal to N hops. If the neighbor list does not have the destination address, the first node can determine that the communication distance between the destination node and itself is greater than N hops.
  • Figure 3 is a structure diagram of the current mobile ad hoc network.
  • the mobile organization network includes five backbone nodes (node 3, node 7, node 1, node 2 and node 5).
  • the backbone network also includes four common nodes (node 15, node 6, node 4, and node 8).
  • N the number of backbone nodes
  • the neighbor list of node 7 can be as shown in Table 1 below:
  • step 203 is performed to determine the first transmission path according to the neighbor list.
  • the first node since the neighbor list stores at least one transmission path from the first node to each neighbor node in the N hop range, the first node directly determines the transmission path from the first node based on the at least one transmission path stored in the neighbor list. At least one transmission path from the first node to the destination node.
  • the content of the neighbor list please refer to the content discussed in the previous section, which will not be repeated here.
  • this transmission path is the first transmission path. If there are multiple transmission paths from the first node to the destination node, the first node needs to determine the first transmission path from the multiple transmission paths. The method of determining the first transmission path will be described as an example below.
  • the first method is to determine the first transmission path:
  • One of the multiple transmission paths is randomly selected as the first transmission path.
  • the first node is selected randomly, the first node does not need redundant calculations, and the determination method is simple and flexible.
  • the second method is to determine the first transmission path:
  • the transmission path with the highest link quality among the multiple transmission paths is the first transmission path.
  • the link quality of multiple transmission paths is different, and the first node may determine the link quality corresponding to each transmission path according to a preset algorithm, so as to select the transmission path with the highest link quality as the first transmission path.
  • the transmission path with the highest link quality is selected as the first transmission path, which can ensure the transmission quality of the first data.
  • the third method is to determine the first transmission path:
  • a transmission path matching the priority level of the first data transmission among the multiple transmission paths is determined to be the first transmission path.
  • the priority level is used to indicate the importance of data transmission. The higher the priority of the data, the more important the data.
  • Each of the multiple transmission paths corresponds to a different link quality. The data with the highest priority can be transmitted through the high-quality link, and the data with relatively low transmission priority can be transmitted through the transmission path with relatively low link quality. transmission.
  • the priority level of the first data may be pre-carried in the first data or determined by the first node.
  • determining corresponding transmission paths according to different priority levels of data can not only meet the requirements of data transmission of different priority levels, but also make the load of each transmission path relatively more balanced.
  • step 204 that is, transmits the first data through the first transmission path, thereby transmitting the data to the destination node.
  • step 201, step 202, step 203, and step 204 in the foregoing embodiment can be performed during data transmission.
  • step 202 if the first node determines that the communication distance between the destination node and itself is greater than N hops, and the type of the first node is different, the corresponding transmission mode of the first data is different.
  • the node types of the first node are different, the method of transmitting the first data will be separately described below.
  • step 402 if it is determined that the first node determines that the communication distance between the destination node and itself is greater than N hops, the first node performs step 403, that is, determines the second transmission path according to the routing table.
  • the first node Before performing step 403, the first node needs to first establish a routing table. There are many ways to establish a routing table, and examples are described below.
  • the first node receives routing control data frames periodically broadcast by other backbone nodes.
  • the routing control data frames carry the addresses and node types of other backbone nodes, and the addresses and node types of neighbor nodes within the N hop range of other backbone nodes.
  • Other backbone nodes Nodes refer to the backbone nodes other than the first node in the mobile ad hoc network;
  • the routing table of the first node is generated.
  • each node in the mobile ad hoc network will send a corresponding neighbor maintenance data frame and establish its own neighbor list.
  • Each backbone node can generate routing control data frames according to the neighbor list, or each backbone node can directly generate routing control data frames according to neighbor maintenance data frames sent by other nodes.
  • each routing control data frame is used to represent the current local topology structure of each backbone node, specifically including the address and node type of the node, and the addresses and node types of neighboring nodes within the N hop range of the node.
  • Table 2 is an example of an encapsulation format for routing control data frames.
  • the routing control data frame includes service type, datagram length, flag and chip offset, destination address, source address, header checksum, TTL, routing control data identification, forwarding node address, neighbor list length, The neighbor list of common nodes.
  • the service type is used to represent data of different service types.
  • the service type generally has a length of 8 bits.
  • the first two bits of the 8 bits are used to indicate the source of the data, and the last six bits of the 8 bits are used to distinguish different data of the same service type sent by the same node. For example, if the first two bits are 11, it indicates the data source and routing data.
  • the datagram length is used to indicate the total length of the routing control data frame, generally the length is 8 bits, the length unit can be double bytes (4bytes), the length range is 2 to 256, and all 0s represent 256.
  • the flag and the fragment offset are used to indicate the fragmentation flag of the routing control data frame. Generally, the length is 8 bits.
  • the routing control data frame is not fragmented, so the field is fixed to 00000000.
  • the destination address is used to indicate the destination address of the routing control data frame. Since the routing control data frame is broadcast in the virtual backbone network, the destination address of the routing control data frame is fixed to 11111111.
  • the source address is used to indicate the address of the node sending the routing control data frame, and is generally 8 bits in length.
  • the header checksum is used to check the header of the routing control frame, and the length is generally 8 bits.
  • TTL used to indicate the life cycle of routing control data frames, generally 4 bits in length.
  • the identifier is determined by the node that sends the routing control data frame, and is used to distinguish different routing control data sent by the backbone node.
  • the general length is 4 bits.
  • the forwarding node address is used to indicate the address of the latest forwarding node, and the general length is 8 bits.
  • the length of the neighbor list is used to indicate the number of neighbor nodes in the common node neighbor list of the backbone node, and the general length is 8 bits.
  • the ordinary node neighbor address list refers to the address list of ordinary nodes within the N hop range of the first node.
  • the first node can receive the routing control data frame sent by other backbone nodes.
  • the first node can directly establish a routing table after receiving the routing control data frame from the sender of other backbone nodes. Alternatively, after receiving the routing control data frame, the first node may first determine whether it is the first time that it has received the routing control data frame sent by the backbone node.
  • the first node may determine whether the routing control data frame is received for the first time according to the service type, source address, and identification in the routing control data frame. If the first node receives the routing control data frame for the first time, it can establish a transmission path from the first node to the backbone node according to the routing control data frame, and establish an N hop from the first node to the backbone node A transmission path of each node in the neighboring nodes in the range, and so on, when the first node establishes a transmission path with all other nodes, the routing table of the first node is obtained.
  • the TTL of the current routing data frame is greater than 1. If the TTL is equal to 1, then the current routing control data frame is not processed. If the TTL of the current routing control data frame is greater than 1, compare the TTL of the current routing control data frame with the previous routing control data frame.
  • the last routing control data frame refers to a data frame that has the same source address, the same service type, and a different identifier as the current routing control data frame.
  • the TTL of the last routing control data frame is less than the TTL of the routing control data frame, it means that the current transmission link has fewer network segments from the source address to the first node, which means that the current routing control data frame indicates Relatively fewer hops pass through the transmission link, so according to the current routing control data frame, a transmission path from the first node to other nodes is updated to obtain the updated routing table of the first node.
  • selectively updating the routing table can ensure the reliability of each transmission link in the current routing table.
  • the first node in order to facilitate other backbone nodes to establish or update the routing table, while the first node updates the routing table, the first node also modifies and controls the TTL of the data frame, the forwarding node address, and continues to forward the routing control Data Frame. If the first node does not have a 1-hop ordinary node, there is no need to forward the routing control data.
  • the first node periodically updates the neighbor list and the routing table, and the update period of the neighbor list is less than the update period of the routing table.
  • the update period of the first node to update the neighbor list is less than the update period of the routing table.
  • the update of the neighbor list provides buffer time for updating the routing table.
  • the first node can rely on the neighbor list for data transmission, ensuring the reliability of data transmission.
  • Fig. 3 when the first node is the backbone node and is the node 7 in Fig. 3, encapsulate according to the format of Table 2 above, and the obtained routing control data frame sent by node 7 is shown in Table 4 below.
  • Node 7 sends the routing control data frame to node 3 after 2 hops, and node 3 sends it to node 1.
  • the routing control data frame received by node 1 is shown in Table 5 below.
  • the node 1 can establish a transmission path to the node 7, the node 15, and the node 6 according to the routing control data frame in the table 5, and forward the routing control data frame.
  • the routing control data frame forwarded by node 1 is received by node 5, and the control data frame received by node 5 is specifically shown in Table 6 below.
  • Node 5 receives the routing control data frame shown in Table 6, and continues to forward the routing control data frame. If node 1 receives the routing control data frame shown in Table 6 sent by node 5, node 1 determines that the routing data frame with the identifier 0100 has been processed, and the TTL of the routing control data frame shown in Table 6 is less than the above For a routing control data frame (that is, the routing control data frame shown in Table 5), node 1 no longer performs any processing on the current routing control data frame received.
  • the first node After the first node establishes the routing table, since a transmission path from the first node to each of the other nodes is stored in the routing table, the first node can determine the first node from the routing table according to the routing table and the destination address. 2. Transmission path.
  • the second transmission path includes the address of the second node, and the second transmission path is a transmission path selected from the routing table.
  • the address of the second node is the next hop of the first node indicated in the second transmission path.
  • step 403 After step 403 is performed by the first node, the first data can be transmitted directly through the second transmission path.
  • the first node sends the first data to the next-hop node of the first node, and the next-hop node continues transmission until the first data is transmitted to the destination address.
  • the first node may perform step 404 after performing step 403, that is, according to the address of the second node, determine whether the second node is in the neighbor list and is the first node Next hop.
  • the second node is the next hop of the first node, but the topology of the mobile ad hoc network may change, and the first node updates the neighbor list. Therefore, the second node may not necessarily be the next hop of the first node in the neighbor list.
  • step 405 If the first node determines from the neighbor list that the second node is in the neighbor list and is still the next hop of the first node, the first node executes step 405, that is, transmits the first data according to the second transmission path.
  • the first node determines that the second node is in the neighbor list and is still the next hop of the first node, it means that the topology of the first node has not changed temporarily. Therefore, the first node directly passes the first data through The second transmission path can be transmitted to the second node.
  • the first node determines from the neighbor list that the second node is in the neighbor list and is not the next hop of the first node, the first node performs step 406, that is, determines whether the second node is a neighbor node within N hops of the first node .
  • the first node determines that it is in the neighbor list, and the second node is no longer the next hop of the first node, it means that the topology of the first node may have changed. Therefore, the first node needs to be further based on the neighbor list. It is determined whether the second node is a neighbor node within the N hop range of the first node, that is, the first node also needs to determine whether the communication distance between the second node and the first node is less than or equal to N hops according to the neighbor list.
  • the first node can query the neighbor list according to the address of the second node. If the address of the second node is in the neighbor list, it means that the second node is a neighbor node within the N hop range of the first node. If there is no address of the second node in the neighbor list, it means that the second node is not a neighbor node within the N hop range of the first node.
  • step 406 if the first node determines that the second node is a neighbor node within the N hop range of the first node, the first node executes step 407, that is, determines the third transmission path according to the neighbor list.
  • the third transmission path refers to The address of the node passed from the first node to the second node.
  • the first node directly selects a transmission path according to the neighbor list as the third transmission path.
  • the neighbor list there may be multiple transmission paths from the first node to the second node, and the method for determining the third transmission path from the multiple transmission paths by the first node can refer to the selection from multiple transmission paths discussed in step 203 above. Determine the content of the first transmission path, which will not be repeated here.
  • step 408 is performed, that is, the first data is transmitted through the third transmission path.
  • the first node transmits the first data to the second node through the third transmission path.
  • step 406 if the first node determines that the second node is not a neighbor node within the N hop range of the first node, step 409 is executed, that is, the fourth transmission path is determined according to the neighbor list.
  • the fourth transmission path refers to the address of the node through which the first data is transmitted from the first node to the third node, and the third node is a backbone node within the N hop range of the first node.
  • the first node determines that the second node is not a neighbor node within the N hop range of the first node, then the first node searches for a backbone node within the N hop range of the first node according to the neighbor list, that is, determines the third node Node, thereby determining the fourth transmission path.
  • the first node Since there may be more than one backbone node whose communication distance with the first node is within N hops, the first node needs to select one backbone node from the multiple backbone nodes as the third node.
  • the specific implementation methods include but are not limited to the following, which will be introduced separately below.
  • a backbone node is randomly selected as the third node.
  • the third node there may be multiple backbone nodes whose communication distance with the first node is less than or equal to N hops, and the first node randomly selects one of the backbone nodes as the third node.
  • the way to determine the third node is simple and flexible.
  • the second type is the first type:
  • the third node is determined.
  • the backbone node with the largest dominance factor is determined to be the third node.
  • the backbone node with the largest dominance factor is the third node.
  • the dominant factor is used to characterize the quality of the transmission link.
  • the dominance factor selects an index used to represent the characteristics of the node, such as ID, node remaining energy, and moving speed.
  • the dominance factor selects indicators used to represent network characteristics, such as the connectivity of the node, the coverage of the node, and the type of the node.
  • step 409 the first node performs step 410, that is, transmits the first data through the fourth transmission path.
  • the first node transmits the first data to the third node through the fourth transmission path.
  • the third node continues to propagate until it reaches the destination address.
  • FIG. 5 shows the updated structure of the mobile ad hoc network shown in FIG. 3, and the value of N is 2. Compared with FIG. 3, the position of node 7 in FIG. 6 has changed, and the connection between node 7 and node 3 is disconnected.
  • the updated neighbor list of node 7 is as follows:
  • node 7 first determines whether node 3 is its own 2-hop neighbor node, and determines that node 3 is its own 2-hop neighbor node. Node 7 queries the neighbor list and determines that the transmission path from node 7 to node 3 is 7-15-3 or 7-6-15-3. Therefore, node 7 can choose a transmission path at will and transmit the first data to node 3.
  • node 7 wants to send the first data to node 1, and node 7 determines that node 1 is not a neighbor node within its two-hop range, it looks up the routing table (such as Table 3) and determines to transmit it to node 1. The next hop is node 3.
  • Table 3 the routing table
  • Node 7 then queries the neighbor list (shown in Table 7) to determine that node 3 is not the next hop of node 7, so node 7 determines that node 3 is a neighbor node within 2 hops of node 7. Therefore, node 7 selects any transmission path "3:3, 3:6, 3:15" in the neighbor list, for example, node 7 selects "3:15", node 7 sends the first data to node 15, and then node 15 Send the first data to node 3, and finally node 3 sends the first data to node 1, thereby completing the transmission process.
  • step 602 when the first node determines that the communication distance between the destination node and itself is greater than N hops, the first node executes step 603, that is, determines the fifth transmission path according to the neighbor list.
  • the first node is based on The neighbor list determines the fifth transmission path, and the fifth transmission path is the address of the node through which the first node to the fourth node pass.
  • the fourth node is a backbone node whose communication distance with the first node is within N hops.
  • the first node Since there may be more than one backbone node whose communication distance with the first node is within N hops, the first node needs to select one backbone node from the multiple backbone nodes as the fourth node. For its specific implementation, refer to the discussion in step 409 above to determine the content of the third node, which will not be repeated here.
  • the third transmission path needs to be selected from multiple transmission paths.
  • the way to determine the third transmission path can be Refer to the content of determining the first transmission path discussed above, which will not be repeated here.
  • the first node may perform step 604, that is, transmit the first data through the fifth transmission path.
  • the first node transmits the first data to the fourth node through the determined fifth transmission path.
  • FIG. 7 shows the updated structure of the mobile ad hoc network shown in FIG. 3, and the value of N is 2. Compared with FIG. 3, the position of the node 15 in FIG. 7 has changed, and the node 15 is disconnected from the node 3 and the node 7.
  • node 15 wants to send the first data to node 8, it first determines whether node 8 is its own 2-hop neighbor node, and node 15 determines that node 8 is not its own 2-hop neighbor node. , Then determine the backbone node within the 2-hop range. The node 15 finds that the node 7 is a neighbor node within a 2-hop range. Therefore, the node 15 sends the first data to the node 7 through the node 6.
  • the device serves as the first node of a mobile ad hoc network. Please refer to FIG. 8.
  • the device includes:
  • the memory 801 is used to store instructions
  • the processor 802 is configured to read instructions in the memory 801 and execute the following process:
  • N Used to determine whether the communication distance between the destination node and the first node is less than or equal to N hops, where N is a positive integer greater than or equal to 1 and less than the maximum number of hops in the mobile ad hoc network, and the destination node is the node corresponding to the destination address ;
  • the first transmission path is determined according to the neighbor list; wherein, the neighbor list includes the neighbor nodes whose communication distance with the first node is within N hops.
  • the first transmission path includes The address of the node that the node passes through to the destination node;
  • the transceiver 803 is configured to send and receive information under the control of the processor 802.
  • the processor 802 is further configured to:
  • the second transmission path is obtained according to the routing table; wherein, the routing table includes a transmission path from the first node to each of the other nodes, and the second The transmission path includes the address of the second node, the second node is the next hop of the first node indicated in the second transmission path, and other nodes refer to nodes other than the first node in the mobile ad hoc network;
  • the processor 802 is further configured to determine whether the second node is the next hop of the first node in the neighbor list according to the address of the second node;
  • the first data is transmitted according to the second transmission path.
  • the processor 802 is also used to:
  • the third transmission path is determined according to the neighbor list; where, the third transmission path Including the addresses of nodes transmitted from the first node to the second node;
  • the first data is transmitted through the third transmission path.
  • the processor 802 is also used to:
  • the fourth transmission path is determined according to the neighbor list; wherein, the fourth transmission path includes the path from the first node to the third node.
  • the address of the passing node, the third node is a backbone node within the N hop range of the first node;
  • the first data is transmitted.
  • the normal node refers to a node other than the backbone node in the mobile ad hoc network
  • the processor 802 is also used for:
  • the fifth transmission path is determined according to the neighbor list; wherein, the fifth transmission path includes the address of the node passing through from the first node to the fourth node,
  • the fourth node is a backbone node among neighbor nodes whose communication distance with the first node is within N hops;
  • the first data is transmitted through the fifth transmission path.
  • the fourth node is the backbone node with the largest dominance factor among the N-hop neighbor nodes of the first node, and the dominance factor is used to characterize the quality of the transmission link from the first node to the fourth node.
  • the processor 802 is also used to:
  • the neighbor maintenance data frame carries the node type of each node and the neighbor nodes within at least 1 hop of each node Address and node type;
  • the neighbor list of the first node is generated.
  • the processor 802 is further configured to:
  • Receive routing control data frames periodically broadcast by other backbone nodes.
  • the routing control data frames carry the addresses and node types of other backbone nodes, as well as the addresses and node types of neighbor nodes within the N-hop range of other backbone nodes.
  • Other backbone nodes refer to The backbone nodes other than the first node in the mobile ad hoc network;
  • the routing table of the first node is generated.
  • the processor 802 is specifically used to:
  • a transmission path from the first node to each of the other nodes is established according to the routing control data frame, thereby obtaining the routing table of the first node.
  • the processor 802 is also used to:
  • a transmission path from the first node to other nodes is updated according to the control data frame to obtain the updated routing table of the first node.
  • the transceiver 803 and the memory 801 in FIG. 8 may be coupled to the processor 802.
  • processor 802 is taken as an example, but the number of processors 802 is actually not limited.
  • the processor 802 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), and may be one or more integrated circuits for controlling program execution, and may be Baseband chips, etc.
  • CPU central processing unit
  • ASIC application-specific integrated circuit
  • an embodiment of the present application provides a data transmission device.
  • the device serves as the first node of a mobile ad hoc network, and the device includes:
  • the receiving module 901 is configured to receive first data, where the first data carries a destination address;
  • the processing module 902 is used to determine whether the communication distance between the destination node and the first node is less than or equal to N hops, where N is a positive integer greater than or equal to 1 and less than the maximum number of hops of the mobile ad hoc network, and the destination node is the destination address The corresponding node;
  • the processing module 902 is further configured to, if it is determined that the communication distance between the destination node and the first node is less than or equal to N hops, determine the first transmission path according to the neighbor list; wherein, the neighbor list includes the communication distance with the first node in N The address of the neighbor node within the hop range, the node type of the neighbor node whose communication distance with the first node is within N hops, and at least one transmission path from the first node to each of the neighbor nodes within the N hop range.
  • a transmission path refers to the address of the node passing through from the first node to the destination address;
  • the sending module 903 is configured to transmit the first data through the first transmission path.
  • the node type of the first node is a backbone node, where:
  • the processing module 902 is further configured to, if it is determined that the communication distance between the destination node and the first node is greater than N hops, obtain the second transmission path according to the routing table; wherein, the routing table includes each node from the first node to the other nodes
  • the second transmission path includes the address of the second node, the second node is the next hop of the first node indicated in the second transmission path, and other nodes refer to the mobile ad hoc network except the first node Outside node
  • the processing module 902 is further configured to determine whether the second node is the next hop of the first node in the neighbor list according to the address of the second node;
  • the sending module 903 is further configured to transmit the first data according to the second transmission path if the second node is the next hop of the first node in the neighbor list.
  • the processing module 902 is further configured to: if it is determined that in the neighbor list, the second node is not the next hop of the first node, and is a neighbor node within N hops of the first node, according to The neighbor list determines the third transmission path; where the third transmission path includes the addresses of the nodes through which the first data passes from the first node to the second node;
  • the sending module 903 is further configured to transmit the first data through the third transmission path.
  • the processing module 902 is further configured to determine the fourth transmission path according to the neighbor list if it is determined that the second node is not a neighbor node within N hops of the first node in the neighbor list; where , The fourth transmission path includes the address of the node through which the first data is transmitted from the first node to the third node, and the third node is a backbone node within the N hop range of the first node;
  • the sending module 903 is further configured to transmit the first data through the fourth transmission path.
  • the normal node refers to a node other than the backbone node in the mobile ad hoc network
  • the processing module 902 is further configured to determine a fifth transmission path according to the neighbor list if it is determined that the communication distance between the destination node and the first node is greater than N hops; wherein, the fifth transmission path includes transferring the first data from the first node The address of the node passed by the fourth node is transmitted, and the fourth node is a backbone node among neighbor nodes whose communication distance with the first node is within N hops;
  • the processing module 902 is further configured to transmit the first data through the fifth transmission path.
  • the fourth node is the backbone node with the largest dominance factor among the N-hop neighbor nodes of the first node, and the dominance factor is used to characterize the quality of the transmission link from the first node to the fourth node.
  • the receiving module 901 is also used to receive the neighbor maintenance data frame broadcast by each of the neighbor nodes within the N-1 hop range of the first node, and the neighbor maintenance data frame carries the node of each node Type, and the address and node type of neighboring nodes within at least 1 hop of each node;
  • the processing module 902 is further configured to generate a neighbor list of the first node according to the neighbor maintenance data frame.
  • the node type of the first node is a backbone node
  • the receiving module 901 is also used to receive routing control data frames periodically broadcast by other backbone nodes.
  • the routing control data frames carry the addresses and node types of other backbone nodes, and the addresses and nodes of neighboring nodes within the N hop range of other backbone nodes.
  • Type, other backbone nodes refer to backbone nodes other than the first node in the mobile ad hoc network;
  • the processing module 902 is further configured to generate a routing table of the first node according to the routing control data frame.
  • processing module 902 is specifically used to:
  • a transmission path from the first node to each of the other nodes is established according to the routing control data frame, thereby obtaining the routing table of the first node.
  • processing module 902 is also used to:
  • a transmission path from the first node to other nodes is updated according to the routing control data frame to obtain the updated routing table of the first node.
  • the processing module 902 in FIG. 9 may be implemented by the processor 802 in FIG. 8.
  • the receiving module 901 and the sending module 903 in FIG. 9 can be implemented by the transceiver 803 in FIG. 8.
  • an embodiment of the present application provides a computer-readable storage medium, the computer-readable storage medium stores computer instructions, and when the computer instructions run on a computer, The computer is caused to execute the method described in FIG. 2 or FIG. 4 or FIG. 6.
  • this application can be provided as methods, systems, or computer program products. Therefore, this application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
  • the instructions provide steps for implementing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.

Landscapes

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

Abstract

Provided are a data transmission method and apparatus, which are used for improving the reliability of data transmission. The method comprises: receiving first data, the first data carrying a destination address; determining whether the communication distance between a destination node and the first node is less than or equal to N hops, N being a positive integer greater than or equal to 1 and less than the maximum number of hops of the mobile ad hoc network; if it is determined that the communication distance between the destination node and the first node is less than or equal to N hops, determining a first transmission path according to a neighbor list, the neighbor list comprising the addresses of neighbor nodes, the communication distance between which and the first node is within the range of N hops, and the node types of the neighbor nodes; and transmitting the first data by means of the first transmission path.

Description

一种传输数据的方法及装置Method and device for transmitting data
相关申请的交叉引用Cross references to related applications
本申请要求在2019年1月30日提交中国专利局、申请号为201910094027.4、发明名称为“一种传输数据的方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office, the application number is 201910094027.4, and the invention title is "a method and device for transmitting data" on January 30, 2019, the entire content of which is incorporated into this application by reference in.
技术领域Technical field
本申请涉及通信技术领域,尤其涉及一种传输数据的方法及装置。This application relates to the field of communication technology, and in particular to a method and device for transmitting data.
背景技术Background technique
移动自组织网络是由一群兼具终端及路由功能的节点通过传输链路形成的无中心、多跳、临时性自治系统。移动自组织网络中节点的类型为普通节点或骨干节点。骨干节点负责网络中的数据广播、路由选择等。骨干节点等效于分簇网络中的簇首和网关的合集。普通节点是骨干节点的一跳邻居,可以与骨干节点直接通信,也可以与一跳内的其他普通邻居节点直接通信。骨干节点和普通节点根据相应的路由协议,完成数据传输。路由协议包括单路径路由协议。The mobile ad hoc network is a centerless, multi-hop, temporary autonomous system formed by a group of nodes with both terminal and routing functions through transmission links. The types of nodes in the mobile ad hoc network are ordinary nodes or backbone nodes. The backbone node is responsible for data broadcasting and routing in the network. The backbone node is equivalent to the collection of cluster heads and gateways in the clustered network. A common node is a one-hop neighbor of the backbone node, and it can directly communicate with the backbone node or with other common neighbor nodes within one hop. The backbone node and the common node complete the data transmission according to the corresponding routing protocol. Routing protocols include single-path routing protocols.
单路径路由协议具体如下:移动自组织网络中的每个节点周期性地进行广播,以维护一张包含到达其他所有节点的路径的路由表,并根据网络拓扑结构的变化随时更新路由表。利用单路径路由协议进行数据传输时,每个节点根据路由表选择下一跳节点。因为路由表中存储的是两个节点之间的单一传输路径,所以路由表对应的下一跳节点的地址也是唯一的。因此,当该下一跳节点移动或传输链路发生变化时,容易导致该数据的传输过程出现错误。可见,采用单路径路由协议进行数据传输,数据传输的可靠性低。The single-path routing protocol is specifically as follows: each node in the mobile ad hoc network broadcasts periodically to maintain a routing table containing the paths to all other nodes, and update the routing table at any time according to changes in the network topology. When using the single-path routing protocol for data transmission, each node selects the next hop node according to the routing table. Because the routing table stores a single transmission path between two nodes, the address of the next hop node corresponding to the routing table is also unique. Therefore, when the next hop node moves or the transmission link changes, it is easy to cause errors in the data transmission process. It can be seen that the single-path routing protocol is used for data transmission, and the reliability of data transmission is low.
发明内容Summary of the invention
本申请提供一种传输数据的方法及装置,用于提高数据传输过程的可靠性。This application provides a method and device for transmitting data, which are used to improve the reliability of the data transmission process.
第一方面,提供一种传输数据的方法,应用于移动自组织网络的第一节点中,所述方法包括:In a first aspect, a data transmission method is provided, which is applied to a first node of a mobile ad hoc network, and the method includes:
接收第一数据,所述第一数据携带目的地址;Receiving first data, the first data carrying a destination address;
确定目的节点与所述第一节点之间的通信距离是否小于或等于N跳,N为大于或等于1且小于所述移动自组织网络的最大跳数的正整数,所述目的节点为所述目的地址所对应的节点;Determine whether the communication distance between the destination node and the first node is less than or equal to N hops, where N is a positive integer greater than or equal to 1 and less than the maximum number of hops of the mobile ad hoc network, and the destination node is the The node corresponding to the destination address;
若确定所述目的节点与所述第一节点之间的通信距离小于或等于N跳,则根据邻居列表,确定第一传输路径;其中,所述邻居列表包括与所述第一节点通信距离在N跳范围内的邻居节点的地址、与所述第一节点通信距离在N跳范围内的邻居节点的节点类型,以及所述第一节点到N跳范围内的邻居节点中每个节点的至少一条传输路径,所述第一传输路径包括从所述第一节点到所述目的节点所经过的节点的地址;If it is determined that the communication distance between the destination node and the first node is less than or equal to N hops, the first transmission path is determined according to the neighbor list; wherein, the neighbor list includes the communication distance with the first node The address of the neighbor node within the N hop range, the node type of the neighbor node whose communication distance with the first node is within the N hop range, and at least each node from the first node to the neighbor node within the N hop range A transmission path, the first transmission path including addresses of nodes passing through from the first node to the destination node;
通过所述第一传输路径,传输所述第一数据。The first data is transmitted through the first transmission path.
在上述方案中,当第一节点和目的节点的通信距离在N跳范围内时,第一节点从邻居 列表中的至少一条传输路径中,选择一条传输路径,传输第一数据,即使是第一节点到目的节点的某条路径上的某个节点发生移动或链路变化时,第一节点依旧可以通过邻居列表中的其它路径完成第一数据的传输。相对于单路径路由协议传输过程,本申请实施中传输数据的方式对移动自组织网络适应性更好,数据传输的可靠性更高。且相对于多路径传输协议,通过存储第一节点到移动自组织网络的每个节点的多路径路由协议来传输数据的方式,本申请实施例中只存储第一节点的N跳范围内的邻居节点的至少一条传输路径的方式,相对于通过多路径路由协议传输数据方式的计算和存储开销更小。In the above solution, when the communication distance between the first node and the destination node is within N hops, the first node selects a transmission path from at least one transmission path in the neighbor list to transmit the first data, even if it is the first transmission path. When a node on a certain path from a node to a destination node moves or a link changes, the first node can still complete the transmission of the first data through other paths in the neighbor list. Compared with the single-path routing protocol transmission process, the data transmission method in the implementation of this application is more adaptable to mobile ad hoc networks, and the reliability of data transmission is higher. Compared with the multi-path transmission protocol, the data is transmitted by storing the multi-path routing protocol from the first node to each node of the mobile ad hoc network. In the embodiment of the present application, only the neighbors within the N hop range of the first node are stored. The method of at least one transmission path of the node has smaller calculation and storage overhead than the method of transmitting data through a multi-path routing protocol.
在一种可能的设计中,当所述第一节点的节点类型为骨干节点时,所述方法还包括:In a possible design, when the node type of the first node is a backbone node, the method further includes:
若确定所述目的节点与所述第一节点之间的通信距离大于N跳,则根据路由表,获得第二传输路径;其中,所述路由表包括所述第一节点到其它节点中每个节点的一条传输路径,所述第二传输路径包括第二节点的地址,所述第二节点为所述第二传输路径中所指示的所述第一节点的下一跳,所述其它节点是指所述移动自组织网络中除了所述第一节点之外的节点;If it is determined that the communication distance between the destination node and the first node is greater than N hops, a second transmission path is obtained according to a routing table; wherein, the routing table includes each of the first node to the other nodes A transmission path of a node, the second transmission path includes the address of a second node, the second node is the next hop of the first node indicated in the second transmission path, and the other nodes are Refers to nodes other than the first node in the mobile ad hoc network;
根据所述第二节点的地址,确定在所述邻居列表中,所述第二节点是否为所述第一节点的下一跳;Determining whether the second node is the next hop of the first node in the neighbor list according to the address of the second node;
若确定在所述邻居列表中,所述第二节点为所述第一节点的下一跳,则根据所述第二传输路径,传输所述第一数据。If it is determined that the second node is the next hop of the first node in the neighbor list, the first data is transmitted according to the second transmission path.
在上述方案中,当第一节点为骨干节点时,骨干节点对比路由表和邻居列表中的信息,从而确定第二节点是否为第一节点的下一跳,如果是,则再通过第二传输路径传输第一数据,保证第二传输路径的可靠性,进一步提高数据传输的可靠性。In the above solution, when the first node is the backbone node, the backbone node compares the information in the routing table and the neighbor list to determine whether the second node is the next hop of the first node, and if so, then through the second transmission The path transmits the first data to ensure the reliability of the second transmission path and further improve the reliability of data transmission.
在一种可能的设计中,所述方法还包括:In a possible design, the method further includes:
若确定在所述邻居列表中,所述第二节点不是所述第一节点的下一跳,且为所述第一节点的N跳范围内的邻居节点,则根据所述邻居列表,确定第三传输路径;其中,所述第三传输路径包括从所述第一节点到所述第二节点所经过的节点的地址;If it is determined that in the neighbor list, the second node is not the next hop of the first node and is a neighbor node within the N hop range of the first node, then determine the first node according to the neighbor list Three transmission paths; wherein the third transmission path includes addresses of nodes passing through from the first node to the second node;
通过所述第三传输路径,传输所述第一数据。The first data is transmitted through the third transmission path.
在上述方案中,当第一节点为骨干节点时,骨干节点对比路由表和邻居列表中的信息,如果路由表与邻居列表中的信息不一致,则表示第一节点的局域拓扑结构可能发生了变化,且如果第二节点还是第一节点的N跳范围内的邻居节点,第一节点就可以直接根据邻居列表,确定一条传输路径,从而将第一数据传输给第二节点。由于一般邻居列表更新更快,因此在第一节点的局域拓扑结构发生变化的情况下,利用邻居列表传输数据,相较于直接根据路由表确定传输路径的方式,本方案更能保证数据传输路径的可靠性,进一步提高了数据传输的可靠性。In the above scheme, when the first node is the backbone node, the backbone node compares the information in the routing table and the neighbor list. If the information in the routing table and the neighbor list are inconsistent, it means that the local topology of the first node may have occurred If the second node is also a neighbor node within the N hop range of the first node, the first node can directly determine a transmission path according to the neighbor list, so as to transmit the first data to the second node. Since the neighbor list is generally updated faster, when the local topology of the first node changes, the neighbor list is used to transmit data. Compared with the method of determining the transmission path directly based on the routing table, this solution can ensure data transmission. The reliability of the path further improves the reliability of data transmission.
在一种可能的设计中,所述方法还包括:In a possible design, the method further includes:
若确定在所述邻居列表中,所述第二节点不是所述第一节点的N跳范围内的邻居节点,则根据所述邻居列表,确定第四传输路径;其中,所述第四传输路径包括从所述第一节点到第三节点所经过的节点的地址,所述第三节点为所述第一节点的N跳范围内的一个骨干节点;If it is determined that in the neighbor list, the second node is not a neighbor node within the N hop range of the first node, then a fourth transmission path is determined according to the neighbor list; wherein, the fourth transmission path Including addresses of nodes passing through from the first node to a third node, where the third node is a backbone node within an N hop range of the first node;
通过所述第四传输路径,传输所述第一数据。The first data is transmitted through the fourth transmission path.
在上述方案中,当第一节点为骨干节点时,骨干节点对比路由表和邻居列表中的信息,如果路由表与邻居列表中的信息不一致,且可能由于第一节点的拓扑结构变化过大或拓扑 结构处于维护状态时,第二节点也不是第一节点N跳范围内的邻居节点,第一节点就可以直接根据邻居列表确定一个N跳范围内的骨干节点,将第一数据传输给该节点,从而使得即使第一节点的拓扑结构变化过大或拓扑结构处于维护状态的情况下,第一节点依旧能够顺利完成数据传输过程,进一步保证了数据传输的可靠性。且本方案中的传输数据的方式对移动自组织网络变化的适应性好,数据传输的鲁棒性高。In the above solution, when the first node is the backbone node, the backbone node compares the information in the routing table and the neighbor list. If the information in the routing table and the neighbor list are inconsistent, and the topology of the first node may change too much or When the topology is under maintenance, the second node is not a neighbor node within the N hop range of the first node. The first node can directly determine a backbone node within the N hop range based on the neighbor list, and transmit the first data to the node. Therefore, even if the topological structure of the first node changes too much or the topological structure is in a maintenance state, the first node can still successfully complete the data transmission process, which further ensures the reliability of data transmission. In addition, the data transmission method in this solution has good adaptability to changes in the mobile ad hoc network, and the data transmission has high robustness.
在一种可能的设计中,当所述第一节点的节点类型为普通节点时,所述普通节点是指所述移动自组织网络中除了骨干节点之外的节点,所述方法还包括:In a possible design, when the node type of the first node is an ordinary node, the ordinary node refers to a node other than a backbone node in the mobile ad hoc network, and the method further includes:
若确定所述目的节点与所述第一节点之间的通信距离大于N跳,则根据所述邻居列表,确定第五传输路径;其中,所述第五传输路径包括从所述第一节点到第四节点所经过的节点的地址,所述第四节点为与所述第一节点的通信距离在N跳范围内的邻居节点中的一个骨干节点;If it is determined that the communication distance between the destination node and the first node is greater than N hops, a fifth transmission path is determined according to the neighbor list; wherein, the fifth transmission path includes from the first node to An address of a node passed by the fourth node, where the fourth node is a backbone node among neighbor nodes whose communication distance with the first node is within N hops;
通过所述第五传输路径,传输所述第一数据。The first data is transmitted through the fifth transmission path.
在上述方案中,当第一节点为普通节点时,如果目的节点与第一节点之间的通信距离大于N跳,那么第一节点可以借助N跳范围内的骨干节点,将第一数据通过该节点传输到目的地址。In the above solution, when the first node is a normal node, if the communication distance between the destination node and the first node is greater than N hops, the first node can use the backbone nodes within the N hop range to pass the first data through the The node transmits to the destination address.
在一种可能的设计中,所述第四节点为所述第一节点的N跳邻居节点中支配因子最大的骨干节点,所述支配因子用于表征所述第一节点到所述第四节点的传输链路质量。In a possible design, the fourth node is the backbone node with the largest dominance factor among the N-hop neighbor nodes of the first node, and the dominance factor is used to characterize the first node to the fourth node The quality of the transmission link.
在上述方案中,选择支配因子较大的骨干节点作为第四节点,可以保证第一节点到第四节点之间的传输链路质量,从而进一步提高数据传输的质量。In the above solution, selecting the backbone node with a larger dominance factor as the fourth node can ensure the quality of the transmission link between the first node and the fourth node, thereby further improving the quality of data transmission.
在一种可能的设计中,所述方法还包括:In a possible design, the method further includes:
接收所述第一节点的N-1跳范围内的邻居节点中每个节点广播的邻居维护数据帧,所述邻居维护数据帧携带所述每个节点的节点类型、以及所述每个节点的至少1跳范围内的邻居节点的地址和节点类型;Receive a neighbor maintenance data frame broadcast by each of the neighbor nodes within the N-1 hop range of the first node, where the neighbor maintenance data frame carries the node type of each node and the information of each node Address and node type of neighbor nodes within at least 1 hop;
根据所述邻居维护数据帧,生成所述第一节点的邻居列表。According to the neighbor maintenance data frame, a neighbor list of the first node is generated.
在上述方案中,第一节点通过接收邻居节点广播的邻居维护数据帧,根据邻居维护数据帧生成第一节点的邻居列表。本方案生成邻居列表的方式简单直接。In the above solution, the first node generates the neighbor list of the first node according to the neighbor maintenance data frame by receiving the neighbor maintenance data frame broadcast by the neighbor node. The method of generating the neighbor list in this solution is simple and straightforward.
在一种可能的设计中,当所述第一节点的节点类型为骨干节点时,所述方法包括:In a possible design, when the node type of the first node is a backbone node, the method includes:
接收其它骨干节点周期性广播的路由控制数据帧,所述路由控制数据帧携带所述其它骨干节点的地址和节点类型,以及所述其它骨干节点的N跳范围内的邻居节点的地址和节点类型,所述其它骨干节点是指所述移动自组织网络中除了所述第一节点之外的骨干节点;Receive routing control data frames periodically broadcast by other backbone nodes, the routing control data frames carrying the addresses and node types of the other backbone nodes, and the addresses and node types of neighbor nodes within the N hop range of the other backbone nodes , The other backbone nodes refer to the backbone nodes other than the first node in the mobile ad hoc network;
根据所述路由控制数据帧,生成所述第一节点的路由表。According to the routing control data frame, a routing table of the first node is generated.
在上述方案中,提供了一种生成路由表的方式,第一节点通过其它骨干节点广播的路由控制数据帧,从而生成路由表,无需普通节点参与路由表的建立,相对可以减少计算开销。In the above solution, a way to generate a routing table is provided. The first node generates a routing table through routing control data frames broadcast by other backbone nodes, without the need for ordinary nodes to participate in the establishment of the routing table, and relatively reduces computational overhead.
在一种可能的设计中,根据所述路由控制数据帧,生成所述第一节点的路由表,包括:In a possible design, generating the routing table of the first node according to the routing control data frame includes:
若确定所述第一节点是第一次收到所述路由控制数据帧,则根据所述路由控制数据帧,建立所述第一节点到其它节点中每个节点的一条传输路径,从而获得所述第一节点的路由表。If it is determined that the first node has received the routing control data frame for the first time, a transmission path from the first node to each of the other nodes is established according to the routing control data frame, so as to obtain Describe the routing table of the first node.
在上述方案中,第一节点接收到路由控制数据帧时,先确定是否是第一次收到,如果是第一次收到该数据帧,再根据该数据帧建立路由表。In the above solution, when the first node receives the routing control data frame, it first determines whether it is the first time it has received it. If it is the first time it has received the data frame, it then establishes a routing table based on the data frame.
在一种可能的设计中,在生成所述第一节点的路由表之后,还包括:In a possible design, after generating the routing table of the first node, the method further includes:
若确定所述第一节点不是第一次收到所述路由控制数据帧,则确定上一个路由控制数据帧的生存周期(TTL)是否大于所述路由控制数据帧的TTL;If it is determined that the first node is not receiving the routing control data frame for the first time, determining whether the lifetime (TTL) of the previous routing control data frame is greater than the TTL of the routing control data frame;
若所述上一个路由控制数据帧的生存周期TTL小于所述路由控制数据帧的TTL,则根据所述路由控制数据帧,更新所述第一节点到所述其它节点的一条传输路径,获得更新后的所述第一节点的路由表。If the lifetime TTL of the last routing control data frame is less than the TTL of the routing control data frame, update a transmission path from the first node to the other nodes according to the routing control data frame to obtain the update The routing table of the first node after.
在上述方案中,选择性地更新路由表,可以减少第一节点的计算开销,还能保证路由表中的传输路径的质量。In the above solution, selectively updating the routing table can reduce the computational overhead of the first node and can also ensure the quality of the transmission path in the routing table.
第二方面,提供一种传输数据的装置,所述装置作为移动自组织网络的第一节点,所述装置包括:In a second aspect, a device for transmitting data is provided. The device serves as a first node of a mobile ad hoc network, and the device includes:
存储器,用于存储指令;Memory, used to store instructions;
处理器,用于读取所述存储器中的指令,执行下列过程:The processor is configured to read instructions in the memory and execute the following process:
接收第一数据,所述第一数据携带目的地址;Receiving first data, the first data carrying a destination address;
用于确定目的节点与所述第一节点之间的通信距离是否小于或等于N跳,N为大于或等于1且小于所述移动自组织网络的最大跳数的正整数,所述目的节点为所述目的地址所对应的节点;Used to determine whether the communication distance between the destination node and the first node is less than or equal to N hops, where N is a positive integer greater than or equal to 1 and less than the maximum number of hops of the mobile ad hoc network, and the destination node is The node corresponding to the destination address;
若确定所述目的节点与所述第一节点之间的通信距离小于或等于N跳,则根据邻居列表,确定第一传输路径;其中,所述邻居列表包括与所述第一节点通信距离在N跳范围内的邻居节点的地址、与所述第一节点通信距离在N跳范围内的邻居节点的节点类型,以及所述第一节点到N跳范围内的邻居节点中每个节点的至少一条传输路径,所述第一传输路径包括从所述第一节点到所述目的节点所经过的节点的地址;If it is determined that the communication distance between the destination node and the first node is less than or equal to N hops, the first transmission path is determined according to the neighbor list; wherein, the neighbor list includes the communication distance with the first node The address of the neighbor node within the N hop range, the node type of the neighbor node whose communication distance with the first node is within the N hop range, and at least each node from the first node to the neighbor node within the N hop range A transmission path, the first transmission path including addresses of nodes passing through from the first node to the destination node;
收发机,用于在所述处理器的控制下收发信息。The transceiver is used to send and receive information under the control of the processor.
在一种可能的设计中,当所述第一节点的节点类型为骨干节点时,所述处理器还用于:In a possible design, when the node type of the first node is a backbone node, the processor is further configured to:
若确定所述目的节点与所述第一节点之间的通信距离大于N跳,则根据路由表,获得第二传输路径;其中,所述路由表包括所述第一节点到其它节点中每个节点的一条传输路径,所述第二传输路径包括第二节点的地址,所述第二节点为所述第二传输路径中所指示的所述第一节点的下一跳,所述其它节点是指所述移动自组织网络中除了所述第一节点之外的节点;If it is determined that the communication distance between the destination node and the first node is greater than N hops, a second transmission path is obtained according to a routing table; wherein, the routing table includes each of the first node to the other nodes A transmission path of a node, the second transmission path includes the address of a second node, the second node is the next hop of the first node indicated in the second transmission path, and the other nodes are Refers to nodes other than the first node in the mobile ad hoc network;
所述处理器,还用于根据所述第二节点的地址,确定在所述邻居列表中,所述第二节点是否为所述第一节点的下一跳;The processor is further configured to determine whether the second node is the next hop of the first node in the neighbor list according to the address of the second node;
若确定在所述邻居列表中,所述第二节点为所述第一节点的下一跳,则根据所述第二传输路径,传输所述第一数据。If it is determined that the second node is the next hop of the first node in the neighbor list, the first data is transmitted according to the second transmission path.
在一种可能的设计中,所述处理器还用于:In a possible design, the processor is also used for:
若确定在所述邻居列表中,所述第二节点不是所述第一节点的下一跳,且为所述第一节点的N跳范围内的邻居节点,则根据所述邻居列表,确定第三传输路径;其中,所述第三传输路径包括从所述第一节点传输到所述第二节点所经过的节点的地址;If it is determined that in the neighbor list, the second node is not the next hop of the first node and is a neighbor node within the N hop range of the first node, then determine the first node according to the neighbor list Three transmission paths; wherein the third transmission path includes the addresses of nodes that are transmitted from the first node to the second node;
通过所述第三传输路径,传输所述第一数据。The first data is transmitted through the third transmission path.
在一种可能的设计中,所述处理器还用于:In a possible design, the processor is also used for:
若确定在所述邻居列表中,所述第二节点不是所述第一节点的N跳范围内的邻居节点,则根据所述邻居列表,确定第四传输路径;其中,所述第四传输路径包括从所述第一节点 到第三节点所经过的节点的地址,所述第三节点为所述第一节点的N跳范围内的一个骨干节点;If it is determined that in the neighbor list, the second node is not a neighbor node within the N hop range of the first node, then a fourth transmission path is determined according to the neighbor list; wherein, the fourth transmission path Including addresses of nodes passing through from the first node to a third node, where the third node is a backbone node within an N hop range of the first node;
通过所述第四传输路径,传输所述第一数据。The first data is transmitted through the fourth transmission path.
在一种可能的设计中,当所述第一节点的节点类型为普通节点时,所述普通节点是指所述移动自组织网络中除了骨干节点之外的节点,所述处理器还用于:In a possible design, when the node type of the first node is a normal node, the normal node refers to a node other than the backbone node in the mobile ad hoc network, and the processor is also used for :
若确定所述目的节点与所述第一节点之间的通信距离大于N跳,则根据所述邻居列表,确定第五传输路径;其中,所述第五传输路径包括从所述第一节点到第四节点所经过的节点的地址,所述第四节点为与所述第一节点的通信距离在N跳范围内的邻居节点中的一个骨干节点;If it is determined that the communication distance between the destination node and the first node is greater than N hops, a fifth transmission path is determined according to the neighbor list; wherein, the fifth transmission path includes from the first node to An address of a node passed by the fourth node, where the fourth node is a backbone node among neighbor nodes whose communication distance with the first node is within N hops;
通过所述第五传输路径,传输所述第一数据。The first data is transmitted through the fifth transmission path.
在一种可能的设计中,所述第四节点为所述第一节点的N跳邻居节点中支配因子最大的骨干节点,所述支配因子用于表征所述第一节点到所述第四节点的传输链路质量。In a possible design, the fourth node is the backbone node with the largest dominance factor among the N-hop neighbor nodes of the first node, and the dominance factor is used to characterize the first node to the fourth node The quality of the transmission link.
在一种可能的设计中,所述处理器还用于:In a possible design, the processor is also used for:
接收所述第一节点的N-1跳范围内的邻居节点中每个节点广播的邻居维护数据帧,所述邻居维护数据帧携带所述每个节点的节点类型、以及所述每个节点的至少1跳范围内的邻居节点的地址和节点类型;Receive a neighbor maintenance data frame broadcast by each of the neighbor nodes within the N-1 hop range of the first node, where the neighbor maintenance data frame carries the node type of each node and the information of each node Address and node type of neighbor nodes within at least 1 hop;
根据所述邻居维护数据帧,生成所述第一节点的邻居列表。According to the neighbor maintenance data frame, a neighbor list of the first node is generated.
在一种可能的设计中,当所述第一节点的节点类型为骨干节点时,所述处理器还用于:In a possible design, when the node type of the first node is a backbone node, the processor is further configured to:
接收其它骨干节点周期性广播的路由控制数据帧,所述路由控制数据帧携带所述其它骨干节点的地址和节点类型,以及所述其它骨干节点的N跳范围内的邻居节点的地址和节点类型,所述其它骨干节点是指所述移动自组织网络中除了所述第一节点之外的骨干节点;Receive routing control data frames periodically broadcast by other backbone nodes, the routing control data frames carrying the addresses and node types of the other backbone nodes, and the addresses and node types of neighbor nodes within the N hop range of the other backbone nodes , The other backbone nodes refer to the backbone nodes other than the first node in the mobile ad hoc network;
根据所述路由控制数据帧,生成所述第一节点的路由表。According to the routing control data frame, a routing table of the first node is generated.
在一种可能的设计中,所述处理器具体用于:In a possible design, the processor is specifically used for:
若确定所述第一节点是第一次收到所述路由控制数据帧,则根据所述路由控制数据帧,建立所述第一节点到其它节点中每个节点的一条传输路径,从而获得所述第一节点的路由表。If it is determined that the first node has received the routing control data frame for the first time, a transmission path from the first node to each of the other nodes is established according to the routing control data frame, so as to obtain Describe the routing table of the first node.
在一种可能的设计中,所述处理器还用于:In a possible design, the processor is also used for:
在生成所述第一节点的路由表之后,若确定所述第一节点不是第一次收到所述路由控制数据帧,则确定上一个路由控制数据帧的TTL是否大于所述路由控制数据帧的TTL;After generating the routing table of the first node, if it is determined that the first node is not receiving the routing control data frame for the first time, it is determined whether the TTL of the previous routing control data frame is greater than the routing control data frame TTL;
若所述上一个路由控制数据帧的生存周期TTL小于所述路由控制数据帧的TTL,则根据所述控制数据帧,更新所述第一节点到所述其它节点的一条传输路径,获得更新后的所述第一节点的路由表。If the lifetime TTL of the last routing control data frame is less than the TTL of the routing control data frame, update a transmission path from the first node to the other nodes according to the control data frame, and obtain the updated The routing table of the first node.
第三方面,提供一种传输数据的装置,所述装置作为移动自组织网络的第一节点,所述装置包括:In a third aspect, a device for transmitting data is provided. The device serves as a first node of a mobile ad hoc network, and the device includes:
接收模块,用于接收第一数据,所述第一数据携带目的地址;A receiving module, configured to receive first data, where the first data carries a destination address;
处理模块,用于确定目的节点与所述第一节点之间的通信距离是否小于或等于N跳,N为大于或等于1且小于所述移动自组织网络的最大跳数的正整数,所述目的节点为所述目的地址所对应的节点;The processing module is used to determine whether the communication distance between the destination node and the first node is less than or equal to N hops, where N is a positive integer greater than or equal to 1 and less than the maximum number of hops of the mobile ad hoc network, and The destination node is the node corresponding to the destination address;
所述处理模块,还用于若确定所述目的节点与所述第一节点之间的通信距离小于或等于N跳,则根据邻居列表,确定第一传输路径;其中,所述邻居列表包括与所述第一节点 通信距离在N跳范围内的邻居节点的地址、与所述第一节点通信距离在N跳范围内的邻居节点的节点类型,以及所述第一节点到N跳范围内的邻居节点中每个节点的至少一条传输路径,所述第一传输路径包括从所述第一节点到所述目的节点所经过的节点的地址;The processing module is further configured to, if it is determined that the communication distance between the destination node and the first node is less than or equal to N hops, determine the first transmission path according to the neighbor list; wherein, the neighbor list includes and The address of the neighbor node whose communication distance is within N hops of the first node, the node type of the neighbor node whose communication distance is within N hops of the first node, and the distance from the first node to the N hop range At least one transmission path of each node in the neighbor nodes, the first transmission path including the address of the node passing by from the first node to the destination node;
发送模块,用于通过所述第一传输路径,传输所述第一数据。The sending module is configured to transmit the first data through the first transmission path.
第四方面,提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机指令,当所述计算机指令在计算机上运行时,使得计算机执行如第一方面中任一项所述的方法。In a fourth aspect, a computer-readable storage medium is provided. The computer-readable storage medium stores computer instructions. When the computer instructions are executed on a computer, the computer executes the method described in any one of the first aspects. method.
附图说明Description of the drawings
图1为本申请实施例提供的一种应用场景示意图;FIG. 1 is a schematic diagram of an application scenario provided by an embodiment of the application;
图2为本申请实施例提供的一种传输数据的方法的流程图;FIG. 2 is a flowchart of a method for transmitting data according to an embodiment of the application;
图3为本申请实施例提供的一种移动自组织网络的结构图一;FIG. 3 is a structural diagram 1 of a mobile ad hoc network provided by an embodiment of this application;
图4为本申请实施例提供的一种传输数据的方法的流程图;FIG. 4 is a flowchart of a method for transmitting data according to an embodiment of the application;
图5为本申请实施例提供的一种移动自组织网络的结构图二;FIG. 5 is a second structural diagram of a mobile ad hoc network provided by an embodiment of this application;
图6为本申请实施例提供的一种传输数据的方法的流程图;FIG. 6 is a flowchart of a method for transmitting data provided by an embodiment of the application;
图7为本申请实施例提供的一种移动自组织网络的结构图三;FIG. 7 is a third structural diagram of a mobile ad hoc network provided by an embodiment of this application;
图8为本申请实施例提供的一种传输数据的装置的结构图;FIG. 8 is a structural diagram of a data transmission device provided by an embodiment of the application;
图9为本申请实施例提供的一种传输数据的装置的结构图。FIG. 9 is a structural diagram of a data transmission device provided by an embodiment of the application.
具体实施方式detailed description
为了更好的理解本申请实施例提供的技术方案,下面将结合说明书附图以及具体的实施方式进行详细的说明。In order to better understand the technical solutions provided by the embodiments of the present application, a detailed description will be given below in conjunction with the drawings in the specification and specific implementations.
1)移动自组织网络(Ad hoc),是由一群兼具终端及路由功能的节点通过传输链路形成的无中心、多跳、临时性自治系统。1) A mobile ad hoc network (Ad hoc) is a centerless, multi-hop, and temporary autonomous system formed by a group of nodes with both terminal and routing functions through transmission links.
2)簇首,无线网络中的一个簇是由一组节点组成,一般将邻近区域的一组节点组成一个簇,并通过一个协调节点(中心节点)协调和控制簇内节点的行为,这个协调节点(中心节点)称为簇首。2) Cluster head, a cluster in a wireless network is composed of a group of nodes. Generally, a group of nodes in the neighboring area form a cluster, and a coordinating node (central node) coordinates and controls the behavior of the nodes in the cluster. This coordination The node (central node) is called the cluster head.
3)连通支配集,在层次结构中,网络被划分为簇,每个簇由一个簇首和多个簇成员组成,在分簇网络中,簇间的通信依靠网关节点完成,由簇首和网关构成一个连通支配集。3) Connected dominance set. In the hierarchical structure, the network is divided into clusters. Each cluster is composed of a cluster head and multiple cluster members. In a clustered network, the communication between clusters is completed by gateway nodes. The gateway constitutes a connected dominating set.
4)虚拟骨干网,网络的连通支配集称为虚拟骨干网,并定义网络中所有簇首和网关的集合为网络支配集,对于簇中所有节点与簇首之间的距离为一跳的网络,网络支配集等于连通支配集,也即虚拟骨干网。在实际应用中,不同的算法所选举的虚拟骨干网不同,且随着时间的变化,虚拟骨干网也在不断的更新变化。虚拟骨干网为移动自组织网络中一个连通的子集。4) Virtual backbone network. The connected dominance set of the network is called the virtual backbone network, and the set of all cluster heads and gateways in the network is defined as the network dominance set. For a network where the distance between all nodes in the cluster and the cluster head is one hop , The network dominance set is equal to the connectivity dominance set, that is, the virtual backbone network. In practical applications, the virtual backbone network elected by different algorithms is different, and as time changes, the virtual backbone network is constantly updated and changed. The virtual backbone network is a connected subset of the mobile ad hoc network.
5)骨干节点,也可以称为虚拟骨干网节点、中心节点或控制节点,是指虚拟骨干网中的节点,虚拟骨干网为移动自组织网络中一个连通的子集,骨干节点等效于分簇网络中的簇首和网关的合集。5) Backbone nodes, which can also be called virtual backbone network nodes, central nodes or control nodes, refer to nodes in the virtual backbone network. The virtual backbone network is a connected subset of the mobile ad hoc network. A collection of cluster heads and gateways in a cluster network.
6)普通节点,移动自组织网络中除了骨干节点之外的节点,且与骨干节点的通信距离为1跳。移动自组织网络中任意节点的节点类型为骨干节点,或者为普通节点。在移动 自组织网络中,一个节点的节点类型并不是固定不变的,也就是说,一个节点的节点类型可能之前是骨干节点,之后该节点的节点类型可能变成普通节点,或者该节点之前的节点类型是普通节点,之后可能变成骨干节点。6) Ordinary nodes, nodes other than the backbone nodes in the mobile ad hoc network, and the communication distance with the backbone nodes is 1 hop. The node type of any node in the mobile ad hoc network is a backbone node or a common node. In a mobile ad hoc network, the node type of a node is not fixed, that is, the node type of a node may be a backbone node before, and then the node type of the node may become a normal node, or before the node The node type of is a normal node, which may become a backbone node later.
7)生存周期(Time To Live,TTL),是指数据在被丢弃之前允许通过的最大网段数量。在传输过程中,数据每被转发一次,该数据的TTL就减一。7) Time To Live (TTL) refers to the maximum number of network segments that data is allowed to pass through before being discarded. In the transmission process, each time data is forwarded, the TTL of the data is reduced by one.
8)终端设备,可以是无线终端也可以是有线终端,无线终端可以是指向用户提供语音和/或其他业务数据连通性的设备,具有无线连接功能的手持式设备、或连接到无线调制解调器的其他处理设备。无线终端可以经无线接入网(Radio Access Network,RAN)与一个或多个核心网进行通信,无线终端可以是移动终端,如移动电话(或称为“蜂窝”电话)和具有移动终端的计算机,例如,可以是便携式、袖珍式、手持式、计算机内置的或者车载的移动装置,它们与无线接入网交换语言和/或数据。例如,个人通信业务(Personal Communication Service,PCS)电话、无绳电话、会话发起协议(Session Initiation Protocol,SIP)话机、无线本地环路(Wireless Local Loop,WLL)站、个人数字助理(Personal Digital Assistant,PDA)等设备。无线终端也可以称为系统、订户单元(Subscriber Unit)、订户站(Subscriber Station),移动站(Mobile Station)、移动台(Mobile)、远程站(Remote Station)、远程终端(Remote Terminal)、接入终端(Access Terminal)、用户终端(User Terminal)、用户代理(User Agent)、用户设备(User Device or User Equipment)。8) Terminal equipment, which can be a wireless terminal or a wired terminal. A wireless terminal can be a device that provides voice and/or other service data connectivity to the user, a handheld device with wireless connection function, or other connected to a wireless modem Processing equipment. A wireless terminal can communicate with one or more core networks via a Radio Access Network (RAN). The wireless terminal can be a mobile terminal, such as a mobile phone (or "cellular" phone) and a computer with a mobile terminal For example, they can be portable, pocket-sized, handheld, computer-built or vehicle-mounted mobile devices, which exchange language and/or data with the wireless access network. For example, Personal Communication Service (PCS) phones, cordless phones, Session Initiation Protocol (SIP) phones, Wireless Local Loop (WLL) stations, and Personal Digital Assistants (Personal Digital Assistant, PDA) and other equipment. Wireless terminal can also be called system, subscriber unit (Subscriber Unit), subscriber station (Subscriber Station), mobile station (Mobile Station), mobile station (Mobile), remote station (Remote Station), remote terminal (Remote Terminal), connection Incoming terminal (Access Terminal), user terminal (User Terminal), user agent (User Agent), and user equipment (User Device or User Equipment).
下面对本申请实施例适用的场景进行介绍,本申请实施例可以适用于移动自组织网络中的节点与节点之间的通信。请参考图1,图1为本申请实施例中一种应用场景图。如图1所示,该移动自组织网络包括多个骨干节点(在图1中以M表示)和多个普通节点(在图1中以D表示)。骨干节点可以与1跳的普通节点相互通信,普通节点可以与1跳内的其他普通邻居节点直接通信。图1中是以骨干节点的数量为4个为例,以普通节点的数量为5个为例,但是实际上不限制骨干节点、普通节点的数量。The following describes the applicable scenarios of the embodiments of the present application. The embodiments of the present application may be applicable to communication between nodes in a mobile ad hoc network. Please refer to FIG. 1, which is a diagram of an application scenario in an embodiment of this application. As shown in Figure 1, the mobile ad hoc network includes multiple backbone nodes (indicated by M in Figure 1) and multiple ordinary nodes (indicated by D in Figure 1). The backbone node can communicate with one-hop ordinary nodes, and the ordinary nodes can directly communicate with other ordinary neighbor nodes within one hop. In Figure 1, the number of backbone nodes is 4 as an example, and the number of ordinary nodes is 5 as an example, but the number of backbone nodes and ordinary nodes is actually not limited.
其中,骨干节点和普通节点可以均是路由设备,路由设备具体可以是接入、汇聚、核心路由器,企业网路由器(例如企业网边缘路由器),也可以是家庭网关。骨干节点和普通节点也可以是终端设备,终端设备通过家庭网关接入因特网,与另外一个终端设备进行通信。多个骨干节点中的一部分骨干节点为路由设备,一部分骨干节点为终端设备。多个普通节点中的一部分普通节点为路由设备,一部分普通节点为终端设备。Among them, the backbone nodes and ordinary nodes may both be routing devices, and the routing devices may specifically be access, aggregation, core routers, enterprise network routers (such as enterprise network edge routers), or home gateways. The backbone node and the common node can also be terminal devices, and the terminal device accesses the Internet through the home gateway to communicate with another terminal device. Some of the backbone nodes are routing devices, and some of the backbone nodes are terminal devices. Some common nodes among the multiple common nodes are routing devices, and some common nodes are terminal devices.
下面结合图1的场景图进行说明。The following description will be given in conjunction with the scene graph of FIG.
普通节点和骨干节点可以通过单路径路由协议完成数据传输。单路径路由协议具体内容可以参照前文论述内容,此处不再赘述。因为单路径路由协议中的路由表存储的是两个节点之间单一的传输路径,当该传输路径上的某个节点移动,或者传输链路发生变化时,容易发生丢包等情况,或者当传输数据负载量大的时候,该传输路径容易发生堵塞等情况。可见,采用单路径路由协议进行数据传输,对移动自组织网络的节点移动或链路变化等情况的适应性差,数据传输的可靠性差。Common nodes and backbone nodes can complete data transmission through a single-path routing protocol. For the specific content of the single-path routing protocol, please refer to the foregoing discussion content, which will not be repeated here. Because the routing table in the single-path routing protocol stores a single transmission path between two nodes, when a node on the transmission path moves or the transmission link changes, packet loss is likely to occur, or when When the transmission data load is large, the transmission path is prone to blockage. It can be seen that the use of a single-path routing protocol for data transmission has poor adaptability to conditions such as node movement or link changes in the mobile ad hoc network, and the reliability of data transmission is poor.
鉴于此,本申请实施例提供一种传输数据的方法,该方法适用于图1所示的场景图中,该方法由移动自组织网络中的第一节点执行。第一节点是移动组织网络中的任意一个节点。第一节点的节点类型是骨干节点或普通节点。请参照图2,下面对该方法的流程进行具体说明。In view of this, an embodiment of the present application provides a data transmission method, which is suitable for the scene graph shown in FIG. 1, and the method is executed by the first node in the mobile ad hoc network. The first node is any node in the mobile organization network. The node type of the first node is a backbone node or a normal node. Please refer to Fig. 2, the flow of the method will be described in detail below.
步骤201,接收第一数据,所述第一数据携带目的地址;Step 201: Receive first data, where the first data carries a destination address;
步骤202,确定目的节点与所述第一节点之间的通信距离是否小于或等于N跳,N为大于或等于1且小于所述移动自组织网络的最大跳数的正整数,所述目的节点为所述目的地址所对应的节点;Step 202: Determine whether the communication distance between the destination node and the first node is less than or equal to N hops, where N is a positive integer greater than or equal to 1 and less than the maximum number of hops of the mobile ad hoc network, and the destination node Is the node corresponding to the destination address;
步骤203,若确定所述目的节点与所述第一节点之间的通信距离小于或等于N跳,则根据邻居列表,确定第一传输路径;其中,所述邻居列表包括与所述第一节点通信距离在N跳范围内的邻居节点的地址和与所述第一节点通信距离在N跳范围内的邻居节点的节点类型,所述第一传输路径包括将第一数据从所述第一节点传输到所述目的地址所经过的节点的地址;Step 203: If it is determined that the communication distance between the destination node and the first node is less than or equal to N hops, determine the first transmission path according to the neighbor list; wherein, the neighbor list includes the communication distance with the first node The address of the neighbor node whose communication distance is within the range of N hops and the node type of the neighbor node whose communication distance with the first node is within the range of N hops, and the first transmission path includes transferring the first data from the first node The address of the node through which the destination address is transmitted;
步骤204,通过所述第一传输路径,传输所述第一数据。Step 204: Transmit the first data through the first transmission path.
在步骤201中,当第一节点为传输第一数据的源节点时,第一节点根据其它节点的获取数据请求,生成第一数据,也就相当于接收了第一数据。获取数据请求包括目的地址,以及请求数据的标识。或者例如,当第一节点是传输第一数据过程中的中间节点,移动自组织网络中的其它节点发送第一数据给第一节点,第一节点从其它节点接收到第一数据。In step 201, when the first node is the source node for transmitting the first data, the first node generates the first data according to the data acquisition request of other nodes, which is equivalent to receiving the first data. The data acquisition request includes the destination address and the identification of the requested data. Or for example, when the first node is an intermediate node in the process of transmitting the first data, other nodes in the mobile ad hoc network send the first data to the first node, and the first node receives the first data from the other nodes.
其中,第一数据为需要传输的数据。第一数据携带有目的地址。目的地址是指目的节点所对应的地址,也可以称为目的网络地址。目的地址例如目的节点的互联网协议地址(Internet Protocol Address,IP)地址,或者目的节点在移动组织网络中的唯一身份标识(identification,ID)。除此之外,第一数据还包括待传输的数据内容。Among them, the first data is data to be transmitted. The first data carries the destination address. The destination address refers to the address corresponding to the destination node, and can also be called the destination network address. The destination address is, for example, the Internet Protocol Address (IP) address of the destination node, or the unique identity (identification, ID) of the destination node in the mobile organization network. In addition, the first data also includes data content to be transmitted.
第一节点在接收第一数据之后,第一节点执行步骤202,即确定目的节点与第一节点之间的通信距离是否小于或等于N跳。After the first node receives the first data, the first node performs step 202, which is to determine whether the communication distance between the destination node and the first node is less than or equal to N hops.
其中,N为大于或等于1且小于移动自组织网络的最大跳数的正整数。移动自组织网络的最大跳数是指当前时刻移动自组织网络最长传输链路中源节点到目的节点之间的通信距离。Among them, N is a positive integer greater than or equal to 1 and less than the maximum number of hops of the mobile ad hoc network. The maximum number of hops of the mobile ad hoc network refers to the communication distance between the source node and the destination node in the longest transmission link of the mobile ad hoc network at the current moment.
下面对执行步骤202的方式进行示例说明。The following is an example of how to perform step 202.
执行步骤202的方式一为:The first way to perform step 202 is:
第一节点根据邻居列表,确定目的节点与第一节点之间的通信距离,从而确定目的节点与第一节点之间的通信距离是否小于或等于N跳。The first node determines the communication distance between the destination node and the first node according to the neighbor list, so as to determine whether the communication distance between the destination node and the first node is less than or equal to N hops.
在执行步骤202的方式一中,第一节点需要先获取邻居列表,下面对获取邻居列表的方法进行示例说明。In the first method of performing step 202, the first node needs to obtain the neighbor list first. The method for obtaining the neighbor list will be described below as an example.
本申请实施例中,第一节点接收N-1跳范围内的邻居节点中每个节点广播的邻居维护数据帧,第一节点根据这些邻居维护数据帧,从而生成第一节点的邻居列表。In the embodiment of the present application, the first node receives the neighbor maintenance data frame broadcast by each of the neighbor nodes within the N-1 hop range, and the first node generates the neighbor list of the first node according to the neighbor maintenance data frames.
移动自组织网络构建之后,移动自组织网络中的每个节点同步,但是各个节点并不清楚自身的邻居节点有哪些。因此第一节点需要先发现自身的邻居节点。发现N跳邻居节点的方式有很多种,下面进行示例说明。After the construction of the mobile ad hoc network, each node in the mobile ad hoc network is synchronized, but each node does not know what its neighbor nodes are. Therefore, the first node needs to discover its neighbor nodes first. There are many ways to discover N-hop neighbor nodes, the following is an example.
第一节点可以周期性广播探测数据包,接收并根据其它节点的应答数据包,发现N跳范围内的邻居节点。The first node can periodically broadcast detection data packets, receive and according to other nodes' response data packets, find neighbor nodes within the N hop range.
其中,N跳范围内是指与第一节点的通信距离小于或等于N跳的邻居节点。探测数据包(Exploring Packet,EP)包括当前探测节点的地址。应答数据包(Response Packet,RP)中包括当前节点的地址以及当前应答节点到当前探测节点之间的路径。Wherein, the range of N hops refers to neighbor nodes whose communication distance with the first node is less than or equal to N hops. The Exploring Packet (EP) includes the address of the current detecting node. The response packet (RP) includes the address of the current node and the path from the current response node to the current detection node.
在第一节点可以发现N跳范围内的邻居节点之后,第一节点以及其它节点会广播自身的邻居数据维护帧。第一节点会接收N-1跳范围内的邻居节点中每个节点广播的邻居维护 数据帧,第一节点根据这些邻居维护数据帧,从而建立第一节点的邻居列表。After the first node can discover neighbor nodes within the N hop range, the first node and other nodes will broadcast their neighbor data maintenance frames. The first node will receive the neighbor maintenance data frames broadcast by each of the neighbor nodes within the N-1 hop range, and the first node maintains the data frames according to these neighbors, thereby establishing the neighbor list of the first node.
其中,邻居维护数据帧携带每个节点的节点类型、以及所述每个节点的至少1跳范围内的邻居节点的地址和节点类型。节点类型是前文中提到的骨干节点或普通节点。邻居维护数据帧例如hello数据包(hello packet)。邻居维护数据帧的具体格式以及内容可以根据实际需求进行设定,本文不进行具体限制。Wherein, the neighbor maintenance data frame carries the node type of each node, and the addresses and node types of neighbor nodes within at least one hop of each node. The node type is the backbone node or common node mentioned in the previous article. The neighbor maintains a data frame such as a hello packet. The specific format and content of the neighbor maintenance data frame can be set according to actual needs, and this article does not make specific restrictions.
邻居列表可以理解为第一节点的局域拓扑结构,也就是第一节点与N跳范围内的邻居节点之间的关系。邻居列表包括与第一节点通信距离在N跳范围内的邻居节点的地址、与第一节点通信距离在N跳范围内的邻居节点的节点类型,以及第一节点到N跳范围内的邻居节点中每个节点的至少一条传输路径。邻居列表的具体形式有很多种,本文不对邻居列表的具体形式进行限制。The neighbor list can be understood as the local topology of the first node, that is, the relationship between the first node and neighbor nodes within the N hop range. The neighbor list includes the addresses of neighbor nodes whose communication distance with the first node is within N hops, the node type of neighbor nodes whose communication distance with the first node is within N hops, and the neighbor nodes from the first node to N hops. At least one transmission path for each node in. There are many specific forms of the neighbor list, and this article does not limit the specific form of the neighbor list.
在一种可能的设计中,邻居数据维护帧还包括唯一标识,该唯一标识用于区分节点在不同周期广播的邻居数据维护帧。In a possible design, the neighbor data maintenance frame further includes a unique identifier, and the unique identifier is used to distinguish the neighbor data maintenance frames broadcast by the node in different periods.
具体的,第一节点会周期性地接收N-1跳范围内的邻居节点中每个节点广播的邻居维护数据帧,第一节点在接收到邻居数据维护帧之后,可以根据唯一标识,确定第一节点是否是第一次收到该邻居数据维护帧,如果不是第一次收到该邻居数据维护帧,则根据该邻居数据维护帧周期性地更新邻居列表,从而保证邻居列表中的信息能够准确地反映移动自组织网络当前的拓扑结构。Specifically, the first node will periodically receive the neighbor maintenance data frame broadcast by each of the neighbor nodes within the N-1 hop range. After receiving the neighbor data maintenance frame, the first node can determine the first node according to the unique identifier. Whether a node receives the neighbor data maintenance frame for the first time, if it is not the first time to receive the neighbor data maintenance frame, it will periodically update the neighbor list according to the neighbor data maintenance frame to ensure that the information in the neighbor list can be Accurately reflect the current topology of the mobile ad hoc network.
由于邻居列表存储有第一节点中的N跳范围内的邻居节点的地址以及节点类型,因此,第一节点可以根据目的地址查询邻居列表,如果邻居列表有该目的地址,则表示该目的节点与第一节点的通信距离在N跳范围内,从而第一节点可以确定目的节点和自身之间的通信距离小于或等于N跳。如果邻居列表没有该目的地址,则第一节点可以确定目的节点与自身之间的通信距离大于N跳。Since the neighbor list stores the addresses and node types of neighbor nodes within N hops in the first node, the first node can query the neighbor list according to the destination address. If the neighbor list has the destination address, it means that the destination node is The communication distance of the first node is within N hops, so the first node can determine that the communication distance between the destination node and itself is less than or equal to N hops. If the neighbor list does not have the destination address, the first node can determine that the communication distance between the destination node and itself is greater than N hops.
例如,请参照图3,图3为当前移动自组织网络的一种结构图,该移动组织网络中包括五个骨干节点(节点3,节点7,节点1,节点2和节点5)组成的虚拟骨干网,还包括四个普通节点(节点15,节点6,节点4和节点8)。以N取值为2为例,以第一节点为节点7为例,节点7的邻居列表可如下表1所示:For example, please refer to Figure 3. Figure 3 is a structure diagram of the current mobile ad hoc network. The mobile organization network includes five backbone nodes (node 3, node 7, node 1, node 2 and node 5). The backbone network also includes four common nodes (node 15, node 6, node 4, and node 8). Taking the value of N as 2 as an example, taking the first node as node 7 as an example, the neighbor list of node 7 can be as shown in Table 1 below:
表1Table 1
Figure PCTCN2020073325-appb-000001
Figure PCTCN2020073325-appb-000001
第一节点执行步骤202之后,如果第一节点确定目的节点和自身之间的通信距离小于或等于N跳,则执行步骤203,根据邻居列表,确定第一传输路径。After the first node performs step 202, if the first node determines that the communication distance between the destination node and itself is less than or equal to N hops, step 203 is performed to determine the first transmission path according to the neighbor list.
具体的,由于邻居列表中存储有第一节点到N跳范围内的邻居节点中每个邻居节点的至少一条传输路径,第一节点直接根据邻居列表中存储的至少一条传输路径,从而确定出从第一节点到目的节点的至少一条传输路径。关于邻居列表的内容可以参照前文论述的内容,此处不再赘述。Specifically, since the neighbor list stores at least one transmission path from the first node to each neighbor node in the N hop range, the first node directly determines the transmission path from the first node based on the at least one transmission path stored in the neighbor list. At least one transmission path from the first node to the destination node. Regarding the content of the neighbor list, please refer to the content discussed in the previous section, which will not be repeated here.
如果邻居列表中,第一节点到目的节点只有一条传输路径,那么该传输路径即为第一传输路径。如果第一节点到目的节点有多条传输路径,那么第一节点需要从多条传输路径中确定出第一传输路径。下面对确定第一传输路径的方法进行示例说明。If there is only one transmission path from the first node to the destination node in the neighbor list, then this transmission path is the first transmission path. If there are multiple transmission paths from the first node to the destination node, the first node needs to determine the first transmission path from the multiple transmission paths. The method of determining the first transmission path will be described as an example below.
第一种,确定第一传输路径的方法为:The first method is to determine the first transmission path:
随机选择多条传输路径中的一条传输路径作为第一传输路径。第一节点随机选择,第一节点无需多余计算,确定方式简单且灵活性高。One of the multiple transmission paths is randomly selected as the first transmission path. The first node is selected randomly, the first node does not need redundant calculations, and the determination method is simple and flexible.
第二种,确定第一传输路径的方法为:The second method is to determine the first transmission path:
确定多条传输路径中链路质量最高的传输路径为第一传输路径。It is determined that the transmission path with the highest link quality among the multiple transmission paths is the first transmission path.
具体的,多条传输路径的链路质量有区别,第一节点可以根据预设的算法确定出各个传输路径对应的链路质量,从而选择链路质量最高的传输路径作为第一传输路径。Specifically, the link quality of multiple transmission paths is different, and the first node may determine the link quality corresponding to each transmission path according to a preset algorithm, so as to select the transmission path with the highest link quality as the first transmission path.
本申请实施例中,选择链路质量最高的传输路径作为第一传输路径,可以保证第一数据的传输质量。In the embodiment of the present application, the transmission path with the highest link quality is selected as the first transmission path, which can ensure the transmission quality of the first data.
第三种,确定第一传输路径的方法为:The third method is to determine the first transmission path:
根据第一数据传输的优先级别,确定多条传输路径中与该第一数据传输的优先级别匹配的传输路径为第一传输路径。According to the priority level of the first data transmission, a transmission path matching the priority level of the first data transmission among the multiple transmission paths is determined to be the first transmission path.
具体的,优先级别用于表示数据传输的重要程度。如果数据的优先级别越高,则表示数据越重要。多条传输路径中每条传输路径对应的链路质量不同,优先级最高的数据可以通过链路质量高的用来传输,传输优先级别相对低的数据可以通过链路质量相对低的传输路径来传输。Specifically, the priority level is used to indicate the importance of data transmission. The higher the priority of the data, the more important the data. Each of the multiple transmission paths corresponds to a different link quality. The data with the highest priority can be transmitted through the high-quality link, and the data with relatively low transmission priority can be transmitted through the transmission path with relatively low link quality. transmission.
其中,第一数据的优先级别可以是预先携带在第一数据中的,或者由第一节点来决定的。The priority level of the first data may be pre-carried in the first data or determined by the first node.
本申请实施例中,根据数据的不同优先级别,从而确定相应的传输路径,不仅可以满足不同优先级别的数据传输的需求,还可以使得各个传输路径负载相对更加均衡。In the embodiments of the present application, determining corresponding transmission paths according to different priority levels of data can not only meet the requirements of data transmission of different priority levels, but also make the load of each transmission path relatively more balanced.
在第一节点执行步骤203之后,第一节点执行步骤204,即通过第一传输路径,传输第一数据,从而将数据传输到目的节点。After the first node performs step 203, the first node performs step 204, that is, transmits the first data through the first transmission path, thereby transmitting the data to the destination node.
应当说明的是,第一节点的节点类型无论是骨干节点还是普通节点,在传输数据过程中均可以执行上述实施例中的步骤201、步骤202、步骤203和步骤204。It should be noted that, whether the node type of the first node is a backbone node or a common node, step 201, step 202, step 203, and step 204 in the foregoing embodiment can be performed during data transmission.
在步骤202中,如果第一节点确定目的节点和自身之间的通信距离大于N跳时,第一节点的类型不同,则对应传输第一数据的方式有所不同。下面针对第一节点的节点类型不同时,传输第一数据的方式进行分别说明。In step 202, if the first node determines that the communication distance between the destination node and itself is greater than N hops, and the type of the first node is different, the corresponding transmission mode of the first data is different. When the node types of the first node are different, the method of transmitting the first data will be separately described below.
当第一节点的节点类型为骨干节点时,请参照图4,图4表示第一节点为骨干节点时的传输方法的流程图。图4中步骤401和步骤402的内容可以参照前文论述,此处不再赘述。在步骤402中,若确定第一节点确定目的节点和自身之间的通信距离大于N跳,第一节点执行步骤403,即根据路由表,确定第二传输路径。When the node type of the first node is a backbone node, please refer to FIG. 4, which shows a flowchart of a transmission method when the first node is a backbone node. The content of step 401 and step 402 in FIG. 4 can be referred to the previous discussion, and will not be repeated here. In step 402, if it is determined that the first node determines that the communication distance between the destination node and itself is greater than N hops, the first node performs step 403, that is, determines the second transmission path according to the routing table.
在执行步骤403之前,第一节点需要先建立路由表,建立路由表的方式有很多种,下面进行示例说明。Before performing step 403, the first node needs to first establish a routing table. There are many ways to establish a routing table, and examples are described below.
一种建立路由表的方式为:One way to build a routing table is:
第一节点接收其它骨干节点周期性广播的路由控制数据帧,路由控制数据帧携带其它骨干节点的地址和节点类型,以及其它骨干节点的N跳范围内的邻居节点的地址和节点类型,其它骨干节点是指移动自组织网络中除了第一节点之外的骨干节点;The first node receives routing control data frames periodically broadcast by other backbone nodes. The routing control data frames carry the addresses and node types of other backbone nodes, and the addresses and node types of neighbor nodes within the N hop range of other backbone nodes. Other backbone nodes Nodes refer to the backbone nodes other than the first node in the mobile ad hoc network;
根据路由控制数据帧,生成第一节点的路由表。According to the routing control data frame, the routing table of the first node is generated.
具体的,如前文步骤202中提到,移动自组织网络中每个节点都会发送相应的邻居维护数据帧,以及建立自身的邻居列表。每个骨干节点可以根据邻居列表生成路由控制数据帧,或者每个骨干节点可以根据其它节点发送的邻居维护数据帧,直接生成路由控制数据帧。Specifically, as mentioned in step 202 above, each node in the mobile ad hoc network will send a corresponding neighbor maintenance data frame and establish its own neighbor list. Each backbone node can generate routing control data frames according to the neighbor list, or each backbone node can directly generate routing control data frames according to neighbor maintenance data frames sent by other nodes.
其中,每个路由控制数据帧用于表示每个骨干节点的当前的局域拓扑结构,具体包括该节点的地址和节点类型,以及该节点的N跳范围内的邻居节点的地址和节点类型。路由控制数据帧的封装格式有很多种,请参照表2,表2为一种路由控制数据帧的封装格式的示例。Among them, each routing control data frame is used to represent the current local topology structure of each backbone node, specifically including the address and node type of the node, and the addresses and node types of neighboring nodes within the N hop range of the node. There are many encapsulation formats for routing control data frames. Please refer to Table 2. Table 2 is an example of an encapsulation format for routing control data frames.
表2Table 2
Figure PCTCN2020073325-appb-000002
Figure PCTCN2020073325-appb-000002
请参照表2,该路由控制数据帧包括服务类型、数据报长度、标志和片偏移、目的地址、源地址、包头校验和、TTL、路由控制数据标识、转发节点地址、邻居列表长度、普通节点邻居列表。Please refer to Table 2. The routing control data frame includes service type, datagram length, flag and chip offset, destination address, source address, header checksum, TTL, routing control data identification, forwarding node address, neighbor list length, The neighbor list of common nodes.
其中,服务类型用于表示不同服务类型的数据。服务类型一般长度为8比特,8比特中的前两位比特用于表示数据来源,8比特中的后六比特用于区分同一节点发送的同一服务类型的不同数据。例如,前两位比特为11,则表示该数据来源与路由选择数据。Among them, the service type is used to represent data of different service types. The service type generally has a length of 8 bits. The first two bits of the 8 bits are used to indicate the source of the data, and the last six bits of the 8 bits are used to distinguish different data of the same service type sent by the same node. For example, if the first two bits are 11, it indicates the data source and routing data.
数据报长度用于表示该路由控制数据帧的总长度,一般长度为8比特,长度单位可以为双字节(4bytes),长度范围为2~256,全0表示256。标志和片偏移,用于表示路由控制数据帧的分片标志,一般长度为8比特,路由控制数据帧不分片,因此该字段固定为00000000。The datagram length is used to indicate the total length of the routing control data frame, generally the length is 8 bits, the length unit can be double bytes (4bytes), the length range is 2 to 256, and all 0s represent 256. The flag and the fragment offset are used to indicate the fragmentation flag of the routing control data frame. Generally, the length is 8 bits. The routing control data frame is not fragmented, so the field is fixed to 00000000.
目的地址,用于表示路由控制数据帧发送的目的地址,由于路由控制数据帧在虚拟骨干网中广播,所以路由控制数据帧的目的地址固定为11111111。源地址,用于表示发送该路由控制数据帧的节点地址,一般长度为8比特。包头校验和,用于对路由控制帧的包头进行校验,一般长度为8比特。The destination address is used to indicate the destination address of the routing control data frame. Since the routing control data frame is broadcast in the virtual backbone network, the destination address of the routing control data frame is fixed to 11111111. The source address is used to indicate the address of the node sending the routing control data frame, and is generally 8 bits in length. The header checksum is used to check the header of the routing control frame, and the length is generally 8 bits.
TTL,用于表示路由控制数据帧的生存周期,一般长度为4比特。标识,由发送路由控制数据帧的节点确定,用于区分该骨干节点发送的不同的路由控制数据,一般长度为4比特。转发节点地址,用于表示最新的转发节点的地址,一般长度为8比特。邻居列表长度,用于表示该骨干节点的普通节点邻居列表中邻居节点的数量,一般长度为8比特。普通节点邻居地址列表,是指第一节点的N跳范围内的普通节点的地址列表。TTL, used to indicate the life cycle of routing control data frames, generally 4 bits in length. The identifier is determined by the node that sends the routing control data frame, and is used to distinguish different routing control data sent by the backbone node. The general length is 4 bits. The forwarding node address is used to indicate the address of the latest forwarding node, and the general length is 8 bits. The length of the neighbor list is used to indicate the number of neighbor nodes in the common node neighbor list of the backbone node, and the general length is 8 bits. The ordinary node neighbor address list refers to the address list of ordinary nodes within the N hop range of the first node.
在每个骨干节点生成路由控制数据帧之后,移动自组织网络中每个骨干节点广播路由控制数据帧之后,第一节点可以接收到其它骨干节点发送的路由控制数据帧。After each backbone node generates the routing control data frame, after each backbone node in the mobile ad hoc network broadcasts the routing control data frame, the first node can receive the routing control data frame sent by other backbone nodes.
第一节点在接收到其它骨干节点发送端的路由控制数据帧,可以直接建立路由表。或者,第一节点接收路由控制数据帧之后,可以先确定是否是第一次收到该骨干节点发送的路由控制数据帧。The first node can directly establish a routing table after receiving the routing control data frame from the sender of other backbone nodes. Alternatively, after receiving the routing control data frame, the first node may first determine whether it is the first time that it has received the routing control data frame sent by the backbone node.
第一节点可以根据路由控制数据帧中的服务类型、源地址以及标识,确定是否是第一次收到该路由控制数据帧。如果第一节点是第一次收到该路由控制数据帧,就可以根据该路由控制数据帧,建立第一节点到该骨干节点的一条传输路径,以及建立第一节点到该骨 干节点的N跳范围内的邻居节点中每个节点的一条传输路径,依次类推,当第一节点建立了与其它所有节点的传输路径时,从而获得第一节点的路由表。The first node may determine whether the routing control data frame is received for the first time according to the service type, source address, and identification in the routing control data frame. If the first node receives the routing control data frame for the first time, it can establish a transmission path from the first node to the backbone node according to the routing control data frame, and establish an N hop from the first node to the backbone node A transmission path of each node in the neighboring nodes in the range, and so on, when the first node establishes a transmission path with all other nodes, the routing table of the first node is obtained.
如果第一节点不是第一次收到该路由控制数据帧,判断当前的路由数据帧的TTL是否大于1。如果TTL等于1,则不对当前的路由控制数据帧进行处理。如果当前的路由控制数据帧的TTL大于1,则比较当前的路由控制数据帧与上一个路由控制数据帧的TTL的大小。上一个路由控制数据帧是指与当前路由控制数据帧的源地址相同、服务类型相同且标识不同的数据帧。If it is not the first time that the first node receives the routing control data frame, it is determined whether the TTL of the current routing data frame is greater than 1. If the TTL is equal to 1, then the current routing control data frame is not processed. If the TTL of the current routing control data frame is greater than 1, compare the TTL of the current routing control data frame with the previous routing control data frame. The last routing control data frame refers to a data frame that has the same source address, the same service type, and a different identifier as the current routing control data frame.
如果上一个路由控制数据帧的生存周期TTL小于路由控制数据帧的TTL,那么表示当前传输链路从源地址到第一节点所经过的网段数更少,则表示当前的路由控制数据帧所指示的传输链路相对经过的跳数更少,从而根据当前的路由控制数据帧,更新第一节点到其它节点的一条传输路径,获得更新后的第一节点的路由表。If the TTL of the last routing control data frame is less than the TTL of the routing control data frame, it means that the current transmission link has fewer network segments from the source address to the first node, which means that the current routing control data frame indicates Relatively fewer hops pass through the transmission link, so according to the current routing control data frame, a transmission path from the first node to other nodes is updated to obtain the updated routing table of the first node.
本申请实施例中,选择性地更新路由表,可以保证当前的路由表中各个传输链路的可靠性。In the embodiment of the present application, selectively updating the routing table can ensure the reliability of each transmission link in the current routing table.
在本申请实施例中,为了便于其它骨干节点建立或更新路由表,第一节点在更新路由表的同时,第一节点还会修改还控制数据帧的TTL、转发节点地址并继续转发该路由控制数据帧。如果第一节点没有1跳的普通节点,则无需转发该路由控制数据。In the embodiment of the present application, in order to facilitate other backbone nodes to establish or update the routing table, while the first node updates the routing table, the first node also modifies and controls the TTL of the data frame, the forwarding node address, and continues to forward the routing control Data Frame. If the first node does not have a 1-hop ordinary node, there is no need to forward the routing control data.
例如,请继续参照图3,图3中节点7的路由表如下表3所示:For example, please continue to refer to Figure 3. The routing table of node 7 in Figure 3 is shown in Table 3 below:
表3table 3
传输路径(目的节点:节点7的下一跳)Transmission path (destination node: next hop of node 7)
15:1515:15
2:32:3
3:33:3
4:34:3
5:35:3
6:66:6
1:31:3
8:38:3
本申请实施例中,第一节点周期性地更新邻居列表和路由表,且邻居列表的更新周期小于路由表的更新周期。In the embodiment of the present application, the first node periodically updates the neighbor list and the routing table, and the update period of the neighbor list is less than the update period of the routing table.
第一节点更新邻居列表的更新周期小于路由表的更新周期,当移动自组织网络的拓扑结构发生变化时,邻居列表的更新为更新路由表提供了缓冲时间。且,即使路由表还未及时更新,第一节点可以依赖邻居列表进行数据传输,保证了数据传输的可靠性。The update period of the first node to update the neighbor list is less than the update period of the routing table. When the topology of the mobile ad hoc network changes, the update of the neighbor list provides buffer time for updating the routing table. Moreover, even if the routing table has not been updated in time, the first node can rely on the neighbor list for data transmission, ensuring the reliability of data transmission.
例如,请继续参照图3,当第一节点为骨干节点,且为图3中的节点7时,按照上述表2的格式封装,获得的节点7发送的路由控制数据帧如下表4所示。For example, please continue to refer to Fig. 3, when the first node is the backbone node and is the node 7 in Fig. 3, encapsulate according to the format of Table 2 above, and the obtained routing control data frame sent by node 7 is shown in Table 4 below.
表4Table 4
Figure PCTCN2020073325-appb-000003
Figure PCTCN2020073325-appb-000003
节点7将该路由控制数据帧经过2跳之后,发送到节点3,节点3再发送到节点1,节点1收到的该路由控制数据帧如下表5所示。Node 7 sends the routing control data frame to node 3 after 2 hops, and node 3 sends it to node 1. The routing control data frame received by node 1 is shown in Table 5 below.
表5table 5
Figure PCTCN2020073325-appb-000004
Figure PCTCN2020073325-appb-000004
可以看到,节点1收到的路由控制数据帧相较于节点7发送的路由数据帧,TTL在减小,且转发节点地址发生变化。It can be seen that the TTL of the routing control data frame received by node 1 is decreasing compared to the routing data frame sent by node 7, and the forwarding node address has changed.
从而节点1可以根据接收到表5中的路由控制数据帧,建立到节点7,节点15,节点6的传输路径,并转发该路由控制数据帧。Therefore, the node 1 can establish a transmission path to the node 7, the node 15, and the node 6 according to the routing control data frame in the table 5, and forward the routing control data frame.
节点1转发的路由控制数据帧被节点5接收,节点5接收的控制数据帧具体如下表6所示。The routing control data frame forwarded by node 1 is received by node 5, and the control data frame received by node 5 is specifically shown in Table 6 below.
表6Table 6
Figure PCTCN2020073325-appb-000005
Figure PCTCN2020073325-appb-000005
节点5接收到表6所示的路由控制数据帧,继续转发该路由控制数据帧。如果节点1又收到节点5发送的表6所示的路由控制数据帧,节点1判断该标识为0100的路由数据帧已处理过,且该表6所示的路由控制数据帧的TTL小于上一个路由控制数据帧(也就是表5所示的路由控制数据帧),则节点1不再对接收到的当前路由控制数据帧进行任何处理。Node 5 receives the routing control data frame shown in Table 6, and continues to forward the routing control data frame. If node 1 receives the routing control data frame shown in Table 6 sent by node 5, node 1 determines that the routing data frame with the identifier 0100 has been processed, and the TTL of the routing control data frame shown in Table 6 is less than the above For a routing control data frame (that is, the routing control data frame shown in Table 5), node 1 no longer performs any processing on the current routing control data frame received.
在第一节点建立路由表之后,由于路由表中存储了第一节点到其它节点中每个节点的一条传输路径,因此,第一节点可以根据路由表以及目的地址,从路由表中确定出第二传输路径。After the first node establishes the routing table, since a transmission path from the first node to each of the other nodes is stored in the routing table, the first node can determine the first node from the routing table according to the routing table and the destination address. 2. Transmission path.
其中,第二传输路径包括第二节点的地址,第二传输路径是从路由表中选择的一条传输路径。该第二节点的地址为第二传输路径中所指示的第一节点的下一跳。Wherein, the second transmission path includes the address of the second node, and the second transmission path is a transmission path selected from the routing table. The address of the second node is the next hop of the first node indicated in the second transmission path.
在第一节点执行步骤403之后,可以直接通过第二传输路径,传输第一数据。After step 403 is performed by the first node, the first data can be transmitted directly through the second transmission path.
具体的,第一节点将第一数据发送给第一节点的下一跳节点,下一跳节点再继续传输,直到将该第一数据传输到目的地址。Specifically, the first node sends the first data to the next-hop node of the first node, and the next-hop node continues transmission until the first data is transmitted to the destination address.
但是,在第一节点确定第二传输路径时,第一节点无法确定当前的移动自组织网络中的拓扑结构是否发生变化。因此,请继续参照图4,本申请实施例中,第一节点在执行步骤403之后,可以执行步骤404,即根据第二节点的地址,确定第二节点在邻居列表中,是否为第一节点的下一跳。However, when the first node determines the second transmission path, the first node cannot determine whether the topology of the current mobile ad hoc network has changed. Therefore, please continue to refer to Figure 4, in this embodiment of the application, the first node may perform step 404 after performing step 403, that is, according to the address of the second node, determine whether the second node is in the neighbor list and is the first node Next hop.
具体的,在路由表中,第二节点是第一节点的下一跳,但是可能移动自组织网络中的拓扑结构发生变化,第一节点更新邻居列表。因此,第二节点可能在邻居列表并不一定还是第一节点的下一跳。Specifically, in the routing table, the second node is the next hop of the first node, but the topology of the mobile ad hoc network may change, and the first node updates the neighbor list. Therefore, the second node may not necessarily be the next hop of the first node in the neighbor list.
如果第一节点根据邻居列表确定第二节点在邻居列表中,依旧为第一节点的下一跳,则第一节点执行步骤405,即根据第二传输路径,传输第一数据。If the first node determines from the neighbor list that the second node is in the neighbor list and is still the next hop of the first node, the first node executes step 405, that is, transmits the first data according to the second transmission path.
具体的,当第一节点确定第二节点在邻居列表中,依旧为第一节点的下一跳,则表示第一节点的拓扑结构暂时没有发生变化,因此,第一节点直接将第一数据通过第二传输路径传输给第二节点即可。Specifically, when the first node determines that the second node is in the neighbor list and is still the next hop of the first node, it means that the topology of the first node has not changed temporarily. Therefore, the first node directly passes the first data through The second transmission path can be transmitted to the second node.
如果第一节点根据邻居列表确定第二节点在邻居列表中,不是第一节点的下一跳,则第一节点执行步骤406,即确定第二节点是否为第一节点N跳范围内的邻居节点。If the first node determines from the neighbor list that the second node is in the neighbor list and is not the next hop of the first node, the first node performs step 406, that is, determines whether the second node is a neighbor node within N hops of the first node .
具体的,当第一节点确定在邻居列表中,第二节点已不是第一节点的下一跳,则表示第一节点的拓扑结构可能已发生变化,因此,第一节点还需进一步根据邻居列表确定第二节点是否为第一节点的N跳范围内的邻居节点,也就是说,第一节点还需根据邻居列表确定第二节点与第一节点的通信距离是否小于或等于N跳。Specifically, when the first node determines that it is in the neighbor list, and the second node is no longer the next hop of the first node, it means that the topology of the first node may have changed. Therefore, the first node needs to be further based on the neighbor list. It is determined whether the second node is a neighbor node within the N hop range of the first node, that is, the first node also needs to determine whether the communication distance between the second node and the first node is less than or equal to N hops according to the neighbor list.
第一节点可以根据第二节点的地址,查询邻居列表,如果邻居列表中有第二节点的地址,则表示第二节点为第一节点的N跳范围内的邻居节点。如果邻居列表中没有第二节点的地址,则表示第二节点不是第一节点的N跳范围内的邻居节点。The first node can query the neighbor list according to the address of the second node. If the address of the second node is in the neighbor list, it means that the second node is a neighbor node within the N hop range of the first node. If there is no address of the second node in the neighbor list, it means that the second node is not a neighbor node within the N hop range of the first node.
在步骤406中,如果第一节点确定第二节点是第一节点N跳范围内的邻居节点,则第一节点执行步骤407,即根据邻居列表,确定第三传输路径,第三传输路径是指从第一节点到第二节点所经过的节点的地址。In step 406, if the first node determines that the second node is a neighbor node within the N hop range of the first node, the first node executes step 407, that is, determines the third transmission path according to the neighbor list. The third transmission path refers to The address of the node passed from the first node to the second node.
具体的,如果第二节点在第一节点的N跳范围内,那么第一节点直接根据邻居列表选择一条传输路径,作为第三传输路径。当然,邻居列表中,第一节点到第二节点可能有多条传输路径,第一节点从多条传输路径中确定第三传输路径的方式可以参照前文步骤203中论述的从多条传输路径中确定第一传输路径的内容,此处不再赘述。Specifically, if the second node is within the N hop range of the first node, the first node directly selects a transmission path according to the neighbor list as the third transmission path. Of course, in the neighbor list, there may be multiple transmission paths from the first node to the second node, and the method for determining the third transmission path from the multiple transmission paths by the first node can refer to the selection from multiple transmission paths discussed in step 203 above. Determine the content of the first transmission path, which will not be repeated here.
第一节点执行步骤407之后,执行步骤408,即通过第三传输路径,传输第一数据。After the first node performs step 407, step 408 is performed, that is, the first data is transmitted through the third transmission path.
具体的,第一节点确定第三传输路径之后,通过第三传输路径将第一数据传输给第二节点。Specifically, after determining the third transmission path, the first node transmits the first data to the second node through the third transmission path.
在步骤406中,如果第一节点确定第二节点不是第一节点N跳范围内的邻居节点,则执行步骤409,即根据邻居列表,确定第四传输路径。In step 406, if the first node determines that the second node is not a neighbor node within the N hop range of the first node, step 409 is executed, that is, the fourth transmission path is determined according to the neighbor list.
其中,第四传输路径是指将第一数据从所述第一节点传输到第三节点所经过的节点的地址,第三节点为所述第一节点的N跳范围内的一个骨干节点。The fourth transmission path refers to the address of the node through which the first data is transmitted from the first node to the third node, and the third node is a backbone node within the N hop range of the first node.
具体的,第一节点确定第二节点不是第一节点N跳范围内的邻居节点,那么第一节点就根据邻居列表,查找第一节点的N跳范围内的一个骨干节点,也就是确定第三节点,从而确定出第四传输路径。Specifically, the first node determines that the second node is not a neighbor node within the N hop range of the first node, then the first node searches for a backbone node within the N hop range of the first node according to the neighbor list, that is, determines the third node Node, thereby determining the fourth transmission path.
由于与第一节点的通信距离在N跳范围内的骨干节点可能不止一个,因此,第一节点需要从多个骨干节点中选择一个骨干节点作为第三节点。其具体实现方式包括但不限于以下几种,下面分别进行介绍。Since there may be more than one backbone node whose communication distance with the first node is within N hops, the first node needs to select one backbone node from the multiple backbone nodes as the third node. The specific implementation methods include but are not limited to the following, which will be introduced separately below.
第一种:The first:
从与第一节点的N跳范围内的骨干节点中,随机选择一个骨干节点,作为第三节点。From the backbone nodes within the N hop range from the first node, a backbone node is randomly selected as the third node.
具体的,与第一节点的通信距离小于或等于N跳的骨干节点可能有多个,第一节点随机选择其中的一个骨干节点作为第三节点。该方式确定第三节点的方式简单,灵活。Specifically, there may be multiple backbone nodes whose communication distance with the first node is less than or equal to N hops, and the first node randomly selects one of the backbone nodes as the third node. The way to determine the third node is simple and flexible.
第二种:The second type:
根据支配因子,确定出第三节点。According to the dominance factor, the third node is determined.
具体的,从与第一节点的N跳范围内的骨干节点中,确定支配因子最大的骨干节点为第三节点。或者为了简化第一节点的处理量,从与第一节点的1跳范围内的骨干节点中,确定支配因子最大的骨干节点为第三节点。Specifically, from the backbone nodes within N hops from the first node, the backbone node with the largest dominance factor is determined to be the third node. Or in order to simplify the processing amount of the first node, from the backbone nodes within 1 hop range from the first node, determine that the backbone node with the largest dominance factor is the third node.
其中,支配因子用于表征传输链路质量。支配因子例如选取用于表示节点特征的指标,例如ID、节点剩余能量、移动速度。支配因子例如选取用于表示网络特性的指标,例如节点的连通度、节点的覆盖范围、节点的种类等。Among them, the dominant factor is used to characterize the quality of the transmission link. For example, the dominance factor selects an index used to represent the characteristics of the node, such as ID, node remaining energy, and moving speed. The dominance factor, for example, selects indicators used to represent network characteristics, such as the connectivity of the node, the coverage of the node, and the type of the node.
在第一节点执行步骤409之后,第一节点就执行步骤410,即通过第四传输路径,传 输第一数据。After the first node performs step 409, the first node performs step 410, that is, transmits the first data through the fourth transmission path.
具体的,第一节点通过第四传输路径,将第一数据传输给第三节点。第三节点继续传播,直到传输到目的地址。Specifically, the first node transmits the first data to the third node through the fourth transmission path. The third node continues to propagate until it reaches the destination address.
下面对图4中所述的传输数据的方法进行举例说明,请参照图5,图5表示图3所示的移动自组织网络更新后的结构图,且N取值为2。相较于图3,图6中的节点7的位置发生了变化,节点7断开了与节点3之间的连接断开。The following is an example of the data transmission method described in FIG. 4. Please refer to FIG. 5. FIG. 5 shows the updated structure of the mobile ad hoc network shown in FIG. 3, and the value of N is 2. Compared with FIG. 3, the position of node 7 in FIG. 6 has changed, and the connection between node 7 and node 3 is disconnected.
此时,路由表还未及时更新(依旧为表3所示的路由表),节点7的邻居列表已经更新,更新后的节点7的邻居列表如下:At this time, the routing table has not been updated in time (it is still the routing table shown in Table 3), and the neighbor list of node 7 has been updated. The updated neighbor list of node 7 is as follows:
表7Table 7
Figure PCTCN2020073325-appb-000006
Figure PCTCN2020073325-appb-000006
此时,如果节点7要将第一数据发送给节点3,则节点7先确定节点3是否是自身的2跳邻居节点,确定节点3是自身的2跳邻居节点。节点7查询邻居列表,确定节点7到节点3的传输路径为7-15-3,或7-6-15-3,因此节点7可以随意选择一条传输路径,将第一数据传输给节点3。At this time, if node 7 wants to send the first data to node 3, node 7 first determines whether node 3 is its own 2-hop neighbor node, and determines that node 3 is its own 2-hop neighbor node. Node 7 queries the neighbor list and determines that the transmission path from node 7 to node 3 is 7-15-3 or 7-6-15-3. Therefore, node 7 can choose a transmission path at will and transmit the first data to node 3.
请继续参照图5,如果节点7要将第一数据发送给节点1,节点7确定节点1不是自身的两跳范围内的邻居节点,则查找路由表(如表3),确定传输给节点1的下一跳为节点3。Please continue to refer to Figure 5, if node 7 wants to send the first data to node 1, and node 7 determines that node 1 is not a neighbor node within its two-hop range, it looks up the routing table (such as Table 3) and determines to transmit it to node 1. The next hop is node 3.
节点7再查询邻居列表(表7所示)确定节点3不是节点7的下一跳,因此节点7确定节点3是节点7的2跳内的邻居节点。因此,节点7选择邻居列表中“3:3,3:6,3:15”任意一条传输路径,例如节点7选择“3:15”,节点7将第一数据发送给节点15,再由节点15将第一数据发送节点3,最后由节点3将第一数据发送给节点1,从而完成传输过程。Node 7 then queries the neighbor list (shown in Table 7) to determine that node 3 is not the next hop of node 7, so node 7 determines that node 3 is a neighbor node within 2 hops of node 7. Therefore, node 7 selects any transmission path "3:3, 3:6, 3:15" in the neighbor list, for example, node 7 selects "3:15", node 7 sends the first data to node 15, and then node 15 Send the first data to node 3, and finally node 3 sends the first data to node 1, thereby completing the transmission process.
当第一节点的节点类型为普通节点时,请参照图6,图6中步骤601和步骤602的内容可以参照前文论述,此处不再赘述。在步骤602中,当第一节点确定目的节点和自身之间的通信距离大于N跳时,第一节点执行步骤603,即根据邻居列表,确定第五传输路径。When the node type of the first node is a normal node, please refer to FIG. 6. The content of step 601 and step 602 in FIG. 6 can be referred to the previous discussion, and will not be repeated here. In step 602, when the first node determines that the communication distance between the destination node and itself is greater than N hops, the first node executes step 603, that is, determines the fifth transmission path according to the neighbor list.
具体的,当确定第一节点和目的节点之间的通信距离大于N跳的时候,由于邻居列表中并没有存储第一节点与超过N跳的节点之间的传输路径,因此,第一节点根据邻居列表,确定出第五传输路径,第五传输路径是第一节点到第四节点所经过的节点的地址。Specifically, when it is determined that the communication distance between the first node and the destination node is greater than N hops, since the neighbor list does not store the transmission path between the first node and the node exceeding N hops, the first node is based on The neighbor list determines the fifth transmission path, and the fifth transmission path is the address of the node through which the first node to the fourth node pass.
其中,第四节点是与第一节点的通信距离在N跳范围内的一个骨干节点。Among them, the fourth node is a backbone node whose communication distance with the first node is within N hops.
由于与第一节点的通信距离在N跳范围内的骨干节点可能不止一个,因此,第一节点需要从多个骨干节点中选择一个骨干节点作为第四节点。其具体实现方式可以参照前文步骤409中论述确定第三节点的内容,此处不再赘述。Since there may be more than one backbone node whose communication distance with the first node is within N hops, the first node needs to select one backbone node from the multiple backbone nodes as the fourth node. For its specific implementation, refer to the discussion in step 409 above to determine the content of the third node, which will not be repeated here.
在确定出第四节点之后,邻居列表中第一节点到第四节点的传输路径可能不止一条,因此,还需要从多条传输路径中选择出第三传输路径,确定第三传输路径的方式可以参照前文论述的确定第一传输路径的内容,此处不再赘述。After the fourth node is determined, there may be more than one transmission path from the first node to the fourth node in the neighbor list. Therefore, the third transmission path needs to be selected from multiple transmission paths. The way to determine the third transmission path can be Refer to the content of determining the first transmission path discussed above, which will not be repeated here.
在第一节点执行步骤603之后,第一节点可以执行步骤604,即通过第五传输路径, 传输第一数据。After the first node performs step 603, the first node may perform step 604, that is, transmit the first data through the fifth transmission path.
具体的,第一节点通过确定的第五传输路径,将第一数据传输给第四节点。Specifically, the first node transmits the first data to the fourth node through the determined fifth transmission path.
下面对图6中所述的数据传输的方法进行示例说明,请参照图7,图7表示图3所示的移动自组织网络更新后的结构图,且N取值为2。相较于图3,图7中的节点15的位置发生了变化,节点15断开了与节点3和节点7之间断开了连接。The following is an example of the data transmission method described in FIG. 6, please refer to FIG. 7. FIG. 7 shows the updated structure of the mobile ad hoc network shown in FIG. 3, and the value of N is 2. Compared with FIG. 3, the position of the node 15 in FIG. 7 has changed, and the node 15 is disconnected from the node 3 and the node 7.
但是此时,路由表可能没有及时更新,如果节点15要将第一数据发送给节点8,则先确定节点8是否是自身的2跳邻居节点,节点15确定节点8不是自身的两跳邻居节点,则确定2跳范围内的骨干节点。节点15发现节点7为2跳范围内的邻居节点,因此,节点15将第一数据通过节点6发送给节点7。But at this time, the routing table may not be updated in time. If node 15 wants to send the first data to node 8, it first determines whether node 8 is its own 2-hop neighbor node, and node 15 determines that node 8 is not its own 2-hop neighbor node. , Then determine the backbone node within the 2-hop range. The node 15 finds that the node 7 is a neighbor node within a 2-hop range. Therefore, the node 15 sends the first data to the node 7 through the node 6.
在前文论述的一种传输数据的方法的基础上,提供一种传输数据的装置,装置作为移动自组织网络的第一节点,请参照图8,装置包括:On the basis of the method for transmitting data discussed above, a device for transmitting data is provided. The device serves as the first node of a mobile ad hoc network. Please refer to FIG. 8. The device includes:
存储器801,用于存储指令;The memory 801 is used to store instructions;
处理器802,用于读取存储器801中的指令,执行下列过程:The processor 802 is configured to read instructions in the memory 801 and execute the following process:
接收第一数据,第一数据携带目的地址;Receiving the first data, the first data carrying the destination address;
用于确定目的节点与第一节点之间的通信距离是否小于或等于N跳,N为大于或等于1且小于移动自组织网络的最大跳数的正整数,目的节点为目的地址所对应的节点;Used to determine whether the communication distance between the destination node and the first node is less than or equal to N hops, where N is a positive integer greater than or equal to 1 and less than the maximum number of hops in the mobile ad hoc network, and the destination node is the node corresponding to the destination address ;
若确定目的节点与第一节点之间的通信距离小于或等于N跳,则根据邻居列表,确定第一传输路径;其中,邻居列表包括与第一节点通信距离在N跳范围内的邻居节点的地址、与第一节点通信距离在N跳范围内的邻居节点的节点类型,以及第一节点到N跳范围内的邻居节点中每个节点的至少一条传输路径,第一传输路径包括从第一节点到目的节点所经过的节点的地址;If it is determined that the communication distance between the destination node and the first node is less than or equal to N hops, the first transmission path is determined according to the neighbor list; wherein, the neighbor list includes the neighbor nodes whose communication distance with the first node is within N hops. The address, the node type of the neighbor node whose communication distance with the first node is within N hops, and at least one transmission path from the first node to each of the neighbor nodes within the N hop range. The first transmission path includes The address of the node that the node passes through to the destination node;
收发机803,用于在处理器802的控制下收发信息。The transceiver 803 is configured to send and receive information under the control of the processor 802.
在一种可能的设计中,当第一节点的节点类型为骨干节点时,处理器802还用于:In a possible design, when the node type of the first node is a backbone node, the processor 802 is further configured to:
若确定目的节点与第一节点之间的通信距离大于N跳,则根据路由表,获得第二传输路径;其中,路由表包括第一节点到其它节点中每个节点的一条传输路径,第二传输路径包括第二节点的地址,第二节点为第二传输路径中所指示的第一节点的下一跳,其它节点是指移动自组织网络中除了第一节点之外的节点;If it is determined that the communication distance between the destination node and the first node is greater than N hops, the second transmission path is obtained according to the routing table; wherein, the routing table includes a transmission path from the first node to each of the other nodes, and the second The transmission path includes the address of the second node, the second node is the next hop of the first node indicated in the second transmission path, and other nodes refer to nodes other than the first node in the mobile ad hoc network;
处理器802,还用于根据第二节点的地址,确定在邻居列表中,第二节点是否为第一节点的下一跳;The processor 802 is further configured to determine whether the second node is the next hop of the first node in the neighbor list according to the address of the second node;
若确定在邻居列表中,第二节点为第一节点的下一跳,则根据第二传输路径,传输第一数据。If it is determined that the second node is the next hop of the first node in the neighbor list, the first data is transmitted according to the second transmission path.
在一种可能的设计中,处理器802还用于:In one possible design, the processor 802 is also used to:
若确定在邻居列表中,第二节点不是第一节点的下一跳,且为第一节点的N跳范围内的邻居节点,则根据邻居列表,确定第三传输路径;其中,第三传输路径包括从第一节点传输到第二节点所经过的节点的地址;If it is determined that in the neighbor list, the second node is not the next hop of the first node, and is a neighbor node within N hops of the first node, then the third transmission path is determined according to the neighbor list; where, the third transmission path Including the addresses of nodes transmitted from the first node to the second node;
通过第三传输路径,传输第一数据。The first data is transmitted through the third transmission path.
在一种可能的设计中,处理器802还用于:In one possible design, the processor 802 is also used to:
若确定在邻居列表中,第二节点不是第一节点的N跳范围内的邻居节点,则根据邻居列表,确定第四传输路径;其中,第四传输路径包括从第一节点到第三节点所经过的节点的地址,第三节点为第一节点的N跳范围内的一个骨干节点;If it is determined that the second node is not a neighbor node within N hops of the first node in the neighbor list, then the fourth transmission path is determined according to the neighbor list; wherein, the fourth transmission path includes the path from the first node to the third node. The address of the passing node, the third node is a backbone node within the N hop range of the first node;
通过第四传输路径,传输第一数据。Through the fourth transmission path, the first data is transmitted.
在一种可能的设计中,当第一节点的节点类型为普通节点时,普通节点是指移动自组织网络中除了骨干节点之外的节点,处理器802还用于:In a possible design, when the node type of the first node is a normal node, the normal node refers to a node other than the backbone node in the mobile ad hoc network, and the processor 802 is also used for:
若确定目的节点与第一节点之间的通信距离大于N跳,则根据邻居列表,确定第五传输路径;其中,第五传输路径包括从第一节点到第四节点所经过的节点的地址,第四节点为与第一节点的通信距离在N跳范围内的邻居节点中的一个骨干节点;If it is determined that the communication distance between the destination node and the first node is greater than N hops, the fifth transmission path is determined according to the neighbor list; wherein, the fifth transmission path includes the address of the node passing through from the first node to the fourth node, The fourth node is a backbone node among neighbor nodes whose communication distance with the first node is within N hops;
通过第五传输路径,传输第一数据。The first data is transmitted through the fifth transmission path.
在一种可能的设计中,第四节点为第一节点的N跳邻居节点中支配因子最大的骨干节点,支配因子用于表征第一节点到第四节点的传输链路质量。In a possible design, the fourth node is the backbone node with the largest dominance factor among the N-hop neighbor nodes of the first node, and the dominance factor is used to characterize the quality of the transmission link from the first node to the fourth node.
在一种可能的设计中,处理器802还用于:In one possible design, the processor 802 is also used to:
接收第一节点的N-1跳范围内的邻居节点中每个节点广播的邻居维护数据帧,邻居维护数据帧携带每个节点的节点类型、以及每个节点的至少1跳范围内的邻居节点的地址和节点类型;Receive the neighbor maintenance data frame broadcast by each node in the neighbor nodes within the N-1 hop range of the first node. The neighbor maintenance data frame carries the node type of each node and the neighbor nodes within at least 1 hop of each node Address and node type;
根据邻居维护数据帧,生成第一节点的邻居列表。According to the neighbor maintenance data frame, the neighbor list of the first node is generated.
在一种可能的设计中,当第一节点的节点类型为骨干节点时,处理器802还用于:In a possible design, when the node type of the first node is a backbone node, the processor 802 is further configured to:
接收其它骨干节点周期性广播的路由控制数据帧,路由控制数据帧携带其它骨干节点的地址和节点类型,以及其它骨干节点的N跳范围内的邻居节点的地址和节点类型,其它骨干节点是指移动自组织网络中除了第一节点之外的骨干节点;Receive routing control data frames periodically broadcast by other backbone nodes. The routing control data frames carry the addresses and node types of other backbone nodes, as well as the addresses and node types of neighbor nodes within the N-hop range of other backbone nodes. Other backbone nodes refer to The backbone nodes other than the first node in the mobile ad hoc network;
根据路由控制数据帧,生成第一节点的路由表。According to the routing control data frame, the routing table of the first node is generated.
在一种可能的设计中,处理器802具体用于:In a possible design, the processor 802 is specifically used to:
若确定第一节点是第一次收到路由控制数据帧,则根据路由控制数据帧,建立第一节点到其它节点中每个节点的一条传输路径,从而获得第一节点的路由表。If it is determined that the first node has received the routing control data frame for the first time, a transmission path from the first node to each of the other nodes is established according to the routing control data frame, thereby obtaining the routing table of the first node.
在一种可能的设计中,处理器802还用于:In one possible design, the processor 802 is also used to:
在生成第一节点的路由表之后,若确定第一节点不是第一次收到路由控制数据帧,则确定上一个路由控制数据帧的生存周期TTL是否大于路由控制数据帧的TTL;After generating the routing table of the first node, if it is determined that the first node is not receiving the routing control data frame for the first time, it is determined whether the lifetime TTL of the previous routing control data frame is greater than the TTL of the routing control data frame;
若上一个路由控制数据帧的生存周期TTL小于路由控制数据帧的TTL,则根据控制数据帧,更新第一节点到其它节点的一条传输路径,获得更新后的第一节点的路由表。If the lifetime TTL of the last routing control data frame is less than the TTL of the routing control data frame, then a transmission path from the first node to other nodes is updated according to the control data frame to obtain the updated routing table of the first node.
作为一种实施例,图8中的收发机803和存储器801可以耦合至处理器802。As an embodiment, the transceiver 803 and the memory 801 in FIG. 8 may be coupled to the processor 802.
应当说明的是,图8中是以一个处理器802为例,但是实际上不限制处理器802的数量。It should be noted that, in FIG. 8, one processor 802 is taken as an example, but the number of processors 802 is actually not limited.
其中,处理器802可以是中央处理器(central processing unit,CPU),或特定应用集成电路(application-specific integrated circuit,ASIC),可以是一个或多个用于控制程序执行的集成电路,可以是基带芯片等。The processor 802 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), and may be one or more integrated circuits for controlling program execution, and may be Baseband chips, etc.
在前文论述的一种传输数据的方法的基础上,本申请实施例提供一种传输数据的装置,装置作为移动自组织网络的第一节点,装置包括:On the basis of the data transmission method discussed above, an embodiment of the present application provides a data transmission device. The device serves as the first node of a mobile ad hoc network, and the device includes:
接收模块901,用于接收第一数据,第一数据携带目的地址;The receiving module 901 is configured to receive first data, where the first data carries a destination address;
处理模块902,用于确定目的节点与第一节点之间的通信距离是否小于或等于N跳,N为大于或等于1且小于移动自组织网络的最大跳数的正整数,目的节点为目的地址所对应的节点;The processing module 902 is used to determine whether the communication distance between the destination node and the first node is less than or equal to N hops, where N is a positive integer greater than or equal to 1 and less than the maximum number of hops of the mobile ad hoc network, and the destination node is the destination address The corresponding node;
处理模块902,还用于若确定目的节点与第一节点之间的通信距离小于或等于N跳, 则根据邻居列表,确定第一传输路径;其中,邻居列表包括与第一节点通信距离在N跳范围内的邻居节点的地址、与第一节点通信距离在N跳范围内的邻居节点的节点类型,以及第一节点到N跳范围内的邻居节点中每个节点的至少一条传输路径,第一传输路径是指从第一节点到目的地址所经过的节点的地址;The processing module 902 is further configured to, if it is determined that the communication distance between the destination node and the first node is less than or equal to N hops, determine the first transmission path according to the neighbor list; wherein, the neighbor list includes the communication distance with the first node in N The address of the neighbor node within the hop range, the node type of the neighbor node whose communication distance with the first node is within N hops, and at least one transmission path from the first node to each of the neighbor nodes within the N hop range. A transmission path refers to the address of the node passing through from the first node to the destination address;
发送模块903,用于通过第一传输路径,传输第一数据。The sending module 903 is configured to transmit the first data through the first transmission path.
在一种可能的设计中,当第一节点的节点类型为骨干节点时,其中:In a possible design, when the node type of the first node is a backbone node, where:
处理模块902,还用于若确定目的节点与第一节点之间的通信距离大于N跳,则根据路由表,获得第二传输路径;其中,路由表包括第一节点到其它节点中每个节点的一条传输路径,第二传输路径包括第二节点的地址,第二节点为第二传输路径中所指示的第一节点的下一跳,其它节点是指移动自组织网络中除了第一节点之外的节点;The processing module 902 is further configured to, if it is determined that the communication distance between the destination node and the first node is greater than N hops, obtain the second transmission path according to the routing table; wherein, the routing table includes each node from the first node to the other nodes The second transmission path includes the address of the second node, the second node is the next hop of the first node indicated in the second transmission path, and other nodes refer to the mobile ad hoc network except the first node Outside node
处理模块902,还用于根据第二节点的地址,确定在邻居列表中,第二节点是否为第一节点的下一跳;The processing module 902 is further configured to determine whether the second node is the next hop of the first node in the neighbor list according to the address of the second node;
发送模块903,还用于若在邻居列表中,第二节点为第一节点的下一跳,则根据第二传输路径,传输第一数据。The sending module 903 is further configured to transmit the first data according to the second transmission path if the second node is the next hop of the first node in the neighbor list.
在一种可能的设计中,处理模块902,还用于若确定在邻居列表中,第二节点不是第一节点的下一跳,且为第一节点的N跳范围内的邻居节点,则根据邻居列表,确定第三传输路径;其中,第三传输路径包括将第一数据从第一节点到第二节点所经过的节点的地址;In a possible design, the processing module 902 is further configured to: if it is determined that in the neighbor list, the second node is not the next hop of the first node, and is a neighbor node within N hops of the first node, according to The neighbor list determines the third transmission path; where the third transmission path includes the addresses of the nodes through which the first data passes from the first node to the second node;
发送模块903,还用于通过第三传输路径,传输第一数据。The sending module 903 is further configured to transmit the first data through the third transmission path.
在一种可能的设计中,处理模块902,还用于若确定在邻居列表中,第二节点不是第一节点的N跳范围内的邻居节点,则根据邻居列表,确定第四传输路径;其中,第四传输路径包括将第一数据从第一节点传输到第三节点所经过的节点的地址,第三节点为第一节点的N跳范围内的一个骨干节点;In a possible design, the processing module 902 is further configured to determine the fourth transmission path according to the neighbor list if it is determined that the second node is not a neighbor node within N hops of the first node in the neighbor list; where , The fourth transmission path includes the address of the node through which the first data is transmitted from the first node to the third node, and the third node is a backbone node within the N hop range of the first node;
发送模块903,还用于通过第四传输路径,传输第一数据。The sending module 903 is further configured to transmit the first data through the fourth transmission path.
在一种可能的设计中,当第一节点的节点类型为普通节点时,普通节点是指移动自组织网络中除了骨干节点之外的节点;In a possible design, when the node type of the first node is a normal node, the normal node refers to a node other than the backbone node in the mobile ad hoc network;
处理模块902,还用于若确定目的节点与第一节点之间的通信距离大于N跳,则根据邻居列表,确定第五传输路径;其中,第五传输路径包括将第一数据从第一节点传输到第四节点所经过的节点的地址,第四节点为与第一节点的通信距离在N跳范围内的邻居节点中的一个骨干节点;The processing module 902 is further configured to determine a fifth transmission path according to the neighbor list if it is determined that the communication distance between the destination node and the first node is greater than N hops; wherein, the fifth transmission path includes transferring the first data from the first node The address of the node passed by the fourth node is transmitted, and the fourth node is a backbone node among neighbor nodes whose communication distance with the first node is within N hops;
处理模块902,还用于通过第五传输路径,传输第一数据。The processing module 902 is further configured to transmit the first data through the fifth transmission path.
在一种可能的设计中,第四节点为第一节点的N跳邻居节点中支配因子最大的骨干节点,支配因子用于表征第一节点到第四节点的传输链路质量。In a possible design, the fourth node is the backbone node with the largest dominance factor among the N-hop neighbor nodes of the first node, and the dominance factor is used to characterize the quality of the transmission link from the first node to the fourth node.
在一种可能的设计中,接收模块901,还用于接收第一节点的N-1跳范围内的邻居节点中每个节点广播的邻居维护数据帧,邻居维护数据帧携带每个节点的节点类型、以及每个节点的至少1跳范围内的邻居节点的地址和节点类型;In a possible design, the receiving module 901 is also used to receive the neighbor maintenance data frame broadcast by each of the neighbor nodes within the N-1 hop range of the first node, and the neighbor maintenance data frame carries the node of each node Type, and the address and node type of neighboring nodes within at least 1 hop of each node;
处理模块902,还用于根据邻居维护数据帧,生成第一节点的邻居列表。The processing module 902 is further configured to generate a neighbor list of the first node according to the neighbor maintenance data frame.
在一种可能的设计中,当第一节点的节点类型为骨干节点时;In a possible design, when the node type of the first node is a backbone node;
接收模块901,还用于接收其它骨干节点周期性广播的路由控制数据帧,路由控制数据帧携带其它骨干节点的地址和节点类型,以及其它骨干节点的N跳范围内的邻居节点的地址和节点类型,其它骨干节点是指移动自组织网络中除了第一节点之外的骨干节点;The receiving module 901 is also used to receive routing control data frames periodically broadcast by other backbone nodes. The routing control data frames carry the addresses and node types of other backbone nodes, and the addresses and nodes of neighboring nodes within the N hop range of other backbone nodes. Type, other backbone nodes refer to backbone nodes other than the first node in the mobile ad hoc network;
处理模块902,还用于根据路由控制数据帧,生成第一节点的路由表。The processing module 902 is further configured to generate a routing table of the first node according to the routing control data frame.
在一种可能的设计中,处理模块902具体用于:In a possible design, the processing module 902 is specifically used to:
若确定第一节点是第一次收到路由控制数据帧,则根据路由控制数据帧,建立第一节点到其它节点中每个节点的一条传输路径,从而获得第一节点的路由表。If it is determined that the first node has received the routing control data frame for the first time, a transmission path from the first node to each of the other nodes is established according to the routing control data frame, thereby obtaining the routing table of the first node.
在一种可能的设计中,处理模块902还用于:In a possible design, the processing module 902 is also used to:
在生成第一节点的路由表之后,若确定第一节点不是第一次收到路由控制数据帧,则确定上一个路由控制数据帧的生存周期TTL是否大于路由控制数据帧的TTL;After generating the routing table of the first node, if it is determined that the first node is not receiving the routing control data frame for the first time, it is determined whether the lifetime TTL of the previous routing control data frame is greater than the TTL of the routing control data frame;
若上一个路由控制数据帧的生存周期TTL小于路由控制数据帧的TTL,则根据路由控制数据帧,更新第一节点到其它节点的一条传输路径,获得更新后的第一节点的路由表。If the lifetime TTL of the last routing control data frame is less than the TTL of the routing control data frame, then a transmission path from the first node to other nodes is updated according to the routing control data frame to obtain the updated routing table of the first node.
作为一种实施例,图9中的处理模块902可以通过图8中的处理器802来实现。图9中的接收模块901和发送模块903可以通过图8中的收发机803来实现。As an embodiment, the processing module 902 in FIG. 9 may be implemented by the processor 802 in FIG. 8. The receiving module 901 and the sending module 903 in FIG. 9 can be implemented by the transceiver 803 in FIG. 8.
在前文论述的一种传输数据的方法的基础上,本申请实施例提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机指令,当所述计算机指令在计算机上运行时,使得计算机执行如图2或图4或图6所述的方法。On the basis of the method for transmitting data discussed above, an embodiment of the present application provides a computer-readable storage medium, the computer-readable storage medium stores computer instructions, and when the computer instructions run on a computer, The computer is caused to execute the method described in FIG. 2 or FIG. 4 or FIG. 6.
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, this application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。This application is described with reference to flowcharts and/or block diagrams of methods, equipment (systems), and computer program products according to embodiments of this application. It should be understood that each process and/or block in the flowchart and/or block diagram, and the combination of processes and/or blocks in the flowchart and/or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing equipment to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing equipment can be generated A device that implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device. The device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment. The instructions provide steps for implementing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
尽管已描述了本申请的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本申请范围的所有变更和修改。Although the preferred embodiments of the present application have been described, those skilled in the art can make additional changes and modifications to these embodiments once they learn the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of this application.
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the application without departing from the spirit and scope of the application. In this way, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalent technologies, then this application is also intended to include these modifications and variations.

Claims (22)

  1. 一种传输数据的方法,其特征在于,应用于移动自组织网络的第一节点中,所述方法包括:A method for transmitting data, characterized in that it is applied to a first node of a mobile ad hoc network, and the method includes:
    接收第一数据,所述第一数据携带目的地址;Receiving first data, the first data carrying a destination address;
    确定目的节点与所述第一节点之间的通信距离是否小于或等于N跳,N为大于或等于1且小于所述移动自组织网络的最大跳数的正整数,所述目的节点为所述目的地址所对应的节点;Determine whether the communication distance between the destination node and the first node is less than or equal to N hops, where N is a positive integer greater than or equal to 1 and less than the maximum number of hops of the mobile ad hoc network, and the destination node is the The node corresponding to the destination address;
    若确定所述目的节点与所述第一节点之间的通信距离小于或等于N跳,则根据邻居列表,确定第一传输路径;其中,所述邻居列表包括与所述第一节点通信距离在N跳范围内的邻居节点的地址、与所述第一节点通信距离在N跳范围内的邻居节点的节点类型,以及所述第一节点到N跳范围内的邻居节点中每个节点的至少一条传输路径,所述第一传输路径包括从所述第一节点到所述目的节点所经过的节点的地址;If it is determined that the communication distance between the destination node and the first node is less than or equal to N hops, the first transmission path is determined according to the neighbor list; wherein, the neighbor list includes the communication distance with the first node The address of the neighbor node within the N hop range, the node type of the neighbor node whose communication distance with the first node is within the N hop range, and at least each node from the first node to the neighbor node within the N hop range A transmission path, the first transmission path including addresses of nodes passing through from the first node to the destination node;
    通过所述第一传输路径,传输所述第一数据。The first data is transmitted through the first transmission path.
  2. 如权利要求1所述的方法,其特征在于,当所述第一节点的节点类型为骨干节点时,所述方法还包括:The method according to claim 1, wherein when the node type of the first node is a backbone node, the method further comprises:
    若确定所述目的节点与所述第一节点之间的通信距离大于N跳,则根据路由表,获得第二传输路径;其中,所述路由表包括所述第一节点到其它节点中每个节点的一条传输路径,所述第二传输路径包括第二节点的地址,所述第二节点为所述第二传输路径中所指示的所述第一节点的下一跳,所述其它节点是指所述移动自组织网络中除了所述第一节点之外的节点;If it is determined that the communication distance between the destination node and the first node is greater than N hops, a second transmission path is obtained according to a routing table; wherein, the routing table includes each of the first node to the other nodes A transmission path of a node, the second transmission path includes the address of a second node, the second node is the next hop of the first node indicated in the second transmission path, and the other nodes are Refers to nodes other than the first node in the mobile ad hoc network;
    根据所述第二节点的地址,确定在所述邻居列表中,所述第二节点是否为所述第一节点的下一跳;Determining whether the second node is the next hop of the first node in the neighbor list according to the address of the second node;
    若确定在所述邻居列表中,所述第二节点为所述第一节点的下一跳,则根据所述第二传输路径,传输所述第一数据。If it is determined that the second node is the next hop of the first node in the neighbor list, the first data is transmitted according to the second transmission path.
  3. 如权利要求2所述的方法,其特征在于,所述方法还包括:The method according to claim 2, wherein the method further comprises:
    若确定在所述邻居列表中,所述第二节点不是所述第一节点的下一跳,且为所述第一节点的N跳范围内的邻居节点,则根据所述邻居列表,确定第三传输路径;其中,所述第三传输路径包括从所述第一节点到所述第二节点所经过的节点的地址;If it is determined that in the neighbor list, the second node is not the next hop of the first node and is a neighbor node within the N hop range of the first node, then determine the first node according to the neighbor list Three transmission paths; wherein the third transmission path includes addresses of nodes passing through from the first node to the second node;
    通过所述第三传输路径,传输所述第一数据。The first data is transmitted through the third transmission path.
  4. 如权利要求2或3所述的方法,其特征在于,所述方法还包括:The method according to claim 2 or 3, wherein the method further comprises:
    若确定在所述邻居列表中,所述第二节点不是所述第一节点的N跳范围内的邻居节点,则根据所述邻居列表,确定第四传输路径;其中,所述第四传输路径包括从所述第一节点到第三节点所经过的节点的地址,所述第三节点为所述第一节点的N跳范围内的一个骨干节点;If it is determined that in the neighbor list, the second node is not a neighbor node within the N hop range of the first node, then a fourth transmission path is determined according to the neighbor list; wherein, the fourth transmission path Including addresses of nodes passing through from the first node to a third node, where the third node is a backbone node within an N hop range of the first node;
    通过所述第四传输路径,传输所述第一数据。The first data is transmitted through the fourth transmission path.
  5. 如权利要求1所述的方法,其特征在于,当所述第一节点的节点类型为普通节点 时,所述普通节点是指所述移动自组织网络中除了骨干节点之外的节点,所述方法还包括:The method of claim 1, wherein when the node type of the first node is a common node, the common node refers to a node other than a backbone node in the mobile ad hoc network, and the Methods also include:
    若确定所述目的节点与所述第一节点之间的通信距离大于N跳,则根据所述邻居列表,确定第五传输路径;其中,所述第五传输路径包括从所述第一节点到第四节点所经过的节点的地址,所述第四节点为与所述第一节点的通信距离在N跳范围内的邻居节点中的一个骨干节点;If it is determined that the communication distance between the destination node and the first node is greater than N hops, a fifth transmission path is determined according to the neighbor list; wherein, the fifth transmission path includes from the first node to An address of a node passed by the fourth node, where the fourth node is a backbone node among neighbor nodes whose communication distance with the first node is within N hops;
    通过所述第五传输路径,传输所述第一数据。The first data is transmitted through the fifth transmission path.
  6. 如权利要求5所述的方法,其特征在于,所述第四节点为所述第一节点的N跳邻居节点中支配因子最大的骨干节点,所述支配因子用于表征所述第一节点到所述第四节点的传输链路质量。The method according to claim 5, wherein the fourth node is a backbone node with the largest dominance factor among the N-hop neighbor nodes of the first node, and the dominance factor is used to characterize the first node to The transmission link quality of the fourth node.
  7. 如权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1, wherein the method further comprises:
    接收所述第一节点的N-1跳范围内的邻居节点中每个节点广播的邻居维护数据帧,所述邻居维护数据帧携带所述每个节点的节点类型、以及所述每个节点的至少1跳范围内的邻居节点的地址和节点类型;Receive a neighbor maintenance data frame broadcast by each of the neighbor nodes within the N-1 hop range of the first node, where the neighbor maintenance data frame carries the node type of each node and the information of each node Address and node type of neighbor nodes within at least 1 hop;
    根据所述邻居维护数据帧,生成所述第一节点的邻居列表。According to the neighbor maintenance data frame, a neighbor list of the first node is generated.
  8. 如权利要求1或7所述的方法,其特征在于,当所述第一节点的节点类型为骨干节点时,所述方法包括:8. The method of claim 1 or 7, wherein when the node type of the first node is a backbone node, the method comprises:
    接收其它骨干节点周期性广播的路由控制数据帧,所述路由控制数据帧携带所述其它骨干节点的地址和节点类型,以及所述其它骨干节点的N跳范围内的邻居节点的地址和节点类型,所述其它骨干节点是指所述移动自组织网络中除了所述第一节点之外的骨干节点;Receive routing control data frames periodically broadcast by other backbone nodes, the routing control data frames carrying the addresses and node types of the other backbone nodes, and the addresses and node types of neighbor nodes within the N hop range of the other backbone nodes , The other backbone nodes refer to the backbone nodes other than the first node in the mobile ad hoc network;
    根据所述路由控制数据帧,生成所述第一节点的路由表。According to the routing control data frame, a routing table of the first node is generated.
  9. 如权利要求8所述的方法,其特征在于,根据所述路由控制数据帧,生成所述第一节点的路由表,包括:The method according to claim 8, wherein generating the routing table of the first node according to the routing control data frame comprises:
    若确定所述第一节点是第一次收到所述路由控制数据帧,则根据所述路由控制数据帧,建立所述第一节点到其它节点中每个节点的一条传输路径,获得所述第一节点的路由表。If it is determined that the first node receives the routing control data frame for the first time, a transmission path from the first node to each of the other nodes is established according to the routing control data frame to obtain the The routing table of the first node.
  10. 如权利要求8所述的方法,其特征在于,在生成所述第一节点的路由表之后,还包括:The method according to claim 8, wherein after generating the routing table of the first node, the method further comprises:
    若确定所述第一节点不是第一次收到所述路由控制数据帧,则确定上一个路由控制数据帧的生存周期TTL是否大于所述路由控制数据帧的TTL;If it is determined that the first node is not receiving the routing control data frame for the first time, determining whether the lifetime TTL of the previous routing control data frame is greater than the TTL of the routing control data frame;
    若所述上一个路由控制数据帧的生存周期TTL小于所述路由控制数据帧的TTL,则根据所述路由控制数据帧,更新所述第一节点到所述其它节点的一条传输路径,获得更新后的所述第一节点的路由表。If the lifetime TTL of the last routing control data frame is less than the TTL of the routing control data frame, update a transmission path from the first node to the other nodes according to the routing control data frame to obtain the update The routing table of the first node after.
  11. 一种传输数据的装置,其特征在于,所述装置作为移动自组织网络的第一节点,所述装置包括:A device for transmitting data, characterized in that the device serves as the first node of a mobile ad hoc network, and the device includes:
    存储器,用于存储计算机指令;Memory, used to store computer instructions;
    处理器,被配置为读取所述存储器中的计算机指令,执行下列操作:The processor is configured to read computer instructions in the memory and perform the following operations:
    接收第一数据,所述第一数据携带目的地址;Receiving first data, the first data carrying a destination address;
    确定目的节点与所述第一节点之间的通信距离是否小于或等于N跳,N为大于或等于1且小于所述移动自组织网络的最大跳数的正整数,所述目的节点为所述目的地址所对应的节点;Determine whether the communication distance between the destination node and the first node is less than or equal to N hops, where N is a positive integer greater than or equal to 1 and less than the maximum number of hops of the mobile ad hoc network, and the destination node is the The node corresponding to the destination address;
    若确定所述目的节点与所述第一节点之间的通信距离小于或等于N跳,则根据邻居列表,确定第一传输路径;其中,所述邻居列表包括与所述第一节点通信距离在N跳范围内的邻居节点的地址、与所述第一节点通信距离在N跳范围内的邻居节点的节点类型,以及所述第一节点到N跳范围内的邻居节点中每个节点的至少一条传输路径,所述第一传输路径包括从所述第一节点到所述目的节点所经过的节点的地址;If it is determined that the communication distance between the destination node and the first node is less than or equal to N hops, the first transmission path is determined according to the neighbor list; wherein, the neighbor list includes the communication distance with the first node The address of the neighbor node within the N hop range, the node type of the neighbor node whose communication distance with the first node is within the N hop range, and at least each node from the first node to the neighbor node within the N hop range A transmission path, the first transmission path including addresses of nodes passing through from the first node to the destination node;
    通过所述第一传输路径,传输所述第一数据;Transmitting the first data through the first transmission path;
    收发机,用于在所述处理器的控制下收发信息。The transceiver is used to send and receive information under the control of the processor.
  12. 如权利要求11所述的装置,其特征在于,当所述第一节点的节点类型为骨干节点时,所述操作还包括:The apparatus according to claim 11, wherein when the node type of the first node is a backbone node, the operation further comprises:
    若确定所述目的节点与所述第一节点之间的通信距离大于N跳,则根据路由表,获得第二传输路径;其中,所述路由表包括所述第一节点到其它节点中每个节点的一条传输路径,所述第二传输路径包括第二节点的地址,所述第二节点为所述第二传输路径中所指示的所述第一节点的下一跳,所述其它节点是指所述移动自组织网络中除了所述第一节点之外的节点;If it is determined that the communication distance between the destination node and the first node is greater than N hops, a second transmission path is obtained according to a routing table; wherein, the routing table includes each of the first node to the other nodes A transmission path of a node, the second transmission path includes the address of a second node, the second node is the next hop of the first node indicated in the second transmission path, and the other nodes are Refers to nodes other than the first node in the mobile ad hoc network;
    根据所述第二节点的地址,确定在所述邻居列表中,所述第二节点是否为所述第一节点的下一跳;Determining whether the second node is the next hop of the first node in the neighbor list according to the address of the second node;
    若确定在所述邻居列表中,所述第二节点为所述第一节点的下一跳,则根据所述第二传输路径,传输所述第一数据。If it is determined that the second node is the next hop of the first node in the neighbor list, the first data is transmitted according to the second transmission path.
  13. 如权利要求12所述的装置,其特征在于,所述操作还包括:The apparatus of claim 12, wherein the operation further comprises:
    若确定在所述邻居列表中,所述第二节点不是所述第一节点的下一跳,且为所述第一节点的N跳范围内的邻居节点,则根据所述邻居列表,确定第三传输路径;其中,所述第三传输路径包括从所述第一节点传输到所述第二节点所经过的节点的地址;If it is determined that in the neighbor list, the second node is not the next hop of the first node and is a neighbor node within the N hop range of the first node, then determine the first node according to the neighbor list Three transmission paths; wherein the third transmission path includes the addresses of nodes that are transmitted from the first node to the second node;
    通过所述第三传输路径,传输所述第一数据。The first data is transmitted through the third transmission path.
  14. 如权利要求12或13所述的装置,其特征在于,所述操作还包括:The device according to claim 12 or 13, wherein the operation further comprises:
    若确定在所述邻居列表中,所述第二节点不是所述第一节点的N跳范围内的邻居节点,则根据所述邻居列表,确定第四传输路径;其中,所述第四传输路径包括从所述第一节点到第三节点所经过的节点的地址,所述第三节点为所述第一节点的N跳范围内的一个骨干节点;If it is determined that in the neighbor list, the second node is not a neighbor node within the N hop range of the first node, then a fourth transmission path is determined according to the neighbor list; wherein, the fourth transmission path Including addresses of nodes passing through from the first node to a third node, where the third node is a backbone node within an N hop range of the first node;
    通过所述第四传输路径,传输所述第一数据。The first data is transmitted through the fourth transmission path.
  15. 如权利要求11所述的装置,其特征在于,当所述第一节点的节点类型为普通节点时,所述普通节点是指所述移动自组织网络中除了骨干节点之外的节点,所述操作还包括:The apparatus according to claim 11, wherein when the node type of the first node is a normal node, the normal node refers to a node other than a backbone node in the mobile ad hoc network, and the Operations also include:
    若确定所述目的节点与所述第一节点之间的通信距离大于N跳,则根据所述邻居列表,确定第五传输路径;其中,所述第五传输路径包括从所述第一节点到第四节点所经过的节 点的地址,所述第四节点为与所述第一节点的通信距离在N跳范围内的邻居节点中的一个骨干节点;If it is determined that the communication distance between the destination node and the first node is greater than N hops, a fifth transmission path is determined according to the neighbor list; wherein, the fifth transmission path includes from the first node to An address of a node passed by the fourth node, where the fourth node is a backbone node among neighbor nodes whose communication distance with the first node is within N hops;
    通过所述第五传输路径,传输所述第一数据。The first data is transmitted through the fifth transmission path.
  16. 如权利要求15所述的装置,其特征在于,所述第四节点为所述第一节点的N跳邻居节点中支配因子最大的骨干节点,所述支配因子用于表征所述第一节点到所述第四节点的传输链路质量。The apparatus according to claim 15, wherein the fourth node is a backbone node with the largest dominance factor among the N-hop neighbor nodes of the first node, and the dominance factor is used to characterize the first node to The transmission link quality of the fourth node.
  17. 如权利要求11所述的装置,其特征在于,所述操作还包括:The apparatus of claim 11, wherein the operation further comprises:
    接收所述第一节点的N-1跳范围内的邻居节点中每个节点广播的邻居维护数据帧,所述邻居维护数据帧携带所述每个节点的节点类型、以及所述每个节点的至少1跳范围内的邻居节点的地址和节点类型;Receive a neighbor maintenance data frame broadcast by each of the neighbor nodes within the N-1 hop range of the first node, where the neighbor maintenance data frame carries the node type of each node and the information of each node Address and node type of neighbor nodes within at least 1 hop;
    根据所述邻居维护数据帧,生成所述第一节点的邻居列表。According to the neighbor maintenance data frame, a neighbor list of the first node is generated.
  18. 如权利要求11或17所述的装置,其特征在于,当所述第一节点的节点类型为骨干节点时,所述操作还包括:The apparatus according to claim 11 or 17, wherein when the node type of the first node is a backbone node, the operation further comprises:
    接收其它骨干节点周期性广播的路由控制数据帧,所述路由控制数据帧携带所述其它骨干节点的地址和节点类型,以及所述其它骨干节点的N跳范围内的邻居节点的地址和节点类型,所述其它骨干节点是指所述移动自组织网络中除了所述第一节点之外的骨干节点;Receive routing control data frames periodically broadcast by other backbone nodes, the routing control data frames carrying the addresses and node types of the other backbone nodes, and the addresses and node types of neighbor nodes within the N hop range of the other backbone nodes , The other backbone nodes refer to the backbone nodes other than the first node in the mobile ad hoc network;
    根据所述路由控制数据帧,生成所述第一节点的路由表。According to the routing control data frame, a routing table of the first node is generated.
  19. 如权利要求18所述的装置,其特征在于,所述操作具体包括:The device according to claim 18, wherein the operation specifically comprises:
    若确定所述第一节点是第一次收到所述路由控制数据帧,则根据所述路由控制数据帧,建立所述第一节点到其它节点中每个节点的一条传输路径,获得所述第一节点的路由表。If it is determined that the first node receives the routing control data frame for the first time, a transmission path from the first node to each of the other nodes is established according to the routing control data frame to obtain the The routing table of the first node.
  20. 如权利要求18所述的装置,其特征在于,所述操作还包括:The apparatus of claim 18, wherein the operation further comprises:
    在生成所述第一节点的路由表之后,若确定所述第一节点不是第一次收到所述路由控制数据帧,则确定上一个路由控制数据帧的生存周期TTL是否大于所述路由控制数据帧的TTL;After generating the routing table of the first node, if it is determined that the first node is not receiving the routing control data frame for the first time, it is determined whether the lifetime TTL of the previous routing control data frame is greater than that of the routing control TTL of data frame;
    若所述上一个路由控制数据帧的生存周期TTL小于所述路由控制数据帧的TTL,则根据所述路由控制数据帧,更新所述第一节点到所述其它节点的一条传输路径,获得更新后的所述第一节点的路由表。If the lifetime TTL of the last routing control data frame is less than the TTL of the routing control data frame, update a transmission path from the first node to the other nodes according to the routing control data frame to obtain the update The routing table of the first node after.
  21. 一种传输数据的装置,其特征在于,所述装置作为移动自组织网络的第一节点,所述装置包括:A device for transmitting data, characterized in that the device serves as the first node of a mobile ad hoc network, and the device includes:
    接收模块,用于接收第一数据,所述第一数据携带目的地址;A receiving module, configured to receive first data, where the first data carries a destination address;
    处理模块,用于确定目的节点与所述第一节点之间的通信距离是否小于或等于N跳,N为大于或等于1且小于所述移动自组织网络的最大跳数的正整数,所述目的节点为所述目的地址所对应的节点;The processing module is used to determine whether the communication distance between the destination node and the first node is less than or equal to N hops, where N is a positive integer greater than or equal to 1 and less than the maximum number of hops of the mobile ad hoc network, and The destination node is the node corresponding to the destination address;
    所述处理模块,还用于若确定所述目的节点与所述第一节点之间的通信距离小于或等于N跳,则根据邻居列表,确定第一传输路径;其中,所述邻居列表包括与所述第一节点通信距离在N跳范围内的邻居节点的地址、与所述第一节点通信距离在N跳范围内的邻居 节点的节点类型,以及所述第一节点到N跳范围内的邻居节点中每个节点的至少一条传输路径,所述第一传输路径包括从所述第一节点到所述目的节点所经过的节点的地址;The processing module is further configured to, if it is determined that the communication distance between the destination node and the first node is less than or equal to N hops, determine the first transmission path according to the neighbor list; wherein, the neighbor list includes and The address of the neighbor node whose communication distance is within N hops of the first node, the node type of the neighbor node whose communication distance is within N hops of the first node, and the distance from the first node to the N hop range At least one transmission path of each node in the neighbor nodes, the first transmission path including the address of the node passing by from the first node to the destination node;
    发送模块,用于通过所述第一传输路径,传输所述第一数据。The sending module is configured to transmit the first data through the first transmission path.
  22. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机指令,当所述计算机指令在计算机上运行时,使得计算机执行如权利要求1-10中任一项所述的方法。A computer-readable storage medium, characterized in that the computer-readable storage medium stores computer instructions, when the computer instructions are run on a computer, the computer executes any one of claims 1-10 Methods.
PCT/CN2020/073325 2019-01-30 2020-01-20 Data transmission method and apparatus WO2020156340A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910094027.4 2019-01-30
CN201910094027.4A CN111510982B (en) 2019-01-30 2019-01-30 Data transmission method and device

Publications (1)

Publication Number Publication Date
WO2020156340A1 true WO2020156340A1 (en) 2020-08-06

Family

ID=71841228

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/073325 WO2020156340A1 (en) 2019-01-30 2020-01-20 Data transmission method and apparatus

Country Status (2)

Country Link
CN (1) CN111510982B (en)
WO (1) WO2020156340A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114710817A (en) * 2022-02-23 2022-07-05 广东技术师范大学 Underwater network data transmission path determining method, transmission method, device and equipment
CN115297192A (en) * 2022-06-17 2022-11-04 浙江大华技术股份有限公司 Mesh network data transmission method, mesh network node and storage medium

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113724414B (en) * 2021-08-31 2023-06-16 浙江江南工程管理股份有限公司 Intelligent inspection method and system
CN114039861B (en) * 2021-12-20 2024-02-06 浪潮思科网络科技有限公司 Chain topology sensing method, device and medium based on TIPC protocol transformation

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120294152A1 (en) * 2011-05-20 2012-11-22 The Regents Of The University Of California Hybrid Cross-Layer Routing Protocol for MANETs
CN102916876A (en) * 2012-10-24 2013-02-06 浙江大学 Routing method for one-way link environment of principal and subordinative construction network
CN103957162A (en) * 2014-05-14 2014-07-30 常熟理工学院 Routing communication realization method of wireless network
CN105517098A (en) * 2014-10-16 2016-04-20 北京信威通信技术股份有限公司 Wireless self-networking system and routing method thereof
CN105792312A (en) * 2016-03-02 2016-07-20 山东航天电子技术研究所 Ad-hoc network routing method based on combination of active and passive ways

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB0220660D0 (en) * 2002-09-05 2002-10-16 Nokia Corp Signal propogation delay routing
EP1773003B1 (en) * 2005-10-04 2014-01-15 NTT DoCoMo, Inc. Method and apparatus for discovering disjoint routes to multiple service nodes
US8451807B2 (en) * 2006-12-20 2013-05-28 Honeywell International Inc. Configuration aware packet routing in an ad-hoc network
US8134950B2 (en) * 2007-04-03 2012-03-13 Harris Corporation Cluster head election in an ad-hoc network
CN101282279B (en) * 2007-04-04 2010-12-01 同济大学 Wireless self-organization network routing method based on available bandwidth measurement
CN101217488B (en) * 2008-01-16 2010-09-08 中南大学 A reconstructible multiple mobile robot communication means
CN101951654B (en) * 2010-08-09 2013-03-20 哈尔滨工程大学 Energy-saving routing method for multi-underwater robot-oriented communication
CN102036338A (en) * 2010-12-22 2011-04-27 中国科学院计算技术研究所 Sensor network real-time routing method based on data-driven link estimation
CN103124421B (en) * 2012-12-12 2016-06-08 南京邮电大学 The cluster-dividing method of mobile node in a kind of wireless sensor network
CN103108374B (en) * 2013-01-29 2015-10-14 北京交通大学 A kind of energy-saving routing algorithm of mixed structure mine emergency management and rescue wireless mesh network
CN104104605A (en) * 2013-04-02 2014-10-15 富士通株式会社 Downlink route acquisition and maintenance method and device
CN103415056B (en) * 2013-08-08 2015-12-02 电子科技大学 A kind of mobile ad-hoc network routing method on demand based on link-quality
CN104684025B (en) * 2013-12-03 2018-11-20 富士通株式会社 Method for balancing network load, device and network
CN108055684B (en) * 2017-12-19 2020-05-19 河海大学 Routing method for aviation self-organizing network

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120294152A1 (en) * 2011-05-20 2012-11-22 The Regents Of The University Of California Hybrid Cross-Layer Routing Protocol for MANETs
CN102916876A (en) * 2012-10-24 2013-02-06 浙江大学 Routing method for one-way link environment of principal and subordinative construction network
CN103957162A (en) * 2014-05-14 2014-07-30 常熟理工学院 Routing communication realization method of wireless network
CN105517098A (en) * 2014-10-16 2016-04-20 北京信威通信技术股份有限公司 Wireless self-networking system and routing method thereof
CN105792312A (en) * 2016-03-02 2016-07-20 山东航天电子技术研究所 Ad-hoc network routing method based on combination of active and passive ways

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114710817A (en) * 2022-02-23 2022-07-05 广东技术师范大学 Underwater network data transmission path determining method, transmission method, device and equipment
CN114710817B (en) * 2022-02-23 2024-05-07 广东技术师范大学 Method, device and equipment for determining underwater network data transmission path
CN115297192A (en) * 2022-06-17 2022-11-04 浙江大华技术股份有限公司 Mesh network data transmission method, mesh network node and storage medium
CN115297192B (en) * 2022-06-17 2024-03-12 浙江大华技术股份有限公司 Mesh network data transmission method, mesh network node and storage medium

Also Published As

Publication number Publication date
CN111510982B (en) 2022-03-11
CN111510982A (en) 2020-08-07

Similar Documents

Publication Publication Date Title
WO2020156340A1 (en) Data transmission method and apparatus
US7330694B2 (en) Method for setting up route path through route discovery in a mobile ad hoc network using partial route discovery
Tran et al. Congestion adaptive routing in mobile ad hoc networks
KR100957920B1 (en) System and method for utilizing multiple radios to increase the capacity of a wireless communication network
US20180213460A1 (en) Networking devices and methods
WO2017020619A1 (en) Routing method and device
JP2006527522A (en) System and method for improving overall performance of a wireless communication network
US20080240112A1 (en) Layer 2 routing protocol
KR20070032717A (en) System and method for improving the performance of the on-demand routing protocol in wireless networks
CN109068367B (en) Wireless token passing method, device, equipment and readable storage medium
CN110691379A (en) Active routing communication method suitable for wireless ad hoc network
CN101102283A (en) A method and device for optimizing unknown unicast forward at wireless access point
CN109510769B (en) Converged routing system suitable for wide-narrow combined network and method thereof
Mu An improved AODV routing for the zigbee heterogeneous networks in 5G environment
CN109600312B (en) BATMAN-Adv protocol optimization design method for intelligent terminal ad hoc network
CN103037436B (en) Network coding perception wireless mesh routing protocol based on hybrid wireless mesh protocol (HWMP)
JP2009260720A (en) Route control method, communication system and communication apparatus
CN105657774B (en) Method and system for establishing self-adaptive core forwarding network in wireless self-organizing network
EP1724968B1 (en) Method of transmitting and receiving data in a network environment with wired and wireless networks bridged using relay portal.
SreeRangaRaju et al. Optimized ZRP for MANETs and its Applications
CN104735712B (en) A kind of maintaining method of Ad Hoc networks route
Setty et al. Comparative study of energy aware QoS for proactive and reactive routing protocols for mobile ad-hoc networks
CN110213801B (en) Heterogeneous network communication method and equipment
CN106973422B (en) Improved algorithm of DSR protocol
CN111698153A (en) Communication path selection method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20747814

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20747814

Country of ref document: EP

Kind code of ref document: A1