CN106993066B - Method, device and system for transmitting data - Google Patents

Method, device and system for transmitting data Download PDF

Info

Publication number
CN106993066B
CN106993066B CN201710113838.5A CN201710113838A CN106993066B CN 106993066 B CN106993066 B CN 106993066B CN 201710113838 A CN201710113838 A CN 201710113838A CN 106993066 B CN106993066 B CN 106993066B
Authority
CN
China
Prior art keywords
plc
slave
uplink data
master
management server
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
CN201710113838.5A
Other languages
Chinese (zh)
Other versions
CN106993066A (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 Digital Power 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 CN201710113838.5A priority Critical patent/CN106993066B/en
Publication of CN106993066A publication Critical patent/CN106993066A/en
Application granted granted Critical
Publication of CN106993066B publication Critical patent/CN106993066B/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
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • H04L61/5014Internet protocol [IP] addresses using dynamic host configuration protocol [DHCP] or bootstrap protocol [BOOTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/22Arrangements for detecting or preventing errors in the information received using redundant apparatus to increase reliability
    • 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
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/565Conversion or adaptation of application format or content
    • H04L67/5651Reducing the amount or size of exchanged application data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B3/00Line transmission systems
    • H04B3/54Systems for transmission via power distribution lines
    • H04B3/542Systems for transmission via power distribution lines the information being in digital form

Landscapes

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

Abstract

The embodiment of the invention provides a method, a device and a system for transmitting data, relates to the technical field of communication, and can ensure better real-time property of data transmission to a certain extent. The PLC system comprises a management server, a main device, a main PLC device, a slave PLC device and a slave device, wherein the main device is in wireless connection with the management server, the main PLC device provides a PLC interface for the main device, the slave PLC device provides a PLC interface for the slave device, and the main device and the slave device are located in the same local area network. The method comprises the steps that a slave device in the PLC system sends first uplink data to a slave PLC device; the slave PLC equipment forwards the first uplink data to the master PLC equipment; the master PLC equipment adds identification information of the slave PLC equipment in the first uplink data so as to package the first uplink data into second uplink data and send the second uplink data to the master equipment; and the main equipment de-encapsulates the second uplink data to obtain first uplink data and then sends the first uplink data to the management server.

Description

Method, device and system for transmitting data
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a method, a device and a system for transmitting data.
Background
With the continuous development of internet communication technology, the internet of things communication technology is on the go, and the application of the internet of things is more and more extensive. Communication connection can be established between a plurality of objects (for example, a plurality of charging piles) in the internet of things through networking technology, so that data can be transmitted between the objects.
For example, taking a charging system in a Power Line Communication (PLC) system as an example, generally, after networking between a plurality of charging piles in the charging system is successful, the plurality of charging piles may send data to a server of an operation platform. Specifically, the data acquisition device in the charging system queries the states of the plurality of charging piles in a polling manner, that is, the data acquisition device can query the states of the plurality of charging piles connected with the data acquisition device according to a certain rule, when the data acquisition device queries that a certain charging pile in the plurality of charging piles needs to send data to a server of an operation platform, the charging pile can send data to the data acquisition device through a PLC module on the charging pile, and after receiving the data sent by the charging pile, the data acquisition device can send the data to the server through a network module (hereinafter referred to as a 4G network module) on the data acquisition device, wherein the network module adopts a fourth-generation mobile communication technology.
However, in the above method, since the data acquisition device in the charging system queries the states of the plurality of charging piles in a polling manner, when a certain charging pile in the plurality of charging piles needs to send uplink data to the server of the operation platform, the charging pile may wait for a period of time, that is, when the data acquisition device queries the charging pile, the charging pile may send data to the server, which may result in poor real-time performance of data transmission.
Disclosure of Invention
The application provides a method, a device and a system for transmitting data, which can ensure better real-time property of data transmission to a certain extent.
In order to achieve the purpose, the technical scheme is as follows:
in a first aspect, a PLC system is provided, which may include a management server, a master device, a master PLC device, a slave PLC device, and a slave device, wherein the master device is wirelessly connected to the management server, the master PLC device provides a PLC interface for the master device, the slave PLC device provides a PLC interface for the slave device, and the master device and the slave device are in the same lan. The slave equipment is used for sending first uplink data to the slave PLC equipment, and the first uplink data are data sent to the management server by the slave equipment; the slave PLC equipment is used for receiving first uplink data sent by the slave equipment and forwarding the first uplink data to the master PLC equipment; the master PLC device is used for receiving first uplink data sent by the slave PLC device, adding identification information of the slave PLC device in the first uplink data to encapsulate the first uplink data into second uplink data, and sending the second uplink data to the master device; the main device is used for receiving second uplink data sent by the main PLC device, decapsulating the second uplink data to obtain first uplink data, and sending the first uplink data to the management server; the management server is used for receiving first uplink data sent by the main equipment.
According to the PLC system, when the slave device has uplink data to be sent to the management server, the slave device can directly send the uplink data to the management server through the slave PLC device, the master PLC device and the master device, the slave device does not need to wait for the master device to inquire the slave device and then send the uplink data, namely the slave device can actively send the uplink data to the management server, and therefore good real-time performance of data transmission can be guaranteed to a certain extent.
In the application, since the slave device can directly transmit the first uplink data to the management server via the slave PLC device, the master PLC device, and the master device, the management server may receive the first uplink data transmitted by the slave device without directly interacting with the slave device; for the slave device, the slave device can send the uplink data to the management server through the network module on the master device, so that the network module does not need to be arranged on the slave device, and the cost for sending the uplink data by the slave device can be saved.
In a first optional implementation manner of the first aspect, the second uplink data includes a Medium Access Control (MAC) address of the device and identification information of the slave PLC device, and the master device may be further configured to store a mapping relationship between an MCA address of the slave device and the identification information of the slave PLC device after decapsulating the second uplink data and obtaining the first uplink data.
In this application, the master device may store a mapping relationship between the MAC address of the slave device and the identification information of the slave PLC device in the master device. In this way, in the process of transmitting the downlink data (i.e., the process of sending data to the slave device by the management server), the master device may encapsulate the downlink data according to the MAC address of the slave device in the downlink data sent by the management server and the mapping relationship, specifically, the master device determines, from the mapping relationship, the identification information of the slave PLC device (i.e., the slave PLC device providing the PLC interface for the slave device) corresponding to the MAC address of the slave device, and then the master device adds the identification information of the slave PLC device to the downlink data, thereby completing encapsulation of the downlink data.
In a second optional implementation manner of the first aspect, the primary device is further configured to convert an Internet Protocol (IP) address of the primary device in a local area network into an IP address of the primary device in a wide area network; the main device is specifically configured to send the first uplink data to the management server by using an IP address of the main device in the wide area network.
In the application, when data is transmitted between the master device and the slave device in the local area network, the master device and the slave device both adopt respective IP addresses in the local area network to transmit the data; when the main device and the management server in the wide area network transmit data, the main device and the management server both adopt respective IP addresses in the wide area network to transmit data. The second uplink data received by the main device is data sent from the PLC device in the local area network, and the main device sends the first uplink data obtained by decapsulating the second uplink data to the management server in the wide area network, so that the main device can convert the IP address of the main device in the local area network into the IP address of the main device in the wide area network, and the main device sends the first uplink data to the management server by using the IP address of the main device in the wide area network.
In a third optional implementation manner of the first aspect, the master device may further be configured to allocate an IP address of the slave device in the local area network to the slave device by using a Dynamic Host Configuration Protocol (DHCP).
In this application, the master device may use DHCP to assign the slave device with the IP address of the slave device in the local area network, so that the master device and the slave device may use the IP addresses in the local area network to transmit data.
In a second aspect, the present application provides a PLC system, which may include a management server, a master device, a master PLC device, a slave PLC device, and a slave PLC device, wherein the master device is wirelessly connected to the management server, the master PLC device provides a PLC interface for the master device, the slave PLC device provides a PLC interface for the slave device, and the master device and the slave device are in the same lan. The management server is used for sending first downlink data to the master device, the first downlink data is data sent to the slave device by the management server, and the first downlink data comprises an MAC address of the slave device; the master device is used for receiving the first downlink data sent by the management server, determining the identification information of the slave PLC device according to the MAC address of the slave device in the first downlink data and a first mapping relation stored in the master device, adding the identification information of the slave PLC device in the first downlink data to package the first downlink data into second downlink data, and sending the second downlink data to the master PLC device; the master PLC device is used for receiving second downlink data sent by the master device, decapsulating the second downlink data to obtain first downlink data, and sending the first downlink data to the slave PLC device; the slave PLC device is used for receiving the first downlink data transmitted by the master PLC device and forwarding the first downlink data to the slave device; the slave device is used for receiving first downlink data transmitted from the PLC device, and the first mapping relation is a mapping relation between the MAC address of the slave device and the identification information of the slave PLC device.
According to the PLC system, the management server can send the first downlink data to the slave device through the master device, the master PLC device and the slave PLC device, so that for the slave device, the slave device can receive the first downlink data sent by the management server without directly interacting with the management server; for the management server, the management server can send the downlink data to the slave device through the network module on the master device, so that the network module does not need to be arranged on the slave device, and the cost for receiving the downlink data by the slave device can be saved.
In a first optional implementation manner of the second aspect, the primary device is further configured to convert an IP address of the primary device in a wide area network into an IP address of the primary device in a local area network; the master device is specifically configured to send the second downlink data to the master PLC device using the IP address of the master device in the local area network.
In the application, the first downlink data received by the main device is data sent by the management server in the wide area network, and the second downlink data obtained by encapsulating the first downlink data is sent to the main PLC device in the local area network by the main device, so that the IP address of the main device in the wide area network can be converted into the IP address of the main device in the local area network by the main device, and the main device sends the second downlink data to the main PLC device by using the IP address of the main device in the local area network.
In a second optional implementation manner of the second aspect, the master device may further be configured to allocate, to the slave device, an IP address of the slave device in the local area network by using DHCP.
For the description of the related content and the technical effect of the second optional implementation manner of the second aspect, reference may be made to the above description of the related content and the technical effect of the third optional implementation manner of the first aspect, and details are not described here again.
In a third aspect, the present application provides a method of transmitting data, which may include: the master PLC equipment receives first uplink data sent by the slave PLC equipment, the first uplink data are forwarded after the slave PLC equipment receives the first uplink data sent by the slave equipment, and the master PLC equipment adds identification information of the slave PLC equipment in the first uplink data so as to package the first uplink data into second uplink data; and the main PLC equipment sends the second uplink data to the main equipment, so that the main equipment decapsulates the second uplink data into first uplink data and sends the first uplink data to the management server. The first uplink data are data sent to the management server by the slave device, the master PLC device provides a PLC interface for the master device, the slave PLC device provides a PLC interface for the slave device, and the master device and the slave device are located in the same local area network.
According to the method for transmitting data, when the slave device has uplink data (for example, the first uplink data) to transmit to the management server, the slave device can directly transmit the first uplink data to the master PLC device through the slave PLC device, and the master PLC device encapsulates the first uplink data into the second uplink data and transmits the second uplink data to the master device, so that the master device decapsulates the second uplink data into the first uplink data and transmits the first uplink data to the management server.
In the present application, since the slave device can directly transmit the first uplink data to the management server via the slave PLC device, the master PLC device, and the master device, the management server may receive the uplink data (i.e., the first uplink data) transmitted by the slave device without directly interacting with the slave device; for the slave device, the slave device can send the uplink data to the management server through the network module on the master device, so that the network module does not need to be arranged on the slave device, and the cost for sending the uplink data by the slave device can be saved.
In a fourth aspect, the present application provides a method of transmitting data, which may include: the main PLC equipment receives second downlink data sent by the main equipment; the main PLC equipment decapsulates the second downlink data to obtain first downlink data; and the master PLC device transmitting the first downlink data to the slave PLC device, so that the slave PLC device forwards the first downlink data to the slave device. The second downlink number is sent after the master device receives and packages first downlink data sent by the management server, the first downlink data is sent to the slave device by the management server, the master PLC device provides a PLC interface for the master device, the slave PLC device provides a PLC interface for the slave device, and the master device and the slave device are located in the same local area network.
In the method for transmitting data, when the management server sends downlink data (for example, the first downlink data) to the slave device, the management server may send the first downlink data to the master device, so that the master device may encapsulate the first downlink data into second downlink data and send the second downlink data to the master PLC device, and then the master PLC device receives the second downlink data, decapsulates the second downlink data into the first downlink data, and sends the first downlink data to the slave PLC device, so that the slave PLC device forwards the first downlink data to the slave device. In the application, since the management server can send the first downlink data to the slave device via the master device, the master PLC device and the slave PLC device, for the slave device, the slave device can receive the downlink data (i.e., the first downlink data) sent by the management server without directly interacting with the management server; for the management server, the management server can send the downlink data to the slave device through the network module on the master device, and the network module does not need to be arranged on the slave device, so that the cost for receiving the downlink data by the slave device can be saved.
In a fifth aspect, the present application provides a method of transmitting data, which may include: the master device receives second uplink data sent by the master PLC device; the main equipment decapsulates the second uplink data to obtain first uplink data; and the main equipment sends the first uplink data to the management server. The second uplink data is sent by the master PLC device after the master PLC device receives and packages first uplink data sent by the slave PLC device, the first uplink data is data sent to the management server by the slave PLC device, the master PLC device provides a PLC interface for the master device, the slave PLC device provides a PLC interface for the slave device, and the master device and the slave device are located in the same local area network.
According to the method for transmitting data provided by the application, when the slave device has uplink data (for example, the first uplink data) to transmit to the management server, the slave device can directly transmit the first uplink data to the master PLC device through the slave PLC device, the master PLC device encapsulates the first uplink data into second uplink data and transmits the second uplink data to the master device, then the master device receives the second uplink data, decapsulates the second uplink data into the first uplink data and transmits the first uplink data to the management server, so that the slave device does not need to wait for the master device to query the slave device and then transmits the uplink data, that is, the slave device can actively transmit the uplink data to the management server, and thus good real-time performance of the transmitted data can be ensured to a certain extent.
In the present application, since the slave device can directly transmit the first uplink data to the management server via the slave PLC device, the master PLC device, and the master device, the management server may receive the uplink data (i.e., the first uplink data) transmitted by the slave device without directly interacting with the slave device; for the slave device, the slave device can send the uplink data to the management server through the network module on the master device, so that the network module does not need to be arranged on the slave device, and the cost for sending the uplink data by the slave device can be saved.
In a first optional implementation manner of the fifth aspect, the second uplink data includes a MAC address of the slave device and identification information of the slave PLC device, and after the master device decapsulates the second uplink data to obtain the first uplink data, the method for transmitting data provided by the present application may further include: the master device stores the mapping relation between the MAC address of the slave device and the identification information of the slave PLC device.
In a second optional implementation manner of the fifth aspect, the method for transmitting data provided by the present application may further include: the main device converts the IP address of the main device in the local area network into the IP address of the main device in the wide area network; the sending, by the master device, the first uplink data to the management server may specifically include: the main device sends first uplink data to the management server by adopting the IP address of the main device in the wide area network.
In a third optional implementation manner of the fifth aspect, the method for transmitting data provided by the present application may further include: the master device uses DHCP to allocate the slave device with its IP address in the LAN.
For the description of the related contents and technical effects of the first to third optional implementations of the fifth aspect, reference may be made to the description of the related contents and technical effects of the first to third optional implementations of the first aspect, and details are not repeated here.
In a sixth aspect, the present application provides a method of transmitting data, which may include: the method comprises the steps that a main device receives first downlink data sent by a management server; the master device determines the identification information of the slave PLC device according to the MAC address of the slave device and a first mapping relation stored in the master device; the master equipment adds identification information of the slave PLC equipment in the first downlink data so as to package the first downlink data into second downlink data; and the master device transmits the second downlink data to the master PLC device, so that the master PLC device decapsulates the second downlink data into the first downlink data and transmits the first downlink data to the slave device via the slave PLC device. The first downlink data is data sent to the slave device by the management server, the first downlink data comprises an MAC address of the slave device, the first mapping relation is a mapping relation between the MAC address of the slave device and identification information of the slave PLC device, the slave PLC device provides a PLC interface for the slave device, the master PLC device provides a PLC interface for the master device, and the master device and the slave device are located in the same local area network.
In the method for transmitting data, when the management server transmits downlink data (for example, the first downlink data) to the slave device, the management server may transmit the first downlink data to the master device, and after receiving the first downlink data, the master device may encapsulate the first downlink data into second downlink data and transmit the second downlink data to the master PLC device, so that the master PLC device decapsulates the second downlink data into the first downlink data and transmits the first downlink data to the slave device via the slave PLC device. In the present application, since the management server can transmit the first downlink data to the slave device via the master device, the master PLC device, and the slave PLC device, the slave device can receive the downlink data (i.e., the first downlink data) transmitted by the management server without directly interacting with the management server; for the management server, the management server can send the downlink data to the slave device through the network module on the master device, so that the network module does not need to be arranged on the slave device, and the cost for receiving the downlink data by the slave device can be saved.
In a first optional implementation manner of the sixth aspect, the method for transmitting data provided by the present application may further include: the main device converts the IP address of the main device in the wide area network into the IP address of the main device in the local area network; the sending, by the master device, the second downlink data to the master PLC device may specifically include: and the main equipment transmits second downlink data to the main PLC equipment by adopting the IP address of the main equipment in the local area network.
In a second optional implementation manner of the sixth aspect, the method for transmitting data provided by the present application may further include: the master device uses DHCP to allocate the slave device with its IP address in the LAN.
For a description of related contents and technical effects of the first and second alternative implementations of the sixth aspect, reference may be made to the description of related contents and technical effects of the first and second alternative implementations of the second aspect, and details are not described herein again.
In a seventh aspect, the present application provides a PLC device, which is a master PLC device that may include a receiving module, an encapsulating module, and a transmitting module. The receiving module is used for receiving first uplink data sent by the PLC equipment, and the first uplink data is forwarded after the first uplink data sent by the slave equipment is received by the PLC equipment; the encapsulation module is used for adding identification information of the slave PLC equipment in the first uplink data received by the receiving module so as to encapsulate the first uplink data into second uplink data; the transmission module is used for transmitting second uplink data obtained by encapsulating the first uplink data by the encapsulation module to the main equipment, so that the main equipment decapsulates the second uplink data into the first uplink data and then transmits the first uplink data to the management server; the first uplink data are data sent to the management server by the slave device, the master PLC device provides a PLC interface for the master device, the slave PLC device provides a PLC interface for the slave device, and the master device and the slave device are located in the same local area network.
For technical effects of the seventh aspect, reference may be made to the above description of technical effects of the third aspect, and details are not described here.
In an eighth aspect, the present application provides a PLC device that is a master PLC device that may include a receiving module, an encapsulation module, and a transmitting module. The receiving module is used for receiving second downlink data sent by the main equipment, and the second downlink data is sent after the main equipment receives and encapsulates the first downlink data sent by the management server; the encapsulation module is used for decapsulating the second downlink data received by the receiving module to obtain first downlink data; the transmitting module is used for transmitting first downlink data obtained by de-encapsulating the second downlink data by the encapsulating module to the slave PLC equipment so that the slave PLC equipment forwards the first downlink data to the slave equipment; the first downlink data is data sent to the slave device by the management server, the master PLC device provides a PLC interface for the master device, the slave PLC device provides a PLC interface for the slave device, and the master device and the slave device are located in the same local area network.
For the technical effect of the eighth aspect, reference may be made to the above description of the technical effect of the fourth aspect, and details are not repeated here.
In a ninth aspect, the present application provides a device for transmitting data, where the device is a master device, and the master device may include a receiving module, an encapsulating module, and a sending module. The receiving module is used for receiving second uplink data sent by the master PLC device, wherein the second uplink data is sent by the master PLC device after receiving first uplink data sent by the slave PLC device through the slave PLC device and packaging the first uplink data; the encapsulation module is used for de-encapsulating the second uplink data received by the receiving module to obtain first uplink data; the sending module is used for sending first uplink data obtained by de-encapsulating the second uplink data by the street encapsulation module to the management server; the first uplink data are data sent to the management server by the slave device, the master PLC device provides a PLC interface for the master device, the slave PLC device provides a PLC interface for the slave device, and the master device and the slave device are located in the same local area network.
In a first optional implementation manner of the ninth aspect, the second uplink data includes a MAC address of the slave device and identification information of the slave PLC device, and the master device provided in this application may further include a storage module, where the storage module is configured to, after the encapsulation module decapsulates the second uplink data to obtain the first uplink data, store a mapping relationship between the MAC address of the slave device and the identification information of the slave PLC device.
In a second optional implementation manner of the ninth aspect, the master device provided in this application may further include a conversion module, where the conversion module is configured to convert an IP address of the master device in the local area network into an IP address of the master device in the wide area network; the sending module is specifically configured to send the first uplink data to the management server by using an IP address of the master device in the wide area network.
In a third optional implementation manner of the ninth aspect, the master device provided in the present application may further include an allocating module, where the allocating module is configured to allocate, to the slave device, an IP address of the slave device in the local area network by using DHCP.
For technical effects of the ninth aspect and various alternative implementations thereof, reference may be made to the above description of the technical effects of the fifth aspect and various alternative implementations thereof, which is not described herein again.
In a tenth aspect, the present application provides a device for transmitting data, where the device is a master device, and the master device may include a receiving module, a determining module, an encapsulating module, and a sending module. The receiving module is used for receiving first downlink data sent by the management server; the determining module is used for determining the identification information of the slave PLC equipment according to the MAC address of the slave equipment and the first mapping relation stored in the master equipment; the packaging module is used for adding identification information of the slave PLC equipment in the first downlink data received by the receiving module so as to package the first downlink data into second downlink data; the transmitting module is used for transmitting second downlink data obtained by encapsulating the first downlink data by the encapsulating module to the master PLC device, so that the master PLC device decapsulates the second downlink data into the first downlink data and then transmits the first downlink data to the slave device through the slave PLC device; the first downlink data is data sent to the slave equipment by the management server, and the first downlink data comprises the MAC address of the slave equipment; the first mapping relation is a mapping relation between the MAC address of the slave device and the identification information of the slave PLC device, the master PLC device provides a PLC interface for the master device, the slave PLC device provides a PLC interface for the slave device, and the master device and the slave device are located in the same local area network.
In a first optional implementation manner of the tenth aspect, the main device provided in the present application may further include a conversion module, where the conversion module is configured to convert an IP address of the main device in the wide area network into an IP address of the main device in the local area network; the sending module is specifically configured to send the second downlink data to the master PLC device by using the IP address of the master device in the local area network.
In a second optional implementation manner of the tenth aspect, the master device provided in this application may further include an allocation module, where the allocation module is configured to allocate, to the slave device, an IP address of the slave device in the local area network by using DHCP.
For technical effects of the tenth aspect and various alternative implementations thereof, reference may be made to the above description of technical effects of the sixth aspect and various alternative implementations thereof, which is not described herein again.
In an eleventh aspect, a PLC device is provided, the PLC device being a master PLC device, and the PLC device may include a processor and a memory coupled to the processor. The memory may be used to store computer instructions. When the PLC device is operating, the processor executes the computer instructions stored in the memory to cause the PLC device to perform the method for transmitting data according to the third and fourth aspects.
In a twelfth aspect, a computer-readable storage medium is provided that may include computer instructions. When the computer instructions are run on a master PLC device, the master PLC device is caused to perform the method of transmitting data according to the third and fourth aspects.
In a thirteenth aspect, there is provided a computer program product comprising computer instructions which, when run on a master PLC device, causes the master PLC device to perform the method of transmitting data of the third and fourth aspects described above.
The description of the related contents and technical effects of the eleventh to thirteenth aspects can be referred to the above description of the related contents and technical effects of the third and fourth aspects, and will not be repeated here.
In a fourteenth aspect, a device for transmitting data is provided, the device being a master device, and the device may include a processor and a memory coupled to the processor. The memory may be used to store computer instructions. The processor executes the computer instructions stored by the memory when the apparatus is operated to cause the apparatus to perform the method of transmitting data of any of the fifth aspect and its various alternative implementations described above and the method of transmitting data of any of the sixth aspect and its various alternative implementations described above.
In a fifteenth aspect, a computer-readable storage medium is provided that may include computer instructions. The computer instructions, when executed on a host device, cause the host device to perform the method of transmitting data of any of the fifth aspect and its various alternative implementations described above and the method of transmitting data of any of the sixth aspect and its various alternative implementations.
A sixteenth aspect provides a computer program product comprising computer instructions which, when run on a host device, causes the host device to perform the method of transmitting data of the fifth aspect and any of its various alternative implementations and the method of transmitting data of the sixth aspect and any of its various alternative implementations.
For the description of the related contents and technical effects of the fourteenth to sixteenth aspects, reference may be made to the above description of the related contents and technical effects of the fifth aspect and various alternative implementations thereof, and further description thereof is omitted here.
Drawings
Fig. 1 is a schematic architecture diagram of a PLC system provided in the prior art;
fig. 2 is a hardware schematic diagram of a charging pile according to an embodiment of the present invention;
fig. 3 is a hardware schematic diagram of a management server according to an embodiment of the present invention;
fig. 4 is a hardware schematic diagram of a master PLC device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a PLC system according to an embodiment of the present invention;
fig. 6 is a first schematic diagram illustrating a method for transmitting data according to an embodiment of the present invention;
fig. 7 is a schematic diagram illustrating a method of transmitting data according to an embodiment of the present invention;
fig. 8 is a third schematic diagram illustrating a method for transmitting data according to an embodiment of the present invention;
fig. 9 is a fourth schematic diagram illustrating a method of transmitting data according to an embodiment of the present invention;
fig. 10 is a fifth schematic diagram illustrating a method of transmitting data according to an embodiment of the present invention;
fig. 11 is a first schematic structural diagram of a master PLC device according to an embodiment of the present invention;
fig. 12 is a schematic structural diagram of a master PLC device according to an embodiment of the present invention;
fig. 13 is a first schematic structural diagram of a master device according to an embodiment of the present invention;
fig. 14 is a schematic structural diagram of a master device according to an embodiment of the present invention.
Detailed Description
The terms "first" and "second," and the like, in the description and in the claims of embodiments of the present invention are used for distinguishing between different objects and not for describing a particular order of the objects. For example, the first uplink data, the second uplink data, and the like are used to distinguish different uplink data, and are not used to describe a specific order of uplink data.
In the embodiments of the present invention, words such as "exemplary" or "for example" are used to mean serving as examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "e.g.," an embodiment of the present invention is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
In the description of the embodiments of the present invention, the meaning of "a plurality" means two or more unless otherwise specified. For example, a plurality of slave devices refers to two or more slave devices; the plurality of slave PLC devices means two or more slave PLC devices.
First, some concepts involved in a system for transmitting data provided by the embodiment of the present invention will be explained.
PLC: the method is a communication mode for carrying out data transmission by using a power line for transmitting current as a communication carrier. When the PLC technology is adopted to transmit data, the existing distribution network can be directly used as a transmission line, extra wiring is not needed, and the cost of data transmission can be reduced.
Taking a charging system in a PLC system as an example, the communication system comprises a server, data acquisition equipment and a plurality of charging piles. As shown in fig. 1, in the charging system, a server 10 is wirelessly connected to a data acquisition device 11 (indicated by a solid line in fig. 1), and each of a plurality of charging piles (indicated by 5 charging piles in fig. 1 as an example, respectively denoted as a charging pile 12a, a charging pile 12b, a charging pile 12c, a charging pile 12d, and a charging pile 12e) is connected to the data acquisition device 11. Generally, a data acquisition device 11 in the charging system queries a state of a plurality of charging piles connected to the data acquisition device in a polling manner, when the data acquisition device 11 queries that a certain charging pile (which may be any one of the 5 charging piles shown in fig. 1, for example, the charging pile 12a) in the plurality of charging piles needs to send data to a server 10 of an operation platform, the charging pile 12a may send data to the data acquisition device 11 through a PLC module on the charging pile 12a, and then the data acquisition device 11 may send the data received by the data acquisition device 11 to the server 10 of the operation platform, so that transmission of the data between the charging pile 12a and the server 10 may be completed. However, since the data acquisition device 11 in the charging system queries the statuses of the charging piles in a polling manner, when a charging pile (e.g., the charging pile 12a) in the charging piles needs to send data to the server 10 of the operation platform, the charging pile 12a may wait for the data acquisition device 11 to query the charging pile 12a to send data to the operation platform server 10, which may result in poor real-time performance of data transmission.
In order to solve the above problem, an embodiment of the present invention provides a PLC system, in which, when a slave device in the PLC system has uplink data to transmit to a management server in the PLC system during transmission of the uplink data, the slave device can transmit the uplink data (hereinafter, referred to as first uplink data) to a slave PLC device that provides a PLC interface for the slave device; after receiving the first uplink data from the PLC device, the slave PLC device may forward the first uplink data to the master PLC device; the master PLC device receives the first uplink data and adds identification information of the slave PLC device in the first uplink data so as to package the first uplink data into second uplink data, and then the second uplink data is sent to the master device (the master PLC device provides a PLC interface for the master device); and then the main equipment receives the second uplink data, decapsulates the second uplink data to obtain first uplink data, and sends the first uplink data to a management server wirelessly connected with the main equipment. Compared with the prior art, according to the PLC system provided in the embodiment of the present invention, when the slave device has uplink data to send to the management server, the slave device may directly send the uplink data to the management server through the slave PLC device, the master PLC device, and the master device, and the slave device does not need to wait for the master device to query the slave device and then send the uplink data, that is, the slave device may actively send the uplink data to the management server, so that good real-time performance of data transmission can be ensured to a certain extent.
In the following embodiments, for convenience of understanding, data transmitted from the device to the management server is referred to as uplink data, and data transmitted from the management server to the slave device is referred to as downlink data.
In the embodiment of the present invention, the master device and the slave device may be a charging pile, an oil filling device, or other devices that transmit data in a network through a PLC technology in the internet of things, which is not limited in the embodiment of the present invention.
In the embodiment of the present invention, the master device and the slave device may be the same device or different devices. Assuming that the master device and the slave device are the same device, the hardware structure of each device (including the master device and the slave device) involved in the embodiment of the present invention will be described below by taking the master device as an example.
For example, in the embodiment of the present invention, taking the master device and the slave device as an example, hardware structures of the master device and the slave device provided in the embodiment of the present invention are exemplarily described. It should be noted that the structure of the master device in the embodiment of the present invention is similar to that of the slave device, except that the master device has a network module (for example, a network module adopting a third generation mobile communication technology (hereinafter, referred to as a 3G network module) or a 4G network module), and the slave device may not have a network module. The hardware structure of the charging pile with the network module is described below.
As shown in fig. 2, the charging pile provided in the embodiment of the present invention includes: a control unit 20, a communication unit 21, a power supply 22, an input unit 23, a display unit 24, a card reading unit 25, a voice guidance unit 26, and the like. Those skilled in the art will appreciate that the configuration of the charging post shown in fig. 2 does not constitute a limitation of the charging post, and may include more or fewer components than those shown in fig. 2, or may combine some of the components shown in fig. 2, or may be arranged differently than those shown in fig. 2.
The control unit 20 is a core component of the charging pile and is used for controlling other components of the charging pile, and the control unit may also be called a single chip microcomputer or a single chip microcomputer, and is a computer formed by integrating a Central Processing Unit (CPU), a memory, a timer, a counter, and various I/O interfaces on one chip.
The communication unit 21 may complete communication between the charging post and other devices, and may include a communication interface and a network module. The communication interface can be a transceiver, a transceiver circuit and other structures with transceiving functions, and comprises a serial communication interface and a parallel communication interface; the network module can be a 3G network module or a 4G network module and the like, so that the charging pile can send charging information to the management server through the 3G network module or the 4G network module, and the management server can manage the whole charging system conveniently.
Power 22 can provide stand-by power supply for each part of filling electric pile, and when filling electric pile and being in the outage state, power 22 can be for whole electric pile power supply that fills, can make the user that is charging accomplish business such as settlement smoothly. The power source 22 may be a battery. Optionally, the power supply may be logically connected to the control unit 20 through a power management system, so as to implement functions of managing charging, discharging, power consumption management, and the like through the power management system.
The input unit 23 may receive input numeric or character information and generate key signal inputs related to the setting and function control of the charging post. Specifically, the input unit 23 may include a touch screen 231 and other input devices 232. The touch screen 231, also referred to as a touch panel, may collect a touch operation performed by a user on or near the touch screen 231 (e.g., an operation performed by the user on or near the touch screen 231 using any suitable object or accessory such as a finger, a stylus, etc.), and drive the corresponding connection device according to a preset program. Alternatively, the touch screen 231 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the control unit 20, and can receive and execute commands sent by the control unit 20. In addition, the touch screen 231 may be implemented in various types, such as resistive, capacitive, infrared, and surface acoustic wave. Other input devices 232 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, power switch keys, etc.), a trackball, a mouse, and a joystick.
The display unit 24 may display information input by the user or information provided to the user and various menus of the charging post. The display unit 24 may include a display panel 241. Alternatively, the display panel 241 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-emitting Diode (OLED), or the like. Further, the touch screen 231 may cover the display panel 241, and when the touch screen 231 detects a touch operation thereon or nearby, the touch screen 231 transmits the touch operation to the control unit 20 to determine the type of the touch event, and then the processor 20 provides a corresponding visual output on the display panel 241 according to the type of the touch event. Although in fig. 2, the touch screen 231 and the display panel 241 are two separate components to implement the input and output functions of the charging post, in some embodiments, the touch screen 231 and the display panel 241 may be integrated to implement the input and output functions of the charging post.
The card reading unit 25 can read the information of the charged user and report the information of the user to the control unit 20, and the card reading unit 25 can be compatible with various contact and non-contact IC cards.
The voice guidance unit 26 may guide or prompt the user through voice so that the user can operate the charging post more conveniently to complete charging. The voice guidance unit 26 includes therein an audio circuit, and the audio circuit may convert audio data to be output of the charging pile into an electric signal, transmit the electric signal to the speaker 261, and convert the electric signal into a sound signal to be output by the speaker 261.
Optionally, the charging pile shown in fig. 2 may further include a printing device, a sensor (e.g., a hygrometer sensor, an infrared sensor, etc.), a fan, etc., which are not described herein again.
Fig. 3 is a hardware schematic diagram of a management server according to an embodiment of the present invention, where the management server shown in fig. 3 may include: a processor 30, a memory 31 and a communication interface 32.
The processor 30 is a core component of the management server, and is used for running an operating system of the management server and application programs (including system application programs and third-party application programs) installed on the management server.
In this embodiment of the present invention, the processor 30 may specifically be a 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 devices, a transistor logic device, a hardware component, or any combination thereof, which may implement or execute various exemplary logic blocks, modules, and circuits described in the contents disclosed in this embodiment of the present invention; a processor may also be a combination of computing functions, e.g., comprising one or more microprocessors, a DSP and a microprocessor, or the like.
The memory 31 is used to store program codes and data of the management server.
In this embodiment of the present invention, the memory 31 may specifically include a volatile memory (volatile memory), such as a random-access memory (RAM); the memory may also include a non-volatile memory (non-volatile memory), such as a read-only memory (ROM), a flash memory (flash memory), a hard disk (HDD) or a solid-state disk (SSD); the memory may also comprise a combination of memories of the kind described above.
The communication interface 32 is an interface circuit for managing communication between the server and other devices, and may be a transceiver, a transceiver circuit, or other structures having a transceiver function.
In the embodiment of the present invention, the master PLC apparatus and the slave PLC apparatus may be PLC apparatuses having the same configuration or PLC apparatuses having different configurations. Assuming that the master PLC device and the slave PLC devices have the same configuration, the hardware configuration of each PLC device (including the master PLC device and the slave PLC devices) according to the embodiment of the present invention will be described below by taking the master PLC device as an example.
Fig. 4 is a hardware schematic diagram of a PLC device according to an embodiment of the present invention, where the PLC device shown in fig. 4 may include: PLC chip 40, processor 41, memory 42, and power supply 43.
The PLC chip 40 is a baseband chip for transmitting digital information on the power line, and can modulate a digital signal onto the power line for transmission, and also can receive and demodulate the digital signal on the power line, so that the digital signal can be transmitted and received by modulating the digital signal onto the power line.
The processor 41 may be configured to process data received via the PLC chip, and the processor 41 may specifically be a CPU, a general-purpose processor, a DSP, an ASIC, an FPGA or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof, which may implement or execute various exemplary logic blocks, modules, and circuits described in the disclosure of the embodiments of the present invention; a processor may also be a combination of computing functions, e.g., comprising one or more microprocessors, a DSP and a microprocessor, or the like.
Memory 42 may be used to store program codes and data for the master PLC device. The memory 41 may specifically include volatile memory, such as RAM; the memory may also include non-volatile memory, such as ROM, flash memory, etc.
The power supply 43 may provide power to various components of the PLC device, and typically may employ a 5 volt (V) or 12V power supply to power the PLC device.
In this embodiment of the present invention, the PLC device is a device that provides a PLC interface for one device (for example, the master device or the slave device). Functions (which may be referred to as PLC functional units) possessed by a PLC device may be integrated inside the device, and when the device transmits or receives data using PLC technology, the device may transmit or receive data through a PLC module in the device. The PLC device may be independent from the device, that is, the PLC device and the device are two devices independent from each other, and when the device transmits or receives data using the PLC technology, the master device may transmit or receive data through the PLC device connected to the device. That is, in the embodiment of the present invention, the master PLC device may be integrated in the master device, or may be independent of the master device; the slave PLC device may be integrated in the slave device or may be independent from the slave device, and the embodiment of the present invention is not particularly limited.
In the embodiment of the present invention, the master device, the master PLC device, the slave PLC device, and the slave device in the PLC system form a local area network, and further, data can be transmitted between the four devices, and the master device and the management server can form a wide area network, so that data can be transmitted between the master device and the management server. After communication connection is established between each device in the PLC system, data can be transmitted between the devices.
Specifically, the method for forming the local area network by the master device, the master PLC device, the slave PLC device, and the slave device in the PLC system may be: after the PLC system is powered on, the master device may send instruction information to the master PLC device to instruct the master PLC device to provide a service for the master device (e.g., the master PLC device provides a PLC interface for the master device), and the slave device may send instruction information to the slave PLC device to instruct the slave device to provide a service for the slave device (e.g., the slave PLC device provides a PLC interface for the slave device); the slave PLC device may then search for a master device in the PLC system, and when the slave device searches for the master device, the slave device may establish a communication connection with the master device, so that the slave device may transmit data with the master device. Specifically, the slave device may establish a communication connection with the master device via the slave PLC device and the master PLC device, so that data may be transmitted between the master device, the master PLC device, the slave PLC device, and the slave device.
The method for forming the wide area network by the master device and the management server may be: network modules (such as a 3G network module or a 4G network module) are respectively arranged on the main device and the management server, so that data can be transmitted between the main device and the management server through the network modules.
According to the PLC system provided by the embodiment of the invention, the PLC system can transmit uplink data and downlink data. Specifically, when the slave device has uplink data to transmit to the management server, the slave device may transmit the uplink data to the management server via the slave PLC device, the master PLC device, and the master device. When the management server transmits the downstream data to the slave device, the management server may transmit the downstream data to the slave device via the master device, the master PLC device, and the slave PLC device. The following describes the PLC system provided in the embodiment of the present invention in detail by taking uplink data transmission and downlink data transmission as examples.
It should be noted that, the PLC system provided in the embodiment of the present invention may include a plurality of slave devices, and methods for transmitting data between the plurality of slave devices and the management server are all the same.
First, a PLC system provided in an embodiment of the present invention is exemplarily described by taking downlink data transmission in the PLC system as an example.
As shown in fig. 5, an architecture diagram of a PLC system according to an embodiment of the present invention may include a management server 50, a master device 51, a master PLC device 52, a slave PLC device 53, and a slave device 54. The master device 51 is wirelessly connected to the management server 50, the master PLC device 52 provides a PLC interface for the master device 51, the slave PLC device 53 provides a PLC interface for the slave device 54, and the master device 51 and the slave device 54 are in the same local area network. In fig. 5, the main PLC device 52 and the main device 51 are two independent devices, and the main PLC device 52 is connected to the main device 51; the slave PLC device 53 and the slave device 54 are two independent devices, and the connection between the slave PLC device 53 and the slave device 54 is described as an example.
In the embodiment of the present invention, the slave device 54 shown in fig. 5 is used to transmit upstream data (hereinafter, both referred to as "first upstream data") to the slave PLC device 53, and the first upstream data is data transmitted from the slave device 54 to the management server 50.
The slave PLC device 53 is configured to receive the first uplink data transmitted by the slave device 54 and forward the first uplink data to the master PLC device 52.
The master PLC device 52 is configured to receive the first uplink data transmitted from the PLC device 53, add identification information of the slave PLC device 53 to the first uplink data, encapsulate the first uplink data into second uplink data, and transmit the second uplink data to the master device 51.
The master device 51 is configured to receive the second uplink data sent by the master PLC device 52, decapsulate the second uplink data to obtain first uplink data, and send the first uplink data to the management server.
The management server 50 is configured to receive first uplink data sent by the master device 51.
In an embodiment of the present invention, when there is uplink data (i.e., the first uplink data) transmitted from the slave device in the PLC system to the management server in the PLC system, the slave device may transmit the first uplink data to a slave PLC device providing a PLC interface for the slave device, and after receiving the first uplink data from the slave PLC device, the slave PLC device may forward the first uplink data to the master PLC device, i.e., the slave device may transparently transmit the first uplink data to the master PLC device via the slave PLC device, so that the master PLC device may transmit the first uplink data to the management server via the master device.
In this embodiment of the present invention, after the master PLC device receives the first uplink data sent by the slave PLC device, the master PLC device may encapsulate the first uplink data into the second uplink data. Specifically, the master device may add the identification information of the slave PLC device to the first uplink data to encapsulate the first uplink data into second uplink data and then send the second uplink data to the master device, so that the master device may obtain the identification information of the slave PLC device from the second uplink data.
Optionally, in this embodiment of the present invention, the identification information of the slave device may be a MAC address of the slave device, may also be identification information set by a user, and may also be other information that can uniquely identify the slave device, which is not specifically limited in this embodiment of the present invention.
For example, the user may set an identifier for the slave device, for example, the user may set a number for the slave device to indicate the slave device. Assuming that there are 4 slave devices (e.g., slave a, slave B, slave C, slave D) in the communication system, the user may identify slave a with "00", slave B with "01", slave C with "10", and slave D with "11". Of course, the identifier of the slave device may also be set by using other numbers meeting actual use requirements in the embodiments of the present invention, which are not listed in any way in the embodiments of the present invention.
In this embodiment of the present invention, the method for decapsulating, by the master device, the second uplink data received by the master device to obtain the first uplink data may include: and the master device deletes the identification information of the slave PLC device in the second uplink data to obtain first uplink data, and then sends the first uplink data to the management server. At this point, the process of sending the uplink data from the device to the management server may be completed.
In the PLC system according to the embodiment of the present invention, when the slave device in the PLC system has uplink data (for example, the first uplink data) to transmit to the management server in the PLC system, the slave device may transmit the first uplink data to the slave PLC device; after receiving the first uplink data from the PLC device, the slave PLC device may forward the first uplink data to the master PLC device; the master PLC equipment receives the first uplink data and adds identification information of slave PLC equipment in the first uplink data so as to package the first uplink data into second uplink data, and then the second uplink data is sent to the master equipment; and then the main equipment receives the second uplink data, decapsulates the second uplink data to obtain first uplink data, and sends the first uplink data to the management server. Compared with the prior art, according to the PLC system provided in the embodiment of the present invention, when the slave device has uplink data to send to the management server, the slave device may directly send the uplink data to the management server through the slave PLC device, the master PLC device, and the master device, and the slave device does not need to wait for the master device to query the slave device and then send the uplink data, that is, the slave device may actively send the uplink data to the management server, so that good real-time performance of data transmission can be ensured to a certain extent.
It can be understood that, in the PLC system provided in the embodiment of the present invention, since the slave device can directly transmit the first uplink data to the management server via the slave PLC device, the master PLC device, and the master device, for the management server, the management server may receive the uplink data (i.e., the first uplink data) transmitted by the slave device without directly interacting with the slave device; for the slave device, the slave device can send the uplink data to the management server through the network module on the master device, so that the network module does not need to be arranged on the slave device, and the cost for sending the uplink data by the slave device can be saved.
It should be noted that, the processes for processing and transmitting uplink data for each device in the PLC system according to the embodiments of the present invention will be described in detail in the following embodiments.
The following takes the transmission of downlink data in the PLC system as an example, and an exemplary description is given to the PLC system provided in the embodiment of the present invention.
As shown in fig. 5, an architecture diagram of a PLC system according to an embodiment of the present invention may include a management server 50, a master device 51, a master PLC device 52, a slave PLC device 53, and a slave device 54. The master device 51 is wirelessly connected to the management server 50, the master PLC device 52 provides a PLC interface for the master device 51, the slave PLC device 53 provides a PLC interface for the slave device 54, and the master device 51 and the slave device 54 are in the same local area network. In fig. 5, the main PLC device 52 and the main device 51 are two independent devices, and the main PLC device 52 is connected to the main device 51; the slave PLC device 53 and the slave device 54 are two independent devices, and the connection between the slave PLC device 53 and the slave device 54 is described as an example.
In the embodiment of the present invention, the management server 50 shown in fig. 5 is configured to transmit downlink data (hereinafter, referred to as first downlink data) to the master device 51, where the first downlink data is data transmitted to the slave device 54 by the management server 50, and the first downlink data includes the MAC address of the slave device 54.
The master device 51 is configured to receive the first downlink data transmitted by the management server 50, determine the identification information of the slave PLC device 53 according to the MAC address of the slave device 54 in the first downlink data and the first mapping relationship stored in the master device 51, add the identification information of the slave PLC device 53 to the first downlink data, package the first downlink data into second downlink data, and transmit the second downlink data to the master PLC device 52. The first mapping relationship is a mapping relationship between the MAC address of the slave device 54 and the identification information of the slave PLC device 53.
The master PLC device 52 is configured to receive the second downlink data sent by the master device 51, decapsulate the second downlink data to obtain first downlink data, and send the first downlink data to the slave PLC device 53.
The slave PLC device 53 is configured to receive the first downlink data transmitted by the master PLC device 52 and forward the first downlink data to the slave device 54.
The slave device 54 is configured to receive the first downlink data transmitted from the PLC device 53.
In an embodiment of the present invention, when the management server in the PLC system transmits downlink data (i.e., the first downlink data) to the slave device in the PLC system, the management server may transmit the first downlink data to the master device, and may further transmit the first downlink data to the slave device via the master device, the master PLC device, and the slave PLC device.
It should be noted that, in the embodiment of the present invention, for the description of the identification information of the slave PLC, reference may be specifically made to the description of the identification information of the slave PLC device in the embodiment of transmitting uplink data in the PLC system, which is not described herein again.
In this embodiment of the present invention, the master device may store a plurality of mapping relationships (the plurality of mapping relationships include the first mapping relationship), where the plurality of mapping relationships are mapping relationships between MAC addresses of the plurality of slave devices and identification information of the plurality of slave PLC devices. Wherein the MAC address of each slave device corresponds to identification information of a slave PLC device providing a PLC interface for the slave device.
For example, assuming that there are 4 mapping relationships (including mapping relationships between MAC addresses of 4 slave devices and identification information of 4 slave PLC devices) in the mapping relationship stored in the master device, as shown in table 1, an example of a mapping relationship between a MAC address of a slave device and identification information of a slave PLC device is provided for the embodiment of the present invention.
TABLE 1
MAC address of slave device Identification information of slave PLC device
84-3B-5B-6D-F1-23 00
53-8B-1B-3D-F1-37 01
14-2B-3B-7D-F1-23 10
42-3B-1B-2D-F4-23 11
In this embodiment of the present invention, the master device searches for a first mapping relationship including the MAC address of the slave device according to the MAC address of the slave device in the first downlink data (since the first downlink data is data that the management server received by the master device sends to the slave device, the first downlink data includes the MAC address of the slave device) and a plurality of mapping relationships stored in the master device, so that the master device can determine, from the first mapping relationship, identification information of a slave PLC device that provides a PLC interface for the slave device, add the identification information of the slave PLC device to the first downlink data to obtain second downlink data, and then send the second downlink data to the master PLC device. In this way, the master PLC device can know, according to the identification information of the slave PLC device in the second downlink data, to which slave PLC device of the plurality of slave PLC devices in the PLC system the second downlink data is transmitted.
In this embodiment of the present invention, the method for decapsulating, by the master PLC device, the second downlink data to obtain the first downlink data may include: and the master PLC equipment deletes the identification information of the slave PLC equipment in the second downlink data to obtain first downlink data, and then forwards the first downlink data to the slave equipment through the slave PLC equipment. Therefore, the process of sending the downlink data to the slave device by the management server can be completed.
According to the PLC system provided in the embodiment of the present invention, since the management server can send the first downlink data to the slave device via the master device, the master PLC device, and the slave PLC device, for the slave device, the slave device can receive the downlink data (i.e., the first downlink data) sent by the management server without directly interacting with the management server, and for the management server, the management server can send the downlink data to the slave device via the network module on the master device, so that there is no need to set a network module on the slave device, and thus the cost for the slave device to receive the downlink data can be saved.
Optionally, in the embodiment of the present invention, two main devices (e.g., a first main device and a second main device) may be arranged in the PLC system, where the first main device may be used to transmit uplink data and downlink data, and the second main device may be used as a standby device of the first main device, so that when the first main device fails to operate (e.g., when the first main device fails or a regional network where the first device is located has a poor signal and cannot transmit and receive data), the second main device may be used to transmit the uplink data and the downlink data.
It should be noted that the PLC system provided in the embodiment of the present invention may include a plurality of slave devices, and a method for each of the plurality of slave devices to send uplink data to the management server is completely the same, and a process for each slave device to send uplink data to the management server may refer to a description of a process for transmitting uplink data in the PLC system in the foregoing embodiment; and the method for the management server to send the downlink data to each of the plurality of slave devices is also the same, and the process for the management server to send the downlink data to each slave device may refer to the description of the process for transmitting the downlink data in the PLC system in the above embodiment.
Embodiments of the present invention provide a method for transmitting data, where the method may be applied to the PLC system described in the foregoing embodiments, and when a slave device in the PLC system has uplink data to send to a management server in the PLC system, the method may be used to complete a process in which the slave device actively sends the uplink data to the management server. In conjunction with fig. 5, as shown in fig. 6, the method may include S101-S110:
s101, the slave device sends first uplink data to the slave PLC device.
In this embodiment of the present invention, the first uplink data is data sent from the device to the management server.
In this embodiment of the present invention, the slave PLC device may provide a PLC interface for the slave device, functions of the slave PLC device may be integrated in the slave device, and the slave PLC device may also be independent from the slave device.
S102, receiving first uplink data from the PLC equipment.
S103, the slave PLC equipment forwards the first uplink data to the master PLC equipment.
And S104, the main PLC equipment receives the first uplink data.
In the embodiment of the present invention, the first uplink data received by the master PLC is forwarded after the slave PLC device receives the first uplink data sent by the slave device, and the master PLC device may provide a PLC interface for the master device.
In the embodiment of the invention, the master device and the slave device are in the same local area network. Specifically, the master device, the slave device, the master PLC device and the slave device are in the same local area network.
And S105, the master PLC device adds identification information of the slave PLC device in the first uplink data so as to package the first uplink data into second uplink data.
And S106, the main PLC equipment sends second uplink data to the main equipment.
In this embodiment of the present invention, after receiving the first uplink data sent by the slave PLC device, the master PLC device may add identification information of the slave PLC device at a specified position in the first uplink data, so as to encapsulate the first uplink data into second uplink data, and then send the second uplink data to the master device, so that the master device decapsulates the second uplink data into the first uplink data and sends the first uplink data to the management server.
In this embodiment of the present invention, the specified position may be a position of a header or a position of an end of the first uplink data, and for example, identification information of the slave PLC device may be added to a foremost field of the header of the first uplink data.
In the embodiment of the present invention, for detailed descriptions of S104 to S106, reference may be specifically made to the related description of the main PLC device in the above embodiment of transmitting uplink data in the PLC system, and details are not described herein again.
And S107, the master device receives the second uplink data.
In the embodiment of the present invention, the second uplink data received by the master device is the first uplink data that is received by the master PLC device and sent by the slave PLC device via the slave PLC device, and is sent to the master device after being encapsulated.
And S108, the main equipment de-encapsulates the second uplink data to obtain the first uplink data.
S109, the main device sends the first uplink data to the management server.
The descriptions of S107 to S109 may specifically be the description of the master device in the above embodiment of transmitting uplink data in the PLC system, and are not repeated herein.
S110, the management server receives first uplink data sent by the main device.
According to the method for transmitting data provided by the embodiment of the present invention, when the slave device has uplink data (for example, the first uplink data) to send to the management server, the slave device may send the first uplink data to the slave PLC device; after receiving the first uplink data from the PLC device, the slave PLC device may forward the first uplink data to the master PLC device; the master PLC equipment receives the first uplink data and adds identification information of slave PLC equipment in the first uplink data so as to package the first uplink data into second uplink data, and then the second uplink data is sent to the master equipment; and then the main equipment receives the second uplink data, decapsulates the second uplink data to obtain first uplink data, and sends the first uplink data to the management server. Compared with the prior art, in the embodiment of the invention, when the slave device has uplink data to send to the management server, the slave device can directly send the uplink data to the management server through the slave PLC device, the master PLC device and the master device, and the slave device does not need to wait for the master device to inquire the slave device to send the uplink data, namely the slave device can actively send the uplink data to the management server, so that the real-time performance of better transmission data can be ensured to a certain extent.
It can be understood that, in the embodiment of the present invention, since the slave device can directly transmit the first uplink data to the management server via the slave PLC device, the master PLC device, and the master device, for the management server, the management server may receive the uplink data (i.e., the first uplink data) transmitted by the slave device without directly interacting with the slave device; for the slave device, the slave device can send the uplink data to the management server through the network module on the master device, so that the network module does not need to be arranged on the slave device, and the cost for sending the uplink data by the slave device can be saved.
Optionally, in this embodiment of the present invention, the second uplink data received by the master device includes a MAC address of the slave device and identification information of the slave PLC device. With reference to fig. 6, as shown in fig. 7, after S108, the method for transmitting data according to the embodiment of the present invention may further include S108 a:
s108a, the master device stores the mapping relation between the MAC address of the slave device and the identification information of the slave PLC device.
In this embodiment of the present invention, after the master device decapsulates the second uplink data, that is, after the master device deletes the identification information of the slave PLC device in the second uplink data, the master device may store the mapping relationship between the MAC address of the slave device and the identification information of the slave PLC device in the master device. In this way, in the process of transmitting the downlink data (i.e., the process of sending data to the slave device by the management server), the master device may encapsulate the downlink data according to the MAC address of the slave device in the downlink data sent by the management server and the mapping relationship, specifically, the master device determines, from the mapping relationship, the identification information of the slave PLC device that provides the PLC interface for the slave device, which corresponds to the MAC address of the slave device, and then adds the identification information of the slave PLC device to the downlink data, thereby completing encapsulation of the downlink data.
For a specific description of the mapping relationship between the MAC address of the slave device and the identification information of the PLC device, reference may be made to the related description of the mapping relationship between the MAC address of the slave device and the identification information of the PLC device in the above embodiment of introducing the PLC system, and details are not repeated here.
It should be noted that the execution order of S108a and S109 may not be limited in the embodiments of the present invention. That is, in the embodiment of the present invention, S108a may be executed first, and then S109 may be executed; s109 may be executed first, and then S108a may be executed; s108a and S109 may also be performed simultaneously.
Optionally, with reference to fig. 6 and as shown in fig. 8, the method for transmitting data according to the embodiment of the present invention, before the step S109, may further include:
s109a, the master device converting the IP address of the master device in the local area network into the IP address of the master device in the wide area network.
In the embodiment of the invention, the master device, the master PLC device, the slave PLC device and the slave device form a local area network, namely the master device and the slave device are in the same local area network, and in the process of transmitting data by adopting IP addresses in the same local area network, the master device and the slave device in the local area network can transmit data by adopting the IP addresses in the local area network respectively; meanwhile, the main device and the management server are in the same wide area network, namely the main device and the management server do not belong to the same local area network, and in the process of transmitting data by adopting IP addresses in the same wide area network, all devices in the wide area network transmit data by adopting the IP addresses of all devices in the wide area network. In the embodiment of the present invention, because the second uplink data received by the master device is data sent by the slave device in the local area network, and the master device sends the first uplink data obtained by decapsulating the second uplink data to the management server in the wide area network, the master device may convert the IP address of the master device in the local area network into the IP address of the master device in the wide area network, so that the master device sends the first uplink data to the management server by using the IP address of the master device in the wide area network.
Optionally, in this embodiment of the present invention, a method for the master device to convert the IP address of the master device in the local area network into the IP address of the master device in the wide area network (i.e., address mapping) specifically may be: the master device may determine the IP address of the master device in the wide area network according to the IP address of the master device in the local area network (may be referred to as a first IP address for short) and a mapping relationship between the IP address of the master device in the local area network (i.e., the first IP address) and the IP address of the master device in the wide area network (may be referred to as a second IP address for short) stored in the master device.
It should be noted that the execution order of S108 and S109a may not be limited in the embodiments of the present invention. That is, in the embodiment of the present invention, S108 may be executed first, and then S109a may be executed; s109a may be executed first, and then S108 may be executed; s108 and S109a may also be performed simultaneously.
As shown in fig. 8, in the embodiment of the present invention, S109 may be specifically implemented by S1091:
s1091, the main device sends first uplink data to the management server by adopting an IP address of the main device in the wide area network.
In this embodiment of the present invention, when the master device sends the first uplink data to the management server in the wide area network, the master device may send the first uplink data to the management server by using an IP address (that is, the second IP address) of the master device in the wide area network.
For example, assuming that, in the mapping relationship between the IP address of the master device in the wide area network and the IP address of the master device in the local area network, which is stored in the master device, the IP address of the master device in the local area network is 192.168.0.x, and the IP address of the master device in the wide area network is 202.202.12.11, when the master device receives the second uplink data sent by the slave PLC device in the local area network and decapsulates the second uplink data into the first uplink data, the master device may send the first uplink data to the management server by using the IP address 202.202.12.11.
Optionally, the method for transmitting data provided in the embodiment of the present invention may further include S100:
s100, the master device adopts DHCP to distribute the IP address of the slave device in the local area network for the slave device.
In the embodiment of the present invention, when the data transmission method provided by the embodiment of the present invention is used to transmit data in a PLC system, the master device may allocate an IP address of the slave device in a local area network to the slave device by using DHCP, so that the master device and the slave device may transmit data by using the IP addresses in the local area network.
An embodiment of the present invention provides a method for transmitting data, where the method may be applied to the PLC system described in the foregoing embodiment, and when a management server in the PLC system sends downlink data to a slave device in the PLC system, the method may be used to complete a process of sending data from the management server to the slave device. In conjunction with fig. 5, as shown in fig. 9, the method may include S201-S211:
s201, the management server sends first downlink data to the main device.
The first downlink data is data sent to the slave device by the management server, and the first downlink data comprises the MAC address of the slave device.
S202, the main device receives first downlink data.
S203, the master device determines the identification information of the slave PLC device according to the MAC address of the slave device in the first downlink data and the first mapping relation stored in the master device.
In this embodiment of the present invention, the first mapping relationship stored in the master device is a mapping relationship between an MAC address of the slave device and identification information of the slave PLC device, and the master device and the slave device are located in the same lan. .
For a specific description of the first mapping relationship, reference may be made to the related description of the first mapping relationship in the above embodiment (the above embodiment for transmitting downlink data in the PLC system), and details are not repeated here.
And S204, the master device adds identification information of the slave PLC device in the first downlink data to package the first downlink data into second downlink data.
And S205, the master device sends second downlink data to the master PLC device.
In the embodiment of the present invention, the master device sends the second downlink data to the master PLC device, so that the master PLC device decapsulates the second downlink data into the first downlink data and sends the first downlink data to the slave device via the slave PLC device.
In the embodiment of the present invention, the master PLC device may provide a PLC interface for the master device. The functions of the main PLC device may be integrated in the main device, the main PLC device may also be independent from the main device, and for other descriptions of the main PLC device and the main device, reference may be made to the related descriptions of the main PLC device and the main device in the above embodiments of introducing the PLC system, which is not described herein again.
For other descriptions of S203-S205, reference may be specifically made to the relevant description of the above embodiment (the above embodiment for transmitting downlink data in the PLC system), and details are not described herein again.
And S206, the master PLC equipment receives the second downlink data.
In the embodiment of the present invention, the second downlink data received by the PLC device is sent by the master device after receiving and encapsulating the first downlink data sent by the management server.
And S207, the main PLC equipment decapsulates the second downlink data to obtain the first downlink data.
And S208, the master PLC device sends the first downlink data to the slave PLC device.
And S209, receiving the first downlink data from the PLC equipment.
And S210, transmitting the first downlink data from the PLC equipment to the slave equipment.
And S211, receiving the first downlink data from the equipment.
In this embodiment of the present invention, the master PLC device may forward the first downlink data to the slave device through the slave PLC device. Therefore, the process of sending the downlink data to the slave device by the management server can be completed. It can be understood that, in the method for transmitting data provided by the embodiment of the present invention, the management server may transmit the first downlink data to the slave device via the master device, the master PLC device, and the slave PLC device.
According to the method for transmitting data provided by the embodiment of the invention, the management server can send the first downlink data to the slave device through the master device, the master PLC device and the slave PLC device, so that for the slave device, the slave device can receive the downlink data (namely the first downlink data) sent by the management server without directly interacting with the management server; for the management server, the management server can send the downlink data to the slave device through the network module on the master device, so that the network module does not need to be arranged on the slave device, and the cost for receiving the downlink data by the slave device can be saved.
Optionally, with reference to fig. 9 and as shown in fig. 10, the method for transmitting data according to the embodiment of the present invention may further include, before the step S205, a step S205 a:
s205a, the master device converts the IP address of the master device in the wide area network into the IP address of the master device in the local area network.
In the embodiment of the invention, the master device, the master PLC device, the slave PLC device and the slave device form a local area network, namely the master device and the slave device are in the same local area network, and in the process of transmitting data by adopting IP addresses in the same local area network, the master device and the slave device in the local area network can transmit data by adopting the IP addresses in the local area network respectively; meanwhile, the main device and the management server are in the same wide area network, namely the main device and the management server do not belong to the same local area network, and in the process of transmitting data by adopting IP addresses in the same wide area network, all devices in the wide area network transmit data by adopting the IP addresses of all devices in the wide area network. In the embodiment of the present invention, because the first downlink data received by the master device is data sent by the management server in the wide area network, and the master device sends the second downlink data obtained by encapsulating the first downlink data to the master PLC device in the local area network, the master device may convert the IP address of the master device in the wide area network into the IP address of the master device in the local area network, so that the master device sends the second downlink data to the master PLC device by using the IP address of the master device in the local area network.
Optionally, in this embodiment of the present invention, a method for the master device to convert the IP address of the master device in the local area network into the IP address of the master device in the wide area network (i.e., address mapping) specifically may be: the master device may determine the IP address of the master device in the local area network according to the IP address of the master device in the local area network (may be referred to as a first IP address for short) and a mapping relationship between the IP address of the master device in the local area network (i.e., the first IP address) and the IP address of the master device in the wide area network (may be referred to as a second IP address for short) stored in the master device.
It should be noted that the execution order of S204 and S205a may not be limited in the embodiments of the present invention. That is, in the embodiment of the present invention, S204 may be executed first, and then S205a may be executed; s205a may be executed first, and then S204 may be executed; s204 and S205a may also be performed simultaneously.
As shown in fig. 10, in the embodiment of the present invention, the step S205 may be specifically implemented by the step S2051:
and S2051, the main device sends second downlink data to the main PLC device by adopting the IP address of the main device in the local area network.
In this embodiment of the present invention, when the master device sends the second downlink data to the master PLC device in the local area network, the master device may send the second downlink data to the master PLC device by using the IP address (i.e., the first IP address) of the master device in the local area network.
For example, assuming that, in the mapping relationship between the IP address of the master device in the wide area network and the IP address of the master device in the local area network, which is stored in the master device, the IP address of the master device in the local area network is 192.168.0.x, and the IP address of the master device in the wide area network is 202.202.12.11, when the master device receives the first downlink data sent by the management server in the wide area network and encapsulates the first downlink data into the second downlink data, the master device may send the second downlink data to the slave PLC device using the IP address of 192.168.0. x.
Optionally, the method for transmitting data provided in the embodiment of the present invention may further include S200:
s200, the master device adopts DHCP to distribute the IP address of the slave device in the local area network for the slave device.
In the embodiment of the present invention, for specific description of S200, reference may be made to the above-mentioned related description of S100, which is not described herein again.
The above-mentioned scheme provided by the embodiment of the present invention is introduced mainly from the perspective of interaction between network elements. It is to be understood that each network element, for example, a master PLC device, a master device, etc., includes a corresponding hardware structure and/or software module for performing each function in order to implement the above functions. Those of skill in the art will readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present invention, the main PLC device, the main device, and the like may be divided into functional modules according to the above method examples, for example, each functional module may be divided for each function, or two or more functions may be integrated into one processing module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. It should be noted that, the division of the modules in the embodiment of the present invention is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
In the case of dividing each functional module by corresponding functions, fig. 11 shows a possible structural diagram of the master PLC device according to the above embodiment. As shown in fig. 11, the master PLC apparatus may include: a receiving module 60, an encapsulating module 61 and a transmitting module 62. The receiving module 60 may be configured to support the master PLC device to perform S104 and S206 in the above method embodiment; the encapsulation module 61 may be configured to support the master PLC device to perform S105 and S207 in the above method embodiment; the sending module 62 may be configured to support the master PLC device to perform S106 and S208 in the above method embodiment. All relevant contents of each step related to the above method embodiment may be referred to the functional description of the corresponding functional module, which is not described herein again.
In the case of an integrated unit, fig. 12 shows a possible structural diagram of the master PLC device involved in the above-described embodiment. As shown in fig. 12, the master PLC device may include: a processing module 70 and a communication module 71. The processing module 70 may be used to control and manage the actions of the master PLC device, for example, the processing module 70 may be used to support the master PLC device to perform S105 and S207 in the above-described method embodiments, and/or other processes for the techniques described herein. The communication module 71 may be configured to support communication between the master PLC device and other network entities, for example, the communication module 71 may be configured to support the master PLC device to perform S104, S106, S206, and S208 in the above-described method embodiments. Optionally, as shown in fig. 12, the master PLC device may further include a memory module 72 for storing program codes and data of the master PLC device.
The processing module 70 may be a processor or a controller (for example, the processor 41 shown in fig. 4) such as a CPU, a general purpose processor DSP, an ASIC, an FPGA, or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof. Which may implement or execute the various illustrative logical blocks, modules, and circuits described in connection with the embodiment disclosure. The processor described above may also be a combination of computing functions, e.g., comprising one or more microprocessors, DSPs and microprocessors, and the like. The communication module 71 may be a transceiver, a transceiver circuit, a communication interface, or the like (e.g., the PLC chip 40 shown in fig. 4). The storage module 72 may be a memory (e.g., may be the memory 42 described above with reference to fig. 4).
In the case of dividing each functional module by corresponding functions, fig. 13 shows a possible structural diagram of the master device involved in the above embodiment. As shown in fig. 13, the master device may include: a receiving module 80, an encapsulating module 81 and a transmitting module 82. The receiving module 80 may be configured to support the master device to perform S107 and S202 in the foregoing method embodiment; the encapsulation module 81 may be configured to support the master device to perform S108 and S204 in the foregoing method embodiment; the sending module 82 may be configured to support the master device to perform S109 (including S1091) and S205 in the foregoing method embodiment. Optionally, as shown in fig. 13, the master device may further include a saving module 83, a conversion module 84, and an allocation module 85. The saving module 83 may be configured to support the host device to execute S108a in the foregoing method embodiment; the conversion module 84 may be configured to support the master device to perform S109a and S205a in the above method embodiment; the allocation module 85 may be configured to support the master device to execute S100 and S200 in the above method embodiment. The master device provided in the embodiment of the present invention may further include a determining module, where the determining module may be configured to support the master device to execute S203 in the foregoing method embodiment. All relevant contents of each step related to the above method embodiment may be referred to the functional description of the corresponding functional module, which is not described herein again.
In the case of an integrated unit, fig. 14 shows a possible structural diagram of the master device involved in the above-described embodiment. As shown in fig. 14, the master device may include: a processing module 90 and a communication module 91. The processing module 90 may be used to control and manage the actions of the host device, for example, the processing module 90 may be used to support the host device to perform S108, S108a, S109a, S100, S200, S203, S204, and S205a in the above method embodiments, and/or other processes for the techniques described herein. The communication module 91 may be configured to support communication between the master device and other network entities, for example, the communication module 91 may be configured to support the master device to perform S107, S109 (including S1091), S202, and S205 in the above method embodiments. Optionally, as shown in fig. 14, the host device may include a storage module 92 for storing program codes and data of the host device.
The processing module 90 may be a processor or a controller (for example, the control unit 20 shown in fig. 2) such as a CPU, a general purpose processor DSP, an ASIC, an FPGA, or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof. Which may implement or execute the various illustrative logical blocks, modules, and circuits described in connection with the embodiment disclosure. The processor described above may also be a combination of computing functions, e.g., comprising one or more microprocessors, DSPs and microprocessors, and the like. The communication module 91 may be a transceiver, a transceiver circuit, a communication interface, or the like (e.g., may be the communication unit 21 shown in fig. 2 described above). The storage module 92 may be a memory.
In this embodiment of the present invention, the slave device, the slave PLC device, and the management server may also be implemented by dividing each function module corresponding to each function or by using an integrated unit, and specifically, each function module or integrated unit may perform each method step performed by the slave device, the slave PLC device, and the management server in the foregoing method embodiments, and details are not described here again.
In the above embodiments, all or part may be implemented by a software program, hardware, firmware, or any combination thereof. When implemented using a software program, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the flow or functions according to embodiments of the invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device including one or more available media integrated servers, data centers, and the like. The usable medium may be a magnetic medium (e.g., floppy disk, magnetic tape), an optical medium (e.g., Digital Video Disk (DVD)), or a semiconductor medium (e.g., Solid State Drive (SSD)), among others.
Through the above description of the embodiments, it is clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the above described functions. For the specific working processes of the system, the apparatus and the unit described above, reference may be made to the corresponding processes in the foregoing method embodiments, and details are not described here again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be 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 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, 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 application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in 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) or a processor to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: flash memory, removable hard drive, read only memory, random access memory, magnetic or optical disk, and the like.
The above description is only an embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present disclosure should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (18)

