CN111787593A - Data transmission method and node - Google Patents

Data transmission method and node Download PDF

Info

Publication number
CN111787593A
CN111787593A CN201910266820.8A CN201910266820A CN111787593A CN 111787593 A CN111787593 A CN 111787593A CN 201910266820 A CN201910266820 A CN 201910266820A CN 111787593 A CN111787593 A CN 111787593A
Authority
CN
China
Prior art keywords
node
data packet
address information
ttl
address
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.)
Granted
Application number
CN201910266820.8A
Other languages
Chinese (zh)
Other versions
CN111787593B (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.)
Datang Mobile Communications Equipment Co Ltd
Original Assignee
Telecommunications Science and Technology Research Institute 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 Telecommunications Science and Technology Research Institute Co Ltd filed Critical Telecommunications Science and Technology Research Institute Co Ltd
Priority to CN201910266820.8A priority Critical patent/CN111787593B/en
Publication of CN111787593A publication Critical patent/CN111787593A/en
Application granted granted Critical
Publication of CN111787593B publication Critical patent/CN111787593B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W40/00Communication routing or communication path finding
    • H04W40/02Communication route or path selection, e.g. power-based or shortest path routing
    • H04W40/22Communication route or path selection, e.g. power-based or shortest path routing using selective relaying for reaching a BTS [Base Transceiver Station] or an access point
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5069Address allocation for group communication, multicast communication or broadcast communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W40/00Communication routing or communication path finding
    • H04W40/02Communication route or path selection, e.g. power-based or shortest path routing
    • H04W40/04Communication route or path selection, e.g. power-based or shortest path routing based on wireless node resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W40/00Communication routing or communication path finding
    • H04W40/24Connectivity information management, e.g. connectivity discovery or connectivity update
    • H04W40/248Connectivity information update
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

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

Abstract

The invention provides a data transmission method and a node, wherein the data transmission method receives a broadcasted data packet and acquires address information carried in the data packet, wherein the address information at least comprises an address of a destination node and an address of a next hop relay node; judging whether the first node is a destination node in the address information; and if the first node is not the destination node in the address information, broadcasting the data packet after updating the time-to-live (TTL) of the data packet according to the address information. Therefore, the data transmission method controls the sending or forwarding node to send data to the next-hop relay node in the transmission path in a local area broadcasting mode, and improves the success rate of receiving data by the next-hop relay node in the transmission path under the condition that the network topology changes and the routing table of the node is not updated in time, thereby increasing the support of the network on the node mobility and the link state change and enhancing the robustness of network data transmission.

Description

