Mesh network-based node discovery methods, apparatus, devices, and storage media

By actively sending broadcast frames from Mesh nodes and receiving response frames from target devices, the efficiency and probability of device discovery in Mesh networks are improved, solving the problem of low device discovery efficiency in existing technologies and enabling proactive discovery and control of Mesh networks.

CN117014993BActive Publication Date: 2026-11-17QINGDAO HAIER TECH +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210467493.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-29
Publication Date
2026-11-17
Estimated Expiration
2042-04-29

AI Technical Summary

Technical Problem

Mesh networks have low device discovery efficiency. In existing technologies, new devices need to actively scan the mesh network and are only discovered when they join, resulting in low efficiency and complexity.

Method used

Mesh nodes actively send broadcast frames to announce the existence of the network. The broadcast frame contains the network identifier. The target device returns a response frame carrying the device identifier. The Mesh node discovers the target device by parsing the response frame.

Benefits of technology

It improves the efficiency and probability of device discovery, reduces signal frame interaction, reduces communication interference between device discovery and the Mesh network and target devices, and enables active control and individual authentication of the Mesh network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117014993B_ABST
    Figure CN117014993B_ABST
Patent Text Reader

Abstract

This application belongs to the field of communication technology, specifically relating to a node discovery method, apparatus, device, and storage medium based on a mesh network. On the mesh node side of the mesh network, the method includes: sending a broadcast frame, which announces that the mesh node is located in the mesh network; the broadcast frame is a management frame containing custom fields, including a network identifier field carrying the network identifier of the mesh network; and receiving a response frame returned by a target device, which is a management frame containing custom fields, including a device identifier field carrying the device identifier of the target device. The target device is not connected to the mesh network where the mesh node is located. Thus, the mesh network proactively discovers new devices without increasing the number of scan frames, improving the efficiency of the mesh network in discovering new devices, and reducing interference of the discovery process on the mesh network and other services of the new device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of communication technology, specifically relating to a node discovery method, apparatus, device, and storage medium based on a Mesh network. Background Technology

[0002] Mesh networking is a wireless network technology. A mesh network consists of multiple device nodes, also known as mesh nodes (MNs). An MN can simultaneously function as a wireless access point (AP) and a router, receiving and forwarding signals. Compared to traditional network technologies, mesh networks offer advantages such as flexible structure and ease of deployment, making them promising for solving the problems of indoor wireless network organization and coverage.

[0003] Currently, before a new device joins the Mesh network as an MN, it actively scans for the Mesh network. After finding the Mesh network, it attempts to join it. The Mesh network only discovers the existence of the new device when it attempts to join.

[0004] In the above methods, device discovery efficiency in Mesh networks is relatively low. Summary of the Invention

[0005] To address the aforementioned problems in the prior art, namely the low device discovery efficiency of Mesh networks, this application provides a node discovery method, apparatus, device, and storage medium based on Mesh networks.

[0006] Firstly, this application provides a node discovery method based on a mesh network, applied to mesh nodes in a mesh network, the node discovery method based on a mesh network comprising:

[0007] A broadcast frame is sent to announce that the Mesh node is located in the Mesh network. The broadcast frame is a management frame containing custom fields, including a network identifier field, which carries the network identifier of the Mesh network.

[0008] Receive a response frame returned by the target device. The response frame is a management frame containing custom fields. The custom fields of the response frame include a device identifier field, which carries the device identifier of the target device. The target device is not connected to the Mesh network.

[0009] The target device is detected based on the device identifier of the target device in the response frame.

[0010] In one possible implementation, the custom fields of the broadcast frame further include a node capacity field, and before sending the broadcast frame, the following is also included:

[0011] Determine the number of devices currently allowed to access the Mesh node;

[0012] If the number of devices exceeds the quantity threshold, the number of devices is written into the node capacity field, and the network identifier of the Mesh network is written into the network identifier field.

[0013] In one possible implementation, the custom fields of the broadcast frame further include a frame type field, a function field, and an encryption method field. Before sending the broadcast frame, the following steps are also included:

[0014] Determine the algorithm identifier of the target encryption algorithm;

[0015] In the broadcast frame, the node announcement frame type is written into the frame type field, the Mesh function is written into the function field, and the algorithm identifier of the target encryption algorithm is written into the encryption method field.

[0016] In one possible implementation, discovering the target device based on the device identifier of the target device in the response frame includes:

[0017] Based on the response frame, the device identifier of the target device is obtained;

[0018] The device identifier of the target device is reported to the target node in the Mesh network. The target node is used to manage the logical routing relationship in the Mesh network.

[0019] In one possible implementation, the custom fields of the response frame further include a frame type field, a function field, and an encryption method field. Obtaining the device identifier of the target device based on the response frame includes:

[0020] Based on the response frame type carried in the frame type field of the response frame and the Mesh function carried in the function field of the response frame, the target device is determined to be a device that has not joined the Mesh.

[0021] Based on the encryption algorithm identifier carried in the encryption method field of the response frame, the response frame is parsed by the frame parsing module corresponding to the Mesh function to obtain the device identifier of the target device.

[0022] In one possible implementation, reporting the device identifier of the target device to the target node in the Mesh network includes:

[0023] If the custom fields of the response frame do not include an integrity check code field, or if the custom fields of the response frame include an integrity check code field and the integrity check code field is empty, then the target device is determined to be a new device that has not been connected to the Mesh network before.

[0024] In response to the fact that the target device is a new device that has not been connected to the Mesh network, the device identifier of the target device is reported to the target node.

[0025] In one possible implementation, the custom field of the response frame further includes a random number field, and after discovering the target device based on the device identifier of the target device in the response frame, the method further includes:

[0026] A random number is obtained from the random number segment of the response frame;

[0027] Based on the random number, the target device is invited to join the Mesh network.

[0028] Secondly, this application provides a node discovery method based on a mesh network, applied to a target device that is not connected to a mesh network. The node discovery method based on a mesh network includes:

[0029] Receive broadcast frames from Mesh nodes in the Mesh network. The broadcast frames are used to announce that the Mesh nodes are located in the Mesh network. The broadcast frames are management frames containing custom fields, including a network identifier field, which carries the network identifier of the Mesh network.

[0030] In response to the broadcast frame, a response frame is sent to the Mesh node. The response frame is a management frame containing custom fields, including a device identifier field that carries the device identifier of the target device.

[0031] In one possible implementation, the custom fields of the broadcast frame further include a node capacity field, and the response to the broadcast frame, sending a response frame to the Mesh node, includes:

[0032] The number of devices currently allowed to connect to the Mesh node can be obtained from the node capacity field.

[0033] The network identifier of the Mesh network is obtained from the network identifier field;

[0034] If the number of devices currently allowed to access the Mesh node is greater than the threshold, then the response frame is sent to the Mesh node.

[0035] In one possible implementation, there are multiple Mesh nodes. If the number of devices currently allowed to connect to a Mesh node is greater than a threshold, then sending the response frame to the Mesh node includes:

[0036] If the number of devices currently allowed to access the Mesh node is greater than the number threshold, then the score corresponding to the Mesh node is determined based on the broadcast frame;

[0037] Send the response frame to the Mesh node with the highest score among the Mesh nodes.

[0038] In one possible implementation, if the number of devices currently allowed to access the Mesh node is greater than a threshold, then determining the score corresponding to the Mesh node based on the broadcast frame includes:

[0039] If the number of devices currently allowed to access the Mesh node is greater than the number threshold, the score corresponding to the Mesh node is determined based on the Received Signal Strength Indication (RSSI) of the broadcast frame and / or the number of devices currently allowed to access the Mesh node.

[0040] In one possible implementation, the custom fields of the broadcast frame further include a frame type field, a function field, and an encryption method field. The step of sending a response frame to the Mesh node in response to the broadcast frame includes:

[0041] Based on the node announcement frame type carried in the frame type field of the broadcast frame and the Mesh function carried in the function field of the broadcast frame, it is determined that the Mesh node is located in the Mesh network;

[0042] Based on the algorithm identifier of the encryption algorithm carried in the encryption method field of the broadcast frame, the broadcast frame is parsed by the frame parsing module corresponding to the Mesh function to obtain the parsing result, which includes the network identifier of the Mesh network.

[0043] Based on the parsing results, the response frame is sent to the Mesh node.

[0044] In one possible implementation, the custom fields of the response frame further include a frame type field, a function field, and an encryption method field, and the node discovery method based on the Mesh network further includes:

