CN107147579B - Data transmission method and device - Google Patents

Data transmission method and device Download PDF

Info

Publication number
CN107147579B
CN107147579B CN201710267273.6A CN201710267273A CN107147579B CN 107147579 B CN107147579 B CN 107147579B CN 201710267273 A CN201710267273 A CN 201710267273A CN 107147579 B CN107147579 B CN 107147579B
Authority
CN
China
Prior art keywords
node
address
message
packet
central
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710267273.6A
Other languages
Chinese (zh)
Other versions
CN107147579A (en
Inventor
张传欣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hisense Group Co Ltd
Original Assignee
Hisense Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hisense Group Co Ltd filed Critical Hisense Group Co Ltd
Priority to CN201710267273.6A priority Critical patent/CN107147579B/en
Publication of CN107147579A publication Critical patent/CN107147579A/en
Application granted granted Critical
Publication of CN107147579B publication Critical patent/CN107147579B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W40/00Communication routing or communication path finding
    • H04W40/24Connectivity information management, e.g. connectivity discovery or connectivity update
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • 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
    • H04W84/00Network topologies
    • H04W84/18Self-organising networks, e.g. ad-hoc networks or sensor networks

Landscapes

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

Abstract

The invention discloses a data transmission method and a device, belonging to the technical field of networks, the method comprises the steps that a central node establishes a routing table item reaching each other node in a network area to which the central node belongs, each intermediate node and each edge node respectively establish a routing table item reaching each node on a central node-edge node connection link to which the central node belongs, when the central node receives a third message, if the third message carries a gateway node address, the gateway node address in the third message is deleted, and the third message is forwarded according to the destination address of the third message, so that the problem that when a source node wants to communicate with a destination node which does not locally store a corresponding routing table item, the communication efficiency among the nodes is influenced by the process that the destination address needs to be broadcast to a directly-connected node to detect the destination node, the direct communication among other nodes in the area to which the central node belongs or the communication among other nodes through the central node is realized, and the communication efficiency among the nodes is improved.

Description

Data transmission method and device
Technical Field
The present invention relates to the field of network technologies, and in particular, to a method and an apparatus for transmitting data.
Background
Each node in the Wireless Ad-hoc Network has a routing function, communication among nodes which are not in signal coverage range of each other can be completed through forwarding of other nodes (namely multi-hop routing), the multi-hop means that a certain node can directly communicate with at least nodes, under the multi-hop routing, a data packet sent from a source node to a destination node can pass through a plurality of nodes until reaching the destination node, and the number of the data packets which need to pass through the nodes is the node hop number between the source node and the destination node.
Only when the node wants to communicate with a destination node which does not locally store the corresponding routing table item, the node broadcasts a detection message of the destination node with a destination address to the directly connected node to acquire and establish the routing table item corresponding to the address of the destination node.
That is to say, when a source node wants to communicate with a destination node that does not locally store a corresponding routing table entry, it needs to broadcast a probe packet of a destination address and the destination node to the directly connected node , and after obtaining and establishing a routing table entry corresponding to the address of the destination node, it can communicate with the destination node.
Disclosure of Invention
In order to solve the problem that when a source node wants to communicate with a destination node which does not locally store a corresponding routing table entry, the process of broadcasting a detection message of the destination node to a directly connected node at a destination address first affects the communication efficiency among nodes, embodiments of the present invention provide data transmission methods and apparatuses.
, it provides data transmission method, applied to wireless self-organizing network, including at least central nodes, each central node corresponding to network areas containing multiple nodes, where the multiple nodes in the network area include central node, edge node and middle node, the method includes:
the central node establishes a routing table entry reaching each other node in the network area to which the central node belongs, and each intermediate node and each edge node respectively establish a routing table entry reaching each node on the central node-edge node connection link to which the intermediate node belongs;
when an intermediate node receives an th message, if the th message carries a gateway node address, forwarding the th message according to a routing table entry corresponding to the gateway node address, and if the th message does not carry the gateway node address, forwarding the th message according to a destination address of the th message;
when an edge node receives a second message, or the edge node serves as a source node to send the second message, or an intermediate node serves as a source node to send the second message, if a routing table item corresponding to a destination address of the second message is stored locally, the second message is sent according to the destination address of the second message, if the second node does not store the routing table item corresponding to the destination address of the second message, an address of a central node of a local network area serving as a gateway node address is added to the second message, and the second message is sent according to the routing table item corresponding to the gateway node address;
when a central node receives a third message, if the third message carries a gateway node address, deleting the gateway node address in the third message, and forwarding the third message according to a destination address of the third message.
In a second aspect, data transmission apparatuses are provided, where the apparatus is applied to a wireless ad hoc network, the wireless ad hoc network includes at least central nodes, each central node corresponds to network areas including a plurality of nodes, and the plurality of nodes in the network area include a central node, an edge node, and an intermediate node, the apparatus includes:
the establishing module is used for the central node to establish a routing table entry reaching each other node in the network area to which the central node belongs, and each intermediate node and each edge node respectively establish a routing table entry reaching each node on the connecting link of the central node and the edge node to which the intermediate node belongs;
an forwarding module, configured to, when an intermediate node receives a th packet, forward the th packet according to a routing table entry corresponding to a gateway node address if the th packet carries the gateway node address, and forward the th packet according to a destination address of the th packet if the th packet does not carry the gateway node address;
an sending module, configured to, when an edge node receives a second packet, or an edge node serves as a source node to send the second packet, or an intermediate node serves as a source node to send the second packet, if a routing table entry corresponding to a destination address of the second packet is locally stored, send the second packet according to the destination address of the second packet, and if the second node does not store the routing table entry corresponding to the destination address of the second packet, add an address of a central node of a network area to which the second node belongs as a gateway node address to the second packet, and send the second packet according to the routing table entry corresponding to the gateway node address;
and the second forwarding module is configured to, when the central node receives a third packet, delete the gateway node address in the third packet if the third packet carries the gateway node address, and forward the third packet according to a destination address of the third packet.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
when the central node establishes a routing table item reaching each other node in the network area to which the central node belongs, each intermediate node and each edge node respectively establish a routing table item reaching each node on the central node-edge node connection link to which the central node belongs, and after the central node establishes the routing table item reaching each other node in the network area to which the central node belongs, when the other nodes in the network area to which the central node belongs do not store a target routing table item in the same network area, only a message needs to be sent to the central node and the message is forwarded to a target node by the central node, so that the problem that when a source node wants to communicate with a target node which does not locally store a corresponding routing table item, the process of firstly broadcasting a detection message of the target node to a destination address to the target node affects the communication efficiency among the nodes is solved, the effect that the other nodes in the area to which the central node belongs can directly communicate or communicate through the central node is achieved, and the communication efficiency among the nodes is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1A is a schematic diagram of a central node, an edge node and a middle node in a network area to which the central node belongs according to embodiments of the present invention;
fig. 1B is a flowchart of a method for transmitting data according to embodiments of the present invention;
fig. 2 is a flowchart of a method for sending a third packet according to a routing table entry corresponding to an edge node address according to embodiments of the present invention;
fig. 3A is a flowchart of a networking method of a central node according to embodiments of the present invention;
fig. 3B is a flowchart of a method for a central node to broadcast a second probe packet to a directly connected node according to embodiments of the present invention;
fig. 4 is a block diagram showing the construction of a data transmission apparatus provided in embodiments of the present invention;
fig. 5 is a block diagram showing the structure of a terminal provided in some embodiments of the present invention.
Detailed Description
To make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in further with reference to the accompanying drawings.
Please refer to fig. 1A, which illustrates a schematic diagram of a central node, an edge node, and an intermediate node in a network area to which the central node belongs according to embodiments of the present invention, where the central node is a node (such as node a) that establishes and maintains a routing table entry to each other node in the network area to which the central node belongs, the edge node is a node that is directly connected and includes a node in the network area to which the node belongs and a node outside the network area to which the edge node belongs (such as node E and node G), and the intermediate node is a node that is connected to the central node-edge node link except the central node and the edge node, and the directly connected node is only a node of another node in the network area to which the node belongs (such as node B, node C, node D, and node F).
Referring to fig. 1B, a flowchart of a method for transmitting data according to embodiments of the present invention is shown, where the method for transmitting data, applied to a wireless ad hoc network, may include the following steps:
step 101, a central node establishes a routing table entry to each other node in the network area to which the central node belongs, and each intermediate node and each edge node respectively establish a routing table entry to each node on the central node-edge node connection link to which the intermediate node and the edge node belong.
Still referring to fig. 1A, the node a is a central node of the network area 10, the node a establishes a routing table entry to each node (node B, node C, node D, node E, node F, node G) in the network area 10, and each intermediate node (node B, node C, node D, node F) and edge node (node E, node G) respectively establish a routing table entry to each node on a connection link of the node a to the edge node, such as: the node C respectively establishes a routing table entry of each node (node A, node B, node C, node D and node E) on a connection link reaching the nodes A-E, and the node F respectively establishes a routing table entry of each node (node A and node G) on a connection link reaching the nodes A-G.
Optionally, the format of the routing table entry established by the node is as follows:
address of destination node Address of the lower hop node Node hop count
For example, the node a establishes routing table entries to reach each other node in the network area to which it belongs as follows:
node B Node B 0
Node C Node B 1
Node D Node B 2
Node E Node B 3
Node F Node F 0
Node G Node F 1
For another example, the node C respectively establishes the routing table entry of each node on the connection link to the nodes a to E as follows:
node A Node B 1
Node B Node B 0
Node D Node D 0
Node E Node D 1
Optionally, the address of the node is an Internet Protocol (IP) address interconnected between networks of the node.
It should be noted that, when the central node is a heterogeneous node in the wireless ad hoc network having at least two transmission systems, the heterogeneous node is directly connected to at least two nodes having different transmission systems, and the format of the routing table entry established by the central node may further include the transmission system of the destination node:
transmission system of destination node Address of destination node Address of the lower hop node Node hop count
102, when the intermediate node receives the th packet, if the th packet carries a gateway node address, forwarding the th packet according to a routing table entry corresponding to the gateway node address, and if the th packet does not carry the gateway node address, forwarding the th packet according to a destination address of the th packet.
The th packet may carry a gateway node address in addition to an address of an active node, an address of a destination node, and communication content sent by the source node to the destination node, where the th packet to which the gateway node is added needs to pass through the gateway node, the gateway node address is usually an address of a central node, the source node is a node sending the th packet, and the destination node is a node communicating with the source node.
For example, when an intermediate node or an edge node sends an th packet to a destination node on a non-affiliated connection link, an address of a central node of a local affiliated network area is added to a th packet as a gateway node address, after the intermediate node receives a 0 th packet carried with the intermediate node, whether the 1 th packet carries the gateway node address is detected, if the 2 th packet carries the gateway node address, the th packet is forwarded to the gateway node according to a routing table entry corresponding to the gateway node address, if the th packet does not carry the gateway node address, a destination address of the th packet is obtained, if the destination address of the th packet is the address of the intermediate node, the th packet is analyzed, and if the destination address of the th packet is not the address of the intermediate node, the th packet is forwarded to the destination node according to the destination address of the th packet.
103, when the edge node receives the second message, or the edge node serves as a source node to send the second message, or the middle node serves as a source node to send the second message, if a routing table item corresponding to a destination address of the second message is stored locally, the second message is sent according to the destination address of the second message, if the second node does not store the routing table item corresponding to the destination address of the second message, an address of a central node of a network area to which the second node belongs serves as a gateway node address to be added to the second message, and the second message is sent according to the routing table item corresponding to the gateway node address.
When the central node is a heterogeneous node in the wireless ad hoc network, since the nodes with the transmission system can communicate with each other, when a source node in the area to which the central node belongs wants to communicate with a destination node with a different transmission system, the source node and the destination node can communicate through the central node, that is, the central node forwards a communication message between the source node and the destination node.
When the edge node receives a second message, the edge node obtains a destination address of the second message, if the destination address of the second message is the address of the edge node, parses the second message, if the destination address of the second message is not the address of the edge node, determines whether a routing table entry corresponding to the destination address of the second message is locally stored, if the routing table entry corresponding to the destination address of the second message is locally stored, sends the second message to the destination address, if the second node does not store the routing table entry corresponding to the destination address of the second message, it indicates that the node corresponding to the destination address is a node on a connection link to which the edge node belongs (the node may be a node on the connection link to which the edge node belongs in the area to which the edge node, or an out-of-area node of the area to which the edge node belongs), the edge node adds the address of the central node of the local network area as the gateway node address to the second message, and sends the second message to the central node according to the routing table entry corresponding to the gateway node address.
Still referring to fig. 1A, the node E receives the second message whose destination address is the node F, and since the node F is a node on a connection link to which the node E belongs in the area to which the node E belongs, and the address of the node F is not locally stored in the node E, the node E adds the address of the node a in the local area to which the node E belongs as a gateway node address to the second message, and sends the second message to the node a according to the routing table entry corresponding to the node a; and the node E receives a second message with the destination address of the node D, and the node E locally stores a routing table entry corresponding to the node D because the node D is a node on a connecting link to which the node E belongs, so that the node E sends the second message to the node D.
When the edge node is used as a source node to send a second message, judging whether a routing table item corresponding to the destination address of the second message is stored locally, if the routing table entry corresponding to the destination address of the second message is locally stored, the second message is sent to the destination address, if the second node does not store the routing table entry corresponding to the destination address of the second packet, which indicates that the node corresponding to the destination address is a node on the connection link to which the edge node belongs, it needs to forward through the central node, at this time, the edge node adds the address of the source node (i.e. the edge node) and the address of the destination node in the second packet, and also needs to add the address of the central node of the local network area as the address of the gateway node into the second packet, and sending the second message to the central node according to the routing table entry corresponding to the gateway node address.
Still referring to fig. 1A, a node E serves as a source node to send a second message to a node F, and since the node F is a node on a link to which the node E belongs in an area to which the node E belongs, and the address of the node F is not stored locally in the node E, the node E needs to add the address of the node E and the address of the node F in the second message, and also needs to add the address of the node a in the local network area serving as a gateway node address to the second message, and send the second message to the node a according to a routing table entry corresponding to the node a; and the node E serves as a source node and sends a second message to the node D, and the node E locally stores a routing table entry corresponding to the node D as the node D is a node on a connection link to which the node E belongs, so that the node E sends the second message to the node D.
When the intermediate node is used as a source node to send a second message, the intermediate node judges whether a routing table item corresponding to the destination address of the second message is stored locally, if the routing table entry corresponding to the destination address of the second message is locally stored, the second message is sent to the destination address, if the second node does not store the routing table entry corresponding to the destination address of the second packet, which indicates that the node corresponding to the destination address is a node on the connection link to which the intermediate node belongs, it needs to forward through the central node, and at this time, the intermediate node adds the address of the source node (i.e. the intermediate node) and the address of the destination node in the second packet, and also needs to add the address of the central node of the local network area as the address of the gateway node into the second packet, and sending the second message to the central node according to the routing table entry corresponding to the gateway node address.
Still referring to fig. 1A, when the node C is used as a source node to send a second message to the node F, because the node F is a node on a connection link to which the node C belongs in an area to which the node C belongs, and the address of the node F is not locally stored in the node C, the node E needs to add the address of the node C and the address of the node F in the second message, and also needs to add the address of the node a in the local network area as a gateway node address into the second message, and send the second message to the node a according to a routing table entry corresponding to the node a; and the node C serves as a source node and sends a second message to the node D, and the node D is a node on a connection link to which the node C belongs, and a routing table entry corresponding to the node D is locally stored in the node C, so that the node C sends the second message to the node D.
And 104, when the central node receives the third message, if the third message carries the gateway node address, deleting the gateway node address in the third message, and forwarding the third message according to the destination address of the third message.
If the third packet carries the gateway node address (i.e. the address of the central node), it is indicated that the central node stores the routing table entry corresponding to the destination address of the third packet, and the third packet needs to be forwarded to the destination node by the central node, when the central node receives the third packet, it is determined whether the third packet carries the gateway node address, and if the third packet carries the gateway node address, the third packet is forwarded to the destination address according to the destination address of the third packet.
In order to avoid that, when the intermediate node that receives the third packet sent by the central node is not the destination node, the intermediate node follows a default transmission mechanism due to the fact that the third packet carries the gateway node address, and sends the third packet back to the central node, the gateway node address in the third packet needs to be deleted before the central node forwards the third packet to the destination address.
Still referring to fig. 1A, when the node a receives the third packet sent to the node F, if the third packet carries the address of the node a, the address of the node a in the third packet is deleted, and the third packet is forwarded to the node F according to the locally stored routing table entry corresponding to the node F.
When the central node receives the third message, if the third message does not carry the address of the gateway node, the destination address of the third message is the address of the central node, and the central node analyzes the third message.
It should be noted that the present embodiment is not only applicable to homogeneous networks in wireless ad hoc networks, but also applicable to heterogeneous networks in wireless ad hoc networks.
In summary, in the data transmission method provided in the embodiment of the present invention, after the central node establishes the routing table entry to each other node in the belonging network area, and each intermediate node and each edge node respectively establish the routing table entry to each node on the belonging central node-edge node connection link, because after the central node establishes the routing table entry to each other node in the belonging network area, when the other nodes in the belonging network area of the central node do not store the destination routing table entry in the same network area, the message only needs to be sent to the central node, and the central node forwards the message to the destination node, the problem that the inter-node communication efficiency is affected by the process of first broadcasting the detection message of the destination node to the directly connected node whenever the source node wants to communicate with the destination node which does not locally store the corresponding routing table entry is solved, and the effect that the inter-node communication efficiency is improved by enabling direct communication between other nodes in the belonging area of the central node or performing communication through the central node is achieved.
The following embodiments 1 to 4 respectively describe the processing procedure of the central node on the third packet, the networking method of the central node, the processing procedure of the intermediate node on the th packet, and the processing procedure of the edge node on the second packet in more detail.
Embodiment 1 is a processing procedure of the central node to the third packet according to embodiments of the present invention, where the processing procedure of the central node to the third packet is applied to a wireless ad hoc network, and may include the following steps:
step a1, when the central node receives the third packet, if the third packet carries the gateway node address and the destination address of the third packet is in the network area to which the central node belongs, deleting the gateway node address in the third packet, and forwarding the third packet according to the destination address of the third packet.
And if the third message carries the gateway node address and the destination address of the third message is in the network area to which the central node belongs, indicating that the node corresponding to the destination address is a node on a connection link to which the source node of the non-third message belongs. Because the central node establishes the routing table entry reaching each other node in the network area to which the central node belongs, if the destination address of the third message is in the network area to which the central node belongs, the central node searches the routing table entry corresponding to the destination address of the third message, and forwards the third message according to the destination address of the third message.
Step a2, when the central node receives the third packet, if the third packet carries the gateway node address and the destination address of the third packet is not in the network area to which the central node belongs, deleting the gateway node address in the third packet, adding the edge node address corresponding to the destination address of the prestored third packet into the third packet, and sending the third packet according to the routing table entry corresponding to the edge node address.
The destination address of the third packet is not in the network area described by the central node, which indicates that the node corresponding to the destination address of the third packet is an outside-area node, and the inside-area node and the outside-area node need to communicate through the edge node of the network area to which the inside-area node belongs.
When the central node transmits the third message to the node outside the area, the edge node address corresponding to the destination address of the prestored third message is added to the third message, and the third message is transmitted to the next hop node (intermediate node) corresponding to the edge node address according to the routing table entry corresponding to the edge node address, so that the intermediate node transmits the third message to the edge node according to the routing table entry corresponding to the edge node address.
In possible implementation manners, please refer to fig. 2, which shows a flowchart of a method for sending a third packet according to a routing table entry corresponding to an edge node address according to embodiments of the present invention, where when a central node does not locally store an edge node address corresponding to a destination address of the third packet, step a2 may be replaced by the following steps a21 to a 24:
step a21, when the central node receives the third packet, if the third packet carries a gateway node address, the destination address of the third packet is not in the network area to which the central node belongs, and the edge node address corresponding to the destination address of the third packet is not stored locally, the central node constructs a plurality of th detection packets whose destination addresses are the destination addresses of the third packet, adds the edge node address to each th detection packet, and sends a plurality of th detection packets.
Wherein, the address of the edge node in each th detection message is the address of each edge node in the network area to which the central node belongs.
When the central node does not locally store the edge node address corresponding to the destination address of the third packet, it is indicated that the node corresponding to the destination address of the third packet is an out-of-area node, because the in-area node needs to communicate with the out-of-area node through the edge node of the network area to which the in-area node belongs, when the central node does not store the edge node address corresponding to the destination address of the third packet, the central node needs to construct a plurality of th probe packets whose destination addresses are the destination addresses of the third packet, and send the constructed th probe packet to the edge node in the network area to which the central node belongs, and the edge node broadcasts the th probe packet to the out-of-area node , thereby detecting the route to the destination address of the third packet.
In order to avoid that the address of the node outside the area is not stored by part of the intermediate nodes, and the third message cannot be processed in the next step after the third message is received, the central node adds an edge node address to each -th detection message in the process of constructing the -th detection message, and after each -th detection message is constructed, according to the routing table entry corresponding to the edge node address in the -th detection message, sends the -th detection message to the next -hop node (intermediate node) corresponding to the edge node, so that when the intermediate node receives the -th detection message, the -th detection message is forwarded to the edge node according to the routing table entry corresponding to the edge node address in the -th detection message.
Still referring to fig. 1A, it is assumed that the node a does not locally store the routing table entry corresponding to the node I, and when the node a receives the third packet sent by the node C to the node I, because the node I is not in the network area to which the central node belongs, the node a constructs -th probe packets with destination addresses of the node I, and adds an edge node address to each -th probe packet (for example, adds the address of the node G to the -th probe packet sent to the node G, and adds the address of the node E to the -th probe packet sent to the node E).
Step A22, each edge node performs broadcasting on the th probe message when receiving the th probe message.
After receiving the th detection message, the edge node broadcasts the 0 th detection message to the outside the area directly connected to the edge node, after receiving the 1 th detection message, the outside-area node stores the routing table entry corresponding to the edge node address and obtains the destination address of the 2 th detection message (the destination address of the 3 th detection message is the central node), judges whether the routing table entry corresponding to the destination address of the 4th detection message is locally stored, if the routing table entry corresponding to the destination address of the th detection message is not locally stored, the th detection message is continuously broadcast to the directly connected node , if the routing table entry corresponding to the destination address of the th detection message is locally stored, the th detection success message is fed back to the edge node, the source node of the th detection success message is the node locally storing the routing table entry corresponding to the destination address of the th detection message, and the destination node of the th detection message is the central node.
Optionally, the th probe packet carries the packet identifier of the th probe packet, and after receiving the th probe packet, the node parses the packet identifier of the th probe packet, matches the packet identifier with a locally stored packet identifier, determines whether the locally stored packet identifier is stored, stores the packet identifier if the locally stored packet identifier is not stored, and processes the th probe packet, and does not process the th probe packet if the locally stored packet identifier is stored.
Step A23, when each edge node receives the detection success message, according to the detection success message, a routing table corresponding to the destination address of the detection message is established, the address of the edge node is added to the detection success message, and the detection success message is forwarded according to the detection success message destination address.
After the th detection message sent by the edge node is received by the node outside the area, if the routing table entry corresponding to the destination address of the th detection message is not locally stored, the th detection message is continuously broadcast to the directly connected node , and if the routing table entry corresponding to the destination address of the th detection message is locally stored, a th detection success message is fed back to the edge node.
When the edge node receives the th detection success message, according to the address of the source node carried in the th detection success message, a routing table entry corresponding to the destination address of the th detection message is established, and the address of the edge node is added to the th detection success message, and the th detection success message is forwarded according to the destination address of the th detection success message.
Still referring to fig. 1A, when an edge node E receives an th probe message sent by a node a, 0 th probe message is broadcast to a directly connected node (for example, node D and node H) , and after the node H receives the th probe message, it is determined whether a routing table entry corresponding to the node I address is locally stored, because the node I is a directly connected node of the node H, each node may periodically maintain the routing table entry of the directly connected node, that is, the node H stores the routing table entry corresponding to the node I address, so the node H may feed back a th probe success message (the source node of the th probe success message is the node H, and the destination node is the node a) to the node E, and when the node E receives an th probe success message, the node E establishes the routing table entry of the node I address according to the th probe success message, adds the address of the node E to the th probe success message, and forwards the th probe success message according to the destination address of the th probe success message (the address of the node a).
Step a24, when the central node receives the th detection success message, the address of the edge node is obtained in the th detection success message, and the obtained address of the edge node is stored as the address of the edge node corresponding to the destination address of the third message.
After receiving the th detection success message, the central node acquires the address of the edge node in the th detection success message, and locally stores the routing table entry corresponding to the destination address of the third message.
Still referring to fig. 1A, after the node a receives the th detection success packet sent by the node E and related to the node I, the node a acquires the address of the node E from the th detection success packet, and stores the address of the node E as the address of the edge node corresponding to the node I.
Optionally, the format of the routing table entry established by the node is as follows:
address of destination node Addresses of edge nodes
The routing table entry stored by the node a as the edge node address corresponding to the node I is:
node I Node E
Step A25, the central node deletes the gateway node address in the third message, adds the edge node address corresponding to the destination address of the prestored third message into the third message, and sends the third message according to the routing table entry corresponding to the edge node address.
In summary, in the data transmission method provided in the embodiment of the present invention, after the central node establishes the routing table entry to each other node in the belonging network area, and each intermediate node and each edge node respectively establish the routing table entry to each node on the belonging central node-edge node connection link, because after the central node establishes the routing table entry to each other node in the belonging network area, when the other nodes in the belonging network area of the central node do not store the destination routing table entry in the same network area, the message only needs to be sent to the central node, and the central node forwards the message to the destination node, the problem that the inter-node communication efficiency is affected by the process of first broadcasting the detection message of the destination node to the directly connected node whenever the source node wants to communicate with the destination node which does not locally store the corresponding routing table entry is solved, and the effect that the inter-node communication efficiency is improved by enabling direct communication between other nodes in the belonging area of the central node or performing communication through the central node is achieved.
Example 2
Referring to fig. 3A, a flow chart of a method for networking a central node according to embodiments of the present invention is shown, where the method for networking a central node, which is applied to a wireless ad hoc network, may include the following steps:
step 301, the central node broadcasts a second detection packet to the directly connected node , where the second detection packet carries the hop count value and the address of the central node.
The hop count value is the node hop count of the center node from the edge node of the area to which the center node belongs, that is, the hop count required by the center node to send a message to the edge node of the area to which the center node belongs.
The hop count value is used for controlling the number of each node in the network area to which the central node belongs, and the larger the hop count value is, the more the number of nodes in the area to which the central node belongs is, and the smaller the hop count value is, the less the number of nodes in the area to which the central node belongs is.
Step 302a, when a th node receives a second detection message sent by a second node directly connected, acquiring an address of a center node carried in the second detection message and an address of a node through which the second detection message passes, establishing a routing table corresponding to the address of the center node and the address of the node through which the second detection message passes, subtracting 1 from a hop count value carried in the second detection message, if the hop count value subtracted by 1 is not equal to 0, recording the node as an intermediate node by the th node, adding the address of the th node into the second detection message with the hop count value adjusted, and sending the second detection message to a node directly connected with the th node other than the second node.
Still referring to fig. 1A, the hop value is set to 3, and when the node B receives a second detection packet sent by the node a, the node B obtains an address of the node a and an address of a node through which the second detection packet passes, which are carried in the second detection packet, and establishes a routing table entry corresponding to the address of the node a and the address of the node through which the second detection packet passes; subtracting 1 from the hop value carried in the second detection message, recording the node B as an intermediate node by the node B because the hop value after subtracting 1 is 3, adding the address of the node B into the second detection message after adjusting the hop value, and sending the second detection message to a node C which is not the node A and is directly connected with the node B.
After the node B adds the address of the node B to the second detection packet after adjusting the hop value, the second detection packet at least contains the following contents:
a source node: address of node A
Jump value
Message type: second detection message
Address of node B
Step 302b, when the th node receives a second detection message sent by a second node directly connected, acquiring an address of a center node carried in the second detection message and an address of a node through which the second detection message passes, establishing a routing table corresponding to the address of the center node and the address of the node through which the second detection message passes, subtracting 1 from a hop count value carried in the second detection message, if the hop count value after subtracting 1 is equal to 0, recording that the second node is an edge node by the second node, generating a second detection success message with a destination address being the address of the center node, adding the address of the th node and the address of the node through which the second detection message passes into the second detection success message, and sending the second detection success message.
Still referring to fig. 1A, setting the hop value to 3, when receiving a second detection packet sent by the node a, the node E obtains an address of the node a and addresses of nodes (node B, node C, and node D) through which the second detection packet passes, which are carried in the second detection packet, and establishes a routing table entry corresponding to the address of the node a and the addresses of the nodes (node B, node C, and node D) through which the second detection packet passes; subtracting 1 from the hop value carried in the second detection message, wherein the hop value after subtracting 1 is 0, the node E records that the node E is an edge node, generates a second detection success message with the destination address being the address of the node A, adds the address of the node E and the addresses of the nodes (node B, node C and node D) through which the second detection message passes in the reverse order of the nodes through which the second detection message passes (namely the order of the nodes through which the second detection success message passes) into the second detection success message, and sends the second detection success message to the node A.
Wherein, the second detection success message sent by the node E to the node a at least contains the following contents:
Figure BDA0001276376540000141
Figure BDA0001276376540000151
step 303, when the central node receives the second detection success message, establishing a routing table entry corresponding to the address of the th node carried in the second detection success message and the address of the node through which the second detection message passes.
And after receiving the second detection success message, the central node acquires the th node address carried in the second detection success message and the address of the node through which the second detection message passes, and establishes a routing table entry corresponding to the th node address carried in the second detection success message and the address of the node through which the second detection message passes.
Still referring to fig. 1A, after receiving the second successful detection packet sent by the node E, the node a establishes a routing table entry corresponding to the address of the node E carried in the second successful detection packet and the address of the node (node B, node C, node D) through which the second detection packet passes.
The routing table entry established by the node a at least includes:
node B Node B 0
Node C Node B 1
Node D Node B 2
Node E Node B 3
Optionally, the central node periodically maintains the routing table entry corresponding to the node of each communication system in the network area to which the central node belongs, and the maintenance periods corresponding to the nodes of different communication systems may be the same or different.
In summary, in the data transmission method provided in the embodiment of the present invention, after the central node establishes the routing table entry to each other node in the belonging network area, and each intermediate node and each edge node respectively establish the routing table entry to each node on the belonging central node-edge node connection link, because after the central node establishes the routing table entry to each other node in the belonging network area, when the other nodes in the belonging network area of the central node do not store the destination routing table entry in the same network area, the message only needs to be sent to the central node, and the central node forwards the message to the destination node, the problem that the inter-node communication efficiency is affected by the process of first broadcasting the detection message of the destination node to the directly connected node whenever the source node wants to communicate with the destination node which does not locally store the corresponding routing table entry is solved, and the effect that the inter-node communication efficiency is improved by enabling direct communication between other nodes in the belonging area of the central node or performing communication through the central node is achieved.
In possible implementation manners, please refer to fig. 3B, which shows a flowchart of a method for a central node to broadcast a second probe packet to a directly connected node according to embodiments of the present invention, where the central node is a heterogeneous node in a wireless ad hoc network, step 301 may be replaced by the following steps 301a to 303 d:
in step 301a, the central node determines, according to preset logical transmission distances corresponding to different transmission systems, a logical transmission distance corresponding to each transmission system used by a node directly connected to the central node, and determines, among the determined logical transmission distances, an th logical transmission distance closest to each logical transmission distance.
The heterogeneous node is a node having at least two transmission schemes, such as a node having functions of a third Generation mobile communication technology (3G) and a fourth Generation mobile communication technology (4G), or a node having functions of a second Generation mobile phone communication technology (2G), bluetooth and WIreless FIdelity (Wi-Fi).
Optionally, because the corresponding logical transmission distances corresponding to different transmission systems are different (for example, the logical transmission distance of bluetooth is about 10 meters, and the logical transmission distance of Wi-Fi is about 150 meters), the central node may determine, from the directly connected nodes, a node of a certain communication system as a reference node, and the logical transmission distance corresponding to the reference node is the th logical transmission distance.
Optionally, the th logical transmission distance is a distance of an intermediate value in the logical transmission distances corresponding to each transmission system used by the nodes directly connected to the center node.
Optionally, the th logical transmission distance is a logical transmission distance corresponding to each transmission system used by a node directly connected to the central node, and an average value of the logical transmission distances.
It should be noted that, except for the central node, the transmission systems of the nodes belonging to the same transmission link are the same.
In step 301b, the central node determines the product of the th logical transmission distance and a preset reference hop value as the logical area radius of the network area to which the central node belongs.
For example, if the th logical transmission distance is 50 meters and the preset reference hop value is 5, the logical area radius of the network area to which the central node belongs is 250(50 × 5) meters.
Step 301c, the central node determines the quotient of the radius of the logical area divided by the logical transmission distance corresponding to each transmission system to obtain the hop count value corresponding to each transmission system.
For example, the radius of a logical area of a network area to which a certain center node belongs is set to 200 meters, the hop count value corresponding to the transmission scheme of the node with the logical transmission distance of 10 meters in the area to which the center node belongs is set to 20(200/10), and the hop count value corresponding to the transmission scheme of the node with the logical transmission distance of 50 meters in the area of the center node is set to 4.
Step 301d, for any node directly connected to the central node, the central node determines a hop value corresponding to the transmission scheme used by any node, and sends a second detection packet to any node, where the second detection packet carries the hop value corresponding to the transmission scheme used by any node and the address of the central node.
Still referring to fig. 1A, the hop value corresponding to the transmission system 1 used by the node B is 3, the hop value carried in the second detection message sent by the node a to the node B is 3, the hop value corresponding to the transmission system 2 used by the node F is 1, and the hop value carried in the second detection message sent by the node a to the node F is 1.
Embodiment 3 is a flowchart of a method for processing the th packet by the intermediate node according to another embodiments of the present invention, where the processing of the th packet by the intermediate node is applied to a wireless ad hoc network, and the method includes the following steps:
and step B1, when the intermediate node receives the th message, if the th message carries the gateway node address, forwarding the th message according to the routing table entry corresponding to the gateway node address.
And step B2, when the intermediate node receives the th packet, if the th packet carries the edge node address, forwarding the th packet according to the routing table entry corresponding to the edge node address.
The th message may carry an edge node address in addition to the address of the source node, the address of the destination node, and the communication content sent by the source node to the destination node, and the th message to which the edge node is added needs to pass through the edge node and the destination address of the th message is an out-of-area node.
For example, when a central node or an intermediate node sends an th packet to an outside-area node, an edge node in a connecting link between the central node and the edge node is added to a th packet as an edge node address, after the intermediate node receives the th packet, whether the th packet carries the edge node address is detected, and if the th packet carries the edge node address, the th packet is forwarded to the edge node according to a routing table entry corresponding to the edge node address.
Step B3, when the intermediate node receives the th message, if the th message does not carry the gateway node address or the edge node address, the th message is forwarded according to the destination address of the th message.
If the th message does not carry the gateway node address or the edge node address, it indicates that the destination node receiving the th message and the source node are in the same center node-edge node connection link, and since each intermediate node establishes a routing table entry to each node on the center node-edge node connection link to which it belongs, when the intermediate node receives the th message that does not carry the gateway node address or the edge node address, the intermediate node searches for a routing table entry corresponding to the destination address of the th message, and forwards the th message according to the destination address of the th message.
It should be noted that, since step B1 is similar to step 102, step B1 is not described again in this embodiment.
In summary, in the data transmission method provided in the embodiment of the present invention, after the central node establishes the routing table entry to each other node in the belonging network area, and each intermediate node and each edge node respectively establish the routing table entry to each node on the belonging central node-edge node connection link, because after the central node establishes the routing table entry to each other node in the belonging network area, when the other nodes in the belonging network area of the central node do not store the destination routing table entry in the same network area, the message only needs to be sent to the central node, and the central node forwards the message to the destination node, the problem that the inter-node communication efficiency is affected by the process of first broadcasting the detection message of the destination node to the directly connected node whenever the source node wants to communicate with the destination node which does not locally store the corresponding routing table entry is solved, and the effect that the inter-node communication efficiency is improved by enabling direct communication between other nodes in the belonging area of the central node or performing communication through the central node is achieved.
Embodiment 4 is a processing procedure of the edge node to the second packet according to embodiments of the present invention, where the processing procedure of the center node to the third packet is applied to a wireless ad hoc network, and may include the following steps:
and step C1, when the edge node receives the second message, or the edge node sends the second message as a source node, or the middle node sends the second message as a source node, if the second message carries the edge node address, deleting the edge node address in the second message.
If the second packet carries the edge node address, it is indicated that the edge node stores a routing table entry corresponding to the destination address of the second packet, and the second packet needs to be forwarded to the destination address by the edge node.
In order to avoid that when the node outside the area that receives the second packet sent by the edge node is not the destination node, the node outside the area follows a default transmission mechanism due to the fact that the second packet carries the edge node address, and sends the second packet back to the edge node, the edge node address in the second packet needs to be deleted before the edge node forwards the second packet to the destination address.
Still referring to fig. 1A, when the node E receives the second packet sent to the node I, if the second packet carries the address of the node E, the address of the node E in the second packet is deleted, and the second packet is forwarded to the node I according to the locally stored routing table entry corresponding to the node I.
And step C2, if the routing table item corresponding to the destination address of the second message is stored locally, sending the second message according to the destination address of the second message, if the second node does not store the routing table item corresponding to the destination address of the second message, adding the address of the central node of the local network area as the gateway node address into the second message, and sending the second message according to the routing table item corresponding to the gateway node address.
It should be noted that, since step C2 is similar to step 103, step C2 is not described again in this embodiment.
In summary, in the data transmission method provided in the embodiment of the present invention, after the central node establishes the routing table entry to each other node in the belonging network area, and each intermediate node and each edge node respectively establish the routing table entry to each node on the belonging central node-edge node connection link, because after the central node establishes the routing table entry to each other node in the belonging network area, when the other nodes in the belonging network area of the central node do not store the destination routing table entry in the same network area, the message only needs to be sent to the central node, and the central node forwards the message to the destination node, the problem that the inter-node communication efficiency is affected by the process of first broadcasting the detection message of the destination node to the directly connected node whenever the source node wants to communicate with the destination node which does not locally store the corresponding routing table entry is solved, and the effect that the inter-node communication efficiency is improved by enabling direct communication between other nodes in the belonging area of the central node or performing communication through the central node is achieved.
The following is an embodiment of the apparatus of the present invention, and for details which are not described in detail in the embodiment of the apparatus, reference may be made to the corresponding method embodiment.
Referring to fig. 4, fig. 4 is a block diagram of a data transmission apparatus provided in embodiments of the present invention, the data transmission method is applied to a wireless ad hoc network, and the apparatus includes a setup module 401, a forwarding module 402, a sending module 403, and a second forwarding module 404.
An establishing module 401, configured to establish, by a central node, a routing table entry to each other node in an affiliated network area, where each intermediate node and each edge node respectively establish a routing table entry to each node on an affiliated central node-edge node connection link;
an forwarding module 402, configured to, when the intermediate node receives the th packet, forward the th packet according to a routing table entry corresponding to the gateway node address if the th packet carries the gateway node address, and forward the th packet according to a destination address of the th packet if the th packet does not carry the gateway node address;
a sending module 403, configured to, when the edge node receives the second packet, or the edge node serves as a source node to send the second packet, or the middle node serves as a source node to send the second packet, if a routing table entry corresponding to a destination address of the second packet is locally stored, send the second packet according to the destination address of the second packet, if the second node does not store the routing table entry corresponding to the destination address of the second packet, add an address of a central node of a network area to which the second node belongs as a gateway node address to the second packet, and send the second packet according to the routing table entry corresponding to the gateway node address;
a second forwarding module 404, configured to, when the central node receives the third packet, delete the gateway node address in the third packet if the third packet carries the gateway node address, and forward the third packet according to the destination address of the third packet.
In possible implementation manners, the apparatus further includes a second sending module, a third forwarding module, a deleting module, a forwarding module, and a second forwarding module.
The second sending module is used for adding a prestored edge node address corresponding to the destination address of the third message into the third message and sending the third message according to a routing table item corresponding to the edge node address if the destination address of the third message is not in the network area to which the central node belongs when the central node receives the third message;
a third forwarding module, configured to forward, when the intermediate node receives the th packet, the th packet according to a routing table entry corresponding to the edge node address if the th packet carries the edge node address;
a deleting module, configured to delete an edge node address in the second message if the second message carries the edge node address before sending the second message according to a destination address of the second message after the edge node receives the second message;
the th forwarding module is further configured to forward the th packet according to the destination address of the th packet if the th packet does not carry the gateway node address or the edge node address;
and the second forwarding module is further configured to forward the third packet according to the destination address of the third packet if the destination address of the third packet is within the network area to which the central node belongs.
In possible implementation manners, the apparatus further includes a third sending module, a third forwarding module, a fourth forwarding module, and a storage module.
A third sending module, configured to, if an edge node address corresponding to a destination address of a third packet is not stored locally, before adding an edge node address corresponding to the destination address of the third packet stored in advance to the third packet, construct, by the central node, -th probe packets with destination addresses being the destination address of the third packet, add an edge node address to each -th probe packet, and send a plurality of -th probe packets, where an edge node address in each -th probe packet is an address of each edge node in a network area to which the central node belongs;
a fourth forwarding module, configured to forward, when the intermediate node receives the th probe message, the th probe message according to the routing table entry corresponding to the edge node address in the th probe message;
a fifth forwarding module, configured to, when each edge node receives the th probe message, perform broadcasting on the th probe message, when a th probe success message is received, establish a routing table entry corresponding to a destination address of the th probe message according to the th probe success message, add an address of the fifth forwarding module to the th probe success message, and forward the th probe success message according to the destination address of the th probe success message;
and the storage module is used for acquiring the address of the edge node in the detection success message when the central node receives the th detection success message, and storing the acquired address of the edge node as the address of the edge node corresponding to the destination address of the third message.
In possible implementation manners, the establishing module 401 includes a broadcast unit, a sending unit and an establishing unit.
a broadcasting unit, configured to broadcast, by the central node, a second detection packet to the directly connected node , where the second detection packet carries the hop count value and the address of the central node;
the sending unit is used for acquiring the address of a center node carried in a second detection message and the address of a node through which the second detection message is transmitted when the th node receives the second detection message sent by a directly connected second node, establishing a routing table corresponding to the address of the center node and the address of the node through which the second detection message is transmitted, subtracting 1 from the hop number value carried in the second detection message, recording the th node as an intermediate node if the hop number value subtracted 1 is not equal to 0, adding the address of the th node into the second detection message with the hop number value adjusted, sending the second detection message to a node directly connected with the th node except the second node, recording the second node as an edge node if the hop number value subtracted 1 is equal to 0, generating a second successful detection message with the destination address of the center node, adding the address of the th node and the address of the node through which the second detection message is transmitted into the second detection message, and sending the second successful detection message;
and the establishing unit is used for establishing a routing table entry corresponding to the address of the th node carried in the second detection success message and the address of the node through which the second detection message passes when the central node receives the second detection success message.
In possible implementation manners, the central node is a heterogeneous node in a wireless ad hoc network, and the broadcast unit includes:
, determining a subunit, configured to determine, by the central node, a logical transmission distance corresponding to each transmission system used by a node directly connected to the central node according to preset logical transmission distances corresponding to different transmission systems, and determine, among the determined logical transmission distances, a -th logical transmission distance closest to each logical transmission distance;
the second determining subunit is used for determining the product of the th logical transmission distance and a preset reference hop value as the logical area radius of the network area to which the central node belongs by the central node;
the calculation subunit is used for determining a quotient of the radius of the logic area divided by the logic transmission distance corresponding to each transmission system by the central node to obtain a hop value corresponding to each transmission system;
and the sending subunit is configured to, for any node directly connected to the central node, determine, by the central node, a hop value corresponding to the transmission scheme used by any node, and send a second detection packet to any node, where the second detection packet carries the hop value corresponding to the transmission scheme used by any node and the address of the central node.
In summary, in the data transmission device provided in the embodiment of the present invention, after the central node establishes the routing table entry to each other node in the belonging network area, and each intermediate node and each edge node respectively establish the routing table entry to each node on the belonging central node-edge node connection link, because after the central node establishes the routing table entry to each other node in the belonging network area, when the other nodes in the belonging network area of the central node do not store the destination routing table entry in the same network area, the message only needs to be sent to the central node, and the central node forwards the message to the destination node, the problem that the process of broadcasting the detection message of the destination node to the directly connected node affects the communication efficiency between the nodes is solved, and the effect that the other nodes in the belonging area of the central node can directly communicate or communicate through the central node is achieved, thereby improving the communication efficiency between the nodes.
It should be noted that, when the data transmission device provided in the foregoing embodiment displays a main page interface, only the division of the functional modules is illustrated, and in practical applications, the function distribution may be completed by different functional modules according to needs, that is, the internal structure of the terminal is divided into different functional modules to complete all or part of the functions described above.
Referring to fig. 5, which illustrates a block diagram of a terminal 500 provided in some embodiments of the invention for implementing the data transmission methods provided in the above embodiments, the terminal 500 of the invention may include or more components including a processor for executing computer program instructions to perform the various processes and methods, Random Access Memory (RAM) and Read Only Memory (ROM) for data and storing program instructions, memory for storing data and data, I/O devices, interfaces, antennas, etc. in particular:
the terminal 500 may include an RF (Radio Frequency) circuit 510, a memory 520, an input unit 530, a display unit 550, a sensor 550, an audio circuit 550, a WiFi (wireless fidelity) module 570, a processor 580, a power supply 582, a camera 590, and the like. Those skilled in the art will appreciate that the terminal structure shown in fig. 5 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The various components of terminal 500 are described in detail below with reference to fig. 5:
RF circuit 510 may be used to receive and transmit signals during a data or call, and in particular, receive downlink data from a base station and process the received data to processor 580, and transmit design uplink data to the base station in General, RF circuits include, but are not limited to, an antenna, at least amplifiers, a transceiver, a coupler, a LNA (Low noise Amplifier), a duplexer, etc. furthermore, RF circuit 510 may also communicate with a network and other devices via wireless communication, which may use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communications), GPRS (General Packet Radio Service), CDMA (Code Division Multiple Access, SMS Code Division Multiple Access), WCDMA (Wideband Code Division Multiple Access), LTE (Long Term Evolution, short message Service, etc.
The memory 520 may be used to store software programs and modules, and the processor 580 may execute various functional applications and data processes of the terminal 500 by operating the software programs and modules stored in the memory 520, the memory 520 may mainly include a stored program area, which may store an operating system, application programs (such as a sound playing function, an image playing function, etc.) required for at least functions, and the like, and a stored data area, which may store data (such as audio data, a phonebook, etc.) created according to the use of the terminal 500, and the like, and furthermore, the memory 520 may include a high-speed random access memory and may further include a nonvolatile memory, for example, at least disk storage devices, flash memory devices, or other volatile solid-state storage devices.
The input unit 530 may be used to receive input numeric or character data and generate key signal inputs related to user settings and function controls of the terminal 500. specifically, the input unit 530 may include a touch panel 531 and other input devices 532. the touch panel 531, also referred to as a touch screen, may collect touch operations of a user on or near the touch panel 531 (such as operations of the user on or near the touch panel 531 using any suitable object or attachment such as a finger, a stylus, etc.) and drive corresponding connection means according to a preset program. alternatively, the touch panel 531 may include both touch detection means and touch controller, wherein the touch detection means detects a touch orientation of the user and detects signals resulting from the touch operations and transmits the signals to the touch controller, the touch controller receives touch data from the touch detection means and converts it into touch coordinates and transmits the touch coordinates to the processor 580, and can receive commands from the processor 580 and execute the commands, and the touch panel 531 may be implemented using a resistive, capacitive, infrared, and surface type, and the like, and may include various types of input devices such as a mouse button switch, a keyboard, a joystick, a mouse.
The display unit 550 may be used to display data input by or provided to a user and various menus of the terminal 500. the display unit 550 may include a display panel 551, and optionally, the display panel 551 may be configured in the form of an LCD (Liquid crystal display), an OLED (Organic Light-Emitting Diode), or the like, and further , the touch panel 531 may cover the display panel 551, and when the touch panel 531 detects a touch operation on or near the touch panel 531, the touch panel 531 may transmit to the processor 580 to determine the type of the touch event, and then the processor 580 may provide a corresponding visual output on the display panel 551 according to the type of the touch event.
The terminal 500 may further include at least sensors 550, such as a gyroscope sensor, a magnetic induction sensor, a light sensor, a motion sensor, and other sensors, specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 551 according to the brightness of ambient light, the proximity sensor may turn off the display panel 551 and/or a backlight when the terminal 500 moves to the ear, as the motion sensor, the acceleration sensor may detect the magnitude of acceleration in various directions ( is three axes), may detect the magnitude and direction of gravity when the terminal is stationary, may be used for applications for recognizing the terminal posture (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), and the like, and other sensors such as a barometer, a hygrometer, a thermometer, an infrared sensor, and the like, which are further configured in the terminal 500, will not be described herein.
The audio circuit 550 may convert received audio data into an electrical signal, transmit the electrical signal to the speaker 551, and convert the signal into a sound signal for output by the speaker 551, or the microphone 552 may convert a collected sound signal into an electrical signal, convert the signal into audio data by the audio circuit 550, process the audio data by the audio data output processor 580, and transmit the audio data to another terminal through the RF circuit 510, or output the audio data to the memory 520 for processing in step .
WiFi belongs to a short-distance wireless transmission technology, and the terminal 500 may help a user send and receive e-mails, browse web pages, access streaming media, and the like through the WiFi module 570, and provide the user with wireless broadband internet access. Although fig. 5 shows the WiFi module 570, it is understood that it does not belong to the essential constitution of the terminal 500, and may be omitted entirely within the scope of not changing the essence of the disclosure as needed.
Processor 580 is the control center for terminal 500 and interfaces and circuitry to connect the various parts of the overall terminal to perform the overall monitoring of the terminal 500 by running or executing software programs and/or modules stored in memory 520 and invoking data stored in memory 520. alternatively, processor 580 may comprise or more processing units, and preferably, processor 580 may integrate an application processor, which handles primarily the operating system, user interfaces, application programs, etc., and a modem processor, which handles primarily the wireless communications.
The terminal 500 also includes a power supply 582 (e.g., a battery) that provides power to the various components, and preferably is logically coupled to the processor 582 via a power management system that provides management of charging, discharging, and power consumption.
The camera 590 generally comprises a lens fixed above the image sensor, which can be adjusted manually to change the focus, an image sensor equivalent to the 'film' of a traditional camera, which is the heart of the camera to collect images, a digital signal processor, which processes the collected images through mathematical operations, converts the collected analog images into digital images and sends the digital images to the memory 520 through the interface, and a display screen, wherein the interface is used to connect the camera with the terminal main board by using a flat cable, a board-to-board connector, and a spring connection manner, and sends the collected images to the memory 520.
Although not shown, the terminal 500 may further include a bluetooth module or the like, which is not described in detail herein.
The terminal 500, in addition to comprising or processors 580, includes a memory and or more programs, wherein or more programs are stored in the memory and configured to be executed by or more processors to perform the above-described data transmission methods.
It should be noted that the terminal and data transmission device embodiments and the data transmission method embodiments provided in the foregoing embodiments belong to the same concept of , and specific implementation processes thereof are described in detail in the method embodiments and are not described herein again.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the program may be stored in computer readable storage media, which may be read only memory, magnetic or optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (10)

  1. The data transmission method of is applied to a wireless ad hoc network, the wireless ad hoc network includes at least central nodes, each central node corresponds to network areas including a plurality of nodes, the plurality of nodes in the network areas include central nodes, edge nodes and intermediate nodes, and the method includes:
    the central node establishes a routing table entry reaching each other node in the network area to which the central node belongs, and each intermediate node and each edge node respectively establish a routing table entry reaching each node on the central node-edge node connection link to which the intermediate node belongs;
    when an intermediate node receives an th message, if the th message carries a gateway node address, forwarding the th message according to a routing table entry corresponding to the gateway node address, if the th message does not carry the gateway node address, acquiring a destination address of the th message, and when the destination address of the th message is not the address of the intermediate node, forwarding the th message according to the destination address of the th message;
    when the edge node receives the second message, or the edge node is used as the source node to send the second message, or the middle node is used as the source node to send the second message, acquiring the destination address of the second message, if the destination address of the second message is not the address of the edge node, determining whether a routing table entry corresponding to the destination address of the second message is stored locally, if the routing table entry corresponding to the destination address of the second message is locally stored, according to the destination address of the second message, sending the second message, if the routing table entry corresponding to the destination address of the second message is not stored locally, the address of the central node of the local home network area is added as the gateway node address to the second message, sending the second message according to the routing table entry corresponding to the gateway node address;
    when a central node receives a third message, if the third message carries a gateway node address, deleting the gateway node address in the third message, and forwarding the third message according to a destination address of the third message.
  2. 2. The method of claim 1, further comprising:
    when a central node receives a third message, if the destination address of the third message is not in the network area to which the central node belongs, adding a prestored edge node address corresponding to the destination address of the third message into the third message, and sending the third message according to a routing table item corresponding to the edge node address;
    when the intermediate node receives the th message, if the th message carries an edge node address, forwarding the th message according to a routing table entry corresponding to the edge node address;
    after receiving a second message, an edge node deletes an edge node address in the second message if the second message carries the edge node address before sending the second message according to a destination address of the second message;
    if the th message does not carry a gateway node address, forwarding the th message according to the destination address of the th message, including if the th message does not carry a gateway node address or an edge node address, forwarding the th message according to the destination address of the th message;
    the forwarding the third packet according to the destination address of the third packet includes: and if the destination address of the third message is in the network area to which the central node belongs, forwarding the third message according to the destination address of the third message.
  3. 3. The method according to claim 2, wherein if the edge node address corresponding to the destination address of the third packet is not locally stored, before adding the edge node address corresponding to the destination address of the third packet, which is stored in advance, to the third packet, the method further comprises:
    the central node constructs th detection messages with destination addresses of the third message, adds an edge node address in each th detection message, and sends the th detection messages, wherein the edge node address in each th detection message is the address of each edge node in the network region to which the central node belongs;
    when the intermediate node receives the th detection message, forwarding the th detection message according to the routing table entry corresponding to the edge node address in the th detection message;
    when each edge node receives the th detection message, broadcasting the th detection message, when a th detection success message is received, establishing a routing table entry corresponding to the destination address of the th detection message according to the th detection success message, adding the address of the edge node to the th detection success message, and forwarding the th detection success message according to the destination address of the th detection success message;
    when the central node receives the th detection success message, the address of the edge node is obtained in the th detection success message, and the obtained address of the edge node is stored as the address of the edge node corresponding to the destination address of the third message.
  4. 4. The method of claim 1, wherein the central node establishes routing entries to each other node in the home network region, and each intermediate node and edge node establishes routing entries to each node on the home central node-edge node connection link, respectively, comprising:
    the central node broadcasts a second detection message to a directly connected node , wherein the second detection message carries a hop value and an address of the central node;
    when an node receives a second detection message sent by a directly connected second node, acquiring the address of a center node carried in the second detection message and the address of a node through which the second detection message passes, and establishing a routing table corresponding to the address of the center node and the address of the node through which the second detection message passes, subtracting 1 from the hop count value carried in the second detection message, if the hop count value after subtracting 1 is not equal to 0, recording the node itself as a middle node by the node, adding the address of the node into the second detection message after adjusting the hop count value, sending the second detection message to a node directly connected with the node except the second node, if the hop count value after subtracting 1 is equal to 0, recording the node itself as an edge node by the second node, generating a second detection success message with the destination address of the center node, adding the address of the node and the address of the node through which the second detection message passes, and sending the second detection success message into the second detection message;
    when the central node receives the second detection success message, establishing a routing table entry corresponding to the address of the th node carried in the second detection success message and the address of the node through which the second detection message passes.
  5. 5. The method of claim 4, wherein the central node is a heterogeneous node in the wireless ad hoc network;
    the central node broadcasts a second detection packet to a node directly connected to the central node, where the second detection packet carries a hop value and an address of the central node, and includes:
    the central node determines a logical transmission distance corresponding to each transmission system used by a node directly connected with the central node according to preset logical transmission distances corresponding to different transmission systems, and determines th logical transmission distances closest to the logical transmission distances in the determined logical transmission distances;
    the central node determines the product of the th logical transmission distance and a preset reference hop value as the logical area radius of the network area to which the central node belongs;
    the central node determines the quotient of the radius of the logic area divided by the logic transmission distance corresponding to each transmission system to obtain the hop count value corresponding to each transmission system;
    for any node directly connected to the center node, the center node determines a hop value corresponding to the transmission scheme used by the any node, and sends a second detection packet to the any node, where the second detection packet carries the hop value corresponding to the transmission scheme used by the any node and the address of the center node.
  6. kinds of data transmission device, characterized in that, the device is applied to wireless self-organizing network, the wireless self-organizing network includes at least central nodes, each central node corresponds to network areas containing multiple nodes, the multiple nodes in the network area include central node, edge node and middle node, the device includes:
    the establishing module is used for the central node to establish a routing table entry reaching each other node in the network area to which the central node belongs, and each intermediate node and each edge node respectively establish a routing table entry reaching each node on the connecting link of the central node and the edge node to which the intermediate node belongs;
    an forwarding module, configured to, when an intermediate node receives a th packet, forward the th packet according to a routing table entry corresponding to a gateway node address if the th packet carries the gateway node address, obtain a destination address of the th packet if the th packet does not carry the gateway node address, and forward the th packet according to the destination address of the th packet when the th packet does not carry the destination address of the intermediate node;
    an sending module, configured to, when an edge node receives a second packet, or an edge node sends the second packet as a source node, or an intermediate node sends the second packet as a source node, obtain a destination address of the second packet, if the destination address of the second packet is not the address of the edge node, determine whether a routing table entry corresponding to the destination address of the second packet is stored locally, if a routing table entry corresponding to the destination address of the second packet is stored locally, send the second packet according to the destination address of the second packet, and if a routing table entry corresponding to the destination address of the second packet is not stored locally, add an address of a central node of a local network area as a gateway node address to the second packet, and send the second packet according to the routing table entry corresponding to the gateway node address;
    and the second forwarding module is configured to, when the central node receives a third packet, delete the gateway node address in the third packet if the third packet carries the gateway node address, and forward the third packet according to a destination address of the third packet.
  7. 7. The apparatus of claim 6, further comprising:
    a second sending module, configured to, when a central node receives a third packet, add, if a destination address of the third packet is not in a network area to which the central node belongs, an edge node address corresponding to the destination address of the third packet stored in advance to the third packet, and send the third packet according to a routing table entry corresponding to the edge node address;
    a third forwarding module, configured to, when an th packet is received by an intermediate node, forward the th packet according to a routing table entry corresponding to an edge node address if the th packet carries the edge node address;
    a deleting module, configured to delete an edge node address in a second packet if the second packet carries the edge node address before sending the second packet according to a destination address of the second packet after the edge node receives the second packet;
    the forwarding module is further configured to forward the th packet according to the destination address of the th packet if the th packet does not carry a gateway node address or an edge node address;
    the second forwarding module is further configured to forward the third packet according to the destination address of the third packet if the destination address of the third packet is in the network area to which the central node belongs.
  8. 8. The apparatus of claim 7, further comprising:
    a third sending module, configured to, if an edge node address corresponding to a destination address of the third packet is not stored locally, before the edge node address corresponding to the destination address of the third packet stored in advance is added to the third packet, construct, by the central node, a plurality of -th probe packets whose destination addresses are the destination addresses of the third packet, add an edge node address to each -th probe packet, and send the plurality of -th probe packets, where an edge node address in each -th probe packet is an address of each edge node in a network area to which the central node belongs;
    a fourth forwarding module, configured to forward, when the intermediate node receives the th probe message, the th probe message according to a routing table entry corresponding to an edge node address in the th probe message;
    a fifth forwarding module, configured to, when each edge node receives the th probe packet, perform broadcasting on the th probe packet, when receiving the th probe success packet, establish a routing table entry corresponding to a destination address of the th probe packet according to the th probe success packet, add an address of the fifth forwarding module to the th probe success packet, and forward the th probe success packet according to the destination address of the th probe success packet;
    a storage module, configured to, when the central node receives the th detection success packet, obtain the address of the edge node in the th detection success packet, and store the obtained address of the edge node as an edge node address corresponding to the destination address of the third packet.
  9. 9. The apparatus of claim 6, wherein the establishing module comprises:
    a broadcasting unit, configured to broadcast, by a central node, a second detection packet to a directly connected node , where the second detection packet carries a hop value and an address of the central node;
    a sending unit, configured to, when a node receives a second probe packet sent by a second node directly connected to the node, obtain an address of a center node carried in the second probe packet and an address of a node through which the second probe packet is transmitted, and establish a routing table entry corresponding to the address of the center node and the address of the node through which the second probe packet is transmitted, subtract 1 from a hop count value carried in the second probe packet, if the hop count value subtracted 1 is not equal to 0, record itself as an intermediate node by an node, add the address of a node to the second probe packet after adjusting the hop count value, and send the second probe packet to a node directly connected to a node other than the second node, if the hop count value subtracted 1 is equal to 0, record itself as an edge node by the second node, generate a second probe success packet whose destination address is the address of the center node, and add the address of the node and the address of the node through which the second probe packet passes the second probe packet to the second probe success packet, and send the second probe packet;
    and the establishing unit is configured to, when the central node receives the second detection success packet, establish a routing table entry corresponding to the address of the th node carried in the second detection success packet and the address of the node through which the second detection packet passes.
  10. 10. The apparatus of claim 9, wherein the central node is a heterogeneous node in the wireless ad hoc network;
    the broadcast unit comprises:
    , a determining subunit, configured to determine, by the central node, a logical transmission distance corresponding to each transmission scheme used by a node directly connected to the central node according to preset logical transmission distances corresponding to different transmission schemes, and determine, among the determined logical transmission distances, a th logical transmission distance closest to each logical transmission distance;
    a second determining subunit, configured to determine, by the central node, a product of the -th logical transmission distance and a preset reference hop value as a logical area radius of a network area to which the central node belongs;
    a calculating subunit, configured to determine, by the central node, a quotient obtained by dividing the radius of the logic area by the logic transmission distance corresponding to each transmission system, to obtain a hop count value corresponding to each transmission system;
    a sending subunit, configured to, for any node directly connected to the central node, determine, by the central node, a hop value corresponding to the transmission scheme used by the any node, and send a second probe packet to the any node, where the second probe packet carries the hop value corresponding to the transmission scheme used by the any node and the address of the central node.
CN201710267273.6A 2017-04-21 2017-04-21 Data transmission method and device Active CN107147579B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710267273.6A CN107147579B (en) 2017-04-21 2017-04-21 Data transmission method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710267273.6A CN107147579B (en) 2017-04-21 2017-04-21 Data transmission method and device

Publications (2)

Publication Number Publication Date
CN107147579A CN107147579A (en) 2017-09-08
CN107147579B true CN107147579B (en) 2020-01-31

Family

ID=59774625

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710267273.6A Active CN107147579B (en) 2017-04-21 2017-04-21 Data transmission method and device

Country Status (1)

Country Link
CN (1) CN107147579B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108684024A (en) * 2018-04-28 2018-10-19 上海与德通讯技术有限公司 Blueteeth network system
CN110401716B (en) * 2019-07-26 2021-09-03 宙安科技河北有限公司 Communication method and system between edge nodes
CN114466008B (en) * 2021-12-22 2023-10-13 天翼云科技有限公司 Cloud edge communication system, cloud edge communication method, cloud edge communication device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1741501A (en) * 2005-09-22 2006-03-01 中国科学院计算技术研究所 Radio network group relationship routing system and method that part connects
CN101325544A (en) * 2008-07-21 2008-12-17 武汉理工大学 Method for establishing multi-path route based on link multiple characteristic values in wireless sensor network
CN103702381A (en) * 2012-09-28 2014-04-02 山东大学(威海) Routing void processing method for wireless sensor network
CN104507135A (en) * 2015-01-21 2015-04-08 哈尔滨工程大学 Underwater sensor network routing method of plurality of mobile convergent nodes
CN106131919A (en) * 2016-07-15 2016-11-16 中国电子科技集团公司第五十四研究所 A kind of synchronous method of non-stop layer self-organized network topology

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1741501A (en) * 2005-09-22 2006-03-01 中国科学院计算技术研究所 Radio network group relationship routing system and method that part connects
CN101325544A (en) * 2008-07-21 2008-12-17 武汉理工大学 Method for establishing multi-path route based on link multiple characteristic values in wireless sensor network
CN103702381A (en) * 2012-09-28 2014-04-02 山东大学(威海) Routing void processing method for wireless sensor network
CN104507135A (en) * 2015-01-21 2015-04-08 哈尔滨工程大学 Underwater sensor network routing method of plurality of mobile convergent nodes
CN106131919A (en) * 2016-07-15 2016-11-16 中国电子科技集团公司第五十四研究所 A kind of synchronous method of non-stop layer self-organized network topology

Also Published As

Publication number Publication date
CN107147579A (en) 2017-09-08

Similar Documents

Publication Publication Date Title
CN113038566B (en) Path selection method, terminal and network equipment
US9844062B2 (en) Apparatus and method for configuring relay channel of mobile device
Khan et al. A new patient monitoring framework and Energy-aware Peering Routing Protocol (EPR) for Body Area Network communication
CN110856103B (en) Scheduling method, communication method and related equipment
CN107147549B (en) Intelligent household equipment networking method and device
JP7345062B2 (en) Relay connection establishment method and equipment
CN107147579B (en) Data transmission method and device
CN112269842B (en) Information processing method, device, storage medium and computer equipment
CN107222902A (en) A kind of method and apparatus for transmitting data
CN112040475A (en) Communication connection method, system, terminal equipment and network equipment
CN107896385B (en) Mobile terminal wireless local area network scan method and apparatus, computer equipment
CN107969025B (en) Mobile terminal wireless local area network scanning method and device and computer equipment
CN105530684B (en) Network access method, device and system
CN106470234B (en) Equipment discovery method and device
KR102596801B1 (en) PC5 link establishment methods, equipment and systems
CN108243455B (en) Service data sending method, device and terminal
WO2017076279A1 (en) Method of updating forward information base item, and device and system utilizing same
CN113543267A (en) Method for determining side link SL relay node, SL relay node and terminal
CN111132073B (en) Multicast communication link layer identifier updating method, device and terminal equipment
CN106954245B (en) Data transmission method and device
CN107371212B (en) Method and device for sending data
CN107534958B (en) Signal transmission method, base station and user equipment
CN113873684A (en) Connection establishing method and device based on local area network, terminal equipment and storage medium
CN107483468A (en) Obtain the methods, devices and systems of configuration information
CN113988237A (en) Electronic price tag communication control method, electronic price tag communication control equipment and computer readable storage medium

Legal Events

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