CN107196859B - Message forwarding method, broadcasting method, message response method and communication equipment - Google Patents

Message forwarding method, broadcasting method, message response method and communication equipment Download PDF

Info

Publication number
CN107196859B
CN107196859B CN201710591785.8A CN201710591785A CN107196859B CN 107196859 B CN107196859 B CN 107196859B CN 201710591785 A CN201710591785 A CN 201710591785A CN 107196859 B CN107196859 B CN 107196859B
Authority
CN
China
Prior art keywords
message
node
broadcast
response
routing information
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
CN201710591785.8A
Other languages
Chinese (zh)
Other versions
CN107196859A (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.)
Xi'an Qimiao Electronic Technology Co ltd
Original Assignee
Xi'an Qimiao Electronic Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xi'an Qimiao Electronic Technology Co ltd filed Critical Xi'an Qimiao Electronic Technology Co ltd
Priority to CN201710591785.8A priority Critical patent/CN107196859B/en
Publication of CN107196859A publication Critical patent/CN107196859A/en
Application granted granted Critical
Publication of CN107196859B publication Critical patent/CN107196859B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • H04L45/023Delayed use of routing table updates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/16Multipoint routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/20Hop count for routing purposes, e.g. TTL

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 application discloses a message forwarding method, a broadcasting method, a message responding method and communication equipment. The message forwarding method comprises the following steps: obtaining at least one broadcast message, wherein the broadcast message includes routing information associated with the broadcast message, and the routing information includes: counting the hop count; and at least responding to the hop count not exceeding a preset value, increasing the hop count by 1, and forwarding the broadcast message in a broadcast mode after a first preset delay. According to the method and the communication equipment provided by the embodiment of the application, in the process of establishing the path, the path establishment message is delayed and broadcasted through the limited communication nodes, all subsequent forwarding can be corresponding to the delay, and the path establishment speed is higher while radio collision is avoided.

Description

