Power line carrier communication method, device, equipment and medium

文档序号:37999 发布日期:2021-09-24 浏览:20次 中文

阅读说明:本技术 一种电力线载波通信方法、装置、设备和介质 (Power line carrier communication method, device, equipment and medium ) 是由 孙颖 苏志鹏 吴琼 余飞鸥 赵颖 于 2021-06-22 设计创作,主要内容包括:本发明公开了一种电力线载波通信方法、装置、设备和介质,应用于中心节点,中心节点分别与预设的集中器、多个预设的关联节点通信连接,方法包括:当接收到IP数据包时,根据IP数据包的接收方式确定IP数据包的类型;若IP数据包的类型为IP下行数据包,则构建应用层数据包,并通过预设的电力线发送至目标关联节点,以使目标关联节点从应用层数据包内提取IP下行报文并发送到关联的感知设备;若IP数据包的类型为IP上行数据包,则从IP上行数据包提取IP上行报文,并通过预设串口发送至集中器,以使集中器对IP上行报文进行二次封装后发送到预设的业务主站,从而更为有效地结合HPLC通信与IP层通信,提高通信传输效率。(The invention discloses a power line carrier communication method, a device, equipment and a medium, which are applied to a central node, wherein the central node is respectively in communication connection with a preset concentrator and a plurality of preset associated nodes, and the method comprises the following steps: when an IP data packet is received, determining the type of the IP data packet according to the receiving mode of the IP data packet; if the type of the IP data packet is an IP downlink data packet, constructing an application layer data packet, and sending the application layer data packet to a target associated node through a preset power line, so that the target associated node extracts an IP downlink message from the application layer data packet and sends the IP downlink message to associated sensing equipment; if the type of the IP data packet is the IP uplink data packet, the IP uplink message is extracted from the IP uplink data packet and is sent to the concentrator through the preset serial port, so that the concentrator packages the IP uplink message for the second time and sends the IP uplink message to the preset service master station, the HPLC communication and the IP layer communication are combined more effectively, and the communication transmission efficiency is improved.)

1. A power line carrier communication method is applied to a central node which is respectively in communication connection with a preset concentrator and a plurality of preset associated nodes, and comprises the following steps:

when an IP data packet is received, determining the type of the IP data packet according to the receiving mode of the IP data packet;

if the type of the IP data packet is an IP downlink data packet, constructing an application layer data packet, and sending the application layer data packet to a target associated node through a preset power line; the target associated node is used for extracting an IP downlink message from the application layer data packet and sending the IP downlink message to associated sensing equipment;

if the type of the IP data packet is an IP uplink data packet, extracting an IP uplink message from the IP uplink data packet, and sending the IP uplink message to the concentrator through a preset serial port; and the concentrator is used for carrying out secondary encapsulation on the IP uplink message and then sending the IP uplink message to a preset service master station.

2. The power-line carrier communication method according to claim 1, wherein the step of determining, when an IP packet is received, a type of the IP packet according to a manner of receiving the IP packet includes:

when an IP data packet is received, detecting a receiving mode of the IP data packet;

when the receiving mode of the IP data packet is serial port receiving, determining the type of the IP data packet as the IP downlink data packet;

and if the receiving mode of the IP data packet is power line receiving, determining that the type of the IP data packet is the IP uplink data packet.

3. The power-line carrier communication method according to claim 1, wherein the concentrator is further configured to:

when an initial IP message sent by the service master station is received, if the type of the initial IP message is a secondary packaging message, deleting an IP header in the initial IP message, and generating an IP downlink message; the IP header is an IP address of the concentrator;

acquiring a first bit from a node IP address contained in the IP downlink message;

judging whether a connection relation exists between the network identification code corresponding to the first bit;

if the connection relation exists, constructing a downlink IP data packet by adopting the IP downlink message and the node IP address according to the network identification code, and sending the downlink IP data packet to the central node through the serial port;

and if the connection relation does not exist, discarding the IP downlink message.

4. The power line carrier communication method according to claim 1, wherein the step of constructing an application packet and sending the application packet to a target associated node through a preset power line if the type of the IP packet is an IP downlink packet comprises:

if the type of the IP data packet is an IP downlink data packet, acquiring the IP downlink message and a node IP address from the IP downlink data packet;

extracting a second bit within the node IP address;

judging whether a target associated node corresponding to the equipment identification code is in a broadband power line carrier communication network or not according to the equipment identification code corresponding to the second bit; the broadband power line carrier communication network consists of the central node and a plurality of the associated nodes;

