CN110224938B - Message sending method and related equipment - Google Patents

Message sending method and related equipment Download PDF

Info

Publication number
CN110224938B
CN110224938B CN201810172866.9A CN201810172866A CN110224938B CN 110224938 B CN110224938 B CN 110224938B CN 201810172866 A CN201810172866 A CN 201810172866A CN 110224938 B CN110224938 B CN 110224938B
Authority
CN
China
Prior art keywords
network device
dio
message
network
node
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
CN201810172866.9A
Other languages
Chinese (zh)
Other versions
CN110224938A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201810172866.9A priority Critical patent/CN110224938B/en
Publication of CN110224938A publication Critical patent/CN110224938A/en
Application granted granted Critical
Publication of CN110224938B publication Critical patent/CN110224938B/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/48Routing tree calculation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W40/00Communication routing or communication path finding
    • H04W40/02Communication route or path selection, e.g. power-based or shortest path routing

Landscapes

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

Abstract

The application provides a message sending method and related equipment, wherein the method comprises the following steps: acquiring networking parameters of first network equipment, wherein the networking parameters comprise the hierarchy of the first network equipment, the number of next hop sub-nodes currently connected with the first network equipment, the capacity value of the next hop sub-nodes currently connected with the first network equipment and the number of each hop sub-node connected with the first network equipment; determining the frequency of a first network device for sending a DIO message according to networking parameters; broadcasting a DIO message at the determined frequency, wherein the DIO message comprises the hierarchy of the first network equipment and the capability value of the first network equipment currently connected with the next hop child node, and the DIO message is used for enabling the second network equipment receiving the DIO message to determine whether to select the first network equipment as a parent node. By executing the method, the flexibility of the network equipment for determining and sending the DIO message can be improved.

Description

