CN112468372B - Method and device for detecting equipment state in power line communication network - Google Patents

Method and device for detecting equipment state in power line communication network Download PDF

Info

Publication number
CN112468372B
CN112468372B CN202011398640.4A CN202011398640A CN112468372B CN 112468372 B CN112468372 B CN 112468372B CN 202011398640 A CN202011398640 A CN 202011398640A CN 112468372 B CN112468372 B CN 112468372B
Authority
CN
China
Prior art keywords
node
nodes
state information
controller
adjacent
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011398640.4A
Other languages
Chinese (zh)
Other versions
CN112468372A (en
Inventor
吕宜宣
徐德超
张国宾
郭佳
田甲申
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202011398640.4A priority Critical patent/CN112468372B/en
Publication of CN112468372A publication Critical patent/CN112468372A/en
Application granted granted Critical
Publication of CN112468372B publication Critical patent/CN112468372B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B3/00Line transmission systems
    • H04B3/54Systems for transmission via power distribution lines

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Power Engineering (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Small-Scale Networks (AREA)

Abstract

The application provides a method and a device for detecting equipment states in a power line communication network, wherein an intermediate node acquires state information of adjacent nodes of the intermediate node in a first detection period, receives heartbeat messages sent by adjacent lower nodes in a second detection period, wherein the heartbeat messages comprise state information of the lower nodes of the intermediate node and state information of the adjacent nodes of the lower nodes of the intermediate node, and then the intermediate node aggregates the state information of the adjacent nodes and the state information of the nodes included in the heartbeat messages and then carries the heartbeat messages to be sent to adjacent upper nodes. The intermediate node aggregates the state information of the adjacent node and the state information of the node included in the received heartbeat message, and then sends the heartbeat message to the adjacent upper node, and each node does not need to send the heartbeat message to the controller, so that the bandwidth occupied by sending the heartbeat message is saved.

Description

Method and device for detecting equipment state in power line communication network
Technical Field
The present application relates to a communication technology, and in particular, to a method and an apparatus for detecting a device status in a power line communication (Power Line Communication, abbreviated as PLC) network.
Background
Power line communication is a method based on power line communication, and has been widely used in the field of remote control and the like in recent years. In the power line communication network, a controller (also called a central node) is used for completing networking of nodes (also called stations or terminal devices) in the same area, and the controller is connected and communicated with the nodes through power lines. In a power line communication network, in order to maintain the states of nodes in the network in real time and ensure the effectiveness of networking, a controller needs to monitor the online, offline, off-network and other states of each node in real time, and meanwhile, each node also needs to report its own online state to the controller periodically.
At present, each node in the power line communication network periodically reports a heartbeat message to the controller, the controller determines the state of the node according to the heartbeat message, specifically, if the controller receives the heartbeat message reported by the node in a detection period, whether the node belongs to the power line communication network where the controller is located is determined according to the networking network number of the node included in the heartbeat message, if the node belongs to the power line communication network where the controller is located, the node is determined to be online, and if the node does not belong to the power line communication network where the controller is located, offline operation is performed on the node. And if the controller does not receive the heartbeat message sent by a certain node in the detection period, determining that the node is offline. Meanwhile, each node determines whether to go offline or not by determining whether the success rate of communication between the node and the controller is 0 in a certain time.
According to the state detection mechanism, if the power line communication network is large in scale, a large number of nodes periodically report heartbeat messages to occupy a large amount of bandwidth, so that the network transmission efficiency is affected.
Disclosure of Invention
The application provides a device state detection method and device in a power line communication network, which can save the bandwidth occupied by nodes in the power line communication network for sending heartbeat messages.
The first aspect of the present application provides a method for detecting a device state in a power line communication network, where the method is applied in the power line communication network, the power line communication network includes a controller and a plurality of nodes, the nodes in the power line communication network report heartbeat messages step by step according to a tree structure, the controller is a root node, the plurality of nodes are intermediate nodes or leaf nodes, and the controller and the nodes are connected and communicate through a power line, where the method includes: the method comprises the steps that an intermediate node detects the states of adjacent nodes in a first detection period, acquires the state information of the adjacent nodes of the intermediate node, receives heartbeat messages sent by adjacent lower nodes in a second detection period, wherein the heartbeat messages comprise the state information of the lower nodes of the intermediate node and the state information of the adjacent nodes of the lower nodes of the intermediate node, and aggregates the state information of the adjacent nodes of the intermediate node and the state information of the nodes included in the heartbeat messages to obtain the state information of the associated nodes of the intermediate node, and the associated nodes of the intermediate node comprise the lower nodes of the intermediate node and the adjacent nodes of the lower nodes of the intermediate node. And the intermediate node carries the state information of the associated node of the intermediate node and the state information of the intermediate node in the heartbeat message and sends the heartbeat message to the adjacent superior node.
The intermediate node aggregates the state information of the adjacent nodes and the state information of the nodes included in the received heartbeat message, and then sends the heartbeat message to the adjacent upper node, and each node does not need to send the heartbeat message to the controller, so that the bandwidth occupied by sending the heartbeat message is saved.
With reference to the first aspect, in a first possible implementation manner of the first aspect, the detecting, by the intermediate node, a state of a neighboring node in a first detection period, and obtaining state information of the neighboring node of the intermediate node, specifically is: and the intermediate node judges whether a discovery message sent by the adjacent node of the intermediate node is received in the first detection period, if the intermediate node receives the discovery message sent by the adjacent node of the intermediate node in the first detection period, the intermediate node determines that the adjacent node of the intermediate node is in an on-line state, and if the intermediate node does not receive the discovery message sent by the adjacent node of the intermediate node in the first detection period, the intermediate node determines that the adjacent node of the intermediate node is in an off-line state.
With reference to the first aspect or the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the state information of the neighboring node of the intermediate node is represented by a first state bit diagram, the state information of the node included in the heartbeat message is represented by a second state bit diagram, and the state information of each node in the first state bit diagram and the second state bit diagram occupies at least one bit. The state bit diagram occupies small data volume, so that the bandwidth occupied by sending the heartbeat message can be further reduced.
With reference to the second possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, the aggregation, by the intermediate node, of the state information of the neighboring node of the intermediate node and the state information of the node included in the heartbeat packet, to obtain the state information of the node associated with the intermediate node is specifically: and the intermediate node obtains the state information of the associated node of the intermediate node by taking the union set of the first state bit diagram and the second state bit diagram.
With reference to the second possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, after the first period ends, the intermediate node initializes the first state bitmap table, and state information of nodes included in the first state bitmap table after the initialization is in an offline state.
With reference to the second possible implementation manner of the first aspect, in a fifth possible implementation manner of the first aspect, after the first period ends, the intermediate node determines that the intermediate node is in an offline state, and closes a timer corresponding to the first detection period and the second detection period.
The second aspect of the present application provides a method for detecting a device state in a power line communication network, where the method is applied in the power line communication network, the power line communication network includes a controller and a plurality of nodes, the nodes in the power line communication network report heartbeat messages step by step according to a tree structure, the controller is a root node, the plurality of nodes are intermediate nodes or leaf nodes, and the controller and the nodes are connected and communicate through a power line, and the method includes:
the method comprises the steps that a controller detects the states of adjacent nodes in a first detection period, and state information of the adjacent nodes of the controller is obtained;
the controller receives heartbeat messages sent by adjacent lower nodes in a second detection period, wherein the heartbeat messages comprise state information of the lower nodes of the controller and state information of the adjacent lower nodes of the controller;
The controller aggregates the state information of the adjacent nodes of the controller and the state information of the nodes included in the heartbeat message to obtain the state information of the nodes in the power line communication network;
and the controller updates a network topology table according to the state information of the nodes in the power line communication network.
The intermediate node aggregates the state information of the adjacent node and the state information of the node included in the received heartbeat message, and then sends the heartbeat message to the adjacent upper node, so that each node does not need to send the heartbeat message to the controller, and the bandwidth occupied by sending the heartbeat message is saved.
With reference to the second aspect, in a first possible implementation manner of the second aspect, the controller detects a state of a neighboring node in a first detection period, and obtains state information of the neighboring node of the controller, specifically: the controller judges whether a discovery message sent by a neighboring node of the controller is received in the first detection period, if the discovery message sent by the neighboring node of the controller is received in the first detection period, the controller determines that the neighboring node of the controller is in an on-line state, and if the discovery message sent by the neighboring node of the controller is not received in the first detection period, the controller determines that the neighboring node of the controller is in an off-line state.
With reference to the second aspect or the first possible implementation manner of the second aspect, in a second possible implementation manner of the second aspect, the controller updates a network topology table according to status information of nodes in the power line communication network, specifically:
the controller performs the following updating operations according to the status information of all nodes in the power line communication network:
adding newly-accessed nodes in the network topology table;
modifying the state of the existing nodes in the network topology table to be offline or online, and recording the continuous offline times of offline nodes;
and deleting the nodes which are offline continuously N times in the network topology table from the network topology table, wherein N is an integer which is more than or equal to 2.
With reference to the second possible implementation manner of the second aspect, in a third possible implementation manner of the second aspect, the state information of the neighboring node of the controller is represented by a first state bit diagram, the state information of the node included in the heartbeat packet is represented by a second state bit diagram, and the state information of each node in the first state bit diagram and the second state bit diagram occupies at least one bit.
With reference to the third possible implementation manner of the second aspect, in a fourth possible implementation manner of the second aspect, the aggregating, by the controller, state information of a neighboring node of the controller and state information of a node included in the heartbeat packet to obtain state information of a node in the power line communication network, specifically is: and the controller obtains the state information of the nodes in the power line communication network by taking a union set of the first state bit diagram and the second state bit diagram.
With reference to the second possible implementation manner of the second aspect, in a fifth possible implementation manner of the second aspect, after the end of the first period, the method further includes:
the controller initializes the first state bitmap table, and state information of nodes included in the first state bitmap table after initialization is in an offline state.
The third aspect of the present application provides an intermediate node, where the intermediate node is applied in a power line communication network, the power line communication network includes a controller and a plurality of nodes, the nodes in the power line communication network report heartbeat messages step by step according to a tree structure, the controller is a root node, the plurality of nodes are intermediate nodes or leaf nodes, and the controller and the nodes are connected and communicate through power lines, where the intermediate node includes:
The acquisition module is used for detecting the states of the adjacent nodes in a first detection period and acquiring the state information of the adjacent nodes of the intermediate node;
the receiving module is used for receiving heartbeat messages sent by adjacent lower nodes in a second detection period, wherein the heartbeat messages comprise state information of the lower nodes of the intermediate node and state information of the adjacent nodes of the lower nodes of the intermediate node;
the processing module is used for aggregating the state information of the adjacent nodes of the intermediate node and the state information of the nodes included in the heartbeat message to obtain the state information of the associated nodes of the intermediate node, wherein the associated nodes of the intermediate node comprise lower nodes of the intermediate node and the adjacent nodes of the lower nodes of the intermediate node;
and the sending module is used for carrying the state information of the associated node of the intermediate node and the state information of the intermediate node in the heartbeat message and sending the heartbeat message to the adjacent superior node.
With reference to the third aspect, in a first possible implementation manner of the third aspect, the acquiring module is specifically configured to: judging whether a discovery message sent by a neighboring node of the intermediate node is received in the first detection period, if the discovery message sent by the neighboring node of the intermediate node is received in the first detection period, determining that the neighboring node of the intermediate node is in an online state, and if the discovery message sent by the neighboring node of the intermediate node is not received in the first detection period, determining that the neighboring node of the intermediate node is in an offline state.
With reference to the third aspect or the first possible implementation manner of the third aspect, in a second possible implementation manner of the third aspect, the state information of the neighboring node of the intermediate node is represented by a first state bit diagram, the state information of the node included in the heartbeat packet is represented by a second state bit diagram, and the state information of each node in the first state bit diagram and the second state bit diagram occupies at least one bit.
With reference to the second possible implementation manner of the third aspect, in a third possible implementation manner of the third aspect, the processing module is specifically configured to: and obtaining a union set of the first state bit diagram and the second state bit diagram to obtain the state information of the associated node of the intermediate node.
With reference to the second possible implementation manner of the third aspect, in a fourth possible implementation manner of the third aspect, the intermediate node further includes: and the initialization module is used for initializing the first state bitmap after the first period is over, and the state information of the nodes included in the first state bitmap after the initialization is in an offline state.
With reference to the second possible implementation manner of the third aspect, in a fourth possible implementation manner of the third aspect, the intermediate node further includes: the determining module is used for determining that the intermediate node is in an offline state after the first period is ended, and the timing module is used for closing timers corresponding to the first detection period and the second detection period.
The fourth aspect of the present application provides a controller, where the controller is applied in a power line communication network, the power line communication network includes the controller and a plurality of nodes, the nodes in the power line communication network report heartbeat messages step by step according to a tree structure, the controller is a root node, the plurality of nodes are intermediate nodes or leaf nodes, the controller and the nodes are connected and communicate through a power line, and the controller includes:
the detection module is used for detecting the state of the adjacent node in a first detection period and acquiring the state information of the adjacent node of the controller;
the receiving module is used for receiving heartbeat messages sent by adjacent lower nodes in a second detection period, wherein the heartbeat messages comprise state information of the lower nodes of the controller and state information of the adjacent lower nodes of the controller;
the processing module is used for aggregating the state information of the adjacent nodes of the controller and the state information of the nodes included in the heartbeat message to obtain the state information of the nodes in the power line communication network;
and the updating module is used for updating the network topology table according to the state information of the nodes in the power line communication network.
With reference to the fourth aspect, in a first possible implementation manner of the fourth aspect, the detection module is specifically configured to: judging whether a discovery message sent by a neighboring node of the controller is received in the first detection period, if the discovery message sent by the neighboring node of the controller is received in the first detection period, determining that the neighboring node of the controller is in an on-line state, and if the discovery message sent by the neighboring node of the controller is not received in the first detection period, determining that the neighboring node of the controller is in an off-line state.
With reference to the fourth aspect or the first possible implementation manner of the fourth aspect, in a second possible implementation manner of the fourth aspect, the updating module is specifically configured to: according to the state information of all nodes in the power line communication network, the following updating operation is executed:
adding newly-accessed nodes in the network topology table;
modifying the state of the existing nodes in the network topology table to be offline or online, and recording the continuous offline times of offline nodes;
and deleting the nodes which are offline continuously N times in the network topology table from the network topology table, wherein N is an integer which is more than or equal to 2.
With reference to the second possible implementation manner of the fourth aspect, in a third possible implementation manner of the fourth aspect, the state information of the neighboring node of the controller is represented by a first state bit diagram, the state information of the node included in the heartbeat packet is represented by a second state bit diagram, and the state information of each node in the first state bit diagram and the second state bit diagram occupies at least one bit.
With reference to the third possible implementation manner of the fourth aspect, in a fourth possible implementation manner of the fourth aspect, the processing module is specifically configured to: and taking a union set of the first state bit diagram and the second state bit diagram to obtain the state information of the nodes in the power line communication network.
With reference to the second possible implementation manner of the fourth aspect, in a fifth possible implementation manner of the fourth aspect, the method further includes an initialization module, configured to initialize the first state bitmap table after the first period ends, where state information of nodes included in the first state bitmap table after initialization is in an offline state.
The fifth aspect of the present application provides an intermediate node, where the intermediate node is applied in a power line communication network, the power line communication network includes a controller and a plurality of nodes, the nodes in the power line communication network report heartbeat messages step by step according to a tree structure, the controller is a root node, the plurality of nodes are intermediate nodes or leaf nodes, and the controller and the nodes are connected and communicate through a power line, where the intermediate node includes:
The processor is used for detecting the states of the adjacent nodes in a first detection period and acquiring the state information of the adjacent nodes of the intermediate node;
the receiver is used for receiving heartbeat messages sent by adjacent lower nodes in a second detection period, wherein the heartbeat messages comprise state information of the lower nodes of the intermediate node and state information of the adjacent nodes of the lower nodes of the intermediate node;
the processor is further configured to aggregate status information of a neighboring node of the intermediate node and status information of a node included in the heartbeat packet, to obtain status information of an associated node of the intermediate node, where the associated node of the intermediate node includes a lower node of the intermediate node and a neighboring node of the lower node of the intermediate node;
and the transmitter is used for carrying the state information of the associated node of the intermediate node and the state information of the intermediate node in the heartbeat message and transmitting the heartbeat message to the adjacent superior node.
With reference to the fifth aspect, in a first possible implementation manner of the fifth aspect, the processor is specifically configured to: judging whether a discovery message sent by a neighboring node of the intermediate node is received in the first detection period, if the discovery message sent by the neighboring node of the intermediate node is received in the first detection period, determining that the neighboring node of the intermediate node is in an online state, and if the discovery message sent by the neighboring node of the intermediate node is not received in the first detection period, determining that the neighboring node of the intermediate node is in an offline state.
With reference to the fifth aspect or the first possible implementation manner of the fifth aspect, in a second possible implementation manner of the fifth aspect, the state information of the neighboring node of the intermediate node is represented by a first state bit diagram, the state information of the node included in the heartbeat packet is represented by a second state bit diagram, and the state information of each node in the first state bit diagram and the second state bit diagram occupies at least one bit.
With reference to the second possible implementation manner of the fifth aspect, in a third possible implementation manner of the fifth aspect, the processor is specifically configured to: and obtaining a union set of the first state bit diagram and the second state bit diagram to obtain the state information of the associated node of the intermediate node.
With reference to the second possible implementation manner of the fifth aspect, in a fourth possible implementation manner of the fifth aspect, the processor is further configured to: after the first period is over, initializing the first state bitmap table, wherein the state information of the nodes included in the first state bitmap table after initialization is in an offline state.
With reference to the second possible implementation manner of the fifth aspect, in a fourth possible implementation manner of the fifth aspect, the processor is further configured to: and after the first period is over, determining that the intermediate node is in an offline state, and closing timers corresponding to the first detection period and the second detection period.
The sixth aspect of the present application provides a controller, where the controller is applied in a power line communication network, the power line communication network includes the controller and a plurality of nodes, the nodes in the power line communication network report heartbeat messages step by step according to a tree structure, the controller is a root node, the plurality of nodes are intermediate nodes or leaf nodes, the controller and the nodes are connected and communicate through a power line, and the controller includes:
the processor is used for detecting the states of the adjacent nodes in a first detection period and acquiring the state information of the adjacent nodes of the controller;
the receiver is used for receiving heartbeat messages sent by adjacent lower nodes in a second detection period, wherein the heartbeat messages comprise state information of the lower nodes of the controller and state information of the adjacent lower nodes of the controller;
the processor is further configured to aggregate status information of a neighboring node of the controller and status information of a node included in the heartbeat packet, obtain status information of a node in the power line communication network, and update a network topology table according to the status information of the node in the power line communication network.
With reference to the sixth aspect, in a first possible implementation manner of the sixth aspect, the processor is specifically configured to: judging whether a discovery message sent by a neighboring node of the controller is received in the first detection period, if the discovery message sent by the neighboring node of the controller is received in the first detection period, determining that the neighboring node of the controller is in an on-line state, and if the discovery message sent by the neighboring node of the controller is not received in the first detection period, determining that the neighboring node of the controller is in an off-line state.
With reference to the sixth aspect or the first possible implementation manner of the sixth aspect, in a second possible implementation manner of the sixth aspect, the processor is specifically configured to: according to the state information of all nodes in the power line communication network, the following updating operation is executed:
adding newly-accessed nodes in the network topology table;
modifying the state of the existing nodes in the network topology table to be offline or online, and recording the continuous offline times of offline nodes;
and deleting the nodes which are offline continuously N times in the network topology table from the network topology table, wherein N is an integer which is more than or equal to 2.
With reference to the second possible implementation manner of the sixth aspect, in a third possible implementation manner of the sixth aspect, the state information of the neighboring node of the controller is represented by a first state bit diagram, the state information of the node included in the heartbeat packet is represented by a second state bit diagram, and the state information of each node in the first state bit diagram and the second state bit diagram occupies at least one bit.
With reference to the third possible implementation manner of the sixth aspect, in a fourth possible implementation manner of the sixth aspect, the processor is specifically configured to: and taking a union set of the first state bit diagram and the second state bit diagram to obtain the state information of the nodes in the power line communication network.
With reference to the second possible implementation manner of the sixth aspect, in a fifth possible implementation manner of the sixth aspect, the processor is further configured to initialize the first state bitmap table after the first period ends, and state information of nodes included in the first state bitmap table after the initialization is in an offline state.
The intermediate node provided in the third aspect and the fifth aspect may be used to perform the method provided in the first aspect, and the advantages of the intermediate node may be referred to in the first aspect and the advantages of each possible implementation manner, which are not described herein.
The controller provided in the fourth and sixth aspects may be used to perform the method provided in the second aspect, and the advantages of the controller may be referred to in the second aspect and the advantages of each possible implementation manner, which are not described herein.
The application provides a method and a device for detecting the state of equipment in a power line communication network, wherein an intermediate node detects the state of an adjacent node in a first detection period, acquires the state information of the adjacent node of the intermediate node, receives a heartbeat message sent by the adjacent lower node in a second detection period, wherein the heartbeat message comprises the state information of the lower node of the intermediate node and the state information of the adjacent node of the lower node of the intermediate node, then the intermediate node aggregates the state information of the adjacent node and the state information of the node included in the heartbeat message to obtain the state information of the associated node of the intermediate node, and finally carries the state information of the associated node of the intermediate node and the state information of the intermediate node in the heartbeat message and sends the heartbeat message to an adjacent upper node. The intermediate node aggregates the state information of the adjacent node and the state information of the node included in the received heartbeat message, and then sends the heartbeat message to the adjacent upper node, and each node does not need to send the heartbeat message to the controller, so that the bandwidth occupied by sending the heartbeat message is saved.
Drawings
Fig. 1 is a schematic diagram of a reporting path of a heartbeat message of a power line communication network to which the present application is applicable;
fig. 2 is a flowchart of a method for detecting a device status in a power line communication network according to a first embodiment;
FIG. 3 is a state bit diagram of neighbor nodes of an intermediate node;
fig. 4 is a flowchart of a method for detecting a device status in a power line communication network according to a second embodiment;
fig. 5 is a schematic structural diagram of an intermediate node according to a third embodiment;
fig. 6 is a schematic structural diagram of a controller according to a fourth embodiment;
fig. 7 is a schematic structural diagram of an intermediate node according to a fifth embodiment;
fig. 8 is a schematic structural diagram of a controller according to a sixth embodiment.
Detailed Description
The application provides a device state detection method in a power line communication network, which is applied to the power line communication network, wherein the power line communication network comprises a controller and a plurality of nodes, the nodes in the power line communication network report heartbeat messages step by step according to a tree structure, the controller is a root node, the plurality of nodes are intermediate nodes or leaf nodes, and the controller is connected and communicated with the nodes through power lines. The controller is used for monitoring the state of each node in the power line communication network, the controller is also called a central node, the leaf nodes are nodes without lower nodes, and the intermediate nodes are nodes formed by the lower nodes. The power line communication network is, for example, a remote control meter reading system, and the node is a smart meter.
Fig. 1 is a schematic diagram of a reporting path of a heartbeat message in a power line communication network, where the power line communication network includes a controller and 11 nodes, and the nodes report the heartbeat message to the controller step by step according to a tree structure, and in the example shown in fig. 1, the 10 nodes are divided into four stages, where a first stage node includes a node 1 and a node 2, a second stage node includes a node 3, a node 4, a node 5 and a node 6, and a third stage node includes a node 7, a node 8, a node 9, a node 10 and a node 11. Wherein, node 7, node 8, node 9, node 10, node 11 and node 3 are leaf nodes, node 1, node 2, node 4, node 5 and node 6 are intermediate nodes, and the controller is a root node. It should be noted that, the connection relationship of each node shown in fig. 1 only represents the reporting path of the heartbeat message, and does not represent the actual physical connection relationship of the node.
Fig. 2 is a flowchart of a method for detecting a device status in a power line communication network according to an embodiment, and referring to fig. 1 and fig. 2, the method provided in this embodiment includes the following steps:
step 101, detecting the state of an adjacent node by an intermediate node in a first detection period, and acquiring the state information of the adjacent node of the intermediate node.
When the power line communication network is formed, each node can be configured or self-learn to obtain a discovery list, wherein the discovery list comprises a plurality of nodes, the nodes in the discovery list are adjacent nodes of the nodes, and each node can monitor messages sent by the adjacent nodes. Specifically, the intermediate node may detect the state of the neighboring node by: the intermediate node judges whether a discovery message sent by an adjacent node of the intermediate node is received in a first detection period, and if the intermediate node receives the discovery message sent by the adjacent node of the intermediate node in the first detection period, the intermediate node determines that the adjacent node of the intermediate node is in an online state; if the intermediate node does not receive the discovery message sent by the adjacent node of the intermediate node in the first detection period, the intermediate node determines that the adjacent node of the intermediate node is in an offline state. The first detection period is an online state detection period, and the discovery message can be any existing message, for example, a data message, a heartbeat message and the like sent by a node, or a newly defined message. If the message received by the intermediate node in the first detection period is not a message of an adjacent node, the intermediate node analyzes the message to obtain a network identifier (Short Network Identifier, abbreviated as SNID) and a node identifier after receiving the message in the first detection period, if the network identifier is an identifier of the power line communication network, the node is determined to belong to the power line communication network, and the state information of the node is updated according to the node identifier. If the network identifier is not an identifier of the power line communication network, the intermediate node determines that the node does not belong to the power line communication network and does not record status information of the node.
It should be clear that, the division of the adjacent nodes of a certain node is not based on the heartbeat message reporting path shown in fig. 1, but is determined based on the actual physical connection of the nodes in the power line communication network, so for a certain node, the adjacent nodes of the node may be superior nodes, subordinate nodes or nodes without superior-subordinate relationships. In the power line communication network, not only the intermediate node needs to detect the state of the adjacent node, but also the controller and the leaf node need to detect the state information of the adjacent node, and the detection mode of the controller and the leaf node is the same as that of the intermediate node.
The state information of the neighboring nodes of the intermediate node may be represented in various manners, for example, the state information of the neighboring nodes of the intermediate node is represented in the form of a list, which is a schematic diagram of the state information of the neighboring nodes of the intermediate node.
List one
Node Status information
Node 1 0
Node 2 1
Node 3 1
Node 4 1
As shown in table one, the intermediate node has 4 neighboring nodes, and the state information of each node is represented by 1 bit (bit), where the state information indicates that the state of the node is offline when the state information is 0, and indicates that the state of the node is online when the state information is 1. Of course, the state information may be represented by more bits, or the state information may be represented by wire and false, the state information being wire representing the state of the node being on-line, and the state information being false representing the state of the node being off-line.
The state information of the adjacent nodes of the intermediate node can also be represented by a state bitmap table, the state information of each node in the state bitmap table occupies at least one bit, and the state information of each node is represented by a value of a bit. Taking the example shown in table one as an example, the intermediate node includes 4 nodes, the state information of each node occupies one bit, fig. 3 is a state bit diagram of the neighboring nodes of the intermediate node, as shown in fig. 3, the state bit diagram includes 4 bits, each bit represents the state information of one node, 4 bits represent the states of node 1, node 2, node 3 and node 4 in sequence from left to right, in the example shown in fig. 3, the value of bit is 1 to indicate that the state of the node is on line, and the value of bit is 0 to indicate that the state of the node is off line. Of course, it is also possible to use 0 to indicate that the state of the node is online and 1 to indicate that the state of the node is offline. The state bit diagram represents the state information of the adjacent node of the node, so that the storage space occupied by the state information of the adjacent node of the storage node can be reduced.
Step 102, the intermediate node receives, in a second detection period, a heartbeat message sent by an adjacent lower node, where the heartbeat message includes state information of the lower node of the intermediate node and state information of the adjacent node of the lower node of the intermediate node.
The second detection period is a reporting period of a heartbeat message, all nodes (including intermediate nodes and leaf nodes) except the controller in the power line communication network need to send the heartbeat message to the adjacent upper node, the heartbeat message reported by the leaf node comprises the state information of the adjacent node of the leaf node and the state information of the leaf node, and the heartbeat message reported by the intermediate node comprises the state information of the lower node of the intermediate node and the state information of the adjacent node of the lower node of the intermediate node. The lower nodes of the intermediate node are all lower nodes (including adjacent lower nodes and non-adjacent lower nodes) passing through the intermediate node in the reporting path of the heartbeat message. In the power line communication network shown in fig. 1, when the intermediate node is node 4, the lower nodes of node 4 are node 7, node 8, and node 9. When the intermediate node is node 1, the lower nodes of node 1 include node 3, node 4, node 7, node 8, and node 9. When the intermediate node is the node 5, a node lower than the node 5 is the node 10. When the intermediate node is the node 6, a node lower than the node 6 is the node 11. When the intermediate node is the node 2, the lower nodes of the node 2 are the node 5, the node 6, the node 10, and the node 11.
Optionally, the state information of the lower node of the intermediate node and the state information of the adjacent node of the lower node of the intermediate node are represented by a second state bit diagram, and the state information of each node in the state bit diagram occupies at least one bit. Namely, the state information of the nodes included in the heartbeat message is represented by a state bitmap, and the bandwidth occupied by sending the heartbeat message can be reduced because the state bitmap occupies small data quantity. Of course, the status information of the nodes in the heartbeat message may also be represented in a list or other forms.
Step 103, the intermediate node aggregates the state information of the adjacent nodes of the intermediate node and the state information of the nodes included in the heartbeat message to obtain the state information of the associated nodes of the intermediate node.
The associated nodes of the intermediate node comprise lower nodes of the intermediate node and adjacent nodes of the lower nodes of the intermediate node.
Step 104, the intermediate node carries the state information of the associated node of the intermediate node and the state information of the intermediate node in the heartbeat message and sends the heartbeat message to the adjacent upper node.
In the power line communication network, nodes report heartbeat messages step by step according to a tree structure, specifically, leaf nodes report own heartbeat messages, the heartbeat messages reported by the leaf nodes comprise state information of adjacent nodes of the leaf nodes and state information of the leaf nodes, the leaf nodes send the heartbeat messages to adjacent upper nodes, the adjacent upper nodes aggregate the state information of the adjacent nodes, the state information of the adjacent nodes and the state information of the nodes included in the received heartbeat messages and then carry the heartbeat messages in the heartbeat messages and send the heartbeat messages to the adjacent upper nodes, and the like finally send the heartbeat messages to a controller.
For the intermediate node, heartbeat messages sent by a plurality of adjacent lower nodes may be received, the intermediate node may aggregate state information of nodes included in the heartbeat messages sent by all the adjacent lower nodes with state information of its own adjacent node, and since state information of nodes included in the heartbeat messages sent by the plurality of adjacent lower nodes may be repeated, the intermediate node aggregates state information of adjacent nodes of the intermediate node and information of nodes included in the heartbeat messages to obtain state information of an associated node of the intermediate node, that is, delete state information of repeated nodes. The associated nodes of the intermediate node comprise lower nodes of the intermediate node and adjacent nodes of the lower nodes of the intermediate node.
When the state information of the adjacent node of the intermediate node is represented by a first state bit diagram and the state information of the node included in the heartbeat message is represented by a second state bit diagram, the intermediate node aggregates the state information of the adjacent node of the intermediate node and the information of the node included in the heartbeat message to obtain the state information of the associated node of the intermediate node, specifically: and the intermediate node obtains the union set of the first state bit diagram and the second state bit diagram to obtain the state information of the associated node of the intermediate node.
In the existing heartbeat message reporting mechanism, each node sends heartbeat messages to a controller, an intermediate node not only needs to send own heartbeat messages to adjacent upper nodes, but also forwards heartbeat messages of lower nodes to the adjacent upper nodes, and the intermediate node occupies a large amount of bandwidth when sending the heartbeat messages. In the reporting mechanism of the embodiment, after the intermediate node receives the heartbeat message sent by the adjacent lower node and synthesizes the state information of the adjacent node and the state information of the node included in the heartbeat message, the heartbeat message is carried to the adjacent upper node, and the controller only receives the heartbeat message sent by the adjacent lower node finally, so that the bandwidth occupied by sending the heartbeat message is saved. Particularly in large-scale networking, the power line communication network comprises a large number of nodes, and the bandwidth occupied by the reported heartbeat message can be remarkably reduced by the method of the embodiment.
In addition, in the existing heartbeat message reporting mechanism, each node sends a heartbeat message to the controller, so that the quantity of the heartbeat message is large, and in order to ensure effective utilization of bandwidth resources, the reporting period of the heartbeat message is generally prolonged, and the occupancy rate of the heartbeat message in the whole bandwidth is reduced. However, the too long reporting period of the heartbeat message can result in too long offline judgment time, and after the node is offline, the controller cannot timely find that the node is offline, and still can send a message to the node, and at this time, the node cannot receive the message sent by the controller due to the offline state. By adopting the scheme of the embodiment, the bandwidth occupied by the heartbeat message is reduced due to the reduction of the heartbeat message, so that the reporting period of the heartbeat message can be reduced, and the on-line judging time of the node can be reduced by reducing the reporting period of the heartbeat message under the condition of the same bandwidth occupancy.
Taking the power line communication network shown in fig. 1 as an example, the process of reporting the heartbeat message is described in detail. After the second detection period is finished, the node 7, the node 8 and the node 9 respectively send heartbeat messages to the node 4, the node 10 sends heartbeat messages to the node 5, and the node 11 sends heartbeat messages to the node 6. The heartbeat message sent by the node 7 includes the state information of the neighboring node of the node 7 and the state information of the node 7, the heartbeat message sent by the node 8 includes the state information of the neighboring node of the node 8 and the state information of the node 8, the heartbeat message sent by the node 9 includes the state information of the neighboring node of the node 9 and the state information of the node 9, the heartbeat message sent by the node 10 includes the state information of the neighboring node of the node 10 and the state information of the node 10, and the heartbeat message sent by the node 11 includes the state information of the neighboring node of the node 11 and the state information of the node 11. The neighboring nodes of the node 7, the node 8 and the node 9 may be the same or different, and the second detection periods of the node 7, the node 8 and the node 9 may be the same or different, that is, the node 4 may receive the heartbeat messages sent by the node 7, the node 8 and the node 9 at the same time or may not receive the heartbeat messages sent by the node 7, the node 8 and the node 9 at the same time. Likewise, the second detection periods of node 10 and node 11 may be the same or different. After the second detection period is finished, the node 4 aggregates the state information of the nodes included in the heartbeat messages sent by the node 7, the node 8 and the node 9 and the state information of the adjacent nodes of the node 4 to obtain the state information of the associated node of the node 4. After obtaining the state information of the associated node, the node 4 carries the state information of the node 4 and the state information of the associated node of the node 4 in a heartbeat message and sends the heartbeat message to the node 2, the node 3 also sends the heartbeat message to the node 2, the heartbeat message sent by the node 3 comprises the state information of the node 3 and the state information of the adjacent node of the node 3, and the node 2 aggregates the state information of the node included in the heartbeat message sent by the node 4 and the node 3 and the state information of the adjacent node of the node 2 to obtain the state information of the associated node of the node 2. After the node 2 obtains the state information of the associated node, the state information of the associated node of the node 2 and the state information of the node 2 are carried in the heartbeat message and sent to the controller. Similarly, the node 2 may also send a heartbeat message to the controller, where the heartbeat message sent by the node 2 includes the state information of the node 2, the node 5, the node 6, the node 10, and the node 11, and the state information of the neighboring nodes. The controller aggregates the state information of the nodes and the state information of the adjacent nodes of the controller, which are included in the heartbeat messages sent by the nodes 1 and 2, so as to obtain the state information of the nodes in the power line communication network.
Optionally, after the first detection period is finished, the intermediate node initializes the first state bitmap table, and state information of nodes included in the first state bitmap table after initialization is in an offline state, that is, initial state information of adjacent nodes of the first node is offline. Subsequently, when detecting that a certain adjacent node is online, the state information of the node is updated.
Optionally, after the first period is over, the intermediate node determines that the intermediate node is in an offline state, and closes timers corresponding to the first detection period and the second detection period. The intermediate node may determine whether itself is offline by: (1) In the first detection period, whether the beacon frame sent by the controller is received or not is determined, the controller can broadcast the beacon frame in the network in the first detection period, if the intermediate node receives the beacon frame in the first detection period, the intermediate node determines that the intermediate node is in an online state, and if the intermediate node does not receive the beacon frame in the first detection period, the intermediate node determines that the intermediate node is in an offline state. (2) The intermediate node receives indication information sent by the controller in a first detection period, wherein the indication information is used for indicating the intermediate node to be offline. (3) The intermediate node receives the SNID sent by the controller in the first detection period, judges whether the received SIND is identical to the locally stored SNID, if the received SNID is different from the locally stored SNID, the intermediate node indicates that the intermediate node is in an offline state and moves to other networks, and if the received SNID is identical to the locally stored SNID, the intermediate node indicates that the intermediate node is in an online state.
In this embodiment, the intermediate node detects the state of the neighboring node in the first detection period, acquires the state information of the neighboring node of the intermediate node, receives the heartbeat message sent by the neighboring lower node in the second detection period, where the heartbeat message includes the state information of the lower node of the intermediate node and the state information of the neighboring node of the lower node of the intermediate node, and then, the intermediate node aggregates the state information of the neighboring node and the state information of the node included in the heartbeat message to obtain the state information of the related node of the intermediate node, and finally, carries the state information of the related node of the intermediate node and the state information of the intermediate node in the heartbeat message and sends the heartbeat message to the neighboring upper node. The intermediate node aggregates the state information of the adjacent node and the state information of the node included in the received heartbeat message, and then sends the heartbeat message to the adjacent upper node, and each node does not need to send the heartbeat message to the controller, so that the bandwidth occupied by sending the heartbeat message is saved.
Fig. 4 is a flowchart of a method for detecting a device status in a power line communication network according to a second embodiment, in which the first embodiment describes the method from the perspective of an intermediate node, and the second embodiment describes the method from the perspective of a controller, and referring to fig. 1 and fig. 4, the method according to the second embodiment includes the following steps:
Step 201, the controller detects the state of the neighboring node in a first detection period, and acquires the state information of the neighboring node of the controller.
Specifically, the controller judges whether a discovery message sent by a neighboring node of the controller is received in a first detection period, and if the discovery message sent by the neighboring node of the controller is received in the first detection period, the controller determines that the neighboring node of the controller is in an on-line state; if the controller does not receive the discovery message sent by the adjacent node of the controller in the first detection period, the controller determines that the adjacent node of the controller is in an offline state. It should be noted that, the neighboring nodes of the controller are not determined according to the heartbeat message reporting path shown in fig. 1, but are determined according to the actual physical connection of the nodes in the power line communication network.
The state information of the neighboring nodes of the controller may also be represented by a state bit chart or a list, where the state information of each node in the state bit chart occupies at least one bit, and the specific form may refer to the representation form of the state information of the intermediate node in the above embodiment, which is not described herein again.
Step 202, the controller receives a heartbeat message sent by an adjacent lower node in a second detection period, wherein the heartbeat message comprises state information of the lower node of the controller and state information of the adjacent node of the lower node of the controller.
The status information of the nodes included in the heartbeat message can also be represented by a status bit chart or list and the like. Wherein the state information of each node in the state bit map table occupies at least one bit.
Step 203, the controller aggregates the state information of the neighboring nodes of the controller and the state information of the nodes included in the heartbeat message to obtain the state information of the nodes in the power line communication network.
When the state information of the adjacent node of the controller is represented by a first state bit diagram and the state information of the node included in the heartbeat message is represented by a second state bit diagram, the controller aggregates the state information of the adjacent node of the controller and the state information of the node included in the heartbeat message to obtain the state information of the node in the power line communication network, specifically: and the controller obtains the state information of the nodes in the power line communication network by taking the union set of the first state bit diagram and the second state bit diagram.
And 204, the controller updates a network topology table according to the state information of the nodes in the power line communication network.
Specifically, the controller performs the following updating operations according to the status information of all nodes in the power line communication network:
(1) Adding newly-accessed nodes in a network topology table;
(2) Modifying the state of the existing nodes in the network topology table to be off-line or on-line, and recording the continuous off-line times of the off-line nodes;
(3) And deleting the nodes which are offline continuously N times in the network topology table from the network topology table, wherein N is an integer which is more than or equal to 2.
And deleting the nodes which are offline continuously N times in the network topology table from the network topology table by the controller, namely executing off-network operation on the nodes. It should be emphasized that the node related in the present application means that the node is in the network, and the communication quality is better, so that the node can receive the effective message. The node offline means that the node is in the network, but the communication quality is poor, and the node cannot receive the effective message. The node off-network means that the node has poor communication quality, cannot receive a valid message, and has left the network.
Optionally, after the first period is over, the controller initializes the first status bitmap table, and status information of nodes included in the first status bitmap table after initialization is in an offline status.
In this embodiment, the controller detects the state of the neighboring node in the first detection period, acquires the state information of the neighboring node of the controller, receives the heartbeat message sent by the neighboring node at the lower level in the second detection period, where the heartbeat message includes the state information of the lower node of the controller and the state information of the neighboring node of the lower node of the controller, and then, the controller aggregates the state information of the neighboring node and the state information of the node included in the heartbeat message to obtain the power line communication network, and finally updates the network topology table according to the state information of the node in the power line communication network. The controller only receives the heartbeat messages sent by the adjacent lower nodes, so that the bandwidth occupied by sending the heartbeat messages is saved.
Fig. 5 is a schematic structural diagram of an intermediate node provided in the third embodiment, where the intermediate node is applied in a power line communication network, the power line communication network includes a controller and a plurality of nodes, the nodes in the power line communication network report heartbeat messages step by step according to a tree structure, the controller is a root node, the plurality of nodes are intermediate nodes or leaf nodes, and the controller is connected and communicates with the nodes through power lines, and as shown in fig. 5, the intermediate node includes:
An obtaining module 21, configured to detect a state of an adjacent node in a first detection period, and obtain state information of the adjacent node of the intermediate node;
a receiving module 22, configured to receive, in a second detection period, a heartbeat packet sent by an adjacent lower node, where the heartbeat packet includes state information of the lower node of the intermediate node and state information of an adjacent node of the lower node of the intermediate node;
a processing module 23, configured to aggregate status information of neighboring nodes of the intermediate node and status information of nodes included in the heartbeat packet, to obtain status information of an associated node of the intermediate node, where the associated node of the intermediate node includes a lower node of the intermediate node and neighboring nodes of the lower node of the intermediate node;
and the sending module 24 is configured to send the heartbeat message to an adjacent upper node, where the heartbeat message includes the state information of the associated node of the intermediate node and the state information of the intermediate node.
Optionally, the acquiring module 21 is specifically configured to: judging whether a discovery message sent by a neighboring node of the intermediate node is received in the first detection period, if the discovery message sent by the neighboring node of the intermediate node is received in the first detection period, determining that the neighboring node of the intermediate node is in an online state, and if the discovery message sent by the neighboring node of the intermediate node is not received in the first detection period, determining that the neighboring node of the intermediate node is in an offline state.
Optionally, the state information of the adjacent node of the intermediate node is represented by a first state bit chart, the state information of the node included in the heartbeat message is represented by a second state bit chart, and the state information of each node in the first state bit chart and the second state bit chart occupies at least one bit. Accordingly, the processing module 23 is specifically configured to: and obtaining a union set of the first state bit diagram and the second state bit diagram to obtain the state information of the associated node of the intermediate node.
Optionally, the intermediate node further includes: and the initialization module (not shown in fig. 5) is used for initializing the first state bitmap table after the first period is over, and the state information of the nodes included in the first state bitmap table after the initialization is in an offline state.
Optionally, the intermediate node further includes: a determining module and a timing module (not shown in fig. 5), wherein the determining module is configured to determine that the intermediate node is in an offline state after the first period is over; the timing module is used for closing the timers corresponding to the first detection period and the second detection period.
The intermediate node in this embodiment may be used to execute the methods executed by the intermediate node in the first embodiment and the second embodiment, and the specific implementation manner and technical effects are similar, and are not repeated here.
Fig. 6 is a schematic structural diagram of a controller provided in a fourth embodiment, where the controller is applied in a power line communication network, the power line communication network includes the controller and a plurality of nodes, the nodes in the power line communication network report heartbeat messages step by step according to a tree structure, the controller is a root node, the plurality of nodes are intermediate nodes or leaf nodes, and the controller is connected and communicates with the nodes through power lines, as shown in fig. 6, and the controller includes:
the detection module 31 is configured to detect a state of an adjacent node in a first detection period, and obtain state information of the adjacent node of the controller;
a receiving module 32, configured to receive, in a second detection period, a heartbeat packet sent by an adjacent lower node, where the heartbeat packet includes state information of the lower node of the controller and state information of the adjacent node of the lower node of the controller;
the processing module 33 is configured to aggregate status information of a neighboring node of the controller and status information of a node included in the heartbeat packet, to obtain status information of a node in the power line communication network;
And the updating module 34 is used for updating the network topology table according to the state information of the nodes in the power line communication network.
Optionally, the detection module 31 is specifically configured to: judging whether a discovery message sent by a neighboring node of the controller is received in the first detection period, if the discovery message sent by the neighboring node of the controller is received in the first detection period, determining that the neighboring node of the controller is in an on-line state, and if the discovery message sent by the neighboring node of the controller is not received in the first detection period, determining that the neighboring node of the controller is in an off-line state.
Optionally, the updating module 34 is specifically configured to: according to the state information of all nodes in the power line communication network, the following updating operation is executed:
adding newly-accessed nodes in the network topology table;
modifying the state of the existing nodes in the network topology table to be offline or online, and recording the continuous offline times of offline nodes;
and deleting the nodes which are offline continuously N times in the network topology table from the network topology table, wherein N is an integer which is more than or equal to 2.
Optionally, the state information of the adjacent node of the controller is represented by a first state bit chart, the state information of the node included in the heartbeat message is represented by a second state bit chart, and the state information of each node in the first state bit chart and the second state bit chart occupies at least one bit. Accordingly, the processing module 33 is specifically configured to: and taking a union set of the first state bit diagram and the second state bit diagram to obtain the state information of the nodes in the power line communication network.
Optionally, the controller further includes an initialization module (not shown in fig. 6), where the initialization module is configured to initialize the first state bitmap after the first period ends, and state information of nodes included in the first state bitmap after initialization is in an offline state.
Fig. 7 is a schematic structural diagram of an intermediate node provided in a fifth embodiment, where the intermediate node is applied in a power line communication network, the power line communication network includes a controller and a plurality of nodes, the nodes in the power line communication network report heartbeat messages step by step according to a tree structure, the controller is a root node, the plurality of nodes are intermediate nodes or leaf nodes, and the controller is connected to the nodes and communicates with the nodes through power lines, as shown in fig. 7, the intermediate node 400 includes: a processor 41, a memory 42, a receiver 43 and a transmitter 44. The memory 42, the receiver 43, and the transmitter 44 are connected to and communicate with the processor 41 through a bus, where the memory 42 is used to store instructions, the receiver 43 is used to receive data sent by other devices, the transmitter 44 is used to send data to other devices, and the processor 41 is used to execute the instructions stored in the memory 42, so that the intermediate node executes the steps executed by the intermediate node in the first and second embodiments of the method, and the specific implementation principle and technical effects are similar to those of the method embodiments and are not repeated herein.
Fig. 8 is a schematic structural diagram of a controller provided in a sixth embodiment, where the controller is applied in a power line communication network, the power line communication network includes the controller and a plurality of nodes, the nodes in the power line communication network report heartbeat messages step by step according to a tree structure, the controller is a root node, the plurality of nodes are intermediate nodes or leaf nodes, and the controller is connected and communicates with the nodes through power lines, as shown in fig. 8, the controller 500 includes: processor 51, memory 52, receiver 53, and transmitter 54. The memory 52, the receiver 53, and the transmitter 54 are connected to and communicate with the processor 51 through a bus, where the memory 52 is used to store instructions, the receiver 53 is used to receive data sent by other devices, the transmitter 54 is used to send data to other devices, and the processor 51 is used to execute the instructions stored in the memory 52, so that the controller point executes the steps executed by the controller in the first embodiment and the second embodiment of the method, and the specific implementation principle and technical effects are similar to those of the method embodiment and are not repeated herein.
It is to be appreciated that the processor used by the intermediate node or controller of the present application may be a Central Processing Unit (CPU), a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof. Which may implement or perform the various exemplary logic blocks, modules and circuits described in connection with this disclosure. The processor may also be a combination that performs the function of a computation, e.g., a combination comprising one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
The bus in accordance with the present application may be an industry standard architecture (Industry Standard Architecture, ISA) bus, an external device interconnect (Peripheral Component, PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. The buses may be divided into address buses, data buses, control buses, etc. For ease of illustration, the buses in the drawings of the present application are not limited to only one bus or to one type of bus.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be additional divisions when actually implemented, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in hardware plus software functional units.
The integrated units implemented in the form of software functional units described above may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium, and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (english: processor) to perform some of the steps of the methods according to the embodiments of the application. And the aforementioned storage medium includes: u disk, mobile hard disk, read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic disk or optical disk, etc.

Claims (19)

1. A method for detecting a device state in a power line communication network, the power line communication network including a controller and a plurality of nodes, the controller being a root node, the plurality of nodes being intermediate nodes or leaf nodes, the method comprising:
the intermediate node acquires the state information of the adjacent node; the adjacent nodes are determined according to the actual physical connection of the nodes;
the intermediate node receives a heartbeat message sent by an adjacent lower node, wherein the heartbeat message comprises state information of the lower node of the intermediate node and state information of the adjacent node of the lower node of the intermediate node;
the intermediate node aggregates the state information of the adjacent nodes of the intermediate node and the state information of nodes included in the heartbeat messages of a plurality of adjacent lower nodes of the intermediate node, and carries the aggregated state information and the state information of the intermediate node in the heartbeat messages of the intermediate node;
the intermediate node sends the heartbeat message of the intermediate node to the adjacent upper node;
the intermediate node aggregates the state information of the neighboring nodes of the intermediate node and the state information of the nodes included in the heartbeat messages of the plurality of neighboring lower nodes of the intermediate node, and the method comprises the following steps:
And deleting the state information of the adjacent nodes of the intermediate node and the state information of the repeated nodes in the heartbeat messages of a plurality of adjacent lower nodes of the intermediate node.
2. The method of claim 1, wherein the intermediate node obtains the status information of the neighboring node, comprising:
the intermediate node receives a discovery message sent by a neighboring node of the intermediate node;
the intermediate node determines state information of the neighboring node based on whether a discovery message of the neighboring node is received in a first detection period, wherein the state information of the neighboring node is used for indicating that the neighboring node is in an offline state or in an online state.
3. A method according to claim 1 or 2, characterized in that the intermediate node represents the status information of the neighboring nodes in the form of a list.
4. A method according to claim 3, characterized in that the method further comprises: and under the condition that the state information of the first node indicates that the first node is in an offline state, if the intermediate node detects that the first node is online, updating the state information of the first node to be in an online state, wherein the first node is any node in adjacent nodes of the intermediate node.
5. A method for detecting a device state in a power line communication network, the power line communication network including a controller and a plurality of nodes, the controller being a root node, the plurality of nodes being intermediate nodes or leaf nodes, the method comprising:
the method comprises the steps that a controller receives heartbeat messages sent by a plurality of adjacent lower nodes, wherein the heartbeat messages comprise state information of the lower nodes of the controller and state information of the adjacent nodes of the lower nodes of the controller; the adjacent nodes are determined according to the actual physical connection of the nodes;
the controller aggregates the state information of the adjacent nodes of the controller and the state information of the nodes included in the heartbeat messages of the plurality of adjacent lower nodes to obtain the state information of the nodes in the power line communication network;
the controller updates a network topology table according to the state information of the nodes in the power line communication network;
the aggregation of the state information of the adjacent nodes of the controller and the state information of the nodes included in the heartbeat messages of the plurality of adjacent lower nodes by the controller comprises the following steps:
and the controller deletes the state information of the adjacent nodes of the controller and the state information of the repeated nodes in the heartbeat messages of the plurality of adjacent lower nodes.
6. The method of claim 5, wherein the method further comprises:
and when the first node continuously goes offline for N times, the controller executes off-network operation on the first node, wherein the first node is any node in the power line communication network.
7. The method according to claim 5 or 6, characterized in that the method further comprises:
the controller sends indication information to an intermediate node, wherein the indication information is used for indicating that the intermediate node is in an offline state.
8. The method according to claim 5 or 6, characterized in that the method further comprises: and under the condition that the state information of the third node in the network topology table indicates that the third node is in an offline state, if the controller detects that the third node is online, updating the state information of the third node to be in an online state, wherein the third node is any node in the power line communication network.
9. An intermediate node for use in a power line communication network comprising a controller and a plurality of nodes, the controller being a root node, the plurality of nodes being either intermediate nodes or leaf nodes, the intermediate node comprising:
The acquisition module is used for acquiring the state information of the adjacent node; the adjacent nodes are determined according to the actual physical connection of the nodes;
the receiving module is used for receiving heartbeat messages sent by adjacent lower nodes, wherein the heartbeat messages comprise state information of the lower nodes of the intermediate nodes and state information of the adjacent nodes of the lower nodes of the intermediate nodes;
the processing module is used for aggregating the state information of the adjacent nodes of the intermediate node and the state information of the nodes included in the heartbeat messages of the plurality of adjacent lower nodes of the intermediate node, and carrying the aggregated state information and the state information of the intermediate node in the heartbeat messages of the intermediate node;
the sending module is used for sending the heartbeat message of the intermediate node to the adjacent upper node;
the processing module is specifically configured to:
and deleting the state information of the adjacent nodes of the intermediate node and the state information of the repeated nodes in the heartbeat messages of a plurality of adjacent lower nodes of the intermediate node.
10. The intermediate node according to claim 9, wherein the obtaining module is specifically configured to:
Receiving a discovery message sent by a neighboring node of the intermediate node;
and determining state information of the adjacent node based on whether the discovery message of the adjacent node is received in a first detection period, wherein the state information of the adjacent node is used for indicating that the adjacent node is in an offline state or in an online state.
11. An intermediate node as claimed in claim 9 or 10, characterized in that the intermediate node presents the state information of the neighboring nodes in the form of a list.
12. The intermediate node of claim 11, wherein the intermediate node further comprises: and the updating module is used for updating the state information of the first node into an on-line state when the intermediate node detects that the first node is on-line under the condition that the state information of the first node indicates that the first node is in an off-line state, wherein the first node is any node in adjacent nodes of the intermediate node.
13. A controller for use in a power line communication network comprising the controller and a plurality of nodes, the controller being a root node, the plurality of nodes being intermediate nodes or leaf nodes, the controller comprising:
The receiving module is used for receiving heartbeat messages sent by a plurality of adjacent lower nodes, wherein the heartbeat messages comprise state information of the lower nodes of the controller and state information of the adjacent nodes of the lower nodes of the controller; the adjacent nodes are determined according to the actual physical connection of the nodes;
the processing module is used for aggregating the state information of the adjacent nodes of the controller and the state information of the nodes included in the heartbeat messages of the adjacent lower nodes to obtain the state information of the nodes in the power line communication network;
the updating module is used for updating a network topology table according to the state information of the nodes in the power line communication network;
the processing module is specifically configured to:
and deleting the state information of the adjacent nodes of the controller and the state information of the repeated nodes in the heartbeat messages of the plurality of adjacent lower nodes.
14. The controller according to claim 13, further comprising: and the determining module is used for executing off-network operation on the first node when the first node is continuously offline for N times, wherein the first node is any node in the power line communication network.
15. The controller according to claim 13 or 14, further comprising: the sending module is used for sending indication information to the intermediate node, wherein the indication information is used for indicating that the intermediate node is in an offline state.
16. The controller according to claim 13 or 14, wherein the update module is further configured to:
and under the condition that the state information of the third node in the network topology table indicates that the third node is in an offline state, if the controller detects that the third node is online, updating the state information of the third node to be in an online state, wherein the third node is any node in the power line communication network.
17. An intermediate node for use in a power line communication network comprising a controller and a plurality of nodes, the controller being a root node, the plurality of nodes being either intermediate nodes or leaf nodes, the intermediate node comprising: a processor, a receiver and a transmitter,
the receiver is used for receiving data sent by other equipment, and the transmitter is used for sending the data to the other equipment;
The processor is configured to invoke software instructions stored in the memory to perform the method of any of claims 1 to 4.
18. A controller for use in a power line communication network comprising the controller and a plurality of nodes, the controller being a root node, the plurality of nodes being intermediate nodes or leaf nodes, the controller comprising: a processor, a receiver and a transmitter,
the receiver is used for receiving data sent by other equipment, and the transmitter is used for sending the data to the other equipment;
the processor is configured to invoke software instructions stored in the memory to perform the method of any of claims 5 to 8.
19. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein program instructions, which when executed, cause the method of any of claims 1 to 4 or 5 to 8 to be performed.
CN202011398640.4A 2017-04-10 2017-04-10 Method and device for detecting equipment state in power line communication network Active CN112468372B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011398640.4A CN112468372B (en) 2017-04-10 2017-04-10 Method and device for detecting equipment state in power line communication network

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710229679.5A CN108696297B (en) 2017-04-10 2017-04-10 Equipment state detection method and device in power line communication network
CN202011398640.4A CN112468372B (en) 2017-04-10 2017-04-10 Method and device for detecting equipment state in power line communication network

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN201710229679.5A Division CN108696297B (en) 2017-04-10 2017-04-10 Equipment state detection method and device in power line communication network

Publications (2)

Publication Number Publication Date
CN112468372A CN112468372A (en) 2021-03-09
CN112468372B true CN112468372B (en) 2023-10-13

Family

ID=63842298

Family Applications (2)

Application Number Title Priority Date Filing Date
CN201710229679.5A Active CN108696297B (en) 2017-04-10 2017-04-10 Equipment state detection method and device in power line communication network
CN202011398640.4A Active CN112468372B (en) 2017-04-10 2017-04-10 Method and device for detecting equipment state in power line communication network

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN201710229679.5A Active CN108696297B (en) 2017-04-10 2017-04-10 Equipment state detection method and device in power line communication network

Country Status (1)

Country Link
CN (2) CN108696297B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108809676B (en) * 2017-05-02 2023-07-18 北京米文动力科技有限公司 Fault detection method and robot
CN112311827A (en) * 2019-07-30 2021-02-02 云丁网络技术(北京)有限公司 Intelligent ammeter management system and method
CN113098654A (en) * 2019-12-23 2021-07-09 北京神经元网络技术有限公司 User running state detection method and device of high-speed industrial communication system
CN113037584B (en) * 2019-12-25 2023-10-20 北京东土科技股份有限公司 Node state detection method, device, equipment and storage medium
CN112422156B (en) * 2020-11-17 2022-07-26 广东电网有限责任公司 Low-voltage power line communication multi-local area network fusion method based on network scale
CN112104528B (en) * 2020-11-19 2021-02-19 北京智芯微电子科技有限公司 Communication method, system, device and storage medium for detecting heartbeat
CN114697243A (en) * 2020-12-25 2022-07-01 中移动信息技术有限公司 Node heartbeat processing method, device and system and computer storage medium
CN115051968A (en) * 2021-02-26 2022-09-13 华为技术有限公司 Method for sending push message, electronic equipment and readable medium
CN117793757A (en) * 2024-02-18 2024-03-29 山东浪潮数据库技术有限公司 Method and device for detecting heartbeat of distributed network

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6983324B1 (en) * 2000-10-23 2006-01-03 International Business Machines Corporation Dynamic modification of cluster communication parameters in clustered computer system
US7366113B1 (en) * 2002-12-27 2008-04-29 At & T Corp. Adaptive topology discovery in communication networks
CN102612110A (en) * 2012-03-02 2012-07-25 浙江大学 Distributive self-organized routing method in electric carrier wave illumination control system
CN103200108A (en) * 2013-04-19 2013-07-10 电子科技大学 Prime number route network generation method
CN105591826A (en) * 2016-03-18 2016-05-18 光一科技股份有限公司 Low voltage power line broadband carrier communication network fault diagnostic device and method
CN106100698A (en) * 2016-06-12 2016-11-09 南京南瑞集团公司 A kind of network-building method being applied to the power line carrier module that power information gathers
WO2016192408A1 (en) * 2015-06-05 2016-12-08 华为技术有限公司 Fault detection method and apparatus for node in cluster system
CN106301998A (en) * 2015-06-23 2017-01-04 瞻博网络公司 For detecting the system and method for People Near Me accessibility

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7623461B2 (en) * 2005-02-09 2009-11-24 Cisco Technology, Inc. Trigger for packing path computation requests
US8780762B2 (en) * 2009-03-11 2014-07-15 Sony Corporation Node query in ad hoc home mesh network
CN102256265B (en) * 2011-08-12 2013-07-17 电子科技大学 Channel initialization method for distributed cognitive radio network
US9178772B2 (en) * 2013-06-25 2015-11-03 Cisco Technology, Inc. Cumulative node heartbeat relay agents in constrained computer networks
CN104348659B (en) * 2013-08-08 2018-02-02 富士通株式会社 The fault detection method and node of multihop network

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6983324B1 (en) * 2000-10-23 2006-01-03 International Business Machines Corporation Dynamic modification of cluster communication parameters in clustered computer system
US7366113B1 (en) * 2002-12-27 2008-04-29 At & T Corp. Adaptive topology discovery in communication networks
CN102612110A (en) * 2012-03-02 2012-07-25 浙江大学 Distributive self-organized routing method in electric carrier wave illumination control system
CN103200108A (en) * 2013-04-19 2013-07-10 电子科技大学 Prime number route network generation method
WO2016192408A1 (en) * 2015-06-05 2016-12-08 华为技术有限公司 Fault detection method and apparatus for node in cluster system
CN106301853A (en) * 2015-06-05 2017-01-04 华为技术有限公司 The fault detection method of group system interior joint and device
CN106301998A (en) * 2015-06-23 2017-01-04 瞻博网络公司 For detecting the system and method for People Near Me accessibility
CN105591826A (en) * 2016-03-18 2016-05-18 光一科技股份有限公司 Low voltage power line broadband carrier communication network fault diagnostic device and method
CN106100698A (en) * 2016-06-12 2016-11-09 南京南瑞集团公司 A kind of network-building method being applied to the power line carrier module that power information gathers

Also Published As

Publication number Publication date
CN108696297A (en) 2018-10-23
CN108696297B (en) 2020-12-18
CN112468372A (en) 2021-03-09

Similar Documents

Publication Publication Date Title
CN112468372B (en) Method and device for detecting equipment state in power line communication network
CN107800554B (en) Data acquisition method, device and system
CN111966289B (en) Partition optimization method and system based on Kafka cluster
CN111654321B (en) Satellite network management method and device and electronic equipment
CN104301161A (en) Computing method, computing device and communication system for business quality index
CN107204924B (en) Link discovery method and device
CN113255953A (en) RRU undervoltage risk prediction method, device, system, equipment and medium
CN111092925B (en) Block chain capacity expansion processing method, device and equipment
CN113726592B (en) Transmission delay test method, system and related components of edge server
CN112910743B (en) Block chain performance detection system
CN107786390B (en) Method and device for correcting networking nodes
US20200186415A1 (en) Systems and methods for node outage determination and reporting
CN109270885B (en) Data communication method, device and equipment for monitoring PLC system and storage medium
CN110996289A (en) Intelligent gateway, method and system for machine state monitoring diagnostic instrument
CN105210349A (en) Wireless communication quality information processing apparatus and communication system
CN115134021B (en) Channel fusion method and device for dual-mode communication, electronic equipment and storage medium
CN107579804B (en) Method and system for filtering repeated data
CN111787584B (en) Data acquisition method and system based on Internet of things
CN114650288A (en) Distributed training method and system, terminal device and computer readable storage medium
CN107835521B (en) Method and device for networking field intensity threshold
CN107733980B (en) Internet of things data transmission system based on ring network and first repeater
CN111885588A (en) Method and device for executing electronic card management service
CN110391923A (en) The method and the network equipment of multicast message processing
WO2008134764A4 (en) Topographical display generator for ad hoc network
CN114826867B (en) Method, device, system and storage medium for processing data

Legal Events

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