and if so, constructing an application layer data packet by adopting the IP downlink message according to a preset power line carrier communication rule, and sending the application layer data packet to the target associated node through a preset power line.

5. The power-line carrier communication method according to claim 4, wherein the association node is configured to:

when an IP uplink message generated by the sensing equipment is received, constructing an application layer message by adopting the IP uplink message according to a preset power line carrier communication rule;

constructing a link layer message according to the corresponding relation between the IP address contained in the IP uplink message and the equipment identification code;

and constructing an IP uplink data packet by adopting the application layer message and the link layer message, and sending the IP uplink data packet to the central node.

6. The power-line carrier communication method according to any one of claims 1 to 5, wherein the perceiving device is communicatively connected to the concentrator, the method further comprising:

when any one of the associated nodes is added into a new broadband power line carrier communication network, a preset serial port AT instruction is sent to the sensing equipment through the associated node; the serial port AT instruction is used for sending the new IP address of the associated node to the perception equipment;

reporting the new IP address to a concentrator through the sensing equipment; and the concentrator is also used for reporting the new IP address to the service master station to complete the address change of the associated node.

7. The power-line carrier communication method according to claim 4 or 5, wherein the perceiving device is communicatively connected to the concentrator, the method further comprising:

when a new associated node is added into the broadband power line carrier communication network, sending a preset serial port AT instruction to the sensing equipment through the new associated node; the serial port AT instruction is used for sending the registered IP address corresponding to the new associated node to the perception equipment;

reporting the registered IP address to a concentrator through the sensing equipment; and the concentrator is also used for reporting the registered IP address to the service master station to complete the address registration of the new associated node.

8. A broadband power line carrier communication device is applied to a central node which is respectively in communication connection with a preset concentrator and a plurality of preset associated nodes, and the device comprises:

the data packet type determining module is used for determining the type of the IP data packet according to the receiving mode of the IP data packet when the IP data packet is received;

the downlink communication module is used for constructing an application layer data packet and sending the application layer data packet to a target associated node through a preset power line if the type of the IP data packet is an IP downlink data packet; the target associated node is used for extracting an IP downlink message from the application layer data packet and sending the IP downlink message to associated sensing equipment;

the uplink communication module is used for extracting an IP uplink message from the IP uplink data packet and sending the IP uplink message to the concentrator through a preset serial port if the type of the IP data packet is the IP uplink data packet; and the concentrator is used for carrying out secondary encapsulation on the IP uplink message and then sending the IP uplink message to a preset service master station.

9. An electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer program, when executed by the processor, causes the processor to perform the steps of the power line carrier communication method according to any one of claims 1 to 7.

10. A computer-readable storage medium on which a computer program is stored, the computer program, when being executed by a processor, implementing the power line carrier communication method according to any one of claims 1 to 7.

Technical Field

The present invention relates to the field of data transmission technologies, and in particular, to a power line carrier communication method, apparatus, device, and medium.

Background

In recent years, domestic Power grid enterprises have made technical specifications of High-speed Power line Communication (HPLC) and started to purchase and apply data transmission terminals of the HPLC in a large scale, so as to improve transmission bandwidth of local Communication in an electricity information acquisition system and meet increasing acquisition requirements for user-side electric energy information.

The communication rate of the HPLC is greatly improved compared with the prior generation of narrowband power line carrier communication, a wider data transmission channel is provided for the application of the HPLC in service scenes except the electricity information acquisition, however, the HPLC technical standard is originally designed to serve the electricity information acquisition service, and the application layer protocol specification adopts a field bus type query response interaction form, is deeply coupled with the electricity information acquisition service, is not beneficial to supporting the service application based on IP communication, and limits the application prospect of the HPLC communication in services except the electricity information.

With the advance of digital construction of the internet of things and a power grid, new services based on IP layer communication are continuously emerging, the existing HPLC communication mode cannot meet the service requirements of the IP layer communication, and the communication efficiency is low.

Disclosure of Invention

The invention provides a power line carrier communication method, a device, equipment and a medium, which solve the technical problems that the existing HPLC communication mode cannot meet the service requirement of IP layer communication and the communication efficiency is low.

The invention provides a power line carrier communication method, which is applied to a central node, wherein the central node is respectively in communication connection with a preset concentrator and a plurality of preset associated nodes, and the method comprises the following steps:

when an IP data packet is received, determining the type of the IP data packet according to the receiving mode of the IP data packet;

if the type of the IP data packet is an IP downlink data packet, constructing an application layer data packet, and sending the application layer data packet to a target associated node through a preset power line; the target associated node is used for extracting an IP downlink message from the application layer data packet and sending the IP downlink message to associated sensing equipment;