[0045] Before sending the response frame to the Mesh node, determine the algorithm identifier of the target encryption algorithm;

[0046] In the response frame, the response frame type is written to the frame type field, the Mesh function is written to the function field, and the algorithm identifier of the target encryption algorithm is written to the encryption method field.

[0047] In one possible implementation, the custom fields of the response frame further include a random number field and / or an integrity check field, and the Mesh network-based node discovery method further includes:

[0048] Before sending the response frame to the Mesh node, at least one of the following operations is performed in the response frame: generating a random number and writing the random number into a random number field, and / or, if it is determined from the network identifier of the Mesh network that the target device has been connected to the Mesh network, generating an integrity check code and writing the integrity check code into an integrity check field.

[0049] Thirdly, this application provides a node discovery device based on a mesh network, applied to mesh nodes in a mesh network, the node discovery device based on a mesh network comprising:

[0050] A sending unit is used to send a broadcast frame, which is used to announce that the Mesh node is located in the Mesh network. The broadcast frame is a management frame containing custom fields, including a network identifier field, which carries the network identifier of the Mesh network.

[0051] A receiving unit is configured to receive a response frame returned by a target device. The response frame is a management frame containing custom fields. The custom fields of the response frame include a device identifier field, which carries the device identifier of the target device. The target device is not connected to the Mesh network.

[0052] The discovery unit is used to discover the target device based on the device identifier of the target device in the response frame.

[0053] Fourthly, this application provides a node discovery device based on a mesh network, applied to a target device that is not connected to a mesh network. The node discovery device based on a mesh network includes:

[0054] A receiving unit is configured to receive broadcast frames from Mesh nodes in the Mesh network. The broadcast frames are used to announce that the Mesh nodes are located in the Mesh network. The broadcast frames are management frames containing custom fields, including a network identifier field, which carries the network identifier of the Mesh network.

[0055] The sending unit is configured to send a response frame to the Mesh node in response to the broadcast frame. The response frame is a management frame containing custom fields, including a device identifier field that carries the device identifier of the target device.

[0056] Fifthly, this application provides an electronic device, comprising:

[0057] Processor and memory;

[0058] The memory stores computer programs;

[0059] When the processor executes the computer program stored in the memory, it implements the node discovery method based on a mesh network provided by the first aspect or any possible implementation of the first aspect, or implements the node discovery method based on a mesh network provided by the second aspect or any possible implementation of the second aspect.

[0060] In a sixth aspect, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the node discovery method based on a mesh network provided by the first aspect or any possible implementation thereof, or to implement the node discovery method based on a mesh network provided by the second aspect or any possible implementation thereof.

[0061] Seventhly, this application provides a chip, comprising:

[0062] Processor and memory;

[0063] The memory stores computer programs;

[0064] When the processor executes the computer program stored in the memory, it implements the node discovery method based on a mesh network provided by the first aspect or any possible implementation of the first aspect, or implements the node discovery method based on a mesh network provided by the second aspect or any possible implementation of the second aspect.

[0065] Sixthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the node discovery method based on a mesh network provided by the first aspect or any possible implementation of the first aspect, or implements the node discovery method based on a mesh network provided by the second aspect or any possible implementation of the second aspect.

[0066] Those skilled in the art will understand that, in this application, Mesh nodes in a Mesh network announce their presence in the Mesh network by sending broadcast frames. These broadcast frames are management frames containing custom fields, including a network identifier field that carries the network identifier of the Mesh network. Upon receiving the broadcast frame, a target device not connected to the Mesh network can return a response frame. This response frame is a management frame containing custom fields, including a device identifier field that carries the device identifier of the target device. Upon receiving the response frame, the Mesh node can discover the target device based on it.

[0067] It is evident that this enables a mesh network to proactively discover devices not connected to it. Since a mesh network contains numerous mesh nodes, proactively discovering devices by having these nodes send broadcast frames effectively improves the efficiency and probability of device discovery. Furthermore, the number of communication frames between the mesh network and the target device during the discovery process is relatively small, eliminating the need for the target device to continuously send scan frames to scan the mesh network, thus reducing interference from device discovery on the communication services of both the mesh network and the target device. Attached Figure Description

[0068] The preferred embodiments of the node discovery method, apparatus, device, and storage medium based on a mesh network according to this application are described below with reference to the accompanying drawings. The drawings are as follows:

[0069] Figure 1 This is an example diagram of the Mesh network architecture provided in the embodiments of this application;

[0070] Figure 2 Example diagrams of application scenarios provided in the embodiments of this application;

[0071] Figure 3 A flowchart illustrating the node discovery method based on a mesh network provided in this application embodiment. Figure 1 ;

[0072] Figure 4 A schematic diagram of the frame structure of a broadcast frame provided in an embodiment of this application;

[0073] Figure 5 A flowchart illustrating the node discovery method based on a mesh network provided in this application embodiment. Figure 2 ;

[0074] Figure 6 A flowchart illustrating the node discovery method based on a mesh network provided in this application embodiment. Figure 3 ;

[0075] Figure 7This is a schematic diagram of the frame structure of the response frame provided in an embodiment of this application;

[0076] Figure 8 A flowchart illustrating the node discovery method based on a mesh network provided in this application embodiment. Figure 4 ;

[0077] Figure 9 A schematic diagram of the structure of the node discovery device based on a mesh network provided in the embodiments of this application. Figure 1 ;

[0078] Figure 10 A schematic diagram of the structure of the node discovery device based on a mesh network provided in the embodiments of this application. Figure 2 ;

[0079] Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0080] First, those skilled in the art should understand that these embodiments are merely for explaining the technical principles of this application and are not intended to limit the scope of protection of this application. Those skilled in the art can make adjustments as needed to adapt to specific application scenarios.

[0081] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to limit the invention. The singular forms "a" and "the" as used in the embodiments of this application are also intended to include the plural forms unless the context clearly indicates otherwise.

[0082] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can be represented as: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0083] Depending on the context, the words “if” or “suppose” as used here can be interpreted as “when” or “in response to determination” or “in response to detection.” Similarly, depending on the context, the phrases “if determination” or “if detection (of the stated condition or event)” can be interpreted as “when determination” or “in response to determination” or “when detection (of the stated condition or event)” or “in response to detection (of the stated condition or event).”

[0084] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a product or system comprising a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a product or system. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the product or system that includes said element.

[0085] Currently, mesh networks are being introduced into home environments to address the high barrier to entry for users and insufficient coverage issues associated with self-organizing indoor wireless networks. Mesh networks, also known as multi-hop networks, enable multi-hop communication between devices.

[0086] Below is a brief explanation of the terminology used in Mesh networks:

[0087] Mesh Node (MN): A device connected to a mesh network that can both receive and forward messages.

[0088] Mesh root node (MRN): A mesh node directly connected to the router. In subsequent embodiments, the mesh root node will be simply referred to as the root node.

[0089] Mesh gate node (MNGN): A device that manages the logical routing relationships among all root nodes. In subsequent embodiments, the Mesh gate node will be simply referred to as a gate node. Typically, a gate node is also a root node and can be elected as a gate node from among multiple root nodes.

[0090] Mesh Forward Node (MFN): A mesh node that connects to other mesh nodes. The parent node of a mesh forward node can be the root node or another mesh forward node. In subsequent embodiments, the mesh forward node will be referred to simply as a forward node.

[0091] Mesh Leaf Node (MLN): A mesh node that has a parent node but no child nodes. In subsequent embodiments, the mesh leaf node will be simply referred to as a leaf node.

[0092] Mesh nodes consist of root nodes, intermediate nodes, and leaf nodes.

[0093] refer to Figure 1 , Figure 1 This is an example diagram of a Mesh network architecture provided in an embodiment of this application. Figure 1As shown, a mesh network includes routers, visual terminals, and multiple nodes, including root nodes, intermediate nodes, and leaf nodes. Among these, in... Figure 1 In the diagram, ROOT1 and ROOT2 are the root nodes, A, B, D, E, F, and G are the leaf nodes, and C is the intermediate node.

[0094] like Figure 1 As shown, the communication links (logical communication links, not actual communication links) in a mesh network are as follows: Routers connect to the WAN via WAN links and connect to the visual terminal and root node via Transmission Control Protocol (TCP) links; intermediate nodes and leaf nodes communicate through mesh connections. The visual terminal acts as a gate node, allowing users to view the logical routing relationships of the root node in the mesh network.

