Mesh network node upgrading method and device and electronic equipment

By determining the first hop count and maximum hop count of nodes in the Mesh network and calculating the upgrade time point, the problems of high server pressure and high firmware upgrade failure rate are solved, and orderly upgrades and high success rate firmware upgrades are achieved.

CN114845324BActive Publication Date: 2026-01-20BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210406717.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-18
Publication Date
2026-01-20
Estimated Expiration
2042-04-18

AI Technical Summary

Technical Problem

In existing technologies, upgrading Mesh network nodes leads to high server load and a high firmware upgrade failure rate. How can we reduce server load and improve firmware upgrade success rate through effective upgrade methods?

Method used

By determining the node's first hop count in the Mesh network, and combining the upgrade start time with the network's maximum hop count, the node's upgrade time point is calculated, and the upgrade operation is performed at that time point, including obtaining firmware upgrade data and performing the upgrade.

Benefits of technology

This effectively reduced server pressure, improved the success rate of firmware upgrades, and avoided server overload caused by a large number of node upgrade requests at the same time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114845324B_ABST
    Figure CN114845324B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a node upgrading method and device in a Mesh network and an electronic device, and relates to the technical field of wireless communication. The method specifically comprises: determining a first hop number of the node in the Mesh network; determining an upgrading time point of the node according to an upgrading start time, a maximum hop number of the Mesh network and the first hop number; and performing an upgrading operation at the upgrading time point, so that the upgrading time points of the nodes in the Mesh network are staggered in order, a large number of nodes do not initiate upgrading requests to the server at the same time, the pressure on the server is effectively reduced, the cost of the server is reduced, and the success rate of firmware upgrading is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the field of wireless communication, and particularly refers to a node upgrading method in a Mesh network, a device and an electronic device. BACKGROUND

[0002] With the continuous development of wireless mesh network (Mesh) networking, in the field of intelligent routing, especially in the aspect of whole-house coverage routing, it has been widely applied and developed. As a result, the firmware update of the router is more and more frequent, which leads to the increase of the pressure of the server. In particular, the update strategy for more effective router firmware has also become one of the main research directions.

[0003] In the related art, the main update strategies include the following two kinds: all nodes are upgraded at the same time or each node is randomly staggered in a time period.

[0004] However, the above-mentioned technology will cause the server to have a large pressure, and the firmware upgrade failure rate will also be increased. Therefore, how to reduce the pressure of the server and improve the firmware upgrade success rate through an effective and reasonable node upgrading method in a Mesh network has become a problem to be solved. SUMMARY

[0005] The present disclosure provides a node upgrading method in a Mesh network, a device and an electronic device, so as to reduce the pressure of the server and improve the firmware upgrade success rate through an effective and reasonable node upgrading method in a Mesh network. The technical solutions of the present disclosure are as follows:

[0006] According to a first aspect of an embodiment of the present disclosure, a node upgrading method in a Mesh network is provided, and the method comprises: determining a first hop number of the node in the Mesh network; determining an upgrading time point of the node according to an upgrading start time, a maximum hop number of the Mesh network and the first hop number; and performing an upgrading operation at the upgrading time point.

[0007] According to an embodiment of the present disclosure, the performing of the upgrading operation at the upgrading time point comprises:

[0008] in response to reaching the upgrading time point, sending an upgrading request to a server; receiving firmware upgrading data issued by the server, and upgrading firmware based on the firmware upgrading data.

[0009] According to an embodiment of the present disclosure, the determining of the upgrading time point of the node according to the upgrading start time, the maximum hop number of the Mesh network and the first hop number comprises: obtaining a hop number difference between the maximum hop number and the first hop number; and determining the upgrading time point based on the upgrading start time and the hop number difference.

[0010] According to an embodiment of the present disclosure, the determining the upgrade time point based on the upgrade start time and the hop number difference further comprises: obtaining an update period of topology information of the Mesh network; and determining the upgrade time point based on the upgrade start time, the hop number difference, and the update period.

[0011] According to an embodiment of the present disclosure, the determining the upgrade time point based on the upgrade start time and the hop number difference comprises: obtaining an upgrade random time; and correcting the upgrade time point based on the upgrade random time to obtain a final upgrade time point.