Message sending method and related equipment
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a message sending method and a related device.
Background
A wireless mesh (mesh) network is also called a multi-hop (multi-hop) network, and is a novel network structure based on multi-hop routing and peer-to-peer network technology. The nodes in the wireless mesh network can transmit and receive information and can also forward information to nearby neighbor nodes, meanwhile, the wireless mesh network can be dynamically and continuously expanded, the total bandwidth continuously changes along with the increase of the interconnection of the nodes and the number of routing hops, and in the change process, the wireless mesh network can also realize autonomous networking, self-management, automatic repair and self-balance.
The Internet Engineering Task Force (IETF) provides a Routing Protocol (IPv6Routing Protocol for Low-Power and loss Networks, RPL) of a Low-Power Lossy network based on IPv6, which can be used to construct a large-scale wireless mesh network. The RPL regards the entire wireless mesh network as a Directed Acyclic Graph (DAG), and then divides the DAG Graph into a plurality of Directed Acyclic graphs (DODAG) Oriented with respect to a Destination, each DODAG Graph including a Destination node called a root node (root), and the root node, i.e., the sink, may receive or transmit the external network information.
As shown in fig. 1, which is an example of a DODAG, the DODAG may resemble a tree network topology. The construction process of the DODAG may include two parts: firstly, the root node n1 can broadcast DODAG Information Object (DIO) message in a certain range, when a certain node n2 receives the DIO message and decides to join the network, an uplink route reaching the root node n1 of the DODAG is established; then, after node n2 is added to the DODAG, a DODAG Destination Advertisement Object (DAO) packet is sent to root node n1, and root node n1 receives the DAO packet and establishes a downlink route to node n2 according to the DAO packet.
Whether the node joins the network is determined according to the received DIO message, so it is important to control the sending frequency of the DIO message, for example, if the sending frequency is too fast, the root node n1 broadcasts the DIO message continuously, redundant transmission is caused, if the sending frequency is too slow, the root node n1 does not broadcast the DIO message for a long time, so that other nodes cannot receive the DIO message in the time, and cannot join the network, and the networking speed becomes slow. In the RPL routing protocol, the sending frequency of DIO packets is controlled based on a Timer (lockle Timer) mechanism. When a time slot starts, the initial DIO message sending frequency is a random number in an interval formed by the minimum time slot length and the maximum time slot length, when a DIO message of a neighbor node currently received by a node is consistent with a DIO message sent by the neighbor node before (for example, the position relation between the neighbor node and the node in the network is not changed), the node DIO message sending interval (which is inversely proportional to the sending frequency) is doubled on the original basis, namely, the sending frequency is reduced by half on the original basis, and when the network fluctuates (for example, the position relation between the neighbor node and the node in the network is changed), the DIO message sending frequency returns to the initial value.
However, the Trickle Timer mechanism controls the sending frequency of the DIO message in the time domain, and adjusts the time slot length simply in a linear increasing mode of double rate, and the flexibility of frequency control is low.
Disclosure of Invention
The technical problem to be solved by the present application is how to improve the flexibility of controlling the sending frequency of the DIO packet by the node.
In a first aspect, the present application provides a packet sending method, which is applicable to a first network device, where the first network device is a routing node in a wireless mesh network, and the first network device comprehensively determines, according to networking parameters such as a hierarchy of the first network device in the network, a number of next-hop child nodes currently connected to the first network device, a number of each-hop child nodes connected to the first network device, and a capability value of the first network device to connect to the next-hop child nodes, a frequency at which the first network device sends a DIO packet, and broadcasts a DIO packet with the determined frequency, where the DIO packet includes the hierarchy of the first network device and the capability value of the first network device to currently connect to the next-hop child nodes, and the DIO packet is used to enable a second network device receiving the DIO packet to determine whether to select the first network device as a parent node. The method and the device can enable the sending frequency of the DIO message to be more suitable for the current networking state, and the frequency is determined according to the variability and reflects the current networking state, so that the sending frequency of the DIO message determined by the first network device can be more suitable for the current networking state, and the flexibility is higher.
As a feasible implementation manner, before acquiring the networking parameter of the first network device, the first network device may further receive a DIO message from a third network device (the third network device is a neighbor node of the first network device in the wireless mesh network), acquire a hierarchy of the third network device and a capability value of the third network device currently connected to the next hop subnode according to the DIO message of the third network device, and finally determine the hierarchy of the first network device according to the hierarchy of the third network device and the capability value of the third network device currently connected to the next hop subnode.
It can be seen that, by implementing the feasible implementation manner, the first network device may determine the hierarchy of the first network device in the network through the received DIO packet, so that the first network device may sense the current networking scale to a certain extent, and the frequency of sending the DIO packet generated by the subsequent decision is more reasonable.
As a possible implementation manner, when the third network device is a parent node of the first network device, the first network device may further send a DAO packet to the third network device, where the DAO packet includes a hierarchy of the first network device, and the DAO packet is used to establish a downlink route from the third network device to the first network device.
It can be seen that, by implementing the feasible implementation manner, when the third network device is the parent node of the first network device, the first network device sends a DAO packet to the third network device, and informs the parent node of the hierarchy of the first network device, so that not only can a downlink route be established between the first network device and the third network device, but also the third network device can know the networking situation of the child node therebelow and update its networking parameters, thereby making the next frequency decision of the third network device more reasonable.
As a possible implementation manner, before determining, by the first network device, the frequency at which the first network device sends the DIO packet according to the networking parameter, the first network device may further determine whether a preset event occurs, and if the preset event does not occur, determine, by the first network device, the frequency at which the first network device sends the DIO packet according to the networking parameter.
As a possible implementation manner, the preset event includes a message rerouting event and/or a target message receiving event, where the target message is a message other than a DIO message and a DAO message.
The predetermined event is usually an unexpected event, which may affect the accuracy of the determined frequency. Therefore, by implementing the feasible implementation manner, the first network device uses the condition that the preset event does not occur as a precondition for determining the frequency of sending the DIO message by the first network device according to the networking parameters, so that the accuracy of the decided frequency can be ensured.
As a possible implementation manner, the first network device may further determine whether a preset event occurs, and if the preset event occurs, determine that the frequency of sending the DIO packet by the first network device is a preset frequency.
The preset frequency may be a maximum frequency value preset by the first network device, and a preset event occurring in the wireless mesh network may cause instability of the network, so that by implementing the above feasible implementation manner, when the preset event occurs, the stability of the network condition may be accelerated by sending the DIO message according to the preset frequency.
As a possible implementation manner, the capability value of the first network device currently connected to the next hop subnode is determined according to the hierarchy of the first network device, the number of the next hop subnodes currently connected to the first network device, and a preset corresponding relationship, where the preset corresponding relationship includes a one-to-one correspondence relationship between the hierarchy and the capability value connected to the next hop subnode.
The first network device can improve the adaptability and rationality of networking by implementing the feasible implementation mode according to the corresponding relation between the preset hierarchy and the capacity value of connecting the next hop sub-node, such as a field scene, a planned network scale and the like.
As a feasible implementation manner, the first network device determines, according to the networking parameter, a frequency at which the first network device sends a DIO packet, specifically, the number of DIO packets that need to be sent in a unit time is obtained according to the networking parameter, and the frequency at which the first network device sends a DIO packet is determined according to the number of DIO packets that need to be sent in the unit time.
Therefore, by implementing the feasible implementation manner, the first network device takes the number of the DIO messages required to be sent in the unit time as the intermediate parameter between the frequency and the networking parameter, rather than directly obtaining the frequency according to the networking parameter, thereby enriching the determination manner of the frequency.
As a feasible implementation manner, the first network device determines, according to the number of DIO messages that need to be sent in the unit time, a frequency at which the first network device sends the DIO messages, specifically, the number of DIO messages that need to be sent in the unit time by the first network device is compared with a preset comparison threshold, and when the number of DIO messages that need to be sent in the unit time by the first network device is greater than the comparison threshold, the frequency at which the first network device sends the DIO messages is determined according to the number of DIO messages that need to be sent in the unit time.
It can be seen that, by implementing the feasible implementation manner, the first network device uses the number of DIO packets that need to be sent in a unit time greater than the comparison threshold as a precondition for determining the sending frequency of the DIO packets according to the number of DIO packets that need to be sent in the unit time, so as to avoid the problem that the role of the broadcast DIO packets on the networking is weak even if the determined frequency is too small when the number of DIO packets that need to be sent in the unit time is less than or equal to the comparison threshold.
As a possible implementation manner, the determining, according to the number of DIO messages that need to be sent in the unit time, the frequency at which the first network device sends the DIO messages includes: comparing the number of DIO messages to be sent by the first network equipment in unit time with a preset comparison threshold; and when the number of the DIO messages required to be sent by the first network equipment in unit time is less than or equal to the comparison threshold, the first network equipment does not send the DIO messages.
When the number of DIO messages to be sent in unit time is less than or equal to the comparison threshold, the determined frequency is too small, so that even if the DIO messages are broadcast, the networking effect is weak, therefore, by implementing the feasible implementation manner, under the condition that the number of the DIO messages to be sent in unit time is less than or equal to the comparison threshold, the first network device does not send the DIO messages, so that the power consumption can be saved, and the unnecessary resource consumption can be avoided.
As a feasible implementation manner, the DIO packet sent by the first network device carries the hierarchy of the first network device and the capability value of the first network device currently connected to the next hop subnode, and the hierarchy of the first network device and the capability value of the first network device currently connected to the next hop subnode are in a reserved field in the DIO packet.
As a feasible implementation manner, the DIO packet sent by the first network device carries the hierarchy of the first network device and the capability value of the first network device currently connected to the next hop subnode, and the hierarchy of the first network device and the capability value of the first network device currently connected to the next hop subnode are added in the DIO packet according to a preset format, where the preset format includes a format specified in a routing protocol for networking.
As can be seen, through the foregoing feasible implementation manner, the hierarchy of the first network device and the position of the capability value of the first network device currently connected to the next hop subnode in the DIO packet may be in the DIO packet, and after the DIO packet, the flexibility of the first network device in configuring the DIO packet is improved.
As a possible implementation manner, after the first network device receives a DIO packet from a third network device, it may also be determined whether the hierarchy of the third network device and the capability of the third network device currently connected to the next hop subnode satisfy the preset networking condition of the first network device, and when the hierarchy of the third network device and the capability of the third network device currently connected to the next hop subnode satisfy the preset networking condition of the first network device, the step of determining the hierarchy of the first network device is performed.
It can be seen that, by implementing the feasible implementation manner, the first network device may determine whether to select the third network device as the parent node according to the hierarchy of the third network device and the capability of the third network device currently connected to the next-hop child node, so that the selection result is more accurate, and the adaptability of the first network device in the wireless mesh network is improved.
In a second aspect, an embodiment of the present invention provides a network device, where the first network device may include a plurality of functional modules, and is configured to correspondingly perform the method provided in the first aspect, or the method provided in any one of the possible implementation manners of the first aspect.
In a third aspect, the present application provides a network device for performing the method described in the first aspect. The network device may include: a memory and a processor, wherein: the memory is used for storing implementation code of the method described in the first aspect, and the processor is used for executing the program code stored in the memory, that is, executing the method provided by the first aspect, or the method provided by any one of the possible implementation manners of the first aspect.
In a fourth aspect, a computer-readable storage medium is provided, on which a program code implementing the method provided by the first aspect or any one of the possible implementations of the first aspect is stored, the program code including instructions for executing the method provided by the first aspect or any one of the possible implementations of the first aspect.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the embodiments and the drawings used in 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 invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a schematic view of a DOGAG scenario provided by the present application;
fig. 2 is a schematic diagram of a wireless mesh network according to the present application;
fig. 3 is a schematic diagram of a DAO message format applied for providing;
fig. 4 is a schematic diagram of a DIO message format applied for providing;
fig. 5 is an example of a lockle algorithm in 3 nodes provided in the present application;
fig. 6 is a schematic flow chart of a method for controlling a message sending frequency by a node according to the present application;
FIG. 7 is a diagram illustrating a default format provided herein;
fig. 8 is a schematic flow chart of a message sending method provided in the present application;
fig. 9 is a schematic flow chart of another message sending method provided in the present application;
fig. 10 is a schematic structural diagram of a network device provided in the present application;
fig. 11 is a schematic structural diagram of another network device provided in the present application.
Detailed Description
The technical solutions in the embodiments of the present invention will be described with reference to the drawings in the embodiments of the present invention.
In order to better understand a message sending method and related devices provided in the embodiments of the present invention, a wireless mesh network and related routing protocols related to the present application are first described below.
(1) Wireless mesh network
A Low Power and loss network (LLN) is a network composed of devices with limited resources such as Power, storage space, processing capability, etc., and a LLN network can be composed of tens to thousands of nodes and can perform large-scale networking.
A wireless mesh network is a typical LLN network that employs wireless network devices in place of traditional wired network devices. Fig. 2 is a schematic diagram of a wireless mesh network. Routing nodes in a wireless mesh network include two types: one is a root node 30 (also known as a data sink node or sink node) and a sensing node 40. The root node 30 may be responsible for collecting information in the complete wireless mesh network, data collected by the sensor nodes 40 in the network may be transmitted to the root node 30 in a multi-hop manner (i.e., via multi-hop routing), the root node 30 transmits the merged data to an external network (e.g., the internet) in a wired communication 10 or wireless communication 20 manner, and information of the external network may also be transmitted to the sensor nodes 40 through the root node 30.
A wireless mesh network may include a large number of nodes, tens to thousands, enabling large-scale networking. Nodes can share information with each other and cooperate with each other to perform tasks such as control, communication, signal processing, etc. Since each node in a wireless mesh network has its own characteristics, such as processing power, memory capacity, communication bandwidth, and its location may vary from device to device, the power consumption of each node in the wireless mesh network is limited. In order to save energy consumption, sensing nodes in the wireless mesh network must communicate information through a one-hop route (multi-hop method), and therefore, the wireless mesh network has a dedicated routing protocol.
(2) RPL routing protocol
The RPL routing protocol is a routing protocol specifically proposed for LLN networks, and is applicable to wireless mesh networks. The RPL routing protocol is a distance vector routing protocol, i.e. the best path is chosen according to the distance of the destination. Since wireless mesh networks typically do not have a pre-specified target for a transmitting node, nodes within the network must discover themselves and establish communications according to RPL rules, including Objective Function (OF), Routing Metric (Routing Metric), and Routing Constraint (Routing Constraint).
RPL routing aggregates the outward channels of all nodes in the network topology onto one or more designated root nodes, whereas the information of the outer network is also distributed from the root nodes to the nodes inside the network. Therefore, RPL treats the entire network as a Directed Acyclic Graph (DAG), and then splits the DAG Graph into multiple DODAG graphs, each containing a root node. Through the RPL routing protocol, the network can be quickly discovered, topology is formed, and routing is established.
(3) Messages of RPL routing protocol
The RPL establishes a route between nodes through messages. The messages in the RPL may include the following four types: DIO (DODAG Information Object) packets, DAO (DODAG Advertisement Object) packets, DIS (DODAG Information solicitation) packets, and DAO-ACK (DODAG Advertisement acknowledgement) packets.
The DIS message is a broadcast message and may be used to request neighboring nodes to send a DIO message as soon as possible. In some possible embodiments, after a sensor node is started, there are two options: firstly, keeping a silent state, not sending DIS messages, and waiting for receiving DIO messages; and secondly, periodically broadcasting and sending DIS messages to request DIO messages.
The DAO-ACK message is a unicast message, and may be replied to the node that sent the DAO message by the node that received the DAO message in response to the received DAO message.
The DAO packet is a unicast packet and can be used to establish a downlink route. Referring to fig. 3, for a DAO packet format provided in the embodiment of the present invention, the DAO packet may include fields such as an RPL Instance identifier (Routing Protocol for LLN Instance Identification, rplissentanceid), K, D, flag bits (Flags), Reserved bits (Reserved), a DAO Sequence (DAO Sequence), a DODAG identifier (DODAG ID), and Options (Options). Wherein, the "K" bit can be used to indicate whether a DAO-ACK message needs to be replied after receiving the DAO message. In some possible embodiments, if the "K" position is 0, it may indicate that the DAO-ACK message does not need to be replied, and if the "K" position is 1, it may indicate that the DAO-ACK message needs to be replied, which is merely exemplary and not exhaustive, including but not limited to the above alternatives. The "D" bit may indicate whether the subsequent dodag id field exists, and in some possible embodiments, if the "D" position is 0, the dodag id field does not exist, and if the "D" position is 1, the dodag id field exists, which is merely an example, not an exhaustive list, and includes but is not limited to the above alternatives.
In one embodiment, the DAO message may carry the destination node, also referred to as the Target node (Target), of the DAO message at the Option field, corresponding to the IPV6 address.
The DIO message is a broadcast message and can be used to establish the uplink route of the dodag. Please refer to fig. 4, which is a DIO message format according to an embodiment of the present invention. The DIO packet may declare the existence of the DODAG, including an RPL Instance identifier (Routing Protocol for LLN Instance Identification, rplissententification), a version number (version of number), a rank (rank), a ground bit (G), a DODAG identifier (Destination-ordered direct access Graph Identification, DODAG ID), a Mode of Operation (MOP), a priority (DODAG reference, Prf), a Destination node (object Code Point, OCP), an optional (Options) field, and the like.
(4) Trickle Timer mechanism
In one embodiment, the node that has added the DOGAG can control the DIO message sending frequency according to the Trickle Timer mechanism. The Trickle algorithm adopted by the Trickle Timer mechanism applies a self-adaptive transmission cycle mechanism, and less routing messages are sent when the routing information in the network is consistent; and when the routing messages are inconsistent, a large amount of routing messages are sent quickly, so that the routing information is updated quickly and the consistency is ensured.
The Trickle algorithm uses 3 configuration parameters: minimum time slot length (I)min) Maximum slot length (I)max) Redundancy coefficient (k). Furthermore, 3 variables were used: current time slot (I), transmission time point (t) within the current time slot, consistency counter (c).
Referring to fig. 5, in an exemplary embodiment of a lockle algorithm in 3 nodes provided in the present invention, where a redundancy coefficient k is 2, the following steps may be performed by a lockle timer mechanism:
1) the Trickle algorithm starts to execute at [ I ]min,Imax]Within the range, a random number is set as the current time slot I, and the first time slot is usually set as IminI in FIG. 5min=100ms;
2) When a time slot starts, resetting a consistency counter c to be 0, and randomly selecting a sending time point t within the range of [ I/2, I ];
3) when a consistency message is received (for example, the position relation between the neighbor node and the node in the network is not changed), the consistency counter is automatically increased by 1;
4) when the time point t is reached, if the consistency counter c is greater than or equal to the redundancy coefficient k (k is 2 in fig. 5), the DIO message is not sent, otherwise, the DIO message is sent;
5) when the time slot expires, the current time slot I is I x2, and if the maximum time slot length is exceeded, I is set to ImaxReturn to 2);
6) if an inconsistency event is monitored (e.g., the position relationship between the neighbor node and the node in the network changes), if the current time slot is not equal to IminThen, the current time slot I is reset to IminAnd jumps to step 2) otherwise do nothing.
In order to avoid time slot asynchronism between nodes, a node selects a small sending time point t in each time slot, the message sent by other nodes cannot be fully monitored, but the message is sent all the time (also called Short Listen problem), the Trickle algorithm can add a Listen-only period in each time slot, and the node only monitors whether the message needs to be received or not in the period without sending a DIO message, so that redundant transmission can be reduced.
It should be noted that the wireless mesh network and the related routing protocol are only used for understanding the present application and should not be construed as limiting.
Based on the wireless mesh network and the related routing protocol, the embodiment of the invention also provides a method for controlling the message sending frequency by the node. For ease of understanding, reference is first made to Table 1, which is a table of the meaning of the variable parameters used in the examples of the present invention.
Variable parameter Means of
L(Layer) Hierarchy of nodes in a network
Na Capability value of node connecting next hop child node
Nc Number of next hop child nodes currently connected to the node
Arr=[N1,N2,N3,...,Nn] Number of sub-nodes of each hop connected under node
Flag Marking of preset events
I Interval of sending message
F(*) Decision function
TABLE 1
Based on the meaning table of the variable parameter, please refer to fig. 6, which is a schematic flowchart of a method for controlling a message sending frequency by a node according to an embodiment of the present invention, and the method may include the following steps:
601. and carrying out network planning in advance.
Before networking, parameters such as the network size, the positions of nodes, and the distances between nodes may be planned in advance according to different actual scenes such as companies and factories, and a corresponding relationship between L and Na (for example, when L is 0, Na is 6, etc.) and a weight coefficient corresponding to each of parameters to be used in the decision function F (×) may be determined in advance.
In an embodiment, network planning may be performed manually according to a field scene, or may be performed through a server, a terminal, and other devices, which is not limited in this embodiment of the present invention.
602. And in the networking process, the nodes update networking parameters.
In an embodiment, a first network device, as a routing node in a wireless network device, may update its own parameter by receiving a DIO packet sent by a neighboring node in a networking process, where the neighboring node is a node within a preset range of the first network device. Other nodes add the self-defined parameters in the reserved fields corresponding to the DIO message format, so that the node can acquire the current networking condition according to the received DIO message in the networking process, and further update the parameters of the node. For example, the other node may add two custom parameters, which are used to indicate the level (Layer) of the node and the Ability value (robustness) of the node currently connected to the next-hop child node, to the Reserved field corresponding to the DIO message format shown in fig. 4.
In an embodiment, a neighboring node may also add a field for indicating a Layer (Layer) where the node is located in a Reserved field corresponding to the DAO packet format shown in fig. 3.
In one embodiment, the neighbor node may also add control information in the option of DIO message and/or DAO message according to a preset format. If the parameter is added to the option of the DIO message, the control information may include two parameters, which are used to indicate the level (Layer) where the node is located and the Ability value (robustness) of the node currently connecting to the next hop child node.
For example, please refer to fig. 7, which is a schematic diagram of a default format according to an embodiment of the present invention. The preset format shown in fig. 7 may be an RPL Control Message Options (RPL Control Message Options) format, where the RPL Control Message Options may include an option type (option type) field, an option length (option length) field, an option data (option data) field, and the like, and in an embodiment, a node may add two parameters, which are used to indicate a level (Layer) where the node is located and an Ability value (robustness) where the node is currently connected to a next hop subnode, in the option data field of a DIO Message; or adding a parameter for indicating the level (Layer) of the node in the option data field of the DAO message.
When the node receives a DIO message from a neighbor node, it can determine whether to select the node as its previous hop node (also called parent node) according to the Ability field in the DIO message. After the father node is selected, the node learns the level of the node according to the Layer field of the DIO message of the selected father node, updates the L value and further determines the Na value according to the mapping relation. For example, if the Layer field of the DIO message is 0, the level where the node is located may be L ═ 1, if the maximum capability value of the corresponding connection next hop child node when the L value is 1 is 8, and the number of currently connected next hop child nodes of the node is 3, the node determines that the capability value of the node currently connected to the next hop child node is 5.
When the node receives the DAO message from the child node, the level of the child node can be obtained according to the Layer field in the DAO message, so that the hop count of the node and the child node is obtained through calculation, the number of the child nodes corresponding to the hop count in the Arr is updated, and the Nc value is also updated if the child node is the next hop child node. For example, the Layer field in the DAO message of the child node indicates that the level is 4, and if the level of the node itself is 2, the hop count between the node and the child node can be calculated to be 2, and 1 is added to the number of child nodes corresponding to N1 in Arr.
In an embodiment, in the networking process, once a node monitors a preset event, the Flag may be marked as a target marking parameter, for example, the Flag is marked as true, and the Flag may be marked as true in a Flags field corresponding to a DIO message sent by the node. The preset event may be an unexpected inconsistency event, such as monitoring a DIS message, and suddenly changing an uplink message into a downlink message for transmission. If the preset event is not monitored, the Flag parameter can be defaulted to be false, and the Flags field corresponding to the DIO message sent by the node can be defaulted to be false.
603. And deciding the sending frequency of the DIO message according to the networking parameters.
In an embodiment, when the node initializes or has parameters updated, the node may use the parameters L, Nc, Na, Arr, and Flag as the input of the decision function F (×) to obtain the decision result of the DIO message sending frequency.
In one possible embodiment, in F, Flag may be first asserted, and if Flag is true, it represents that a predetermined event has occurred, at which time F may output the minimum transmission interval (I)min),IminCorresponding to a maximum transmission frequency fmax(ii) a If Flag is false, the DIO message sending number N per unit time may be further calculated according to the determined networking parameters (which may include L, Nc, Na, and Arr), for example, refer to the following formula:
Figure BDA0001586381450000101
wherein, ω is0Is the weight coefficient, ω, corresponding to L1Is the weight coefficient corresponding to Nc, ω2Is a weight coefficient corresponding to Na, omega0And delta is the weight coefficient corresponding to the number of the sub nodes of each hop connection under the node.
In one possible implementation, the node may compare the calculated value of N to a comparison threshold (N)th) Comparing, when N is greater than the threshold, the reciprocal of N may be output as DIO messaging interval, and the inverse is output as-1, for example, according to the following formula:
Figure BDA0001586381450000102
604. and determining to send or not to send the DIO message according to the decision result.
In an embodiment, if the decision result of the decision function is-1, the node may not send the DIO packet this time, and if the decision result of the decision function is not-1, the node may assign the decision result to I (that is, I is 1/N), the node sends the DIO packet with an interval I as a period, and the sending frequency of the DIO packet is N.
Compared with the above mentioned Trickle Timer mechanism, the node in the embodiment of the invention can dynamically adjust the sending interval based on the networking parameters, and the sending interval is not adjusted in a linear increasing mode of double rate, so that the invention has better dynamic property, adaptability and flexibility to the network change.
In summary, the node in the embodiment of the present invention may obtain the location information of the node itself in the network and the access information of the sub-nodes connected below the node according to the DIO packet and the DAO packet, and may determine the connection capability and the decision function of each node through a pre-network planning, so that the node has the capability of sensing the network scale, and the sending frequency of the packet obtained by the decision is more flexible and more suitable for the dynamic change of the network.
Fig. 8 is a schematic flow chart of a message sending method according to an embodiment of the present invention. The method as shown in fig. 8 may include:
s801, broadcasting the DIO message by the third network equipment.
The third network device may be a node in a wireless mesh network, such as a router, a terminal, a computer device, and so on. Wherein the wireless mesh network may be the network shown in fig. 2.
In some possible embodiments, the third network device may be a root node in the wireless mesh network or a sensing node in the wireless mesh network, and the third network device may be a neighbor node of the first network device, which is not limited in this embodiment of the present invention.
In some possible embodiments, the DIO message may be used to establish an upstream route between a third network device and the first network device.
In some possible embodiments, the third network device may broadcast the DIO message within a certain range. The range of the DIO message broadcast by the third network device may be determined according to a pre-planned scale that the wireless mesh network needs to achieve. For example, if the wireless mesh network needs to reach a size of 100 square meters, the third network device may broadcast the DIO message at all devices within 20 square meters.
S802, the first network device receives the DIO message from the third network device.
In one embodiment, if the first network device is within the broadcast range of the DIO packet of the third network device, the first network device may receive the DIO packet of the third network device and execute step S802.
The mode of receiving the DIO packet of the third network device by the first network device may be receiving through wireless communication.
S803, the first network device obtains the hierarchy of the third network device and the number of next hop child nodes currently connected to the third network device.
The hierarchy of the third network device may be l (layer) in table 1, and the number of next hop child nodes to which the third network device is currently connected may be Nc in table 1.
And S804, the first network device determines the hierarchy of the first network device according to the hierarchy of the third network device and the capability value of the third network device currently connected with the next hop subnode.
In an embodiment, after receiving the DIO packet from the third network device, the first network device may further determine whether the preset networking condition of the first network device is satisfied according to the hierarchy of the third network device and the capability value of the third network device currently connected to the next hop subnode, and execute the step of determining the hierarchy of the first network device when the hierarchy of the third network device and the capability value of the third network device currently connected to the next hop subnode satisfy the preset networking condition of the first network device.
The preset networking condition may be used to determine whether to select the third network device as a parent node. For example, the first network device may calculate, by using both the capability value OF the third network device currently connected to the next-hop child node and the hierarchy OF the third network device as reference parameters in the objective function OF, and determine whether to select the third network device as a parent node according to a calculation result. The first network device may perform the step of determining the hierarchy of the first network device if the calculation indicates that the first network device may choose the third network device as a parent node.
In some possible embodiments, the first network device may also calculate, as a reference parameter in the objective function OF, a capability OF the third network device currently connecting to a next-hop child node, so as to determine whether to select the third network device as a parent node.
For example, the first network device may determine the hierarchy of the first network device by: if the capability value of the third network device currently connected to the next hop child node is 3 and the level L of the third network device is 0, which are extracted from the DIO packet of the third network device, the first network device may select the third network device as a parent node, and determine that the level of the first network device is 0+1, that is, the level L of the first network device is 1.
S805, the first network device determines the number of next hop sub-nodes currently connected to the first network device and the number of each hop sub-node connected to the first network device.
In some possible embodiments, in a case that the first network device is a newly-accessed node, there may be no connection child node under the first network device, and both the number of next-hop child nodes currently connected by the first network device and the number of each-hop child nodes connected under the network device may be 0.
In some possible embodiments, in the case that a child node is connected under the first network device, the number of hop child nodes connected under the first network device may be determined according to the DAO packet received by the first network device.
For example, each hop child node connected to the first network device may send a DAO packet to the first network device, where the DAO packet may carry a level L of the corresponding child node, and in an embodiment, may also carry an IP address of the corresponding child node, the number of child nodes connected to the corresponding child node, and the like. The first network device can determine the hierarchy of the corresponding child node in the network according to the parameters in the DAO message, thereby calculating the hop count of the first network device and the child node and updating the number of the child nodes corresponding to the hop count; if the child node is a child node of a next hop directly connected to the first network device, the first network device may directly update the number of the next hop child nodes currently connected to the first network device.
S806, the first network device determines the current capacity value of the first network device connected to the next hop subnode.
In one embodiment, the capability value of the first network device to connect to the next hop subnode may be determined according to the level L of the first network device, the number of the next hop subnodes currently connected to the first network device, and a preset correspondence relationship, where the preset correspondence relationship includes a one-to-one correspondence relationship between the level and the capability value of the node to connect to the next hop subnode. For example, the maximum capability value of the node corresponding to the level L ═ 0 to connect to the next hop sub node may be preset to be 6, the maximum capability value of the node corresponding to the level L ═ 1 to connect to the next hop sub node may be preset to be 10, and the like, which is not limited in this embodiment of the present invention.
For example, the first network device may determine, according to the preset correspondence and the level L of the first network device, and the number of currently connected next hop child nodes, that the maximum capability value of the first network device to connect to the next hop child node is 10, and if the number of currently connected next hop child nodes is 4, the first network device may determine that the capability value of the currently connected next hop child node is 6.
S807, the first network device obtains networking parameters of the first network device.
The networking parameters may include a hierarchy of the network device, a number of next hop sub-nodes currently connected to the network device, a capability value of the network device currently connected to the next hop sub-nodes, and a number of each hop sub-node connected to the network device.
S808, the first network device determines the frequency of the first network device for sending the DIO message according to the networking parameters.
It should be noted that the larger the frequency of transmitting the DIO message is, the smaller the transmission interval is, and the smaller the frequency is, the larger the transmission interval is.
In an embodiment, the first network device may calculate the networking parameter according to a preset calculation rule, so as to obtain the frequency of sending the DIO message. For example, the first network device may preset a decision function for determining a frequency of sending a DIO packet, and preset a corresponding weight coefficient for a networking parameter that needs to be used, and after determining the networking parameter, the first network device may determine the frequency of sending the DIO packet according to the decision function and the networking parameter.
And S809, broadcasting the DIO message of the first network equipment at the determined frequency.
It should be noted that the DIO packet of the first network device may be used to enable the second network device that receives the DIO packet to determine whether to select the first network device as the parent node, and a specific selection manner may refer to a manner in which the first network device selects the third network device as the parent node, which is not described herein again.
In one embodiment, after determining the frequency of sending the DIO packet by the first network device, the first network device may broadcast the DIO packet of the first network device within a first range according to the determined frequency, and the DIO packet of the first network device may carry DIO packet parameters, which may include a hierarchy of the first network device and the number of next hop child nodes to which the first network device is currently connected.
S807, the first network device sends the DAO message to the third network device.
It should be noted that the DAO message is used to establish a downlink route from the third network device to the first network device.
In one embodiment, the first network device may send a DAO message to the third network device to establish a downstream route between the first network device and the third network device after determining to join the wireless mesh network.
In an embodiment, the first network device may update the level L of the first network device itself according to the level L of the third network device, add the level L of the first network device to the DAO packet, and send the DAO packet to the third network device.
In an embodiment, the DAO packet may further include an IP address of the first network device, a number of next hop nodes currently connected to the first network device, and the like, which is not limited in this embodiment of the present invention.
Wherein, after the first network device receives the DIO packet of the third network device and determines to join the wireless mesh network, an uplink route may be established between the third network device and the first network device. The first network device sends a DAO packet to the third network device, and after the third network device receives the DAO packet of the first network device, a downlink route may be established between the third network device and the first network device.
It can be seen that, in the embodiment of the present invention, the networking parameter of the first network device is obtained through the DIO message parameter of the third network device, and the frequency of sending the DIO message by the first network device itself is determined according to the networking parameter, and the networking parameter can indicate the networking condition and scale of the node in the network, so that not only can the node have the sensing capability of the network scale, but also the determined sending frequency of the DIO message can be adapted to the current networking state, and the flexibility is higher, thereby improving the dynamics, adaptability and flexibility of the network device in frequency determination.
Fig. 9 is a schematic flow chart of another message sending method according to an embodiment of the present invention. The method as shown in fig. 9 may include:
s901, the first network device obtains networking parameters of the first network device.
The networking parameters include the hierarchy of the first network device, the number of next hop sub-nodes currently connected to the first network device, the capability value of the next hop sub-nodes currently connected to the first network device, and the number of each hop sub-node connected to the first network device.
S902, the first network equipment determines whether a preset event occurs.
The preset event may include a message rerouting event, where the message rerouting event may refer to an event that an uplink message is suddenly changed into a downlink message for transmission, and the like. The preset event may also include an event of receiving a target message, where the target message is a message other than a DIO message and a DAO message, for example, a DIS message is received.
When a preset event is monitored, the first network device may update the flag parameter corresponding to the Flags field in the DAO message of the first network device.
In an embodiment, the marking parameter in the DAO message may default to false, if the network device does not monitor the preset event in the process of updating the DIO message parameter of the network device itself, the marking parameter corresponding to the DIO message in the first network device may default to false, and if the preset event is monitored, the marking parameter corresponding to the DIO message in the first network device may update to true.
And S903, if the preset event does not occur, determining the frequency of the first network equipment for sending the DIO message according to the networking parameters.
If the marking parameter of the first network device is false, it may indicate that the preset event is not monitored in the process of updating the parameter, and the first network device may determine the frequency of sending the DIO message by the network device according to the pre-obtained networking parameter.
In one embodiment, determining the frequency of sending DIO messages by the network device according to the networking parameters includes: obtaining the number of DIO messages required to be sent in unit time according to networking parameters; and determining the frequency of the network equipment for sending the DIO messages according to the number of the DIO messages needing to be sent in unit time.
The number of DIO messages to be sent in the unit time can be represented by N. For example, each networking parameter may be preset with a corresponding weight coefficient, the first network device may multiply each networking parameter by the corresponding weight coefficient and then add the multiplied values to obtain an N value, and the manner of obtaining the N value may refer to formula 1 in the present application and is not described herein again.
In one embodiment, determining the frequency of sending DIO messages by a network device according to the number of DIO messages required to be sent in a unit time includes: comparing the number of DIO messages sent by the network equipment in unit time with a preset comparison threshold value; and when the number of the DIO messages sent by the network equipment in unit time is less than or equal to the comparison threshold, the network equipment does not send the DIO messages.
In an embodiment, when the number of DIO messages sent by the network device in a unit time is greater than the comparison threshold, the frequency of sending the DIO messages by the network device is determined according to the number of DIO messages required to be sent in the unit time, for example, please refer to formula 2 in this application.
S906, if the preset event occurs, the first network equipment determines that the frequency of the first network equipment for sending the DIO message is the preset frequency.
In one embodiment, the predetermined frequency may be the minimum transmission interval IminCorresponding frequency value, i.e. predetermined maximum frequency value fmax. If the preset event occurs, it may indicate that a sudden preset event is monitored in the updating process, then the flag parameter of the first network device may be true, and the network device may determine that the frequency for sending the DIO message is the maximum frequency value fmax,In order to stabilize the network at the fastest speed.
S907, the first network device broadcasts the DIO message at the determined frequency.
In an embodiment, a DIO packet of a first network device carries a hierarchy of the first network device and a capability value of the first network device currently connected to a next hop subnode, and the hierarchy of the first network device and the capability value of the first network device currently connected to the next hop subnode may be in a reserved field in the DIO packet. For example, please refer to fig. 4, the reserved field of the DIO packet may be an object field in the DIO packet, and the DIO packet parameter of the first network device may be added to the object field.
In one embodiment, the hierarchy of the first network device and the capability value of the first network device currently connected to the next hop subnode may also be added to a DIO message of the network device according to a preset format, where the preset format includes a format specified in a routing protocol for networking. For example, please refer to fig. 7, the predetermined format may be an RPL Control Message Options format, and the network device may add the hierarchy of the first network device and the capability value of the first network device currently connected to the next hop sub-node in an Option Data field according to the RPL Control Message Options format.
Therefore, the network device can update the DIO message parameter of the DIO message of the third network device, update the DIO message parameter of the network device, acquire the networking parameter, determine the frequency of sending the DIO message according to the networking parameter, and broadcast the DIO message carrying the DIO message parameter of the network device at the determined frequency, so that the dynamic property, the adaptability and the flexibility of the network device in frequency decision can be improved, the current networking condition can be continuously broadcast to other nodes in the network, the decision of the other nodes on the frequency can be helped, and the intelligence of the network device can be improved.
Fig. 10 is a schematic structural diagram of a network device according to an embodiment of the present invention. The network device as shown in fig. 10 may include:
a first obtaining module 1001, configured to obtain networking parameters of the first network device, where the networking parameters include a hierarchy of the first network device, a number of next hop sub-nodes currently connected to the first network device, a capability value of the next hop sub-nodes currently connected to the first network device, and a number of each hop sub-node connected to the first network device.
The first determining module 1002 is configured to determine, according to the networking parameter, a frequency of sending a DIO packet by the first network device.
A broadcasting module 1003, configured to broadcast a DIO packet at the determined frequency, where the DIO packet is used to enable a second network device receiving the DIO packet to determine whether to select the first network device as a parent node.
In one embodiment, the first network device further comprises: a receiving module 1004 configured to receive a DIO packet from a third network device, where the third network device is a neighbor node of the first network device in the wireless mesh network.
A second obtaining module 1005, configured to obtain, according to the DIO packet of the third network device, the hierarchy of the third network device and the capability value of the third network device currently connected to the next hop subnode.
A second determining module 1006, configured to determine the hierarchy of the first network device according to the hierarchy of the third network device and a capability value of the third network device currently connected to the next hop subnode.
In one embodiment, when the third network device is a parent node of the first network device, the first network device further includes: a sending module 1007, configured to send a DAO packet to the third network device, where the DAO packet includes the hierarchy of the first network device, and the DAO packet is used to establish a downlink route from the third network device to the first network device.
In one embodiment, the first network device further comprises: a third determining module 1008, configured to determine whether a preset event occurs.
The first determining module 1002 is specifically configured to determine, if the preset event does not occur, a frequency of sending a DIO packet by the first network device according to the networking parameter.
In one embodiment, the predetermined event includes a message rerouting event and/or a receipt of a target message event, the target message being a message other than a DIO message and a DAO message.
In one embodiment, the first network device further comprises: a third determining module 1008, configured to determine whether a preset event occurs.
The first determining module 1002 is further configured to determine, if the preset event occurs, that a frequency of sending the DIO packet by the first network device is a preset frequency.
In one embodiment, the capability value of the first network device currently connected to the next hop subnode is determined according to the hierarchy of the first network device, the number of the next hop subnodes currently connected to the first network device, and a preset correspondence relationship, where the preset correspondence relationship includes a one-to-one correspondence relationship between the hierarchy and the maximum capability value of the first network device connected to the next hop subnode.
In an embodiment, the first determining module 1002 is specifically configured to obtain the number of DIO messages that need to be sent in a unit time according to the networking parameter, and determine the frequency of sending the DIO messages by the first network device according to the number of DIO messages that need to be sent in the unit time.
In an embodiment, the first determining module 1002 is specifically configured to compare the number of DIO messages that need to be sent by the first network device in a unit time with a preset comparison threshold, and determine, when the number of DIO messages that need to be sent by the first network device in the unit time is greater than the comparison threshold, a frequency for sending DIO messages by the first network device according to the number of DIO messages that need to be sent in the unit time.
In an embodiment, the first determining module 1002 is specifically configured to compare the number of DIO messages that need to be sent by the first network device in a unit time with a preset comparison threshold, and when the number of DIO messages that need to be sent by the first network device in the unit time is less than or equal to the comparison threshold, the first network device does not send the DIO messages.
Please refer to fig. 11, which is a schematic structural diagram of another network device provided in the present application. The network device described in this embodiment includes: one or more processors 1101, memory 1102, communication interface 1103, transmitter 1105, receiver 1106. These components may be connected by a bus 1104, or otherwise, as illustrated in FIG. 11.
The communication interface 1103 may be used for a network device to communicate with other communication devices, such as a terminal device or other network devices. Specifically, the communication interface 1103 may be a wireless communication interface, or may not be limited to a wireless communication interface, and the network device may also be configured with a wired communication interface to support wired communication, for example, a backhaul link between one network device and another network device may be a wired communication connection.
Transmitter 1105 may be used to perform transmit processing, e.g., signal modulation, on the signal output by processor 1101. Receiver 1106 may be used for receive processing of mobile communication signals received by the antenna. Such as signal demodulation. In some embodiments of the present application, the transmitter 1105 and the receiver 1106 may be considered one wireless modem. In the network device, the number of the transmitters 1105 and the receivers 1106 may be one or more.
The memory 1102 is coupled to the processor 1101 for storing various software programs and/or sets of instructions. In particular, the memory 1102 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices, or other non-volatile solid-state storage devices. The memory 1102 may store an operating system (hereinafter, referred to as a system), such as an embedded operating system like uCOS, VxWorks, RTLinux, etc. The memory 1102 may also store programs that may be used to communicate with one or more additional devices, one or more terminal devices, and one or more network devices.
In embodiments of the present invention, processor 1101 may be used to read and execute computer readable instructions. Specifically, the processor 1101 may be configured to call a program stored in the memory 1102, for example, an implementation program of the parameter adjustment method provided in one or more embodiments of the present application on the network device side, and execute:
acquiring networking parameters of the first network equipment, wherein the networking parameters comprise the hierarchy of the first network equipment, the number of next hop subnodes currently connected with the first network equipment, the capacity value of the next hop subnodes currently connected with the first network equipment and the number of the next hop subnodes connected with the first network equipment;
determining the frequency of the first network equipment for sending the DIO message according to the networking parameters;
broadcasting a DIO message at the determined frequency, wherein the DIO message comprises the hierarchy of the first network equipment and the capability value of the first network equipment currently connected with the next hop child node, and the DIO message is used for enabling the second network equipment receiving the DIO message to determine whether to select the first network equipment as a parent node.
It will be appreciated that the network device may be a network device in the wireless mesh network shown in fig. 2, and may be embodied as a computer, router, switch, end device, and so forth.
It should be noted that the network device shown in fig. 11 is an implementation manner of the embodiment of the present invention, and in practical applications, the network device may further include more or less components, which is not limited herein.
It should be understood that the embodiments of the present invention are entity device embodiments corresponding to the method embodiments, and the description of the method embodiments is also applicable to the embodiments of the present invention.
In another embodiment of the present invention, a computer-readable storage medium is provided, which stores a program that, when executed by a processor, can implement the method shown in the terminal device in the present application or implement the method shown in the network device.
It should be noted that, for specific processes executed by the processor of the computer-readable storage medium, reference may be made to the methods described in the above method embodiments, and details are not described herein again.
In yet another embodiment of the present invention, a computer program product containing instructions is provided, which when run on a computer, causes the computer to perform the method described in the above method embodiment.
The computer readable storage medium may be an internal storage unit of the terminal according to any of the foregoing embodiments, for example, a hard disk or a memory of the terminal. The computer readable storage medium may also be an external storage device of the computer, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), etc. provided on the computer. Further, the computer-readable storage medium may also include both an internal storage unit and an external storage device of the terminal. The computer-readable storage medium is used for storing the program and other programs and data required by the terminal. The computer readable storage medium may also be used to temporarily store data that has been output or is to be output.
Based on the same inventive concept, the principle of solving the problem of the computer provided in the embodiment of the present invention is similar to that of the embodiment of the method of the present invention, so the implementation of the computer may refer to the implementation of the method, and is not described herein again for brevity.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a program, which can be stored in a computer-readable storage medium, and when the program is executed, the processes of the embodiments of the methods described above can be included. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above detailed description is provided for a message sending method and related devices provided by the embodiments of the present invention, and a specific example is applied in this document to explain the principle and the implementation of the present invention, and the description of the above embodiments is only used to help understand the structure, the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (22)