1. A power line communication PLC system is characterized by comprising a management server, a master device, a master PLC device, a slave PLC device and a slave device, wherein the master device is in wireless connection with the management server, the master PLC device provides a PLC interface for the master device, the slave PLC device provides a PLC interface for the slave device, and the master device and the slave device are in the same local area network;
the slave device is configured to send first uplink data to the slave PLC device, where the first uplink data is data sent to the management server by the slave device;
the slave PLC device is used for receiving the first uplink data sent by the slave device and forwarding the first uplink data to the master PLC device;
the master PLC device is configured to receive the first uplink data sent by the slave PLC device, add identification information of the slave PLC device to the first uplink data, encapsulate the first uplink data into second uplink data, and send the second uplink data to the master device;
the master device is configured to receive the second uplink data sent by the master PLC device, decapsulate the second uplink data, obtain the first uplink data, and send the first uplink data to the management server;
the management server is configured to receive the first uplink data sent by the master device.
2. The PLC system of claim 1, wherein the second uplink data comprises a media access control (MCA) address of the slave device and identification information of the slave PLC device;
the master device is further configured to store a mapping relationship between the MAC address of the slave device and the identification information of the slave PLC device after decapsulating the second uplink data to obtain the first uplink data.
3. The PLC system of claim 1 or 2,
the main device is also used for converting the IP address of the internet protocol of the main device in the local area network into the IP address of the main device in the wide area network;
the master device is specifically configured to send the first uplink data to the management server by using an IP address of the master device in a wide area network.
4. The PLC system of claim 1,
the master device is further configured to allocate an IP address of the slave device in the local area network to the slave device by using a dynamic host configuration protocol DHCP.
5. A method of transmitting data, comprising:
the method comprises the steps that a main power line communication PLC device receives first uplink data sent by a slave PLC device, the first uplink data are transmitted after the slave PLC device receives the first uplink data sent by the slave PLC device, the first uplink data are data sent to a management server by the slave device, the main PLC device provides a PLC interface for a main device, the slave PLC device provides a PLC interface for the slave device, and the main device and the slave device are located in the same local area network;
the master PLC equipment adds identification information of the slave PLC equipment in the first uplink data so as to package the first uplink data into second uplink data;
and the master PLC equipment sends the second uplink data to the master equipment, so that the master equipment decapsulates the second uplink data into the first uplink data and sends the first uplink data to the management server.
6. A method of transmitting data, comprising:
the method comprises the steps that a master device receives second uplink data sent by a master power line communication PLC device, the second uplink data are sent after the master PLC device receives first uplink data sent by a slave device through a slave PLC device and packages the first uplink data, the first uplink data are data sent to a management server by the slave device, the master PLC device provides a PLC interface for the master device, the slave PLC device provides a PLC interface for the slave device, and the master device and the slave device are located in the same local area network;
the main equipment decapsulates the second uplink data to obtain the first uplink data;
and the main equipment sends the first uplink data to the management server.
7. The method of claim 6, wherein the second uplink data comprises a Media Access Control (MAC) address of the slave device and identification information of the slave PLC device;
after the primary device decapsulates the second uplink data to obtain the first uplink data, the method further includes:
and the master device stores the mapping relation between the MAC address of the slave device and the identification information of the slave PLC device.
8. The method according to claim 6 or 7, characterized in that the method further comprises:
the main device converts the IP address of the main device in the local area network into the IP address of the main device in the wide area network;
the sending, by the master device, the first uplink data to the management server includes:
and the main equipment sends the first uplink data to the management server by adopting the IP address of the main equipment in a wide area network.
9. The method of claim 6, further comprising:
and the master equipment adopts a Dynamic Host Configuration Protocol (DHCP) to distribute the IP address of the slave equipment in the local area network for the slave equipment.
10. The PLC equipment for power line communication is characterized by being a main PLC equipment and comprising a receiving module, a packaging module and a sending module;
the receiving module is configured to receive first uplink data sent by a slave PLC device, where the first uplink data is forwarded after the slave PLC device receives the first uplink data sent by a slave device, the first uplink data is data sent by the slave device to a management server, the master PLC device provides a PLC interface for a master device, the slave PLC device provides a PLC interface for the slave device, and the master device and the slave device are located in the same local area network;
the encapsulation module is configured to add identification information of the slave PLC device to the first uplink data received by the reception module, so as to encapsulate the first uplink data into second uplink data;
the sending module is configured to send, to the master device, the second uplink data obtained by encapsulating, by the encapsulation module, the first uplink data, so that the master device decapsulates the second uplink data into the first uplink data and sends the first uplink data to the management server.
11. The equipment for transmitting data is characterized in that the equipment is main equipment and comprises a receiving module, an encapsulating module and a sending module;
the receiving module is configured to receive second uplink data sent by a master power line communication PLC device, where the second uplink data is sent after the master PLC device receives first uplink data sent by a slave PLC device via the slave PLC device and encapsulates the first uplink data, the first uplink data is data sent by the slave device to a management server, the master PLC device provides a PLC interface for the master device, the slave PLC device provides a PLC interface for the slave device, and the master device and the slave device are located in the same local area network;
the encapsulation module is configured to decapsulate the second uplink data received by the receiving module to obtain the first uplink data;
and the sending module is used for sending the first uplink data obtained by decapsulating the second uplink data by the decapsulating module to the management server.
12. The device according to claim 11, wherein the second uplink data includes a MAC address of the slave device and identification information of the slave PLC device, and the master device further includes a saving module;
the storage module is configured to store a mapping relationship between the MAC address of the slave device and the identification information of the slave PLC device after the encapsulation module decapsulates the second uplink data to obtain the first uplink data.
13. The device of claim 11 or 12, wherein the master device further comprises a conversion module;
the conversion module is used for converting the IP address of the internet protocol of the main equipment in the local area network into the IP address of the main equipment in the wide area network;
the sending module is specifically configured to send the first uplink data to the management server by using an IP address of the master device in a wide area network.
14. The device of claim 11, wherein the master device further comprises an assignment module;
the allocation module is configured to allocate, to the slave device, an IP address of the slave device in the local area network by using a dynamic host configuration protocol DHCP.
15. The PLC equipment is characterized in that the PLC equipment is a main PLC equipment and comprises a processor and a memory coupled with the processor;
the memory is configured to store computer instructions that, when executed by the PLC device, cause the PLC device to perform the method of transmitting data of claim 5.
16. A device for transmitting data, wherein the device is a master device, the device comprising a processor and a memory coupled to the processor;
the memory is configured to store computer instructions which, when executed by the processor, cause the apparatus to perform a method of transmitting data as claimed in any one of claims 6 to 9.
17. A computer readable storage medium comprising computer instructions which, when run on a master power line communication, PLC, device, cause the master PLC device to perform the method of transmitting data of claim 5.
18. A computer-readable storage medium comprising computer instructions which, when run on a master device, cause the master device to perform a method of transmitting data as claimed in any one of claims 6 to 9.
CN201710113838.5A 2017-02-28 2017-02-28 Method, device and system for transmitting data Active CN106993066B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710113838.5A CN106993066B (en) 2017-02-28 2017-02-28 Method, device and system for transmitting data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710113838.5A CN106993066B (en) 2017-02-28 2017-02-28 Method, device and system for transmitting data