[0012] According to an embodiment of the present disclosure, the first hop number of the node in the Mesh network is negatively correlated with the upgrade time point.

[0013] According to a second aspect of the present disclosure, a device for upgrading a node in a Mesh network is provided, and the device comprises: a first determining module configured to determine a first hop number of the node in the Mesh network; a second determining module configured to determine an upgrade time point of the node according to an upgrade start time, a maximum hop number of the Mesh network, and the first hop number; and an upgrading module configured to perform an upgrade operation at the upgrade time point.

[0014] According to an embodiment of the present disclosure, the upgrading module is further configured to: in response to reaching the upgrade time point, send an upgrade request to a server; receive firmware upgrade data issued by the server, and upgrade firmware based on the firmware upgrade data.

[0015] According to an embodiment of the present disclosure, the second determining module is further configured to: obtain a hop number difference between the maximum hop number and the first hop number; and determine the upgrade time point based on the upgrade start time and the hop number difference.

[0016] According to an embodiment of the present disclosure, the second determining module is further configured to: obtain an update period of topology information of the Mesh network; and determine the upgrade time point based on the upgrade start time, the hop number difference, and the update period.

[0017] According to an embodiment of the present disclosure, the second determining module is further configured to: obtain an upgrade random time; and correct the upgrade time point based on the upgrade random time to obtain a final upgrade time point.

[0018] According to an embodiment of the present disclosure, the first hop number of the node in the Mesh network is negatively correlated with the upgrade time point.

[0019] According to a third aspect of the embodiments of the present disclosure, an electronic device is provided, comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the node upgrading method in a Mesh network as provided in the first aspect of the embodiments of the present disclosure.

[0020] According to a fourth aspect of the embodiments of the present disclosure, a computer readable storage medium is provided, when instructions in the computer readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the node upgrading method in a Mesh network as provided in the first aspect of the embodiments of the present disclosure.

[0021] According to a fifth aspect of the embodiments of the present disclosure, a computer program product is provided, comprising a computer program, characterized by that the computer program is executed by a processor to implement the node upgrading method in a Mesh network as provided in the first aspect of the present disclosure.

[0022] The technical solutions provided by the embodiments of the present disclosure at least bring the following beneficial effects:

[0023] The node upgrading method in a Mesh network of the embodiments of the present disclosure determines the first hop number of the node in the Mesh network, and determines the upgrading time point of the node according to the upgrading start time, the maximum hop number of the Mesh network and the first hop number, and performs the upgrading operation at the upgrading time point. Thus, the upgrading time point of the node is determined according to the upgrading start time, the maximum hop number and the first hop number, which avoids that a large number of nodes initiate upgrading requests to the server at the same time, effectively reduces the pressure and cost of the server, and improves the success rate of the firmware upgrading.

[0024] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF DRAWINGS

[0025] The accompanying drawings, which are incorporated into and form part of the specification, illustrate embodiments consistent with the present disclosure and, together with the specification, serve to explain the principles of the present disclosure, and do not constitute an improper limitation on the present disclosure.

[0026] Figure 1 is a flowchart of a node upgrading method in a Mesh network according to an exemplary embodiment.

[0027] Figure 2 is a schematic diagram of a node in a Mesh network according to an exemplary embodiment.

[0028] Figure 3 is a flowchart of another node upgrading method in a Mesh network according to an exemplary embodiment.

[0029] Figure 4 is a flow diagram of another method for upgrading a node in a mesh network according to an example embodiment.

[0030] Figure 5 is a flow diagram of another method for upgrading a node in a mesh network according to an example embodiment.

[0031] Figure 6 is a flow diagram of another method for upgrading a node in a mesh network according to an example embodiment.

[0032] Figure 7 is a flow diagram of another method for upgrading a node in a mesh network according to an example embodiment.

[0033] Figure 8 is a block diagram of a device for upgrading a node in a mesh network according to an example embodiment.

[0034] Figure 9 is a block diagram of an electronic device according to an example embodiment. DETAILED DESCRIPTION

[0035] In order for those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be described clearly and completely below with reference to the drawings.