if the type of the IP data packet is an IP uplink data packet, extracting an IP uplink message from the IP uplink data packet, and sending the IP uplink message to the concentrator through a preset serial port; and the concentrator is used for carrying out secondary encapsulation on the IP uplink message and then sending the IP uplink message to a preset service master station.

Optionally, the step of determining the type of the IP data packet according to the receiving mode of the IP data packet when the IP data packet is received includes:

when an IP data packet is received, detecting a receiving mode of the IP data packet;

when the receiving mode of the IP data packet is serial port receiving, determining the type of the IP data packet as the IP downlink data packet;

and if the receiving mode of the IP data packet is power line receiving, determining that the type of the IP data packet is the IP uplink data packet.

Optionally, the concentrator is further configured to:

when an initial IP message sent by the service master station is received, if the type of the initial IP message is a secondary packaging message, deleting an IP header in the initial IP message, and generating an IP downlink message; the IP header is an IP address of the concentrator;

acquiring a first bit from a node IP address contained in the IP downlink message;

judging whether a connection relation exists between the network identification code corresponding to the first bit;

if the connection relation exists, constructing a downlink IP data packet by adopting the IP downlink message and the node IP address according to the network identification code, and sending the downlink IP data packet to the central node through the serial port;

and if the connection relation does not exist, discarding the IP downlink message.

Optionally, if the type of the IP packet is an IP downlink packet, the step of constructing an application layer packet and sending the application layer packet to the target associated node through a preset power line includes:

if the type of the IP data packet is an IP downlink data packet, acquiring the IP downlink message and a node IP address from the IP downlink data packet;

extracting a second bit within the node IP address;

judging whether a target associated node corresponding to the equipment identification code is in a broadband power line carrier communication network or not according to the equipment identification code corresponding to the second bit; the broadband power line carrier communication network consists of the central node and a plurality of the associated nodes;

and if so, constructing an application layer data packet by adopting the IP downlink message according to a preset power line carrier communication rule, and sending the application layer data packet to the target associated node through a preset power line.

Optionally, the association node is configured to:

when an IP uplink message generated by the sensing equipment is received, constructing an application layer message by adopting the IP uplink message according to a preset power line carrier communication rule;

constructing a link layer message according to the corresponding relation between the IP address contained in the IP uplink message and the equipment identification code;

and constructing an IP uplink data packet by adopting the application layer message and the link layer message, and sending the IP uplink data packet to the central node.

Optionally, the sensing device is communicatively connected to the concentrator, and the method further includes:

when any one of the associated nodes is added into a new broadband power line carrier communication network, a preset serial port AT instruction is sent to the sensing equipment through the associated node; the serial port AT instruction is used for sending the new IP address of the associated node to the perception equipment;

reporting the new IP address to a concentrator through the sensing equipment; and the concentrator is also used for reporting the new IP address to the service master station to complete the address change of the associated node.

Optionally, the sensing device is communicatively connected to the concentrator, and the method further includes:

when a new associated node is added into the broadband power line carrier communication network, sending a preset serial port AT instruction to the sensing equipment through the new associated node; the serial port AT instruction is used for sending the registered IP address corresponding to the new associated node to the perception equipment;

reporting the registered IP address to a concentrator through the sensing equipment; and the concentrator is also used for reporting the registered IP address to the service master station to complete the address registration of the new associated node.

The second aspect of the present invention further provides a broadband power line carrier communication device, which is applied to a central node, where the central node is in communication connection with a preset concentrator and a plurality of preset associated nodes, respectively, and the device includes:

the data packet type determining module is used for determining the type of the IP data packet according to the receiving mode of the IP data packet when the IP data packet is received;

the downlink communication module is used for constructing an application layer data packet and sending the application layer data packet to a target associated node through a preset power line if the type of the IP data packet is an IP downlink data packet; the target associated node is used for extracting an IP downlink message from the application layer data packet and sending the IP downlink message to associated sensing equipment;

the uplink communication module is used for extracting an IP uplink message from the IP uplink data packet and sending the IP uplink message to the concentrator through a preset serial port if the type of the IP data packet is the IP uplink data packet; and the concentrator is used for carrying out secondary encapsulation on the IP uplink message and then sending the IP uplink message to a preset service master station.

The third aspect of the present invention also provides an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and the computer program, when executed by the processor, causes the processor to execute the steps of the power line carrier communication method according to any one of the first aspect of the present invention.

The fourth aspect of the present invention also provides a computer-readable storage medium on which a computer program is stored, the computer program, when executed by a processor, implementing the power line carrier communication method according to any one of the first aspects of the present invention.

