CN108696297B - Equipment state detection method and device in power line communication network - Google Patents

Equipment state detection method and device in power line communication network Download PDF

Info

Publication number
CN108696297B
CN108696297B CN201710229679.5A CN201710229679A CN108696297B CN 108696297 B CN108696297 B CN 108696297B CN 201710229679 A CN201710229679 A CN 201710229679A CN 108696297 B CN108696297 B CN 108696297B
Authority
CN
China
Prior art keywords
node
state information
controller
state
nodes
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
CN201710229679.5A
Other languages
Chinese (zh)
Other versions
CN108696297A (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
Priority to CN201710229679.5A priority patent/CN108696297B/en
Publication of CN108696297A publication Critical patent/CN108696297A/en
Application granted granted Critical
Publication of CN108696297B publication Critical patent/CN108696297B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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

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 an adjacent node of the intermediate node in a first detection period, receives heartbeat messages sent by adjacent subordinate nodes in a second detection period, the heartbeat messages comprise the state information of the subordinate node of the intermediate node and the state information of the adjacent node of the subordinate node of the intermediate node, and then the intermediate node aggregates the state information of the adjacent node and the state information of the node in the heartbeat messages and carries the aggregated state information in the heartbeat messages to send the aggregated state information to the adjacent superior 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 the intermediate node is carried in the heartbeat message and sends the heartbeat message to the adjacent superior node, and each node is not required to send the heartbeat message to the controller, so that the bandwidth occupied by sending the heartbeat message is saved.

Description

Equipment state detection method and device in power line communication network
Technical Field
The present disclosure relates to communications technologies, and in particular, to a method and an apparatus for detecting a device status in a Power Line Communication (PLC) network.
Background
Power line communication is a method based on power line communication, and is widely applied to the fields of remote control and the like in recent years. In a power line communication network, networking of nodes (also called stations or terminal equipment) in the same area is completed through a controller (also called a central node), and the controller and the nodes, and the nodes are connected through power lines and communicate. In a power line communication network, in order to maintain the state of nodes in the network in real time and ensure the effectiveness of networking, a controller needs to monitor the states of each node, such as online, offline and the like, in real time, and meanwhile, each node also needs to report the online state of the node to the controller regularly.
At present, each node in the power line communication network periodically reports a heartbeat message to a controller, the controller determines a 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, it is determined whether the node belongs to the power line communication network where the controller is located according to a 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, it is determined that the node is 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 be offline or not by judging whether the communication success rate of each node with the controller is 0 or not within a certain time.
According to the state detection mechanism, if the scale of the power line communication network is large, a large amount of bandwidth is occupied by a large amount of nodes for periodically reporting heartbeat messages, and the network transmission efficiency is influenced.
Disclosure of Invention
The application provides a method and a device for detecting the state of equipment in a power line communication network, which can save the bandwidth occupied by a node in the power line communication network for sending heartbeat messages.
The first aspect of the present application provides a method for detecting a device status in a power line communication network, where the method is applied to a power line communication network, the power line communication network includes a controller and a plurality of nodes, 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, and the nodes are connected and communicate through power lines, where the method includes: the method comprises the steps that 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 an adjacent subordinate node in a second detection period, wherein the heartbeat message comprises the state information of the subordinate node of the intermediate node and the state information of the adjacent node of the subordinate node of the intermediate node, and the state information of the adjacent node of the intermediate node and the state information of the node included in the heartbeat message are aggregated to obtain the state information of an associated node of the intermediate node, wherein the associated node of the intermediate node comprises the subordinate node of the intermediate node and the adjacent node of the subordinate node 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 an adjacent superior 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 the intermediate node is carried in the heartbeat message and sends the heartbeat message to the adjacent superior node, and each node is not required 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, the state of the adjacent node in a first detection period to obtain state information of the adjacent node of the intermediate node specifically includes: the intermediate node judges whether the 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 online 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 offline 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 map, the state information of the node included in the heartbeat packet is represented by a second state bit map, and the state information of each node in the first state bit map and the second state bit map occupies at least one bit. The data volume occupied by the state bit diagram is small, so that the bandwidth occupied by sending the heartbeat messages 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 aggregating, by the intermediate node, the state information of the adjacent node of the intermediate node and the state information of the node included in the heartbeat packet to obtain the state information of the intermediate node-associated node specifically includes: and the intermediate node merges the first state bit map table and the second state bit map table to obtain the state information of the associated node of the intermediate node.
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 is ended, the intermediate node initializes the first state bitmap table, and after initialization, state information of nodes included in the first state bitmap table 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.
A second aspect of the present application provides a method for detecting a device status in a power line communication network, where the method is applied to a power line communication network, the power line communication network includes a controller and a plurality of nodes, nodes in the power line communication network report heartbeat packets 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, and the nodes are connected and communicate through power lines, and the method includes:
the method comprises the steps that a controller detects the state of an adjacent node in a first detection period to obtain the state information of the adjacent node of the controller;
the controller receives heartbeat messages sent by adjacent subordinate nodes in a second detection period, wherein the heartbeat messages comprise state information of the subordinate nodes of the controller and state information of the adjacent nodes of the subordinate 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.
Because the intermediate node aggregates the state information of the adjacent node and the state information of the node included in the received heartbeat message, the intermediate node is carried in the heartbeat message and sends the heartbeat message to the adjacent superior node, and each node is not required to send the heartbeat message to the controller, thereby saving the bandwidth occupied by sending the heartbeat message.
With reference to the second aspect, in a first possible implementation manner of the second aspect, the detecting, by the controller, a state of an adjacent node in a first detection period, and acquiring state information of the adjacent node of the controller specifically include: the controller judges whether a discovery message sent by an adjacent node of the controller is received in the first detection period, if the controller receives 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 online state, and 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.
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 updating, by the controller, a network topology table according to the state information of the node in the power line communication network specifically includes:
the controller executes the following updating operation according to the state information of all nodes in the power line communication network:
adding a new network-accessing node in the network topology table;
modifying the state of the existing node in the network topology table to be offline or online, and recording the continuous offline times of the offline node;
and deleting nodes which are offline for N times continuously in the network topology table from the network topology table, wherein N is an integer which is greater 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 adjacent node of the controller is represented by a first state bit map, the state information of the node included in the heartbeat packet is represented by a second state bit map, and the state information of each node in the first state bit map and the second state bit map 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 controller aggregates 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, and specifically includes: and the controller merges the first state bit map and the second state bit map to obtain the state information of the nodes in the power line communication network.
With reference to the second possible implementation manner of the second aspect, in a fifth possible implementation manner of the second aspect, after the first period is ended, the method further includes:
the controller initializes the first state bitmap table, and after initialization, the state information of the nodes in the first state bitmap table is in an off-line state.
The third aspect of the present application provides an intermediate node, the intermediate node is used in a power line communication network, the power line communication network includes a controller and a plurality of nodes, a node in the power line communication network reports heartbeat messages step by step according to a tree structure, the controller is a root node, the plurality of nodes are the intermediate node or a leaf node, connect and communicate through a power line between the controller and the node, between the node and the node, wherein the intermediate node includes:
an obtaining module, 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, configured to receive, in a second detection period, a heartbeat message sent by a neighboring lower node, where the heartbeat message includes state information of the lower node of the intermediate node and state information of the neighboring node of the lower node of the intermediate node;
a processing module, configured to aggregate state information of an adjacent node of the intermediate node and state information of a node included in the heartbeat packet to obtain state 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 an adjacent node of the lower node 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 an adjacent superior node.
With reference to the third aspect, in a first possible implementation manner of the third aspect, the obtaining module is specifically configured to: judging whether a discovery message sent by an 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, determining that the adjacent node of the intermediate node is in an online 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, determining that the adjacent 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 map, the state information of the node included in the heartbeat packet is represented by a second state bit map, and the state information of each node in the first state bit map and the second state bit map 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 merging the first state bit map table and the second state bit map table 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 table after the first period is finished, wherein the state information of the nodes in the first state bitmap table is in an off-line state after initialization.
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 finished, and the timing module is used for closing the timers corresponding to the first detection period and the second detection period.
The fourth aspect of the present application provides a controller, the controller is used in power line communication network, power line communication network includes controller and a plurality of node, node among the power line communication network reports heartbeat packet step by step according to tree structure, the controller is the root node, a plurality of nodes are intermediate node or leaf node, between controller and the node, through power line connection and communication between node and the node, 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;
a receiving module, configured to receive, in a second detection period, a heartbeat message sent by a neighboring lower node, where the heartbeat message includes state information of the lower node of the controller and state information of the neighboring node of the lower node 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 an adjacent node of the controller is received in the first detection period, if the controller receives the discovery message sent by the adjacent node of the controller in the first detection period, determining that the adjacent node of the controller is in an online state, and if the controller does not receive the discovery message sent by the adjacent node of the controller in the first detection period, determining that the adjacent node of the controller is in an offline 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 update module is specifically configured to: according to the state information of all nodes in the power line communication network, the following updating operations are executed:
adding a new network-accessing node in the network topology table;
modifying the state of the existing node in the network topology table to be offline or online, and recording the continuous offline times of the offline node;
and deleting nodes which are offline for N times continuously in the network topology table from the network topology table, wherein N is an integer which is greater 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 adjacent node of the controller is represented by a first state bit map, the state information of the node included in the heartbeat packet is represented by a second state bit map, and the state information of each node in the first state bit map and the second state bit map 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 merging the first state bit map table and the second state bit map table 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 apparatus further includes an initialization module, configured to initialize the first state bitmap table after the first period is ended, where state information of a node 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, the intermediate node is used in power line communication network, power line communication network includes controller and a plurality of node, node in the power line communication network reports heartbeat packet step by step according to tree structure, the controller is the root node, a plurality of nodes do intermediate node or leaf node, between controller and the node, through power line connection and communication between node and the node, wherein, the intermediate node includes:
the processor 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 intermediate node;
a receiver, configured to receive, in a second detection period, a heartbeat message sent by a neighboring lower node, where the heartbeat message includes state information of the lower node of the intermediate node and state information of the neighboring node of the lower node of the intermediate node;
the processor is further configured to aggregate state information of an adjacent node of the intermediate node and state information of a node included in the heartbeat packet to obtain state information of an associated node of the intermediate node, where the associated node of the intermediate node includes a subordinate node of the intermediate node and an adjacent node of the subordinate 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 an 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, determining that the adjacent node of the intermediate node is in an online 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, determining that the adjacent 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 map, the state information of the node included in the heartbeat packet is represented by a second state bit map, and the state information of each node in the first state bit map and the second state bit map 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 merging the first state bit map table and the second state bit map table 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: and initializing the first state bitmap table after the first period is finished, wherein the state information of the nodes in the first state bitmap table after initialization is in an off-line 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 finished, determining that the intermediate node is in an off-line state, and closing the timers corresponding to the first detection period and the second detection period.
The sixth aspect of the present application provides a controller, the controller is used in power line communication network, power line communication network includes controller and a plurality of node, node among the power line communication network reports heartbeat packet step by step according to tree structure, the controller is the root node, a plurality of nodes are intermediate node or leaf node, between controller and the node, through power line connection and communication between node and the node, the controller includes:
the processor 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;
a receiver, configured to receive, in a second detection period, a heartbeat message sent by a neighboring lower node, where the heartbeat message includes state information of the lower node of the controller and state information of the neighboring node of the lower node of the controller;
the processor is further configured to aggregate state information of the adjacent nodes of the controller and state information of the nodes included in the heartbeat message to obtain state information of the nodes in the power line communication network, and update a network topology table according to the state information of the nodes 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 an adjacent node of the controller is received in the first detection period, if the controller receives the discovery message sent by the adjacent node of the controller in the first detection period, determining that the adjacent node of the controller is in an online state, and if the controller does not receive the discovery message sent by the adjacent node of the controller in the first detection period, determining that the adjacent node of the controller is in an offline 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 operations are executed:
adding a new network-accessing node in the network topology table;
modifying the state of the existing node in the network topology table to be offline or online, and recording the continuous offline times of the offline node;
and deleting nodes which are offline for N times continuously in the network topology table from the network topology table, wherein N is an integer which is greater 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 adjacent node of the controller is represented by a first state bit map, the state information of the node included in the heartbeat packet is represented by a second state bit map, and the state information of each node in the first state bit map and the second state bit map 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 merging the first state bit map table and the second state bit map table 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 is ended, and after the initialization, state information of a node included in the first state bitmap table is in an offline state.
The intermediate node provided in the third aspect and the fifth aspect may be configured to perform the method provided in the first aspect, and beneficial effects of the intermediate node may refer to beneficial effects brought by the first aspect and various possible implementation manners, which are not described herein again.
The controller provided in the fourth aspect and the controller provided in the sixth aspect may be configured to execute the method provided in the second aspect, and beneficial effects of the controller provided in the second aspect and possible embodiments may be referred to, and are not described herein again.
The application provides a method and a device for detecting equipment states in a power line communication network, wherein an intermediate node detects states of adjacent nodes in a first detection period, acquires state information of the adjacent nodes of the intermediate node, receives heartbeat messages sent by the adjacent subordinate nodes in a second detection period, the heartbeat messages comprise the state information of the subordinate nodes of the intermediate node and the state information of the adjacent nodes of the subordinate nodes of the intermediate node, then, the intermediate node aggregates the state information of the adjacent nodes 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 finally, the state information of the associated nodes of the intermediate node and the state information of the intermediate node are carried in the heartbeat messages and sent to the adjacent superior 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 the intermediate node is carried in the heartbeat message and sends the heartbeat message to the adjacent superior node, and each node is not required 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 applied;
fig. 2 is a flowchart of a method for detecting a device status in a power line communication network according to an embodiment;
FIG. 3 is a state bit diagram of a neighbor node 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 the 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 the fifth embodiment;
fig. 8 is a schematic structural diagram of a controller according to a sixth embodiment.
Detailed Description
The method is applied to a power line communication network, 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 nodes are intermediate nodes or leaf nodes, and the controller and the nodes are connected through power lines and communicate. 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 middle nodes are nodes with lower nodes. The power line communication network is, for example, a remote control meter reading system, and correspondingly, the nodes are intelligent electric meters.
Fig. 1 is a schematic diagram of a reporting path of a heartbeat packet of a power line communication network, where the power line communication network includes a controller and 11 nodes, and the nodes report the heartbeat packet to the controller step by step according to a tree structure, in the example shown in fig. 1, 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, the node 7, the node 8, the node 9, the node 10, the node 11 and the node 3 are leaf nodes, the node 1, the node 2, the node 4, the node 5 and the 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 packet, and does not represent the actual physical connection relationship of the node.
Fig. 2 is a flowchart of a device status detection method in a power line communication network according to a first embodiment, and referring to fig. 1 and fig. 2, the method according to the first embodiment includes the following steps:
step 101, the intermediate node detects the state of the adjacent node in the first detection period, and obtains the state information of the adjacent node of the intermediate node.
When the power line communication network is formed, each node is configured or self-learned to obtain a discovery list, the discovery list comprises a plurality of nodes, the nodes in the discovery list are adjacent nodes of the node, and each node can monitor messages sent by the adjacent nodes. Specifically, the intermediate node may detect the state of the neighboring node in the following manner: the intermediate node judges whether a discovery message sent by the 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 packet may be any existing packet, for example, a data packet, a heartbeat packet, and the like sent by a node, or may be a newly defined packet. If the Network Identifier is the Identifier of the power line communication Network, it is determined that the node belongs 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 the 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 the state information of the node.
It should be clear that the division of the neighboring nodes of a certain node is not based on the heartbeat packet reporting path shown in fig. 1, but is determined based on the actual physical connection of the nodes in the power line communication network, and therefore, for a certain node, the neighboring nodes of the node may be an upper node, a lower node, or a node without an upper-lower relationship. In a power line communication network, not only the intermediate node needs to detect the state of an adjacent node, but also the controller and the leaf node need to detect the state information of the adjacent node, and the detection modes of the controller and the leaf node are the same as the detection mode of the intermediate node.
The state information of the neighboring nodes of the intermediate node may be represented in various ways, for example, the state information of the neighboring nodes of the intermediate node is represented in a form of a list, and the table one is a schematic diagram of the state information of the neighboring nodes of the intermediate node.
Watch 1
Node point 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 a state of the node is offline when the state information is 0, and online when the state information is 1. Of course, the status information may also be represented by more bits, or the status information may be represented by tube and false, where tube indicates that the node is online, and false indicates that the node is offline.
The state information of the adjacent nodes of the intermediate node can also be represented by a state bit diagram, the state information of each node in the state bit diagram occupies at least one bit, and the state information of each node is represented by the value of the bit. Taking the example shown in the first table as an example, the intermediate node includes 4 nodes, the state information of each node occupies one bit, fig. 3 is a state bit graph of a neighboring node of the intermediate node, as shown in fig. 3, the state bit graph includes 4 bits, each bit represents the state information of one node, the 4 bits sequentially represent the states of node 1, node 2, node 3, and node 4 from left to right, in the example shown in fig. 3, a value of a bit of 1 represents that the state of a node is online, and a value of a bit of 0 represents that the state of a node is offline. Of course, 0 may be used to indicate that the node is online, and 1 may be used to indicate that the node is offline. The state bit diagram represents the state information of the adjacent nodes of the node, so that the storage space occupied by the state information of the adjacent nodes of the storage node can be reduced.
And 102, the intermediate node receives a heartbeat message sent by the adjacent subordinate node in a second detection period, wherein the heartbeat message comprises the state information of the subordinate node of the intermediate node and the state information of the adjacent node of the subordinate node of the intermediate node.
The second detection period is a heartbeat message reporting period, all nodes (including an intermediate node and a leaf node) except the controller in the power line communication network send heartbeat messages to an adjacent upper node, the heartbeat messages reported by the leaf node include state information of the adjacent node of the leaf node and state information of the leaf node, and the heartbeat messages reported by the intermediate node include state information of a lower node of the intermediate node and 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 a reporting path of the heartbeat message. In the power line communication network shown in fig. 1, when the intermediate node is the node 4, the lower nodes of the node 4 are the node 7, the node 8, and the 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, the lower node of the node 5 is the node 10. When the intermediate node is the node 6, the lower node of 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 subordinate node of the intermediate node and the state information of the neighboring node of the subordinate node of the intermediate node are represented by a second state bitmap, and the state information of each node in the state bitmap occupies at least one bit. That is, the state information of the nodes included in the heartbeat message is represented by the state bitmap, and the data volume occupied by the state bitmap is small, so that the bandwidth occupied by sending the heartbeat message can be reduced. Of course, the state information of the nodes in the heartbeat message may also be represented in a list or other form.
Step 103, the intermediate node aggregates the state information of the adjacent node of the intermediate node and the state information of the node included in the heartbeat message to obtain the state information of the intermediate node associated node.
The related nodes of the intermediate node comprise lower nodes of the intermediate node and adjacent nodes of the lower nodes of the intermediate node.
And 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 superior node.
The node reports heartbeat messages step by step in a power line communication network according to a tree structure, specifically, a leaf node reports the heartbeat message of the node, the heartbeat message reported by the leaf node comprises state information of an adjacent node of the leaf node and the state information of the leaf node, the leaf node sends the heartbeat message to an adjacent upper node, the adjacent upper node aggregates the state information of the node, the state information of the adjacent node and the state information of the node contained in the received heartbeat message, carries the aggregated state information in the heartbeat message and sends the heartbeat message to the adjacent upper node, and the like, and finally sends the heartbeat message to a controller.
For an intermediate node, it may receive heartbeat messages sent by multiple neighboring lower nodes, and the intermediate node may aggregate state information of nodes included in the heartbeat messages sent by all neighboring lower nodes with state information of its own neighboring node, and since the state information of nodes included in the heartbeat messages sent by multiple neighboring lower nodes may be repeated, 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, to obtain state information of nodes associated with the intermediate node, that is, delete the state information of the repeated nodes. The related 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 the first state bit diagram and the state information of the node included in the heartbeat message is represented by the second state bit diagram, the intermediate node aggregates the state information of the adjacent node of the intermediate node and the state information of the node included in the heartbeat message to obtain the state information of the intermediate node-associated node, which specifically comprises the following steps: and the intermediate node merges 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 an existing heartbeat message reporting mechanism, each node sends a heartbeat message to a controller, an intermediate node not only needs to send the heartbeat message of the intermediate node to an adjacent upper node, but also needs to forward the heartbeat message of a lower node to the adjacent upper node, and a large amount of bandwidth can be occupied when the intermediate node sends the heartbeat message. In the reporting mechanism of this embodiment, the intermediate node receives the heartbeat message sent by the adjacent lower node, synthesizes the state information of its own adjacent node and the state information of the node included in the heartbeat message, and then sends the heartbeat message to the adjacent upper node, and the controller finally receives only the heartbeat message sent by the adjacent lower node, thereby saving the bandwidth occupied by sending the heartbeat message. Especially in large-scale networking, the number of nodes included in the power line communication network is large, and the bandwidth occupied by the reported heartbeat message can be remarkably reduced by the method of the embodiment.
In addition, in the conventional heartbeat message reporting mechanism, because each node sends a heartbeat message to the controller, the heartbeat message volume is large, so that 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 set reporting period of the heartbeat message is too long, which may result in too long offline judgment time, and after the node is offline, the controller may not find that the node is offline in time, and still may send a message to the node, and at this time, the node may not receive the message sent by the controller because the node is offline. After the scheme of the embodiment is adopted, because the heartbeat messages are reduced, the bandwidth occupied by reporting the heartbeat messages is also reduced, so that the reporting period of the heartbeat messages can be reduced, and under the condition of the same bandwidth occupancy rate, the reporting period of the heartbeat messages is reduced, and the online judgment time of the nodes can be reduced.
Taking the power line communication network shown in fig. 1 as an example, the reporting process of 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 state information of a neighboring node of the node 7 and state information of the node 7, the heartbeat message sent by the node 8 includes state information of a neighboring node of the node 8 and state information of the node 8, the heartbeat message sent by the node 9 includes state information of a neighboring node of the node 9 and state information of the node 9, the heartbeat message sent by the node 10 includes state information of a neighboring node of the node 10 and state information of the node 10, and the heartbeat message sent by the node 11 includes state information of a neighboring node of the node 11 and state information of the node 11. The adjacent 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. Similarly, the second detection periods of the node 10 and the node 11 may be the same or different. After the second detection period is finished, the node 4 aggregates the state information of the node included in the heartbeat messages sent by the nodes 7, 8 and 9 and the state information of the adjacent nodes of the node 4 to obtain the state information of the associated nodes of the node 4. After the node 4 obtains the state information of the associated node, the state information of the node 4 and the state information of the associated node of the node 4 are carried in a heartbeat message and sent 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 and the state information of the adjacent node of the node 2, which are contained in the heartbeat messages sent by the node 4 and the node 3, so as to obtain the state information of the associated node of the node 2. After obtaining the state information of the associated node, the node 2 carries the state information of the associated node of the node 2 and the state information of the node 2 in the heartbeat message and sends the heartbeat message to the controller. Similarly, the node 2 also sends a heartbeat message to the controller, and the heartbeat message sent by the node 2 includes own state information of the node 2, the node 5, the node 6, the node 10 and the node 11 and state information of adjacent nodes. The controller aggregates the state information of the nodes and the state information of the adjacent nodes in the heartbeat messages sent by the nodes 1 and 2 to obtain the state information of the nodes in the power line communication network.
Optionally, after the first detection period is ended, the intermediate node initializes the first state bitmap table, and the state information of the node included in the initialized first state bitmap table is in an offline state, that is, the initial state information of the adjacent node 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 ended, the intermediate node determines that the intermediate node is in an offline state, and closes the timers corresponding to the first detection period and the second detection period. The intermediate node can determine whether the intermediate node is in an offline state in several ways: (1) in a first detection period, whether a beacon frame sent by a controller is received or not is judged, the controller broadcasts 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 is determined to be in an online state, and if the intermediate node does not receive the beacon frame in the first detection period, the intermediate node is determined to be 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 that the intermediate node is off-line. (3) The intermediate node receives the SNID sent by the controller in a first detection period, judges whether the received SIND is the same as the SNID stored locally, if the received SNID is different from the SNID stored locally, the intermediate node indicates that the intermediate node is in an offline state and moves to other networks, and if the received SNID is the same as the SNID stored locally, the intermediate node indicates that the intermediate node is in an online state.
In this embodiment, the intermediate node detects the state of the adjacent node in the first detection period, obtains the state information of the adjacent node of the intermediate node, receives the heartbeat message sent by the adjacent subordinate node in the second detection period, where the heartbeat message includes the state information of the subordinate node of the intermediate node and the state information of the adjacent node of the subordinate node of the intermediate node, and 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 intermediate node-associated node, and finally carries the state information of the intermediate node-associated node and the state information of the intermediate node in the heartbeat message to send to the adjacent superior 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 the intermediate node is carried in the heartbeat message and sends the heartbeat message to the adjacent superior node, and each node is not required 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 device status detection method in a power line communication network according to a second embodiment, where 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 with reference to fig. 1 and 4, the method according to the second embodiment includes the following steps:
step 201, the controller detects the state of the adjacent node in the first detection period, and obtains the state information of the adjacent node of the controller.
Specifically, the controller judges whether a discovery message sent by an adjacent node of the controller is received in a first detection period, and if the controller receives 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 online 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 packet 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 adjacent nodes of the controller may also be represented by a state bit diagram or a list, where the state information of each node in the state bit diagram 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 first embodiment, which is not described herein again.
Step 202, the controller receives a heartbeat message sent by an adjacent subordinate node in a second detection period, where the heartbeat message includes state information of the subordinate node of the controller and state information of the adjacent node of the subordinate node of the controller.
The state information of the node included in the heartbeat message can also be represented by a state bit diagram or a list. Wherein, the state information of each node in the state bitmap table occupies at least one bit.
And 203, 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.
When the state information of the adjacent node of the controller is represented by the first state bit diagram and the state information of the node included in the heartbeat message is represented by the 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, and the method specifically comprises the following steps: and the controller merges 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.
And step 204, the controller updates the network topology table according to the state information of the nodes in the power line communication network.
Specifically, the controller executes the following updating operation according to the state information of all nodes in the power line communication network:
(1) adding a new network-accessing node in the network topology table;
(2) modifying the state of the existing node in the network topology table to be offline or online, and recording the continuous offline times of the offline node;
(3) and deleting nodes which are offline for N times continuously in the network topology table from the network topology table, wherein N is an integer which is greater than or equal to 2.
And the controller deletes the nodes which are offline for N times continuously in the network topology table from the network topology table, namely, the off-network operation is performed on the nodes. It should be emphasized that the node online referred to in this application means that the node is in the network, and the communication quality is good, and the node can receive the effective message. The node offline means that the node is in the network, but the communication quality is not good, and the node cannot receive effective messages. Node off-network means that the node has poor communication quality, cannot receive effective messages and leaves the network.
Optionally, after the first period is ended, the controller initializes the first state bitmap table, and the state information of the node included in the initialized first state bitmap table is in an offline state.
In this embodiment, the controller detects the state of the adjacent node in the first detection period, obtains the state information of the adjacent node of the controller, receives the heartbeat packet sent by the adjacent subordinate node in the second detection period, where the heartbeat packet includes the state information of the subordinate node of the controller and the state information of the adjacent node of the subordinate node of the controller, and then the controller aggregates the state information of the adjacent node and the state information of the node included in the heartbeat packet 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 subordinate nodes, thereby saving the bandwidth occupied by sending the heartbeat messages.
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 multiple nodes, the nodes in the power line communication network report heartbeat packets step by step according to a tree structure, the controller is a root node, the multiple nodes are the intermediate node or leaf nodes, and the intermediate node is connected and communicates with the nodes through power lines, as shown in fig. 5, and 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 a neighboring lower node, where the heartbeat packet includes state information of the lower node of the intermediate node and state information of the neighboring node of the lower node of the intermediate node;
a processing module 23, configured to aggregate state information of an adjacent node of the intermediate node and state information of a node included in the heartbeat packet, to obtain state 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 an adjacent node of the lower node of the intermediate node;
and the sending module 24 is configured to carry the state information of the associated node of the intermediate node and the state information of the intermediate node in the heartbeat packet and send the heartbeat packet to an adjacent higher node.
Optionally, the obtaining module 21 is specifically configured to: judging whether a discovery message sent by an 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, determining that the adjacent node of the intermediate node is in an online 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, determining that the adjacent 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 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. Correspondingly, the processing module 23 is specifically configured to: and merging the first state bit map table and the second state bit map table to obtain the state information of the associated node of the intermediate node.
Optionally, the intermediate node further includes: an initializing module (not shown in fig. 5), configured to initialize the first state bitmap table after the first period ends, where state information of a node included in the first state bitmap table after initialization is in an offline state.
Optionally, the intermediate node further includes: a determining module and a timing module (not shown in fig. 5), where the determining module is configured to determine that the intermediate node is in an offline state after the first period is ended; 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 configured to execute the method executed by the intermediate node in the first embodiment and the method executed by the intermediate node in the second embodiment, and the specific implementation manner and the technical effect are similar, and are not described herein again.
Fig. 6 is a schematic structural diagram of a controller provided in the fourth embodiment, where the controller is applied to a power line communication network, the power line communication network includes the controller and a plurality of nodes, nodes in the power line communication network report heartbeat packets 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, and the nodes are connected and communicate through power lines, as shown in fig. 6, the controller includes:
the detecting module 31 is configured to detect a state of an adjacent node in a first detection period, and acquire 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 a neighboring lower node, where the heartbeat packet includes state information of the lower node of the controller and state information of the neighboring node of the lower node of the controller;
the processing module 33 is configured to aggregate state information of the adjacent nodes of the controller and state information of the nodes included in the heartbeat packet, so as to obtain state information of the nodes in the power line communication network;
and the updating module 34 is configured to update a network topology table according to the status 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 an adjacent node of the controller is received in the first detection period, if the controller receives the discovery message sent by the adjacent node of the controller in the first detection period, determining that the adjacent node of the controller is in an online state, and if the controller does not receive the discovery message sent by the adjacent node of the controller in the first detection period, determining that the adjacent node of the controller is in an offline state.
Optionally, the update module 34 is specifically configured to: according to the state information of all nodes in the power line communication network, the following updating operations are executed:
adding a new network-accessing node in the network topology table;
modifying the state of the existing node in the network topology table to be offline or online, and recording the continuous offline times of the offline node;
and deleting nodes which are offline for N times continuously in the network topology table from the network topology table, wherein N is an integer which is greater than or equal to 2.
Optionally, the state information of the adjacent 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. Correspondingly, the processing module 33 is specifically configured to: and merging the first state bit map table and the second state bit map table 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 table after the first period is finished, and after the initialization, the state information of the node included in the first state bitmap table is in an offline state.
Fig. 7 is a schematic structural diagram of an intermediate node provided in the fifth embodiment, where the intermediate node is applied in a power line communication network, the power line communication network includes a controller and multiple nodes, the nodes in the power line communication network report heartbeat packets step by step according to a tree structure, the controller is a root node, the multiple nodes are the intermediate node or leaf nodes, and 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 configured to store an instruction, the receiver 43 is configured to receive data sent by other devices, the transmitter 44 is configured to send data to other devices, and the processor 41 is configured to execute the instruction 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 a specific implementation principle and a technical effect are similar to those of the method embodiment, and are not described herein again.
Fig. 8 is a schematic structural diagram of a controller provided in the sixth embodiment, where the controller is applied to a power line communication network, the power line communication network includes the controller and a plurality of nodes, nodes in the power line communication network report heartbeat packets 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, and the nodes are connected and communicate through power lines, as shown in fig. 8, the controller 500 includes: a processor 51, a memory 52, a receiver 53 and a 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 configured to store instructions, the receiver 53 is configured to receive data sent by other devices, the transmitter 54 is configured to send data to other devices, and the processor 51 is configured to execute the instructions stored in the memory 52, so that the controller point executes the steps executed by the controller in the first and second embodiments of the method, and specific implementation principles and technical effects are similar to those of the method embodiment, and are not described herein again.
It is to be understood that the processor used by an intermediate node or controller in 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 illustrative logical blocks, modules, and circuits described in connection with the disclosure. The processor may also be a combination of computing functions, e.g., comprising one or more microprocessors, DSPs, and microprocessors, among others.
The bus described herein may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, the buses in the figures of the present application are not limited to only one bus or one type of bus.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and in actual implementation, there may be other divisions, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to perform some steps of the methods according to the embodiments of the present application. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.

Claims (16)

1. A method for detecting equipment state in a power line communication network is applied to the power line communication network, 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 nodes are middle nodes or leaf nodes, the controller and the nodes are connected through power lines and communicate, and the method is characterized by comprising the following steps:
the intermediate node detects the state of an adjacent node in a first detection period and acquires the state information of the adjacent node of the intermediate node;
the intermediate node receives a heartbeat message sent by an adjacent subordinate node in a second detection period, wherein the heartbeat message comprises state information of the subordinate node of the intermediate node and state information of the adjacent node of the subordinate node of the intermediate node;
the intermediate node aggregates the state information of the adjacent node of the intermediate node and the state information of the node included in the heartbeat message to obtain the state information of the intermediate node associated node, wherein the intermediate node associated node includes a lower node of the intermediate node and an adjacent node of the lower node of the intermediate node; the state information of the adjacent 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 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 an adjacent superior node;
the aggregating, by the intermediate node, the state information of the adjacent node of the intermediate node and the state information of the node included in the heartbeat packet to obtain the state information of the intermediate node-associated node includes:
and the intermediate node merges the first state bit map table and the second state bit map table to obtain the state information of the associated node of the intermediate node.
2. The method according to claim 1, wherein the intermediate node detects the states of the neighboring nodes in a first detection period, and acquires the state information of the neighboring nodes of the intermediate node, including:
the intermediate node judges whether a discovery message sent by an adjacent node of the intermediate node is received in the first detection period;
if the intermediate node receives a discovery message sent by an 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;
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 offline state.
3. The method according to claim 1 or 2, wherein after the first detection period is over, the method further comprises:
the intermediate node initializes the first state bitmap table, and after initialization, the state information of the nodes in the first state bitmap table is in an off-line state.
4. The method according to claim 1 or 2, wherein after the first detection period is over, the method further comprises:
and the intermediate node determines that the intermediate node is in an off-line state, and closes the timers corresponding to the first detection period and the second detection period.
5. A method for detecting equipment state in a power line communication network is applied to the power line communication network, 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 nodes are middle nodes or leaf nodes, the controller and the nodes are connected through power lines and communicate, and the method is characterized by comprising the following steps:
the method comprises the steps that a controller detects the state of an adjacent node in a first detection period to obtain the state information of the adjacent node of the controller;
the controller receives heartbeat messages sent by adjacent subordinate nodes in a second detection period, wherein the heartbeat messages comprise state information of the subordinate nodes of the controller and state information of the adjacent nodes of the subordinate 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; the state information of the adjacent nodes of the controller is represented by a first state bit diagram, the state information of the nodes 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 controller updates a network topology table according to the state information of the nodes in the power line communication network;
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 method includes the following steps:
and the controller merges the first state bit map and the second state bit map to obtain the state information of the nodes in the power line communication network.
6. The method of claim 5, wherein 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, including:
the controller judges whether a discovery message sent by an adjacent node of the controller is received in the first detection period;
if the controller receives a discovery message sent by an adjacent node of the controller in the first detection period, the controller determines that the adjacent node of the controller is in an online 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.
7. The method according to claim 5 or 6, wherein the controller updates a network topology table according to the status information of the nodes in the power line communication network, comprising:
the controller executes the following updating operation according to the state information of all nodes in the power line communication network:
adding a new network-accessing node in the network topology table;
modifying the state of the existing node in the network topology table to be offline or online, and recording the continuous offline times of the offline node;
and deleting nodes which are offline for N times continuously in the network topology table from the network topology table, wherein N is an integer which is greater than or equal to 2.
8. The method according to claim 5 or 6, wherein after the first detection period is over, the method further comprises:
the controller initializes the first state bitmap table, and after initialization, the state information of the nodes in the first state bitmap table is in an off-line state.
9. The utility model provides an intermediate node, intermediate node uses in power line communication network, power line communication network includes controller and a plurality of node, node in the power line communication network reports heartbeat packet step by step according to the tree structure, the controller is the root node, a plurality of nodes are intermediate node or leaf node, between controller and the node, through power line connection and communication between node and the node, its characterized in that, intermediate node includes:
an obtaining module, 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, configured to receive, in a second detection period, a heartbeat message sent by a neighboring lower node, where the heartbeat message includes state information of the lower node of the intermediate node and state information of the neighboring node of the lower node of the intermediate node;
a processing module, configured to aggregate state information of an adjacent node of the intermediate node and state information of a node included in the heartbeat packet to obtain state 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 an adjacent node of the lower node of the intermediate node; the state information of the adjacent 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 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 an adjacent superior node;
wherein the processing module is specifically configured to:
and merging the first state bit map table and the second state bit map table to obtain the state information of the associated node of the intermediate node.
10. The node according to claim 9, wherein the obtaining module is specifically configured to:
judging whether a discovery message sent by an adjacent node of the intermediate node is received in the first detection period;
if the intermediate node receives a discovery message sent by an adjacent node of the intermediate node in the first detection period, determining that the adjacent node of the intermediate node is in an online 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, determining that the adjacent node of the intermediate node is in an offline state.
11. The node according to claim 9 or 10, further comprising:
and the initialization module is used for initializing the first state bitmap table after the first detection period is finished, wherein the state information of the nodes in the first state bitmap table is in an off-line state after initialization.
12. The node according to claim 9 or 10, further comprising:
a determining module, configured to determine that the intermediate node is in an offline state after the first detection period is ended;
and the timing module is used for closing the timers corresponding to the first detection period and the second detection period.
13. The utility model provides a controller, the controller is used in power line communication network, power line communication network includes controller and a plurality of node, node in the power line communication network reports heartbeat packet step by step according to the tree structure, the controller is the root node, a plurality of nodes are middle node or leaf node, between controller and the node, through power line connection and communication between node and the node, its characterized in that, 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;
a receiving module, configured to receive, in a second detection period, a heartbeat message sent by an adjacent subordinate node, where the heartbeat message includes state information of a subordinate node of the controller and state information of a node associated with the subordinate node 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; the state information of the adjacent nodes of the controller is represented by a first state bit diagram, the state information of the nodes 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 updating module is used for updating a network topology table according to the state information of the nodes in the power line communication network;
wherein the processing module is specifically configured to:
and merging the first state bit map table and the second state bit map table to obtain the state information of the nodes in the power line communication network.
14. The controller of claim 13, wherein the detection module is specifically configured to:
judging whether a discovery message sent by an adjacent node of the controller is received in the first detection period;
if the controller receives a discovery message sent by an adjacent node of the controller in the first detection period, determining that the adjacent node of the controller is in an online state;
and if the controller does not receive the discovery message sent by the adjacent node of the controller in the first detection period, determining that the adjacent node of the controller is in an offline state.
15. The controller according to claim 13 or 14, wherein the update module is specifically configured to:
according to the state information of all nodes in the power line communication network, the following updating operations are executed:
adding a new network-accessing node in the network topology table;
modifying the state of the existing node in the network topology table to be offline or online, and recording the continuous offline times of the offline node;
and deleting nodes which are offline for N times continuously in the network topology table from the network topology table, wherein N is an integer which is greater than or equal to 2.
16. The controller according to claim 13 or 14, further comprising:
and the initialization module is used for initializing the first state bitmap table after the first detection period is finished, wherein the state information of the nodes in the first state bitmap table is in an off-line state after initialization.
CN201710229679.5A 2017-04-10 2017-04-10 Equipment state detection method and device in power line communication network Active CN108696297B (en)

Priority Applications (2)

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
CN201710229679.5A CN108696297B (en) 2017-04-10 2017-04-10 Equipment state detection method and device in power line communication network

Applications Claiming Priority (1)

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

Related Child Applications (1)

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

Publications (2)

Publication Number Publication Date
CN108696297A CN108696297A (en) 2018-10-23
CN108696297B true CN108696297B (en) 2020-12-18

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 After (1)

Application Number Title Priority Date Filing Date
CN202011398640.4A Active CN112468372B (en) 2017-04-10 2017-04-10 Method and device for detecting equipment state 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 (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101099351A (en) * 2005-02-09 2008-01-02 思科技术公司 Trigger for packing path computation requests
JP2015035807A (en) * 2013-08-08 2015-02-19 富士通株式会社 Multi-hop network failure detection method and node
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

Family Cites Families (10)

* 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
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
CN102612110B (en) * 2012-03-02 2014-11-05 浙江大学 Distributive self-organized routing method in electric carrier wave illumination control system
CN103200108B (en) * 2013-04-19 2016-03-02 电子科技大学 A kind of prime number route network generation method
US9178772B2 (en) * 2013-06-25 2015-11-03 Cisco Technology, Inc. Cumulative node heartbeat relay agents in constrained computer networks
CN106301853B (en) * 2015-06-05 2019-06-18 华为技术有限公司 The fault detection method and device of group system interior joint
US9832106B2 (en) * 2015-06-23 2017-11-28 Juniper Networks, Inc. System and method for detecting network neighbor reachability
CN105591826B (en) * 2016-03-18 2018-12-11 光一科技股份有限公司 A kind of low-voltage power line bandwidth carrier communication network failure diagnostic device and method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101099351A (en) * 2005-02-09 2008-01-02 思科技术公司 Trigger for packing path computation requests
JP2015035807A (en) * 2013-08-08 2015-02-19 富士通株式会社 Multi-hop network failure detection method and node
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
CN112468372B (en) 2023-10-13
CN112468372A (en) 2021-03-09

Similar Documents

Publication Publication Date Title
CN108696297B (en) Equipment state detection method and device in power line communication network
CN103634149B (en) A kind of monitoring method for distributed system
CN111654321B (en) Satellite network management method and device and electronic equipment
CN102857377B (en) The online topological automatic generation method of a kind of train network
CN104618980B (en) The route implementation method of wireless multi-hop chain network
CN112688309B (en) Branch topology construction method and device applied to power distribution network
CN102625253B (en) Group calling method, equipment and terminal
CN106954258A (en) A kind of paging processing method, device and paging system
US20200186415A1 (en) Systems and methods for node outage determination and reporting
CN107786390B (en) Method and device for correcting networking nodes
CN102404152B (en) Method and equipment for identifying response messages
CN113179428B (en) Method, equipment, system and storage medium for optimizing streaming media transmission link
CN107800465B (en) Power line carrier communication transmission method
CN111538772B (en) Data exchange processing method and device, electronic equipment and storage medium
CN109270885B (en) Data communication method, device and equipment for monitoring PLC system and storage medium
CN111884915A (en) Method for improving efficiency of acquiring modbus equipment by gateway
CN110996289A (en) Intelligent gateway, method and system for machine state monitoring diagnostic instrument
CN214380929U (en) Gateway equipment for connecting Internet of things sensing equipment and electric power information acquisition equipment
CN102368715B (en) IEC-61850 protocol gateway-based realization equipment for centralized network management of exchangers
CN112637804B (en) Dynamic layered networking method for obstacle avoidance wireless sensor network
CN107835521B (en) Method and device for networking field intensity threshold
CN110391923A (en) The method and the network equipment of multicast message processing
CN107430805B (en) Information transmission system, method and device
CN110233713A (en) A kind of multi link communications method and system based on LLDP message
CN115134021B (en) Channel fusion method and device for dual-mode communication, electronic equipment and storage medium

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