[0036] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present disclosure described herein can be implemented in an order other than that illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Rather, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0037] Figure 1 is a flow diagram of a method for upgrading a node in a mesh network according to an example embodiment.

[0038] As shown in Figure 1 the method for upgrading a node in a mesh network comprises the following steps:

[0039] S101, determining a first hop number of the node in the mesh network.

[0040] The mesh network, also known as multi-hop network, is a wireless mesh network.

[0041] The hop count refers to the hop distance between a node in a Mesh network and the control node in the network.

[0042] For example, such as Figure 2 The diagram illustrates the structure of a mesh network. The mesh network includes a controller node and multiple agent nodes. The node upgrade method provided in this embodiment is applicable to both controller and agent nodes. The mesh network can include multiple levels of nodes, where the controller node is at the first level, the agent node adjacent to the controller node is at the second level, the agent node adjacent to the second-level agent node is at the third level, and so on, up to N levels, where N is a positive integer greater than or equal to 1. Each level can contain one or more nodes.

[0043] Continue as Figure 2 As shown, the Mesh network includes four node levels: the first level is the control node 0, the second level has three proxy nodes 1, the third level has three proxy nodes 2, and the fourth level has three proxy nodes 3. It should be noted that the number of nodes in each level can be the same or different; this application does not impose any restrictions on this.

[0044] Each node has its own local hop count (local_hop), referred to as the first hop count in this application. This refers to the number of hops the node makes relative to the control node. Continuing... Figure 2 As shown, the first hop count of the control node is 0, the first hop count of proxy node 1 is 1, the first hop count of proxy node 2 is 2, and the first hop count of proxy node 3 is 3.

[0045] It should be noted that this application does not limit the specific method for determining the first hop number of a node in the Mesh network, and the method can be selected according to the actual situation.

[0046] Optionally, the first hop number of a node in the mesh network can be determined based on the mesh network's topology information. Optionally, the topology information includes: node type and number of nodes, etc.

[0047] Optionally, the control node can collect and periodically update the topology information of the Mesh network and send it to the nodes. For example, the control node can broadcast the information, and the proxy nodes in the Mesh network can receive the topology information of the Mesh network.

[0048] Optionally, the node can obtain the first hop number of itself when joining the Mesh network. For example, the control node can determine the position of the node in the Mesh network when joining, and then determine the first hop number of the node and indicate the first hop number to the node.

[0049] S102, determine the upgrade time point of the node according to the upgrade start time, the maximum hop number of the Mesh network and the first hop number.

[0050] It should be noted that the determination of the upgrade start time in the present application is not limited, and can be selected according to actual conditions.

[0051] Optionally, in the case of timing updating of the firmware, the upgrade start time can be determined based on the set time interval.

[0052] Optionally, in the case of indication updating of the firmware, the upgrade start time (update_start_time) can be obtained based on the upgrade indication. For example, when the server detects the firmware upgrade, the server broadcasts the upgrade indication to the node, and the upgrade indication can carry the upgrade start time.

[0053] Optionally, the upgrade start time can be customized by the user; optionally, the system default upgrade start time can be selected.

[0054] It should be noted that the specific manner of determining the maximum hop number (max_hop) of the node in the Mesh network in the present application is not limited, and can be selected according to actual conditions.

[0055] Optionally, the maximum hop number of the node in the Mesh network can be determined according to the topology information of the Mesh network.

[0056] In the embodiment of the present disclosure, after obtaining the upgrade start time (update_start_time), the maximum hop number (max_hop) of the Mesh network and the first hop number (local_hop), the upgrade time point (update_time) of the node can be determined based on the upgrade start time (update_start_time), the maximum hop number (max_hop) of the Mesh network and the first hop number (local_hop). There is a difference in the hop number between the nodes, and accordingly, the upgrade time points of the nodes can be staggered based on the hop number difference to avoid the problem of upgrade conflict.

[0057] S103, perform the upgrade operation at the upgrade time point.

[0058] In the embodiments of the present disclosure, after determining the upgrade time point of the node, the upgrade operation on the firmware can be performed, the data packet of the firmware to be upgraded is obtained, and the firmware is upgraded based on the data packet of the firmware to be upgraded. Alternatively, the incremental data packet of the firmware to be upgraded can be obtained, and the firmware is upgraded based on the incremental data packet of the firmware to be upgraded.