1. A method for sending a message, the method being applied to a first network device, the first network device being located in a wireless mesh network, the method comprising:
acquiring networking parameters of the first network equipment, wherein the networking parameters comprise the hierarchy of the first network equipment, the number of next hop sub-nodes currently connected with the first network equipment, the capacity value of the next hop sub-nodes currently connected with the first network equipment and the number of each hop sub-node connected with the first network equipment;
determining the frequency of sending a destination-oriented directed acyclic graph information object (DIO) message by the first network equipment according to the networking parameters;
broadcasting a DIO message at the determined frequency, wherein the DIO message comprises the hierarchy of the first network device and the capability value of the first network device currently connected with a next hop child node, and the DIO message is used for enabling a second network device receiving the DIO message to determine whether to select the first network device as a parent node.
2. The method of claim 1, wherein before obtaining the networking parameters of the first network device, further comprising:
receiving a DIO message from a third network device, wherein the third network device is a neighbor node of the first network device in the wireless mesh network;
acquiring the hierarchy of the third network equipment and the current capacity value of the third network equipment connected with the next hop subnode according to the DIO message of the third network equipment;
and determining the hierarchy of the first network equipment according to the hierarchy of the third network equipment and the capability value of the third network equipment currently connected with the next hop subnode.
3. The method of claim 2, wherein when the third network device is a parent node of the first network device, the method further comprises:
and sending a DAO message of the directed acyclic graph target advertisement object to the third network equipment, wherein the DAO message comprises the hierarchy of the first network equipment, and the DAO message is used for establishing a downlink route from the third network equipment to the first network equipment.
4. The method according to any of claims 1-3, wherein before determining the frequency at which the first network device sends DIO messages according to the networking parameters, the method further comprises:
determining whether a preset event occurs;
and if the preset event does not occur, determining the frequency of the first network equipment for sending the DIO message according to the networking parameters.
5. The method of claim 4, wherein: the preset event comprises a message switching event and/or a received target message event, and the target message is a message except a DIO message and a DAO message.
6. The method of any one of claims 1-3, further comprising:
determining whether a preset event occurs;
and if the preset event occurs, determining that the frequency of the first network equipment for sending the DIO message is a preset frequency.
7. The method according to claim 1 or 2, wherein the capability value of the first network device currently connecting to the next hop sub-node is determined according to a hierarchy of the first network device, a number of the next hop sub-nodes currently connected to the first network device, and a preset correspondence relationship, the preset correspondence relationship comprising a one-to-one correspondence relationship between a hierarchy and a maximum capability value of connecting to the next hop sub-node.
8. The method of claim 7, wherein the determining a frequency at which the first network device sends DIO messages according to the networking parameters comprises:
obtaining the number of DIO messages required to be sent in unit time according to the networking parameters;
and determining the frequency of the first network equipment for sending the DIO messages according to the number of the DIO messages needing to be sent in the unit time.
9. The method of claim 8, wherein the determining the frequency of DIO packets sent by the first network device according to the number of DIO packets to be sent in the unit time comprises:
comparing the number of DIO messages required to be sent by the first network equipment in unit time with a preset comparison threshold value;
and when the number of the DIO messages required to be sent by the first network equipment in unit time is larger than the comparison threshold, determining the frequency of the first network equipment for sending the DIO messages according to the number of the DIO messages required to be sent in unit time.
10. The method of claim 8, wherein the determining the frequency of DIO packets sent by the first network device according to the number of DIO packets to be sent in the unit time comprises:
comparing the number of DIO messages required to be sent by the first network equipment in unit time with a preset comparison threshold value;
and when the number of the DIO messages required to be sent by the first network equipment in unit time is less than or equal to the comparison threshold, the first network equipment does not send the DIO messages.
11. A network device, wherein the network device is a first network device, the network device comprising:
a first obtaining module, configured to obtain networking parameters of the first network device, where the networking parameters include a hierarchy of the first network device, a number of next hop sub-nodes currently connected to the first network device, a capability value of the first network device currently connected to the next hop sub-nodes, and a number of each hop sub-node connected to the first network device;
a first determining module, configured to determine, according to the networking parameter, a frequency at which the first network device sends a destination-oriented directed acyclic graph information object DIO message;
a broadcasting module, configured to broadcast a DIO packet at the determined frequency, where the DIO packet includes a hierarchy of the first network device and a capability value of the first network device currently connected to a next hop child node, and the DIO packet is used to enable a second network device that receives the DIO packet to determine whether to select the first network device as a parent node.
12. The network device of claim 11, wherein the first network device further comprises:
a receiving module, configured to receive a DIO packet from a third network device, where the third network device is a neighbor node of the first network device in a wireless mesh network;
a second obtaining module, configured to obtain, according to the DIO packet of the third network device, a hierarchy of the third network device and a capability value of the third network device currently connected to a next hop subnode;
and the second determining module is used for determining the hierarchy of the first network equipment according to the hierarchy of the third network equipment and the capability value of the third network equipment currently connected with the next hop subnode.
13. The network device of claim 12, wherein when the third network device is a parent node of the first network device, the first network device further comprises:
a sending module, configured to send a destination-oriented DAO packet of an advertisement object of a directed acyclic graph to the third network device, where the DAO packet includes a hierarchy of the first network device, and the DAO packet is used to establish a downlink route from the third network device to the first network device.
14. The network device of any one of claims 11-13, wherein the first network device further comprises:
the third determining module is used for determining whether a preset event occurs or not;
the first determining module is specifically configured to determine, according to the networking parameter, a frequency at which the first network device sends a DIO packet if the preset event does not occur.
15. The network device of claim 14, wherein: the preset event comprises a message switching event and/or a received target message event, and the target message is a message except a DIO message and a DAO message.
16. The network device of any one of claims 11-13, wherein the first network device further comprises:
the third determining module is used for determining whether a preset event occurs or not;
the first determining module is further configured to determine, if the preset event occurs, that the frequency of sending the DIO packet by the first network device is a preset frequency.
17. The network device according to claim 11 or 12, wherein the capability value of the first network device currently connecting to the next hop sub-node is determined according to a hierarchy of the first network device, a number of the next hop sub-nodes currently connected to the first network device, and a preset correspondence relationship, the preset correspondence relationship comprising a one-to-one correspondence relationship between a hierarchy and a maximum capability value of connecting to the next hop sub-node.
18. The network device of claim 17, wherein the first determining module is specifically configured to obtain, according to the networking parameter, the number of DIO messages that need to be sent in a unit time, and determine, according to the number of DIO messages that need to be sent in the unit time, a frequency at which the first network device sends the DIO messages.
19. The network device of claim 18, wherein the first determining module is specifically configured to compare the number of DIO packets that the first network device needs to send in a unit time with a preset comparison threshold, and when the number of DIO packets that the first network device needs to send in the unit time is greater than the comparison threshold, determine the frequency at which the first network device sends the DIO packets according to the number of DIO packets that the first network device needs to send in the unit time.
20. The network device of claim 18, wherein the first determining module is specifically configured to compare the number of DIO packets that the first network device needs to send in a unit time with a preset comparison threshold, and when the number of DIO packets that the first network device needs to send in the unit time is smaller than or equal to the comparison threshold, the first network device does not send a DIO packet.
21. A network device, comprising:
a memory for storing a program;
a processor for executing a program in the memory to perform the method of any one of claims 1-10.
22. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a program which, when executed by a processor, causes the computer to perform the method according to any one of claims 1-10.
CN201810172866.9A 2018-03-01 2018-03-01 Message sending method and related equipment Active CN110224938B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810172866.9A CN110224938B (en) 2018-03-01 2018-03-01 Message sending method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810172866.9A CN110224938B (en) 2018-03-01 2018-03-01 Message sending method and related equipment

