CN113163467B - Node hop count updating method, device, terminal and storage medium in Mesh network - Google Patents

Node hop count updating method, device, terminal and storage medium in Mesh network Download PDF

Info

Publication number
CN113163467B
CN113163467B CN202110475567.4A CN202110475567A CN113163467B CN 113163467 B CN113163467 B CN 113163467B CN 202110475567 A CN202110475567 A CN 202110475567A CN 113163467 B CN113163467 B CN 113163467B
Authority
CN
China
Prior art keywords
node
hop count
count information
configuration
access interface
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
CN202110475567.4A
Other languages
Chinese (zh)
Other versions
CN113163467A (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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202110475567.4A priority Critical patent/CN113163467B/en
Publication of CN113163467A publication Critical patent/CN113163467A/en
Application granted granted Critical
Publication of CN113163467B publication Critical patent/CN113163467B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W40/00Communication routing or communication path finding
    • H04W40/24Connectivity information management, e.g. connectivity discovery or connectivity update
    • H04W40/248Connectivity information update

Landscapes

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

Abstract

The disclosed embodiment discloses a method, a device, a terminal and a storage medium for updating node hop count in a Mesh network; the method comprises the following steps: acquiring hop count information of a second node connected with the first node based on the determined access interface configuration of the first node; wherein the configuration of the access interface of the first node at least comprises: wired access configuration; and updating the hop count information of the first node based on the hop count information of the second node. The method of the embodiment of the disclosure can accurately acquire the hop count information of the first node accessed based on the wired access configuration when the wired access configuration node exists in the Mesh network.

Description

Node hop count updating method, device, terminal and storage medium in Mesh network
Technical Field
The present disclosure relates to, but not limited to, the field of communication technologies, and in particular, to a method, an apparatus, a terminal, and a storage medium for updating a node hop count in a Mesh network.
Background
With the rapid development of wireless Mesh (Mesh) networking and the promotion of various manufacturers, Mesh networking has become a very popular wireless communication technology, and can realize a plurality of communication functions; for example, Mesh networking may simplify the configuration experience of a user configuring multiple devices for greater coverage; as another example, Mesh networking may provide a user with a better wireless roaming experience for multiple routing devices.
The hop count refers to the device distance of a certain network device in the Mesh network relative to a network outlet, and hop count information indicating the hop count can be used as an influence factor in roaming decision and topology optimization. In the prior art, the hop count information can be updated and notified in a mode of a wireless Beacon (Beacon) signal, however, the updating and notifying mode is only suitable for a Mesh network in which the device is wirelessly accessed; for a hybrid Mesh network, for example, a device may be a Mesh networking with wireless access and wired access, and hop count information of a network device cannot be accurately obtained.
Disclosure of Invention
The disclosure provides a node hop count updating method, a node hop count updating device, a terminal and a storage medium in a Mesh network.
According to a first aspect of the present disclosure, a node hop count updating method in a Mesh network is provided, which is applied to a first node, and the method includes:
acquiring hop count information of a second node connected with the first node based on the determined access interface configuration of the first node; wherein the configuration of the access interface of the first node at least comprises: wired access configuration;
and updating the hop count information of the first node based on the hop count information of the second node.
In some embodiments, the obtaining hop count information of a second node connected to the first node based on the determined access interface configuration of the first node includes:
and if the connection relation of the first node in the network is detected to be changed, acquiring hop count information of the second node connected with the first node based on the determined access interface configuration of the first node.
In some embodiments, the obtaining hop count information of a second node connected to the first node based on the determined access interface configuration of the first node includes:
and if the first node access interface is determined to be configured as the wired access configuration, receiving hop count information of the second node sent by the second node.
In some embodiments, said updating the hop count information of the first node based on the hop count information of the second node comprises:
determining whether the second node is a parent node of the first node based on hop count information of the second node;
if the second node is a parent node of the first node, determining the hop count of the first node based on the hop count indicated by the hop count information of the second node; or,
and if the second node is not the parent node of the first node, maintaining the hop count indicated by the hop count information of the first node unchanged.
In some embodiments, determining whether the second node is a parent node of the first node based on the hop count information of the second node comprises one of:
if the hop count indicated by the hop count information of the second node is smaller than the hop count indicated by the hop count information of the first node, or the first node has no hop count information, determining that the second node is a parent node of the first node;
and if the hop count indicated by the hop count information of the second node is greater than the hop count indicated by the hop count information of the first node, determining that the second node is not a parent node of the first node.
In some embodiments, the obtaining hop count information of a second node connected to the first node based on the determined access interface configuration of the first node includes:
if the access interface of the first node is configured to be the wired access configuration, sending a request message to the second node connected with the first node;
and receiving hop count information of the second node returned by the second node based on the request message.
In some embodiments, said updating the hop count information of the first node based on the hop count information of the second node comprises one of:
if hop count information of one second node is received, determining the hop count of the first node based on the hop count indicated by the hop count information of the second node;
and if the hop count information of the plurality of second nodes is received, determining the hop count of the first node based on the smallest hop count in the hop counts indicated by the hop count information of the plurality of second nodes.
In some embodiments, the obtaining hop count information of the second node connected to the first node based on the determined access interface configuration of the first node further includes:
if the access interface of the first node is determined to be configured as the wireless access configuration, scanning a beacon signal sent by the second node;
and determining the hop count information of the second node based on the hop count information carried in the beacon signal.
In some embodiments, said updating the hop count information of the first node based on the hop count information of the second node comprises:
and determining the hop count of the first node based on the hop count indicated by the hop count information of the second node.
In some embodiments, the beacon signal comprises: a beacon frame; and the predetermined information field of the beacon frame carries hop count information of the second node.
According to a second aspect of the present disclosure, there is provided a node hop count updating method in a Mesh network, applied to a second node, the method including:
determining an access interface configuration of a first node connected with the second node;
sending hop count information of the second node to the first node based on the access interface configuration of the first node; the hop count information of the second node is used for the first node to update the hop count information of the first node;
wherein the configuration of the access interface of the first node at least comprises: and (4) wired access configuration.
In some embodiments, the sending hop count information of the second node to the first node based on the access interface configuration of the first node comprises:
if the first node access interface is configured to be in a wired access configuration, sending hop count information of the second node to the first node;
or,
if the first node access interface is configured to be in a wired access configuration, receiving a request message sent by the second node; and sending hop count information of the second node to the second node based on the request message.
In some embodiments, said sending hop count information of said second node to said first node based on said first node access interface configuration comprises:
and if the access interface of the first node is configured to be in a wireless access configuration, sending a beacon signal carrying hop count information of the second node to the first node.
According to a third aspect of the present disclosure, there is provided an apparatus for updating a node hop count in a Mesh network, applied to a first node, the apparatus including:
an obtaining module, configured to obtain hop count information of a second node connected to the first node based on the determined access interface configuration of the first node; wherein the configuration of the access interface of the first node at least comprises: wired access configuration;
and the processing module is used for updating the hop count information of the first node based on the hop count information of the second node.
In some embodiments, the obtaining module is configured to, if it is detected that a connection relationship of the first node in a network changes, obtain hop count information of the second node connected to the first node based on the determined access interface configuration of the first node.
In some embodiments, the processing module is configured to receive hop count information of the second node sent by the second node if it is determined that the first node access interface is configured as a wired access configuration.
In some embodiments, the processing module is configured to determine whether the second node is a parent node of the first node based on hop count information of the second node;
the processing module is further configured to determine, if the second node is a parent node of the first node, the hop count of the first node based on the hop count indicated by the hop count information of the second node; or if the second node is not the parent node of the first node, maintaining the hop count indicated by the hop count information of the first node unchanged.
In some embodiments, the processing module is configured to determine that the second node is a parent node of the first node if the hop count indicated by the hop count information of the second node is less than the hop count indicated by the hop count information of the first node, or the first node has no hop count information; or,
the processing module is configured to determine that the second node is not a parent node of the first node if the hop count indicated by the hop count information of the second node is greater than the hop count indicated by the hop count information of the first node.
In some embodiments, the apparatus, comprises:
a first sending module, configured to send a request message to the second node connected to the first node if it is determined that the access interface of the first node is configured to be the wired access configuration;
and the processing module is used for receiving hop count information of the second node, which is returned by the second node based on the request message.
In some embodiments, the processing module is configured to determine, if hop count information of one of the second nodes is received, a hop count of the first node based on a hop count indicated by the hop count information of the second node; or,
the processing module is configured to determine, if hop count information of a plurality of second nodes is received, the hop count of the first node based on the smallest hop count among the hop counts indicated by the hop count information of the plurality of second nodes.
In some embodiments, the obtaining module is configured to scan a beacon signal sent by the second node if it is determined that the access interface of the first node is configured as the wireless access configuration;
the obtaining module is configured to determine hop count information of the second node based on hop count information carried in the beacon signal.
In some embodiments, the processing module is configured to determine the hop count of the first node based on the hop count indicated by the hop count information of the second node.
In some embodiments, the beacon signal comprises: a beacon frame; and the predetermined information field of the beacon frame carries hop count information of the second node.
According to a fourth aspect of the present disclosure, there is provided an apparatus for updating a node hop count in a Mesh network, applied to a second node, the apparatus including:
a determining module, configured to determine an access interface configuration of a first node connected to the second node;
a second sending module, configured to send hop count information of the second node to the first node based on the access interface configuration of the first node; the hop count information of the second node is used for the first node to update the hop count information of the first node; wherein the configuration of the access interface of the first node at least comprises: and (4) wired access configuration.
In some embodiments, the second sending module is configured to send, to the first node, hop count information of the second node if the first node access interface is configured in a wired access configuration.
In some embodiments, the apparatus further comprises: a second receiving module, configured to receive a request message sent by the second node if the first node access interface is configured to be in a wired access configuration;
and the second sending module is configured to send hop count information of the second node to the second node based on the request message.
In some embodiments, the second sending module is configured to send, to the first node, a beacon signal carrying hop count information of the second node if the access interface of the first node is configured to be in a wireless access configuration.
According to a fifth aspect of the embodiments of the present disclosure, there is provided a terminal, including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to: and when the executable instruction is operated, the node hop count updating method in the Mesh network according to any embodiment of the disclosure is realized.
According to a sixth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, where the computer-readable storage medium stores an executable program, where the executable program, when executed by a processor, implements a node hop count updating method in a Mesh network according to any embodiment of the present disclosure.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
the hop count information of a second node connected with a first node can be acquired by the first node based on the determined access interface configuration of the first node; wherein the first node access interface configuration at least comprises: wired access configuration; and updating the hop count information of the first node based on the hop count information of the second node. Therefore, in the embodiment of the present disclosure, hop count information of the second node may be obtained in different manners according to different access interface configurations of the first node. And when the wired access configuration node exists in the Mesh network, the hop count information of the first node accessed based on the wired access configuration can be accurately acquired.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
Fig. 1 is a schematic diagram illustrating a Mesh networking according to an exemplary embodiment.
Figure 2 is a schematic diagram illustrating a Mesh networking in accordance with an example embodiment.
Fig. 3 is a flowchart illustrating a node hop count updating method in a Mesh network according to an exemplary embodiment.
Fig. 4 is a flowchart illustrating a node hop count updating method in a Mesh network according to an exemplary embodiment.
Figure 5 is a schematic diagram illustrating a Mesh networking in accordance with an example embodiment.
Fig. 6 is a flowchart illustrating a node hop count updating method in a Mesh network according to an exemplary embodiment.
Fig. 7 is a schematic diagram illustrating a Mesh networking according to an example embodiment.
Fig. 8 is a flowchart illustrating a node hop count updating method in a Mesh network according to an exemplary embodiment.
Fig. 9 is a flowchart illustrating a node hop count updating method in a Mesh network according to an exemplary embodiment.
Fig. 10 is a flowchart illustrating a node hop count updating method in a Mesh network according to an exemplary embodiment.
Fig. 11 is a block diagram illustrating a node hop count updating apparatus in a Mesh network according to an exemplary embodiment.
Fig. 12 is a block diagram illustrating a node hop count updating apparatus in a Mesh network according to an exemplary embodiment.
Fig. 13 is a block diagram illustrating a terminal according to an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of devices and apparatus consistent with certain aspects of the invention, as detailed in the appended claims.
In order to facilitate understanding of those skilled in the art, the embodiments of the present disclosure set forth a plurality of implementations for clearly illustrating the technical solutions of the embodiments of the present disclosure. Of course, it can be understood by those skilled in the art that the embodiments provided in the present disclosure can be implemented alone, or in combination with other embodiments of the methods in the present disclosure, or in combination with some methods in other related technologies; the disclosed embodiments are not limited thereto.
To facilitate an understanding of any embodiment of the present disclosure, first, a Mesh network is explained.
In one embodiment, as shown in fig. 1, Mesh networking is a network of star topology; the Mesh networking includes an outer network and three nodes. The 3 nodes may be access point 1(AP1), AP2, and AP3, respectively; wherein the AP1 is a root access point, and the AP2 and the AP3 are child access points; the AP1 is connected with an external network; the AP2 and the AP3 are connected with the AP1 in a wireless connection mode; the hop count of AP1 is 0 at this time; the hop counts of AP2 and AP3 are 1, respectively. If the topology structure of the Mesh network changes, for example, the star topology structure changes into the chain topology structure shown in fig. 2; in this case, the hop count of AP1 is 0, the hop count of AP2 is 1, and the hop count of AP3 is 2.
In the above embodiment, the Mesh network is a wireless networking; wherein each node is accessed to the network in a wireless connection mode. However, in some networks, for example, a Mesh network including nodes based on a wired access network, or a hybrid Mesh network including nodes based on a wired access network and nodes based on a wireless access network, the hop count of each node cannot be accurately obtained.
As shown in fig. 3, an embodiment of the present disclosure provides a method for updating a hop count of a node in a Mesh network, where the method is applied to a first node, and the method includes the following steps:
step S11: acquiring hop count information of a second node connected with the first node based on the determined access interface configuration of the first node; wherein the configuration of the access interface of the first node at least comprises: wired access configuration;
step S12: and updating the hop count information of the first node based on the hop count information of the second node.
The method for updating the node hop count in the Mesh network, which is disclosed by the embodiment of the disclosure, is applied to a first node; the first node and the second node may be any nodes in a network. The Mesh network here is a wired network or a hybrid network; wherein a hybrid network may refer to a network that includes one or more operator network devices and hardware; alternatively, a hybrid network may also refer to a network that includes both wirelessly connected and wired devices.
In other embodiments, the Mesh network may be replaced by any other network in which a wired connection device exists or a wired connection device and a wireless connection device exist.
In one embodiment, the first node and the second node may both be access points.
In one embodiment, the first node and the second node may each be a router. For example, the first node and the second node may both be Mesh routers of a Mesh network. Of course, in its embodiment, the first node and the second node may also be other access devices, such as a wireless bridge or a wireless gateway; the first node and the second node only need to be capable of accessing the terminal to the network, and the types of the first node and the second node and the like are not limited herein.
Here, the first node and the second node may each be connected to at least one terminal. For example, the terminal may be, but is not limited to, a computer, a mobile phone, a server, a tablet, a wearable device, a vehicle-mounted terminal, a smart home terminal, and/or a medical device, etc.
In the disclosed embodiment, the Mesh network comprises a root node and one or more child nodes; wherein the root node is in communication connection with an external network; if the Mesh network has a plurality of child nodes, the child nodes are connected with each other; and the child nodes are in communication connection with the external network through the root nodes. The first node may be the root node, and the second node may be any one of one or more of the child nodes; alternatively, the first node may be any one of one or more of the child nodes, and the second node may be the root node.
In an embodiment, if the first node is connected to the second node, the second node is a parent node of the first node, or the second node is a child node of the first node.
Here, the second node is a parent node of the first node, that is, the second node is an uplink node or a previous-hop node of the first node; the second node is a subordinate node of the first node, that is, the second node is a next-connection node or a next-hop node of the first node.
In other embodiments, the first node or the second node may be any node in the network, and only the first node and the second node need to establish a wireless connection or a wired connection.
In one embodiment, the configuration of the access interface of the first node comprises: and (4) wired access configuration. In another embodiment, the configuration of the access interface of the first node comprises: a wired access configuration and/or a wireless access configuration.
If the access interface configuration of the first node is wired access configuration, the first node is accessed to the network in a wired connection mode; the first node communicates with the connected nodes via a wired connection. For example, a hop count notification module may be added to the first node, where the hop count notification module is configured to send hop count information to a node connected to the first node and/or receive hop count information sent by a node connected to the first node.
If the access interface configuration of the first node is wireless access configuration, the first node accesses the network port in a wireless connection mode; the first node communicates with the connected nodes via a wireless connection. For example, a Beacon (Beacon) frame or the like may be set in an interface of a node of the first node, and the Beacon frame may carry hop count information of the first node; in this way, the first node may transmit hop count information of the first node to the AP connected to the first node through the beacon frame. The node connected to the first node here may be any other node in the network; for example, it may be the second node.
In one embodiment, the determining the access interface configuration of the first node includes:
determining an access interface configuration of the first node based on the access interface configuration information of the first node.
In this embodiment of the present disclosure, the access interface configuration information of the first node may be stored in the first node, where the interface configuration information at least includes: configuration information indicating that the first node is a wired access configuration, and/or configuration information indicating that the first node is a wireless access configuration. Therefore, the embodiment of the disclosure can accurately determine whether the first node is a node configured by wired access or a node configured by wireless access by the access interface configuration information.
In one embodiment, the step S11 includes:
and if the connection relation of the first node in the network is detected to be changed, acquiring hop count information of the second node connected with the first node based on the determined access interface configuration of the first node.
Here, the connection relationship of the first node in the network changes, including but not limited to at least one of the following: a first node is accessed into a network for the first time; the first node changes the topological relation in the network. In one embodiment, the first node performs a transformation of a topological relationship in the network, including: the first node is connected to the second node by a node switch with the third node.
Illustratively, as shown in fig. 1 and fig. 2, the first node may be an AP2, and the topological relationship of the AP2 in the network changes. Therefore, in the embodiment of the present disclosure, when the network topology structure of the first node changes, the hop count of the first node with the changed topology relationship can be accurately obtained.
For example, if there are new nodes accessing the network as in the network in fig. 2, for example, the AP4 accesses the network by connecting the AP 3; the hop count of the AP4 may also be obtained. Thus, in the embodiment of the present disclosure, when a new first node accesses a network, the hop count of the new first node can be accurately obtained.
Of course, in other embodiments, if the network topology relationship is not changed, the hop count of each node may be accurately updated.
For example, in some embodiments, the step S11 includes:
and acquiring hop count information of a second node connected with the first node at a preset time interval based on the determined access interface configuration of the first node.
Therefore, in the embodiment of the present disclosure, the hop count information of the first node may also be updated based on the preset time interval, so as to implement real-time update of the hop count information of each node in the whole Mesh network.
In one embodiment, the hop count information includes: the number of hops. Of course, in other embodiments, the hop count information may be any information indicating the hop count. For example, the hop count information may be flag information: if the label is "000", it indicates that the hop count is 0; when the symbol is "001", it indicates that the hop count is 1; when the symbol is "010", it indicates that the hop count is 2; and so on.
In the embodiment of the present disclosure, hop count information of a second node connected to a first node may be obtained in different manners according to different configurations of access interfaces of the first node; thereby updating the hop count information of the first node based on the hop count information of the second node. And because the access interface configuration of the first node at least comprises the wired access configuration, the embodiment of the disclosure can accurately acquire the hop count information of the first node accessed based on the wired access configuration when the wired access configuration node exists in the Mesh network.
In the embodiment of the disclosure, hop count information of a first node accessed by a wired connection mode can be obtained based on time; therefore, the hop count information of the first node can be acquired in real time.
In the embodiment of the present disclosure, when a connection relationship of a network changes (for example, when a first node first accesses the network, or when a topology relationship of the first node in the network changes), at least hop count information of the first node accessed in a wired connection manner may be accurately obtained. In addition, the hop count information of the first node can be acquired only when the second node is in the network connection relation; therefore, the hop count information does not need to be updated by the first node in real time, so that the operation of the first node can be reduced, and the resource consumption of the first node is saved.
In one embodiment, the method further comprises:
and if the hop count information of the second node connected with the first node is acquired and sent to change, determining that the connection relation of the first AP in the network changes.
Therefore, in the embodiment of the disclosure, whether the relationship of the first node changes can be automatically identified through the hop count information of the second node obtained by the first node, and the intelligence of the first node is improved.
In some embodiments, the step S21, includes one of:
if the first node access interface is determined to be configured as a wired access configuration, acquiring hop count information of the second node through a preset wired communication mechanism;
and if the first node access interface is determined to be configured as the wireless access configuration, acquiring hop count information of the second node through a preset wireless communication mechanism.
Therefore, in the embodiment of the present disclosure, a suitable communication mechanism may be selected to obtain the hop count information of the second node according to different configurations of the access interface.
As shown in fig. 4, in some embodiments, the step S11 includes:
step S111: and if the first node access interface is determined to be configured as the wired access configuration, receiving hop count information of the second node sent by the second node.
In one embodiment, the step S111 includes: and if the first node access interface is determined to be configured as the wired access configuration, receiving hop count information of the second node, which is sent by the second node, based on the wired interface configuration of the first node.
Illustratively, a first node establishes a wired connection with a second node; and the first node receives the hop count information of the second node sent by the second node through wired connection. For example, the first node and the second node each include a hop count notification module. The first node may receive the hop count information of the second node of the hop count notification module of the second node, determine the hop count information of the first node based on the hop count information of the second node, and update the determined hop count information of the first node to the hop count notification module of the first node.
In the embodiment of the present disclosure, if the first node access interface is configured as a wired access configuration, the hop count information of the second node sent by the second node may be directly received through wired connection; in this way, the first node can be made to know the hop count information of the second node connected to itself, so that the first node can know the hop count of itself.
As shown in fig. 4, in some embodiments, the step S12 includes:
step S121: determining whether the second node is a parent node of the first node based on hop count information of the second node;
step S122: if the second node is a parent node of the first node, determining the hop count of the first node based on the hop count indicated by the hop count information of the second node; or if the second node is not the parent node of the first node, maintaining the hop count indicated by the hop count information of the first node unchanged.
In an embodiment, if the second node is a parent node of the first node, determining the hop count of the first node based on the hop count indicated by the hop count information of the second node includes:
and if the second node is the parent node of the first node, determining the sum of the hop count indicated by the hop count information of the second node and 1 as the hop count of the first node.
In some embodiments, the step S121 includes one of:
if the hop count indicated by the hop count information of the second node is smaller than the hop count indicated by the hop count information of the first node, or the first node has no hop count information, determining that the second node is a parent node of the first node;
and if the hop count indicated by the hop count information of the second node is greater than the hop count indicated by the hop count information of the first node, determining that the second node is not a parent node of the first node.
If the second node is the parent node of the first node, the hop count of the first node is the hop count of the second node plus 1; and if the second node is not the parent node of the first node, the first node keeps the hop count of the current first node unchanged.
Illustratively, the first node receives hop count information of the second node sent by the second node, for example, the hop count information of the second node indicates that the hop count is 2; and the hop count information of the first node stored by the first node indicates that the hop count is 4. Determining that the hop count indicated by the hop count information of the second node is smaller than the hop count indicated by the hop count information of the first node, and determining that the second node is a parent node of the first node; the hop count of the first node is the hop count of the second node plus 1, that is, the hop count of the first node is 3. In this embodiment, the topological relationship of the first node in the network changes, and the hop count of the first node may be determined based on the parent node (i.e., the second node) connected to the first node.
Illustratively, the first node receives hop count information of the second node sent by the second node, for example, the hop count information of the second node indicates that the hop count is 2; the first node does not have hop count information of the first node. At this time, since the first node has no hop count information, it is determined that the second node connected to the first node is the parent node of the first node, and the hop count of the first node is the hop count of the second node plus 1, that is, the hop count of the first node is 3. In this embodiment, the first node may be a first access network, so the first node has no hop count information; thus, the second node connected with the first node can be considered as a parent node of the first node; the hop count of the first node may thus be determined directly based on the hop count of the second node plus 1.
Illustratively, the first node receives hop count information of the second node sent by the second node, for example, the hop count information of the second node indicates that the hop count is 4; and the hop count information of the first node stored by the first node indicates that the hop count is 3. And if the hop count information of the second node indicates that the hop count is greater than the hop count information of the first node, determining that the second node is not a parent node of the first node, and keeping the hop count information of the first node stored in the first node to indicate that the hop count is 3. For example, in a network with a chain topology as shown in fig. 5, the AP3 is the first node; AP2 and AP4 are both connected to AP3, and AP2 and AP4 are the second nodes. The AP3 may receive hop count information for the AP2 and the AP 4; if the AP3 receives the hop count information of the AP4, the hop count information of the AP4 indicates that the hop count is 4; the hop count information of the AP3 indicates that the hop count is 3; it can be determined that the AP4 is not a parent node of the AP3 and the AP4 is a child node of the AP3, the hop count information of the AP3 indicating that the hop count is 3 is maintained.
In the embodiment of the present disclosure, if the first node directly receives the hop count information of the second node, it may be determined whether the second node is a parent node of the first node based on the comparison between the hop count indicated by the hop count information of the second node and the hop count indicated by the hop count information of the first node; if so, updating the hop count of the first node based on the hop count indicated by the hop count information of the second node, for example, determining that the hop count of the first node is the hop count of the second node plus 1, and if not, maintaining the current hop count of the first node unchanged. Thus, the embodiments of the present disclosure can accurately obtain the hop count of the first node when the second node is a parent node of the first node, or the second node is not a parent node of the first node. For example, when a new first node is accessed to the network or the topology relationship of the existing first node in the network changes, the hop count of the first node accessed by the wired connection mode can be accurately updated.
If a new node is accessed to the network for the first time or the topological relation of the existing node in the network is changed, each node calculates the hop count of the node; the hop count updating of each node in the Mesh network can be finished in a first-level and first-level mode, and therefore the hop count of the nodes of the whole Mesh network can be accurately updated.
As shown in fig. 6, the step S11 includes:
step S1121: if the access interface of the first node is configured to be the wired access configuration, sending a request message to the second node connected with the first node;
step S1122: and receiving the hop count information of the second node returned by the second node based on the request message.
Here, the request message is used to query hop count information of the second node. In an embodiment, the request message is used to query the hop count information of the second node in the hop count notification module of the second node.
In the disclosed embodiment, the first node may actively query the second node,
in one embodiment, the step S1121 includes: sending a request message to the second node connected to the first node at a predetermined time interval in response to the access interface of the first node being configured in a wired access configuration. Thus, in the embodiment of the present disclosure, the hop count information of the second node may be periodically obtained, and the hop count information of the first node may be updated based on the hop count information of the second node. Therefore, the hop count of the first node can be periodically updated, so that the first node can timely know the position of the first node in the network.
Referring to fig. 6 again, the step S12 includes:
step S123: if hop count information of one second node is received, determining the hop count of the first node based on the hop count indicated by the hop count information of the second node; or, if the hop count information of the plurality of second nodes is received, determining the hop count of the first node based on the smallest hop count in the hop counts indicated by the hop count information of the plurality of second nodes.
The second node here may be one or more.
In an embodiment, if receiving hop count information of the second node, determining the hop count of the first node based on the hop count indicated by the hop count information of the second node includes:
and if receiving hop count information of the second node, determining the sum of the hop count indicated by the hop count information of the second node and 1 as the hop count of the first node.
In an embodiment, if the hop count information of a plurality of the second nodes is received, determining the hop count of the first node based on the smallest hop count of the hop counts indicated by the hop count information of the plurality of the second nodes includes:
and if the hop count information of the plurality of second nodes is received, determining the sum of the minimum hop count and 1 in the hop counts indicated by the hop count information of the plurality of second nodes as the hop count of the first node.
Illustratively, as shown in fig. 7, the AP1 is connected to an external network; the AP2 is connected with the AP1 in a wired connection mode, the AP3 is connected with the AP2 in a wired connection mode, and the AP4 is connected with the AP2 in a wireless connection mode. If the AP3 is the first node and the AP3 is connected to the AP2, the AP2 may be the second node. If the AP3 obtains the hop count information of the AP2, the hop count information of the AP2 indicates that the hop count is 1; then it is determined that the hop count of AP3 is 1 added to the hop count of AP2, i.e., the hop count of AP3 is 2.
For example, referring again to fig. 7, if the AP2 is the first node and the AP2 is connected to the AP1, the AP3 and the AP4, respectively, the AP1, the AP3 and the AP4 are the second nodes. If the AP2 obtains the hop count information of the AP1 and the hop count information of the AP3, where the hop count information of the AP1 indicates that the hop count is 0, and the hop count information of the AP3 indicates that the hop count is 2; then the hop count for AP2 is determined to be: the hop count information of the AP1 indicates the hop count, and the hop count information of the AP3 indicates the minimum hop count of the hop counts plus 1, that is, the hop count of the AP2 is determined as: the hop count of AP1 plus 1 is 2.
In the embodiment of the present disclosure, if a first node is connected to a second node, it is determined that the first node is a subordinate node of the second node, and the hop count of the first node may be determined directly based on the hop count of the second node. Alternatively, when the first node is connected to the plurality of second nodes, which of the plurality of second nodes is the parent node of the first node may be determined, and the hop count of the first node may be determined based on the hop count of the parent node. Therefore, in the embodiment of the present disclosure, whether the first node is connected to multiple second nodes or not, the hop count of each first node can be accurately determined, so as to implement automatic update of the hop count of each node in the entire network.
As shown in fig. 8, in some embodiments, the step S11 further includes:
step S1131: if the access interface of the first node is determined to be configured as the wireless access configuration, scanning a beacon signal sent by the second node;
step S1132: and determining the hop count information of the second node based on the hop count information carried in the beacon signal.
In one embodiment, the beacon signal comprises: a beacon frame; and the predetermined information field of the beacon frame carries hop count information of the second node. For example, the predetermined information field may be a Vendor (Vendor IE) field in a beacon frame, where the Vendor IE field carries hop count information of the second node.
In this embodiment of the present disclosure, if the access interface of the first node is configured as a wireless access configuration, the hop count information of the second node may be determined based on the hop count carried in the beacon signal by scanning the beacon signal sent by the second node. In this way, in the embodiment of the present disclosure, when the structure of the network changes, at least the hop count information of the second node, which is the parent node of the first node accessed in the wireless connection manner, may be obtained, so that the hop count information of the first node may be accurately obtained based on the hop count information of the second node.
Referring to fig. 8 again, the S12 includes:
step S124: and determining the hop count of the first node based on the hop count indicated by the hop count information of the second node.
In one embodiment, the step S124 includes: and if the access interface of the first node is configured to be the wireless access configuration, determining the hop count of the first node based on the hop count indicated by the hop count information of the second node.
In one embodiment, the step S124 includes: and if the access interface of the first node is configured to be the wireless access configuration, the sum of the hop count indicated by the hop count information of the second node and 1 is the hop count of the second node.
For example, please refer to fig. 7 again; if the AP2 and the AP4 are connected in a wireless connection mode. If AP4 is the first node, AP2 is the second node; the AP4 obtains the hop count information of the AP2, the hop count information of the AP2 indicating that the hop count is 1; then the hop count for AP4 is determined to be: the hop count of AP2 is 1 plus 1, i.e., the hop count of AP4 is 2.
In wireless connection, each node has two interfaces, which are respectively: a Basic Service Set (BSS) interface interfaces with a station of operation (STA). The STA interface of the parent node is connected to the next-hop BSS interface; for example, as shown in fig. 7, the STA interface of AP2 interfaces with the BSS interface of AP 4. In this way, in the wireless connection, the first node can know whether the AP connected to the first node is a parent node through such a connection manner.
In this embodiment of the disclosure, if the first node and the second node are connected in a wireless connection manner, it may be determined that the second node is a parent node of the first node directly based on a wireless connection manner specific to the first node and the second node, for example, an STA interface of the parent node is connected to a BSS interface of the child node. Therefore, the hop count of the first node can be accurately determined based on the hop count of the second node; therefore, the hop count of the first node is automatically updated.
In any of the above embodiments, the updating the hop count information of the first node at least includes obtaining the hop count of the first node. And, in some embodiments, the updating the hop count information of the first node includes: and obtaining the hop count of the first node, and storing the hop count of the first node as the hop count information of the first node.
Here, the storing the hop count information of the first node includes, but is not limited to, at least one of: storing hop count information of the first node in a storage file of the first node; storing the hop count information of the first node in a hop count notification module of the first node; and storing the hop count information of the first node in an AP interface of the first node. For example, hop count information of the first node is stored in a beacon frame of the AP interface.
In some embodiments, the method further comprises:
and in response to the first node being a network egress device, determining that the hop count of the first node is 0.
Illustratively, as shown in fig. 7, the AP1 is connected to an external network, the AP1 is determined to be a network egress device, and the hop count of the AP1 is determined to be 0. Hop count information for AP1 having a hop count of 0 may be stored in the hop count notification module and/or the AP interface.
In this embodiment of the present disclosure, if the first node is a network egress device, the first node does not have a parent node, and the AP does not need to obtain the hop count information of other APs, and may directly determine that the hop count of the first node is 0.
As shown in fig. 9, an embodiment of the present disclosure further provides a method for updating the hop count of a node in a Mesh network; the Mesh network comprises a root node and a plurality of child nodes; the root node is connected with an external network; the plurality of child nodes are mutually connected and are connected with an external network through the root node; wherein the plurality of child nodes includes: one or more of the first node, a parent node of the current node, a child node of the current node, and an end node; the method comprises the following steps:
step S201: if the connection relation of the current node in the network is detected to be changed, sending a topology network updating message to a parent node of the current node;
in one embodiment, a current node detects whether the connection relationship of the current node in a network changes; and if the connection relation of the current node in the network is detected to be changed, sending a topology network updating message to the parent node of the current node.
Step S202: sending the topology network update message to a first node;
in one embodiment, the parent node of the current node sends the topology network update message to the first node; wherein the first node is any one of the plurality of child nodes.
In one embodiment, the first node may be the first node of any of the embodiments corresponding to fig. 3, 4, 6, 8, and 9.
Of course, in other embodiments, the first node may not be present; the parent node of the current node directly sends the topology network update message to the root node.
Of course, in other embodiments, the first node may be multiple.
Step S203: sending the topology network update message to a root node;
in an embodiment, the first node sends the topological network update message to the root node.
Step S204: updating hop count information of the root node based on the topology network update message;
in one embodiment, the following node updates the hop count information of the root node based on the topology network update message.
Illustratively, the root node updates the root node to have a hop count of 0.
Step S205: sending the updated hop count information of the root node to the first node;
in one embodiment, the root node sends the updated hop count information of the root node to the first node.
Step S206: updating the first node hop count information based on the updated hop count information of the root node;
in one embodiment, the first node updates the first node hop count information based on the updated hop count information of the root node.
Illustratively, the first node updates the hop count of the first node to 1.
Step S207: sending the updated hop count information of the first node to a parent node of the current node;
in one embodiment, the first node sends the updated hop count information of the first node to a parent node of a current node.
Step S208: updating the hop count information of the parent node of the current node based on the updated hop count information of the first node;
in one embodiment, the parent node of the current node updates the hop count information of the parent node of the current node based on the updated hop count information of the first node.
Illustratively, the parent node of the current node updates the hop count of the parent node of the current node to 2.
Step S209: sending the updated hop count information of the parent node of the current node to the current node;
in one embodiment, the parent node of the current node sends the updated hop count information of the parent node of the current node to the current node.
Step S210: updating the hop count information of the current node based on the updated hop count information of the parent node of the current node;
in one embodiment, the current node updates the hop count information of the current node based on the updated hop count information of the parent node of the current node.
Illustratively, the current node updates the hop count of the current node to 3.
Step S211: sending the updated hop count information of the current node to the subordinate nodes of the current node;
in one embodiment, the current node sends the updated hop count information of the current node to the child nodes of the current node.
Step S212: updating the hop count information of the sublevel node of the current node based on the updated hop count information of the current node;
in one embodiment, the subordinate node of the current node updates the hop count information of the subordinate node of the current node based on the updated hop count information of the current node.
Illustratively, the child node of the current node updates the hop count of the child node of the current node to 4.
Step S213: sending the updated hop count information of the child node of the current node to the end node;
in one embodiment, the subordinate node of the current node sends the updated hop count information of the subordinate node of the current node to the end node.
Step S214: and updating the hop count information of the terminal node based on the updated hop count information of the sub-level node of the current node.
In one embodiment, the end node updates the hop count information of the end node based on the updated child node hop count information of the current node.
Illustratively, the end node updates the end node to have a hop count of 5.
In the embodiment of the present disclosure, the steps S201 to S203 may be regarded as a process of sending a topology network update message to a root node according to a preset path; therefore, the root node can update the hop count of the root node according to the topology network updating message. The steps S204 to S214 may be regarded as a process in which each node in the Mesh network updates its own hop count based on the hop count updated by the previous node; therefore, the hop count of each node in the Mesh network can be accurately and automatically updated. In addition, in the embodiment of the disclosure, no matter which node in the Mesh network has a change in the connection relationship in the network, the hop count of each node in the whole Mesh network can be accurately updated.
In the embodiment of the present disclosure, when the topology network update message and/or the hop count information is sent between the nodes in the Mesh network, the topology network update message and/or the hop count information may be sent based on a communication mechanism corresponding to a connection mode between the nodes. For example, if the current node is connected to the subordinate node of the current node in a wired manner, the current node may send hop count information to the subordinate node of the current node based on a preset wired communication mechanism; for another example, if the current node is wirelessly connected to the parent node of the current node, the current node may send a topology network update message to the parent node of the current node based on a preset wireless communication mechanism, and receive hop count information sent by the parent node of the current node based on the preset wireless communication mechanism; and so on.
The following method for updating the node hop count in the Mesh network is applied to the second node, and is similar to the description of the method for updating the node hop count in the Mesh network applied to the first node; for technical details not disclosed in the embodiment of the method for updating the hop count of the node in the Mesh network applied to the second node, please refer to the description of the example of the method for updating the hop count of the node in the Mesh network applied to the second node, which will not be described in detail herein.
As shown in fig. 10, an embodiment of the present disclosure provides a method for updating a node hop count in a Mesh network, which is applied to a second node, and the method includes the following steps:
step S31: determining an access interface configuration of a first node connected with the second node;
step S32: sending hop count information of the second node to the first node based on the access interface configuration of the first node; the hop count information of the second node is used for the first node to update the hop count information of the first node; wherein the configuration of the access interface of the first node at least comprises: and (4) wired access configuration.
In some embodiments, the step S32 includes:
if the first node access interface is configured to be in wired access configuration, sending hop count information of the second node to the first node;
or,
if the first node access interface is configured to be in a wired access configuration, receiving a request message sent by the second node; and sending hop count information of the second node to the second node based on the request message.
In some embodiments, the step S32 includes:
and if the access interface of the first node is configured to be in a wireless access configuration, sending a beacon signal carrying hop count information of the second node to the first node.
Fig. 11 provides an exemplary embodiment illustrating an apparatus for updating a hop count of a node in a Mesh network, where the apparatus is applied to a first node, and the apparatus includes:
an obtaining module 41, configured to obtain hop count information of a second node connected to the first node based on the determined access interface configuration of the first node; wherein the configuration of the access interface of the first node at least comprises: wired access configuration;
and a processing module 42, configured to update the hop count information of the first node based on the hop count information of the second node.
In some embodiments, the obtaining module 41 is configured to, if it is detected that a connection relationship of the first node in the network changes, obtain hop count information of the second node connected to the first node based on the determined access interface configuration of the first node.
In some embodiments, the obtaining module 41 is configured to receive hop count information of the second node sent by the second node if it is determined that the first node access interface is configured as a wired access configuration.
In some embodiments, processing module 42 is configured to determine whether the second node is a parent node of the first node based on the hop count information of the second node;
the processing module 42 is further configured to determine, if the second node is a parent node of the first node, the hop count of the first node based on the hop count indicated by the hop count information of the second node; or if the second node is not a parent node of the first node, maintaining the hop count indicated by the hop count information of the first node unchanged.
In some embodiments, the processing module 42 is configured to determine, if the second node is a parent node of the first node, that a sum of the hop count indicated by the hop count information of the second node and 1 is the hop count of the first node.
In some embodiments, the processing module 42 is configured to determine that the second node is a parent node of the first node if the hop count indicated by the hop count information of the second node is smaller than the hop count indicated by the hop count information of the first node, or the first node has no hop count information; or,
the processing module 42 is configured to determine that the second node is not a parent node of the first node if the hop count indicated by the hop count information of the second node is greater than the hop count indicated by the hop count information of the first node.
In some embodiments, the apparatus comprises:
a first sending module 43, configured to send a request message to the second node connected to the first node if it is determined that the access interface of the first node is configured to be the wired access configuration;
the processing module 42 is configured to receive the hop count information of the second node returned by the second node based on the request message.
In some embodiments, the processing module 42 is configured to, if hop count information of one of the second nodes is received, determine the hop count of the first node based on the hop count indicated by the hop count information of the second node; or,
the processing module 42 is configured to determine, if hop count information of a plurality of second nodes is received, the hop count of the first node based on the smallest hop count among the hop counts indicated by the hop count information of the plurality of second nodes.
In some embodiments, the processing module 42 is configured to determine, if hop count information of the second node is received, a sum of a hop count indicated by the hop count information of the second node and 1 as the hop count of the first node.
In some embodiments, the processing module 42 is configured to determine, if hop count information of a plurality of second nodes is received, a sum of a smallest hop count and 1 in hop counts indicated by the hop count information of the plurality of second nodes, as the hop count of the first node.
In some embodiments, the obtaining module 41 is configured to scan a beacon signal sent by the second node if it is determined that the access interface of the first node is configured as the wireless access configuration;
the obtaining module 41 is further configured to determine hop count information of the second node based on hop count information carried in the beacon signal.
In some embodiments, the processing module is configured to determine the hop count of the first node based on the hop count indicated by the hop count information of the second node if it is determined that the access interface of the first node is configured as the wireless access configuration.
In some embodiments, the processing module 42 is configured to determine that the access interface of the first node is configured as the wireless access configuration, and determine that the hop count of the second node is the hop count of the second node based on a sum of the hop count indicated by the hop count information of the second node and 1.
In some embodiments, the beacon signal comprises: a beacon frame; and the predetermined information field of the beacon frame carries hop count information of the second node.
Fig. 12 provides an exemplary embodiment of a node hop count updating apparatus in a Mesh network, where the apparatus is applied to a second node, and the apparatus includes:
a determining module 61, configured to determine an access interface configuration of a first node connected to the second node;
a second sending module 62, configured to send hop count information of the second node to the first node based on the access interface configuration of the first node; the hop count information of the second node is used for the first node to update the hop count information of the first node; wherein, the configuration of the access interface of the first node at least comprises: and (4) wired access configuration.
In some embodiments, the second sending module 62 is configured to send, to the first node, hop count information of the second node if the first node access interface is configured in a wired access configuration.
In some embodiments, the apparatus further comprises: a second receiving module 63, configured to receive a request message sent by the second node if the first node access interface is configured to be in a wired access configuration;
the second sending module 62 is configured to send hop count information of the second node to the second node based on the request message.
In some embodiments, the second sending module 62 is configured to send, to the first node, a beacon signal carrying hop count information of the second node if the access interface of the first node is configured as a wireless access configuration.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the apparatus, and will not be elaborated here.
An embodiment of the present disclosure further provides a terminal, which includes:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to: and when the executable instruction is operated, the node hop count updating method in the Mesh network according to any embodiment of the disclosure is realized.
A terminal here may be a node; for example, the first node or the second node in any of the above embodiments, etc.
The terminal herein may also be various types of terminals. Such as a computer, server, etc.
The memory may include various types of storage media, which are non-transitory computer storage media capable of continuing to remember the information stored thereon after a terminal has been powered down.
The processor may be connected to the memory via a bus or the like for reading the executable program stored on the memory, for example, for implementing at least one of the methods as shown in fig. 3, 4, 6, 8 to 10.
An embodiment of the present disclosure further provides a computer-readable storage medium, where an executable program is stored in the computer-readable storage medium, where the executable program, when executed by a processor, implements a node hop count updating method in a Mesh network according to any embodiment of the present disclosure. For example, at least one of the methods shown in fig. 3, 4, 6, 8 to 10 is implemented.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 13 is a block diagram illustrating a terminal 800 according to an example embodiment. For example, the terminal 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and the like.
Referring to fig. 13, terminal 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the terminal 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operation at the device 800. Examples of such data include instructions for any application or method operating on terminal 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power components 806 provide power to the various components of terminal 800. Power components 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for terminal 800.
The multimedia component 808 includes a screen providing an output interface between the terminal 800 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the device 800 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the terminal 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
Sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for terminal 800. For example, sensor assembly 814 can detect the open/closed state of device 800, the relative positioning of components, such as a display and keypad of terminal 800, sensor assembly 814 can also detect a change in position of terminal 800 or a component of terminal 800, the presence or absence of user contact with terminal 800, orientation or acceleration/deceleration of terminal 800, and a change in temperature of terminal 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
Communication component 816 is configured to facilitate communications between terminal 800 and other devices in a wired or wireless manner. The terminal 800 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the terminal 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 804 comprising instructions, executable by the processor 820 of the terminal 800 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (28)

1. A node hop count updating method in a Mesh network is applied to a first node, and the method comprises the following steps:
acquiring hop count information of a second node connected with the first node based on the determined access interface configuration of the first node; wherein the configuration of the access interface of the first node at least comprises: wired access configuration;
and updating the hop count information of the first node based on the hop count information of the second node.
2. The method of claim 1, wherein the obtaining hop count information of a second node connected to the first node based on the determined access interface configuration of the first node comprises:
and if the connection relation of the first node in the network is detected to be changed, acquiring hop count information of the second node connected with the first node based on the determined access interface configuration of the first node.
3. The method according to claim 1 or 2, wherein the obtaining hop count information of a second node connected to the first node based on the determined access interface configuration of the first node comprises:
and if the first node access interface is determined to be configured as the wired access configuration, receiving hop count information of the second node sent by the second node.
4. The method of claim 3, wherein updating the hop count information of the first node based on the hop count information of the second node comprises:
determining whether the second node is a parent node of the first node based on hop count information of the second node;
if the second node is a parent node of the first node, determining the hop count of the first node based on the hop count indicated by the hop count information of the second node; or,
and if the second node is not the parent node of the first node, maintaining the hop count indicated by the hop count information of the first node unchanged.
5. The method of claim 4, wherein determining whether the second node is a parent node of the first node based on the hop count information of the second node comprises one of:
if the hop count indicated by the hop count information of the second node is smaller than the hop count indicated by the hop count information of the first node, or the first node has no hop count information, determining that the second node is a parent node of the first node;
and if the hop count indicated by the hop count information of the second node is greater than the hop count indicated by the hop count information of the first node, determining that the second node is not a parent node of the first node.
6. The method according to claim 1 or 2, wherein the obtaining hop count information of a second node connected to the first node based on the determined access interface configuration of the first node comprises:
if the access interface of the first node is configured to be the wired access configuration, sending a request message to the second node connected with the first node;
and receiving hop count information of the second node returned by the second node based on the request message.
7. The method of claim 6, wherein the updating the hop count information of the first node based on the hop count information of the second node comprises one of:
if hop count information of one second node is received, determining the hop count of the first node based on the hop count indicated by the hop count information of the second node;
and if the hop count information of the plurality of second nodes is received, determining the hop count of the first node based on the smallest hop count in the hop counts indicated by the hop count information of the plurality of second nodes.
8. The method according to claim 1 or 2, wherein the obtaining hop count information of the second node to which the first node is connected based on the determined access interface configuration of the first node, further comprises:
if the access interface of the first node is determined to be configured as the wireless access configuration, scanning a beacon signal sent by the second node;
and determining the hop count information of the second node based on the hop count information carried in the beacon signal.
9. The method of claim 8, wherein updating the hop count information of the first node based on the hop count information of the second node comprises:
and determining the hop count of the first node based on the hop count indicated by the hop count information of the second node.
10. The method of claim 8, wherein the beacon signal comprises: a beacon frame; and the predetermined information field of the beacon frame carries hop count information of the second node.
11. A node hop count updating method in a Mesh network is applied to a second node, and the method comprises the following steps:
determining an access interface configuration of a first node connected with the second node;
sending hop count information of the second node to the first node based on the access interface configuration of the first node; the hop count information of the second node is used for the first node to update the hop count information of the first node;
wherein the configuration of the access interface of the first node at least comprises: and (4) wired access configuration.
12. The method of claim 11, wherein the sending hop count information of the second node to the first node based on the access interface configuration of the first node comprises:
if the first node access interface is configured to be in a wired access configuration, sending hop count information of the second node to the first node;
or,
if the first node access interface is configured to be in a wired access configuration, receiving a request message sent by the second node; and sending hop count information of the second node to the second node based on the request message.
13. The method according to claim 11 or 12, wherein said sending hop count information of the second node to the first node based on the first node access interface configuration comprises:
and if the access interface of the first node is configured to be in a wireless access configuration, sending a beacon signal carrying hop count information of the second node to the first node.
14. An apparatus for updating node hop count in a network, applied to a first node, the apparatus comprising:
an obtaining module, configured to obtain hop count information of a second node connected to the first node based on the determined access interface configuration of the first node; wherein the configuration of the access interface of the first node at least comprises: wired access configuration;
and the processing module is used for updating the hop count information of the first node based on the hop count information of the second node.
15. The apparatus of claim 14,
the obtaining module is configured to, if it is detected that a connection relationship of the first node in a network changes, obtain hop count information of the second node connected to the first node based on the determined access interface configuration of the first node.
16. The apparatus of claim 14 or 15,
and the processing module is configured to receive hop count information of the second node sent by the second node if it is determined that the first node access interface is configured as a wired access configuration.
17. The apparatus of claim 16,
the processing module is configured to determine whether the second node is a parent node of the first node based on hop count information of the second node;
the processing module is further configured to determine, if the second node is a parent node of the first node, the hop count of the first node based on the hop count indicated by the hop count information of the second node; or if the second node is not a parent node of the first node, maintaining the hop count indicated by the hop count information of the first node unchanged.
18. The apparatus of claim 17,
the processing module is configured to determine that the second node is a parent node of the first node if the hop count indicated by the hop count information of the second node is smaller than the hop count indicated by the hop count information of the first node, or the first node has no hop count information; or,
the processing module is configured to determine that the second node is not a parent node of the first node if the hop count indicated by the hop count information of the second node is greater than the hop count indicated by the hop count information of the first node.
19. The apparatus according to claim 14 or 15, characterized in that it comprises:
a first sending module, configured to send a request message to the second node connected to the first node if it is determined that the access interface of the first node is configured to be the wired access configuration;
and the processing module is used for receiving hop count information of the second node, which is returned by the second node based on the request message.
20. The apparatus of claim 19,
the processing module is configured to determine, if hop count information of one of the second nodes is received, the hop count of the first node based on the hop count indicated by the hop count information of the second node; or,
the processing module is configured to determine, if hop count information of a plurality of second nodes is received, the hop count of the first node based on the smallest hop count among the hop counts indicated by the hop count information of the plurality of second nodes.
21. The apparatus of claim 14 or 15,
the obtaining module is configured to scan a beacon signal sent by the second node if it is determined that the access interface of the first node is configured as the wireless access configuration;
the obtaining module is configured to determine hop count information of the second node based on hop count information carried in the beacon signal.
22. The apparatus of claim 21,
the processing module is configured to determine the hop count of the first node based on the hop count indicated by the hop count information of the second node.
23. The apparatus of claim 22, wherein the beacon signal comprises: a beacon frame; and the predetermined information field of the beacon frame carries hop count information of the second node.
24. An apparatus for updating node hop count in a network, applied to a second node, the apparatus comprising:
a determining module, configured to determine an access interface configuration of a first node connected to the second node;
a second sending module, configured to send hop count information of the second node to the first node based on the access interface configuration of the first node; the hop count information of the second node is used for the first node to update the hop count information of the first node; wherein the configuration of the access interface of the first node at least comprises: and (4) wired access configuration.
25. The apparatus of claim 24,
the second sending module is configured to send hop count information of the second node to the first node if the first node access interface is configured to be in a wired access configuration;
or,
the device still includes:
a second receiving module, configured to receive a request message sent by the second node if the first node access interface is configured to be in a wired access configuration;
and the second sending module is configured to send hop count information of the second node to the second node based on the request message.
26. The apparatus of claim 24 or 25,
the second sending module is configured to send, to the first node, a beacon signal carrying hop count information of the second node if the access interface of the first node is configured as a wireless access configuration.
27. A terminal, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to: when the executable instructions are executed, the method for updating the hop count of the node in the Mesh network according to any one of claims 1 to 10 or 11 to 13 is implemented.
28. A computer-readable storage medium, characterized in that the readable storage medium stores an executable program, wherein the executable program, when executed by a processor, implements the node hop count updating method in a Mesh network according to any one of claims 1 to 10, or 11 to 13.
CN202110475567.4A 2021-04-29 2021-04-29 Node hop count updating method, device, terminal and storage medium in Mesh network Active CN113163467B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110475567.4A CN113163467B (en) 2021-04-29 2021-04-29 Node hop count updating method, device, terminal and storage medium in Mesh network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110475567.4A CN113163467B (en) 2021-04-29 2021-04-29 Node hop count updating method, device, terminal and storage medium in Mesh network

Publications (2)

Publication Number Publication Date
CN113163467A CN113163467A (en) 2021-07-23
CN113163467B true CN113163467B (en) 2022-06-10

Family

ID=76872557

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110475567.4A Active CN113163467B (en) 2021-04-29 2021-04-29 Node hop count updating method, device, terminal and storage medium in Mesh network

Country Status (1)

Country Link
CN (1) CN113163467B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113873612B (en) * 2021-10-22 2024-03-01 北京小米移动软件有限公司 Method and device for accessing network and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103108374A (en) * 2013-01-29 2013-05-15 北京交通大学 Energy saving routing algorithm of composite structure mine emergency rescue wireless mesh network
CN105763443A (en) * 2016-04-28 2016-07-13 西安电子科技大学 HWMP-based double route cooperation method
CN108966281A (en) * 2018-07-20 2018-12-07 乐鑫信息科技(上海)有限公司 Mesh network processing method, device, equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9408249B2 (en) * 2013-12-03 2016-08-02 Cisco Technology, Inc. Wireless mesh network including resilient backhaul links and WLAN traffic local switching
US10637673B2 (en) * 2016-12-12 2020-04-28 Silicon Laboratories Inc. Energy harvesting nodes in a mesh network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103108374A (en) * 2013-01-29 2013-05-15 北京交通大学 Energy saving routing algorithm of composite structure mine emergency rescue wireless mesh network
CN105763443A (en) * 2016-04-28 2016-07-13 西安电子科技大学 HWMP-based double route cooperation method
CN108966281A (en) * 2018-07-20 2018-12-07 乐鑫信息科技(上海)有限公司 Mesh network processing method, device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
丁盼盼 等.混合无线三维片网中无线路由节点分布研究.《计算机科学与探索》.2019,全文. *

Also Published As

Publication number Publication date
CN113163467A (en) 2021-07-23

Similar Documents

Publication Publication Date Title
CN106358189B (en) Method and device for accessing wireless local area network
US11647425B2 (en) Methods and devices for reducing temperature for user equipment
CN109451816B (en) Transmission capability updating method and device
CN106454998B (en) Wireless local area network access method, device and terminal
CN106376057A (en) Wireless network access method and device
WO2021000228A1 (en) Information reporting method and apparatus, configuration method and apparatus, multi-sim terminal, and base station
CN110268746B (en) Cell switching method and device, switching configuration method and device and user equipment
CN109075856B (en) Flight path configuration method and device
CN115633343A (en) Tracking area updating method and device, communication equipment and storage medium
CN113395745B (en) Method, device, terminal and storage medium for accessing Mesh network
CN111246530B (en) Network switching method and device and storage medium
JP2023532565A (en) Cell determination method and cell determination device
CN113329474B (en) Method for accessing node to Mesh network, information interaction device, terminal and storage medium
CN113163467B (en) Node hop count updating method, device, terminal and storage medium in Mesh network
CN115443675A (en) Measurement interval processing method, device, communication equipment and storage medium
US12096352B2 (en) Cell selection method and apparatus, communication device, and storage medium
CN113115402B (en) Access method and device of access point, electronic equipment and storage medium
CN113342370B (en) Configuration updating method and device, electronic equipment and storage medium
CN115039510B (en) Capability sending method and device, capability receiving method and device
CN114339904B (en) Cell switching method, cell switching device and storage medium
CN114430370B (en) Method, device, equipment and storage medium for determining network slice
CN111064669B (en) Route storage method, device, equipment and storage medium
CN114080852A (en) Method and device for reporting capability information, communication equipment and storage medium
CN113395173A (en) Information interaction method, information interaction device, terminal and storage medium
CN115606251A (en) Network selection information transmission method and device, communication equipment and storage medium

Legal Events

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