[0059] Firmware refers to a device driver stored in a device.

[0060] It should be noted that the specific method of firmware upgrade is not limited in the present application, and can be selected according to actual conditions. Alternatively, an upgrade timing unit or a timer is arranged in the node, and the firmware is upgraded according to a set time interval. That is, the node can determine that the firmware upgrade condition is met every set time interval.

[0061] Alternatively, the server sends an upgrade indication to the node, and the node determines that the firmware upgrade condition is met after receiving the upgrade indication. The server can broadcast the upgrade indication in the Mesh network. Alternatively, the server sends the upgrade indication to a control node in the Mesh network, and the control node broadcasts the upgrade indication to other remaining nodes in the Mesh network.

[0062] According to the node upgrade method in the Mesh network in the embodiments of the present disclosure, the first hop number of the node in the Mesh network is determined, the upgrade time point of the node is determined according to the upgrade start time, the maximum hop number of the Mesh network and the first hop number, and the upgrade operation is performed at the upgrade time point. Therefore, the upgrade time point of the node is determined according to the upgrade start time, the maximum hop number and the first hop number, the upgrade time points of the nodes in the Mesh network are orderly staggered, a large number of nodes in the Mesh network initiate upgrade requests to the server at the same time is avoided, the pressure and cost of the server are effectively reduced, and the success rate of firmware upgrade is improved.

[0063] As a possible implementation, after determining the upgrade time point of the node, an upgrade request can be initiated to the server, and then the upgrade operation is performed.

[0064] Figure 3 is a flowchart of a node upgrade method in a Mesh network according to an embodiment of the present disclosure, which is further combined with the above embodiments. Figure 3 The specific process of performing the upgrade operation at the upgrade time point is explained and described, including the following steps:

[0065] S301, in response to reaching the upgrade time point, an upgrade request is sent to the server.

[0066] It should be noted that the specific manner of sending the upgrade request to the server is not limited in the present application, and can be selected according to actual conditions.

[0067] Optionally, the upgrade request can be sent to the server by using a Hyper Text Transfer Protocol (HTTP).

[0068] Further, after sending the upgrade request to the server, the server also needs to detect whether there is firmware upgrade. If it is detected that there is no firmware to be upgraded, that is, the server does not query the firmware upgrade data, information can be sent to the user to remind the user that the current firmware does not need to be upgraded. If it is detected that there is firmware to be upgraded, that is, the server queries the firmware upgrade data, the firmware upgrade data can be issued to upgrade the firmware.

[0069] S302, receiving the firmware upgrade data issued by the server, and upgrading the firmware based on the firmware upgrade data.

[0070] In the embodiments of the present disclosure, after receiving the firmware upgrade data issued by the server, the firmware can be upgraded based on the firmware upgrade data. Optionally, the firmware upgrade data can be full data or incremental data.

[0071] According to the node upgrade method in the Mesh network, the upgrade request can be sent to the server in response to the arrival of the upgrade time point, the firmware upgrade data issued by the server can be received, and the firmware can be upgraded based on the firmware upgrade data. Therefore, the upgrade time points of the nodes in the Mesh network can be staggered in order, the pressure and cost of the server are reduced, and the firmware is upgraded based on the firmware upgrade data, thereby improving the correctness and success rate of the firmware upgrade.

[0072] Figure 4 is a flowchart of a node upgrade method in a Mesh network according to an embodiment of the present disclosure, which is further combined with the above embodiments. Figure 4 The process of determining the upgrade time point of the node according to the upgrade start time, the maximum hop number of the Mesh network and the first hop number is explained and described, including the following steps:

[0073] S401, obtaining the hop number difference between the maximum hop number and the first hop number.

[0074] It should be noted that after obtaining the maximum hop number and the first hop number, the maximum hop number and the first hop number can be subtracted to obtain the hop number difference between the maximum hop number and the first hop number.

[0075] It should be noted that the hop difference refers to the difference in the hop distance of a node in the Mesh network relative to the control node in the network, and the smaller the hop difference, the more priority the firmware has for upgrading.