Message forwarding method, broadcasting method, message response method and communication equipment
Technical Field
The application belongs to the technical field of internet of things, and particularly relates to a message forwarding method, a broadcasting method, a message responding method and communication equipment.
Background
The internet of things technology is one of the internet technologies which are rapidly developed at present. The Internet of things technology is widely applied to the fields of smart home, industrial production, building control, environmental monitoring, smart cities and the like. The internet of things network in these fields needs not only data transmission, but also data acquisition and fusion and task cooperative control. Low cost, low power consumption, multiple functions are becoming essential characteristics in these fields. The communication protocols currently most used in these areas include WiFi, bluetooth, ZigBee (ZigBee). The WiFi equipment occupies more frequency points and consumes more power during communication, so that most WiFi equipment needs to be charged conventionally; the Bluetooth technology has short transmission distance, is only suitable for short-distance data communication, and cannot meet the communication requirements of most Internet of things equipment; when the ZigBee technology works in a non-beacon mode, only the terminal sub-nodes can enter a sleep mode, and the coordinator and the routing nodes must be in an active state to receive and process data information from the terminal sub-nodes, so that the overall power consumption of the network is greatly increased.
Disclosure of Invention
The embodiment of the application provides a simple and quick ad hoc network routing scheme.
In one possible implementation, a message forwarding method is provided, where the method includes:
obtaining at least one broadcast message, wherein the broadcast message includes routing information associated with the broadcast message, and the routing information includes: counting the hop count;
and at least responding to the hop count not exceeding a preset value, increasing the hop count by 1, and forwarding the broadcast message in a broadcast mode after a first preset delay.
Optionally, the preset value is zero.
Optionally, the broadcast message is sent by a source node to a destination node in a broadcast manner, and the routing information further includes: a source node address, a destination node address, and a previous hop node address;
the method further comprises the following steps:
storing the routing information associated with the broadcast message;
the forwarding the broadcast message in a broadcast manner further comprises:
and after the address of the previous hop node is modified into the address of the local node, forwarding the broadcast message in a broadcast mode.
Optionally, the routing information further includes: a first message identification for identifying the broadcast message;
the method further comprises the following steps:
judging whether the broadcast message is forwarded or not according to the first message identifier;
in response to forwarding the broadcast message, discarding the broadcast message.
Optionally, the method further comprises:
responding to that a destination node address corresponding to a broadcast message is the same as a local node address, and sending a response message to a source node corresponding to the broadcast message in a broadcast mode; wherein, the response message includes the routing information of the corresponding broadcast message.
Optionally, the method further comprises:
acquiring at least one response message, wherein the response message is sent by a destination node in a broadcasting mode and comprises routing information of a corresponding broadcast message;
and forwarding the response message according to the routing information.
Optionally, the forwarding the response message includes:
and at least responding to the hop count in the response message not exceeding a preset value, increasing the hop count in the response message by 1, and forwarding the response message after a second preset delay.
Optionally, the forwarding the response message further includes:
determining the last hop node address from the source node address to the local according to the source node address in the routing information;
and forwarding the response message to the previous hop node according to the previous hop node address.
Optionally, the method further comprises:
responding to the source node address in the routing information as a local node address, and sending a confirmation message to the destination node according to a previous hop node address corresponding to the response message;
wherein the broadcast message is used to establish a communication path between the source node and the destination node, and the acknowledgement message is used to determine that the path associated with the previous-hop node address is the communication path.
Optionally, the response message further includes: a total hop count of the corresponding broadcast message;
the acknowledgement message sent to the destination node further comprises:
and determining the last hop node address at least according to the total hop count.
Optionally, the acknowledgement message sent to the destination node further includes:
and determining the address of the previous hop node at least according to the time for acquiring the at least one response message.
Optionally, in the method, the message is forwarded or sent by a local node at a transmission power not exceeding a preset power of the local node.
In another aspect of the embodiments of the present application, there is also provided a broadcasting method, including:
sending a broadcast message to a destination node in a broadcast manner, wherein the broadcast message includes routing information associated with the broadcast message, and the routing information includes: counting the hop count;
acquiring at least one response message responding to the broadcast message, wherein the response message is sent by the destination node in a broadcast mode and comprises the routing information of the corresponding broadcast message;
sending a confirmation message to the destination node according to the last hop node address of the at least one response message;
wherein the hop count is configured to be modified by a forwarding node that forwards the broadcast message, and when the hop count does not exceed a preset value, the broadcast message is configured to be forwarded by the forwarding node after a first predetermined delay.
Optionally, the preset value is zero.
Optionally, the broadcast message is used to establish a communication path between the source node and the destination node, and the acknowledgement message is used to determine that the path associated with the previous-hop node address is the communication path.
Optionally, the routing information in the response message further includes: the total hop count of the corresponding broadcast message to reach the corresponding destination node;
the acknowledgement message sent to the destination node further comprises:
and determining the last hop node address at least according to the total hop count.
Optionally, the acknowledgement message sent to the destination node further includes:
and determining the address of the previous hop node at least according to the time for acquiring the at least one response message.
Optionally, the method further comprises:
and in response to not acquiring the at least one response message within a preset time, sending the broadcast message to the destination node again in a broadcast mode.
Optionally, in the method, the message is sent by the local node at a transmission power not exceeding a preset power of the local node.
In another possible implementation manner of the present application, a message response method is further provided, including:
acquiring at least one broadcast message, wherein the broadcast message is sent by a source node in a broadcast mode, the broadcast message comprises routing information associated with the broadcast message, and the routing information comprises: a source node address and a destination node address;
responding to the routing information of the broadcast message that the destination node address is the same as the local node address, and sending a response message to the source node in a broadcast mode;
wherein the response message includes routing information corresponding to the broadcast message, and the routing information includes: counting the hop count;
wherein the hop count is configured to be modified by a forwarding node forwarding the broadcast message and/or forwarding the reply message; when the hop count does not exceed a first preset value, the broadcast message is configured to be forwarded by the forwarding node after a first predetermined delay; and/or the hop count does not exceed a second preset value, the reply message is configured to be forwarded by the forwarding node after a second predetermined delay.
In another possible embodiment of the present application, there is also provided a communication device, including:
a broadcast receiving unit, configured to obtain at least one broadcast message, where the broadcast message includes routing information associated with the broadcast message, and the routing information includes: counting the hop count;
and the broadcast forwarding unit is used for at least responding to the hop count not exceeding a preset value, increasing the hop count by 1 and forwarding the broadcast message in a broadcast mode after a first preset delay.
Optionally, the preset value is zero.
Optionally, the broadcast message is sent by a source node to a destination node in a broadcast manner, and the routing information further includes: a source node address, a destination node address, and a previous hop node address;
the communication device further includes:
a storage unit for storing the routing information associated with the broadcast message;
the broadcast forwarding unit further includes: and the routing information updating module is used for modifying the previous hop node address into a local node address and then forwarding the broadcast message in a broadcast mode.
Optionally, the routing information further includes: a first message identification for identifying the broadcast message;
the communication device further includes:
a message identification unit, configured to determine whether the broadcast message is forwarded according to the first message identifier;
a discarding unit, configured to discard the broadcast message in response to forwarding the broadcast message.
Optionally, the communication device further comprises:
the response unit is used for responding that the address of a destination node corresponding to a broadcast message is the same as the address of a local node, and sending a response message to a source node corresponding to the broadcast message in a broadcast mode;
wherein, the response message includes the routing information of the corresponding broadcast message.
Optionally, the communication device further comprises:
the response receiving unit is used for acquiring at least one response message, wherein the response message is sent by a destination node in a broadcasting mode and comprises the routing information of the corresponding broadcast message;
and the response forwarding unit is used for forwarding the response message according to the routing information.
Optionally, the reply forwarding unit includes:
and the response delay module is used for at least responding that the hop count in the response message does not exceed a preset value, increasing 1 for the hop count in the response message, and forwarding the response message after a second preset delay.
Optionally, the reply forwarding unit further includes:
a previous hop determining module, configured to determine, according to a source node address in the routing information, a previous hop node address from the source node address to a local node;
and the last hop sending module is used for forwarding the response message to the last hop node according to the last hop node address.
Optionally, the communication device further comprises:
a response confirmation unit, configured to send, in response to that a source node address in the routing information is a local node address, a confirmation message to the destination node according to a previous-hop node address corresponding to the response message;
wherein the broadcast message is used to establish a communication path between the source node and the destination node, and the acknowledgement message is used to determine that the path associated with the previous-hop node address is the communication path.
Optionally, the response message further includes: a total hop count of the corresponding broadcast message;
the confirmation unit includes:
and the total hop count selection module is used for determining the previous hop node address at least according to the total hop count.
Optionally, the confirming unit includes:
and the response time selection module is used for determining the address of the previous hop node at least according to the time for acquiring the at least one response message.
Optionally, in the method, the message is forwarded or sent by a local node at a transmission power not exceeding a preset power of the local node.
In another aspect of the embodiments of the present application, there is also provided a communication device, including:
a broadcast sending unit, configured to send a broadcast message to a destination node in a broadcast manner, where the broadcast message includes routing information associated with the broadcast message, and the routing information includes: counting the hop count;
a response obtaining unit, configured to obtain at least one response message in response to the broadcast message, where the response message is sent by the destination node in a broadcast manner, and the response message includes routing information of a corresponding broadcast message;
the response confirmation unit is used for sending a confirmation message to the destination node according to the previous hop node address of the at least one response message;
wherein the hop count is configured to be modified by a forwarding node that forwards the broadcast message, and when the hop count does not exceed a preset value, the broadcast message is configured to be forwarded by the forwarding node after a first predetermined delay.
Optionally, the preset value is zero.
Optionally, the broadcast message is used to establish a communication path between the source node and the destination node, and the acknowledgement message is used to determine that the path associated with the previous-hop node address is the communication path.
Optionally, the routing information in the response message further includes: the total hop count of the corresponding broadcast message to reach the corresponding destination node;
the response confirmation unit includes:
and the total hop count selection module is used for determining the previous hop node address at least according to the total hop count.
Optionally, the response confirmation unit includes:
and the response time selection module is used for determining the address of the previous hop node at least according to the time for acquiring the at least one response message.
Optionally, the communication device further comprises:
and the rebroadcasting unit is used for responding to the situation that the at least one response message is not acquired within a preset time and sending the broadcast message to the destination node again in a broadcast mode.
Optionally, the message is sent by the local node with a transmission power not exceeding a preset power of the local node.
In another possible implementation manner of the present application, there is also provided a communication device, including:
a broadcast obtaining unit, configured to obtain at least one broadcast message, where the broadcast message is sent by a source node in a broadcast manner, and the broadcast message includes routing information associated with the broadcast message, and the routing information includes: a source node address and a destination node address;
the response unit is used for responding that the destination node address in the routing information of the broadcast message is the same as the local node address and sending a response message to the source node in a broadcast mode;
wherein the response message includes routing information corresponding to the broadcast message, and the routing information includes: counting the hop count;
wherein the hop count is configured to be modified by a forwarding node forwarding the broadcast message and/or forwarding the reply message; when the hop count does not exceed a first preset value, the broadcast message is configured to be forwarded by the forwarding node after a first predetermined delay; and/or the hop count does not exceed a second preset value, the reply message is configured to be forwarded by the forwarding node after a second predetermined delay.
In another possible embodiment, a communication node is provided, which includes:
a memory for storing instructions;
a processor for executing the memory-stored instructions, the instructions causing the processor to perform the steps of:
obtaining at least one broadcast message, wherein the broadcast message includes routing information associated with the broadcast message, and the routing information includes: counting the hop count;
and at least responding to the hop count not exceeding a preset value, increasing the hop count by 1, and forwarding the broadcast message in a broadcast mode after a first preset delay.
In another possible implementation, a computer-readable medium is provided having stored therein a plurality of instructions adapted to be loaded and executed by a processor to:
sending a broadcast message to a destination node in a broadcast manner, wherein the broadcast message includes routing information associated with the broadcast message, and the routing information includes: counting the hop count;
acquiring at least one response message responding to the broadcast message, wherein the response message is sent by a destination node in a broadcast mode and comprises routing information of the corresponding broadcast message and a second message identifier for identifying the response message;
sending a confirmation message to the destination node according to the last hop node address of the at least one response message;
wherein the hop count is configured to be modified by a forwarding node that forwards the broadcast message, and when the hop count does not exceed a preset value, the broadcast message is configured to be forwarded by the forwarding node after a first predetermined delay.
In another possible embodiment, a communication node is provided, which includes:
a memory for storing instructions;
a processor for executing the memory-stored instructions, the instructions causing the processor to perform the steps of:
sending a broadcast message to a destination node in a broadcast manner, wherein the broadcast message includes routing information associated with the broadcast message, and the routing information includes: counting the hop count;
acquiring at least one response message responding to the broadcast message, wherein the response message is sent by a destination node in a broadcast mode and comprises routing information of the corresponding broadcast message and a second message identifier for identifying the response message;
sending a confirmation message to the destination node according to the last hop node address of the at least one response message;
wherein the hop count is configured to be modified by a forwarding node that forwards the broadcast message, and when the hop count does not exceed a preset value, the broadcast message is configured to be forwarded by the forwarding node after a first predetermined delay.
In another possible implementation, a computer-readable medium is provided having stored therein a plurality of instructions adapted to be loaded and executed by a processor to:
acquiring at least one broadcast message, wherein the broadcast message is sent by a source node in a broadcast manner, and the broadcast message comprises routing information associated with the broadcast message, and the routing information comprises: counting the hop count;
sending a response message to the source node in a broadcast mode, wherein the response message comprises routing information of the corresponding broadcast message and a second message identifier for identifying the response message;
wherein the hop count is configured to be modified by a forwarding node forwarding the broadcast message, and when the hop count does not exceed a preset value, the broadcast message is configured to be forwarded by the forwarding node after a first predetermined delay.
In another possible embodiment, a communication node is provided, which includes:
a memory for storing instructions;
a processor for executing the memory-stored instructions, the instructions causing the processor to perform the steps of:
acquiring at least one broadcast message, wherein the broadcast message is sent by a source node in a broadcast manner, and the broadcast message comprises routing information associated with the broadcast message, and the routing information comprises: counting the hop count;
sending a response message to the source node in a broadcast mode, wherein the response message comprises routing information of the corresponding broadcast message and a second message identifier for identifying the response message;
wherein the hop count is configured to be modified by a forwarding node forwarding the broadcast message, and when the hop count does not exceed a preset value, the broadcast message is configured to be forwarded by the forwarding node after a first predetermined delay.
In another possible implementation, a computer-readable medium is provided having stored therein a plurality of instructions adapted to be loaded and executed by a processor to:
transmitting a message associated with communication path establishment at a first preset power;
transmitting communication data at a second preset power in response to establishment of the communication path;
wherein the first preset power is smaller than the second preset power.
In another possible embodiment, a communication node is provided, which includes:
a memory for storing instructions;
a processor for executing the memory-stored instructions, the instructions causing the processor to perform the steps of:
transmitting a message associated with communication path establishment at a first preset power;
transmitting communication data at a second preset power in response to establishment of the communication path;
wherein the first preset power is smaller than the second preset power.
In one possible embodiment, there is provided a communication node comprising:
a memory for storing instructions;
a processor for executing the memory-stored instructions, the instructions causing the processor to perform the steps of:
acquiring at least one broadcast message, wherein the broadcast message is sent by a source node in a broadcast manner, and the broadcast message comprises routing information associated with the broadcast message, and the routing information comprises: counting the hop count;
forwarding a broadcast message to a destination node in a broadcast manner, where the broadcast message includes routing information associated with the broadcast message, and the routing information includes: counting the hop count;
intercepting at least one response message responding to the broadcast message, wherein the response message is sent by a destination node and comprises the routing information of the corresponding broadcast message and a second message identifier for identifying the response message;
and intercepting at least one acknowledgement message in response to the response message, wherein the acknowledgement message is used for determining that the path associated with the previous hop node address is the communication path. Judging that the destination address of the confirmation message is other nodes, and starting a timer;
in response to the timer expiring and not listening for at least one acknowledgement response message in response to the acknowledgement message, forwarding the at least one acknowledgement message to a destination address of the acknowledgement message.
In another possible implementation manner of the present application, there is also provided a communication device, including:
a memory and one or more processors;
wherein the memory is communicatively coupled to the one or more processors and has stored therein instructions executable by the one or more processors to cause the one or more processors to implement the method as described above.
According to the method and the communication node provided by the embodiment of the application, in the process of establishing the path, the path establishment message is delayed and broadcasted through the limited communication node, so that all subsequent forwarding can correspond to the delay, and the path establishment speed is higher while radio collision is avoided. In addition, in order to solve the problem of unequal transmission power, the method and the communication node provided by the embodiment of the application use the transmission power which is lower than the power for sending data in the communication process in the path establishment process, so that the instability of future communication caused by environmental change is avoided.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application.
Fig. 1 is a flowchart of an example of a message forwarding method according to an embodiment of the present application;
FIG. 2 is a flow chart of an example of a broadcast method according to an embodiment of the present application;
fig. 3 is a flowchart of another example of a message forwarding method according to an embodiment of the present application;
fig. 4 is a flow chart of yet another example of a broadcast method in accordance with an embodiment of the present application;
fig. 5 is a schematic process diagram of establishing a communication path according to a broadcasting method of the embodiment of the present application;
fig. 6-9 are block diagrams of four examples of communication nodes according to embodiments of the present application.
Detailed Description
In order to make the objects, features and advantages of the present invention more apparent and understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It will be understood by those within the art that the terms "first", "second", etc. in this application are used only to distinguish one device, module, parameter, etc., from another, and do not denote any particular technical meaning or necessary order therebetween.
The technical solutions of the embodiments of the present application are applicable to any wireless sensor network including a plurality of communication nodes, and in the following description, the broadcast message is a path establishment message initiated to establish a communication path between a source node and a destination node, but the present application is not limited thereto. According to the technical scheme of the embodiments of the application, each communication node in the wireless sensor network can adopt a communication mechanism of centerless, self-organization, peer-to-peer, multi-hop and on-demand routing to carry out networking, so that the network deployment is simple and rapid.
Referring to fig. 1, a flowchart of an example of a message forwarding method according to an embodiment of the present application is shown, where the method may be performed by any communication node in a network. As shown in fig. 1, the method of the present embodiment may include the steps of:
s120, at least one broadcast message is obtained, wherein the broadcast message is sent to a destination node by a source node in a broadcast mode and comprises routing information associated with the broadcast message.
Taking a broadcast message as an example of a path establishment message, in the method of the embodiment of the present application, when any communication node desires to communicate with another communication node (in the description of the present application, a communication node initiating communication/path establishment is referred to as a source node, and a terminal communication node of a communication/path is referred to as a destination node), if an available communication path exists between the two nodes in the network, the source node may perform point-to-point transmission of data according to a physical address of a next-hop node that is stored by itself and passes when reaching the destination node, and the next-hop node continues forwarding according to a physical address of a stored next-hop node until the data is transmitted to the destination node. Otherwise, the source node sends the broadcast message, i.e. the path establishment message, in a broadcast manner. Routing information associated therewith may be included in the path setup message, including but not limited to: the method comprises the steps of obtaining a source node address, a destination node address and a hop count, wherein the hop count is the number of times of forwarding the broadcast message in the network, and the initial hop count of the path establishment message broadcasted by the source node is recorded as zero. The communication node within the signal range of the source node may acquire the path setup message.
S140, responding to the hop count not exceeding a preset value, and forwarding the path establishment message in a broadcasting mode after a first preset delay.
In a possible implementation manner, the preset value is zero, after acquiring any path establishment message, if the current hop count of the message is 0, it indicates that a local node (a communication node that receives the path establishment message) is the first hop node of the path establishment message, according to the method in the embodiment of the present application, the hop count is increased by 1, and the path establishment message is broadcasted again after a certain delay time, where at this time, the hop count is 1. The communication node receiving the path establishment message may then continue to broadcast (without delay) or discard the path establishment message according to a corresponding mechanism, so that the path establishment message is transmitted in the network as conducted in a neural network until the path establishment message reaches the corresponding destination node through any path in the network.
Wherein the first predetermined delay may be a preset delay time for avoiding radio collision, thereby avoiding that the message cannot be sent in the network. Such a time may be set to a random number for any communication node.
In summary, in the method of this embodiment, in the process of establishing the path, the path establishment message is delayed and broadcast by the limited communication node, so that all subsequent forwarding operations can be delayed correspondingly, and the path establishment speed is faster while radio collision is avoided.
In addition, in order to establish a communication path between the source node and the destination node, the communication node should also record the routing information of the received path establishment information to establish effective contact with surrounding communication nodes, facilitate the construction of the communication path, and do not require a special node in charge of path storage, management, and maintenance. The routing information further includes: the previous hop node address is the source node address for the first hop node. Specifically, the method of this embodiment further includes:
s130, storing the routing information associated with the path establishment message, wherein the routing information comprises a previous hop node address, a source node address and a destination node address.
Further, the route information of the route setup message to be transmitted is modified in step S140: and after the address of the previous hop node is modified into the address of the local node, forwarding the path establishment message in a broadcasting mode.
In order to prevent the broadcast message frame from passing through the network to form a loop, the routing information may further include: a first message identification for identifying the broadcast message. In this way, each communication node receiving the broadcast message determines whether the same message has been forwarded according to the first message identifier, and if so, discards the message. In such an implementation, the method further comprises:
s112, judging whether the broadcast message is forwarded or not according to the first message identifier.
S114, in response to the special message is forwarded, the broadcast message is discarded.
Furthermore, as described above, the method of the embodiment of the present application may be performed by any communication node in the network, and the communication node may itself be a destination node of another communication while participating in the construction of a communication path between a source node and the destination node. Therefore, when any broadcast message is received, the communication node judges according to the routing information of the message according to the method of the embodiment of the application, and sends a response message to the broadcast message in a broadcast mode when the destination node address is the address of the communication node, the response message can be sent back to the source node through a plurality of paths, the source node can find a final communication path between the source node and the source node according to the response message, and meanwhile, the problem that the message cannot be sent back due to unequal wireless transceiving performances is eliminated. In such an implementation, the method of the embodiment of the present application further includes:
s150, responding that the address of a destination node corresponding to a broadcast message is the same as the address of a local node, and sending a response message to a source node corresponding to the broadcast message in a broadcast mode. Wherein, the response message includes the routing information of the corresponding broadcast message, and further includes: a second message identification for identifying the reply message.
It should be noted that, for any communication node, it may receive the same broadcast message from multiple paths, and therefore, the repeatedly received broadcast message is also discarded according to the first message identifier. In addition, in order to avoid collision between the response message and the signal of the broadcast message that has not been stopped in the signal range of the destination node, the broadcast of the response message may be delayed for a certain time in step S150. Specifically, the method comprises the following steps:
in step S150, the reply message may be forwarded by broadcasting after a second predetermined delay. The second predetermined delay may also be any preset delay time, for example, the time required for one-hop propagation is set according to the historical propagation information.
A communication node implementing the method of the embodiments of the present application may be in the signal range of any destination node, and at this time, a response message broadcasted by the destination node is received according to the method of the embodiments of the present application. In the method of the embodiment of the present application, the communication node that receives such a response message forwards the response message in a point-to-point unicast manner. Specifically, the method of the embodiment of the present application may further include:
s160, obtaining at least one response message, where the response message is sent by a destination node in a broadcast manner, and the response message includes routing information of a corresponding broadcast message, and the method further includes: a second message identification for identifying the reply message.
And S180, forwarding the response message according to the routing information corresponding to the response message.
For a communication node that has established and/or participated in the communication between the source nodes indicated in the routing information corresponding to the reply message, the previous path may be multiplexed, and the reply message may be forwarded directly to the source node. This can reduce the amount of routing information that each communication node needs to store. If the routing information has been previously stored, no new storage space is wasted.
And for the communication nodes which do not store the communication paths between the communication nodes and the corresponding source nodes, the path establishment response message can be forwarded to the previous hop nodes according to the corresponding previous hop node addresses and the records associated with the broadcast message. Specifically, the method comprises the following steps:
step S180 may further include:
s182, determining the last hop node address of the corresponding broadcast message according to the source node address in the routing information corresponding to the response message;
and S184, forwarding the response message to the previous hop node according to the previous hop node address.
Similarly, for the response message, in order to prevent the loop from forming, the response message may also include: a second message identification for identifying the reply message. In this way, each communication node that receives the reply message can determine whether the same message has been forwarded based on the second message identifier, and if so, discard the message. In such an implementation, the method further comprises:
s172, judging whether the response message is forwarded or not according to the second message identifier;
s174, in response to the response message is forwarded, the response message is discarded.
Similarly, when a communication node implementing the method of the embodiment of the present application constructs a communication path between a source node and a destination node, the communication node itself may also be a source node corresponding to another broadcast message, and after receiving any response message, it needs to implement a determination according to a corresponding source node address. In addition, in the method according to the embodiment of the present application, since the response message is broadcast from the destination node, the response message may reach the source node through multiple paths, and after the source node selects the final communication path, the source node sends an acknowledgement message to the destination node along the path to complete establishment of the communication path. Correspondingly, the method of the embodiment of the present application may further include:
and S190, responding to the source node address corresponding to the routing information included in the response message as a local node address, and sending a confirmation message to the destination node according to the previous hop node address corresponding to the response message. The acknowledgement message is used to determine that the path associated with the previous-hop node address is the final communication path between the source node and the destination node.
In applying for the method of the present embodiment, the final communication path between the source node and the destination node may be determined according to any suitable principle. In a possible implementation manner, the path establishment response message may further include: the total hop count of the corresponding path establishment message. In such an implementation, in step S190, the previous hop node address may be determined according to at least the total hop count of the at least one reply message. For example, the path corresponding to the reply message with the smallest total number of hops may be determined as the final communication path. In another possible implementation, the final communication path may be determined according to the arrival time of the reply message at the source node, for example, the path corresponding to the reply message that arrives earliest at the source node is selected as the final communication path. In such an implementation manner, in step S190, the previous-hop node address may be determined according to at least a time of acquiring the at least one response message.
In addition, in the method of the embodiment of the present application, in order to prevent unstable communication due to a difference in wireless performance caused by environmental factors such as weather in the future, all the communication nodes transmit messages in the path establishment process with a transmission power not exceeding a preset power, including the broadcast message, the response message, and the acknowledgement message, and the transmission powers of the broadcast message, the response message, and the acknowledgement message may be the same or different. The preset power may be, for example, 80% of the transmission power set by the user, and after the communication path is established, the transmission of the communication data may use 100% of the transmission power set by the user.
To sum up, the method of the embodiment of the present application establishes a communication path between a source node and a destination node in a centerless, self-organizing, peer-to-peer, multi-hop and on-demand routing manner, and can eliminate nodes for path storage, management and maintenance, each communication node only stores information of neighboring nodes passing through to the source node and to the destination node, and finally establishes a bidirectional transmission path between the source node and the destination node, thereby realizing fast inter-node communication. When the secondary data transmission is carried out, the searching and the establishment of the path are not needed, and the communication task between the nodes can be completed directly according to the information stored by each node.
Referring now to fig. 2, a flow diagram of one example of a broadcast method according to one implementation of an embodiment of the present application, which may be performed by any of the communication nodes as a source node. As shown in fig. 2, the method may include the steps of:
s220, sending a broadcast message to a destination node in a broadcast mode, wherein the broadcast message comprises routing information associated with the broadcast message, and the routing information comprises: a source node address, a destination node address, and a hop count. As described in conjunction with fig. 1, when a source node desires to communicate with a destination node, if an available communication path exists between the source node and the destination node in the network, the source node may perform point-to-point transmission of data according to a physical address of a next-hop node that is stored by itself and passed by when reaching the destination node, and the next-hop node continues forwarding according to the stored physical addresses of the next-hop nodes until the data is transmitted to the destination node. Otherwise, the source node sends a broadcast message in a broadcast mode for establishing a communication path between the source node and the destination node. The broadcast message includes routing information associated with the broadcast message, including but not limited to: a source node address, a destination node address, and a hop count configured to be modified by a forwarding node forwarding the path setup message, and the broadcast message is configured to be forwarded by the forwarding node after a first predetermined delay when the hop count does not exceed a preset value (e.g., zero). Forwarding nodes within the signal range of the source node may acquire the broadcast message and assist in establishing a communication path between the source node and the destination node according to the message forwarding method described with reference to fig. 1.
S240, at least one response message responding to the broadcast message is obtained, the response message is sent by the destination node in a broadcast mode, and the response message comprises the routing information of the corresponding broadcast message and a second message identifier used for identifying the response message.
And S260, sending a confirmation message to the destination node according to the previous hop node address of the response message, wherein the confirmation message is used for determining that the path associated with the previous hop node address is a communication path between the source node and the destination node.
As described in connection with fig. 1, the source node may determine a final communication path to the destination node from the received reply message and send an acknowledgement message to the destination node. In applying for the method of the present embodiment, the final communication path between the source node and the destination node may be determined according to any suitable principle. In a possible implementation manner, the response message may further include: a total hop count of the corresponding broadcast message. In such an implementation, the previous hop node address may be determined in step S260 according to at least the total hop count of the at least one reply message. For example, the path corresponding to the reply message with the smallest total number of hops may be determined as the final communication path. In another possible implementation, the final communication path may be determined according to the arrival time of the reply message at the source node, for example, the path corresponding to the reply message that arrives earliest at the source node is selected as the final communication path. In such an implementation manner, in step S260, the previous-hop node address may be determined according to at least a time of acquiring the at least one response message.
Because the receiving range of each communication node is limited, in order to implement establishment of a communication path as much as possible, the method of this embodiment further sets a certain retransmission mechanism, and the source node does not acquire the response message from the destination node within a preset time, and then re-initiates path establishment, that is, broadcasts the broadcast message sent to the destination node again. Specifically, the method of this embodiment may further include:
s280, in response to the response message is not acquired within the preset time, the broadcast message is sent to the destination node again in a broadcast mode.
In addition, the broadcast message can be retransmitted after a predetermined delay time in order to avoid as far as possible collisions which can occur, in particular, in the case of larger network sizes. Specifically, in step S280, the response message is not acquired within the preset time, and the broadcast message may be rebroadcast after a third predetermined delay.
It should be noted that, in the embodiments of the present application, the first, second, and third predetermined delays may be arbitrarily set as needed, and for the establishment of each communication path (the same pair of source node and destination node), the first, second, and/or third predetermined delays in each path establishment process may be adjusted accordingly in consideration of the possibility of re-initiating the establishment of the communication path due to the path establishment failure.
Referring now to fig. 3, which is a flow chart of an example of a message forwarding method according to another implementation of an embodiment of the present application, the method may be performed by any communication node as a destination node. As shown in fig. 3, the method may include the steps of:
s320, at least one broadcast message is obtained, the broadcast message is sent by a source node in a broadcast mode, the broadcast message comprises routing information associated with the broadcast message, and the routing information comprises: a source node address, a destination node address, and a hop count.
S340, sending a response message to the source node in a broadcasting mode, wherein the response message comprises the routing information of the corresponding broadcast message and a second message identifier for identifying the response message;
wherein the hop count is configured to be modified by a forwarding node forwarding the broadcast message, and when the hop count does not exceed a preset value, the broadcast message is configured to be forwarded by the forwarding node after a first predetermined delay.
In order to avoid collision of the response message with the signal of the broadcast message that has not yet been stopped within the signal range of the destination node, the broadcast of the response message may also be delayed for a certain time in step S340. Specifically, the reply message is forwarded by broadcasting after a second predetermined delay in step S340.
Furthermore, as described with reference to fig. 1, for any destination node, it may receive the same broadcast message from multiple paths, and therefore, it is necessary to discard the broadcast message that is repeatedly received according to the first message identifier corresponding to the broadcast message. Specifically, the method of the embodiment of the present application may further include:
s332, judging whether the broadcast message is received or not according to the first message identifier;
s334, in response to receiving the broadcast message, discarding the broadcast message.
It should be noted that, in the descriptions made with reference to fig. 2 and fig. 3, for avoiding redundancy, the same or corresponding features as those already described in the descriptions made with reference to fig. 1 are not described, and such the same or corresponding technical features may be described with reference to fig. 1.
As shown in fig. 4, an embodiment of the present application further provides a communication method, where the method includes:
s420. at a first preset power, a message associated with the communication path establishment is sent, such as the broadcast message, the reply message and the acknowledgement message described in connection with fig. 1-3.
S440, responding to the establishment of the communication path, sending communication data with a second preset power, namely, after the communication path is established, the data transmitted between the source node and the destination node along the path.
Wherein the first preset power is smaller than the second preset power. In one possible implementation manner, the first preset power is not more than 80% of the preset power (e.g., the power set by the user) of the corresponding communication node, and the second preset power is 100% of the preset power of the communication node.
It is understood by those skilled in the art that, in the method according to the embodiments of the present application, the sequence numbers of the steps do not mean the execution sequence, and the execution sequence of the steps should be determined by their functions and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Corresponding to the method in each of the above embodiments, the embodiments of the present application also provide a communication device, including:
a broadcast receiving unit, configured to obtain at least one broadcast message, where the broadcast message includes routing information associated with the broadcast message, and the routing information includes: counting the hop count;
and the broadcast forwarding unit is used for at least responding to the hop count not exceeding a preset value, increasing the hop count by 1 and forwarding the broadcast message in a broadcast mode after a first preset delay.
Optionally, the preset value is zero.
Optionally, the broadcast message is sent by a source node to a destination node in a broadcast manner, and the routing information further includes: a source node address, a destination node address, and a previous hop node address;
the communication device further includes:
a storage unit for storing the routing information associated with the broadcast message;
the broadcast forwarding unit further includes: and the routing information updating module is used for modifying the previous hop node address into a local node address and then forwarding the broadcast message in a broadcast mode.
Optionally, the routing information further includes: a first message identification for identifying the broadcast message;
the communication device further includes:
a message identification unit, configured to determine whether the broadcast message is forwarded according to the first message identifier;
a discarding unit, configured to discard the broadcast message in response to forwarding the broadcast message.
Optionally, the communication device further comprises:
the response unit is used for responding that the address of a destination node corresponding to a broadcast message is the same as the address of a local node, and sending a response message to a source node corresponding to the broadcast message in a broadcast mode;
wherein, the response message includes the routing information of the corresponding broadcast message.
Optionally, the communication device further comprises:
the response receiving unit is used for acquiring at least one response message, wherein the response message is sent by a destination node in a broadcasting mode and comprises the routing information of the corresponding broadcast message;
and the response forwarding unit is used for forwarding the response message according to the routing information.
Optionally, the reply forwarding unit includes:
and the response delay module is used for at least responding that the hop count in the response message does not exceed a preset value, increasing 1 for the hop count in the response message, and forwarding the response message after a second preset delay.
Optionally, the reply forwarding unit further includes:
a previous hop determining module, configured to determine, according to a source node address in the routing information, a previous hop node address from the source node address to a local node;
and the last hop sending module is used for forwarding the response message to the last hop node according to the last hop node address.
Optionally, the communication device further comprises:
a response confirmation unit, configured to send, in response to that a source node address in the routing information is a local node address, a confirmation message to the destination node according to a previous-hop node address corresponding to the response message;
wherein the broadcast message is used to establish a communication path between the source node and the destination node, and the acknowledgement message is used to determine that the path associated with the previous-hop node address is the communication path.
Optionally, the response message further includes: a total hop count of the corresponding broadcast message;
the confirmation unit includes:
and the total hop count selection module is used for determining the previous hop node address at least according to the total hop count.
Optionally, the confirming unit includes:
and the response time selection module is used for determining the address of the previous hop node at least according to the time for acquiring the at least one response message.
Optionally, in the method, the message is forwarded or sent by a local node at a transmission power not exceeding a preset power of the local node.
In another aspect of the embodiments of the present application, there is also provided a communication device, including:
a broadcast sending unit, configured to send a broadcast message to a destination node in a broadcast manner, where the broadcast message includes routing information associated with the broadcast message, and the routing information includes: counting the hop count;
a response obtaining unit, configured to obtain at least one response message in response to the broadcast message, where the response message is sent by the destination node in a broadcast manner, and the response message includes routing information of a corresponding broadcast message;
the response confirmation unit is used for sending a confirmation message to the destination node according to the previous hop node address of the at least one response message;
wherein the hop count is configured to be modified by a forwarding node that forwards the broadcast message, and when the hop count does not exceed a preset value, the broadcast message is configured to be forwarded by the forwarding node after a first predetermined delay.
Optionally, the preset value is zero.
Optionally, the broadcast message is used to establish a communication path between the source node and the destination node, and the acknowledgement message is used to determine that the path associated with the previous-hop node address is the communication path.
Optionally, the routing information in the response message further includes: the total hop count of the corresponding broadcast message to reach the corresponding destination node;
the response confirmation unit includes:
and the total hop count selection module is used for determining the previous hop node address at least according to the total hop count.
Optionally, the response confirmation unit includes:
and the response time selection module is used for determining the address of the previous hop node at least according to the time for acquiring the at least one response message.
Optionally, the communication device further comprises:
and the rebroadcasting unit is used for responding to the situation that the at least one response message is not acquired within a preset time and sending the broadcast message to the destination node again in a broadcast mode.
Optionally, the message is sent by the local node with a transmission power not exceeding a preset power of the local node.
In another possible implementation manner of the present application, there is also provided a communication device, including:
a broadcast obtaining unit, configured to obtain at least one broadcast message, where the broadcast message is sent by a source node in a broadcast manner, and the broadcast message includes routing information associated with the broadcast message, and the routing information includes: a source node address and a destination node address;
the response unit is used for responding that the destination node address in the routing information of the broadcast message is the same as the local node address and sending a response message to the source node in a broadcast mode;
wherein the response message includes routing information corresponding to the broadcast message, and the routing information includes: counting the hop count;
wherein the hop count is configured to be modified by a forwarding node forwarding the broadcast message and/or forwarding the reply message; when the hop count does not exceed a first preset value, the broadcast message is configured to be forwarded by the forwarding node after a first predetermined delay; and/or the hop count does not exceed a second preset value, the reply message is configured to be forwarded by the forwarding node after a second predetermined delay.
Further, embodiments of the present application also provide a storage device, e.g., a computer-readable medium, comprising computer-readable instructions that when executed perform the following: the operations of the steps of the method in the embodiment shown in fig. 1 described above are performed.
Further, embodiments of the present application also provide a storage device, e.g., a computer-readable medium, comprising computer-readable instructions that when executed perform the following: the operations of the steps of the method in the embodiment shown in fig. 2 described above are performed.
Further, embodiments of the present application also provide a storage device, e.g., a computer-readable medium, comprising computer-readable instructions that when executed perform the following: the operations of the steps of the method in the embodiment shown in fig. 3 described above are performed.
Further, embodiments of the present application also provide a storage device, e.g., a computer-readable medium, comprising computer-readable instructions that when executed perform the following: the operations of the steps of the method in the embodiment shown in fig. 4 described above are performed.
The technical solutions of the embodiments of the present application are further described below by specific examples.
Referring to fig. 5, a schematic diagram of a process for establishing a communication path from a communication node (source node) a to a communication node (destination node) S according to the method of the present application is shown.
As shown in fig. 5, when node a desires to communicate with node S, if the physical address of the next hop node passed by the arrival node S is stored in node a, it indicates that a communication path between node a and node S already exists in the network (as a → C → I → J → S in fig. 5). And the node A sends the data to the node C according to the stored physical address of the node C, and the node C continues to send the data to the node I according to the stored physical address of the node I until the data is transmitted to the node S, so that the communication task is completed.
If the physical address of the next hop passed by the arriving node S is not stored in the node a, according to the technical solution of the embodiments of the present application, a communication path is established through the following steps.
1. The node A sends out a path establishment message in a broadcasting mode, wherein the message comprises: message ID (to distinguish each broadcast), source node address, destination address, hop count (currently zero), forwarding node address of the previous hop.
2. Assume that node B, C, D receives this path setup message throughout the network:
first, each node B, C, D records the following routing information: the broadcast message ID, the last hop node address, the source node address, the destination node address.
Then, each node B, C, D randomly delays for a certain period of time, and adds 1 to the hop count contained in the path establishment message, and then broadcasts twice, the hop count in the path establishment message of the second broadcast being 1.
3. Node E, F in the network then receives the broadcast from node D, and node G receives the broadcast from node B. Although node G can also receive the broadcast from node C, node C's message arrives late and is discarded (the dotted arrow in fig. 4 indicates the delivery path for the discarded message) because the node does not receive the same ID broadcast message repeatedly, and the previous broadcast is randomly delayed when forwarded by node B, C, D.
The node E, F, G that received the message also records the following information: a path establishment request message ID, a previous hop node address, a source node address and a destination node address. Node E, F, G then delays again and directly increments the hop count contained in the broadcast message by 1 again and broadcasts it three times (this time with a hop count of 2).
4. Finally, until the node S receives the first broadcast path establishment message (the node S also does not receive the message with the same ID repeatedly), the node S delays the time required for one-hop propagation and starts the optimal communication path confirmation process, so as to help the node a to find the optimal path and eliminate the message unable to be returned due to the unequal wireless transceiving performances.
The optimal communication path confirmation process is as follows:
1. the node S broadcasts a path establishment response request, and the broadcast message comprises: a path establishment response request message ID, a path establishment request message ID, a source node address, a destination node address, a total hop count (hop count when the node S receives the corresponding path establishment message), and starts a reverse communication path discovery process.
2. Assume that node N, J, Q received this broadcast message.
Firstly, the node N, J, Q inquires whether the physical address of the previous hop node reaching the node A is recorded, if so, the node can randomly delay a period of time and then directly send the response message of S to the node A to the previous level node in the record;
if the node N, J, Q does not record the last hop address of the node a in the past after the query, the node may randomly delay for a period of time, and send the response message to the node a according to the last hop address in the routing message corresponding to the path establishment request message.
3. Assuming that the previous hop node includes the node L, K, I, H, after receiving the point-to-point response message, the node L, K, I, H also queries whether it has recorded the previous hop address record of the node a, and if not, it continues to send the response message to the node a corresponding to the path establishment request message.
4. And so on, until the node A receives the response message sent by the node S for the first time (indicated by a thick arrow in FIG. 4), the response messages sent by other nodes are not processed (indicated by thick dotted arrows D to A and B to A in FIG. 4), and the final path confirmation is started.
5. The node A sends path establishment confirmation information to a previous hop node C of the received path establishment response message, the node C stores the previous temporarily recorded previous hop address and next address to the node S into a routing table of the node C, then continues to send the path establishment confirmation message to a next node I, and the node I also finally confirms and stores the previous temporary record until the node S receives the path establishment confirmation message, and the whole path establishment process is completed.
It is stated that, in the whole path establishment process, all nodes transmit using 80% of the transmission power set by the user, so as to prevent unstable communication caused by the difference in wireless performance due to environmental factors such as weather in the future. The node A sends a path establishment message to the node S, the node S carries out a path establishment response to the node A, and the node A sends a path establishment confirmation message to the node S, both have overtime mechanisms, and if no corresponding path establishment process is carried out within the specified time, the path establishment process can be restarted.
After the path is successfully established, when the node A sends data to the node S, the node A directly sends the data to the next hop of node, and the node S receives the data and then carries out confirmation response to ensure reliable communication, wherein if no response is received after overtime, the path discovery process is restarted.
In some cases, it may happen that the transmission power in two directions of inter-node communication is not equal, resulting in a routing failure. Assuming that there are four ABCD nodes, when initiating a routing request: the message sent by A can be received only by B, the message sent by B can be received only by C, and the destination node D sent by C can receive the message. When returning the route request: due to the problems of unequal power and the like, both B and C sent by D are received, then B sends a message to A first, which means that the path is changed into A → B → D when A confirms the path, and B to D can not communicate actually, thus D cannot receive the message and the routing fails. To solve this problem, a further approach is adopted. According to a further aspect, in the above case, when D sends a broadcast return route request, B and C listen for the route request returned by D and may make a record. When A sends route confirmation message and B receives the route confirmation message, C listens the confirmation message and starts a timer. After starting the timer, C listens for at least one acknowledgement response message in response to the acknowledgement message. The acknowledgement response message is sent by the destination node. If the timer is expired, C sends a confirmation message to D if C does not receive the confirmation corresponding message from D to A, D sends the route confirmation corresponding message to C first, then C continues to B and then to A.
Fig. 6 is a schematic structural diagram of another example of a communication node according to an embodiment of the present application, and the specific embodiment of the present application does not limit a specific implementation of the communication node. As shown in fig. 6, the communication node 600 may include:
a processor (processor)610, a Communications Interface 620, a memory 630, and a communication bus 640. Wherein:
the processor 610, communication interface 620, and memory 630 communicate with each other via a communication bus 640.
A communication interface 620 for communicating with network elements such as clients and the like.
The processor 610 is configured to execute the program 632, and may specifically execute the relevant steps in the foregoing method embodiments.
In particular, the program 632 may include program code that includes computer operating instructions.
The processor 610 may be a central processing unit CPU, or an application specific Integrated circuit asic, or one or more Integrated circuits configured to implement embodiments of the present application.
The memory 630 is used for storing the program 632. Memory 630 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory. The program 632 may specifically be adapted to cause the communication node 600 to perform the following steps:
obtaining at least one broadcast message, wherein the broadcast message includes routing information associated with the broadcast message, and the routing information includes: counting the hop count;
and at least responding to the hop count not exceeding a preset value, increasing the hop count by 1, and forwarding the broadcast message in a broadcast mode after a first preset delay.
For specific implementation of each step in the program 632, reference may be made to corresponding steps and corresponding descriptions in units in the foregoing embodiments, which are not described herein again. It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described devices and modules may refer to the corresponding process descriptions in the foregoing method embodiments, and are not described herein again.
Fig. 7 is a schematic structural diagram of another example of a communication node according to an embodiment of the present application, and the specific embodiment of the present application does not limit a specific implementation of the communication node. As shown in fig. 7, the communication node 700 may include:
a processor (processor)710, a Communications Interface 720, a memory 730, and a communication bus 740. Wherein:
processor 710, communication interface 720, and memory 730 communicate with each other via a communication bus 740.
A communication interface 720 for communicating with network elements such as clients and the like.
The processor 710 is configured to execute the program 732, and may specifically perform the relevant steps in the above method embodiments.
In particular, the program 732 may include program code that includes computer operational instructions.
The processor 710 may be a central processing unit CPU, or an application specific Integrated circuit asic, or one or more Integrated circuits configured to implement embodiments of the present application.
A memory 730 for storing a program 732. Memory 730 may comprise high-speed RAM memory and may also include non-volatile memory (non-volatile memory), such as at least one disk memory. The procedure 732 may specifically be adapted to cause said communication node 700 to perform the following steps:
sending a broadcast message to a destination node in a broadcast manner, wherein the broadcast message includes routing information associated with the broadcast message, and the routing information includes: counting the hop count;
acquiring at least one response message responding to the broadcast message, wherein the response message is sent by a destination node in a broadcast mode and comprises routing information of the corresponding broadcast message and a second message identifier for identifying the response message;
sending a confirmation message to the destination node according to the last hop node address of the at least one response message;
wherein the hop count is configured to be modified by a forwarding node that forwards the broadcast message, and when the hop count does not exceed a preset value, the broadcast message is configured to be forwarded by the forwarding node after a first predetermined delay.
For specific implementation of each step in the program 732, reference may be made to corresponding steps and corresponding descriptions in units in the foregoing embodiments, which are not described herein again. It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described devices and modules may refer to the corresponding process descriptions in the foregoing method embodiments, and are not described herein again.
Fig. 8 is a schematic structural diagram of another example of a communication node according to an embodiment of the present application, and the specific embodiment of the present application does not limit a specific implementation of the communication node. As shown in fig. 8, the communication node 800 may include:
a processor (processor)810, a communication Interface 820, a memory 830, and a communication bus 840. Wherein:
processor 810, communication interface 820, and memory 830 communicate with one another via a communication bus 840.
A communication interface 820 for communicating with a network element, such as a client.
The processor 810 is configured to execute the program 832, and may specifically perform the relevant steps in the above method embodiments.
In particular, the program 832 may include program code comprising computer operational instructions.
The processor 810 may be a central processing unit CPU, or an application specific Integrated circuit asic, or one or more Integrated circuits configured to implement embodiments of the present application.
The memory 830 stores a program 832. Memory 830 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory. The program 832 may be specifically adapted to cause the communication node 800 to perform the steps of:
acquiring at least one broadcast message, wherein the broadcast message is sent by a source node in a broadcast manner, and the broadcast message comprises routing information associated with the broadcast message, and the routing information comprises: counting the hop count;
sending a response message to the source node in a broadcast mode, wherein the response message comprises routing information of the corresponding broadcast message and a second message identifier for identifying the response message;
wherein the hop count is configured to be modified by a forwarding node forwarding the broadcast message, and when the hop count does not exceed a preset value, the broadcast message is configured to be forwarded by the forwarding node after a first predetermined delay.
For specific implementation of each step in the program 832, reference may be made to corresponding steps and corresponding descriptions in units in the foregoing embodiments, which are not described herein again. It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described devices and modules may refer to the corresponding process descriptions in the foregoing method embodiments, and are not described herein again.
Fig. 9 is a schematic structural diagram of another example of a communication node according to an embodiment of the present application, and the specific embodiment of the present application does not limit a specific implementation of the communication node. As shown in fig. 9, the communication node 900 may include:
a processor (processor)910, a Communications Interface 920, a memory 930, and a communication bus 940. Wherein:
the processor 910, communication interface 920, and memory 930 communicate with one another via a communication bus 940.
A communication interface 920 for communicating with network elements such as clients.
The processor 910 is configured to execute the program 932, and may specifically perform the relevant steps in the above method embodiments.
In particular, the program 932 may include program code that includes computer operating instructions.
The processor 910 may be a central processing unit CPU, or an application specific Integrated circuit asic, or one or more Integrated circuits configured to implement embodiments of the present application.
A memory 930 for storing a program 932. Memory 930 may comprise high-speed RAM memory and may also include non-volatile memory (non-volatile memory), such as at least one disk memory. The program 932 may specifically be configured to cause the communications node 900 to perform the following steps:
transmitting a message associated with communication path establishment at a first preset power;
transmitting communication data at a second preset power in response to establishment of the communication path;
wherein the first preset power is smaller than the second preset power.
For specific implementation of each step in the program 932, reference may be made to corresponding steps and corresponding descriptions in units in the foregoing embodiments, which are not described herein again. It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described devices and modules may refer to the corresponding process descriptions in the foregoing method embodiments, and are not described herein again.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and modules may refer to the corresponding descriptions in the foregoing device embodiments, and are not repeated herein.
While the subject matter described herein is provided in the general context of execution in conjunction with the execution of an operating system and application programs on a computer system, those skilled in the art will recognize that other implementations may also be performed in combination with other types of program modules. Generally, program modules include routines, programs, components, data structures, and other types of structures that perform particular tasks or implement particular abstract data types. Those skilled in the art will appreciate that the subject matter described herein may be practiced with other computer system configurations, including hand-held devices, multiprocessor systems, microprocessor-based or programmable consumer electronics, minicomputers, mainframe computers, and the like, as well as distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote memory storage devices.
Those of ordinary skill in the art will appreciate that the various illustrative elements and method steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to perform all or part of the steps of the method according to the embodiments of the present application. Such computer-readable storage media include physical volatile and nonvolatile, removable and non-removable media implemented in any manner or technology for storage of information such as computer-readable instructions, data structures, program modules or other data. The computer-readable storage medium specifically includes, but is not limited to, a USB flash drive, a removable hard drive, a Read-Only Memory (ROM), a Random Access Memory (RAM), an erasable programmable Read-Only Memory (EPROM), an electrically erasable programmable Read-Only Memory (EEPROM), flash Memory or other solid state Memory technology, a CD-ROM, a Digital Versatile Disk (DVD), an HD-DVD, a Blue-Ray or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer.
The above embodiments are only for illustrating the invention and are not to be construed as limiting the invention, and those skilled in the art can make various changes and modifications without departing from the spirit and scope of the invention, therefore, all equivalent technical solutions also belong to the scope of the invention, and the scope of the invention is defined by the claims.