[0095] In a mesh network, devices not connected to the mesh network scan the mesh network and request to join it upon discovery. Only then does the mesh network become aware of the unconnected devices, thus discovering a new node. This discovery process has the following drawbacks: 1) Generally, only devices with visual capabilities (e.g., displays) can discover and join scanned mesh networks; 2) Mesh networks have difficulty actively controlling which devices can join; 3) Mesh networks cannot discover and individually authenticate devices not connected to the mesh network through node authentication. Furthermore, during the discovery process, unconnected devices need to continuously send scan frames and interact with the mesh network through numerous signal frames, resulting in a complex, inefficient, and interference-prone process.

[0096] To address the aforementioned issues, this application provides a node discovery method based on a mesh network. In this method, mesh nodes actively send broadcast frames to announce their presence within the mesh network. Upon receiving the broadcast frame, a target device can return a response frame, enabling the receiving mesh node to discover the target device. The target device is connected to the mesh network. The broadcast frame carries the network identifier of the mesh network, and the response frame carries the device identifier of the target device.

[0097] Therefore, this application embodiment realizes the proactive discovery of devices not connected to the Mesh network by the Mesh network. Compared with the device scanning discovery of the Mesh network, the proactive discovery of devices by the Mesh network has the following advantages: (1) There are more Mesh nodes, which makes it easier for the target device to receive broadcast frames from the Mesh nodes, thus improving the efficiency and probability of device discovery; (2) The device discovery process is simplified, thus improving the efficiency of device discovery; (3) The number of signal frames used in the discovery process is smaller, so there is no need for devices not connected to the Mesh network to continuously send scanning frames, thus reducing the interference of signal frames in the device discovery process on the Mesh network and the communication services of devices not joined to the Mesh network; (4) The Mesh network proactively discovers devices not joined to the Mesh network, so the Mesh network can actively control which devices can join the Mesh network and can individually authenticate new nodes to join the Mesh network.

[0098] Figure 2 The diagram illustrates application scenarios provided in the embodiments of this application. For example... Figure 2 As shown, the application scenarios include Mesh network 210 and devices 220 that are not connected to Mesh network 210. Figure 2 (Taking two devices 220 as an example). Mesh network 210 includes multiple mesh nodes: A~G, R1, and R2. In mesh network 210, some or all mesh nodes can send broadcast frames to announce the existence of the mesh network. After receiving the broadcast frame, device 220 can return a response frame. In this way, mesh network 210 can discover device 220 based on the response frame of device 220, realizing the proactive discovery of new nodes by the mesh network.

[0099] Among them, device 220 can be a router, user terminal, home appliance, etc.

[0100] The structure of the Mesh network 210 can be referred to Figure 1 The description will not be repeated here.

[0101] Figure 3 A flowchart illustrating the node discovery method based on a mesh network provided in this application embodiment. Figure 1 .like Figure 3 As shown, the method includes:

[0102] S301. Mesh nodes send broadcast frames. Broadcast frames are used to announce that the Mesh node is located in the Mesh network. Broadcast frames are management frames containing custom fields, including a network identifier field, which carries the network identifier of the Mesh network.

[0103] Broadcast frames are used to announce that a Mesh node is located within a Mesh network, thus announcing the existence of the Mesh network. Devices receiving the broadcast frame are aware of its presence. Broadcast frames are management frames containing custom fields. Among these custom fields, the network identifier field carries the network identifier of the Mesh network, allowing receiving devices to obtain this identifier and determine which Mesh network exists nearby.

[0104] In a mesh network, a mesh node can be a root node, intermediate node, or leaf node. Since a gate node is also a root node, a mesh node can also be a gate node. Therefore, broadcast frames can be sent from various types of mesh nodes to improve the probability and success rate of device discovery. Furthermore, the idle status of mesh nodes can be used to send broadcast frames, reducing the impact of device discovery on other services within the mesh network.

[0105] In this embodiment, Mesh nodes in the Mesh network send (i.e., broadcast) broadcast frames wirelessly (e.g., via WiFi) to announce the Mesh network to devices not connected to the Mesh network, thereby discovering devices not connected to the Mesh network.

[0106] Optionally, Mesh nodes can periodically send broadcast frames to promptly discover devices not connected to the Mesh network, improving the efficiency and probability of device discovery.

[0107] S302. In response to the broadcast frame from the Mesh node, the target device sends a response frame to the Mesh node. The response frame is a management frame containing custom fields, including a device identifier field, which carries the device identifier of the target device.

[0108] Among these, devices that are not connected to the Mesh network where the Mesh node resides fall into two categories: the target device has never connected to the Mesh network, or the target device has previously connected to the Mesh network but is not currently connected. Connecting to a Mesh network can also be understood as joining the Mesh network and becoming a Mesh node within it.

[0109] In this embodiment, when the target device is within the broadcast range of a broadcast frame of the Mesh network, the target device can receive broadcast frames from the Mesh. After receiving the broadcast frame, the target device can parse it to learn about the existence of the Mesh network and Mesh nodes. It can also further obtain the network identifier of the Mesh network from the network identifier field of the broadcast frame. If the target device decides to join the Mesh network, it can write its own device identifier into the device identifier field of the response frame and return a response frame to the Mesh node, thus informing the Mesh node of the target device's device identifier.

[0110] Optionally, after obtaining the network identifier of the Mesh network, the target device can save the network identifier of the Mesh network, so that the target device can know which Mesh network it is based on the network identifier of the Mesh network.

[0111] Alternatively, after obtaining the network identifier of the Mesh network, the target device can output the network identifier of the Mesh network to prompt the user on the target device side to confirm whether the target device has joined the Mesh network. Then, in response to the user's message confirming that the target device has joined the Mesh network, the target device can send a response frame to the Mesh node, so that the Mesh network can discover the device that has confirmed joining the Mesh network.

[0112] As an example, when the target device is a visual terminal, the network identifier of the Mesh network obtained by the target device from the network identifier field of the broadcast frame can be displayed on the target device's display screen. After seeing the network identifier of the Mesh network, the user can confirm that the target device has joined the Mesh network through interactive operations such as clicking and selecting.

[0113] As an example, the network identifier of a Mesh network includes the name of the Mesh network. Based on the name of the Mesh network, both the target device and the user at the target device can distinguish between different Mesh networks.

[0114] S303: Mesh nodes discover the target device based on the device identifier of the target device in the response frame.

[0115] In this embodiment, the Mesh node parses the response frame from the target device and obtains the device identifier of the target device from the device identifier field of the response frame, thereby discovering the target device.

[0116] Optionally, the device identifier of the target device is the device identification serial number (also known as the device identification code) of the target device. The device identification serial number of the target device can uniquely identify the target device and improve the accuracy of Mesh nodes in discovering target devices.

[0117] In this embodiment, mesh nodes in the mesh network send broadcast frames to announce their presence within the mesh network. Target devices receiving these broadcast frames return response frames to the mesh nodes, enabling the mesh nodes to discover the target devices based on these response frames. This achieves proactive discovery of devices not connected to the mesh network within the mesh network, using fewer signal frames, thus improving the efficiency and probability of new node discovery within the mesh network and reducing interference caused by device discovery.

[0118] In the foregoing embodiments, using management frames (one of the WIFI frame formats, which also include data frames, control frames, etc.) for broadcast and response frames has the following advantages:

[0119] (1) Management frames have penetrability, meaning that the probability of them being successfully received by the receiver is relatively high;

[0120] (2) The management frame has strong scalability. Custom fields can be designed in the management frame to achieve more functions and better meet actual needs. It has strong adaptability and does not need to distinguish whether the management frame comes from AP or site (STA, which refers to the client connected to the wireless network). It can be applied to different third-party products.

[0121] It is evident that using management frames for broadcast and response frames can further improve the efficiency and probability of device discovery, and also make the node discovery method based on mesh networks applicable to a variety of devices, especially devices from different manufacturers, thereby increasing the diversity of devices that mesh networks can actively discover.

[0122] Optionally, broadcast and response frames may further utilize Action frames from management frames. Using Action frames, compared to other management frames, offers the following advantages:

[0123] (1) Action frames have better compatibility. When management frames are sent from the application layer to the link layer, the link layer can leave the data carried by the management frames unencrypted, ensuring that devices connected to the route, APs, or other devices can send and receive management frames normally.

[0124] (2) The fields that carry data in the Action frame account for a relatively high proportion in the frame structure, that is, the data (payload) that can be carried is longer and can carry more useful information.

[0125] (3) Action frames have less interference with the wireless communication environment and do not affect the normal processing of other services, ensuring normal communication of the terminal.