[0076] S402, determining an upgrade time point based on the upgrade start time and the hop difference.

[0077] In the related art, the update strategy of the firmware is often that all nodes upgrade at the same time, which leads to a relatively large pressure on the upgrade server and also increases the firmware upgrade failure rate.

[0078] In order to solve the above problems in the present application, after obtaining the hop difference, a time adjustment parameter can be obtained based on the hop difference, the upgrade start time is adjusted based on the time adjustment parameter, and then the upgrade time point corresponding to the node is obtained.

[0079] For example, the hop difference between the maximum hop and the first hop of the proxy node 1 is 2, and a time adjustment parameter A1 of the proxy node 1 can be obtained. The hop difference between the maximum hop and the first hop of the proxy node 2 is 1, and a time adjustment parameter A2 of the proxy node 2 can be obtained. A1 and A2 are two different values, and the upgrade start time is adjusted based on A1 and A2 respectively, and two different upgrade time points can be obtained, thereby achieving the purpose of staggered upgrading. Alternatively, the node with fewer hops can be upgraded first, or the node with more hops can be upgraded.

[0080] Therefore, the present disclosure proposes a node upgrading method in a Mesh network, which can orderly stagger the upgrade time points of the nodes in the Mesh network, reduce the pressure on the server, and improve the success rate of firmware upgrading.

[0081] After obtaining the hop difference, a time hop parameter is obtained based on the hop difference, which can be obtained in the following manner: obtaining an update period (update_period) of the topology information of the Mesh network, and determining the upgrade time point based on the upgrade start time, the hop difference, and the update period. That is, the product between the hop difference and the update period is determined as a time adjustment parameter, and the upgrade start time is adjusted based on the time adjustment parameter, for example, the sum of the two is obtained to obtain the upgrade time point of the node.

[0082] For example, as shown in Figure 2 The first hop (local_hop) of the proxy node 1 is 1, the maximum hop (max_hop) of the Mesh network is 3, and the hop difference of the proxy node 1 is 2. The upgrade time point (update_time1) of the proxy node 1 is as follows:

[0083] update_time1 = update_start_time + (max_hop - local_hop1) * update_period,

[0084] That is, update_time1 = update_start_time + 2 * update_period.

[0085] The first hop number (local_hop) of the proxy node 2 is 2, the maximum hop number (max_hop) of the Mesh network is 3, and the hop number difference of the proxy node 2 is 1. The upgrade time point (update_time2) of the proxy node 2 is as follows:

[0086] update_time2 = update_start_time + (max_hop - local_hop2) * update_period,

[0087] That is, update_time2 = update_start_time + 1 * update_period.

[0088] Through the processing in the above manner, the upgrade time points of the proxy node 1 and the proxy node 2 are staggered.

[0089] Optionally, in the embodiments of the present disclosure, the greater the first hop number of a node in the Mesh network, the more preferentially the firmware is upgraded, that is, the first hop number of the node in the Mesh network is negatively correlated with the upgrade time point.

[0090] For example, as shown in FIG. 1, the first hop number of the proxy node 1 is 1, the first hop number of the Agent 2 is 2, and the first hop number of the proxy node 3 is 3, that is, the first hop number of the proxy node 3 is the largest. Therefore, the firmware is upgraded more preferentially, that is, the node with a large first hop number (lower-level node) is preferentially upgraded to the node with a small first hop number (upper-level node), thereby avoiding the problem that the lower-level node fails to be upgraded due to the restart of the upper-level node, and improving the success rate of the firmware upgrade. Figure 2

[0091] Continuing to refer to FIG. 1, there can be multiple nodes with the same hop number in the Mesh network, for example, there are three nodes with a first hop number of 1, three nodes with a first hop number of 2, and three nodes with a first hop number of 3. In this case, there is also a problem of upgrade conflict at the same time point, which causes a large server pressure. Figure 2

[0092] To solve the above problem, one embodiment of the present disclosure provides another node upgrade method in a Mesh network. As shown in FIG. 2, Figure 5 Figure 5 ​​​is another flowchart of a node upgrading method in a Mesh network. Based on the above embodiment, the method can further include the following steps.