According to the technical scheme, the invention has the following advantages:

when the central node receives the IP data packet, determining the type corresponding to the IP data packet according to the receiving mode of the IP data packet; if the type of the IP data packet is judged to be the IP downlink data packet, the IP downlink data packet is further adopted to construct an application layer data packet, and the application layer data packet is sent to a target associated node through a power line, so that the target associated node can extract an IP downlink message from the application layer data packet and send the IP downlink message to associated sensing equipment of the target associated node; if the type of the IP data packet is determined to be the IP uplink data packet, a corresponding IP uplink message can be extracted from the IP uplink data packet and sent to the associated concentrator in a serial port communication mode, so that the concentrator can carry out secondary packaging on the IP uplink message and send the IP uplink message to a service master station for subsequent processing, the technical problems that the service requirement of IP layer communication cannot be met in the existing HPLC communication mode and the communication efficiency is low are solved, the HPLC communication and the IP layer communication are combined more effectively, and the communication transmission efficiency is improved.

Drawings

In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without inventive exercise.

Fig. 1 is a flowchart illustrating steps of a power line carrier communication method according to an embodiment of the present invention;

fig. 2 is a flowchart illustrating steps of a power line carrier communication method according to a second embodiment of the present invention;

fig. 3 is a schematic diagram of an IP address structure according to a second embodiment of the present invention;

fig. 4 is a schematic structural diagram of a broadband power line carrier communication network according to a second embodiment of the present invention;

fig. 5 is a block diagram of a broadband power line carrier communication system according to a second embodiment of the present invention;

fig. 6 is a block diagram of a wideband power line carrier communication device according to a third embodiment of the present invention.

Detailed Description

The embodiment of the invention provides a power line carrier communication method, a device, equipment and a medium, which are used for solving the technical problems that the existing HPLC communication mode cannot meet the service requirement of IP layer communication and the communication efficiency is low.

HPLC is low-voltage power line high-speed carrier communication, also called broadband power line carrier communication, and is a broadband power line carrier technology for data transmission on low-voltage power lines. The broadband power line carrier communication network is a communication network which takes a power line as a communication medium and realizes the aggregation, transmission and interaction of the power utilization information of low-voltage power users.

In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the embodiments described below are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

Referring to fig. 1, fig. 1 is a flowchart illustrating a power line carrier communication method according to an embodiment of the present invention.

The invention provides a power line carrier communication method, which is applied to a central node, wherein the central node is respectively in communication connection with a preset concentrator and a plurality of preset associated nodes, and the method comprises the following steps:

step 101, when receiving an IP data packet, determining the type of the IP data packet according to the receiving mode of the IP data packet;

the IP data packet comprises an IP message and a corresponding target IP address, wherein the IP message carries a corresponding source IP address, an IP header, an original target IP address, a corresponding data frame and the like.

In the embodiment of the invention, when the central node receives the IP data packet, the type of the IP data packet is determined according to the receiving mode of the IP data packet, such as a serial port of the input IP data packet, so as to provide a data basis of a subsequent sending and processing mode.

Step 102, if the type of the IP data packet is an IP downlink data packet, constructing an application layer data packet, and sending the application layer data packet to a target associated node through a preset power line; the target associated node is used for extracting the IP downlink message from the application layer data packet and sending the IP downlink message to the associated sensing equipment;

in a specific implementation, the concentrator may associate a plurality of central nodes through serial port communication, and each central node may establish communication connection with the plurality of associated nodes through a power line to construct a broadband power line carrier communication network.

If the IP data packet is received through a serial port arranged in the central node, the IP data packet is sent to the central node from the concentrator, the type of the IP data packet can be judged to be an IP downlink data packet, and at the moment, the IP downlink data packet can be adopted to construct a corresponding application layer data packet and is sent to a target associated node through a preset power line. And after the target associated node receives the application layer data packet, the target associated node can extract the IP downlink message from the application layer data packet and forwards the IP downlink message to the sensing equipment associated with the target associated node so as to execute the content required by the IP downlink message.

The sensing device may be a metering device such as an electric meter, which is not limited in this embodiment of the present invention.

Step 103, if the type of the IP data packet is an IP uplink data packet, extracting an IP uplink message from the IP uplink data packet, and sending the IP uplink message to the concentrator through a preset serial port; and the concentrator is used for carrying out secondary encapsulation on the IP uplink message and then sending the IP uplink message to a preset service master station.