[0126] As can be seen, the use of Action frames for broadcast and signal frames ensures the normal transmission and reception of broadcast and signal frames. Furthermore, broadcast and signal frames can carry more information, improving the efficiency and probability of device discovery. They can also reduce the interference of the device discovery process on the wireless communication environment, without affecting other services of the Mesh network or other services of the target device.

[0127] In some embodiments, after a Mesh node discovers a target device, it can obtain the device identifier of the target device based on the response frame and report the device identifier of the target device to the target node in the Mesh network. The target node is used to manage the logical routing relationships in the Mesh network.

[0128] In this embodiment, after a Mesh node discovers a target device, it sends the device identifier of the target device to the target node in the Mesh network. This allows the target node to manage the device identifiers of the devices discovered by the Mesh node in a unified manner, thereby improving the device information management effect of the Mesh network.

[0129] Optionally, when the target node is a visual terminal, after the Mesh node reports the target device's device identifier to the target node in the Mesh network, the target node displays the target device's device identifier. At this time, the user can view the target device's device information on the target node and understand which device the Mesh network has discovered. Optionally, the user can also determine on the target node whether to invite the target device to join the Mesh network. In response to the user's request for the target device to join the Mesh network, the target node sends corresponding instructions to the Mesh node that reported the target device's device information, instructing that Mesh node to perform the corresponding network access operation with the target device.

[0130] Optionally, if the target node is not a visual terminal, it can connect directly to the user terminal. After the Mesh node reports the target device's device identifier to the target node in the Mesh network, the target node can send the target device's device identifier to the user terminal. This allows the user to view the target device's device identifier on their terminal and also to determine whether to invite the target device to join the Mesh network.

[0131] Therefore, by reporting the device identifier of the target device to the target node, users can easily view the device identifier of the devices discovered by the Mesh network, and can also determine whether to invite the devices discovered by the Mesh network to join the Mesh network, effectively improving the user experience.

[0132] The following sections provide several embodiments of a node discovery method based on a Mesh network, using frame structures as an example.

[0133] (a) Several implementation methods are provided in conjunction with the frame structure of broadcast frames.