Publications (2)

Publication Number Publication Date
CN110224938A CN110224938A (en) 2019-09-10
CN110224938B true CN110224938B (en) 2021-10-15

Family

ID=67822046

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810172866.9A Active CN110224938B (en) 2018-03-01 2018-03-01 Message sending method and related equipment

Country Status (1)

Country Link
CN (1) CN110224938B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111385201A (en) * 2020-03-17 2020-07-07 重庆邮电大学 RPL routing method based on bidirectional father node decision
CN111885621B (en) * 2020-07-10 2023-06-06 深圳创维数字技术有限公司 Wireless message grabbing method, system, terminal and storage medium
CN114205886B (en) * 2020-09-18 2023-03-14 杭州鸿雁电器有限公司 Method for establishing WiFi network, communication method of WiFi network and WiFi equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015083506A1 (en) * 2013-12-04 2015-06-11 Mitsubishi Electric Corporation Method for transmitting packets in wireless network including node, method for transmitting packets in low power and lossy network, and node for forming wireless network
CN105050171A (en) * 2015-07-20 2015-11-11 常州大学 Improved algorithm for reducing power consumption of wireless sensor network node of farmland soil moisture content monitoring system based on RPL
CN105071955A (en) * 2015-07-20 2015-11-18 常州大学 Algorithm for avoiding routing loop for RPL (IPv6Routing Protocol for Low-Power and Lossy Networks) protocol
KR101678954B1 (en) * 2015-09-21 2016-11-23 부산대학교 산학협력단 Routing Apparatus for Considering Bottleneck Node Lifetime and Route Link Quality in RPL-based IoT Wireless Network and Method of the Same
CN106686686A (en) * 2016-09-23 2017-05-17 东南大学 Wireless sensor network ad hoc network method for crop greenhouse cultivation
CN106900042A (en) * 2017-03-24 2017-06-27 浙江理工大学 A kind of sensor node of tree-shaped sensor network MANET

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7787580B2 (en) * 2005-10-06 2010-08-31 Aviom, Inc. Methods and systems for jitter management and latency compensation in a packet-based system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015083506A1 (en) * 2013-12-04 2015-06-11 Mitsubishi Electric Corporation Method for transmitting packets in wireless network including node, method for transmitting packets in low power and lossy network, and node for forming wireless network
CN105050171A (en) * 2015-07-20 2015-11-11 常州大学 Improved algorithm for reducing power consumption of wireless sensor network node of farmland soil moisture content monitoring system based on RPL
CN105071955A (en) * 2015-07-20 2015-11-18 常州大学 Algorithm for avoiding routing loop for RPL (IPv6Routing Protocol for Low-Power and Lossy Networks) protocol
KR101678954B1 (en) * 2015-09-21 2016-11-23 부산대학교 산학협력단 Routing Apparatus for Considering Bottleneck Node Lifetime and Route Link Quality in RPL-based IoT Wireless Network and Method of the Same
CN106686686A (en) * 2016-09-23 2017-05-17 东南大学 Wireless sensor network ad hoc network method for crop greenhouse cultivation
CN106900042A (en) * 2017-03-24 2017-06-27 浙江理工大学 A kind of sensor node of tree-shaped sensor network MANET

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Security Vulnerabilities and Countermeasures for;Wei Yang, Qin Wang, Yadong Wan and Jie He;《2016 IEEE 3rd International Conference on Cyber Security and Cloud Computing》;20160818;全文 *
无线传感网络中RPL路由协议研究及性能分析;阮文灵;曾培峰;《微型机与应用》;20170210;第36卷(第3期);全文 *