In the process of uplink communication, the associated node can receive a message sent by the associated sensing equipment, transmit the message to the central node through the power line, extract a corresponding IP message through the central node, and send the IP message to the concentrator. The concentrator is connected with the service master station, and transmits the received IP message to the service master station after secondary packaging so as to realize the demand processing of the sensing equipment.

If the IP data packet is received through the power line, the IP data packet is sent to the central node from a certain associated node, the type of the IP data packet can be judged to be an IP uplink data packet at the moment, and a corresponding IP uplink message is extracted from the IP uplink data packet. And the IP uplink message is sent to the connected concentrator in a serial port communication mode, so that the concentrator can carry out secondary packaging on the IP uplink message and send the IP uplink message to a service master station associated with the concentrator.

In the embodiment of the invention, when the central node receives the IP data packet, the type corresponding to the IP data packet is determined according to the receiving mode of the IP data packet; if the type of the IP data packet is judged to be the IP downlink data packet, the IP downlink data packet is further adopted to construct an application layer data packet, and the application layer data packet is sent to a target associated node through a power line, so that the target associated node can extract an IP downlink message from the application layer data packet and send the IP downlink message to associated sensing equipment of the target associated node; if the type of the IP data packet is determined to be the IP uplink data packet, a corresponding IP uplink message can be extracted from the IP uplink data packet and sent to the associated concentrator in a serial port communication mode, so that the concentrator can carry out secondary packaging on the IP uplink message and send the IP uplink message to a service master station for subsequent processing, the technical problems that the service requirement of IP layer communication cannot be met in the existing HPLC communication mode and the communication efficiency is low are solved, the HPLC communication and the IP layer communication are combined more effectively, and the communication transmission efficiency is improved.

Referring to fig. 2, fig. 2 is a flowchart illustrating a power line carrier communication method according to a second embodiment of the present invention.

The invention provides a power line carrier communication method, which is applied to a central node, wherein the central node is respectively in communication connection with a preset concentrator and a plurality of preset associated nodes, and the method comprises the following steps:

step 201, when receiving an IP data packet, detecting a receiving mode of the IP data packet;

the IP data packet comprises an IP message and a corresponding target IP address, wherein the IP message carries a corresponding source IP address, an IP header, an original target IP address, a corresponding data frame and the like.

The Central node refers to a Central Coordinator (CCO), and is mainly used to create and maintain a power line carrier communication network.

The associated node refers to a Proxy Coordinator (PCO), such as a smart meter/I type collector communication unit, a broadband carrier II type collector, and the like; or a station (station, STA) such as a smart meter/I-type collector communication unit, a broadband carrier II-type collector, etc.

In the embodiment of the invention, when the central node receives the IP data packet, the receiving mode of the IP data packet is detected, and the receiving mode through which the IP data packet is received is determined so as to obtain the receiving source of the IP data packet.

Step 202, when the receiving mode of the IP data packet is serial port receiving, determining the type of the IP data packet as an IP downlink data packet;

when the IP data packet is received through the serial port, the type of the IP data packet can be judged to be an IP downlink data packet, and the destination address of the IP data packet is indicated to be sensing equipment associated with the associated node.

Step 203, when the receiving mode of the IP data packet is power line receiving, determining the type of the IP data packet as an IP uplink data packet;

when the IP data packet is received through the power line, it may be determined that the type of the IP data packet is an IP uplink data packet, indicating that the destination address of the IP data packet is a service master station.

Step 204, if the type of the IP data packet is an IP downlink data packet, constructing an application layer data packet, and sending the application layer data packet to a target associated node through a preset power line; the target associated node is used for extracting the IP downlink message from the application layer data packet and sending the IP downlink message to the associated sensing equipment;

in the embodiment of the present invention, each central node and a plurality of associated nodes form a broadband power line carrier communication network, each broadband power line carrier communication network may be identified by using different network identification codes (NIDs), and each central node or associated node is provided with a physical long address with a length of 48 bits.

As shown in fig. 3, the short address with the lower 12 bits length of the central node is fixed to 0x001, and the upper 24 bits are set as the lower 20 bits of the network identification code NID; and for each associated node, when the associated node is added into the broadband power line carrier communication network, the central node allocates a unique device identification code for the associated node, wherein each device identification code is a physical long address with the length of 48 bits, the lower 12 bits are the device identification codes allocated to the associated node by the central node, and the upper 24 bits are set as the lower 20 bits of the NID (network identification code).

The device identification code refers to a Terminal Equipment Identifier (TEI) for uniquely identifying each associated node.

Optionally, step 204 may include the following sub-steps:

