METHOD, NODE DEVICE AND SYSTEM FOR CONTROLLING RELAY FUNCTION IN MESH NETWORK
Patent Information
- Application Number
- JP2024529841
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2022-01-11
- Filing Date
- 2022-11-14
- Publication Date
- 2025-12-02
AI Technical Summary
Existing methods for controlling relay functionality in mesh networks, such as Bluetooth mesh networks, are inefficient and labor-intensive, leading to excessive network traffic or reduced message range due to manual control of relay functions.
A method where each node device in a mesh network autonomously decides to turn its relay function ON or OFF based on the relay status of neighboring devices, using neighbor relay discovery requests and responses to optimize network traffic and message propagation.
This approach optimizes network traffic by balancing relay functionality across devices, ensuring efficient message relay within a reasonable range without manual intervention, thereby reducing redundant traffic and enhancing network performance.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
[Technical field]
[0001] The present disclosure relates generally to the field of wireless communication networks, and more particularly to a method, a node device and a system for controlling a relay feature of a node device in a mesh network. [Background technology]
[0002] A network topology connecting multiple node devices is called a mesh network, where a node device may be directly, dynamically, non-hierarchically connected to many other node devices within its communication range, and the node devices cooperate with each other to efficiently route data between the node devices. This lack of dependency on one central node allows all nodes to participate in relaying information.
[0003] A mesh network can relay messages using either flooding or routing techniques. In a large flooding-based mesh network, such as a Bluetooth mesh-based network with 200 or more nodes, if the relay function of all node devices in the mesh network is kept ON, it will lead to large network traffic, even though the retransmission of received messages is limited by the Time to Live (TTL) value. On the other hand, if the relay function of some node devices is turned off inappropriately, the range or distance that messages can travel may be shortened.
[0004] US2017295455A1 discloses that, in relation to the optimization of a relay node in a mesh network, when a first node receives at least one indication message from another node, the first node will send a message to a neighboring node to enable the relay function, and further discloses that, if there is no message having the same SRC address as the first message, the node device will send an indication message to the neighboring node indicating the enablement of the relay function.
[0005] US2020092792A1 discloses a method for deactivating the relay function of a relay node in a mesh network based on connectivity between node devices.
[0006] Currently, there is no efficient method available, such as that defined in the Bluetooth mesh specification, to control the relaying function of the mesh network as a whole in an optimal manner. Based on the Bluetooth mesh specification, the relaying function of each node device is manually controlled, for example, by a mesh network provisioning person, which is cost- and labor-inefficient.
[0007] Therefore, there is a real need for a method to optimize the control functions of node devices in a mesh network, which optimally contributes to message propagation and also helps to reduce redundant mesh traffic. Summary of the Invention [Problem to be solved by the invention]
[0008] The objective of the present disclosure is to provide a method that allows each node in the network to determine for itself whether its relay function should be kept ON or turned OFF so that message propagation and traffic in the network is optimized. Such relay configuration is automatic and determined by the mesh network nodes themselves without the intervention of a provisioner. [Means for solving the problem]
[0009] In a first aspect of the present disclosure, there is provided a method of controlling a first node device in a mesh network including a plurality of operatively interconnected node devices, including a first node device and a number of further node devices, wherein a relay function of each node device has an initial status of being enabled, the method being performed by the first node device, the method comprising: receiving a relay optimization message; sending a neighbor relay discovery request to the number of additional node devices after a random waiting period; awaiting a neighbor relay discovery response from said number of further node devices until expiration of a response period that begins upon transmission of the neighbor relay discovery request, the neighbor relay discovery response being received from said further node devices if said further node devices are operating in a responding mode; disabling its own relay function if the number of neighbor relay discovery responses is equal to or greater than a threshold; A method is presented, including:
[0010] The present disclosure is based on the insight that, by sending a neighbor relay discovery request to a certain number of further node devices located in the vicinity of the first node device and receiving a neighbor relay discovery response from the further devices indicating a relay status, a first node device, connected to a mesh network, can determine whether its relay function should be kept on or turned off.
[0011] For this purpose, the first node device is configured to operate under a state of discovering relay status of neighboring node devices or to start a state of discovering relay status of neighboring node devices, which state is triggered by a relay optimization message. When the first node device operates in a discovery state, upon receiving the relay optimization message, the first node device starts a relay function optimization procedure by sending a neighbor relay discovery request. Then, the first node device waits for neighbor relay discovery responses from the number of further node devices that have received the neighbor relay discovery request during a response period. By counting the number of responses sent by the further neighboring node devices in response to the neighbor relay discovery request sent by the first node device, the first node device can know whether some node devices located in its neighborhood currently enable relay function.
[0012] If the number of received responses indicating that further node devices in the vicinity of the node device are now able to relay the message is greater than or equal to a threshold, e.g., one, the node device turns off its relaying function.
[0013] This allows the relaying functionality of a certain number of node devices to be optimized in terms of their operational status being turned on and off so that messages can still be relayed within an adequate range in the mesh network while network traffic is kept reasonably low.
[0014] Before initiating a relay optimization procedure by sending a neighbor relay discovery request, the first node device waits a random period of time after receiving the relay optimization message.
[0015] This helps prevent a scenario in which all node devices issue neighbor relay discovery requests at the same time. By having each node device optimize its own relay function at a differentiated time, the relay functions of the node devices in the network can be enabled or disabled in a more balanced manner.
[0016] In certain examples of the present disclosure, the method further comprises: entering a response mode if the number of neighbor relay discovery responses is less than a threshold after the response period expires; sending a neighbor relay discovery response in response to the neighbor relay discovery request received in a response mode; Includes.
[0017] If the number of neighbor relay discovery responses received by the first node device is below a threshold, this indicates that the neighboring node devices around the first node device have turned off their relay functions and will not relay received messages. In this case, the first node device keeps its relay function on and enters a response mode. In this response mode, the first node device responds to (multiple) neighbor relay discovery requests sent by other node devices in its vicinity, allowing the other node devices to optimize their own relay functions.
[0018] The relay optimization message is sent to a group of node devices to optimize their relay capabilities. As described above, different node devices in the group take turns optimizing their own relay capabilities by sending neighbor relay discovery requests to other node devices.
[0019] In practice, a neighboring node device that receives a neighbor relay discovery request will only send a response to the node device that sent out the neighbor relay discovery request if its relay function is on and it is not in the process of optimizing its relay function by sending a neighbor relay discovery request or waiting for a response from another node device and has not responded to the neighbor relay discovery request, which helps to ensure a more reliable determination of the status of the relay function of the neighboring node device.
[0020] In certain examples of the present disclosure, the relay optimization message is received from a control device outside the network or from firmware inside the first node device.
[0021] The relay optimization message serves as a trigger message for triggering a relay optimization procedure, so that optimization of the relay functionality of node devices in the network can be performed in a controlled manner.
[0022] As an example, a control device external to the network may be a provisioner device or a back-end server.
[0023] Depending on whether the node device is enabled with short-range or long-range communication capabilities, the relay optimization message may be sent from a mobile device, such as a portable provisioning device, via short-range communication or from a backend server via long-range communication.
[0024] If the node device supports a long-range communication interface, receiving the relay optimization message from the backend server via long-range communication includes receiving the relay optimization message directly from the backend server. Alternatively, if the node device does not support a long-range communication interface, the node device may receive the relay optimization message from the backend server by delegation via a further node device that supports a long-range communication interface and therefore can communicate directly with the backend server.
[0025] Alternatively, firmware may perform discovery on the node devices independently at predetermined times, such as once a week.
[0026] In certain examples of the present disclosure, the response period is a random or fixed time period.
[0027] One skilled in the art can contemplate that the response period may be set based on various factors such as the size of the network, the number of node devices being optimized, etc., to a fixed value or by conveniently keeping it random.
[0028] In certain examples of the present disclosure, sending the neighbor relay discovery request to a certain number of additional node devices includes setting a time to live (TTL) value for the neighbor relay discovery request.
[0029] By setting a TTL value in the neighbor relay discovery request sent by the node device, the message can be sent only a limited number of hops, thereby achieving the purpose of being sent to said number of further node devices. This is also a simple available setting that can be easily used.
[0030] The transmission may be performed, for example, using flooding, which is a standard message transmission technique used in mesh networks, which can be advantageously used to transmit neighbor relay discovery requests.
[0031] As an example, the TTL may be set to 2. This TTL value, in combination with a threshold value of a reception response used to determine whether the relay function of a node device should be disabled, may be used to adjust the number of node devices that need to have their relay function disabled.
[0032] Those skilled in the art can contemplate that fewer node devices have the relay function enabled when the threshold for the reception response is set to a lower value while the TTL is set to a higher value. On the other hand, if more node devices are expected to have the relay function enabled, the threshold for the reception response may be set to a higher value while the TTL may be set to a lower value.
[0033] If the TTL is set to 2, the neighbor relay discovery request will only travel one hop. This setting results in relatively low traffic in the network while still maintaining reliable relay of messages on the network.
[0034] In one example, the threshold may be set to 1, which means that if a node device notices that one other node device in its neighborhood has enabled the relay function, it will turn off its own relay function.
[0035] In certain examples of the present disclosure, the method further includes sending a status update notification to the control device for recording.
[0036] The control device may maintain a relay status of each node device in the network. If a node device now disables its relay function, it sends a status update message to the control device so that its relay status maintained by the control device can be updated. This allows the control device to have up-to-date knowledge of the node devices in the network, which allows it to better time sending relay optimization messages to necessary node devices.
[0037] In practice, the relay optimization message may include a discovery period, which, when received by a node device, triggers the start of a relay discovery timer for the discovery period. When the timer expires, discovery or optimization will no longer run. This ensures that the relay optimization procedure triggered by the relay optimization message does not continue to run for a long time.
[0038] The discovery period may be determined based on the total number of nodes in the group that are optimized for relay functionality, as programmed into firmware in the node devices or by an application running on the control device that sends the relay optimization message, for example, for a group containing 20 nodes, the discovery period may be set to 5 minutes.
[0039] A second aspect of the present disclosure provides a node device configured to control its relay function according to a method according to the first aspect of the present disclosure, wherein the node devices are connected in a mesh network including a plurality of operatively interconnected node devices, and the relay function of each node device has an initial status of being enabled.
[0040] A third aspect of the present disclosure is a system for controlling a relay function of a first node device in a mesh network, the mesh network including a plurality of operatively interconnected node devices including the first node device and a number of further node devices, wherein a relay function of each node device has an initial status of being enabled; Each of the node devices is configured to receive the relay optimization message; The first node device is configured to send a neighbor relay discovery request to the number of further node devices after a random waiting period after receiving the relay optimization message; the number of further node devices being configured to receive a neighbor relay discovery request; the further node device is configured to send a neighbor relay discovery response to the first node device in response to receiving the neighbor relay discovery request when the further node device is operating in a response mode; The first node device further comprises: awaiting neighbor relay discovery responses from said number of further node devices until expiration of a response period that begins upon transmission of the neighbor relay discovery request; and If the number of neighbor relay discovery responses is equal to or greater than a threshold, disable its own relay function. The present invention provides a system configured to:
[0041] From a system point of view, the interaction between a first node device optimizing the relay function and a certain number of further node devices in the vicinity is generally as described in the system above.
[0042] It should be noted that a node device in a network may function as a first node device optimizing its relay function by sending a neighbor relay discovery request, and as a further node device responding to the neighbor relay discovery request when operating in a response mode. In this sense, the first node device and the further node device do not necessarily refer to separate node devices. Instead, the same node device may take on the role of either the first node device or the further node device at different times.
[0043] In certain examples of the present disclosure, the relay optimization message further includes a discovery period, and each of the number of additional node devices is configured to respond to the neighbor relay discovery request only before expiration of the discovery period.
[0044] This discovery period is set to terminate the optimization and expires when the node device successfully optimizes its relay function.
[0045] In a further example, the first node device further comprises: After the response period expires, if the number of neighbor relay discovery responses is less than a threshold, enter response mode; and sending a neighbor relay discovery response in response to a neighbor relay discovery request received in a response mode; It is configured as follows.
[0046] If the first node device keeps its relay function on, it can respond to (multiple) neighbor relay discovery requests from other node devices, and can facilitate these node devices to optimize their relay functions.
[0047] As a result of optimizing its own relay function, when the first node device turns off the relay function, it will no longer respond to neighbor relay discovery requests from another node device.
[0048] A fourth aspect of the present disclosure is a method of controlling a relay function of a first node device in a mesh network including a plurality of operatively interconnected node devices, including a first node device and a number of further node devices, the relay function of each node device having an initial status of being enabled, the method comprising: receiving, by each of the node devices, a relay optimization message; sending, by the first node device, a neighbor relay discovery request to the number of further node devices after a random waiting period; receiving a neighbor relay discovery request by the number of additional node devices; sending, by the further node device, a neighbor relay discovery response to the first node device if the further node device is operating in a reply mode; waiting, by the first node device, for neighbor relay discovery responses from said number of further node devices until expiration of a response period that begins upon sending the neighbor relay discovery request; disabling its own relay function if the number of neighbor relay discovery responses is equal to or greater than a threshold; The present invention provides a method comprising:
[0049] Operation by the node devices in the system to optimize the relay function of the node devices is generally as described in the methods above.
[0050] In certain examples of the present disclosure, the method further comprises: by the first node device, after expiration of the response period, if the number of neighbor relay discovery responses is less than a threshold, entering a response mode; sending, by the first node device, a neighbor relay discovery response in response to the neighbor relay discovery request received in a response mode; Includes.
[0051] As described above, the first node device may operate to optimize its own relay function or to respond to a neighbor relay discovery request and facilitate other node devices to optimize their own relay function. The operation of the node device may be implemented by configuring the node device to operate under a different mode when a condition for performing the operation is met.
[0052] As an example, the relay optimization message further includes a discovery period, and the method further includes responding, by each node device, to the neighbor relay discovery request in a response mode only before expiration of the discovery period.
[0053] If the discovery period expires, the optimization procedure will no longer run and so the node device will not respond to neighbor relay discovery requests, which also helps to reduce traffic in the network.
[0054] A fifth aspect of the present disclosure provides a computer program product including a computer-readable storage medium storing instructions that, when executed on at least one processor, cause the at least one processor to perform a method according to the first aspect of the present disclosure.
[0055] The above and other features and advantages of the present disclosure will be best understood from the following description taken in conjunction with the accompanying drawings, in which like reference numerals indicate identical parts or parts performing the same or equivalent functions or operations, and in which: [Brief description of the drawings]
[0056] [Figure 1] 1 illustrates a schematic diagram of a mesh network including a plurality of node devices. [Diagram 2] 1 illustrates a schematic of a neighbor client model and a neighbor server model running on a node device and cycling between different states. [Diagram 3] FIG. 11 is a sequence diagram illustrating a method for controlling a relay function of a node device. [Figure 4] 1 illustrates a schematic diagram of a method for controlling relay functionality of node devices in a mesh network from the perspective of a node device optimizing its own relay functionality. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0057] Embodiments contemplated by the present disclosure will now be described in more detail with reference to the accompanying drawings. The disclosed subject matter should not be construed as being limited to only the embodiments described herein. Rather, the illustrated embodiments are provided as examples to convey the scope of the subject matter to those skilled in the art.
[0058] 1 illustrates a schematic of a mesh network 10 including a number of node devices 101-109. Each node device can communicate with further node devices in the network 10 via direct communication or by relaying through another node device.
[0059] All node devices forming the network contemplated by the present disclosure support the relay function, and each node device is assumed to have an initial status of having its relay function enabled after installation and provisioning of the network.
[0060] The present disclosure proposes a method that enables each node device in a network to automatically determine whether its relay function should be kept enabled or disabled.
[0061] A node device in a mesh network, such as a Bluetooth network, may operate in multiple models, such as a server model, a client model, and a control model, each of which defines multiple operational states, messages that act on those states, and any associated behaviors.
[0062] According to the inventive idea of the present disclosure, a method for controlling a relay function of node devices in a mesh network is implemented by operating each node device alternately in a neighbor server mode and a neighbor client mode.
[0063] The neighbor server mode and the neighbor client mode are configured for each node device and may be implemented, for example, using the model of the Bluetooth node described above. Specifically, two new models, called the neighbor server model and the neighbor client model, respectively, are added to every mesh node in the mesh network.
[0064] When provisioning a network including multiple node devices, the relay function of all mesh nodes in the network is turned on. For convenience, the relay function of the mesh node devices may be optimized on a group basis, i.e., node devices of the same group are considered for relay optimization, as described in more detail below.
[0065] In a Bluetooth mesh network, a neighbor server has a subscription address that is the same as the neighbor client Publication address.
[0066] A control parameter such as a Time To Live (TTL) may be used to control the number of hops each message is relayed through in the mesh network. For example, by setting the TTL of a node device operating in a client mode, i.e., a node device implementing a neighbor-client model, to 2, messages from the node device can travel up to 1 hop.
[0067] In the client mode, a node device determines the number of neighboring node devices that have enabled their relay function by sending a neighbor relay discovery request. If the node device finds that the number of node devices that have enabled their relay function is equal to or greater than a threshold, it disables its relay function. The threshold may be set to 1, for example, which means that if there is another node device that has enabled its relay function in the vicinity, the node device turns off its relay function.
[0068] When operating under the neighbor server mode, a node device listens to relay discovery requests from node devices operating in the neighbor client mode and sends response messages but does not publish the responses.
[0069] A node that operates on the neighbor server model, or simply called a neighbor server, maintains a relay state value, which cycles through three states: Discovery Off, ServerBusy, and ServerRunning.
[0070] On the other hand, a node device that operates the neighbor client model, or simply called a neighbor client, cycles through four states: Discovery Off, Client Not Active, Discovery request Sent, and Response Pending. A neighbor client node maintains a counter of Neighbor Relay Count and Client Response Timeout (seconds). The Neighbor Relay Count is used to count the number of neighboring node devices that have the relay function turned on.
[0071] Those skilled in the art can contemplate that both the neighbor-server model and the neighbor-client model exist in each node device. Only one of the neighbor-server model and the neighbor-client model is active at a time. The Client and Server state machines are triggered by events, and the states of the client server and the neighbor server are influenced by each other.
[0072] Specifically, if the neighbor client model is not active, the neighbor server model is in the running state, and vice versa. The purpose of not having the neighbor client model and the neighbor server model active at the same time is to avoid conflicts in the relay state reported between neighboring nodes.
[0073] FIG. 2 shows a schematic of a neighbor client model 20 and a neighbor server model 30 running on a node device and cycling between different states.
[0074] In the normal operating status of the node device, the node device is in discovery off mode for both the neighborhood client 21 and the neighborhood server 31.
[0075] Upon initiating relay discovery 201, which may be initiated by the node device receiving a discovery initiation command or instruction from an external device, such as a mobile device acting as a provisioner or backend server, or an instruction generated by the firmware of the node device, the node device initially begins to act like a neighbor server 30.
[0076] At this time, the neighbor client 20 may start a discovery timeout period timer, shown as 202. At the same time, the node device's neighbor client 20 enters a Client Request Pending mode 22.
[0077] After a random waiting period 203, in other words, at a random time instance during the discovery timeout period, the node device initiates operation of the neighbor client model 20 and sends a neighbor relay discovery command to its immediate neighboring node devices, which causes the neighbor client 20 to enter a Client Response Pending state 23.
[0078] The Client Response Pending state 23 lasts for a period of time determined by a Client Waiting Timeout Counter 204. During this period 204, neighboring node devices that are running a neighbor server and have their relay function turned ON will respond to the client request, i.e., a neighbor relay discovery command.
[0079] If a client wait timeout 204 occurs, the node device terminates the neighbor client and therefore enters the client inactive state 24.
[0080] If a neighbor client 20 is running on a node device 301, then the neighbor server 30 on the same node device is in a state of Serve Busy 32. Otherwise, if the neighbor client 20 is not active 302, then the neighbor server 30 is in a state of Server Running 33.
[0081] As described above, when in the Server Running 33 state, the neighbor server 30 switches to Serve Busy 32 upon receiving a client request 303 .
[0082] In the Server Running 33 state, the neighbor server 30 responds with a Relay Status 304 in response to a client request received from a node device running a neighbor client if the relay function is ON.
[0083] If a client request is received when the Server is busy 32, a Server Busy Response 305 is returned to the neighboring client. In this case, the node device running the neighboring client will retry sending the same request after some time within the Relay Discovery Timeout.
[0084] The operations by different entities in a system implementing a method for controlling relay functionality of a node device in a mesh network are described below with reference to FIG. 3, which is a sequence diagram illustrating generally a method 40 for controlling relay functionality of a node device.
[0085] The system may include a control device 41, which may be, for example, a provisioner device or a backend management server, and a number of node devices. The relay function of the node devices may be updated on a group basis, and each group may include a certain number of node devices, such as 5-10 node devices that are physically located near each other.
[0086] As described above, each node device may operate in a neighbor client model and a neighbor server model. In the method described below, the relay optimization procedure is described for a scenario in which one node device operates as a neighbor client 42 and multiple neighboring node devices operate as neighbor servers 43, although only one neighbor server 43 is shown in FIG.
[0087] In step 401, the control device 41 decides to start relay optimization. Therefore, the control device sends a relay optimization command 402 to a group of node devices, which until now are operating in discovery-off mode.
[0088] Upon receiving the relay optimization command, each of the group of node devices starts 403 a discovery timer to set a specific duration for the discovery procedure.
[0089] During this discovery period, the node device starts the operation of the neighbor client 42 and first waits for a random period 404 before sending a relay discovery request 405 to other node devices. The sending of the relay discovery request also triggers a response period for collecting responses from other node devices.
[0090] If a node device operating a neighbor server 43 that receives a relay discovery request message is in a server busy state, the node device operating the neighbor client 42 returns a server busy message to the neighbor client 42. The node device running the neighbor client 42 retries sending the same request after some time within the relay discovery period.
[0091] If the node device operating the neighbor server 43 that received the relay discovery request message is not in a server busy state, it checks its own relay status 406. If its own relay status is on, that is, if the relay function of this node device is enabled, the node device operating the neighbor server 43 sends a relay discovery response 407 message to the neighbor client 42.
[0092] Responses from the neighbor server 43 are collected 408 during a response period, and for each received relay discovery response, the neighbor client may increment a neighbor relay counter by 1. At the end of the response period, if the neighbor relay count is greater than or equal to a threshold, such as 1, the node device operating the neighbor client 42 may turn off 409 its relay function.
[0093] Thereafter, the node device running the neighbor client 42 sends a relay update message 410 to the control device 41, which updates 411 the relay status for the node device that it maintains locally or remotely.
[0094] After the discovery timer expires 412, all node devices in the group that are optimized for relay functionality enter a discovery off state.
[0095] A method 50 for controlling relay functionality of a node device in a mesh network is described below with reference to FIG. 4 from the perspective of a node device operating in a neighbor-client model, according to one embodiment of the present disclosure.
[0096] In step 51, the node device receives a Relay Optimization message. The Relay Optimization message may be sent from a network management device, such as a mobile device, via short-range communication, or from a back-end server via long-range communication. As an example, a Mobile App running on a mobile device of a field engineer may send a Relay Optimization message to a group address.
[0097] The discovery process may be initiated when a neighbor discovery command is received from the node device itself. As an example, the firmware can run discovery on all node devices independently at a predefined time, for example once a week. This allows removed node devices to be addressed.
[0098] The relay optimization message may be transmitted to a group of node devices. It may be contemplated that a group address defined by the Bluetooth specification may be used to transmit such messages to a group of node devices in a Bluetooth network. The grouping of node devices may be determined based on the geographical locations of the network addresses of the node devices.
[0099] The relay optimization message may also include a discovery period. Upon receiving the relay optimization message, the node device starts a discovery timer, defining the period during which the discovery procedure runs.
[0100] In step 52, the node device waits for a random amount of time.
[0101] In order to avoid all node devices that have received the relay optimization message from issuing a neighbor relay discovery request at the same time, the neighbor relay discovery request is not sent by the node device immediately after entering the discovery procedure. Instead, the message is sent after a random delay. This allows different node devices in the same group running the client mode to avoid sending relay discovery requests at the same time.
[0102] As an example, at a random discovery time instance within a given discovery timeout period, a client mode node device issues a Neighbor Relay Discovery request.
[0103] In step 53, the node device sends a neighbor relay discovery request.
[0104] At this point, the node device starts to operate in a neighbor client model. The relay discovery request is sent, for example, by flooding. Furthermore, a time to live (TTL) may be set in the message to limit the number of node devices that may receive the relay discovery request. The TTL is used to control the optimization range in the network. A larger TTL allows more node devices to receive the relay discovery request, thereby optimizing the relay function of a larger group of node devices, while a smaller TTL allows fewer node devices to optimize the relay function.
[0105] The TTL may be set to 2, which allows the message to be transmitted only one hop.
[0106] In step 54, the node device waits for responses from neighboring node devices until a defined response period times out.
[0107] The response period starts running when a neighbor relay discovery request is sent out and is used to control the period that the node device waits for a response from a neighboring node device. The response period may be a period having a fixed or random length. A node device in client mode waits until the response period expires.
[0108] Please note that only node devices that operate in the neighbor server model and have the Relay Feature turned ON will respond to client requests. If a node device operates in the neighbor server model but is responding to a neighbor relay discovery request from a different node device, it will not send a response. Instead, the node device will send a server busy message to the node device. The node device may attempt to resend the neighbor relay discovery request again within the discovery period.
[0109] The node device may also maintain a counter of the number of responses received. For each response received, the counter is incremented by one.
[0110] In step 55, after the response period expires, if the total number of relay responses received by a node device in client mode is equal to or greater than a threshold, such as 1 or 2, the node device turns off its relaying.
[0111] The received response means that the relay function of the node device that sent the response is currently enabled. Since the node device that sent the response is located relatively nearby (this is controlled by setting the TTL for the relay discovery request), the node device can turn off its own relay function, which does not significantly deteriorate the transmission range of the message relayed in the network, and on the other hand helps to reduce network traffic.
[0112] In step 56, the node device sends an update notification to the control device so that the control device may update the status of the node device accordingly with respect to relay functionality.
[0113] This is because after the relay optimization operation mentioned above is completed, some node devices will turn off the relay function while others will not, therefore, an updated relay status notification from the node should be sent to the control device.
[0114] A node device may keep its relay function on if the number of responses it receives from other node devices is below a threshold, in which case the node device enters a so-called server mode and becomes able to respond to neighbor relay discovery requests from other node devices, allowing other node devices to optimize their relay functions.
[0115] In carrying out the above method, the following points should be noted.
[0116] When the client mode is not active on a node device, a server mode runs on the node device and responds to client requests from neighboring node devices operating in client mode. Also, a node device running the server mode responds to relay discovery requests from node devices running the client mode without publishing the response.
[0117] The discovery procedure lasts for a defined period of time, which may be adjusted based on the size of the mesh network. After the discovery period times out, the server and clients enter a Discovery Off state.
[0118] The present disclosure is not limited to the examples disclosed above, but can be modified and extended by those skilled in the art beyond the scope of the present disclosure disclosed in the appended claims, without the need to apply inventive skills, for use in any data communication, data exchange and data processing environment, system or network.
Claims
1. 1. A method of controlling a relay function of a first node device in a mesh network including a plurality of operatively interconnected node devices, the relay function of each node device having an initial status of being enabled, the method being performed by the first node device; receiving a relay optimization message; sending a neighbor relay discovery request to the number of additional node devices after a random waiting period; awaiting a neighbor relay discovery response from the number of further node devices until expiration of a response period that begins upon transmission of the neighbor relay discovery request, the neighbor relay discovery response being received from the further node device if the further node device is operating in a response mode; If the number of neighbor relay discovery responses is equal to or greater than a threshold, disabling its own relay function; after the expiration of the response period, if the number of neighbor relay discovery responses is less than the threshold, performing by the first node device: entering a response mode; and sending a neighbor relay discovery response in response to the neighbor relay discovery request received in the response mode; A method comprising:
2. The relay optimization message includes a discovery period, and the random waiting period occurs during the discovery period, and the method includes: responding, by the first node device, to a neighbor relay discovery request only before expiration of the discovery period; The method of claim 1 , comprising:
3. The method of claim 1 or 2, wherein the relay optimization message is received from a control device external to the mesh network or from firmware internal to the first node device.
4. The method of claim 1 or 2, wherein the response period is a random or fixed time period.
5. 3. The method of claim 1, wherein sending a neighbor relay discovery request to a number of further node devices comprises setting a time to live (TTL) value of the neighbor relay discovery request.
6. The method of claim 1 or 2, wherein the threshold value is 1.
7. The method of claim 1 or 2, wherein the method includes the step of sending a relay status update notification to a control device for recording.
8. 3. A node device configured to control its relay function according to the method of claim 1 or 2, wherein the node device is connected in a mesh network including a plurality of operatively interconnected node devices, and the relay function of each node device has an initial status of being enabled.
9. A mesh network comprising a plurality of node devices according to claim 8.
10. A computer readable storage medium storing instructions that, when executed on at least one processor, cause the at least one processor to perform the method of claim 1 or 2.