CN105049266A - Method for achieving network node control - Google Patents
Method for achieving network node control Download PDFInfo
- Publication number
- CN105049266A CN105049266A CN201510528187.7A CN201510528187A CN105049266A CN 105049266 A CN105049266 A CN 105049266A CN 201510528187 A CN201510528187 A CN 201510528187A CN 105049266 A CN105049266 A CN 105049266A
- Authority
- CN
- China
- Prior art keywords
- node
- counter value
- controlled
- master control
- network
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
- H04L41/0654—Management of faults, events, alarms or notifications using network fault recovery
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W24/00—Supervisory, monitoring or testing arrangements
- H04W24/04—Arrangements for maintaining operational condition
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
Description
技术领域technical field
本发明总体涉及通信领域和物联网领域,并且更具体地,涉及一种实现网络节点控制的方法。The present invention generally relates to the field of communication and the field of Internet of Things, and more specifically, relates to a method for realizing network node control.
背景技术Background technique
对于智能家居领域的产品来说,通过外界因素变化或达到内部预先设定条件,便能自动完成某些预设动作,这是必须具备的一项功能。然而,传统上,这一功能在许多场景中不能预期完成。例如,当受控节点断电后,主控节点执行释放设备(清码)操作,受控节点此时因为无法收到主控节点释放设备(清码)操作的相应消息而导致无法正常退网(被清码),因而导致受控节点之后难以重新入网等。此外,各企业为了抢夺市场,在智能家居产品中往往会尽量考虑低成本的硬件,所以,如何在此类硬件资源上简单高效地完成预设动作,是摆在广大开发者面前的一个难题。For products in the smart home field, it is a must-have function that certain preset actions can be automatically completed when external factors change or internal preset conditions are met. However, traditionally, this function cannot be accomplished as expected in many scenarios. For example, when the controlled node is powered off, the main control node executes the release device (clear code) operation, and the controlled node cannot log out of the network normally because it cannot receive the corresponding message of the master control node release device (clear code) operation. (cleared code), which makes it difficult for the controlled node to re-enter the network and so on. In addition, in order to seize the market, various companies often try to consider low-cost hardware in smart home products. Therefore, how to simply and efficiently complete preset actions on such hardware resources is a difficult problem for developers.
发明内容Contents of the invention
根据本发明的一方面,提供了一种实现网络节点控制的方法,该方法包括:主控节点在当受控节点接入主控节点的网络时将第一计数器值发送给受控节点,第一计数器值指示直到受控节点接入主控节点的网络时预设动作被执行的次数;受控节点接收从主控节点发送的第一计数器值;主控节点以预定时间间隔向受控节点发送根据预设动作的执行而更新的计数器值;受控节点接收从主控节点发送的更新的计数器值;受控节点将接收到的第一计数器值与更新的计数器值进行比较,并根据比较结果执行相应动作。According to an aspect of the present invention, a method for realizing network node control is provided, the method includes: the master control node sends the first counter value to the controlled node when the controlled node accesses the network of the master control node, and the second A counter value indicates the number of times the preset action is executed until the controlled node accesses the network of the master control node; the controlled node receives the first counter value sent from the master control node; the master control node sends a message to the controlled node at predetermined time intervals Send the counter value updated according to the execution of the preset action; the controlled node receives the updated counter value sent from the master control node; the controlled node compares the received first counter value with the updated counter value, and according to the comparison As a result, the corresponding action is performed.
根据本发明的另一方面,提供了一种实现网络节点控制的方法,该方法包括:主控节点在当受控节点接入主控节点的网络时将第一计数器值发送给受控节点,第一计数器值指示直到受控节点接入主控节点的网络时预设动作被执行的次数;主控节点以预定时间间隔向受控节点发送根据预设动作的执行而更新的计数器值,其中受控节点将从主控节点接收的第一计数器值与更新的计数器值进行比较,从而根据比较结果执行相应动作。According to another aspect of the present invention, a method for implementing network node control is provided, the method comprising: the master control node sends the first counter value to the controlled node when the controlled node accesses the network of the master control node, The first counter value indicates the number of times the preset action is executed until the controlled node accesses the network of the master control node; the master control node sends the controlled node a counter value updated according to the execution of the preset action at predetermined time intervals, wherein The controlled node compares the first counter value received from the master control node with the updated counter value, so as to perform corresponding actions according to the comparison result.
根据本发明的另一方面,提供了一种实现网络节点控制的方法,该方法包括:受控节点在接入主控节点的网络时从主控节点接收第一计数器值,其中,第一计数器值指示直到受控节点接入主控节点的网络时预设动作被执行的次数;受控节点以预定时间间隔从主控节点接收根据预设动作的执行而更新的计数器值;以及受控节点将从主控节点接收的第一计数器值与更新的计数器值进行比较,从而根据比较结果执行相应动作。According to another aspect of the present invention, a method for realizing network node control is provided, the method comprising: when the controlled node accesses the network of the master control node, receiving a first counter value from the master control node, wherein the first counter The value indicates the number of times the preset action is performed until the controlled node accesses the network of the master control node; the controlled node receives a counter value updated according to the execution of the preset action from the master control node at predetermined time intervals; and the controlled node The first counter value received from the master control node is compared with the updated counter value, so as to perform corresponding actions according to the comparison result.
本发明所提出的方法简单、高效,因而特别适合于低成本的设备。此外,本发明所提出的方法能够实现网络节点控制,例如,使得网络节点进行自我恢复或自动完成某些预设动作,因此具有智能化的特点。The method proposed by the invention is simple and efficient, and thus is particularly suitable for low-cost equipment. In addition, the method proposed by the present invention can realize network node control, for example, make network nodes perform self-recovery or automatically complete certain preset actions, so it has the characteristics of intelligence.
附图说明Description of drawings
结合以下附图,根据本发明的实施例的描述可以更好地理解本发明,其中:The present invention can be better understood according to the description of the embodiments of the present invention in conjunction with the following drawings, wherein:
图1示出了根据本发明的一个实施例的可以在其中实现本发明的星型网络的示意图;Fig. 1 shows a schematic diagram of a star network in which the present invention can be implemented according to an embodiment of the present invention;
图2示出了根据本发明的一个实施例的可以在其中实现本发明的树型网络的示意图;FIG. 2 shows a schematic diagram of a tree network in which the present invention can be implemented according to an embodiment of the present invention;
图3示出了根据本发明的一个实施例的可以在其中实现本发明的无线网格网络的示意图;FIG. 3 shows a schematic diagram of a wireless mesh network in which the present invention can be implemented according to an embodiment of the present invention;
图4示出了根据本发明的一个实施例的用于实现网络节点控制的方法的流程图;FIG. 4 shows a flowchart of a method for implementing network node control according to an embodiment of the present invention;
图5示出了根据本发明的一个实施例的在主控节点侧用于实现网络节点控制的方法的流程图;FIG. 5 shows a flowchart of a method for implementing network node control at the master control node side according to an embodiment of the present invention;
图6示出了根据本发明的一个实施例的在主控节点侧用于实现网络节点控制的方法的流程图;FIG. 6 shows a flowchart of a method for implementing network node control at the master control node side according to an embodiment of the present invention;
图7示出了根据本发明的一个实施例的在受控节点侧用于实现网络节点控制的方法的流程图;以及FIG. 7 shows a flow chart of a method for implementing network node control at the controlled node side according to an embodiment of the present invention; and
图8示出了根据本发明的一个实施例的在受控节点侧用于实现网络节点控制的方法的流程图。Fig. 8 shows a flowchart of a method for implementing network node control at the controlled node side according to an embodiment of the present invention.
具体实施方式Detailed ways
下面将详细描述本发明各个方面的特征和示例性实施例。下面的描述涵盖了许多具体细节,以便提供对本发明的全面理解。但是,对于本领域技术人员来说显而易见的是,本发明可以在不需要这些具体细节中的一些细节的情况下实施。下面对实施例的描述仅仅是为了通过示出本发明的示例来提供对本发明更清楚的理解。本发明绝不限于下面所提出的任何具体配置,而是在不脱离本发明的精神的前提下覆盖了相关特征、结构、操作等的任何修改、替换和改进。Features and exemplary embodiments of various aspects of the invention will be described in detail below. The following description covers numerous specific details in order to provide a thorough understanding of the present invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced without some of these specific details. The following description of the embodiments is only to provide a clearer understanding of the present invention by showing examples of the present invention. The present invention is by no means limited to any specific configuration set forth below, but covers any modifications, substitutions and improvements of related features, structures, operations, etc. without departing from the spirit of the present invention.
本发明可适用于各种网络,例如,星型网络、树型网络、无线网格网络等。下面参照图1、图2和图3分别对星型网络、树型网络以及无线网格网络进行描述。The present invention is applicable to various networks, for example, a star network, a tree network, a wireless mesh network, and the like. The star network, the tree network and the wireless mesh network are described below with reference to FIG. 1 , FIG. 2 and FIG. 3 respectively.
图1示出了根据本发明的一个实施例的可以在其中实现本发明的星型网络100的示意图。星型网络是集中式控制网络。如图1所示,节点A是该星型网络的中心节点并作为主控节点,节点B、C、D、E、F、G均为受控节点。主控节点A可以直接对受控节点B、C、D、E、F、G进行控制,而受控节点B、C、D、E、F、G可以根据主控节点A的控制执行相应动作。在该星型网络100中,受控节点B、C、D、E、F、G在网络中的地位可以是相同的,但它们可以从主控节点A接收相同或不同的控制指令,从而执行相同或不同的动作。FIG. 1 shows a schematic diagram of a star network 100 in which the present invention can be implemented according to an embodiment of the present invention. A star network is a centralized control network. As shown in Figure 1, node A is the central node of the star network and serves as the master control node, and nodes B, C, D, E, F, and G are all controlled nodes. The master control node A can directly control the controlled nodes B, C, D, E, F, and G, and the controlled nodes B, C, D, E, F, and G can perform corresponding actions according to the control of the master control node A . In the star network 100, the positions of the controlled nodes B, C, D, E, F, and G in the network may be the same, but they may receive the same or different control instructions from the master control node A, thereby executing same or different actions.
图2示出了根据本发明的一个实施例的可以在其中实现本发明的树型网络200的示意图。树型网络是分级的集中式控制网络。如图2所示,节点A是该树型网络的中心节点,可以作为主控节点,节点B、C与节点D、E、F、G处于不同的层级。在一方面中,如图2所示,节点B、C相对于节点A可以作为受控节点,而在另一方面中,节点B、C相对于下一级节点D、E、F、G可以作为主控节点。因此,在图2中,主控节点A可以直接对节点B、C进行控制,节点B、C可以根据主控节点A的控制执行相应动作。另外,节点B、C可以分别对节点D、E和F、G进行控制,节点D、E和F、G可以分别根据节点B、C的控制执行相应动作。应当注意,在图2中,尽管节点D、E、F、G分别受节点B、C的控制,但它们都间接地受主控节点A控制。FIG. 2 shows a schematic diagram of a tree network 200 in which the present invention can be implemented according to an embodiment of the present invention. A tree network is a hierarchical centralized control network. As shown in Figure 2, node A is the central node of the tree network and can be used as the main control node. Nodes B, C and nodes D, E, F, and G are at different levels. On the one hand, as shown in Figure 2, nodes B and C can be controlled nodes relative to node A, while on the other hand, nodes B and C can be controlled nodes relative to the next-level nodes D, E, F and G as the master node. Therefore, in FIG. 2 , master control node A can directly control nodes B and C, and nodes B and C can perform corresponding actions according to the control of master control node A. In addition, nodes B and C can control nodes D, E, F, and G respectively, and nodes D, E, F, and G can perform corresponding actions according to the control of nodes B, C, respectively. It should be noted that in FIG. 2, although nodes D, E, F, and G are controlled by nodes B and C respectively, they are all indirectly controlled by master control node A.
图3示出了根据本发明的一个实施例的可以在其中实现本发明的无线网格网络的示意图。无线网格网络是一种无线多跳网络。如图3所示,节点A是该无线网格网络的中心节点,可以作为主控节点。节点B、C和G可以直接与主控节点A进行通信,因而,主控节点A可以直接地控制节点B、C和G;节点D、E和F可以通过节点B、C和G间接地与主控节点A进行通信,因而,主控节点A可以间接地控制节点D、E和F。此外,如图3所示,该无线网格网络中的所有节点可以直接或间接地进行通信,一个节点对另一节点的控制可以通过一种以上方式来实现,并且在某节点发生故障的情况下,可以利用替代路径来实现控制。例如,对于节点E,主控节点A可以经由节点C来直接控制该节点,或者,主控节点A可以经由节点G和F或者G和C(A→G→F→E;A→G→C→E)来控制节点E,又或者,主控节点A可以经由节点G、C、B和D来(A→G→C→B→D→E)来控制节点E。因而,即使节点C出现故障,则主控节点A可以通过例如A→G→F→E来控制节点E。Fig. 3 shows a schematic diagram of a wireless mesh network in which the present invention can be implemented according to an embodiment of the present invention. A wireless mesh network is a wireless multi-hop network. As shown in FIG. 3 , node A is the central node of the wireless mesh network and can serve as a master control node. Nodes B, C, and G can directly communicate with the master node A, therefore, master node A can directly control nodes B, C, and G; nodes D, E, and F can indirectly communicate with nodes B, C, and G Master control node A communicates, and thus, master control node A can indirectly control nodes D, E, and F. In addition, as shown in Figure 3, all nodes in the wireless mesh network can communicate directly or indirectly, one node can control another node in more than one way, and in the case of a node failure In this case, alternative paths can be utilized to achieve control. For example, for node E, master node A can directly control the node via node C, or master node A can control the node directly via nodes G and F or G and C (A→G→F→E; A→G→C →E) to control node E, or, master control node A can control node E via nodes G, C, B and D (A→G→C→B→D→E). Therefore, even if node C fails, master control node A can control node E through, for example, A→G→F→E.
上述图1-图3仅为本发明的应用场景示例。本发明的应用场景不限于上述图1、图2和图3所示的网络拓扑结构,并且接入节点数目也不限于图1、图2和图3中所示的数目,本发明可以适用于具有任意合适的节点数目的任何网络。The above-mentioned FIGS. 1-3 are only examples of application scenarios of the present invention. The application scenarios of the present invention are not limited to the network topology shown in the above-mentioned Fig. 1, Fig. 2 and Fig. 3, and the number of access nodes is not limited to the number shown in Fig. 1, Fig. 2 and Fig. 3, the present invention can be applied to Any network with any suitable number of nodes.
图4示出了根据本发明的一个实施例的用于实现网络节点控制的方法的流程图400。Fig. 4 shows a flowchart 400 of a method for implementing network node control according to an embodiment of the present invention.
如图4所示,用于实现网络节点控制的方法400可以包括如下步骤:As shown in FIG. 4, a method 400 for implementing network node control may include the following steps:
步骤401:主控节点在当受控节点接入主控节点的网络时将第一计数器值发送给受控节点,第一计数器值指示直到受控节点接入主控节点的网络时预设动作被执行的次数;Step 401: The master control node sends the first counter value to the controlled node when the controlled node accesses the network of the master control node, and the first counter value indicates the preset action until the controlled node accesses the network of the master control node the number of times it was executed;
步骤402:受控节点接收从主控节点发送的第一计数器值;Step 402: the controlled node receives the first counter value sent from the master control node;
步骤403:主控节点以预定时间间隔向受控节点发送根据预设动作的执行而更新的计数器值;Step 403: the master control node sends the counter value updated according to the execution of preset actions to the controlled node at predetermined time intervals;
步骤404:受控节点接收从主控节点发送的更新的计数器值;Step 404: the controlled node receives the updated counter value sent from the master control node;
步骤405:受控节点将接收到的第一计数器值与更新的计数器值进行比较,从而根据比较结果执行相应动作。Step 405: The controlled node compares the received first counter value with the updated counter value, so as to perform corresponding actions according to the comparison result.
在一个实施例中,主控节点可以通过向受控节点发送包含更新的计数器值的数据包来向受控节点发送更新的计数器值。In one embodiment, the master control node may send the updated counter value to the controlled node by sending a packet containing the updated counter value to the controlled node.
在一个实施例中,受控节点的数量可以为多个,并且其中,主控节点可以通过单播方式分别向受控节点发送相关联的更新的计数器值。In an embodiment, there may be multiple controlled nodes, and wherein, the master control node may respectively send the associated updated counter values to the controlled nodes in a unicast manner.
在一个实施例中,受控节点的数量可以为多个,并且其中,主控节点可以通过广播方式向这多个受控节点发送相关联的更新的计数器值。In an embodiment, there may be multiple controlled nodes, and the master control node may send the associated updated counter value to the multiple controlled nodes in a broadcast manner.
在一个实施例中,受控节点的数量可以为多个,并且其中,主控节点可以通过组播方式向这多个受控节点发送相关联的更新的计数器值。In an embodiment, there may be multiple controlled nodes, and the master control node may send the associated updated counter value to the multiple controlled nodes in a multicast manner.
在一个实施例中,预设动作可以包括释放受控节点的网络地址和连接的操作。In one embodiment, the preset action may include the operation of releasing the network address and connection of the controlled node.
在一个实施例中,预设动作可以包括使受控节点上电或断电的操作。In one embodiment, the preset action may include an operation of powering on or powering off the controlled node.
根据图4所述的方法,能够实现网络节点控制,例如,使得网络节点进行自我恢复或自动完成某些预设动作。此外,上述方法简单、高效,因而特别适合于低成本的设备。According to the method shown in FIG. 4 , network node control can be realized, for example, enabling the network node to perform self-recovery or automatically complete certain preset actions. In addition, the above-mentioned method is simple and efficient, so it is particularly suitable for low-cost equipment.
下面将参照图5-图8分别从主控节点和受控节点侧来更详细地说明根据本发明的用于实现网络节点控制的方法。The method for implementing network node control according to the present invention will be described in more detail below from the sides of the master control node and the controlled node respectively with reference to FIGS. 5-8 .
图5示出了根据本发明的一个实施例的在主控节点侧用于实现网络节点控制的方法500的流程图。Fig. 5 shows a flowchart of a method 500 for implementing network node control at the master control node side according to an embodiment of the present invention.
如图5所示,根据本发明的一个实施例的在主控节点侧用于实现网络节点控制的方法500可以包括如下步骤:As shown in FIG. 5, a method 500 for implementing network node control at the master control node side according to an embodiment of the present invention may include the following steps:
步骤501:主控节点在当受控节点接入所述主控节点的网络时将第一计数器值发送给所述受控节点,所述第一计数器值指示直到所述受控节点接入所述主控节点的网络时预设动作被执行的次数;Step 501: The master control node sends a first counter value to the controlled node when the controlled node accesses the network of the master control node, and the first counter value indicates that until the controlled node accesses the network of the controlled node The number of times the preset action is executed when the network of the master control node is described;
步骤502:所述主控节点以预定时间间隔向所述受控节点发送根据预设动作的执行而更新的计数器值。Step 502: The master control node sends a counter value updated according to execution of preset actions to the controlled node at predetermined time intervals.
如此,由于主控节点将受控节点接入主控节点的网络时的计数器值以及以预定时间间隔发送的更新的计数器值提供给了受控节点,受控节点将能够根据对这些计数器值的比较结果来执行相应动作。In this way, since the master node provides the controlled node with the counter value when the controlled node accesses the network of the master node and the updated counter value transmitted at predetermined time intervals, the controlled node will be able to Compare the results to perform the corresponding action.
下面将参照图6来对在主控节点侧用于实现网络节点控制的方法进行更详细地描述。The method for implementing network node control at the master control node side will be described in more detail below with reference to FIG. 6 .
图6示出了根据本发明的一个实施例的在主控节点侧用于实现网络节点控制的方法600的流程图。Fig. 6 shows a flowchart of a method 600 for implementing network node control at the master control node side according to an embodiment of the present invention.
如图6所示,在步骤601中,主控节点上电。在步骤602中,主控节点获取初始计数器值,该初始计数器值可以指示主控节点上次掉电前预设动作被执行的次数。在一个实施例中,初始计数器值可以被存储在主控节点的存储装置中。在一个实施例中,存储装置可以为非易失性储存介质,例如闪存。在一个实施例中,预设动作可以是释放受控节点的网络地址和连接的操作,即清码操作。然而,本领域技术人员可以预想到此处的预设动作可以是物联网中任何可能的操作,例如,使能设备上电的操作或使能设备断电的操作等。应理解,对计数器值进行计数的计数器可以与主控节点相集成或与主控节点相独立,并且每当预设动作被执行时,对计数器值进行算术运算,例如,使计数器值递增或递减。As shown in FIG. 6, in step 601, the master control node is powered on. In step 602, the master control node acquires an initial counter value, and the initial counter value may indicate the number of times the preset action was executed before the last power-off of the master control node. In one embodiment, the initial counter value may be stored in a storage device of the master control node. In one embodiment, the storage device may be a non-volatile storage medium, such as a flash memory. In an embodiment, the preset action may be an operation of releasing the network address and connection of the controlled node, that is, a clearing operation. However, those skilled in the art can foresee that the preset action here may be any possible operation in the Internet of Things, for example, an operation of enabling a device to be powered on or an operation of enabling a device to be powered off. It should be understood that the counter that counts the counter value can be integrated with the master control node or independent of the master control node, and whenever a preset action is performed, an arithmetic operation is performed on the counter value, for example, incrementing or decrementing the counter value .
接下来,在步骤603中,主控节点启动定时器,设置定时T。定时器可以被主控节点用来计时,以便随后以预定时间间隔向受控节点发送更新的计数器值,下文对此将会进行详细描述。之后,方法继续进行,一旦预设动作被执行,计数器值就被变化,并且计数器值相应地被更新到主控节点的存储器,如步骤604-606所示。当然,如果没有预设动作被执行,计数器值不发生变化和更新。之后,当主控节点发现受控节点接入主控节点的网络时,即步骤607的判定为“是”的情况,主控节点将指示受控节点接入主控节点的网络时的计数器值,即第一计数器值N1,发送给受控节点,如步骤608所示。Next, in step 603, the master control node starts a timer and sets a timing T. The timer can be used by the master control node to count time, so as to then send updated counter values to the controlled nodes at predetermined time intervals, which will be described in detail below. After that, the method continues, once the preset action is executed, the counter value is changed, and the counter value is correspondingly updated to the memory of the master control node, as shown in steps 604-606. Of course, if no preset action is performed, the counter value does not change and is updated. Afterwards, when the master control node finds that the controlled node accesses the network of the master control node, that is, the judgment in step 607 is "Yes", the master control node will indicate the counter value when the controlled node accesses the network of the master control node , that is, the first counter value N1 is sent to the controlled node, as shown in step 608 .
接下来,主控节点在步骤609判断定时T是否到期。如果定时T尚未到期,则主控节点仍根据预设动作的执行来更新计数器值,并在定时T到期时,在步骤610中将最新更新的计数器值,即第二计数器值N2,发送给受控节点。如果在步骤609中主控节点判定定时T已到期,则主控节点直接将目前最新更新的计数器值,即第二计数器值N2,发送给受控节点。在一个实施例中,主控节点可以通过将计数器值包括在例如心跳数据包的数据包中来将计数器值通知给受控节点。在一个实施例中,当受控节点的数量可以为多个时,主控节点可以通过单播方式分别向受控节点发送相关联的计数器值。在一个实施例中,当受控节点的数量可以为多个时,主控节点可以通过广播方式向这多个受控节点发送相关联的计数器值。在一个实施例中,当受控节点的数量可以为多个时,主控节点可以通过组播方式向这多个受控节点发送相关联的计数器值。Next, the master control node judges in step 609 whether the timing T expires. If the timing T has not yet expired, the master control node still updates the counter value according to the execution of the preset action, and when the timing T expires, in step 610, the newly updated counter value, that is, the second counter value N2, is sent to to the controlled node. If the master control node determines that the timing T has expired in step 609, the master control node directly sends the latest updated counter value, that is, the second counter value N2, to the controlled node. In one embodiment, the master control node may notify the controlled node of the counter value by including the counter value in a data packet, eg a heartbeat packet. In an embodiment, when the number of controlled nodes may be multiple, the master control node may respectively send the associated counter values to the controlled nodes in a unicast manner. In an embodiment, when the number of controlled nodes may be multiple, the master control node may send the associated counter value to the multiple controlled nodes in a broadcast manner. In an embodiment, when there are multiple controlled nodes, the master control node may send the associated counter value to the multiple controlled nodes in a multicast manner.
在一个实施例中,由于不同的受控节点接入主控节点的网络时预设动作被执行的次数可能有所不同,因此针对不同的受控节点的第一计数器值也可不同。在又一个实施例中,针对不同的受控节点的第二计数器值可以不同。例如,在单播方式中,主控节点执行释放其中某个受控节点的网络地址和连接的动作,那么,针对该受控节点的第二计数器值将会变化,而其他受控节点的第二计数器值可能不会发生变化。组播和广播的情形类似于单播的情形。In one embodiment, since different controlled nodes may perform different times of preset actions when they access the network of the master control node, the first counter value for different controlled nodes may also be different. In yet another embodiment, the second counter values for different controlled nodes may be different. For example, in unicast mode, if the master control node executes the action of releasing the network address and connection of one of the controlled nodes, then the second counter value for this controlled node will change, while the first counter value for other controlled nodes will change. Second, the counter value may not change. The case of multicast and broadcast is similar to that of unicast.
接下来,在步骤611中,主控节点重置定时T,以用于在下一时间间隔根据预设动作的执行来更新计数器值以及向受控节点发送计数器值。Next, in step 611 , the master control node resets the timing T for updating the counter value and sending the counter value to the controlled node according to the execution of preset actions at the next time interval.
根据图6所述的方法,主动节点将受控节点接入主控节点的网络时对预设动作执行的计数器值发送给受控节点,并且以预定时间间隔向受控节点发送最新更新的计数器值,从而受控节点根据这些计数器值的比较来采取相应的动作。另外,如上所述,针对受控节点的更新的计数器值与之前的计数器值相比可能不发生变化,此时受控节点则不执行任何动作。According to the method described in Figure 6, the active node sends the counter value of the preset action performed when the controlled node accesses the network of the master control node to the controlled node, and sends the latest updated counter to the controlled node at a predetermined time interval value, so that the controlled node takes corresponding actions according to the comparison of these counter values. In addition, as described above, the updated counter value for the controlled node may not change compared with the previous counter value, and the controlled node does not perform any action at this time.
图7示出了根据本发明的一个实施例的在受控节点侧用于实现网络节点控制的方法700的流程图。Fig. 7 shows a flowchart of a method 700 for implementing network node control at the controlled node side according to an embodiment of the present invention.
如图7所示,在受控节点侧用于实现网络节点控制的方法700包括如下步骤:As shown in FIG. 7, a method 700 for implementing network node control on the controlled node side includes the following steps:
步骤701:受控节点在接入所述主控节点的网络时从所述主控节点接收第一计数器值,其中,所述第一计数器值指示直到所述受控节点接入所述主控节点的网络时预设动作被执行的次数;Step 701: The controlled node receives a first counter value from the master control node when accessing the network of the master control node, wherein the first counter value indicates that until the controlled node accesses the master control node The number of times the preset action is executed during the node's network;
步骤702:所述受控节点以预定时间间隔从所述主控节点接收根据预设动作的执行而更新的计数器值;以及Step 702: the controlled node receives a counter value updated according to the execution of a preset action from the master control node at predetermined time intervals; and
步骤703:所述受控节点将从所述主控节点接收的所述第一计数器值与所述更新的计数器值进行比较,从而根据比较结果执行相应动作。Step 703: The controlled node compares the first counter value received from the master control node with the updated counter value, so as to perform corresponding actions according to the comparison result.
如此,受控节点通过从主控节点接收其在接入主控节点的网络时指示预设动作被执行的次数的计数器值以及在预定时间间隔间隔接收的最新更新的计数器值,受控节点能够根据这些计数器值的比较来采取相应的动作。As such, by receiving from the master node its counter value indicating the number of times preset actions are performed when accessing the network of the master node and the latest updated counter value received at predetermined time intervals, the controlled node can Corresponding actions are taken based on the comparison of these counter values.
下面将参照图8来对在受控节点侧用于实现网络节点控制的方法进行更详细地描述。The method for implementing network node control at the controlled node side will be described in more detail below with reference to FIG. 8 .
图8示出了根据本发明的一个实施例的在受控节点侧用于实现网络节点控制的方法800的流程图。Fig. 8 shows a flowchart of a method 800 for implementing network node control at the controlled node side according to an embodiment of the present invention.
在步骤801中,受控节点上电,进而接入主控节点的网络。在步骤802中,受控节点在上电之后可以接收到主控节点此时发送的指示预设动作被执行的次数的第一计数器值N1。在一个实施例中,该第一计数器值N1可以被保存到受控节点自身的存储装置中。在一个实施例中,该第一计数器值N1也可以被保存在与受控节点分离的独立的存储装置中。In step 801, the controlled node is powered on, and then accesses the network of the master control node. In step 802, after being powered on, the controlled node may receive the first counter value N1 sent by the master control node at this time indicating the number of times the preset actions are executed. In an embodiment, the first counter value N1 may be stored in a storage device of the controlled node itself. In an embodiment, the first counter value N1 may also be stored in an independent storage device separate from the controlled node.
之后,在步骤803中,受控节点以预定时间间隔接收从主控节点发送的更新的计数器值,即第二计数器值N2。同样的,该第二计数器值N2也可以被保存到受控节点自身的存储装置中,或被保存在与受控节点分离的独立的存储装置中。应理解,第二计数器值N2在不同时间间隔总是被更新的。Afterwards, in step 803, the controlled node receives the updated counter value, ie, the second counter value N2, sent from the master control node at predetermined time intervals. Likewise, the second counter value N2 may also be saved in a storage device of the controlled node itself, or in an independent storage device separate from the controlled node. It should be understood that the second counter value N2 is always updated at different time intervals.
接着,在步骤804中,受控节点将接收的计数器值N1与计数器值N2进行比较,从而根据比较结果执行相应动作。Next, in step 804, the controlled node compares the received counter value N1 with the counter value N2, so as to perform corresponding actions according to the comparison result.
在一个实施例中,如果计数器值N1与计数器值N2相等,则受控节点执行第一动作,否则,受控节点执行第二动作,分别如步骤805和806所示。在一个实施例中,第一动作可以是受控节点不执行任何动作。在一个实施例中,第二动作可以是受控节点退出主控节点的网络。在另一个实施例中,第二动作可以是受控节点退出主控节点的网络并恢复出厂设置。在又一个实施例中,第二动作可以是受控节点改变其操作状态,例如当受控节点为LED灯之类的照明装置或含有这样的照明装置时,照明装置此时可以切换其照明颜色或者调整其照明亮度。In one embodiment, if the counter value N1 is equal to the counter value N2, the controlled node performs the first action, otherwise, the controlled node performs the second action, as shown in steps 805 and 806 respectively. In one embodiment, the first action may be that the controlled node does not perform any action. In one embodiment, the second action may be that the controlled node exits the network of the master control node. In another embodiment, the second action may be that the controlled node exits the network of the master control node and restores factory settings. In yet another embodiment, the second action can be that the controlled node changes its operating state, for example, when the controlled node is a lighting device such as an LED lamp or contains such a lighting device, the lighting device can switch its lighting color at this time Or adjust its lighting brightness.
在一个实施例中,受控节点还可以根据接收的计数器值N1与计数器值N2的差值大小来执行不同的动作。在如上提及的LED灯的示例中,如果差值在第一差值范围内时,则LED灯可以切换到第一颜色,例如,红色,而当差值在第二差值范围内时,LED灯可以切换到第二颜色,例如,绿色。然而,应理解,可以针对差值设置更多的范围,以便于例如更精细地调节诸如照明装置的颜色和亮度。In an embodiment, the controlled node may also perform different actions according to the difference between the received counter value N1 and the counter value N2. In the example of the LED light mentioned above, if the difference is within the first difference range, the LED light can switch to the first color, for example, red, and when the difference is within the second difference range, The LED light can be switched to a second color, eg green. However, it should be understood that more ranges can be set for the difference, in order to finer tune adjustments such as the color and brightness of the lighting device, for example.
如此,受控节点通过从主控节点接收其在接入主控节点的网络时指示预设动作被执行的次数的计数器值以及在预定时间间隔间隔接收的最新更新的计数器值,受控节点能够根据这些计数器值的比较来采取相应的动作。应当注意,受控节点接收更新的计数器值的预定时间间隔实际上依赖于主控节点向受控节点发送更新的计数器值的预定时间间隔。应理解,该预定时间间隔并不受具体限制,而是本领域普通技术人员能够根据本发明的教导来设置适当的特定预定时间间隔。As such, by receiving from the master node its counter value indicating the number of times preset actions are performed when accessing the network of the master node and the latest updated counter value received at predetermined time intervals, the controlled node can Corresponding actions are taken based on the comparison of these counter values. It should be noted that the predetermined time interval at which the controlled node receives the updated counter value actually depends on the predetermined time interval at which the master control node sends the updated counter value to the controlled node. It should be understood that the predetermined time interval is not specifically limited, but those skilled in the art can set an appropriate specific predetermined time interval according to the teaching of the present invention.
如上所述,描述了根据本发明的用于实现网络节点控制的方法。根据本发明的发明,能够使得网络节点进行自我恢复或自动完成某些预设动作。此外,本发明所提出的方法简单、高效,因而特别适合于低成本的设备。应理解,在上面的说明中,“受控节点接入主控节点的网络”可以包括组网和入网以及其他情形。As above, the method for implementing network node control according to the present invention is described. According to the invention of the present invention, the network node can be made to perform self-recovery or automatically complete certain preset actions. In addition, the method proposed by the present invention is simple and efficient, and thus is particularly suitable for low-cost equipment. It should be understood that in the above description, "the controlled node accesses the network of the master control node" may include networking, network access and other situations.
上文中提到了“一个实施例”,然而应理解,在各个实施例中提及的特征并不一定只能应用于该实施例,而是可能用于其他实施例或与其他实施例组合使用。"One embodiment" is mentioned above, but it should be understood that the features mentioned in each embodiment are not necessarily only applicable to this embodiment, but may be used in other embodiments or used in combination with other embodiments.
上文中提到了“第一”、“第二”等序数词,然而应理解,这些表述仅是为了叙述和引用的方便,所限定的对象并不存在次序上的先后关系。The ordinal numerals such as "first" and "second" are mentioned above, but it should be understood that these expressions are only for the convenience of description and reference, and there is no sequential relationship between the defined objects.
以上参考本发明的具体实施例对本发明进行了描述,但是本领域技术人员均了解,本文中所提到的实现方法均为本发明声明,所列的具体实施例仅为本发明的应用举例,并不代表本发明仅限于此类应用示例,并且可以对这些具体实施例进行各种修改、组合和变更,而不会脱离由所附权利要求或其等同物限定的本发明的精神和范围。The present invention has been described above with reference to the specific embodiments of the present invention, but those skilled in the art will understand that the implementation methods mentioned herein are all statements of the invention, and the listed specific embodiments are only application examples of the present invention. It is not meant that the present invention is limited to such application examples, and various modifications, combinations and changes may be made to these specific embodiments without departing from the spirit and scope of the present invention as defined by the appended claims or their equivalents.
Claims (15)
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510528187.7A CN105049266B (en) | 2015-08-25 | 2015-08-25 | The method for realizing network node control |
TW105104001A TWI599200B (en) | 2015-08-25 | 2016-02-05 | A method of implementing network node control |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510528187.7A CN105049266B (en) | 2015-08-25 | 2015-08-25 | The method for realizing network node control |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105049266A true CN105049266A (en) | 2015-11-11 |
CN105049266B CN105049266B (en) | 2019-06-07 |
Family
ID=54455488
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510528187.7A Active CN105049266B (en) | 2015-08-25 | 2015-08-25 | The method for realizing network node control |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN105049266B (en) |
TW (1) | TWI599200B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105511428A (en) * | 2015-11-30 | 2016-04-20 | 广州昂宝电子有限公司 | Method for implementing real-time change of state of intelligent equipment, and intelligent equipment |
WO2020211531A1 (en) * | 2019-04-17 | 2020-10-22 | 京东方科技集团股份有限公司 | Illumination control device, system and method |
CN114094209A (en) * | 2021-10-18 | 2022-02-25 | 华人运通(江苏)技术有限公司 | Battery management system, communication control method and device thereof and vehicle |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040179504A1 (en) * | 2003-03-12 | 2004-09-16 | Lg Electronics Inc. | Apparatus and method for tracing GPRS tunnel protocol resource |
CN102461342A (en) * | 2009-06-25 | 2012-05-16 | 皇家飞利浦电子股份有限公司 | Home automation system and method for controlling same |
CN102694707A (en) * | 2012-05-31 | 2012-09-26 | 李英祥 | Bluetooth and android technology-based household information system and monitoring control method |
CN103619010A (en) * | 2013-11-08 | 2014-03-05 | 南京物联传感技术有限公司 | Wireless reset equipment and reset method |
CN104168645A (en) * | 2014-08-18 | 2014-11-26 | 南京物联传感技术有限公司 | Gateway equipment and node equipment networking quitting method |
-
2015
- 2015-08-25 CN CN201510528187.7A patent/CN105049266B/en active Active
-
2016
- 2016-02-05 TW TW105104001A patent/TWI599200B/en not_active IP Right Cessation
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040179504A1 (en) * | 2003-03-12 | 2004-09-16 | Lg Electronics Inc. | Apparatus and method for tracing GPRS tunnel protocol resource |
CN102461342A (en) * | 2009-06-25 | 2012-05-16 | 皇家飞利浦电子股份有限公司 | Home automation system and method for controlling same |
CN102694707A (en) * | 2012-05-31 | 2012-09-26 | 李英祥 | Bluetooth and android technology-based household information system and monitoring control method |
CN103619010A (en) * | 2013-11-08 | 2014-03-05 | 南京物联传感技术有限公司 | Wireless reset equipment and reset method |
CN104168645A (en) * | 2014-08-18 | 2014-11-26 | 南京物联传感技术有限公司 | Gateway equipment and node equipment networking quitting method |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105511428A (en) * | 2015-11-30 | 2016-04-20 | 广州昂宝电子有限公司 | Method for implementing real-time change of state of intelligent equipment, and intelligent equipment |
WO2020211531A1 (en) * | 2019-04-17 | 2020-10-22 | 京东方科技集团股份有限公司 | Illumination control device, system and method |
CN114094209A (en) * | 2021-10-18 | 2022-02-25 | 华人运通(江苏)技术有限公司 | Battery management system, communication control method and device thereof and vehicle |
CN114094209B (en) * | 2021-10-18 | 2023-10-20 | 华人运通(江苏)技术有限公司 | Battery management system, communication control method and device thereof and vehicle |
Also Published As
Publication number | Publication date |
---|---|
TW201709696A (en) | 2017-03-01 |
TWI599200B (en) | 2017-09-11 |
CN105049266B (en) | 2019-06-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11146483B2 (en) | Data forwarding method and node device for mesh network | |
US9754096B2 (en) | Update management | |
US8631101B2 (en) | Dynamic address assignment for address aggregation in low power and lossy networks | |
US8472348B2 (en) | Rapid network formation for low-power and lossy networks | |
US9219682B2 (en) | Mintree-based routing in highly constrained networks | |
US10129202B2 (en) | Optimizing global IPv6 address assignments | |
US10237079B2 (en) | Intelligent network sleep proxy for low power sleeping devices | |
US20150332165A1 (en) | Hierarchical hybrid batch-incremental learning | |
US20160277201A1 (en) | Reliable multicast in low-power and lossy networks | |
US9418340B2 (en) | Fast learning to train learning machines using shadow joining | |
US9563440B2 (en) | Fast learning to train learning machines using smart-triggered reboot | |
US11575603B2 (en) | Route optimization using star-mesh hybrid topology in localized dense ad-hoc networks | |
US20160234114A1 (en) | Troubleshooting openflow networks | |
JP2019057905A (en) | Role-based automatic configuration system and method for an Ethernet switch | |
CN105049266A (en) | Method for achieving network node control | |
CN113260072B (en) | Mesh networking traffic scheduling method, gateway equipment and storage medium | |
US12231337B2 (en) | Route optimization using star-mesh hybrid topology in localized dense ad-hoc networks | |
US9900079B2 (en) | Reliable connectionless low power coverage extension | |
CN107432071B (en) | Lighting mains | |
US10251246B2 (en) | Connected lighting network architecture | |
JP7246016B2 (en) | COMMUNICATION METHOD, PROGRAM AND COMMUNICATION DEVICE | |
CN114762389A (en) | Route discovery in a network with combinational nodes | |
CN106921582A (en) | A kind of method for preventing link obstructions, apparatus and system | |
JP2017041882A (en) | Data transmission method, apparatus and node | |
CN103701703A (en) | Neighbourhood management method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB03 | Change of inventor or designer information |
Inventor after: Liu Qixing Inventor after: Loukan Inventor after: Chen Zhiliang Inventor before: Loukan Inventor before: Liu Qixing Inventor before: Chen Zhiliang |
|
COR | Change of bibliographic data | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
PE01 | Entry into force of the registration of the contract for pledge of patent right |
Denomination of invention: Methods for implementing network node control Granted publication date: 20190607 Pledgee: CITIC Bank Limited by Share Ltd. Shanghai branch Pledgor: Guangzhou On-Bright Electronics Co.,Ltd. Registration number: Y2025980009291 |