if the type of the IP data packet is an IP downlink data packet, acquiring an IP downlink message and a node IP address from the IP downlink data packet;

extracting a second bit within the node IP address;

judging whether a target associated node corresponding to the equipment identification code is in the broadband power line carrier communication network or not according to the equipment identification code corresponding to the second bit; the broadband power line carrier communication network consists of a central node and a plurality of associated nodes;

and if so, constructing an application layer data packet by adopting the IP downlink message according to a preset power line carrier communication rule, and sending the application layer data packet to the target associated node through a preset power line.

Referring to fig. 4, fig. 4 is a diagram of a broadband power line carrier communication network architecture in the second embodiment.

In the embodiment of the invention, the broadband power line carrier communication network is composed of a central node CCO and a plurality of associated nodes PCO/STA. If the type of the IP data packet is judged to be an IP downlink data packet, the data packet is indicated to be subjected to downlink communication at the moment, an IP downlink message and a node IP address can be obtained from the IP downlink data packet, then a second bit corresponding to the lower 12 bits is extracted from the node IP address, whether a target associated node corresponding to the equipment identification code is located in a broadband power line carrier communication network or not is judged according to the equipment identification code corresponding to the second bit, and if the target associated node is located in the broadband power line carrier communication network, an application layer data packet can be constructed by the IP downlink message according to a preset power line carrier communication rule and sent to the target associated node through a power line.

It is worth mentioning that the central node stores the device identification codes corresponding to all the associated nodes, and if the target associated node corresponding to the device identification code is not in the broadband power line carrier communication network, the IP data packet is discarded.

The preset power line carrier communication rule is a low-voltage power line high-speed carrier communication interconnection and intercommunication technical specification formulated by a power grid.

Further, the concentrator is also configured to:

when an initial IP message sent by a service master station is received, if the type of the initial IP message is a secondary packaging message, deleting an IP header in the initial IP message, and generating an IP downlink message; the IP header is the IP address of the concentrator;

acquiring a first bit from a node IP address contained in an IP downlink message;

judging whether a connection relation exists between the network identification code corresponding to the first bit;

if the connection relation exists, constructing a downlink IP data packet by adopting an IP downlink message and a node IP address according to the network identification code, and sending the downlink IP data packet to the central node through the serial port;

if the connection relation does not exist, the IP downlink message is discarded.

In a specific implementation, when the service master station needs to perform downlink communication, an initial IP packet may be sent to the concentrator through the ethernet or the public mobile communication network, and the concentrator detects whether the type of the initial IP packet belongs to a secondary encapsulation packet, and deletes the IP header in the initial IP packet if the type of the initial IP packet belongs to the secondary encapsulation packet, so as to extract and obtain an IP downlink packet. The IP header is the IP address of the concentrator;

and analyzing the IP downlink message through the concentrator to obtain a node IP address therein, obtaining a first bit in the node IP address, judging whether the concentrator has a connection relation with a network identification code corresponding to the first bit, if so, indicating that the IP downlink message is sent to a broadband power line carrier communication network connected with the concentrator, and at the moment, constructing a downlink IP data packet by adopting the IP downlink message and the node IP address according to a network specified by the network identification code, and sending the downlink IP data packet to the central node through a serial port.

Wherein the first bit is a bit included from the lower 13 bits to the lower 33 bits in the node IP address.

In one example of the invention, an association node is configured to:

when an IP uplink message generated by the sensing equipment is received, constructing an application layer message by adopting the IP uplink message according to a preset power line carrier communication rule;

constructing a link layer message according to the corresponding relation between the IP address and the equipment identification code contained in the IP uplink message;

and constructing an IP uplink data packet by adopting the application layer message and the link layer message, and sending the IP uplink data packet to the central node.

In the embodiment of the invention, when the sensing equipment needs to communicate with the service master station, the sensing equipment takes the IP address of the service master station as a target address and takes the IP address of the sensing equipment as a source address to construct an IP uplink message, and the IP uplink message is sent to the connected associated node through the serial port.

When the associated node receives the IP uplink message sent by the sensing equipment, the application layer message and the link layer message can be constructed in sequence according to the power line carrier communication rule, the IP uplink data packet is constructed and obtained based on the messages and sent to the central node, and the central node can restore in sequence to obtain the link layer message and the application layer message, extract the obtained IP uplink message and send the message to the concentrator.

Step 205, if the type of the IP data packet is an IP uplink data packet, extracting an IP uplink message from the IP uplink data packet, and sending the IP uplink message to the concentrator through a preset serial port; and the concentrator is used for carrying out secondary encapsulation on the IP uplink message and then sending the IP uplink message to a preset service master station.