[0093] S501, obtaining an upgrading random time.

[0094] It should be noted that when the first hop numbers of the nodes are the same, the upgrading time points of the nodes in the Mesh network can be sequentially staggered due to the existence of the upgrading random time (random_time).

[0095] It should be noted that the upgrading random time in the present application is not limited, and can be selected according to actual conditions.

[0096] As a possible implementation, an update period (update_period) of the Mesh network topology information can be obtained, and less than half of the update period is selected as the upgrading random time, that is, random_time < (1 / 2*update_period).

[0097] It should be noted that the specific method of obtaining the random time in the present application is not limited, and can be selected according to actual conditions.

[0098] Optionally, a random (random) function can be used to obtain the upgrading random time.

[0099] S502, correcting the upgrading time point based on the upgrading random time to obtain a final upgrading time point.

[0100] In the embodiment of the present application, after the upgrading random time is obtained, the upgrading time point can be corrected to obtain the final upgrading time point.

[0101] For example, as shown in Figure 2 , the first hop number (local_hop) of the proxy node 2 is 2, the maximum hop number (max_hop) of the Mesh network is 3, the hop number difference of the proxy node 2 is 1, and the upgrading random time is random_time. The final upgrading time point (update_time2) of the proxy node 2 is as follows:

[0102] update_time2 = update_start_time + (max_hop-local_hop2)*update_period+random_time, that is, update_time2 = update_start_time + 1*update_period+random_time.

[0103] For example, continue asFigure 2 As shown, the first hop number (local_hop) of the proxy node 1 is 1, the maximum hop number (max_hop) of the Mesh network is 3, the hop number difference of the proxy node 1 is 2, the upgrade random time is random_time, and the final upgrade time point (update_time1) of the proxy node 1 is as follows:

[0104] update_time1 = update_start_time + (max_hop - local_hop1) * update_period + random_time, that is, update_time1 = update_start_time + 2 * update_period + random_time.

[0105] According to the node upgrade method in the Mesh network provided by the embodiment of the present disclosure, the upgrade time points of nodes with different hop numbers are staggered, the upgrade time points of nodes with the same hop number are staggered due to the existence of the upgrade random time, the server is prevented from simultaneously receiving upgrade requests from all nodes, and the pressure on the server is reduced. In addition, since the first hop number of the node in the Mesh network is negatively correlated with the upgrade time point, the problem that the upgrade of a lower-level node (with a large hop number) fails due to the upgrade of an upper-level node (with a small hop number) can be avoided, and the success rate of the firmware upgrade is improved.

[0106] Figure 6 is a flowchart of a node upgrade method in a Mesh network according to an embodiment of the present disclosure, including the following steps:

[0107] S601, determining the first hop number of the node in the Mesh network.

[0108] S602, obtaining the hop number difference between the maximum hop number and the first hop number.

[0109] S603, obtaining the update period of the topology information of the Mesh network.

[0110] S604, determining the upgrade time point based on the upgrade start time, the hop number difference, and the update period.

[0111] S605, obtaining the upgrade random time.

[0112] S606, correcting the upgrade time point based on the upgrade random time to obtain the final upgrade time point.

[0113] S607, in response to the arrival of the upgrade time point, sending an upgrade request to the server.

[0114] S608, receiving the firmware upgrade data issued by the server, and upgrading the firmware based on the firmware upgrade data.

[0115] According to the node upgrading method in the Mesh network, the node can send an upgrading request to the server in response to reaching the upgrading time point, receive the firmware upgrade data issued by the server, and upgrade the firmware based on the firmware upgrade data. Thus, the upgrading time points of the nodes in the Mesh network can be staggered in order, the pressure and cost of the server are reduced, the firmware is upgraded based on the firmware upgrade data, and the correctness and success rate of the firmware upgrading are improved.

[0116] As shown in the above, Figure 7 The control node can count the topology information of the current Mesh network, periodically update the topology information to the proxy node 1, the proxy node 2 and the proxy node 3, and calculate the maximum hop (max_hop) of the current Mesh network as 3, the first hop (local_hop) of the control node as 0, the first hop (local_hop) of the proxy node 1 as 1, the first hop (local_hop) of the proxy node 2 as 2, and the first hop (local_hop) of the proxy node 3 as 3 according to the updated topology information.