[0134] In some embodiments, such as Figure 4 As shown (where, Figure 4 (This is a schematic diagram of the frame structure of a broadcast frame provided in an embodiment of this application). In addition to the network identifier field, the custom fields of the broadcast frame also include a node capacity field. The node capacity field of the broadcast frame carries the number of devices that the Mesh node sending the broadcast frame is currently allowed to access. The number of devices that the Mesh node is currently allowed to access refers to the number of child nodes that the Mesh node can still access, that is, the number of Mesh nodes that the Mesh node can still attach to, reflecting the remaining capacity of the Mesh node. Specifically, the number of devices that the Mesh node is currently allowed to access is decremented by one each time a child node is accessed.

[0135] Custom fields based on broadcast frames include a network identifier field and a node capacity field. Figure 5 A flowchart illustrating the node discovery method based on a mesh network provided in this application embodiment. Figure 2 .like Figure 5 As shown, the method includes:

[0136] S501, Mesh node determines the number of devices that are currently allowed to access the Mesh node.

[0137] S502. If the number of devices exceeds the quantity threshold, the Mesh node writes the number of devices into the node capacity field of the broadcast frame and writes the network identifier of the Mesh network into the network identifier field of the broadcast frame.

[0138] In this embodiment, before sending a broadcast frame, a Mesh node needs to determine the number of devices it is currently allowed to access. This number determines whether the Mesh node can discover and access new nodes. If the number of devices the Mesh node is currently allowed to access is greater than a threshold, then the Mesh node can still discover and access new nodes. In this case, the number of devices the Mesh node is currently allowed to access can be written into the node capacity field of the broadcast frame, and the network identifier of the Mesh network can be written into the network identifier field of the broadcast frame, thus generating the broadcast frame. If the number of devices the Mesh node is currently allowed to access is less than or equal to the threshold, then the Mesh node cannot access new nodes, and therefore the Mesh node does not send a broadcast frame.

[0139] Therefore, based on the number of devices that the Mesh node is currently allowed to access, it determines whether the Mesh node should send a broadcast frame. This avoids the situation where the Mesh node cannot access a new node but still sends a broadcast frame. In turn, it avoids the situation where the target node cannot access the Mesh network after returning a response frame due to the Mesh node's inability to access a new node. This ensures that the device can access the Mesh network after it is discovered.

[0140] S503, Mesh nodes send broadcast frames.

[0141] In this embodiment, after determining that the number of devices it currently allows to access is greater than the threshold, the Mesh node sends a broadcast frame to announce the existence of the Mesh network and that the Mesh node is located in the Mesh network, so that devices not connected to the Mesh network can discover the Mesh node.

[0142] Optionally, if a Mesh node determines that the number of devices it is currently allowed to access is greater than a threshold, it may periodically broadcast a broadcast frame to promptly detect devices that are not connected to the Mesh network.

[0143] S504. In response to a broadcast frame from the Mesh network, the target device obtains the number of devices currently allowed to access the Mesh node from the node capacity field of the broadcast frame, and obtains the network identifier of the Mesh network from the network identifier field.

[0144] In this embodiment, after the target device receives the broadcast frame sent by the Mesh network, it parses the broadcast frame, obtains the number of devices that the Mesh node is currently allowed to access from the node capacity field of the broadcast frame, and obtains the network identifier of the Mesh network from the network identifier field of the broadcast frame.

[0145] S505. If the number of devices currently allowed to access the Mesh node is greater than the threshold, the target device sends a response frame to the Mesh node.

[0146] In this embodiment, the number of devices currently allowed to access a Mesh node reflects the Mesh node's child node access capability; the more devices, the stronger the Mesh node's child node access capability. Therefore, after receiving a broadcast frame from a Mesh node, the target device can determine whether to respond to the broadcast frame, i.e., whether to access the Mesh network through the Mesh node, based on the number of devices currently allowed to access the Mesh node. If the target device determines to access the Mesh network through this Mesh node, it can send a response frame to the sending Mesh node.

[0147] In one approach, if the number of devices currently allowed to access the Mesh node exceeds a certain threshold, the target device returns a response frame to the Mesh node; otherwise, the target device does not return a response frame. Thus, based on the number of devices currently allowed to access the Mesh node and the threshold, the access capability of the Mesh node's child nodes is measured, ensuring that the target device can still access the Mesh node after responding to it.

[0148] In another approach, the target device can receive broadcast frames from multiple mesh nodes. If the number of devices currently allowed to access a mesh node exceeds a threshold, the target device determines the score of each mesh node based on the broadcast frames and sends a response frame to the mesh node with the highest score. Thus, the target device selects the optimal mesh node from among the multiple mesh nodes, ensuring that subsequent nodes discovering the device can access the mesh network through this optimal mesh node, thereby improving the success rate and communication quality of subsequent target devices accessing the mesh network through the mesh node.

[0149] Multiple Mesh nodes can be located in the same or different Mesh networks.

[0150] In this method, after receiving broadcast frames from multiple mesh nodes, the target device can score each mesh node based on its broadcast frame. This yields scores for each mesh node. The mesh node with the highest score is then selected, and a response frame is sent to that node.

[0151] The optional methods for the target device to receive broadcast frames sent by multiple Mesh nodes include:

[0152] Optionally, after receiving a broadcast frame from a Mesh node, the target device waits for a preset time, during which it can receive broadcast frames from other Mesh nodes. In this way, the target device receives broadcast frames from multiple Mesh nodes.

[0153] Alternatively, after receiving a broadcast frame from one Mesh node, the target device may receive broadcast frames from other Mesh nodes before that broadcast frame times out. In this way, the target device receives broadcast frames from multiple Mesh nodes.

[0154] The possible methods for scoring Mesh nodes include:

[0155] Optionally, if the number of devices currently allowed to access a Mesh node exceeds a threshold, the score for the Mesh node is determined based on the Received Signal Strength Indication (RSSI) of the broadcast frame and / or the number of devices currently allowed to access the Mesh node in the broadcast frame. Thus, based on the RSSI of the broadcast frame, or based on the number of devices currently allowed to access the Mesh node that sent the broadcast frame, or a combination of both, the accuracy of the Mesh node scoring is improved, allowing the selection of the Mesh node with the best communication quality for the target device among multiple Mesh nodes that send broadcast frames.

[0156] In this optional approach, the RSSI of the broadcast frame reflects the signal quality of the Mesh node. The higher the RSSI of the broadcast frame, the higher the score of the Mesh node that sent the broadcast frame. The number of devices currently allowed to access the Mesh node reflects the Mesh node's child node access capability; the more devices, the stronger the child node access capability. Therefore, scoring the Mesh node based on the RSSI of the broadcast frame and / or the number of devices currently allowed to access the Mesh node that sent the broadcast frame can improve the accuracy of Mesh node scoring. In other words, the Mesh node score can accurately reflect the quality of the Mesh node, allowing the selection of the best Mesh node for the target device among multiple Mesh nodes.

[0157] For example, the RSSI of the broadcast frame can be weighted and summed with the number of devices currently allowed to access the Mesh node that sent the broadcast frame to obtain a score. No specific rules are set for the scoring.

[0158] Optionally, the quantity threshold is zero. If the number of devices a Mesh node currently allows to connect is greater than zero, it writes the number of devices it currently allows to connect to into the node capacity field of the broadcast frame, writes the network identifier of the Mesh network into the network identifier field of the broadcast frame, generates a broadcast frame, and sends the broadcast frame, i.e., broadcasts the broadcast frame. Otherwise, the Mesh node does not need to broadcast externally.

[0159] S506 and Mesh nodes discover the target device based on the response frame.

[0160] In this embodiment, mesh nodes in the mesh network, while still able to connect to devices, announce the existence of the mesh network by sending broadcast frames. The target device determines whether to respond to the broadcast frame based on the number of devices carried in the node capacity field. If it decides to respond, it returns a response frame to the mesh node. The mesh node discovers the target device based on the target device's response frame.

[0161] In this embodiment, a mesh node generates and sends a broadcast frame containing a node capacity field based on the number of devices it currently allows to access. The target device determines whether to respond to the broadcast frame based on the content carried in the node capacity field. If it decides to respond, it returns a response frame to the mesh node. The mesh node, based on the response frame returned by the target device in response to the broadcast frame, enables the mesh network to proactively discover devices not currently connected to the mesh network, improving the efficiency and success rate of new node discovery within the mesh network. Furthermore, the node capacity field in the broadcast frame increases the success rate of new nodes accessing the mesh network through the mesh node after discovery.

[0162] In some embodiments, such as Figure 4 As shown, in addition to the network identifier field, the custom fields of the broadcast frame also include the frame type field, the function field, and the encryption method field.

[0163] In the broadcast frame, the frame type field carries the node announcement frame type, indicating that the broadcast frame is a node announcement frame. The target device receiving the broadcast frame can know that the broadcast frame is used to announce that the Mesh node is located in the Mesh network based on the frame type being a node announcement frame. The function field carries the Mesh function, indicating that the broadcast frame belongs to the Mesh function, and the frame parsing module corresponding to the Mesh function can be used to parse the broadcast frame. The encryption method field carries the algorithm identifier of the encryption algorithm, which is used to encrypt the data in the broadcast frame. The target algorithm receiving the broadcast frame can know the encryption algorithm used by the broadcast frame based on the algorithm identifier, and then use the corresponding decryption algorithm to decrypt the data in the broadcast frame to obtain the data, such as obtaining the network identifier carried in the network identifier field of the broadcast frame.

[0164] The encryption method field can also carry the algorithm identifier of the verification algorithm and / or the algorithm identifier of the derived algorithm (the algorithm derived from the encryption algorithm or the verification algorithm) to realize the verification of the broadcast frame.

[0165] The algorithm identifier may include the algorithm version number.

[0166] When the custom fields of the broadcast frame also include a frame type field, a function field, and an encryption method field, Figure 6 A flowchart illustrating the node discovery method based on a mesh network provided in this application embodiment. Figure 3 .like Figure 6 As shown, the method includes:

[0167] S601, Mesh nodes determine the algorithm identifier of the target encryption algorithm.

[0168] In this embodiment, the algorithm identifier of the target encryption algorithm can be manually predetermined, and the Mesh node can directly obtain the algorithm identifier of the target encryption algorithm; alternatively, the Mesh node can determine the algorithm identifier of the target encryption algorithm from among multiple candidate encryption algorithm identifiers. Thus, by including a custom field—the encryption method field—in the frame structure of the broadcast frame, the flexibility of the encryption method of the broadcast frame is improved, allowing the corresponding encryption algorithm to be set according to the actual situation, thereby improving the encryption effect.

[0169] S602. In the broadcast frame, the Mesh node writes the node announcement frame type into the frame type field, the Mesh function into the function field, the algorithm identifier of the target encryption algorithm into the encryption method field, and the network identifier of the Mesh network into the network identifier field.

[0170] In this embodiment, since the custom fields of the broadcast frame include a frame type field, a function field, an encryption method field, and a network identifier field, the Mesh node needs to write the corresponding content into these fields before sending the broadcast frame. Therefore, the Mesh node can write the node declaration frame type into the frame type field, the Mesh function into the function field, the algorithm identifier of the target encryption algorithm into the encryption method field, and the network identifier of the Mesh network into the network identifier field in the broadcast frame.

[0171] Optionally, if the custom fields of the broadcast frame also include a node capacity field, the Mesh node also needs to write the number of devices it currently allows to access into the node capacity field.

[0172] S603, Mesh nodes send broadcast frames.

[0173] In this embodiment, after writing the corresponding content into each field of the broadcast frame, the Mesh node obtains the complete broadcast frame and then sends the broadcast frame outward.

[0174] S604. The target device responds to a broadcast frame from a Mesh node and determines that the Mesh node is located in the Mesh network based on the node announcement frame type carried in the frame type field of the broadcast frame and the Mesh function carried in the function field of the broadcast frame.

[0175] In this embodiment, after receiving a broadcast frame from a Mesh node, the target device can obtain the content carried by the frame type field and the function field of the broadcast frame. If the content carried by the frame type field of the broadcast frame includes a node announcement frame type, it indicates that the broadcast frame is used to announce that the Mesh node is located in the Mesh network. If the content carried by the function field of the broadcast frame includes a Mesh function, it indicates that the broadcast frame needs to be parsed using the frame parsing module corresponding to the Mesh function. The frame parsing module is a functional module implemented by developers through code. Different functional modules need to be developed for frames with different functions. Frames related to the Mesh network can all be classified as frames under the Mesh function.

[0176] S605. The target device parses the broadcast frame using the frame parsing module corresponding to the Mesh function, based on the algorithm identifier of the encryption algorithm carried in the encryption method field of the broadcast frame, and obtains the parsing result, which includes the network identifier of the Mesh network.

[0177] In this embodiment, the target device can obtain the algorithm identifier of the target encryption algorithm from the encryption method field of the broadcast frame. Based on the algorithm identifier, it calls the target decryption algorithm corresponding to the target encryption algorithm, and uses the frame parsing module corresponding to the Mesh function to parse the broadcast frame and obtain the parsing result. During the parsing process, the network identifier of the Mesh network can be parsed from the network identifier field of the broadcast frame.

[0178] Optionally, if the custom fields of the broadcast frame also include a node capacity field, the target device can also parse the number of devices that the Mesh node is currently allowed to access from the node capacity field of the broadcast frame. That is, the parsing result also includes the number of devices that the Mesh node is currently allowed to access.

[0179] S606. The target device sends a response frame to the Mesh node based on the parsing result.

[0180] S607: Mesh nodes discover the target device based on the device identifier of the target device in the response frame.

[0181] The implementation principle and technical effects of S606 can be referred to in the aforementioned embodiments, and will not be repeated here.

[0182] In this embodiment, the custom fields of the broadcast frame include a network identifier field, a frame type field, a function field, and an encryption method field, and may also include a node capacity field. Thus, the broadcast frame can carry the network identifier of the Mesh network where the Mesh node resides, the number of devices currently allowed to access the Mesh node, and can also combine the frame type field and function field to indicate the type and function of the broadcast frame, improving the accuracy of target devices in identifying and parsing broadcast frames. Furthermore, the broadcast frame can specify the encryption algorithm through the encryption method field, improving the flexibility and accuracy of encryption and decryption.

[0183] In some embodiments, such as Figure 4 As shown, the custom fields of the broadcast frame also include a vendor identifier field, which indicates the vendor to which the Mesh node sending the broadcast frame belongs. Thus, the target device can also learn the vendor of the Mesh node based on the broadcast frame.

[0184] In some embodiments, such as Figure 4 As shown, in addition to custom fields, the frame structure of a broadcast frame may also include a frame header and a type field that conforms to the WIFI protocol. Unlike the frame type field in the custom fields, the type field that conforms to the WIFI protocol is used to indicate the frame type to which the discovery frame belongs in the WIFI protocol, making it easier for the discovery frame to be successfully received and parsed in the WIFI network.

[0185] The frame header can identify that broadcast frames belong to management frames.

[0186] (ii) Providing multiple embodiments in conjunction with the frame structure of the response frame.

[0187] In some embodiments, such as Figure 7 As shown (where, Figure 7 (This is a schematic diagram of the frame structure of the response frame provided in the embodiments of this application). In addition to the device identifier field, the custom fields of the response frame also include a frame type field, a function field, and an encryption method field.

[0188] In this embodiment, the frame type field in the response frame carries the response frame type, indicating that the response frame is a signal frame used to respond to the broadcast frame. The function field carries the Mesh function, and the encryption method field carries the algorithm representation of the encryption algorithm. The function field and encryption method field in the response frame can be referenced from those in the broadcast frame, and will not be described again.

[0189] Custom fields based on the response frame include a frame type field, a function field, and an encryption method field. Figure 8 A flowchart illustrating the node discovery method based on a mesh network provided in this application embodiment. Figure 4 .like Figure 8 As shown, the method includes:

[0190] S801, Mesh nodes send broadcast frames.

[0191] The implementation principle and technical effects of S801 can be referred to in the aforementioned embodiments, and will not be repeated here.

[0192] S802. The target device responds to the broadcast frame from the Mesh node, determines the algorithm identifier of the target encryption algorithm, and writes the response frame type into the frame type field, the Mesh function into the function field, the algorithm identifier of the target encryption algorithm into the encryption method field, and the device identifier of the target device into the device identifier field.

[0193] In this embodiment, since the custom fields of the response frame include a frame type field, a function field, an encryption method field, and a device identifier field, if the target device determines to send a response frame to the target device (the process of determining whether to send a response frame to the target device can be referred to the aforementioned embodiment, and will not be repeated here), the algorithm identifier of the target encryption algorithm can be determined before sending the response frame. Then, in the response frame, the response frame type is written into the frame type field, the Mesh function is written into the function field, the algorithm identifier of the target encryption algorithm is written into the encryption method field, and the device identifier of the target device is written into the device identifier field.

[0194] The process by which the target device determines the algorithm identifier of the target encryption algorithm can be referred to the process by which the Mesh node determines the algorithm identifier of the target encryption algorithm, and will not be repeated here.

[0195] S803, The target device sends a response frame to the Mesh node.

[0196] In this embodiment, the target device obtains a complete response frame after writing the corresponding content into each field of the response frame, and then sends the response frame outward.

[0197] S804: The Mesh node determines that the target device is a device that has not joined the Mesh network based on the response frame type field carried by the response frame and the Mesh function carried by the response frame function field.

[0198] In this embodiment, after receiving a response frame, the Mesh node can obtain the content carried by the frame type field and the function field of the response frame. If the content carried by the frame type field of the response frame includes a response frame type, it indicates that the response frame is used to respond to the broadcast frame of the Mesh node, and the target device is determined to be a device that has not joined the Mesh network. If the content carried by the function field of the response frame includes a Mesh function, it indicates that the frame parsing module corresponding to the Mesh function needs to be used to parse the response frame.

[0199] The S805 and Mesh nodes use the encryption algorithm identifier carried in the encryption method field of the response frame to parse the response frame through the frame parsing module corresponding to the Mesh function, and obtain the device identifier of the target device.

[0200] In this embodiment, the Mesh node can obtain the algorithm identifier of the target encryption algorithm from the encryption method field of the response frame, and based on the algorithm identifier of the target encryption algorithm, call the target decryption algorithm corresponding to the target encryption algorithm, and use the frame parsing module corresponding to the target decryption algorithm and the Mesh function to parse the response frame to obtain the device identifier of the target device.

[0201] S806: Mesh nodes discover the target device based on the device identifier of the target device in the response frame.

[0202] The implementation principle and technical effects of S806 can be referred to in the aforementioned embodiments, and will not be repeated here.

[0203] In this embodiment, the custom fields of the response frame include a device identifier field, a frame type field, a function field, and an encryption method field. The response frame, combined with the frame type and function fields, indicates the type of the broadcast frame and the function to which it belongs, improving the accuracy of Mesh nodes in identifying and parsing the response frame. The encryption method field specifies the encryption algorithm, enhancing the flexibility and accuracy of encryption and decryption, thereby improving the accuracy of device discovery within the Mesh network.

[0204] In some embodiments, after receiving a response frame from a target device, a Mesh node can determine whether the target device has previously connected to the Mesh network based on the response frame. If the target device has previously connected to the Mesh network (i.e., it has connected to the Mesh network where the Mesh node resides in the past), the Mesh node does not need to report the target device's device identifier to the target node. If the target device is a new device that has not previously connected to the Mesh network (i.e., it has not connected to the Mesh network where the Mesh node resides in the past), the Mesh node can report the target device's device identifier to the target node so that the target node can determine whether to invite the new device that has not previously connected to the Mesh network to join the network. Therefore, by differentiating based on whether the target device has previously connected to the Mesh node, older devices that have previously connected to the Mesh network can quickly complete authentication after discovery, improving the efficiency of older devices joining the network.

[0205] Optional, such as Figure 7 As shown, the custom fields in the response frame may also include an integrity check code field, which carries an integrity check code generated by the target device. This integrity check code can be used to determine whether the target device has joined a Mesh network.

[0206] In this optional method, before sending a response frame to the Mesh node, the target device generates an integrity check code and writes the integrity check code into the integrity check field of the response frame, based on the network identifier of the Mesh network obtained from the broadcast frame sent by the Mesh node and the determination that the target device has connected to the Mesh network. This allows the Mesh node to determine whether the target device has joined the Mesh network based on the integrity check code in the integrity check field of the response frame.

[0207] When a mesh node receives a response frame from a target device, if the custom fields of the response frame do not include an integrity checksum field, or if the custom fields of the response frame include an integrity checksum field and the integrity checksum field is empty, then the target device is determined to be a new device that has not previously connected to the mesh network. In response to the target device being a new device that has not previously connected to the mesh network, the node reports the target device's device identifier to the target node. If the custom fields of the response frame include an integrity checksum field and the integrity checksum field is not empty, then the target device is determined to be a device that has previously connected to the mesh network. Therefore, based on the integrity checksum field and the integrity checksum within it, the accuracy of the mesh node's determination of whether a target device has joined its own mesh network is improved.

[0208] Furthermore, Mesh nodes can also perform verification based on the integrity checksum in the integrity checksum field. In this case, the encryption method field of the response frame can carry the algorithm identifier of the target verification algorithm. Based on this algorithm identifier, the Mesh node verifies the integrity checksum. If the verification is successful, it can be determined that the target device has been connected to the Mesh network where the Mesh node is located; otherwise, it can be determined that the target device is a new device that has not been connected to the Mesh network where the Mesh node is located. Thus, by verifying the integrity checksum, the accuracy of determining whether a target device has joined a Mesh network is improved.

[0209] In some embodiments, such as Figure 7 As shown, the custom fields in the response frame also include a random number field, which carries a random number used in the Mesh network's invitation access phase for target devices. This prepares the device discovery phase for subsequent invitations to the network, improving the efficiency of device onboarding in the Mesh network, especially for devices that have previously joined a Mesh network.

[0210] In this embodiment, before the target device returns a response frame to the Mesh node, it can generate a random number and write the random number into a random number field. After receiving the response frame, the Mesh node can obtain the random number from the random number field of the response frame and invite the target device to join the Mesh network based on the random number. Here, there are no restrictions on how the target device is requested to join the Mesh network based on the random number.

[0211] In some embodiments, such as Figure 7 As shown, the custom fields in the response frame also include a vendor identifier field, which indicates the vendor to which the target device belongs through the vendor identifier carried in the vendor identifier field. In this way, the Mesh node can also learn the vendor to which the target device belongs based on the response frame.

[0212] In some embodiments, such as Figure 7 As shown, in addition to custom fields, the frame structure of the response frame may also include a frame header and a type field that conforms to the WIFI protocol. Unlike the frame type field in the custom fields, the type field that conforms to the WIFI protocol is used to indicate the frame type to which the discovery frame belongs in the WIFI protocol, so that the discovery frame can be successfully received and parsed in the WIFI network.

[0213] The frame header can identify that the response frame belongs to the management frame.

[0214] In some embodiments, the response frame may also include a field for carrying the network identifier of the Mesh network. Figure 7 (Not shown in the image), which allows Mesh nodes to determine whether a response frame is a broadcast response message based on the network identifier of the Mesh network carried in the response frame, thereby improving the accuracy of device discovery.

[0215] It should be noted that the order of the custom fields in the aforementioned frame structures can be flexibly adjusted.

[0216] Figure 9 A schematic diagram of the structure of the node discovery device based on a mesh network provided in the embodiments of this application. Figure 1 This device can be applied to Mesh nodes. For example... Figure 9 As shown, on the Mesh node side of the Mesh network, the node discovery device based on the Mesh network includes:

[0217] The sending unit 901 is used to send a broadcast frame, which is used to announce that the Mesh node is located in the Mesh network. The broadcast frame is a management frame containing custom fields, including a network identifier field, which carries the network identifier of the Mesh network.

[0218] The receiving unit 902 is used to receive the response frame returned by the target device. The response frame is a management frame containing custom fields. The custom fields of the response frame include a device identifier field, which carries the device identifier of the target device. The target device is not connected to the Mesh network.

[0219] The discovery unit 903 is used to discover the target device based on the device identifier of the target device in the response frame.

[0220] In one possible implementation, the custom fields of the broadcast frame also include a node capacity field, and the node discovery device based on the Mesh network further includes: a first determining unit (not shown), used to determine the number of devices currently allowed to access the Mesh node; and a first writing unit (not shown), used to write the number of devices into the node capacity field and write the network identifier of the Mesh network into the network identifier field if the number of devices is greater than the number threshold.

[0221] In one possible implementation, the custom fields of the broadcast frame also include a frame type field, a function field, and an encryption method field. The node discovery device based on the Mesh network further includes: a second determining unit (not shown) for determining the algorithm identifier of the target encryption algorithm; and a second writing unit (not shown) for writing the node announcement frame type into the frame type field, writing the Mesh function into the function field, and writing the algorithm identifier of the target encryption algorithm into the encryption method field in the broadcast frame.

[0222] In one possible implementation, the discovery unit 903 is specifically used to: obtain the device identifier of the target device based on the response frame; and report the device identifier of the target device to the target node in the Mesh network, whereby the target node manages the logical routing relationships in the Mesh network.

[0223] In one possible implementation, the custom fields of the response frame also include a frame type field, a function field, and an encryption method field. The discovery unit 903 is specifically used to: determine that the target device is a device that has not joined the Mesh based on the response frame type carried by the frame type field of the response frame and the Mesh function carried by the function field of the response frame; and parse the response frame through the frame parsing module corresponding to the Mesh function based on the algorithm identifier of the encryption algorithm carried by the encryption method field of the response frame to obtain the device identifier of the target device.

[0224] In one possible implementation, the discovery unit 903 is specifically used to: determine that the target device is a new device that has not been connected to the Mesh network if the custom field of the response frame does not include an integrity check code field, or if the custom field of the response frame includes an integrity check code field and the integrity check code field is empty; and in response to the target device being a new device that has not been connected to the Mesh network, report the device identifier of the target device to the target node.

[0225] In one possible implementation, the custom field of the response frame also includes a random number segment. Based on the device identifier of the target device in the response frame, the node discovery device based on the Mesh network further includes: a random number acquisition unit (not shown) for obtaining a random number from the random number segment of the response frame; and an invitation unit (not shown) for inviting the target device to join the Mesh network based on the random number.

[0226] Figure 10 A schematic diagram of the structure of the node discovery device based on a mesh network provided in the embodiments of this application. Figure 2 This device can be applied to target devices that are not connected to a mesh network. For example... Figure 10 As shown, on the target device side, the node discovery device based on the Mesh network includes:

[0227] The receiving unit 1001 is used to receive broadcast frames from Mesh nodes in the Mesh network. The broadcast frame is used to announce that the Mesh node is located in the Mesh network. The broadcast frame is a management frame containing custom fields. The custom fields of the broadcast frame include a network identifier field, which carries the network identifier of the Mesh network.

[0228] The sending unit 1002 is used to send a response frame to the Mesh node in response to the broadcast frame. The response frame is a management frame containing custom fields, including a device identifier field, which carries the device identifier of the target device.

[0229] In one possible implementation, the custom fields of the broadcast frame also include a node capacity field. The sending unit 1002 is specifically used to: obtain the number of devices that the Mesh node is currently allowed to access from the node capacity field; obtain the network identifier of the Mesh network from the network identifier field; and send a response frame to the Mesh node if the number of devices that the Mesh node is currently allowed to access is greater than the number threshold.

[0230] In one possible implementation, there are multiple Mesh nodes, and the sending unit 1002 is specifically used to: if the number of devices currently allowed to access a Mesh node is greater than the number threshold, determine the score corresponding to the Mesh node based on the broadcast frame; and send a response frame to the Mesh node with the highest score among the Mesh nodes.

[0231] In one possible implementation, the sending unit 1002 is specifically used to: if the number of devices currently allowed to access the Mesh node is greater than the number threshold, determine the score corresponding to the Mesh node based on the Received Signal Strength Indication (RSSI) of the broadcast frame and / or the number of devices currently allowed to access the Mesh node.

[0232] In one possible implementation, the custom fields of the broadcast frame also include a frame type field, a function field, and an encryption method field. The sending unit 1002 is specifically used to: determine that the Mesh node is located in the Mesh network based on the node announcement frame type carried in the frame type field of the broadcast frame and the Mesh function carried in the function field of the broadcast frame; parse the broadcast frame through the frame parsing module corresponding to the Mesh function based on the algorithm identifier of the encryption algorithm carried in the encryption method field of the broadcast frame to obtain the parsing result, which includes the network identifier of the Mesh network; and send a response frame to the Mesh node based on the parsing result.

[0233] In one possible implementation, the custom fields of the response frame also include a frame type field, a function field, and an encryption method field. The node discovery device based on the Mesh network further includes: a determining unit, used to determine the algorithm identifier of the target encryption algorithm before sending the response frame to the Mesh node; and a first writing unit, used to write the response frame type into the frame type field, the Mesh function into the function field, and the algorithm identifier of the target encryption algorithm into the encryption method field in the response frame.

[0234] In one possible implementation, the custom fields of the response frame further include a random number segment and / or an integrity check field. The Mesh network-based node discovery device further includes: a second writing unit, configured to perform at least one of the following operations in the response frame before sending the response frame to the Mesh node: generating a random number and writing the random number into the random number segment, and / or, if it is determined that the target device has been connected to the Mesh network based on the network identifier of the Mesh network, generating an integrity check code and writing the integrity check code into the integrity check field.

[0235] The node discovery device based on the Mesh network provided in the above embodiments can be used to execute the technical solutions of the above embodiments of the node discovery method based on the Mesh network. Its implementation principle and technical effect are similar, and will not be described again.

[0236] Figure 11 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application, such as... Figure 11 As shown, the electronic device includes a processor 1101 and a memory 1102; the memory 1102 stores a computer program; the processor 1101 executes the computer program stored in the memory to implement the steps of the node discovery method based on the Mesh network in the above method embodiments.

[0237] In the aforementioned water heater, the memory 1102 and the processor 1101 are electrically connected directly or indirectly to enable data transmission or interaction. For example, these components can be electrically connected to each other via one or more communication buses or signal lines, such as a bus connection. The memory 1102 stores computer execution instructions that implement data access control methods, including at least one software function module that can be stored in the memory 1102 in the form of software or firmware. The processor 1101 executes various functional applications and data processing by running the software programs and modules stored in the memory 1102.

[0238] The memory 1102 may be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), etc. The memory 1102 is used to store programs, which are executed by the processor 1101 upon receiving execution instructions. Furthermore, the software programs and modules within the memory 1102 may also include an operating system, which may include various software components and / or drivers for managing system tasks (e.g., memory management, storage device control, power management, etc.) and can communicate with various hardware or software components to provide an operating environment for other software components.

[0239] Processor 1101 can be an integrated circuit chip with signal processing capabilities. The aforementioned processor 1101 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor.

[0240] An embodiment of this application also provides a chip, including: a processor and a memory; a computer program is stored in the memory, and when the processor executes the computer program stored in the memory, it implements the node discovery method based on the Mesh network provided in the above method embodiments.

[0241] An embodiment of this application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the node discovery method based on a Mesh network provided in the above-described method embodiments.

[0242] An embodiment of this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the node discovery method based on a Mesh network provided in the above-described method embodiments.

[0243] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.

[0244] The technical solutions of this application have been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of this application is obviously not limited to these specific embodiments. Without departing from the principles of this application, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will all fall within the scope of protection of this application.

Claims

1. A method for node discovery based on a Mesh network, characterized in that, The mesh network-based node discovery method, applied to mesh nodes in a mesh network, includes: A broadcast frame is sent to announce that the Mesh node is located in the Mesh network. The broadcast frame is a management frame containing custom fields, including a network identifier field, which carries the network identifier of the Mesh network. Receive a response frame returned by the target device. The response frame is a management frame containing custom fields. The custom fields of the response frame include a device identifier field, which carries the device identifier of the target device. The target device is not connected to the Mesh network. Based on the response frame, the device identifier of the target device is obtained; The device identifier of the target device is reported to the target node in the Mesh network, and the target node is used to manage the logical routing relationship in the Mesh network; The broadcast frame and the response frame are Action frames in the management frame; The custom fields of the broadcast frame also include a node capacity field, and before sending the broadcast frame, the following are also included: Determine the number of devices currently allowed to access the Mesh node; If the number of devices exceeds the quantity threshold, the number of devices is written into the node capacity field, and the network identifier of the Mesh network is written into the network identifier field.

2. The Mesh network based node discovery method according to claim 1, wherein, The custom fields of the broadcast frame also include a frame type field, a function field, and an encryption method field. Before sending the broadcast frame, the following is also included: Determine the algorithm identifier of the target encryption algorithm; In the broadcast frame, the node announcement frame type is written into the frame type field, the Mesh function is written into the function field, and the algorithm identifier of the target encryption algorithm is written into the encryption method field.

3. The Mesh network based node discovery method according to claim 1, wherein, The custom fields of the response frame also include a frame type field, a function field, and an encryption method field. Obtaining the device identifier of the target device based on the response frame includes: Based on the response frame type carried in the frame type field of the response frame and the Mesh function carried in the function field of the response frame, the target device is determined to be a device that has not joined the Mesh. Based on the encryption algorithm identifier carried in the encryption method field of the response frame, the response frame is parsed by the frame parsing module corresponding to the Mesh function to obtain the device identifier of the target device.

4. The Mesh network based node discovery method according to claim 1, wherein, The step of reporting the device identifier of the target device to the target node in the Mesh network includes: If the custom fields of the response frame do not include an integrity check code field, or if the custom fields of the response frame include an integrity check code field and the integrity check code field is empty, then the target device is determined to be a new device that has not been connected to the Mesh network before. In response to the fact that the target device is a new device that has not been connected to the Mesh network, the device identifier of the target device is reported to the target node.

5. The node discovery method based on a mesh network according to any one of claims 1-2, characterized in that, The custom fields of the response frame also include a random number field. After discovering the target device based on the device identifier of the target device in the response frame, the process further includes: A random number is obtained from the random number segment of the response frame; Based on the random number, the target device is invited to join the Mesh network.

6. A method for node discovery based on a Mesh network, characterized in that, Applied to a target device that is not connected to a mesh network, the mesh network-based node discovery method includes: Receive broadcast frames from Mesh nodes in the Mesh network. The broadcast frames are used to announce that the Mesh nodes are located in the Mesh network. The broadcast frames are management frames containing custom fields, including a network identifier field, which carries the network identifier of the Mesh network. In response to the broadcast frame, a response frame is sent to the Mesh node. The response frame is a management frame containing custom fields, including a device identifier field that carries the device identifier of the target device.

7. The Mesh network based node discovery method according to claim 6, wherein, The custom fields of the broadcast frame also include a node capacity field. The response to the broadcast frame, sending a response frame to the Mesh node, includes: The number of devices currently allowed to connect to the Mesh node can be obtained from the node capacity field. The network identifier of the Mesh network is obtained from the network identifier field; If the number of devices currently allowed to access the Mesh node is greater than the threshold, then the response frame is sent to the Mesh node.

8. The Mesh network based node discovery method according to claim 7, wherein, The Mesh nodes are multiple. If the number of devices currently allowed to access a Mesh node is greater than a threshold, the response frame is sent to the Mesh node, including: If the number of devices currently allowed to access the Mesh node is greater than the number threshold, then the score corresponding to the Mesh node is determined based on the broadcast frame; Send the response frame to the Mesh node with the highest score among the Mesh nodes.

9. The Mesh network based node discovery method of claim 8, wherein, If the number of devices currently allowed to access the Mesh node is greater than a threshold, then based on the broadcast frame, a score corresponding to the Mesh node is determined, including: If the number of devices currently allowed to access the Mesh node is greater than the number threshold, the score corresponding to the Mesh node is determined based on the Received Signal Strength Indication (RSSI) of the broadcast frame and / or the number of devices currently allowed to access the Mesh node.

10. The Mesh network based node discovery method according to any one of claims 6-9, characterized by, The custom fields of the broadcast frame also include a frame type field, a function field, and an encryption method field. The response frame sent to the Mesh node in response to the broadcast frame includes: Based on the node announcement frame type carried in the frame type field of the broadcast frame and the Mesh function carried in the function field of the broadcast frame, it is determined that the Mesh node is located in the Mesh network; Based on the algorithm identifier of the encryption algorithm carried in the encryption method field of the broadcast frame, the broadcast frame is parsed by the frame parsing module corresponding to the Mesh function to obtain the parsing result, which includes the network identifier of the Mesh network. Based on the parsing results, the response frame is sent to the Mesh node.

11. The node discovery method based on a mesh network according to any one of claims 6-9, characterized in that, The custom fields of the response frame also include a frame type field, a function field, and an encryption method field. The node discovery method based on the Mesh network also includes: Before sending the response frame to the Mesh node, determine the algorithm identifier of the target encryption algorithm; In the response frame, the response frame type is written to the frame type field, the Mesh function is written to the function field, and the algorithm identifier of the target encryption algorithm is written to the encryption method field.

12. The node discovery method based on a mesh network according to any one of claims 6-9, characterized in that, The custom fields of the response frame also include a random number field and / or an integrity check field, and the node discovery method based on the Mesh network further includes: Before sending the response frame to the Mesh node, at least one of the following operations is performed in the response frame: generating a random number and writing the random number into a random number field, and / or, if it is determined from the network identifier of the Mesh network that the target device has been connected to the Mesh network, generating an integrity check code and writing the integrity check code into an integrity check field.

13. A node discovery device based on a mesh network, characterized in that, The mesh network-based node discovery device, applied to mesh nodes in a mesh network, includes: A sending unit is used to send a broadcast frame, which is used to announce that the Mesh node is located in the Mesh network. The broadcast frame is a management frame containing custom fields, including a network identifier field, which carries the network identifier of the Mesh network. A receiving unit is configured to receive a response frame returned by a target device. The response frame is a management frame containing custom fields. The custom fields of the response frame include a device identifier field, which carries the device identifier of the target device. The target device is not connected to the Mesh network. The discovery unit is configured to obtain the device identifier of the target device based on the response frame; and report the device identifier of the target device to the target node in the Mesh network, wherein the target node is used to manage the logical routing relationships in the Mesh network. The sending unit is further configured to determine the number of devices currently allowed to access the Mesh node; if the number of devices is greater than the number threshold, the number of devices is written into the node capacity field, and the network identifier of the Mesh network is written into the network identifier field.

14. A node discovery device based on a mesh network, characterized in that, Applied to a target device that is not connected to a mesh network, the mesh network-based node discovery device includes: A receiving unit is configured to receive broadcast frames from Mesh nodes in the Mesh network. The broadcast frames are used to announce that the Mesh nodes are located in the Mesh network. The broadcast frames are management frames containing custom fields, including a network identifier field, which carries the network identifier of the Mesh network. The sending unit is configured to send a response frame to the Mesh node in response to the broadcast frame. The response frame is a management frame containing custom fields, including a device identifier field that carries the device identifier of the target device.

15. An electronic device, characterized in that, include: Processor and memory; The memory stores computer programs; When the processor executes the computer program stored in the memory, it implements the node discovery method based on a Mesh network as described in any one of claims 1 to 12.

16. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the node discovery method based on a Mesh network as described in any one of claims 1 to 12.

17. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, is used to implement the node discovery method based on a Mesh network as described in any one of claims 1 to 12.

Citation Information

Patent Citations

  • Access method for smart home equipment, and electronic equipment

    CN110320811A