In the process of uplink communication, the associated node can receive a message sent by the associated sensing equipment, transmit the message to the central node through the power line, extract a corresponding IP message through the central node, and send the IP message to the concentrator. The concentrator is connected with the service master station, and transmits the received IP message to the service master station after secondary packaging so as to realize the demand processing of the sensing equipment.

If the IP data packet is received through the power line, the IP data packet is sent to the central node from a certain associated node, the type of the IP data packet can be judged to be an IP uplink data packet at the moment, and a corresponding IP uplink message is extracted from the IP uplink data packet. And the IP uplink message is sent to the connected concentrator in a serial port communication mode, so that the concentrator can carry out secondary packaging on the IP uplink message and send the IP uplink message to a service master station associated with the concentrator.

The service master station is used for processing and displaying the IP uplink message in service logic to form complete Internet of things information.

In another example of the present invention, the perceiving device is communicatively connected to the concentrator, the method further comprising the steps of:

when any one associated node is added into a new broadband power line carrier communication network, a preset serial port AT instruction is sent to the sensing equipment through the associated node; the serial port AT instruction is used for sending the new IP address of the associated node to the sensing equipment;

reporting the new IP address to the concentrator through the sensing equipment; the concentrator is also used for reporting the new IP address to the service master station to complete the address change of the associated node.

In this embodiment, when any associated node is added to a new broadband power line carrier communication network, the IP address of the associated node changes, and AT this time, in order to ensure that communication based on the IP address can be implemented between the service master station and each sensing device, a preset serial port AT instruction may be sent to the sensing device through the associated node, so that the sensing device obtains the new IP address of the associated node, and finally, the sensing device reports the new IP address to the concentrator, so that the concentrator further reports the new IP address to the service master station, and the address change of the associated node is completed.

The serial port AT command specifically includes the following contents "AT + HPLC _ IP ═ IP _ address", where IP _ address is a new IP address, and the AT command is a command applied to connection and communication between the terminal device and the PC application. AT is Attention. Each AT command line can only contain one AT instruction; HPLC _ IP denotes the IP address of the associated node.

Further, the sensing device is communicatively connected to the concentrator, and the method may further include the steps of:

when a new associated node is added into a broadband power line carrier communication network, sending a preset serial port AT instruction to a sensing device through the new associated node; the serial port AT instruction is used for sending the registered IP address corresponding to the new associated node to the sensing equipment;

reporting the registered IP address to a concentrator through sensing equipment; the concentrator is also used for reporting the registered IP address to the service master station to complete the address registration of the new associated node.

Specifically, when a new associated node is added to the current broadband power line carrier network, the new associated node may send a preset serial port AT instruction to the sensing device so that the sensing device obtains an IP address of the new associated node, and finally, the sensing device reports the new IP address to the concentrator, so that the concentrator further reports the new IP address to the service master station, and address registration of the new associated node is completed.

Referring to fig. 5, a block diagram of a broadband power line carrier communication system according to a second embodiment of the present invention is shown.

The HPLC CCO is connected with intelligent terminals with communication gateway functions, such as a concentrator, an energy controller and an intelligent fusion terminal of a power distribution system in a power consumption information acquisition system; and the HPLC PCO/STA is connected with a perception terminal, such as an intelligent electric meter, a sensor and the like in the electricity utilization information acquisition system. The intelligent terminal gathers data collected by various sensing terminals through an HPLC communication network, the gathered data is sent to a service master station through a public mobile communication network or a special Ethernet network, and the service master station processes and displays the collected data in service logic to form a complete Internet of things information system. Solid lines indicate associations and dashed lines indicate logical correspondences.

In the embodiment of the invention, when the central node receives the IP data packet, the type corresponding to the IP data packet is determined according to the receiving mode of the IP data packet; if the type of the IP data packet is judged to be the IP downlink data packet, the IP downlink data packet is further adopted to construct an application layer data packet, and the application layer data packet is sent to a target associated node through a power line, so that the target associated node can extract an IP downlink message from the application layer data packet and send the IP downlink message to associated sensing equipment of the target associated node; if the type of the IP data packet is determined to be the IP uplink data packet, a corresponding IP uplink message can be extracted from the IP uplink data packet and sent to the associated concentrator in a serial port communication mode, so that the concentrator can carry out secondary packaging on the IP uplink message and send the IP uplink message to a service master station for subsequent processing, the technical problems that the service requirement of IP layer communication cannot be met in the existing HPLC communication mode and the communication efficiency is low are solved, the HPLC communication and the IP layer communication are combined more effectively, and the communication transmission efficiency is improved.