[0117] Further, when reaching the upgrading start time (update_start_time), each node including the control node, the proxy node 1, the proxy node 2 and the proxy node 3 can calculate the upgrading time point (update_time) of each node according to the maximum hop (max_hop) and the first hop (local_hop) of the node itself.

[0118] Therefore, since the first hops (local_hop) of the nodes are different, the upgrading time points of the nodes are staggered. Further, when the first hops (local_hop) of the nodes are the same, the upgrading random time (random_time) is added, and since the upgrading random time (random_time) exists, the upgrading time points of the nodes are staggered.

[0119] Further, in response to reaching the upgrading time point, the server can be sent an upgrading request, and it is detected whether there is upgradeable firmware. If the upgradeable firmware is detected, the firmware upgrade data issued by the server is received, and the proxy node 3, the proxy node 2, the proxy node 1 and the control node are sequentially upgraded based on the firmware upgrade data.

[0120] In summary, the node upgrading method in the Mesh network can stagger the upgrading time points of the nodes in the Mesh network in order, avoid a large number of nodes from initiating upgrading requests to the server at the same time, effectively reduce the pressure and cost of the server, and ensure that the lower-level nodes are upgraded earlier than the upper-level nodes based on the principle that the larger the first hop number is, the earlier the upgrading is, thereby avoiding the problem that the upgrading of the lower-level nodes fails due to the upgrading and restart of the upper-level nodes, and improving the success rate of the firmware upgrading.

[0121] Figure 8 is a block diagram of a node upgrading apparatus in a Mesh network according to an exemplary embodiment.

[0122] As shown in Figure 8 , the node upgrading apparatus 1000 in the Mesh network comprises a first determining module 110, a second determining module 120 and an upgrading module 130.

[0123] The first determining module 110 is configured to determine a first hop number of the node in the Mesh network.

[0124] The second determining module 120 is configured to determine an upgrading time point of the node according to an upgrading start time, a maximum hop number of the Mesh network and the first hop number.

[0125] The upgrading module 130 is configured to perform an upgrading operation at the upgrading time point.

[0126] Further, the upgrading module 130 is further configured to: in response to reaching the upgrading time point, send an upgrading request to a server; receive firmware upgrading data issued by the server, and upgrade firmware based on the firmware upgrading data.

[0127] Further, the second determining module 120 is further configured to: obtain a hop number difference between the maximum hop number and the first hop number; and determine the upgrading time point based on the upgrading start time and the hop number difference.

[0128] Further, the second determining module 120 is further configured to: obtain an updating period of topology information of the Mesh network; and determine the upgrading time point based on the upgrading start time, the hop number difference and the updating period.

[0129] Further, the second determining module 120 is further configured to: obtain an upgrading random time; and correct the upgrading time point based on the upgrading random time to obtain a final upgrading time point.

[0130] Further, the first hop number of the node in the Mesh network is negatively correlated with the upgrading time point.

[0131] According to the node upgrading device in the Mesh network, the first hop number of the node in the Mesh network is determined, the upgrading time point of the node is determined according to the upgrading start time, the maximum hop number of the Mesh network and the first hop number, and the upgrading operation is performed at the upgrading time point. Therefore, the upgrading time point of the node is determined according to the upgrading start time, the maximum hop number and the first hop number, a large number of nodes initiate the upgrading request to the server at the same time is avoided, the pressure and cost of the server are effectively reduced, and the success rate of the firmware upgrading is ensured.

[0132] To achieve the above-mentioned embodiments, the present disclosure further provides an electronic device, such as Figure 9 As shown in the figure, the electronic device 2000 includes a processor 201, one or more memories 202 for storing instructions executable by the processor 201, wherein the processor 201 is configured to perform the node upgrading method in the Mesh network described in the above-mentioned embodiments. The processor 201 and the memory 202 are connected through a communication bus.

[0133] To achieve the above-mentioned embodiments, the present disclosure further provides a computer readable storage medium including instructions, such as a memory 202 including instructions, which can be executed by the processor 201 of the device 1000 to complete the above-mentioned method. Alternatively, the computer readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk and an optical data storage device, etc.