Data transmission method and node
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a data transmission method and a node.
Background
In a wireless network, data transmission modes include unicast and broadcast, the unicast and broadcast are transmitted through a shared wireless channel, and nodes in a communication range can receive the transmitted data. The difference between unicast and broadcast is that the node does not process the unicast data of the destination node, but needs to process and forward the received broadcast data. The unicast data transmission in the network requires to know the transmission path of the data in advance, and the data is transmitted to the destination node through the nodes (relay nodes) on the transmission path, and the transmission path is usually determined by a routing protocol.
The quality of data transmission in the network depends on a routing algorithm, when the network topology changes and a routing protocol does not complete the updating of a routing table caused by the change of the network topology, a transmission path is determined according to the non-updated routing table in the data transmission process, so that data loss is easily caused, and the data transmission performance of the network is influenced.
Disclosure of Invention
In view of this, the present invention provides a data transmission method and a node, so as to solve the problem that data loss is easily caused and data transmission performance of a network is affected when a transmission path is determined according to an un-updated routing table in the current data transmission process.
In order to solve the above technical problem, the present invention provides a data transmission method, which is applied to a first node, and the method includes:
receiving a broadcasted data packet, and acquiring address information carried in the data packet, wherein the address information at least comprises an address of a destination node and an address of a next hop relay node;
judging whether the first node is a destination node in the address information;
and if the first node is not the destination node in the address information, broadcasting the data packet after updating the time-to-live (TTL) of the data packet according to the address information.
Optionally, if the first node is not the destination node in the address information, after updating the TTL of the data packet according to the address information, broadcasting the data packet includes:
and if the first node is the next hop relay node in the address information, updating the TTL of the data packet to a target TTL and then broadcasting the data packet, wherein the target TTL is an integer not less than 2.
Optionally, before broadcasting the data packet, the method further includes:
determining a next hop relay node from the first node to a target node according to the routing table of the first node;
and updating the address of the next hop relay node in the address information to the address of the next hop relay node from the first node to the destination node.
Optionally, the method further comprises:
and determining the target TTL according to the moving speed of the neighbor node of the first node.
Optionally, if the first node is not the destination node in the address information, after updating the TTL of the data packet according to the address information, broadcasting the data packet includes:
and if the first node is not the destination node in the address information and is not the next hop relay node in the address information, the TTL of the data packet is subtracted by 1, and then the data packet is broadcasted.
Optionally, if the first node is not the destination node in the address information and is not the next-hop relay node in the address information, the step of broadcasting the data packet after subtracting 1 from the TTL of the data packet includes:
if the first node is not the destination node in the address information and is not the next hop relay node in the address information, judging whether the TTL of the data packet is more than 1;
and if the TTL of the data packet is more than 1, the TTL of the data packet is subtracted by 1, and then the data packet is broadcasted.
Optionally, after the determining, according to the address information, whether the first node is a destination node in the address information, the method further includes:
and if the first node is the destination node in the address information, analyzing the data packet and processing the data packet.
Optionally, the receiving a broadcasted data packet and acquiring address information carried in the data packet include:
receiving a broadcasted data packet, and judging whether the first node receives the data packet for the first time;
and if the first node receives the data packet for the first time, acquiring address information carried in the data packet.
Optionally, the determining whether the first node receives the data packet for the first time includes:
and acquiring the identification information of the data packet, and judging whether the first node receives the data packet for the first time according to the identification information of the data packet.
In a second aspect, a data transmission method is further provided, which is applied to a second node, and the method includes:
encapsulating data to be sent into a data packet carrying address information, wherein the address information at least comprises an address of a destination node and an address of a next hop relay node;
setting a Time To Live (TTL) for the data packet, wherein the TTL is an integer not less than 2;
and broadcasting the data packet carrying the TTL.
Optionally, the setting TTL for the data packet includes:
and setting TTL for the data packet according to the moving speed of the neighbor node of the second node.
Optionally, before encapsulating the data to be sent into a data packet carrying address information, the method further includes:
determining the address of a destination node of the data to be sent;
and determining the address of the next hop relay node from the second node to the destination node according to the routing table of the second node.
Optionally, the method further comprises:
and generating identification information for the data packet, and carrying the identification information in the data packet.
In a third aspect, a node is further provided, where the node is a first node, and includes a processor, a transceiver, a memory, and a computer program stored in the memory and executable on the processor, where the processor is specifically configured to, when executing the computer program:
receiving a broadcasted data packet through the transceiver, and acquiring address information carried in the data packet, wherein the address information at least comprises a destination node address and an address of a next hop relay node;
judging whether the first node is a destination node in the address information;
and if the first node is not the destination node in the address information, broadcasting the data packet through the transceiver after updating the lifetime TL of the data packet according to the address information.
Optionally, the processor is specifically configured to:
and if the first node is the next hop relay node in the address information, updating the TTL of the data packet to a target TTL, and broadcasting the data packet through the transceiver, wherein the target TTL is an integer not less than 2.
Optionally, before broadcasting the data packet through the transceiver, the processor is further configured to:
determining a next hop relay node from the first node to a destination node according to the routing table of the first node;
and updating the address of the next hop relay node in the address information to the address of the next hop relay node from the first node to the destination node.
Optionally, the processor is further configured to:
and determining the target TTL according to the moving speed of the neighbor node of the first node.
Optionally, the processor is specifically configured to:
and if the first node is not the destination node in the address information and is not the next hop relay node in the address information, subtracting 1 from the TTL of the data packet, and broadcasting the data packet through the transceiver.
Optionally, the processor is specifically configured to:
if the first node is not the destination node in the address information and is not the next hop relay node in the address information, judging whether the TTL of the data packet is more than 1;
and if the TTL of the data packet is more than 1, the TTL of the data packet is subtracted by 1, and then the data packet is broadcasted through the transceiver.
Optionally, the processor is further configured to:
and if the first node is the destination node in the address information, analyzing the data packet and processing the data packet.
Optionally, the processor is specifically configured to:
receiving a broadcasted data packet through the transceiver, and judging whether the first node receives the data packet for the first time;
and if the first node receives the data packet for the first time, acquiring address information carried in the data packet.
Optionally, the processor is specifically configured to:
and acquiring the identification information of the data packet, and judging whether the first node receives the data packet for the first time according to the identification information of the data packet.
In a fourth aspect, a node is provided, where the node is a second node, and includes a processor, a transceiver, a memory, and a computer program stored in the memory and executable on the processor, where the processor is specifically configured to, when executing the computer program:
encapsulating data to be transmitted into a data packet carrying address information, wherein the address information at least comprises addresses of a destination node and a next hop relay node;
setting a Time To Live (TTL) for the data packet, wherein the TTL is an integer not less than 2;
and broadcasting the data packet carrying the TTL through the transceiver.
Optionally, the processor is specifically configured to:
and setting TTL for the data packet according to the moving speed of the neighbor node of the second node.
Optionally, the processor is further configured to:
determining the address of a destination node of the data to be sent;
and determining the address of the next hop relay node from the second node to the destination node according to the routing table of the second node.
Optionally, the processor is further configured to:
and generating identification information for the data packet, and carrying the identification information in the data packet.
In a fifth aspect, there is also provided a node, where the node is a first node, and the first node includes:
the system comprises a receiving module, a sending module and a receiving module, wherein the receiving module is used for receiving a broadcasted data packet and acquiring address information carried in the data packet, and the address information at least comprises an address of a destination node and an address of a next hop relay node;
the judging module is used for judging whether the first node is a destination node in the address information;
and the broadcasting module is used for broadcasting the data packet after updating the time-to-live (TTL) of the data packet according to the address information if the first node is not the destination node in the address information.
In a sixth aspect, there is further provided a node, where the node is a second node, and the second node includes:
the device comprises an encapsulation module, a sending module and a receiving module, wherein the encapsulation module is used for encapsulating data to be sent into a data packet carrying address information, and the address information at least comprises an address of a destination node and an address of a next hop relay node;
a setting module, configured to set a time to live TTL for the data packet, where the TTL is an integer not less than 2;
and the broadcasting module is used for broadcasting the data packet carrying the TTL.
In a seventh aspect, a computer-readable storage medium is further provided, where a computer program is stored on the computer-readable storage medium, and when being executed by a processor, the computer program implements the steps performed by the first node in the above data transmission method; alternatively, the computer program, when executed by the processor, implements the steps performed by the second node in the above data transmission method.
In the embodiment of the present invention, the data transmission method receives a broadcasted data packet, and acquires address information carried in the data packet, where the address information at least includes an address of a destination node and an address of a next-hop relay node; judging whether the first node is a destination node in the address information; and if the first node is not the destination node in the address information, broadcasting the data packet after updating the time-to-live (TTL) of the data packet according to the address information. Therefore, the data transmission method controls the sending or forwarding node to send data to the next-hop relay node in the transmission path in a local area broadcasting mode, and improves the success rate of receiving data by the next-hop relay node in the transmission path under the condition that the network topology changes and the routing table of the node is not updated in time, thereby increasing the support of the network on the node mobility and the link state change and enhancing the robustness of network data transmission.
Drawings
Fig. 1 is a flowchart of a data transmission method according to an embodiment of the present invention;
fig. 2 is a second flowchart of a data transmission method according to an embodiment of the invention;
fig. 3 is a schematic diagram of a network topology according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a network topology after the node 15 moves in the network topology shown in fig. 3;
fig. 5 is a schematic diagram of a network topology after the node 7 moves in the network topology shown in fig. 3;
FIG. 6 is a diagram illustrating a first node according to an embodiment of the present invention;
FIG. 7 is a diagram illustrating a second node according to an embodiment of the present invention;
FIG. 8 is a second schematic diagram of a first node according to the second embodiment of the present invention;
FIG. 9 is a second schematic diagram of a second node according to the second embodiment of the present invention;
FIG. 10 is a third exemplary diagram of a first node according to the present invention;
fig. 11 is a third schematic diagram of a second node according to the embodiment of the invention.
Detailed Description
The following detailed description of embodiments of the present invention will be made with reference to the accompanying drawings and examples. The following examples are intended to illustrate the invention but are not intended to limit the scope of the invention.
The terms "comprises," "comprising," or any other variation thereof, in the description and claims of this application, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. Furthermore, the use of "and/or" in the specification and claims means that at least one of the connected objects, such as a and/or B, means that three cases, a alone, B alone, and both a and B, exist.
In the embodiments of the present invention, words such as "exemplary" or "for example" are used to mean serving as examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "e.g.," an embodiment of the present invention is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
The techniques described herein are not limited to New wireless communication Systems (NRs), and may also be used for various wireless communication systems, such as Long-term Evolution (Long Time Evolution, LTE)/LTE Evolution (LTE-Advanced, LTE-a) systems, Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), Frequency Division Multiple Access (FDMA), Orthogonal Frequency Division Multiple Access (OFDMA), Single-carrier Frequency-Division Multiple Access (SC-FDMA), and other systems. The terms "system" and "network" are often used interchangeably. CDMA systems may implement Radio technologies such as CDMA2000, Universal Terrestrial Radio Access (UTRA), and so on. UTRA includes Wideband CDMA (Wideband Code Division Multiple Access, WCDMA) and other CDMA variants. TDMA systems may implement radio technologies such as Global System for Mobile communications (GSM). The OFDMA system may implement radio technologies such as Ultra Mobile Broadband (UMB), evolved-UTRA (E-UTRA), IEEE 802.11(Wi-Fi), IEEE802.16(WiMAX), IEEE 802.20, Flash-OFDM, etc. UTRA and E-UTRA are parts of the Universal Mobile Telecommunications System (UMTS). LTE and higher LTE (e.g., LTE-A) are new UMTS releases that use E-UTRA. UTRA, E-UTRA, UMTS, LTE-A, NR, and GSM are described in documents from an organization named "third Generation Partnership Project" (3 GPP). CDMA2000 and UMB are described in documents from an organization named "third generation partnership project 2" (3GPP 2). The techniques described herein may be used for both the above-mentioned systems and radio technologies, as well as for other systems and radio technologies.
Unicast (Unicast) and Broadcast (Broadcast) are terms used to describe the manner of communication between nodes in a network. Communication between nodes is as if it were a conversation between people, which may be described by the term "unicast" in a network if one person talks to another, when the reception and delivery of data only takes place between two nodes. Unicast is widely applied to networks, and most data on the network is transmitted in a unicast manner, for example, when receiving and sending an email and browsing a Web page, a connection is established with a mail server and a Web (World Wide Web, also called World Wide Web) server, and a unicast data transmission mode is used. Unicast is also called "Point-to-Point communication" (Point), and is generally used in correspondence with broadcast.
The broadcast is a pair of all communication modes between nodes, the nodes in the network transmit data sent by each node unconditionally, all nodes can receive all data regardless of the need, the broadcast communication mode does not need to select a transmission path, and the cost is low. The broadcast is applied to a network, for example, a process that a client automatically obtains an IP (internet Protocol) address through a DHCP (Dynamic Host Configuration Protocol) is realized through a broadcast communication mode. Compared with unicast, broadcast occupies almost all the bandwidth of the network in the subnet and is prone to cause collision and interference with each other.
The wireless routing protocol can have a plurality of classification modes according to different emphasis points, and the path number selected according to the protocol can be divided into a single-path routing protocol and a multi-path routing protocol. Compared with the single-path routing, the multi-path routing has great advantages in terms of fault tolerance, routing reliability, QoS (Quality of Service) routing, and the like.
Single-path routing protocols can be classified into proactive routing protocols, on-demand routing protocols, and hybrid routing protocols, depending on the manner in which the routes are established. The active routing protocol is also called a table-driven routing protocol, and each node in the network periodically performs routing packet broadcasting to maintain a routing table containing routing information reaching all other nodes, and updates the routing table at any time according to the change of the network topology so as to accurately reflect the topology structure of the network in real time. The active routing has the advantages that when the routing information of the destination node exists, the data packet transmission process can be started immediately, and the delay is small; the disadvantage is that a large amount of routing control messages are needed, and the protocol overhead is large. Common table-driven routing protocols include: DSDV (destination sequential Distance Vector Routing), FSR (fish eye State Routing), OLSR (Optimized Link State Routing), TBRPF (Topology Broadcast based on Reverse Path Forwarding), lammar (Ad hoc Routing), etc.
In the on-demand routing protocol, nodes do not need to maintain timely and accurate routing information, and the routing information is searched when the data packet transmission needs. The on-demand routing protocol is mainly divided into two processes of 'route searching' and 'route maintenance'. Compared with a table-driven routing protocol, the on-demand routing protocol has low overhead and is more suitable for an ad hoc (point-to-point) wireless network. However, the data message transmission delay is large, and the method is not suitable for data transmission with high real-time requirement. Common on-demand routing protocols include: AODV (ad hoc On-Demand Distance Vector Routing), DSR (Dynamic Source Routing), TORA (temporal-Ordered Routing algorithm), ABR (Area Border Routing), MSR (MicroSensor Routing), etc.
The hybrid routing protocol is a combination of proactive and on-demand routing protocols. The routing protocol adopts a proactive routing protocol in a small-range local area, and adopts an on-demand routing protocol for route searching of nodes outside the area. Therefore, the problem of overlarge control overhead in an active routing protocol and the problem of long time delay in an on-demand routing protocol are avoided, and the common hierarchical routing protocol comprises the following steps: ZRP (Zone Routing Protocol), CEDAR (Core-extracted Distributed ad hoc network Routing ), SRL (source Routing Label), and the like.
Multipath routing provides a simple mechanism to distribute traffic, balance network load, and provide fault tolerance capabilities, and is therefore always favored in circuit-switched networks and packet-switched networks. Multipath routing has the following characteristics:
(1) different paths may be provided for different quality of service requirements.
(2) Multiple paths may be provided for the same type of service, and higher quality of service may be achieved via aggregation.
(3) Because the host has autonomous use right for the path, the host can guess the congestion degree of the network by detecting the condition (such as packet loss rate) of each path, and accordingly adjust the use of each path, thereby obtaining high-quality service and simultaneously improving the utilization rate of the network.
It should be noted that, in the embodiment of the present invention, a node is any device having a unique network address, for example, a workstation, a terminal device, a server, a sensor device, and the like. The data transmission method provided by the embodiment of the invention has the precondition that the node completes the processes of network synchronization, neighbor discovery, routing selection and the like, namely, the node in the network has the capability of sending network data according to the routing table, but the specific implementation modes of network synchronization, neighbor discovery and routing selection are not limited.
Referring to fig. 1, fig. 1 is a flowchart of a data transmission method according to an embodiment of the present invention, and referring to fig. 1, an execution subject of the data transmission method is a first node, and the specific steps are as follows:
step 101, receiving a broadcasted data packet, and acquiring address information carried in the data packet, wherein the address information at least comprises an address of a destination node and an address of a next hop relay node.
And 102, judging whether the first node is a destination node in the address information.
And 103, if the first node is not the destination node in the address information, broadcasting the data packet after updating the time-to-live (TTL) of the data packet according to the address information.
In this embodiment, the first node receives a data packet broadcast by another node, and acquires address information carried in the data packet, where the address information at least includes an address of a destination node and an address of a next-hop relay node. The first node is any node in a wireless network. In some embodiments of the present invention, the address information may further include an address of a source node, so that the destination node can determine the source node of the data packet conveniently.
The first node may determine, according to the address information, whether the first node is a destination node, and specifically, the first node may obtain an address of the destination node in the address information, then determine whether its own address is the same as the address of the destination node, and if the own address is the same as the address of the destination node, determine that the first node is the destination node in the address information.
If the first node is not the destination node in the address information, the first node updates the TTL (Time To Live) of the data packet according To the address information, and broadcasts the data packet after updating the TTL of the data packet according To the address information. The updating of the TTL of the data packet according to the address information may specifically be determining an update mode of the TTL according to a condition that whether the first node is a next-hop relay node in the address information, and then updating the TTL of the data packet according to the determined update mode. And the update mode of the TTL comprises updating the TTL to a target TTL or subtracting 1 from the TTL.
And if the first node is the destination node in the address information, the first node analyzes the data packet and correspondingly processes the data packet.
In some embodiments of the present invention, after receiving a broadcasted data packet, the first node may determine whether the first node receives the data packet for the first time, and if the first node receives the data packet for the first time, obtain address information carried in the data packet; and if the first node does not receive the data packet for the first time, discarding the data packet and not processing the data packet.
In this embodiment, the data transmission method receives a broadcasted data packet and obtains address information carried in the data packet, where the address information at least includes an address of a destination node and an address of a next-hop relay node; judging whether the first node is a destination node in the address information; and if the first node is not the destination node in the address information, broadcasting the data packet after updating the time-to-live (TTL) of the data packet according to the address information. Therefore, the data transmission method controls the sending or forwarding node to send data to the next-hop relay node in the transmission path in a local area broadcasting mode, and improves the success rate of receiving data by the next-hop relay node in the transmission path under the condition that the network topology changes and the routing table of the node is not updated in time, thereby increasing the support of the network on the node mobility and the link state change and enhancing the robustness of network data transmission.
Optionally, if the first node is not the destination node in the address information, after updating the TTL of the data packet according to the address information, broadcasting the data packet includes:
and if the first node is the next hop relay node in the address information, updating the TTL of the data packet to a target TTL and then broadcasting the data packet, wherein the target TTL is an integer not less than 2.
In this embodiment, the first node determines an update mode of the TTL according to a condition that whether the first node is a next-hop relay node in the address information, and then updates the TTL of the data packet according to the determined update mode. Specifically, if the first node is a next hop relay node in the address information, the first node updates the TTL of the data packet to a target TTL, and broadcasts the data packet, where the target TTL is an integer not less than 2.
Optionally, before broadcasting the data packet, the method further includes:
determining a next hop relay node from the first node to a target node according to the routing table of the first node;
and updating the address of the next hop relay node in the address information to the address of the next hop relay node from the first node to the destination node.
And when the first node is the next hop relay node in the address information, the first node further updates the next hop relay node in the address information. Specifically, the first node may determine, according to the routing table of the first node, a next-hop relay node from the first node to the destination node, and then update the address of the next-hop relay node in the address information to the address of the next-hop relay node from the first node to the destination node.
Optionally, the method further comprises:
and determining the target TTL according to the moving speed of the neighbor node of the first node.
And when the first node is the next hop relay node in the address information, the first node determines the target TTL according to the moving speed of the neighbor node of the first node, and then updates the TTL of the data packet to the target TTL. The target TTL may be the same as or different from the TTL set for the packet by the source node of the packet.
Optionally, if the first node is not the destination node in the address information, after updating the TTL of the data packet according to the address information, broadcasting the data packet includes:
and if the first node is not the destination node in the address information and is not the next hop relay node in the address information, the TTL of the data packet is subtracted by 1, and then the data packet is broadcasted.
Optionally, if the first node is not the destination node in the address information and is not the next-hop relay node in the address information, the step of broadcasting the data packet after subtracting 1 from the TTL of the data packet includes:
if the first node is not the destination node in the address information and is not the next hop relay node in the address information, judging whether the TTL of the data packet is more than 1;
and if the TTL of the data packet is more than 1, the TTL of the data packet is subtracted by 1, and then the data packet is broadcasted.
In this embodiment, the first node determines an update mode of the TTL according to a condition that whether the first node is a next-hop relay node in the address information, and then updates the TTL of the data packet according to the determined update mode. Specifically, if the first node is not the destination node in the address information and is not the next hop relay node in the address information, the first node determines whether the TTL of the packet is greater than 1; and if the TTL of the data packet is more than 1, the TTL of the data packet is subtracted by 1, and then the data packet is broadcasted.
It can be understood that, when the source node of the packet controls the transmission range of the packet by setting TTL, the TTL of the packet is reduced by 1 each time the packet is forwarded by a non-relay node. And when the TTL is not more than 1, the data packet is not forwarded any more, so that the control of the transmission range of the data packet can be realized. In this embodiment, the first node broadcasts the packet only when the TTL of the packet is greater than 1, and does not broadcast the packet when the TTL of the packet is not greater than 1.
Optionally, after the determining, according to the address information, whether the first node is a destination node in the address information, the method further includes:
and if the first node is the destination node in the address information, analyzing the data packet and processing the data packet.
In this embodiment, if the first node is a destination node in the address information, the first node does not need to broadcast the data packet, and the first node parses the data packet and processes the data packet.
Optionally, the receiving a broadcasted data packet and acquiring address information carried in the data packet include:
receiving a broadcasted data packet, and judging whether the first node receives the data packet for the first time;
and if the first node receives the data packet for the first time, acquiring address information carried in the data packet.
In this embodiment, after receiving the data packet, the first node determines whether the first node receives the data packet for the first time, and if the first node receives the data packet for the first time, acquires address information carried in the data packet. And if the first node does not receive the data packet for the first time, the first node discards the data packet without performing subsequent processing.
It can be understood that, when the first node receives the data packet for the first time, the first node has already processed the data packet, in this embodiment, if the first node does not receive the data packet for the first time, the data packet is discarded, and subsequent processing is not performed, which can effectively reduce redundancy of data and reduce transmission burden of the node.
Optionally, the determining whether the first node receives the data packet for the first time includes:
and acquiring the identification information of the data packet, and judging whether the first node receives the data packet for the first time according to the identification information of the data packet.
In this embodiment, the first node determines whether the first node is a first received data packet according to the identification information of the data packet. The identification information is information for uniquely identifying the data packet, and may be, for example, a sequence number of the data packet, and the source node of each data packet may generate a fixed sequence number for the data packet, and the sequence table is not changed in the process of sending and forwarding the data packet.
Referring to fig. 2, fig. 2 is a second flowchart of a data transmission method provided in the embodiment of the present invention, and as shown in fig. 2, an execution subject of the data transmission method is a second node, which specifically includes the following steps:
step 201, encapsulating data to be transmitted into a data packet carrying address information, where the address information at least includes an address of a destination node and an address of a next hop relay node.
Step 202, setting a Time To Live (TTL) for the data packet, wherein the TTL is an integer not less than 2.
And 203, broadcasting the data packet carrying the TTL.
In this embodiment, when data needs to be sent, the second node encapsulates a data packet to be sent into a data packet carrying address information, where the address information at least includes an address of a destination node and an address of a next-hop relay node. In some embodiments of the present invention, the address information may further include an address of a source node, that is, may further include an address of the second node, so that, when the destination node receives the data packet, the destination node can determine the source node of the data packet by using the address information.
And the second node sets TTL for the data packet, wherein the TTL is an integer not less than 2, and after the TTL is set, the second node broadcasts the data packet carrying the TTL, so that the local broadcast range of the data packet is set by setting the TTL. The second node may determine the TTL according to the moving speed of its neighboring node, and in a general case, the TTL may be set to 2 or 3. On one hand, when the value is too large, the local area broadcast may cause a sharp increase in system overhead, and on the other hand, if the transmission data has reached the next hop node in the 1-hop or 2-hop broadcast process, the additional broadcast may not bring any benefit.
The second node may be the same node as the first node, or may be a different node from the first node. Specifically, when the second node is the same as the first node, the first node receives a data packet broadcast by other nodes; when the second node is a node different from the first node, the first node may receive a data packet broadcast by the second node, or may receive a data packet broadcast by another node.
In this embodiment, the data transmission method encapsulates data to be transmitted into a data packet carrying address information, where the address information at least includes an address of a destination node and an address of a next hop relay node; setting a Time To Live (TTL) for the data packet, wherein the TTL is an integer not less than 2; and broadcasting the data packet carrying the TTL. The data transmission method transmits data to the next hop relay node in the transmission path in a local area broadcasting mode, improves the success rate of data transmission in the convergence process of a routing protocol under the condition that the network topology changes and the routing table of the node is not updated in time, increases the support of the network on the node mobility and the link state change, and enhances the robustness of network data transmission.
Optionally, the setting TTL for the data packet includes:
and setting TTL for the data packet according to the moving speed of the neighbor node of the second node.
In this embodiment, the second node sets TTL for the packet according to the moving speed of its neighbor node. For example, the faster the moving speed, the larger the TTL can be set.
Optionally, before encapsulating the data to be sent into a data packet carrying address information, the method further includes:
determining the address of a destination node of the data to be sent;
and determining the address of the next hop relay node from the second node to the destination node according to the routing table of the second node.
In this embodiment, before encapsulating data to be sent into a data packet carrying address information, the second node determines an address of a destination node of the data to be sent, and determines an address of a next-hop relay node from the second node to the destination node according to a routing table of the second node.
Optionally, the method further comprises:
and generating identification information for the data packet, and carrying the identification information in the data packet.
In this embodiment, the second node further generates identification information for the data packet, and carries the identification information in the data packet. The identification information is used for uniquely identifying the data packet and is fixed and unchanged in the transmission process of the data packet. The identification information may be a sequence number of the data packet.
The following describes a data transmission method according to the present invention with reference to specific examples, and it is assumed that a connection relationship between nodes in a wireless network is as shown in fig. 3, and the nodes in the network have completed network synchronization, neighbor discovery, and routing processes, and the nodes in the network have established a routing table, and fig. 3 shows the routing table established by the node 1 and the node 7.
Assuming that the node 1 needs to send data to the node 7, at this time, the node 1 may determine, according to the routing table of the node 1, that the next-hop relay node from the node 1 to the node 7 is the node 3. Assuming that the TTL set by the node 1 is 2, according to the data transmission method provided by the embodiment of the present invention, the node 1 may encapsulate addresses and TTL of a source node (node 1), a destination node (node 7), and a next-hop relay node (node 3) into a data packet with data to be transmitted, and broadcast the data packet. Under the condition that the network topology is not changed, the data transmission can be completed through the following processes:
in the first period:
after receiving the data packet broadcast by the node 1, the node 3 finds that the node is a next hop relay node in the data packet, the node 3 determines that the next hop relay node from the node 3 to a destination node (namely, the node 7) is the node 7, updates the address of the next hop relay node in the data packet to the address of the node 7, sets the TTL of the data packet to be 2, and then broadcasts the data packet.
After receiving the data packet broadcast by the node 1, the node 5 finds that the node is not a destination node in the data packet or a next hop relay node in the data packet, and the TTL is 2 (greater than 1), so the node 5 subtracts 1 from the TTL of the received data packet and then continuously broadcasts the data packet.
In the second period:
and the node 7 receives the data packet broadcast by the relay node 3, finds that the node is the destination node, analyzes the data packet and correspondingly processes the data packet to complete data transmission.
The node 15 receives the data packet forwarded by the relay node 3, finds that the node is not a destination node in the data packet or a next hop relay node in the data packet, and the TTL is greater than 1, so the node 15 subtracts 1 from the TTL of the received data packet and then continuously broadcasts the data packet.
And the node 4 and the node 2 receive the data packet forwarded by the node 5, find that the node is not a destination node in the data packet or a next hop relay node in the data packet, and the TTL is not more than 1(TTL is 1) and do not broadcast.
In the third period:
the node 7 and the node 3 receive the packet broadcast by the node 15, and find that the packet is not received for the first time, and therefore do not perform processing.
The node 6 receives the data packet broadcast by the node 15, finds that the node is not a destination node in the data packet or a next hop relay node in the data packet, and the TTL is not greater than 1(TTL is 1), and does not perform broadcasting.
Assuming that the node 7 needs to send data to the node 15, at this time, the node 7 determines, according to the routing table of the node 7, that the next-hop relay node from the node 7 to the node 15 is the node 15, and assuming that the TTL set for the node 7 is 2, according to the data transmission method provided by the embodiment of the present invention, the node 7 may encapsulate the addresses and TTL of the source node (node 7), the destination node (node 15), and the next-hop relay node (node 15) and the data to be sent into a data packet, and broadcast the data packet. Under the condition that the network topology is not changed, the data transmission can be completed through the following processes:
in the first period:
and the node 15 receives the data packet broadcast by the node 7, finds that the node is the destination node in the data packet, analyzes the data packet and correspondingly processes the data packet to complete data transmission.
The nodes 3 and 6 receive the data packet broadcast by the node 7, find that the node is not the destination node in the data packet or the next hop relay node in the data packet, and the TTL is 2 (greater than 1), so the nodes 3 and 6 subtract 1 from the TTL of the received data packet and then continuously broadcast the data packet.
In the second period:
the node 15 receives the data packet broadcast by the node 3 or the node 6, and finds that the data packet is not received for the first time, discards the data packet, and does not perform broadcasting or any other processing.
And the node 1 receives the data packet broadcast by the node 3, finds that the node is not a target node in the data packet or a next hop relay node in the data packet, has TTL not more than 1(TTL is 1), and does not perform broadcasting.
For the network topology shown in fig. 3, it is assumed that the node 15 moves to the position shown in fig. 4 at time t1, and the links between the node 15 and the nodes 3 and 7 are broken, and the moved network topology is shown in fig. 4, at which time the routing table of the node 7 is not updated, i.e. the routing protocol is not converged. At this time, if the node 7 needs to send data to the node 15, the node 7 may know that the node 15 is a 1-hop neighbor node of itself according to its routing table, and determine that a next-hop relay node from the node 7 to the node 15 is the node 15.
According to the conventional data transmission mode, the node 7 directly transmits data to the next hop relay node (i.e., the node 15), and the node 15 cannot receive the data because the link between the node 15 and the node 7 is disconnected, so that the data transmission fails.
According to the data transmission method provided by the embodiment of the present invention, assuming that the TTL set by the node 7 is 2, according to the data transmission method provided by the embodiment of the present invention, the node 7 may encapsulate the addresses and TTL of the source node (node 7), the destination node (node 15), and the next-hop relay node (node 15) into a data packet with the to-be-transmitted data, and broadcast the data packet. Data transmission can be successfully completed through the following two cycles:
in the first period:
the nodes 3 and 6 receive the data packet broadcast by the node 7, find that the node is not the destination node in the data packet or the next hop relay node in the data packet, and the TTL is 2 (greater than 1), so the nodes 3 and 6 subtract 1 from the TTL of the received data packet and then continuously broadcast the data packet.
In the second period:
the node 15 receives the data packet broadcast by the node 6, finds that the node is the destination node in the data packet, analyzes the data packet and performs corresponding processing on the data packet to complete data transmission.
And the node 1 receives the data packet broadcast by the node 3, finds that the node is not a target node in the data packet or a next hop relay node in the data packet, has TTL not more than 1(TTL is 1), and does not perform broadcasting.
Similarly, for the network topology described in fig. 3, it is assumed that the node 7 moves to the position shown in fig. 5 at time t2, and the link between the node 7 and the node 3 is broken, and the moved network topology is shown in fig. 5, at which time the routing table of the node 7 is not updated, i.e. the routing protocol is not converged. At this time, if the node 7 needs to send data to the node 5, the node 7 determines that the next-hop relay node from the node 7 to the node 5 is the node 3 according to the routing table.
According to the conventional data transmission mode, the node 7 directly transmits data to the next-hop node (i.e., the node 3), and the node 3 cannot receive the data because the link between the node 3 and the node 7 is disconnected, so that a data packet cannot be further transmitted to the node 5, and data transmission fails.
According to the data transmission method provided by the embodiment of the present invention, assuming that the TTL set by the node 7 is 2, according to the data transmission method provided by the embodiment of the present invention, the node 7 may encapsulate the addresses and TTL of the source node (node 7), the destination node (node 5), and the next-hop relay node (node 3) into a data packet with the to-be-transmitted data, and broadcast the data packet. The data transmission is completed through the following processes:
in the first period:
the node 15 and the node 6 receive the data packet broadcast by the node 7, find that the node is not the destination node in the data packet or the next hop relay node in the data packet, and the TTL is 2 (greater than 1), so the node 3 and the node 6 subtract 1 from the TTL of the received data packet and then continuously broadcast the data packet.
In the second period:
the node 15 receives the data packet broadcast by the node 6, and finds that the data packet is not received for the first time, discards the data packet, and does not perform broadcasting or any other processing.
The node 3 receives a data packet broadcasted by the node 15, finds that the node is a next hop relay node in the data packet, determines that the next hop relay node from the node 3 to a destination node (namely, the node 5) is the node 1, updates the address of the next hop relay node in the data packet to the address of the node 1, sets the TTL of the data packet to be 2, and then broadcasts the data packet.
In the third period:
the method comprises the steps that a node 1 receives a data packet broadcasted by a node 3, finds that the node is a next hop relay node in the data packet, the node 1 determines that the next hop relay node from the node 1 to a destination node (namely, a node 5) is the node 5, updates the address of the next hop relay node in the data packet to the address of the node 5, sets TTL of the data packet to be 2, and then broadcasts the data packet.
In the fourth cycle:
and the node 5 receives the data packet broadcast by the node 1, finds that the node is the destination node, analyzes the data packet and correspondingly processes the data packet to complete data transmission.
And the node 6 and the node 7 receive the data packet broadcast by the node 15, find that the node is not a destination node in the data packet or a next hop relay node in the data packet, and the TTL is not more than 1 (the TTL is 1) and do not perform broadcasting.
Therefore, when the network topology changes and the routing table of the node is not updated in time, by the data transmission method provided by the invention, the sending node and/or the forwarding node sends the data packet to the next-hop relay node in the transmission link in a local broadcast mode, the success rate of receiving the data packet by the next-hop relay node in the transmission link is improved, the support of the network on the node mobility and the link state change is increased, and the robustness of network data transmission is enhanced.
Referring to fig. 6, an embodiment of the present invention further provides a node, where the node is a first node 600, and the first node 600 includes a processor 601, a transceiver 602, a memory 603, and a computer program stored in the memory 603 and operable on the processor 601.
The transceiver 602 may be a plurality of elements including a transmitter and a transceiver, providing a means for communicating with various other apparatus over a transmission medium, the transceiver 602 for receiving and transmitting data under control of the processor 601;
when executed by the processor 601, the computer program performs the steps of:
receiving a broadcasted data packet through the transceiver 602, and acquiring address information carried in the data packet, wherein the address information at least includes a destination node address and an address of a next hop relay node;
judging whether the first node is a destination node in the address information;
if the first node is not the destination node in the address information, the data packet is broadcasted through the transceiver 602 after the lifetime TL of the data packet is updated according to the address information.
Optionally, the processor 601 is specifically configured to:
and if the first node is the next hop relay node in the address information, updating the TTL of the data packet to a target TTL, and broadcasting the data packet through the transceiver 602, wherein the target TTL is an integer not less than 2.
Optionally, before broadcasting the data packet through the transceiver 602, the processor 601 is further configured to:
determining a next hop relay node from the first node to a destination node according to the routing table of the first node;
and updating the address of the next hop relay node in the address information to the address of the next hop relay node from the first node to the destination node.
Optionally, the processor 601 is further configured to:
and determining the target TTL according to the moving speed of the neighbor node of the first node.
Optionally, the processor 601 is specifically configured to:
if the first node is not the destination node in the address information and is not the next hop relay node in the address information, the TTL of the data packet is decremented by 1 and then the data packet is broadcasted through the transceiver 602.
Optionally, the processor 601 is specifically configured to:
if the first node is not the destination node in the address information and is not the next hop relay node in the address information, judging whether the TTL of the data packet is more than 1;
if the TTL of the data packet is greater than 1, the TTL of the data packet is subtracted by 1, and then the data packet is broadcasted through the transceiver 602.
Optionally, the processor 601 is further configured to:
and if the first node is the destination node in the address information, analyzing the data packet and processing the data packet.
Optionally, the processor 601 is specifically configured to:
receiving a broadcasted data packet through the transceiver 602, and determining whether the first node receives the data packet for the first time;
and if the first node receives the data packet for the first time, acquiring address information carried in the data packet.
Optionally, the processor 601 is specifically configured to:
and acquiring the identification information of the data packet, and judging whether the first node receives the data packet for the first time according to the identification information of the data packet.
It should be noted that the first node provided in the embodiment of the present invention can implement each process in the method embodiment of fig. 1, and the implementation principle and technical effect are similar, and details are not described here again in this embodiment.
Referring to fig. 7, an embodiment of the present invention further provides a node, where the node is a second node 700, and the second node 700 includes a processor 701, a transceiver 702, a memory 703, and a computer program stored in the memory 703 and operable on the processor 701.
The transceiver 702 may be a plurality of elements including a transmitter and a transceiver, providing a means for communicating with various other apparatus over a transmission medium, the transceiver 702 being configured to receive and transmit data under control of the processor 701;
when executed by the processor 701, the computer program implements the following steps:
encapsulating data to be transmitted into a data packet carrying address information, wherein the address information at least comprises addresses of a destination node and a next hop relay node;
setting a Time To Live (TTL) for the data packet, wherein the TTL is an integer not less than 2;
and broadcasting the data packet carrying the TTL through the transceiver 702.
Optionally, the processor 701 is specifically configured to:
and setting TTL for the data packet according to the moving speed of the neighbor node of the second node.
Optionally, the processor 701 is further configured to:
determining the address of a destination node of the data to be sent;
and determining the address of the next hop relay node from the second node to the destination node according to the routing table of the second node.
Optionally, the processor 701 is further configured to:
and generating identification information for the data packet, and carrying the identification information in the data packet.
It should be noted that the second node provided in the embodiment of the present invention can implement each process in the method embodiment of fig. 2, and the implementation principle and technical effect are similar, and details are not described here again in this embodiment.
Referring to fig. 8, the present invention further provides a node, where the node is a first node 800, and as shown in fig. 8, the first node 800 includes:
a receiving module 801, configured to receive a broadcasted data packet and obtain address information carried in the data packet, where the address information at least includes an address of a destination node and an address of a next-hop relay node;
a determining module 802, configured to determine whether the first node is a destination node in the address information;
a broadcasting module 803, configured to broadcast the data packet after updating the time to live TTL of the data packet according to the address information if the first node is not the destination node in the address information.
It should be noted that the first node provided in the embodiment of the present invention can implement each process in the method embodiment of fig. 1, and the implementation principle and technical effect are similar, and details are not described here again in this embodiment.
Referring to fig. 9, the present invention further provides a node, where the node is a second node 900, and as shown in fig. 9, the second node 900 includes:
an encapsulating module 901, configured to encapsulate data to be sent into a data packet carrying address information, where the address information at least includes an address of a destination node and an address of a next hop relay node;
a setting module 902, configured to set a time to live TTL for the data packet, where the TTL is an integer not less than 2;
and a broadcasting module 903, configured to broadcast the data packet carrying the TTL.
It should be noted that the second node provided in the embodiment of the present invention can implement each process in the method embodiment of fig. 2, and the implementation principle and technical effect are similar, and details are not described here again in this embodiment.
As shown in fig. 10, the first node 1000 shown in fig. 10 includes: at least one processor 1001, memory 1002, at least one user interface 1003, and a network interface 1004. The various components in the first node 1000 are coupled together by a bus system 1005. It is understood that bus system 1005 is used to enable communications among the components connected. The bus system 1005 includes a power bus, a control bus, and a status signal bus, in addition to a data bus. But for the sake of clarity the various busses are labeled in figure 10 as the bus system 1005.
The user interface 1003 may include, among other things, a display, a keyboard, or a pointing device (e.g., a mouse, trackball, touch pad, or touch screen, among others.
It is to be understood that the memory 1002 in embodiments of the present invention may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of example, but not limitation, many forms of RAM are available, such as Static random access memory (Static RAM, SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic random access memory (Synchronous DRAM, SDRAM), Double data rate Synchronous Dynamic random access memory (ddr DRAM), Enhanced Synchronous SDRAM (ESDRAM), Synchronous link SDRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 1002 of the subject systems and methods is intended to comprise, without being limited to, these and any other suitable types of memory.
In some embodiments, memory 1002 holds the following elements, executable modules or data structures, or a subset thereof, or an expanded set thereof: an operating system 10021 and applications 10022.
The operating system 10021 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is used for implementing various basic services and processing hardware-based tasks. The application 10022 includes various applications, such as a Media Player (Media Player), a Browser (Browser), and the like, for implementing various application services. The program implementing the method according to the embodiment of the present invention may be included in the application program 10022.
In an embodiment of the present invention, the steps performed by the first node in the data transmission method are implemented by calling a program or an instruction stored in the memory 1002, specifically, a program or an instruction stored in the application 10022.
The first node provided in the embodiment of the present invention may execute the steps executed by the first node in the foregoing data transmission method embodiment, and the implementation principle and technical effect are similar, and this embodiment is not described herein again.
As shown in fig. 11, the second node 1100 shown in fig. 11 includes: at least one processor 1101, memory 1102, at least one user interface 1103, and a network interface 1104. The various components in the second node 1100 are coupled together by a bus system 1105. It is understood that the bus system 1105 is used to enable communications among the components. The bus system 1105 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled in fig. 11 as the bus system 1105.
The user interface 1103 may include, among other things, a display, a keyboard, or a pointing device (e.g., a mouse, trackball, touch pad, or touch screen, among others.
It is to be understood that the memory 1102 in embodiments of the present invention can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of example, but not limitation, many forms of RAM are available, such as Static random access memory (Static RAM, SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic random access memory (Synchronous DRAM, SDRAM), Double data rate Synchronous Dynamic random access memory (ddr DRAM), Enhanced Synchronous SDRAM (ESDRAM), Synchronous link SDRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 1102 of the subject systems and methods is intended to comprise, without being limited to, these and any other suitable types of memory.
In some embodiments, memory 1102 stores the following elements, executable modules or data structures, or a subset thereof, or an expanded set thereof: an operating system 11021 and application programs 11022.
The operating system 11021 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, for implementing various basic services and processing hardware-based tasks. The application 11022 contains various applications such as a Media Player (Media Player), a Browser (Browser), etc. for implementing various application services. Programs that implement methods in accordance with embodiments of the invention may be included in application 11022.
In an embodiment of the present invention, the steps performed by the second node in the data transmission method are implemented by calling a program or an instruction stored in the memory 1102, specifically, a program or an instruction stored in the application 11022.
The second node provided in the embodiment of the present invention may execute the steps executed by the second node in the foregoing data transmission method embodiment, and the implementation principle and technical effect are similar, and this embodiment is not described herein again.
The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, can implement the steps performed by the first node in the data transmission method provided in the embodiment of the present invention; alternatively, the computer program, when executed by a processor, implements the steps performed by the second node in the above data transmission method.
In the several embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be physically included alone, or two or more units may be integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) to execute some steps of the data transmission method according to various embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (29)

1. A data transmission method applied to a first node, the method comprising:
receiving a broadcasted data packet, and acquiring address information carried in the data packet, wherein the address information at least comprises an address of a destination node and an address of a next hop relay node;
judging whether the first node is a destination node in the address information;
and if the first node is not the destination node in the address information, broadcasting the data packet after updating the time-to-live (TTL) of the data packet according to the address information.
2. The data transmission method according to claim 1, wherein the broadcasting the packet after updating the TTL of the packet according to the address information if the first node is not a destination node in the address information comprises:
and if the first node is the next hop relay node in the address information, updating the TTL of the data packet to a target TTL and then broadcasting the data packet, wherein the target TTL is an integer not less than 2.
3. The data transmission method of claim 2, wherein before the broadcasting the data packet, the method further comprises:
determining a next hop relay node from the first node to a target node according to the routing table of the first node;
and updating the address of the next hop relay node in the address information to the address of the next hop relay node from the first node to the destination node.
4. The data transmission method of claim 2, further comprising:
and determining the target TTL according to the moving speed of the neighbor node of the first node.
5. The data transmission method according to claim 1, wherein the broadcasting the packet after updating the TTL of the packet according to the address information if the first node is not a destination node in the address information comprises:
and if the first node is not the destination node in the address information and is not the next hop relay node in the address information, the TTL of the data packet is subtracted by 1, and then the data packet is broadcasted.
6. The data transmission method according to claim 5, wherein the broadcasting the packet after subtracting 1 from the TTL of the packet if the first node is not the destination node in the address information and is not the next-hop relay node in the address information comprises:
if the first node is not the destination node in the address information and is not the next hop relay node in the address information, judging whether the TTL of the data packet is more than 1;
and if the TTL of the data packet is more than 1, the TTL of the data packet is subtracted by 1, and then the data packet is broadcasted.
7. The data transmission method according to claim 1, wherein after determining whether the first node is a destination node in the address information according to the address information, the method further comprises:
and if the first node is the destination node in the address information, analyzing the data packet and processing the data packet.
8. The data transmission method according to any one of claims 1 to 7, wherein the receiving a broadcasted data packet and acquiring address information carried in the data packet includes:
receiving a broadcasted data packet, and judging whether the first node receives the data packet for the first time;
and if the first node receives the data packet for the first time, acquiring address information carried in the data packet.
9. The data transmission method according to claim 8, wherein the determining whether the first node receives the data packet for the first time comprises:
and acquiring the identification information of the data packet, and judging whether the first node receives the data packet for the first time according to the identification information of the data packet.
10. A data transmission method applied to a second node, the method comprising:
encapsulating data to be sent into a data packet carrying address information, wherein the address information at least comprises an address of a destination node and an address of a next hop relay node;
setting a Time To Live (TTL) for the data packet, wherein the TTL is an integer not less than 2;
and broadcasting the data packet carrying the TTL.
11. The data transmission method according to claim 10, wherein the setting the TTL to the data packets includes:
and setting TTL for the data packet according to the moving speed of the neighbor node of the second node.
12. The data transmission method according to claim 10, wherein before encapsulating the data to be transmitted into the data packet carrying the address information, the method further comprises:
determining the address of a destination node of the data to be sent;
and determining the address of the next hop relay node from the second node to the destination node according to the routing table of the second node.
13. The data transmission method of claim 10, wherein the method further comprises:
and generating identification information for the data packet, and carrying the identification information in the data packet.
14. A node, the node being a first node and comprising a processor, a transceiver, a memory, and a computer program stored on the memory and executable on the processor, wherein the processor, when executing the computer program, is configured to:
receiving a broadcasted data packet through the transceiver, and acquiring address information carried in the data packet, wherein the address information at least comprises a destination node address and an address of a next hop relay node;
judging whether the first node is a destination node in the address information;
and if the first node is not the destination node in the address information, broadcasting the data packet through the transceiver after updating the time-to-live TTL of the data packet according to the address information.
15. The node of claim 14, wherein the processor is specifically configured to:
and if the first node is the next hop relay node in the address information, updating the TTL of the data packet to a target TTL, and broadcasting the data packet through the transceiver, wherein the target TTL is an integer not less than 2.
16. The node of claim 15, wherein prior to said broadcasting the data packet by the transceiver, the processor is further configured to:
determining a next hop relay node from the first node to a destination node according to the routing table of the first node;
and updating the address of the next hop relay node in the address information to the address of the next hop relay node from the first node to the destination node.
17. The node of claim 15, wherein the processor is further configured to:
and determining the target TTL according to the moving speed of the neighbor node of the first node.
18. The node of claim 14, wherein the processor is specifically configured to:
and if the first node is not the destination node in the address information and is not the next hop relay node in the address information, subtracting 1 from the TTL of the data packet, and broadcasting the data packet through the transceiver.
19. The node of claim 18, wherein the processor is specifically configured to:
if the first node is not the destination node in the address information and is not the next hop relay node in the address information, judging whether the TTL of the data packet is more than 1;
and if the TTL of the data packet is more than 1, the TTL of the data packet is subtracted by 1, and then the data packet is broadcasted through the transceiver.
20. The node of claim 14, wherein the processor is further configured to:
and if the first node is the destination node in the address information, analyzing the data packet and processing the data packet.
21. The node according to any of claims 14 to 20, wherein the processor is specifically configured to:
receiving a broadcasted data packet through the transceiver, and judging whether the first node receives the data packet for the first time;
and if the first node receives the data packet for the first time, acquiring address information carried in the data packet.
22. The node of claim 21, wherein the processor is specifically configured to:
and acquiring the identification information of the data packet, and judging whether the first node receives the data packet for the first time according to the identification information of the data packet.
23. A node, being a second node, comprising a processor, a transceiver, a memory, and a computer program stored on the memory and executable on the processor, wherein the processor, when executing the computer program, is configured to:
encapsulating data to be transmitted into a data packet carrying address information, wherein the address information at least comprises addresses of a destination node and a next hop relay node;
setting a Time To Live (TTL) for the data packet, wherein the TTL is an integer not less than 2;
and broadcasting the data packet carrying the TTL through the transceiver.
24. The node of claim 23, wherein the processor is specifically configured to:
and setting TTL for the data packet according to the moving speed of the neighbor node of the second node.
25. The node of claim 23, wherein the processor is further configured to:
determining the address of a destination node of the data to be sent;
and determining the address of the next hop relay node from the second node to the destination node according to the routing table of the second node.
26. The node of claim 23, wherein the processor is further configured to:
and generating identification information for the data packet, and carrying the identification information in the data packet.
27. A node, the node being a first node, the first node comprising:
the system comprises a receiving module, a sending module and a receiving module, wherein the receiving module is used for receiving a broadcasted data packet and acquiring address information carried in the data packet, and the address information at least comprises an address of a destination node and an address of a next hop relay node;
the judging module is used for judging whether the first node is a destination node in the address information;
and the broadcasting module is used for broadcasting the data packet after updating the time-to-live (TTL) of the data packet according to the address information if the first node is not the destination node in the address information.
28. A node, the node being a second node, the second node comprising:
the device comprises an encapsulation module, a sending module and a receiving module, wherein the encapsulation module is used for encapsulating data to be sent into a data packet carrying address information, and the address information at least comprises an address of a destination node and an address of a next hop relay node;
a setting module, configured to set a time to live TTL for the data packet, where the TTL is an integer not less than 2;
and the broadcasting module is used for broadcasting the data packet carrying the TTL.
29. A computer-readable storage medium, characterized in that a computer program is stored thereon, which computer program, when being executed by a processor, carries out the steps in the data transmission method according to any one of claims 1 to 9;
alternatively, the computer program realizes the steps in the data transmission method according to any one of claims 10 to 13 when executed by a processor.
CN201910266820.8A 2019-04-03 2019-04-03 Data transmission method and node Active CN111787593B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910266820.8A CN111787593B (en) 2019-04-03 2019-04-03 Data transmission method and node

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910266820.8A CN111787593B (en) 2019-04-03 2019-04-03 Data transmission method and node

Publications (2)

Publication Number Publication Date
CN111787593A true CN111787593A (en) 2020-10-16
CN111787593B CN111787593B (en) 2022-08-30

Family

ID=72755719

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910266820.8A Active CN111787593B (en) 2019-04-03 2019-04-03 Data transmission method and node

Country Status (1)

Country Link
CN (1) CN111787593B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113315601A (en) * 2021-05-06 2021-08-27 北京和峰科技有限公司 Multipoint-assisted data transmission method and device, storage medium and electronic equipment
CN114449457A (en) * 2021-12-29 2022-05-06 深圳市信致通信技术有限公司 Data transmission method, node equipment and system based on chain network
WO2023125318A1 (en) * 2021-12-29 2023-07-06 维沃移动通信有限公司 Communication method and apparatus, and communication device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101662811A (en) * 2009-08-17 2010-03-03 北京航空航天大学 Distributed routing protocol based on reliable path
CN102186145A (en) * 2011-05-04 2011-09-14 西安电子科技大学 Geographical position and speed information based aerial high-speed self-organization routing method
CN102291743A (en) * 2011-09-02 2011-12-21 海南新博海通科技有限公司 Clustering method based on geographic position information
CN103516615A (en) * 2013-07-15 2014-01-15 中国人民解放军国防科学技术大学 Method and device for determining network topology
CN103701626A (en) * 2012-09-27 2014-04-02 华为技术有限公司 Method and equipment for acquiring bandwidth information
CN107370677A (en) * 2016-05-12 2017-11-21 西安三星电子研究有限公司 The method and apparatus that node determines path life span
CN109005116A (en) * 2017-06-07 2018-12-14 华为技术有限公司 A kind of message forwarding method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101662811A (en) * 2009-08-17 2010-03-03 北京航空航天大学 Distributed routing protocol based on reliable path
CN102186145A (en) * 2011-05-04 2011-09-14 西安电子科技大学 Geographical position and speed information based aerial high-speed self-organization routing method
CN102291743A (en) * 2011-09-02 2011-12-21 海南新博海通科技有限公司 Clustering method based on geographic position information
CN103701626A (en) * 2012-09-27 2014-04-02 华为技术有限公司 Method and equipment for acquiring bandwidth information
CN103516615A (en) * 2013-07-15 2014-01-15 中国人民解放军国防科学技术大学 Method and device for determining network topology
CN107370677A (en) * 2016-05-12 2017-11-21 西安三星电子研究有限公司 The method and apparatus that node determines path life span
CN109005116A (en) * 2017-06-07 2018-12-14 华为技术有限公司 A kind of message forwarding method and device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113315601A (en) * 2021-05-06 2021-08-27 北京和峰科技有限公司 Multipoint-assisted data transmission method and device, storage medium and electronic equipment
CN113315601B (en) * 2021-05-06 2022-09-30 北京和峰科技有限公司 Multipoint-assisted data transmission method and device, storage medium and electronic equipment
CN114449457A (en) * 2021-12-29 2022-05-06 深圳市信致通信技术有限公司 Data transmission method, node equipment and system based on chain network
WO2023125318A1 (en) * 2021-12-29 2023-07-06 维沃移动通信有限公司 Communication method and apparatus, and communication device
CN114449457B (en) * 2021-12-29 2024-05-17 深圳市信致通信技术有限公司 Data transmission method, node equipment and system based on chain network

Also Published As

Publication number Publication date
CN111787593B (en) 2022-08-30

Similar Documents

Publication Publication Date Title
AU2003272497B2 (en) Method and apparatus in a gateway for registering mobile routers of a Mobile Ad hoc Network to respective home agents
US8243603B2 (en) Method and system for improving a wireless communication route
US10057342B2 (en) Infrastructure access via neighbor awareness networking data path
US7860025B2 (en) Directed acyclic graph discovery and network prefix information distribution relative to a clusterhead in an ad hoc mobile network
US7649852B2 (en) Arrangement for router attachements between roaming mobile routers in a clustered network
US7366111B2 (en) Arrangement for providing optimized connections between peer routers in a tree-based ad hoc mobile network
KR100829655B1 (en) Mobile ip for mobile ad hoc networks
US8213352B2 (en) Wireless communication system, wireless communication device, wireless communication method, and program
CN111787593B (en) Data transmission method and node
CN111865802B (en) Communication method and device
JP2007325261A (en) Method of establishing route
KR20060121118A (en) Method for the transmission of information in a communication system using a path
Totani et al. An efficient broadcast-based information transfer method based on location data over MANET
WO2023070633A1 (en) D2d communication method
KR100521139B1 (en) Method for processing packet of ad hoc network
JP7326230B2 (en) Communication system, node, communication method and program
Ding et al. An opportunistic routing protocol for mobile ad hoc networks based on stable ideology
CN111787591B (en) Neighbor discovery method and node
JP4735202B2 (en) Mobile terminal and program for selecting routing protocol for ad hoc network
CN106488518B (en) Method for realizing user data continuous transmission under multi-cell switching
Leal et al. Connecting Moving Smart objects to the internet: Potentialities and issues When Using Mobile Ad Hoc network technologies
JP5409419B2 (en) Mobile router Ad hoc network communication system mobile router
JP2019121844A (en) Communication apparatus, communication system, and control method for communication apparatus

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20210604

Address after: 100085 1st floor, building 1, yard 5, Shangdi East Road, Haidian District, Beijing

Applicant after: DATANG MOBILE COMMUNICATIONS EQUIPMENT Co.,Ltd.

Address before: 100191 No. 40, Haidian District, Beijing, Xueyuan Road

Applicant before: CHINA ACADEMY OF TELECOMMUNICATIONS TECHNOLOGY

GR01 Patent grant
GR01 Patent grant