Publications (2)

Publication Number Publication Date
CN106993066A CN106993066A (en) 2017-07-28
CN106993066B true CN106993066B (en) 2020-01-21

Family

ID=59413090

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710113838.5A Active CN106993066B (en) 2017-02-28 2017-02-28 Method, device and system for transmitting data

Country Status (1)

Country Link
CN (1) CN106993066B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107433876A (en) * 2017-08-16 2017-12-05 芜湖恒天易开软件科技股份有限公司 Programmable charging pile
CN110957770A (en) * 2018-09-27 2020-04-03 中兴通讯股份有限公司 Wireless charging method and system and computer readable storage medium
CN110989509B (en) * 2019-11-05 2022-02-08 深圳市圆梦精密技术研究院 Automatic control method and device for production line, terminal equipment and storage medium
CN111464990B (en) * 2020-03-31 2021-10-22 联想(北京)有限公司 Information processing method and first device
CN114077448A (en) * 2020-08-11 2022-02-22 深圳云天励飞技术股份有限公司 Data management method and related equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102143635A (en) * 2011-03-14 2011-08-03 江苏丰联物联网科技有限公司 Intelligent lighting internet-of-things system
CN102375437A (en) * 2010-08-06 2012-03-14 欧阳光明 Device and method for data acquisition and transmission during wireless production process based on IEEE802.15.4 protocol and PLCs (programmable logic controllers)
CN102904609A (en) * 2012-06-14 2013-01-30 中国科学技术大学 Networking method for integrated power line carrier communication network and topology network
CN103491017A (en) * 2012-06-12 2014-01-01 Ls产电株式会社 Method for configurating canopen network, method for operating slave device of canopen network and system for controlling plc device using canopen network
WO2015162754A1 (en) * 2014-04-24 2015-10-29 三菱電機株式会社 Control system, master station, and remote station
CN105516142A (en) * 2015-12-09 2016-04-20 梅照付 Mutual communication method in smart power system
CN105959288A (en) * 2016-05-27 2016-09-21 姹や寒 Network protocol conversion method for power grid system and intercommunication method of power grid system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102375437A (en) * 2010-08-06 2012-03-14 欧阳光明 Device and method for data acquisition and transmission during wireless production process based on IEEE802.15.4 protocol and PLCs (programmable logic controllers)
CN102143635A (en) * 2011-03-14 2011-08-03 江苏丰联物联网科技有限公司 Intelligent lighting internet-of-things system
CN103491017A (en) * 2012-06-12 2014-01-01 Ls产电株式会社 Method for configurating canopen network, method for operating slave device of canopen network and system for controlling plc device using canopen network
CN102904609A (en) * 2012-06-14 2013-01-30 中国科学技术大学 Networking method for integrated power line carrier communication network and topology network
WO2015162754A1 (en) * 2014-04-24 2015-10-29 三菱電機株式会社 Control system, master station, and remote station
CN105516142A (en) * 2015-12-09 2016-04-20 梅照付 Mutual communication method in smart power system
CN105959288A (en) * 2016-05-27 2016-09-21 姹や寒 Network protocol conversion method for power grid system and intercommunication method of power grid system