Also Published As

Publication number Publication date
CN110224938A (en) 2019-09-10

Similar Documents

Publication Publication Date Title
US10616093B2 (en) Device and method for balanced ad-hoc network formation
US8472348B2 (en) Rapid network formation for low-power and lossy networks
US8787392B2 (en) Dynamic routing metric adjustment
CN108781398B (en) Method, network and the node that multitask routes in multi-hop heterogeneous wireless network
EP2829116B1 (en) Dynamiic division of routing domains in reactive routing networks
US8503309B2 (en) Dynamic expelling of child nodes in directed acyclic graphs in a computer network
US9325626B2 (en) Method and apparatus to reduce cumulative effect of dynamic metric advertisement in smart grid/sensor networks
JP6679498B2 (en) Method and apparatus for reducing packet storm duration in wireless mesh networks
EP2652905B1 (en) Increased communication opportunities with low-contact nodes in a computer network
EP2361485B1 (en) Selective a priori reactive routing
CN110224938B (en) Message sending method and related equipment
US20130028140A1 (en) Using service discovery to build routing topologies
US10904097B2 (en) Concurrent network reformation for low-power and lossy networks
Fotouhi et al. SDN-TAP: An SDN-based traffic aware protocol for wireless sensor networks
CN110445720B (en) Routing table updating method and device, aircraft and storage medium
Carlier et al. Analysis of internet protocol based multicast on duty-cycled wireless sensor networks
KR20190108255A (en) Method and apparatus for controlling mobile ad-hoc network based on software-defined network
CN103701952A (en) Downlink transmission method of business data and grouped data gateway
JP2011109412A (en) Node device, ad hoc network system, and method of participating in network
JP2016076903A (en) Gateway, communication apparatus and radio communication system
Gnanasekaran et al. Link breakage time based QoS improvement in mobile ad hoc network
KR101670809B1 (en) Method For Selecting Parent Node Considering Load Balancing In a Wireless Communication System with Multi-Hop Structure
Djamaa et al. Smart ring search for reactive routing protocols in the internet of things
KR101761369B1 (en) System of duty-cycled wireless sensor network, node of duty-cycled wireless sensor network and method for transmission scheduling setting in duty-cycled wireless sensor network
Pavithra et al. Qualified Stateless Multicast Routing Protocol for Enhancing the Network Lifetime in MANET

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