Referring to fig. 6, fig. 6 is a block diagram illustrating a wideband power line carrier communication apparatus.

The invention provides a broadband power line carrier communication device, which is applied to a central node, wherein the central node is respectively in communication connection with a preset concentrator and a plurality of preset associated nodes, and the device comprises:

a data packet type determining module 601, configured to determine, when an IP data packet is received, a type of the IP data packet according to a receiving manner of the IP data packet;

the downlink communication module 602 is configured to construct an application layer packet if the type of the IP packet is an IP downlink packet, and send the application layer packet to a target associated node through a preset power line; the target associated node is used for extracting the IP downlink message from the application layer data packet and sending the IP downlink message to the associated sensing equipment;

an uplink communication module 603, configured to extract an IP uplink packet from the IP uplink packet and send the IP uplink packet to the concentrator through a preset serial port if the type of the IP packet is an IP uplink packet; and the concentrator is used for carrying out secondary encapsulation on the IP uplink message and then sending the IP uplink message to a preset service master station.

Optionally, the packet type determining module 601 is specifically configured to:

when an IP data packet is received, detecting the receiving mode of the IP data packet;

when the receiving mode of the IP data packet is serial port receiving, determining the type of the IP data packet as an IP downlink data packet;

and if the receiving mode of the IP data packet is power line receiving, determining that the type of the IP data packet is an IP uplink data packet.

Optionally, the concentrator is further configured to:

when an initial IP message sent by a service master station is received, if the type of the initial IP message is a secondary packaging message, deleting an IP header in the initial IP message, and generating an IP downlink message; the IP header is the IP address of the concentrator;

acquiring a first bit from a node IP address contained in an IP downlink message;

judging whether a connection relation exists between the network identification code corresponding to the first bit;

if the connection relation exists, constructing a downlink IP data packet by adopting an IP downlink message and a node IP address according to the network identification code, and sending the downlink IP data packet to the central node through the serial port;

if the connection relation does not exist, the IP downlink message is discarded.

Optionally, the downlink communication module 602 is specifically configured to:

if the type of the IP data packet is an IP downlink data packet, acquiring an IP downlink message and a node IP address from the IP downlink data packet;

extracting a second bit within the node IP address;

judging whether a target associated node corresponding to the equipment identification code is in the broadband power line carrier communication network or not according to the equipment identification code corresponding to the second bit; the broadband power line carrier communication network consists of a central node and a plurality of associated nodes;

and if so, constructing an application layer data packet by adopting the IP downlink message according to a preset power line carrier communication rule, and sending the application layer data packet to the target associated node through a preset power line.

Optionally, the association node is configured to:

when an IP uplink message generated by the sensing equipment is received, constructing an application layer message by adopting the IP uplink message according to a preset power line carrier communication rule;

constructing a link layer message according to the corresponding relation between the IP address and the equipment identification code contained in the IP uplink message;

and constructing an IP uplink data packet by adopting the application layer message and the link layer message, and sending the IP uplink data packet to the central node.

Optionally, the sensing device is in communication connection with the concentrator, and the apparatus further includes:

the first instruction sending module is used for sending a preset serial port AT instruction to the sensing equipment through the associated node when any associated node is added into a new broadband power line carrier communication network; the serial port AT instruction is used for sending the new IP address of the associated node to the sensing equipment;

the node address changing module is used for reporting a new IP address to the concentrator through the sensing equipment; the concentrator is also used for reporting the new IP address to the service master station to complete the address change of the associated node.

Optionally, the sensing device is in communication connection with the concentrator, and the apparatus further includes:

the second instruction sending module is used for sending a preset serial port AT instruction to the sensing equipment through the new associated node when the new associated node is added into the broadband power line carrier communication network; the serial port AT instruction is used for sending the registered IP address corresponding to the new associated node to the sensing equipment;

the node registration module is used for reporting the registered IP address to the concentrator through the sensing equipment; the concentrator is also used for reporting the registered IP address to the service master station to complete the address registration of the new associated node.

The embodiment of the present invention further provides an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the power line carrier communication method according to any embodiment of the present invention.

Embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the power line carrier communication method according to any embodiment of the present invention.

It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and modules may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.

In the embodiments provided in the present invention, 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 units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. 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 units described as separate parts may or may not be physically separate, and parts displayed as units 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 units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.

In addition, functional units in the embodiments of the present invention 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, and can also be realized in a form of a software functional unit.

The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. 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.

The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

16页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:运维调试方法、系统、非易失性存储介质及处理器

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!