Claims (23)

1. A method for forwarding messages, the method comprising:
acquiring a first broadcast message, wherein the broadcast message is sent to a destination node by a source node in a broadcast mode, the broadcast message comprises routing information associated with the broadcast message, and the routing information comprises: counting the hop count; temporarily recording the last hop node address of the routing information;
at least responding to the hop count not exceeding a preset value, increasing the hop count by 1, and forwarding the broadcast message in a broadcast mode after a first preset delay; after the hop count exceeds the preset value, the communication node receiving the broadcast message does not delay to continue broadcasting;
intercepting a response message responding to the broadcast message, wherein the response message is sent by a destination node and comprises the routing information of the corresponding broadcast message and a second message identifier for identifying the response message; temporarily recording the last hop node address of the routing information in the response message;
according to the routing information, at least responding to the hop count in the response message not exceeding a preset value, increasing the hop count in the response message by 1, and forwarding the response message after a second preset delay;
intercepting a confirmation message responding to the response message for the first time, wherein the confirmation message is used for determining that a path associated with a previous hop node address is the communication path; judging the destination node address of the confirmation message as other nodes, and starting a timer;
in response to the timer expiring and not listening at least one acknowledgement response message in response to the acknowledgement message, forwarding the at least one acknowledgement message to a destination node address of the acknowledgement message; and saving the routing message final confirmation temporarily recorded before to the routing table.
2. The method of claim 1, wherein the predetermined value is zero.
3. The method according to claim 1 or 2, wherein the routing information further comprises: a source node address, a destination node address;
the method further comprises the following steps:
storing the routing information associated with the broadcast message;
the forwarding the broadcast message in a broadcast manner further comprises:
and after the address of the previous hop node is modified into the address of the local node, forwarding the broadcast message in a broadcast mode.
4. The method of claim 3, wherein the routing information further comprises: a first message identification for identifying the broadcast message;
the method further comprises the following steps:
judging whether the broadcast message is forwarded or not according to the first message identifier;
in response to forwarding the broadcast message, discarding the broadcast message.
5. The method of claim 3, further comprising:
responding to that a destination node address corresponding to a broadcast message is the same as a local node address, and sending a response message to a source node corresponding to the broadcast message in a broadcast mode; wherein, the response message includes the routing information of the corresponding broadcast message.
6. The method of claim 3, further comprising:
acquiring at least one response message, wherein the response message is sent by a destination node in a broadcasting mode and comprises routing information of a corresponding broadcast message;
and forwarding the response message according to the routing information.
7. The method of claim 6, wherein the forwarding the reply message further comprises:
determining the last hop node address from the source node address to the local according to the source node address in the routing information;
and forwarding the response message to the previous hop node according to the previous hop node address.
8. The method of claim 6, further comprising:
responding to the source node address in the routing information as a local node address, and sending a confirmation message to the destination node according to a previous hop node address corresponding to the response message;
wherein the broadcast message is used to establish a communication path between the source node and the destination node, and the acknowledgement message is used to determine that the path associated with the previous-hop node address is the communication path.
9. The method of claim 8, wherein the response message further comprises: a total hop count of the corresponding broadcast message;
the acknowledgement message sent to the destination node further comprises:
and determining the last hop node address at least according to the total hop count.
10. The method of claim 8, wherein the acknowledgement message sent to the destination node further comprises:
and determining the address of the previous hop node at least according to the time for acquiring the at least one response message.
11. A method according to claim 1, 5, 6 or 8, characterized in that in the method, messages are forwarded or sent by a local node with a transmission power not exceeding a preset power for the local node.
12. A communication device, comprising:
a broadcast receiving unit, configured to obtain a first broadcast message, where the broadcast message is sent by a source node to a destination node in a broadcast manner, and the broadcast message includes routing information associated with the broadcast message, where the routing information includes: counting the hop count; temporarily recording the last hop node address of the routing information;
a broadcast forwarding unit, configured to at least respond to that the hop count does not exceed a preset value, increase the hop count by 1, and forward the broadcast message in a broadcast manner after a first predetermined delay; after the hop count exceeds the preset value, the communication node receiving the broadcast message does not delay to continue broadcasting;
intercepting a response message responding to the broadcast message, wherein the response message is sent by a destination node and comprises the routing information of the corresponding broadcast message and a second message identifier for identifying the response message; temporarily recording the last hop node address of the routing information in the response message;
a response delay module, configured to at least respond that the hop count in the response message does not exceed a preset value, increase the hop count in the response message by 1, and forward the response message after a second predetermined delay;
intercepting a confirmation message responding to the response message for the first time, wherein the confirmation message is used for determining that a path associated with a previous hop node address is the communication path; judging the destination node address of the confirmation message as other nodes, and starting a timer;
in response to the timer expiring and not listening at least one acknowledgement response message in response to the acknowledgement message, forwarding the at least one acknowledgement message to a destination node address of the acknowledgement message; and saving the routing message final confirmation temporarily recorded before to the routing table.
13. The communications device of claim 12, wherein the predetermined value is zero.
14. The communication device according to claim 12 or 13, wherein the routing information further comprises: a source node address, a destination node address;
the communication device further includes:
a storage unit for storing the routing information associated with the broadcast message;
the broadcast forwarding unit further includes: and the routing information updating module is used for modifying the previous hop node address into a local node address and then forwarding the broadcast message in a broadcast mode.
15. The communications device of claim 14, wherein the routing information further comprises: a first message identification for identifying the broadcast message;
the communication device further includes:
a message identification unit, configured to determine whether the broadcast message is forwarded according to the first message identifier;
a discarding unit, configured to discard the broadcast message in response to forwarding the broadcast message.
16. The communications device of claim 14, wherein said communications device further comprises:
the response unit is used for responding that the address of a destination node corresponding to a broadcast message is the same as the address of a local node, and sending a response message to a source node corresponding to the broadcast message in a broadcast mode;
wherein, the response message includes the routing information of the corresponding broadcast message.
17. The communications device of claim 14, wherein said communications device further comprises:
the response acquiring unit is used for acquiring at least one response message, wherein the response message is sent by a destination node in a broadcasting mode and comprises the routing information of the corresponding broadcast message;
and the response forwarding unit is used for forwarding the response message according to the routing information.
18. The communication device of claim 17, wherein the reply forwarding unit further comprises:
a previous hop determining module, configured to determine, according to a source node address in the routing information, a previous hop node address from the source node address to a local node;
and the last hop sending module is used for forwarding the response message to the last hop node according to the last hop node address.
19. The communications device of claim 17, further comprising:
a response confirmation unit, configured to send, in response to that a source node address in the routing information is a local node address, a confirmation message to the destination node according to a previous-hop node address corresponding to the response message;
wherein the broadcast message is used to establish a communication path between the source node and the destination node, and the acknowledgement message is used to determine that the path associated with the previous-hop node address is the communication path.
20. The communications device of claim 19, wherein said reply message further comprises: a total hop count of the corresponding broadcast message;
the response confirmation unit includes:
and the total hop count selection module is used for determining the previous hop node address at least according to the total hop count.
21. The communication device according to claim 19, wherein the response confirmation unit includes:
and the response time selection module is used for determining the address of the previous hop node at least according to the time for acquiring the at least one response message.
22. A communications device according to claim 12, 16, 17 or 19, wherein in the method, messages are forwarded or transmitted by a local node at a transmit power not exceeding a preset power by the local node.
23. A communication device, comprising:
a memory and one or more processors;
wherein the memory is communicatively coupled to the one or more processors and has stored therein instructions executable by the one or more processors to enable the one or more processors to implement the method of any one of claims 1-11.
CN201710591785.8A 2017-07-19 2017-07-19 Message forwarding method, broadcasting method, message response method and communication equipment Active CN107196859B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710591785.8A CN107196859B (en) 2017-07-19 2017-07-19 Message forwarding method, broadcasting method, message response method and communication equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710591785.8A CN107196859B (en) 2017-07-19 2017-07-19 Message forwarding method, broadcasting method, message response method and communication equipment

