Field device network data transmission method and system
By obtaining device information in the field switch of Industrial Ethernet and performing privatized network configuration, the problem of poor data transmission of APL field equipment is solved, efficient network traffic management and device communication is achieved, and compatible with IPv4 and IPv6 protocols are improved, which improves network compatibility and scalability.
Patent Information
- Application Number
- CN202411838370.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-04-25
AI Technical Summary
In the existing industrial Ethernet technology, the data transmission effect of APL field devices is poor, especially in the data interception or error forwarding caused by different Layer 2 network isolation specifications of different control systems, as well as the compatibility issues of mixing IPv4 and IPv6 addresses.
By obtaining the LLDP information of the field device in the field switch, querying the device type table to obtain control system information and device identity information, privatized Layer 2 network configuration, determining the IP protocol type of the device, and performing corresponding data processing and forwarding according to different protocol types. For IPv6 devices, data proxy is performed through IPv6 network.
It significantly improves the data transmission effect of APL field devices, optimizes network traffic management and device communication efficiency, solves the compatibility problem between IPv4 and IPv6 protocols, ensures smooth data conversion and transmission between different protocols, and improves network compatibility and scalability.
Smart Images

Figure CN119892950A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of industrial Ethernet, and in particular to a method and system for transmitting data through a field device network. Background Art
[0002] Currently, industrial Ethernet technology has been widely used in process industry automation control systems. Ethernet Advanced Physical Layer (APL) allows field devices to be easily connected to industrial Ethernet. Among them, the IP protocols of industrial Ethernet include IPv6 and IPv4. The large scale and high reliability of IPv6 technology can meet the large-scale use needs of APL field devices in industrial Ethernet. However, traditional industrial Ethernet still widely uses field devices that only support IPv4, making it difficult to use control systems based on IPv6 technology.
[0003] In the prior art, the device information provided by the APL field device does not include the Layer 2 network configuration information under the current control system. Since different control systems have different Layer 2 network isolation specifications for industrial Ethernet at the field level, Ethernet data will be intercepted or incorrectly forwarded in the Layer 2 network when different APL field devices are connected to the same APL field switch; at the same time, for process industrial automation control systems that mix IPv4 and IPv6 addresses, a Layer 3 Ethernet switch is required for address conversion, which reduces data parsing efficiency and increases network latency. Summary of the invention
[0004] The problem solved by the present invention is how to improve the data transmission effect of APL field equipment.
[0005] In order to solve the above problems, the present invention provides a field device network data transmission method and system.
[0006] In a first aspect, the present invention provides a method for field device network data transmission, the method for field device network data transmission is applied to a field switch, the field switch is used to communicate with field devices and power switches to form an APL field network;
[0007] The field device network data transmission method comprises:
[0008] Acquire LLDP information of the field device, and query a device type table according to the LLDP information to obtain control system information and device identity information of the field device;
[0009] Performing a private layer 2 network configuration according to the control system information to obtain a layer 2 network rule corresponding to the communication port of the APL field network;
[0010] Determine the IP protocol type of the field device according to the device identity information, wherein the IP protocol type includes IPv6 and IPv4;
[0011] When the IP protocol type of the field device is the IPv6, sending the uploaded data of the field device to the power switch according to the layer 2 network rule;
[0012] When the IP protocol type of the field device is the IPv4, the uploaded data is proxied through the IPv6, and the uploaded data after the data proxied is sent to the power switch.
[0013] Optionally, querying a device type table according to the LLDP information to obtain control system information and device identity information of the field device includes:
[0014] Parsing the LLDP information to determine the MAC address and device management address of the field device, and using the MAC address and the device management address as device identification;
[0015] The device identification is used as a keyword to search in a preset device type table to determine the control system information and the device identity information of the field device.
[0016] Optionally, performing a privatized layer 2 network configuration according to the control system information to obtain a layer 2 network rule corresponding to the communication port of the APL field network includes:
[0017] Obtaining an initial Layer 2 network configuration, wherein the initial Layer 2 network configuration includes a configuration of a Trunk port and a configuration of a Spur port, the field switch is used to communicate and connect with the power switch through the Trunk port, and the field switch is used to communicate and connect with the field device through the Spur port;
[0018] Determining the network specification of the field device according to the control system information;
[0019] The configuration of the Trunk port and / or the Spur port of the initial Layer 2 network configuration is set according to the network specification to obtain the Layer 2 network rule corresponding to the communication port of the APL field network.
[0020] Optionally, the configuration of the Trunk port and / or the Spur port of the initial Layer 2 network configuration is set according to the network specification to obtain a Layer 2 network rule corresponding to the communication port of the APL field network, including:
[0021] Determine the data transmission type of the field device according to the network specification;
[0022] When the data upload type is multicast upload, control the Trunk port to start the shared VLAN learning mode, configure the multicast upload MAC address for the Trunk port and add the Trunk port to the ATU table of the shared VLAN learning mode;
[0023] When the data sending type is unicast sending, the initial layer 2 network configuration is used as the layer 2 network rule.
[0024] Optionally, the configuration of the Trunk port and / or the Spur port of the initial Layer 2 network configuration is set according to the network specification to obtain a Layer 2 network rule corresponding to the communication port of the APL field network, including:
[0025] Determine the data type of the LLDP information according to the network specification;
[0026] When the data type is VLAN tagged, all the Trunk ports and the Spur ports are added to the VTU table of the VLAN tag, wherein the mode of the Spur port is Tag and the mode of the Trunk port is Untag;
[0027] When the data type is a port isolation type without a VLAN tag, obtaining an available ID from a VLAN ID pool, allocating the available ID to the Spur port and the Trunk port, and controlling the Spur port and the Trunk port to enable a VLAN data proxy mode;
[0028] When the data type is a type without a VLAN tag and a port is not isolated, the initial layer 2 network configuration is used as the layer 2 network rule.
[0029] Optionally, the determining, according to the device identity information, an IP protocol type of the field device, wherein the IP protocol type includes IPv6 and IPv4, comprises:
[0030] Extract according to the device identity information to obtain the address management field of the LLDP information;
[0031] Determining the address of the LLDP information according to the address management field;
[0032] When the address of the LLDP information is IPv6, determining that the IP protocol type of the field device is IPv6;
[0033] When the address of the LLDP information is IPv4, it is determined that the IP protocol type of the field device is IPv4.
[0034] Optionally, when the IP protocol type of the field device is IPv6, sending the uploaded data of the field device to the power switch according to the layer 2 network rule includes:
[0035] When the IP protocol type of the field device is the IPv6, determining whether the field device is offline;
[0036] If the field device is not offline, when the upload data of the field device is received, the upload data is sent to the power switch according to the layer 2 network rule.
[0037] Optionally, determining whether the field device is offline includes:
[0038] Obtaining a preset extinction duration of the LLDP information of the field device;
[0039] When the LLDP information of the field device is not received within the preset extinction time, determining that the field device is offline;
[0040] When the LLDP information of the field device is received within the preset extinction time, it is determined that the field device is online.
[0041] Optionally, when the IP protocol type of the field device is IPv4, performing data proxy on the uploaded data through IPv6, and sending the uploaded data after data proxy to the power switch, comprises:
[0042] When the IP protocol type of the field device is the IPv4, generating a proxy IPv6 address according to the MAC address of the field device in combination with an IEEE EUI-64 address;
[0043] When the upload data is received, the Ethernet header and the IP header in the upload data are removed to obtain the upload data after data proxy;
[0044] The uploaded data after data proxy is sent to the power switch through the proxy IPv6 address.
[0045] In a second aspect, the present invention provides a field device network data transmission system, the field device network data transmission system is applied to a field switch, the field switch is used to communicate with the field device and the power switch to form an APL field network;
[0046] The field device network data transmission system comprises:
[0047] An LLDP information parsing unit, used to obtain the LLDP information of the field device, and query the device type table according to the LLDP information to obtain the control system information and device identity information of the field device;
[0048] A layer 2 network configuration unit, used to perform a private layer 2 network configuration according to the control system information, and obtain a layer 2 network rule corresponding to the communication port of the APL field network;
[0049] An IP protocol type determination unit is used to determine the IP protocol type of the field device according to the device identity information, wherein the IP protocol type includes IPv6 and IPv4;
[0050] A transmission unit is used to send the uploaded data of the field device to the power switch according to the second-layer network rules when the IP protocol type of the field device is the IPv6; when the IP protocol type of the field device is the IPv4, perform data proxy on the uploaded data through the IPv6, and send the uploaded data after data proxy to the power switch.
[0051] The field device network data transmission method and system of the present invention obtains the LLDP information of the field device through the field switch, queries the device type table according to the LLDP information, obtains the control system information and device identity information of the field device, and then performs a private two-layer network configuration according to the control system information, so that each field device can obtain a customized network configuration according to its specific control system requirements, thereby optimizing network traffic management and device communication efficiency. The IP protocol type of the field device is determined according to the device identity information, which facilitates subsequent different data processing for different IP protocol types to meet the communication needs of different devices, regardless of whether the device uses the old IPv4 protocol or the new IPv6 protocol. Among them, for IPv6 devices, data is directly sent to the power switch according to the two-layer network rules. This method simplifies the data forwarding process, reduces delays, and improves transmission efficiency. For IPv4 devices, data proxy is performed through the IPv6 network, which solves the compatibility problem between IPv4 devices and IPv6 networks, enables IPv4 devices to access the IPv6 network, and ensures that data can be smoothly converted and transmitted between different protocols. The present invention significantly improves the data transmission effect of APL field equipment through steps such as accurate identification of device information, customized network configuration, flexible processing of IP protocol types, and efficient data forwarding, ensuring high efficiency and high reliability of the network. It can not only support existing IPv4 devices, but also adapt to possible IPv6 devices in the future, improve the compatibility and scalability of the network, and reduce the cost and complexity of future network upgrades. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 It is a flowchart of a method for transmitting data over a network of field devices in one embodiment of the present invention;
[0053] Figure 2 A schematic diagram of the structure of an APL field network in another embodiment of the present invention;
[0054] Figure 3 A schematic diagram of a flow chart of a data transmission method in another embodiment of the present invention;
[0055] Figure 4 This is one of the flowcharts of data proxy in another embodiment of the present invention;
[0056] Figure 5 This is a second flow chart of a data proxy in another embodiment of the present invention;
[0057] Figure 6 It is a structural schematic diagram of a field device network data transmission system in another embodiment of the present invention. DETAILED DESCRIPTION
[0058] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. Although certain embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be interpreted as being limited to the embodiments described herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present invention. It should be understood that the drawings and embodiments of the present invention are only for exemplary purposes and are not intended to limit the scope of protection of the present invention.
[0059] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.
[0060] The term "including" and its variations used in this document are open inclusions, that is, "including but not limited to"; the term "based on" means "based at least in part on"; the term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments"; the term "optionally" means "optional embodiments". The relevant definitions of other terms will be given in the following description. It should be noted that the concepts of "first", "second", etc. mentioned in the present invention are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0061] It should be noted that the modifications of "one" and "plurality" mentioned in the present invention are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0062] The names of the messages or information exchanged between multiple devices in the embodiments of the present invention are only used for illustrative purposes, and are not used to limit the scope of these messages or information.
[0063] In the related technology, the emergence of APL (Advanced Physical Layer) has changed the connection mode of field equipment in process industries, making it easy for field equipment to be connected to industrial Ethernet. It also allows Ethernet protocols to be used directly at the field level, greatly facilitating on-site equipment management and data communication. At present, industrial Ethernet technology has been applied to process industry automation control systems. Compared with the previous fieldbus technology, it can meet the different requirements for device connection topology under different control systems. The large scale and high reliability of IPv6 technology can meet the large-scale use needs of APL field equipment in the current industrial Ethernet. However, traditional industrial Ethernet is still widely used in field devices that only support IPv4, making it difficult to use control systems based on IPv6 technology. In the prior art, the device information provided by APL field devices does not contain the Layer 2 network configuration information under the current control system. Different control systems have different Layer 2 network isolation specifications for industrial Ethernet at the field level, which will result in Ethernet data being intercepted or incorrectly forwarded in the Layer 2 network when different APL field devices are connected to the same APL field switch. At the same time, for scenarios where IPv4 and IPv6 addresses are mixed, in order to enable IPv4 devices to access the IPv6 network, it is necessary to use an additional Layer 3 Ethernet switch at the upper level of the APL field switch to achieve address conversion. At the same time, tunneling technology requires the target node to parse the data frame twice, and the parsing efficiency is low; NAT technology requires a set of IPv6 to IPv4 IP mapping relationships, and the conversion device needs to obtain the device's IPv4 and IPv6 addresses from the controller first, which introduces network delays in the system; and dual stack technology is not applicable to scenarios where IPv4 and IPv6 addresses are mixed.
[0064] In view of the problems existing in the above-mentioned related technologies, this embodiment provides a method and system for transmitting network data of a field device.
[0065] like Figure 1 As shown, an embodiment of the present invention provides a field device network data transmission method, which is applied to a field switch, and the field switch is used to communicate with the field device and the power switch to form an APL field network.
[0066] Specifically, combined Figure 2 As shown, the field devices, field switches and power switches belong to the APL field network, and they all use APL two-wire Ethernet for data communication. The Trunk port of the power switch is connected to the Trunk port of the field switch, which is used to aggregate data and send it up and control the communication between the field devices. The Spur port of the field switch is connected to the field device, and the field switch is responsible for exchanging data between the Trunk port and the Spur port.
[0067] The field device network data transmission method comprises:
[0068] The LLDP information of the field device is obtained, and a device type table is queried according to the LLDP information to obtain control system information and device identity information of the field device.
[0069] Specifically, in the field device network data transmission method, the LLDP information (Link Layer Discovery Protocol) of the field device is first obtained through the field switch. LLDP information is a link layer protocol used to transmit identification and configuration information between network devices. This step allows the field switch to collect detailed information of the field devices connected to the network, including MAC addresses, port information, etc., to provide basic data for subsequent network management and configuration. In a preferred embodiment of the present invention, the APL field switch receives the LLDP information of the APL field device and saves it to the local storage area, ensuring that the network management system can grasp the first-hand information of the device. After obtaining the LLDP information, the next step is to query the device type table based on this information to obtain the control system information and device identity information of the field device. The device type table may contain information such as the manufacturer, model, and function of the device, so that the network can identify and distinguish different types of devices, and perform appropriate network configuration according to their characteristics, thereby optimizing network performance and device communication efficiency.
[0070] A private layer 2 network configuration is performed according to the control system information to obtain a layer 2 network rule corresponding to the communication port of the APL field network.
[0071] Specifically, based on the control system information obtained from the LLDP information and device type table, the field switch will perform private Layer 2 network configuration, assign VLANs to different devices or device groups, set port modes, and other operations to ensure the reasonable distribution and management of network traffic. This customized network configuration helps improve network security and efficiency, especially in complex industrial automation environments where different control systems may have different network isolation and communication requirements.
[0072] The IP protocol type of the field device is determined according to the device identity information, wherein the IP protocol type includes IPv6 and IPv4.
[0073] Specifically, after determining the control system information of the device, the IP protocol type of the field device is determined according to the device identity information, that is, whether the device uses IPv4 or IPv6. This step is crucial for subsequent data transmission. Since different IP protocols may require different processing and forwarding strategies, in a preferred embodiment of the present invention, corresponding network configuration and data forwarding are performed according to the data tag (VLAN_ID) sent by the device.
[0074] When the IP protocol type of the field device is the IPv6, the upload data of the field device is sent to the power switch according to the layer 2 network rule.
[0075] Specifically, for field devices using IPv6, the field switch will directly send the device's upload data to the power switch according to the previously configured Layer 2 network rules. This direct transmission method simplifies the data forwarding process, reduces latency, and improves transmission efficiency.
[0076] When the IP protocol type of the field device is the IPv4, the uploaded data is proxied through the IPv6, and the uploaded data after the data proxied is sent to the power switch.
[0077] Specifically, for field devices using IPv4, due to possible compatibility issues with IPv6 networks, field switches will proxy the uploaded data via IPv6. This means that IPv4 packets will be converted into IPv6 packets for transmission in the IPv6 network. This proxy mechanism ensures that IPv4 devices can seamlessly access the IPv6 network, maintaining the compatibility and scalability of the network, while reducing the overhead of additional equipment and improving the compatibility of field switches with field devices.
[0078] In summary, combined with Figure 3As shown, it first involves obtaining the LLDP information of the field device through the field switch, allowing the network to identify and record the connected device information. Next, the device type table is queried based on the LLDP information to determine the control system information and device identity information of the field device. Subsequently, based on the control system information, the system performs a private layer 2 network configuration and sets the corresponding layer 2 network rules for the communication port of the field network. Among them, this configuration process includes the setting of the Trunk port and the Spur port to adapt to the network specifications of different control systems. Next, the system determines the IP protocol type of the field device based on the device identity information, including supporting both IPv6 and IPv4 protocols. For IPv6 field devices, the field switch will directly forward data to the power switch according to the layer 2 network rules. For IPv4 field devices, data proxy is performed through the IPv6 network to ensure that the data can be forwarded correctly. In addition, the system will monitor the online status of the device, determine whether the device is offline based on the extinction time of the LLDP information, and update the network configuration accordingly.
[0079] The field device network data transmission method of the present invention obtains the LLDP information of the field device through the field switch, queries the device type table according to the LLDP information, obtains the control system information and device identity information of the field device, and then performs a private two-layer network configuration according to the control system information, so that each field device can obtain a customized network configuration according to its specific control system requirements, thereby optimizing network traffic management and device communication efficiency. The IP protocol type of the field device is determined according to the device identity information, which facilitates subsequent different data processing for different IP protocol types to adapt to the communication needs of different devices, regardless of whether the device uses the old IPv4 protocol or the new IPv6 protocol. Among them, for IPv6 devices, data is directly sent to the power switch according to the two-layer network rules. This method simplifies the data forwarding process, reduces delays, and improves transmission efficiency. For IPv4 devices, data proxy is performed through the IPv6 network, which solves the compatibility problem between IPv4 devices and IPv6 networks, enables IPv4 devices to access the IPv6 network, and ensures that data can be smoothly converted and transmitted between different protocols. The present invention significantly improves the data transmission effect of APL field equipment through steps such as accurate identification of device information, customized network configuration, flexible processing of IP protocol types, and efficient data forwarding, ensuring high efficiency and high reliability of the network. It can not only support existing IPv4 devices, but also adapt to possible IPv6 devices in the future, improve the compatibility and scalability of the network, and reduce the cost and complexity of future network upgrades.
[0080] Optionally, querying a device type table according to the LLDP information to obtain control system information and device identity information of the field device includes:
[0081] Parsing the LLDP information to determine the MAC address and device management address of the field device, and using the MAC address and the device management address as device identification;
[0082] The device identification is used as a keyword to search in a preset device type table to determine the control system information and the device identity information of the field device.
[0083] Specifically, firstly, the MAC address and device management address of the field device are obtained by parsing the LLDP information, and these two information together constitute the device identification. The LLDP information contains the MAC address of the device, which is the unique identifier of the field device in the network, and the device management address provides the IP address information of the device, which is the key to identifying and locating the device for the network management system. Then, using this device identification as a keyword, query in the preset device type table to determine the control system information and device identity information of the field device. In a preferred embodiment of the present invention, the APL field switch has an LLDP receiving function, which can receive the LLDP information of the APL field device and save it to the local storage area. After obtaining the LLDP information, the APL field switch queries the device type table to parse the device identity information and the access control system information of the APL field device, ensuring that the network management system can perform corresponding network configuration according to the specific type of the device and the control system requirements.
[0084] In the embodiment of the present invention, by querying the device type table according to the LLDP information, the control system information and device identity information of the field device are obtained, so that the network management system can accurately identify and classify the devices in the network, thereby providing customized network configuration for each device or device group, and enhancing the adaptability of the network to different devices and control systems. In this way, data traffic is processed more intelligently, resource allocation is optimized, and potential network conflicts are reduced.
[0085] Optionally, performing a privatized layer 2 network configuration according to the control system information to obtain a layer 2 network rule corresponding to the communication port of the APL field network includes:
[0086] Obtaining an initial Layer 2 network configuration, wherein the initial Layer 2 network configuration includes a configuration of a Trunk port and a configuration of a Spur port, the field switch is used to communicate and connect with the power switch through the Trunk port, and the field switch is used to communicate and connect with the field device through the Spur port;
[0087] Determining the network specification of the field device according to the control system information;
[0088] The configuration of the Trunk port and / or the Spur port of the initial Layer 2 network configuration is set according to the network specification to obtain the Layer 2 network rule corresponding to the communication port of the APL field network.
[0089] Specifically, first obtain the initial Layer 2 network configuration, which includes the basic settings of the Trunk port and the Spur port. The Trunk port is responsible for aggregating and transmitting the data of multiple Spur ports to the upper-level device, while the Spur port is directly connected to the field device. This initial configuration provides the basis for subsequent customized configuration. Then, based on the control system information parsed from the LLDP information, determine the network specifications of the field devices. These specifications include the specific requirements of different control systems for network isolation and data transmission. Finally, based on these network specifications, adjust the initial configuration of the Trunk port and the Spur port to adapt to the specific needs of different control systems, thereby forming the Layer 2 network rules corresponding to the APL field network communication port.
[0090] In the embodiments of the present invention, through customized Layer 2 network configuration, the network can more effectively manage data flow, reduce unnecessary network congestion, improve the efficiency and reliability of data transmission, and enable the APL field network to flexibly adapt to the network specifications of different control systems, thereby ensuring the efficiency and adaptability of the network configuration.
[0091] Optionally, the configuration of the Trunk port and / or the Spur port of the initial Layer 2 network configuration is set according to the network specification to obtain a Layer 2 network rule corresponding to the communication port of the APL field network, including:
[0092] Determine the data transmission type of the field device according to the network specification;
[0093] When the data upload type is multicast upload, control the Trunk port to start the shared VLAN learning mode, configure the multicast upload MAC address for the Trunk port and add the Trunk port to the ATU table of the shared VLAN learning mode;
[0094] When the data sending type is unicast sending, the initial layer 2 network configuration is used as the layer 2 network rule.
[0095] Specifically, the network specification is used to determine the data upload type of the field device, which is to ensure that the data can be effectively transmitted according to the specific network requirements. If the data upload type is determined to be multicast upload, it means that multiple devices need to receive the same data stream. In this case, the Trunk port is configured to enable the shared VLAN learning (SVL) mode, which is a mechanism that allows data forwarding between different VLANs. At the same time, the multicast upload MAC address is configured for the Trunk port, and it is added to the ATU table of the SVL mode to correctly process and forward multicast traffic. In an embodiment of the present invention, for the data multicast upload type, the port and the Trunk port enable the SVL mode, and configure the data multicast upload MAC address, and add it to the ATU table of the SVL. For the data unicast upload type, the original configuration is maintained.
[0096] In the embodiment of the present invention, by enabling the SVL mode and configuring the multicast uploading MAC address, the network can reduce unnecessary data duplication, save bandwidth, and ensure that all devices that need to receive multicast data can obtain correct information. This method improves the efficiency of the network, reduces data transmission errors caused by improper configuration, and enhances the adaptability of the network to different transmission requirements.
[0097] Optionally, the configuration of the Trunk port and / or the Spur port of the initial Layer 2 network configuration is set according to the network specification to obtain a Layer 2 network rule corresponding to the communication port of the APL field network, including:
[0098] Determine the data type of the LLDP information according to the network specification;
[0099] When the data type is VLAN tagged, all the Trunk ports and the Spur ports are added to the VTU table of the VLAN tag, wherein the mode of the Spur port is Tag and the mode of the Trunk port is Untag;
[0100] When the data type is a port isolation type without a VLAN tag, obtaining an available ID from a VLAN ID pool, allocating the available ID to the Spur port and the Trunk port, and controlling the Spur port and the Trunk port to enable a VLAN data proxy mode;
[0101] When the data type is a type without a VLAN tag and a port is not isolated, the initial layer 2 network configuration is used as the layer 2 network rule.
[0102] Specifically, during the configuration of the APL field network, the network specification is used to determine the data type in the LLDP information to ensure that the data transmission meets the requirements of the network. If the data type is identified as having a VLAN tag, this means that the data needs to be isolated and forwarded at the VLAN level. In this case, all Trunk ports and Spur ports connected to the field devices will be added to the VTU table of the corresponding VLAN tag, the Spur port is set to Tag mode, and the Trunk port is set to Untag mode. This configuration allows data to be correctly transmitted between different network segments while maintaining VLAN information. For situations where there is no VLAN tag but port isolation is required, the system will obtain an available ID from the VLAN ID pool and assign it to the Spur port and Trunk port, and turn on the VLAN data proxy mode to ensure that data is transmitted in an isolated network environment. For situations where there is no VLAN tag and port isolation is not required, the initial Layer 2 network configuration is directly used as the Layer 2 network rule.
[0103] In a preferred embodiment of the present invention, for data with VLAN tag type, if the field device sends data with VLAN tag of VLAN_ID_A, the Spur port and all Trunk ports connected to the device are added to the VTU table of the VLAN, the Spur port mode is Tag, and the Trunk port mode is Untag; if the field device sends data with multiple VLAN tags, which means that there is network isolation between the data sent through the redundant Trunk ports, then for each VLAN, the Spur port and the corresponding redundant Trunk port are added to the VTU table of the VLAN, the Spur port mode is Tag, and the Trunk port mode is Untag. Then the port mode of the Spur port and the Trunk port is changed to Hybrid. For data without VLAN tags and port isolation type, obtain the available VLAN ID from the allocable VLAN ID pool and configure the port VLAN of the Spur port to be the VLAN ID; the port opens the VLAN data proxy, and the APL field switch will add the VLAN ID Tag of the Trunk port after receiving the data from the port, and the data packet will be forwarded to the Trunk port; after the APL field switch receives the data sent from the Trunk port to the port, it will add the VLAN ID Tag of the Spur port, and the data packet will be forwarded to the Spur port. For data without VLAN tags and non-isolated ports, keep the original configuration.
[0104] In the embodiment of the present invention, by dynamically adjusting the VLAN settings according to the data type in the LLDP information, the network can more accurately control the data flow, reduce unnecessary network congestion, and improve the security of data transmission. Enabling the VLAN data proxy mode further enhances the flexibility of the network, allowing the network to provide necessary support for communication between different VLANs while maintaining data isolation.
[0105] Optionally, the determining, according to the device identity information, an IP protocol type of the field device, wherein the IP protocol type includes IPv6 and IPv4, comprises:
[0106] Extract according to the device identity information to obtain the address management field of the LLDP information;
[0107] Determining the address of the LLDP information according to the address management field;
[0108] When the address of the LLDP information is IPv6, determining that the IP protocol type of the field device is IPv6;
[0109] When the address of the LLDP information is IPv4, it is determined that the IP protocol type of the field device is IPv4.
[0110] Specifically, firstly, the address management field in the LLDP information is extracted according to the device identity information. This field contains the network address information of the device and is the key to identifying the network communication protocol of the device. Subsequently, the specific address of the LLDP information is determined according to the address management field. If the address is an IPv6 address, the IP protocol type of the field device is determined to be IPv6; if it is an IPv4 address, it is determined to be IPv4. In a preferred embodiment of the present invention, it is possible to determine whether the device is an IPv4 device according to the Management Address Subtype field in the device LLDP information, and then determine the processing method of the network data packet.
[0111] In an embodiment of the present invention, by accurately identifying the IPv4 or IPv6 address of the device, the network can provide appropriate communication support for devices of different protocol types, ensuring that data packets can be correctly transmitted and processed in the network, improving the compatibility and flexibility of the network, enabling the network to adapt to the communication needs of different devices, while optimizing the use of network resources and reducing communication delays and errors caused by protocol mismatches.
[0112] Optionally, when the IP protocol type of the field device is IPv6, sending the uploaded data of the field device to the power switch according to the layer 2 network rule includes:
[0113] When the IP protocol type of the field device is the IPv6, determining whether the field device is offline;
[0114] If the field device is not offline, when the upload data of the field device is received, the upload data is sent to the power switch according to the layer 2 network rule.
[0115] Specifically, after the IP protocol type of the field device is determined to be IPv6, the network communication management method requires first determining whether the device is online. Based on the characteristics of the LLDP protocol, LLDP can periodically send information to confirm the online status of the device. If the field device is not offline, that is, within the valid time of the LLDP information, the field switch will receive the uploaded data from the device, and according to the Layer 2 network rules previously configured according to the control system information, these data will be correctly forwarded to the power switch. If the field device is offline, the Layer 2 network configuration is reinitialized. This process ensures that the data of the IPv6 device can be efficiently and accurately transmitted to the target location according to the configuration requirements of the network. In a preferred embodiment of the present invention, the APL field switch receives the LLDP information of the APL field device and saves it to the local storage area, and records the extinction time of the device LLDP.
[0116] In the embodiment of the present invention, by first confirming the online status of the device, data is avoided from being sent to the offline device, thereby reducing the waste of network resources and improving the success rate of data transmission. At the same time, data packets are forwarded according to the second-layer network rules, ensuring that the data flow follows the best path of the network, reducing transmission delays and enhancing the response speed of the network.
[0117] Optionally, determining whether the field device is offline includes:
[0118] Obtaining a preset extinction duration of the LLDP information of the field device;
[0119] When the LLDP information of the field device is not received within the preset extinction time, determining that the field device is offline;
[0120] When the LLDP information of the field device is received within the preset extinction time, it is determined that the field device is online.
[0121] Specifically, in the field device network data transmission method, the determination of whether the device is offline is achieved through the preset extinction time of the LLDP information. The LLDP protocol allows devices to send information periodically to maintain the perception of the network, and the preset extinction time refers to the time window in which the device is considered to be online after the last LLDP information is received. If no new LLDP information is received within the time window, the system determines that the device is offline; conversely, if LLDP information is received within this time, the device is considered to be still online, ensuring that the network management system can update the online status of the device in real time.
[0122] In the embodiment of the present invention, through the mechanism of presetting the extinction time, the network management system can timely identify the state change of the device, thereby reducing the communication interruption and data loss caused by the device being offline.
[0123] Optionally, when the IP protocol type of the field device is IPv4, performing data proxy on the uploaded data through IPv6, and sending the uploaded data after data proxy to the power switch, comprises:
[0124] When the IP protocol type of the field device is the IPv4, generating a proxy IPv6 address according to the MAC address of the field device in combination with an IEEE EUI-64 address;
[0125] When the upload data is received, the Ethernet header and the IP header in the upload data are removed to obtain the upload data after data proxy;
[0126] The uploaded data after data proxy is sent to the power switch through the proxy IPv6 address.
[0127] Specifically, when the IP protocol type of the field device is determined to be IPv4, the management method of the APL field network involves using the IPv6 network to proxy these IPv4 data. This process first creates a proxy IPv6 address based on the MAC address of the field device and follows the IEEE EUI-64 address generation rules. The IEEE EUI-64 rule is a method for converting MAC addresses to IPv6 addresses, ensuring the uniqueness and compatibility of the address. Subsequently, when the field switch receives uploaded data from the IPv4 device, the Ethernet header and IP header of these data packets are removed in order to convert the IPv4 data packets into a format that can be transmitted over the IPv6 network. Finally, the converted data is sent to the power switch via the proxy IPv6 address, thereby realizing the transmission of IPv4 data in the IPv6 network.
[0128] In a preferred embodiment of the present invention, Figure 4 and Figure 5 As shown, first obtain the LLDP information of the field device from the local storage area, obtain the MAC address of the device from the Chasis ID field, generate the proxy IPv6 address according to the MAC address and the IEEE EUI-64 address standard, and use it for IPv6 communication with the upper-level device; then obtain the IP address of the device from the Management Address field, and generate the proxy IPv4 address according to the network segment of the IPv4 address, and use it for communication with the field device. When the Trunk port of the field switch receives a data packet sent to a non-proxy IPv6 address, it directly forwards the data packet to the corresponding Spur port. When the Trunk port of the field switch receives a UDP message (User Datagram Protocol) sent to the proxy IPv6 address, it removes the Ethernet header and IP header in the data packet, and then sends it to the field device through the proxy IPv4 address. When the Trunk port of the field switch receives other data packets sent to the proxy IPv6 address, such as ICMPv6 and DHCPv6, it will directly process and return the packet in the IPv6 protocol stack. When the Spur port of the field switch receives a UDP packet with an IPv4 address of a field device, it removes the Ethernet header and IP header from the packet and sends it to the upper-level device through the proxy IPv6 address. When the Spur port of the field switch receives other IPv4 packets from field devices, it processes them directly in the IPv4 protocol stack.
[0129] In the embodiments of the present invention, through the proxy mechanism, the network can maintain compatibility with old devices while taking advantage of the advantages of IPv6 networks, such as larger address space and better security, so that IPv4 devices can be seamlessly integrated into the IPv6-dominated network environment without the need for expensive hardware upgrades or replacements of existing devices.
[0130] Combination Figure 6 As shown, the present invention also provides a field device network data transmission system, the field device network data transmission system is applied to a field switch, the field switch is used to communicate with the field device and the power switch to form an APL field network;
[0131] The field device network data transmission system comprises:
[0132] An LLDP information parsing unit, used to obtain the LLDP information of the field device, and query the device type table according to the LLDP information to obtain the control system information and device identity information of the field device;
[0133] A layer 2 network configuration unit, used to perform a private layer 2 network configuration according to the control system information, and obtain a layer 2 network rule corresponding to the communication port of the APL field network;
[0134] An IP protocol type determination unit is used to determine the IP protocol type of the field device according to the device identity information, wherein the IP protocol type includes IPv6 and IPv4;
[0135] A transmission unit is used to send the uploaded data of the field device to the power switch according to the second-layer network rules when the IP protocol type of the field device is the IPv6; when the IP protocol type of the field device is the IPv4, perform data proxy on the uploaded data through the IPv6, and send the uploaded data after data proxy to the power switch.
[0136] The field device network data transmission system of the present invention obtains the LLDP information of the field device through the field switch, queries the device type table according to the LLDP information, obtains the control system information and device identity information of the field device, and then performs a private two-layer network configuration according to the control system information, so that each field device can obtain a customized network configuration according to its specific control system requirements, thereby optimizing network traffic management and device communication efficiency. The IP protocol type of the field device is determined according to the device identity information, which facilitates the subsequent different data processing for different IP protocol types to meet the communication needs of different devices, regardless of whether the device uses the old IPv4 protocol or the new IPv6 protocol. Among them, for IPv6 devices, data is directly sent to the power switch according to the two-layer network rules. This method simplifies the data forwarding process, reduces delays, and improves transmission efficiency. For IPv4 devices, data proxy is performed through the IPv6 network, which solves the compatibility problem between IPv4 devices and IPv6 networks, enables IPv4 devices to access the IPv6 network, and ensures that data can be smoothly converted and transmitted between different protocols. The present invention significantly improves the data transmission effect of APL field equipment through steps such as accurate identification of device information, customized network configuration, flexible processing of IP protocol types, and efficient data forwarding, ensuring high efficiency and high reliability of the network. It can not only support existing IPv4 devices, but also adapt to possible IPv6 devices in the future, improve the compatibility and scalability of the network, and reduce the cost and complexity of future network upgrades.
[0137] Optionally, the LLDP information parsing unit is also used to parse the LLDP information, determine the MAC address and device management address of the field device, and use the MAC address and the device management address as the device identifier; use the device identifier as a keyword to query in a preset device type table to determine the control system information and the device identity information of the field device.
[0138] Optionally, the Layer 2 network configuration unit is also used to obtain an initial Layer 2 network configuration, wherein the initial Layer 2 network configuration includes a configuration of a Trunk port and a configuration of a Spur port, the field switch is used to communicate and connect with the power switch through the Trunk port, and the field switch is used to communicate and connect with the field device through the Spur port; determine the network specifications of the field device according to the control system information; set the configuration of the Trunk port and / or the Spur port of the initial Layer 2 network configuration according to the network specifications, and obtain the Layer 2 network rules corresponding to the communication port of the APL field network.
[0139] Optionally, the Layer 2 network configuration unit is also used to determine the data upload type of the field device according to the network specification; when the data upload type is multicast upload, control the Trunk port to start the shared VLAN learning mode, configure the multicast upload MAC address for the Trunk port and add the Trunk port to the ATU table of the shared VLAN learning mode; when the data upload type is unicast upload, use the initial Layer 2 network configuration as the Layer 2 network rule.
[0140] Optionally, the Layer 2 network configuration unit is also used to determine the data type of the LLDP information according to the network specification; when the data type is with a VLAN tag, all the Trunk ports and the Spur ports are added to the VTU table of the VLAN tag, wherein the mode of the Spur port is Tag and the mode of the Trunk port is Untag; when the data type is without a VLAN tag and a port isolation type, an available ID is obtained from a VLAN ID pool, the available ID is assigned to the Spur port and the Trunk port, and the Spur port and the Trunk port are controlled to start the VLAN data proxy mode; when the data type is without a VLAN tag and the port is not isolated, the initial Layer 2 network configuration is used as the Layer 2 network rule.
[0141] Optionally, the IP protocol type judgment unit is also used to extract according to the device identity information to obtain the address management field of the LLDP information; determine the address of the LLDP information according to the address management field; when the address of the LLDP information is IPv6, determine that the IP protocol type of the field device is IPv6; when the address of the LLDP information is IPv4, determine that the IP protocol type of the field device is IPv4.
[0142] Optionally, the transmission unit is also used to determine whether the field device is offline when the IP protocol type of the field device is IPv6; if the field device is not offline, when the uploaded data of the field device is received, the uploaded data is sent to the power switch according to the Layer 2 network rules.
[0143] Optionally, the transmission unit is also used to obtain a preset extinction time of the LLDP information of the field device; when the LLDP information of the field device is not received within the preset extinction time, the field device is determined to be offline; when the LLDP information of the field device is received within the preset extinction time, the field device is determined to be online.
[0144] Optionally, the transmission unit is also used to generate a proxy IPv6 address according to the MAC address of the field device in combination with the IEEE EUI-64 address when the IP protocol type of the field device is the IPv4; when receiving the uploaded data, remove the Ethernet header and IP header in the uploaded data to obtain the uploaded data after data proxy; and send the uploaded data after data proxy to the power switch through the proxy IPv6 address.
[0145] The present invention also provides a field switch, comprising a memory and a processor; the memory is used to store a computer program, and the processor is used to implement the field device network data transmission method as described above when executing the computer program.
[0146] In other words, a field switch includes a memory and a processor coupled to the memory; the memory is configured to store a computer program; and the processor is configured to perform the following operations when executing the computer program:
[0147] Acquire LLDP information of the field device, and query a device type table according to the LLDP information to obtain control system information and device identity information of the field device;
[0148] Performing a private layer 2 network configuration according to the control system information to obtain a layer 2 network rule corresponding to the communication port of the APL field network;
[0149] Determine the IP protocol type of the field device according to the device identity information, wherein the IP protocol type includes IPv6 and IPv4;
[0150] When the IP protocol type of the field device is the IPv6, sending the uploaded data of the field device to the power switch according to the layer 2 network rule;
[0151] When the IP protocol type of the field device is the IPv4, the uploaded data is proxied through the IPv6, and the uploaded data after the data proxied is sent to the power switch.
[0152] An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the field device network data transmission method as described above is implemented.
[0153] In other words, a non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor performs the following operations:
[0154] Acquire LLDP information of the field device, and query a device type table according to the LLDP information to obtain control system information and device identity information of the field device;
[0155] Performing a private layer 2 network configuration according to the control system information to obtain a layer 2 network rule corresponding to the communication port of the APL field network;
[0156] Determine the IP protocol type of the field device according to the device identity information, wherein the IP protocol type includes IPv6 and IPv4;
[0157] When the IP protocol type of the field device is the IPv6, sending the uploaded data of the field device to the power switch according to the layer 2 network rule;
[0158] When the IP protocol type of the field device is the IPv4, the uploaded data is proxied through the IPv6, and the uploaded data after the data proxied is sent to the power switch.
[0159] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc. In the present application, the unit described as a separate component may or may not be physically separated, and the component displayed as a unit may or may not be a physical unit, that is, it may be located in one place, or it may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment of the present invention. In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0160] Although the present invention is disclosed as above, the protection scope of the present invention is not limited thereto. Those skilled in the art may make various changes and modifications without departing from the spirit and scope of the present invention, and these changes and modifications will fall within the protection scope of the present invention.
Claims
1. A method for transmitting data over a field device network, characterized in that: The field device network data transmission method is applied to a field switch, and the field switch is used to communicate with the field device and the power switch to form an APL field network; The field device network data transmission method comprises: Acquire LLDP information of the field device, and query a device type table according to the LLDP information to obtain control system information and device identity information of the field device; Performing a private layer 2 network configuration according to the control system information to obtain a layer 2 network rule corresponding to the communication port of the APL field network; Determine the IP protocol type of the field device according to the device identity information, wherein the IP protocol type includes IPv6 and IPv4; When the IP protocol type of the field device is the IPv6, sending the uploaded data of the field device to the power switch according to the layer 2 network rule; When the IP protocol type of the field device is the IPv4, the uploaded data is proxied through the IPv6, and the uploaded data after the data proxied is sent to the power switch.
2. The field device network data transmission method according to claim 1, characterized in that: The querying of the device type table according to the LLDP information to obtain the control system information and device identity information of the field device includes: Parsing the LLDP information to determine the MAC address and device management address of the field device, and using the MAC address and the device management address as device identification; The device identification is used as a keyword to search in a preset device type table to determine the control system information and the device identity information of the field device.
3. The field device network data transmission method according to claim 2, characterized in that: The privatized layer 2 network configuration is performed according to the control system information to obtain the layer 2 network rules corresponding to the communication port of the APL field network, including: Obtaining an initial Layer 2 network configuration, wherein the initial Layer 2 network configuration includes a configuration of a Trunk port and a configuration of a Spur port, the field switch is used to communicate and connect with the power switch through the Trunk port, and the field switch is used to communicate and connect with the field device through the Spur port; Determining the network specification of the field device according to the control system information; The configuration of the Trunk port and / or the Spur port of the initial Layer 2 network configuration is set according to the network specification to obtain the Layer 2 network rule corresponding to the communication port of the APL field network.
4. The field device network data transmission method according to claim 3, characterized in that: The step of setting the configuration of the Trunk port and / or the Spur port of the initial Layer 2 network configuration according to the network specification to obtain the Layer 2 network rule corresponding to the communication port of the APL field network includes: Determine the data transmission type of the field device according to the network specification; When the data upload type is multicast upload, control the Trunk port to start the shared VLAN learning mode, configure the multicast upload MAC address for the Trunk port and add the Trunk port to the ATU table of the shared VLAN learning mode; When the data sending type is unicast sending, the initial layer 2 network configuration is used as the layer 2 network rule.
5. The field device network data transmission method according to claim 3, characterized in that: The step of setting the configuration of the Trunk port and / or the Spur port of the initial Layer 2 network configuration according to the network specification to obtain the Layer 2 network rule corresponding to the communication port of the APL field network includes: Determine the data type of the LLDP information according to the network specification; When the data type is VLAN tagged, all the Trunk ports and the Spur ports are added to the VTU table of the VLAN tag, wherein the mode of the Spur port is Tag and the mode of the Trunk port is Untag; When the data type is a port isolation type without a VLAN tag, obtaining an available ID from a VLAN ID pool, allocating the available ID to the Spur port and the Trunk port, and controlling the Spur port and the Trunk port to enable a VLAN data proxy mode; When the data type is a type without a VLAN tag and a port is not isolated, the initial layer 2 network configuration is used as the layer 2 network rule.
6. The field device network data transmission method according to claim 1, characterized in that: The step of determining the IP protocol type of the field device according to the device identity information, wherein the IP protocol type includes IPv6 and IPv4, comprises: Extract according to the device identity information to obtain the address management field of the LLDP information; Determining the address of the LLDP information according to the address management field; When the address of the LLDP information is IPv6, determining that the IP protocol type of the field device is IPv6; When the address of the LLDP information is IPv4, it is determined that the IP protocol type of the field device is IPv4.
7. The field device network data transmission method according to claim 2, characterized in that: When the IP protocol type of the field device is IPv6, sending the uploaded data of the field device to the power switch according to the layer 2 network rule includes: When the IP protocol type of the field device is the IPv6, determining whether the field device is offline; If the field device is not offline, when the upload data of the field device is received, the upload data is sent to the power switch according to the layer 2 network rule.
8. The field device network data transmission method according to claim 7, characterized in that: The determining whether the field device is offline includes: Obtaining a preset extinction duration of the LLDP information of the field device; When the LLDP information of the field device is not received within the preset extinction time, determining that the field device is offline; When the LLDP information of the field device is received within the preset extinction time, it is determined that the field device is online.
9. The field device network data transmission method according to claim 7, characterized in that: When the IP protocol type of the field device is IPv4, performing data proxy on the uploaded data through IPv6, and sending the uploaded data after data proxy to the power switch, comprises: When the IP protocol type of the field device is the IPv4, generating a proxy IPv6 address according to the MAC address of the field device in combination with an IEEE EUI-64 address; When the upload data is received, the Ethernet header and the IP header in the upload data are removed to obtain the upload data after data proxy; The uploaded data after data proxy is sent to the power switch through the proxy IPv6 address.
10. A field device network data transmission system, characterized in that: The field device network data transmission system is applied to a field switch, and the field switch is used to communicate with the field device and the power switch to form an APL field network; The field device network data transmission system comprises: An LLDP information parsing unit, used to obtain the LLDP information of the field device, and query the device type table according to the LLDP information to obtain the control system information and device identity information of the field device; A layer 2 network configuration unit, used to perform a private layer 2 network configuration according to the control system information, and obtain a layer 2 network rule corresponding to the communication port of the APL field network; An IP protocol type determination unit is used to determine the IP protocol type of the field device according to the device identity information, wherein the IP protocol type includes IPv6 and IPv4; A transmission unit is used to send the uploaded data of the field device to the power switch according to the second-layer network rules when the IP protocol type of the field device is the IPv6; when the IP protocol type of the field device is the IPv4, perform data proxy on the uploaded data through the IPv6, and send the uploaded data after data proxy to the power switch.