Also Published As

Publication number Publication date
CN106993066A (en) 2017-07-28

Similar Documents

Publication Publication Date Title
CN106993066B (en) Method, device and system for transmitting data
US11023282B2 (en) Method and apparatus for migrating virtual machine for improving mobile user experience
CN102763095B (en) Portable storage interface
RU2012130056A (en) VIRTUAL STORAGE APPOINTMENT UNLOADING TECHNOLOGICAL METHODS
CN104380277A (en) Method, system, and device for managing server hardware resources in a cloud scheduling environment
CN106664515B (en) Method for transmitting content between terminals via a service control device link
US20120042054A1 (en) System and Method for Virtual Switch Architecture to Enable Heterogeneous Network Interface Cards within a Server Domain
US20150127182A1 (en) Power management method, power management server, and office machine for managing electric power
CN103516547A (en) Network parameter distribution method and device
CN106203228A (en) Two-dimensional code information transmission method, device and equipment
CN106708554A (en) Program running method and device
CN109428839A (en) A kind of CDN dispatching method, equipment and system
CN108199962A (en) Address transfer method, apparatus, the network equipment and readable storage medium storing program for executing
CN109144723B (en) Method and terminal for allocating storage space
CN103324560B (en) A kind of flash memories method of testing and device
WO2015062400A1 (en) Method for managing video channel allocation, related device, and communications system
CN107809742A (en) Processing method, device, storage medium and the terminal of location information
JP2013520888A (en) Region-based communication service processing method and apparatus
CN104202422A (en) Wireless connecting system and wireless connecting method supporting internet-of-things access
IL272881B2 (en) Method and device for wireless communications
CN107463524A (en) A kind of method and relevant device for accessing data
US20190059103A1 (en) Control device and communication system
CN201780534U (en) Portable mobile terminal
CN109302669A (en) Setting method, device, storage medium and the electronic equipment of polling mechanism
KR102119160B1 (en) Method for generating of access controllr based of virtualization annd server thereof

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20211111

Address after: 518043 No. 01, 39th floor, building a, antuoshan headquarters building, No. 33, antuoshan Sixth Road, Xiang'an community, Xiangmihu street, Futian District, Shenzhen, Guangdong Province

Patentee after: Huawei Digital Energy Technology Co., Ltd

Address before: 518129 Huawei headquarters office building, Bantian, Longgang District, Shenzhen, Guangdong

Patentee before: Huawei Technology Co., Ltd