Publications (2)

Publication Number Publication Date
CN107196859A CN107196859A (en) 2017-09-22
CN107196859B true CN107196859B (en) 2020-11-06

Family

ID=59883282

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710591785.8A Active CN107196859B (en) 2017-07-19 2017-07-19 Message forwarding method, broadcasting method, message response method and communication equipment

Country Status (1)

Country Link
CN (1) CN107196859B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019179806A1 (en) * 2018-03-23 2019-09-26 Signify Holding B.V. A method of and devices for inquiring address announce messages in a communication network
CN108712737A (en) * 2018-05-04 2018-10-26 北京洛克家智能科技有限责任公司 A kind of method and system of information exchange
CN110830917A (en) * 2019-09-24 2020-02-21 中移(杭州)信息技术有限公司 User distribution display method, device, terminal and storage medium
CN111511013B (en) * 2020-03-27 2022-02-01 桃芯科技(苏州)有限公司 Method, electronic device, and computer storage medium for synchronizing control signals
CN113938387A (en) * 2021-10-20 2022-01-14 杭州和利时自动化有限公司 Communication method, device and readable storage medium
CN114024786B (en) * 2022-01-04 2022-04-08 杭州趣链科技有限公司 Message broadcasting method and device, computer equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101212495A (en) * 2006-12-26 2008-07-02 株式会社Ntt都科摩 Locating method and device in wireless multi-hop network
CN101489276A (en) * 2009-01-06 2009-07-22 北京交通大学 Multicast routing method for Ad Hoc network
CN101626303A (en) * 2008-07-09 2010-01-13 华为技术有限公司 Method, system and device for sending data
CN101873273A (en) * 2010-07-08 2010-10-27 华为技术有限公司 Routing forwarding method, routing node and wireless communication network
CN102821437A (en) * 2012-08-13 2012-12-12 东南大学 Ad-hoc on-demand distance vector routing method
CN105681028A (en) * 2015-12-28 2016-06-15 华南师范大学 Multi-user network system for footballene structure and quantum key distribution method thereof

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4258698B2 (en) * 2001-03-21 2009-04-30 日本電気株式会社 Broadcast system, broadcast method thereof, and broadcast program
US7933236B2 (en) * 2005-10-27 2011-04-26 Nortel Networks Limited Methods and systems for a wireless routing architecture and protocol
KR101235582B1 (en) * 2006-11-21 2013-02-21 삼성전자주식회사 Method for processing control message in wireless mesh network and apparatus thereof

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101212495A (en) * 2006-12-26 2008-07-02 株式会社Ntt都科摩 Locating method and device in wireless multi-hop network
CN101626303A (en) * 2008-07-09 2010-01-13 华为技术有限公司 Method, system and device for sending data
CN101489276A (en) * 2009-01-06 2009-07-22 北京交通大学 Multicast routing method for Ad Hoc network
CN101873273A (en) * 2010-07-08 2010-10-27 华为技术有限公司 Routing forwarding method, routing node and wireless communication network
CN102821437A (en) * 2012-08-13 2012-12-12 东南大学 Ad-hoc on-demand distance vector routing method
CN105681028A (en) * 2015-12-28 2016-06-15 华南师范大学 Multi-user network system for footballene structure and quantum key distribution method thereof