[0134] To achieve the above-mentioned embodiments, the present disclosure further provides a computer program product, including a computer program, characterized in that the computer program is executed by the processor to implement the node upgrading method in the Mesh network described in the above-mentioned embodiments.

[0135] Other embodiments of the present disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the aspects disclosed herein. The present disclosure is intended to cover any variations, uses or adaptive changes of the present disclosure following the general principles thereof and including those expressly stated or implied herein. The specification and examples are to be regarded as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0136] It should be understood that the present disclosure is not limited to the precise structures described and shown in the accompanying drawings, and various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for upgrading a node in a mesh network, the method comprising: The method is suitable for any node in a Mesh network, and comprises: determining a first hop number of the node in the Mesh network, the first hop number being a hop number of the node relative to a control node; determining an upgrade time point of the node according to an upgrade start time, a maximum hop number of the Mesh network and the first hop number; performing an upgrade operation at the upgrade time point; wherein the determining of the upgrade time point of the node according to the upgrade start time, the maximum hop number of the Mesh network and the first hop number comprises: obtaining a hop number difference between the maximum hop number and the first hop number; obtaining a time adjustment parameter based on the hop number difference, and adjusting the upgrade start time based on the time adjustment parameter to obtain the upgrade time point corresponding to the node.

2. The method of claim 1, wherein, The performing of the upgrade operation at the upgrade time point comprises: in response to reaching the upgrade time point, sending an upgrade request to a server; receiving firmware upgrade data issued by the server, and upgrading firmware based on the firmware upgrade data.

3. The method of claim 1, wherein, The determining of the upgrade time point comprises: obtaining a hop number difference between the maximum hop number and the first hop number; obtaining an update period of topology information of the Mesh network; determining the upgrade time point based on the upgrade start time, the hop number difference and the update period.

4. The method of claim 3, wherein, The determining of the upgrade time point further comprises: obtaining an upgrade random time; correcting the upgrade time point based on the upgrade random time to obtain a final upgrade time point.

5. The method of claim 1-4, wherein, The first hop number of the node in the Mesh network is negatively correlated with the upgrade time point.

6. A node upgrading apparatus in a Mesh network, characterized by comprising: The device is suitable for any node in a Mesh network, and comprises: a first determining module configured to determine a first hop number of the node in the Mesh network, the first hop number being a hop number of the node relative to a control node; a second determining module configured to determine an upgrade time point of the node according to an upgrade start time, a maximum hop number of the Mesh network and the first hop number; an upgrade module configured to perform an upgrade operation at the upgrade time point; wherein the second determining module is further configured to: obtain a hop number difference between the maximum hop number and the first hop number; obtain a time adjustment parameter based on the hop number difference, and adjust the upgrade start time based on the time adjustment parameter to obtain the upgrade time point corresponding to the node.

7. The apparatus of claim 6, wherein, The upgrade module is further configured to: in response to reaching the upgrade time point, send an upgrade request to a server; receive firmware upgrade data issued by the server, and upgrade firmware based on the firmware upgrade data.

8. The apparatus of claim 6, wherein, The second determining module is further configured to: obtain a hop number difference between the maximum hop number and the first hop number; obtain an update period of topology information of the Mesh network; determine the upgrade time point based on the upgrade start time, the hop number difference and the update period.

9. The apparatus of claim 8, wherein, The second determining module is further configured to: obtain an upgrade random time; correct the upgrade time point based on the upgrade random time to obtain a final upgrade time point. Based on the upgrade random time, the upgrade time point is corrected to obtain a final upgrade time point.

10. The apparatus of any of claims 6-9, wherein, The first hop number of the node in the Mesh network is negatively correlated with the upgrade time point.

11. An electronic device, comprising: The method comprises the following steps: The memory, the processor and the computer program stored in the memory and executable on the processor, wherein the processor implements the node upgrade method in the Mesh network according to any one of claims 1-5 when executing the program.

12. A computer readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the node upgrade method in the Mesh network according to any one of claims 1-5.

13. A computer program product comprising a computer program which, when executed by a processor, implements the node upgrade method in the Mesh network according to any one of claims 1-5.