Also Published As

Publication number Publication date
CN107196859A (en) 2017-09-22

Similar Documents

Publication Publication Date Title
CN107196859B (en) Message forwarding method, broadcasting method, message response method and communication equipment
US9788257B2 (en) Method and system for dynamically forming service aware bluetooth low energy (BLE) mesh network
US10979348B1 (en) Zero-overhead efficient flooding
US9629063B2 (en) Method and system for global topology discovery in multi-hop ad hoc networks
JP5231634B2 (en) Routing method between local peer groups (LPG)
US10893457B2 (en) Route discovery in a mesh communication network
JP2018520580A (en) Method, apparatus and computer program product for service discovery proxy for wireless communication
US10070388B2 (en) Coordinated duty cycle assignment in mesh networks
US20170245132A1 (en) Radio communication system, radio communication device, and radio relay device
CN107453996A (en) Acknowledgement messaging method, message forwarding method and communicator
Feng et al. Stateless multicast protocol for ad hoc networks
Djamaa et al. Efficient and stateless P2P routing mechanisms for the Internet of Things
JP2005204016A (en) Address-assigning method in sensor network
CN108370548A (en) It closes in sensing network NAN and is used for the method and terminal device of service discovery
Dezfouli et al. DICSA: Distributed and concurrent link scheduling algorithm for data gathering in wireless sensor networks
US20120155322A1 (en) Method And Apparatus For Network Node Discovery
JP2016021720A (en) Radio device, radio communication system comprising the same, and program run on radio device
CN110662258A (en) Message forwarding method, device and medium
CN110996266B (en) Multicast group data transmission method of ad hoc network system
CN105072586A (en) Management method for forwarding of broadcast message in embedded wireless ad hoc network
CN110661550B (en) Method, device, storage medium and electronic equipment for forwarding message in HPLC communication link
WO2018098748A1 (en) Communication method in distributed network, node, and system
Lim et al. Efficient multicasting for multi-channel multi-interface wireless mesh networks
JP2011109412A (en) Node device, ad hoc network system, and method of participating in network
US20160165406A1 (en) Node and a method of communicating among a plurality of nodes in content-centric networking environment

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