A high real-time ethernet communication gateway supporting link redundancy and a communication method thereof
Patent Information
- Application Number
- CN202610313536.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2025-04-07
- Filing Date
- 2026-03-16
- Publication Date
- 2026-10-16
AI Technical Summary
传统的以太网网关在实时性、链路冗余和配置管理等方面存在不足,无法满足工业现场日益复杂的应用需求
[0003] In view of this, there is a need to provide a high real-time Ethernet communication gateway and its communication method that support link redundancy, in order to solve the above-mentioned problems of the prior art.
Smart Images

Figure CN122933393A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial communication equipment technology, specifically to a high real-time Ethernet communication gateway and its communication method that supports link redundancy, aiming to improve the real-time performance and reliability of industrial Ethernet communication, and to meet diverse configuration requirements and protocol interaction and fault diagnosis requirements in complex network environments. Background Technology
[0002] In the field of industrial automation, with the advancement of intelligent manufacturing, industrial control systems are placing higher demands on the real-time performance, reliability, and flexibility of data transmission. Traditional Ethernet gateways have shortcomings in real-time performance, link redundancy, and configuration management, failing to meet the increasingly complex application needs of industrial sites. For example, some gateways struggle to complete data transmission and reception within a short time, leading to corresponding control delays; simultaneously, gateway configuration methods are not flexible enough, making it difficult for users to customize them according to their needs. Furthermore, there are technical shortcomings in data interaction across different protocol stacks and fault diagnosis, hindering the achievement of efficient and stable Ethernet communication. Summary of the Invention
[0003] In view of this, there is a need to provide a high real-time Ethernet communication gateway and its communication method that support link redundancy, in order to solve the above-mentioned problems of the prior art.
[0004] To achieve the above-mentioned technical objectives, the present invention adopts the following technical solution:
[0005] This invention provides a high real-time Ethernet communication gateway and its communication method that support link redundancy. The gateway is characterized by: a high real-time hardware architecture, a high real-time data transmission and reception method, a dual-port link redundancy hardware architecture, a dual-port link redundancy switching method, a flexible communication configuration management method, a protocol interaction method, and a fault diagnosis and handling method.
[0006] The high real-time Ethernet communication gateway and its communication method that support link redundancy are characterized in that the high real-time hardware architecture adopts an industrial-grade processor with high-speed processing capabilities. This processor has multiple high-performance cores that can process massive amounts of data in parallel, achieve microsecond-level processing of key messages, and ensure the efficiency and timeliness of data processing.
[0007] The high real-time data transmission and reception method includes: 1) optimizing the data transmission path; 2) optimizing the interrupt handling mechanism; and 3) optimizing the task waiting method.
[0008] The dual-port link redundancy hardware architecture motherboard integrates two independent Ethernet interfaces. Each Ethernet physical interface is connected to a different physical link through an independent network controller chip. The network controller chip supports link aggregation and fault switching functions to monitor the link status in real time and provide hardware protection for link redundancy.
[0009] The dual-port link redundancy switching method involves the link redundancy management software sending heartbeat detection reports at fixed intervals. If the primary link does not receive a response within a set timeout period, the system automatically triggers a fast switching mechanism to complete the switching of the primary and backup links within milliseconds, synchronously updating network configuration information to ensure seamless service switching and guarantee the continuity of data transmission.
[0010] The flexible communication configuration method provides a visual graphical interface for configuration, allowing users to configure network parameters by dragging and dropping, and supports plug-in management of protocol stacks such as TCP / UDP.
[0011] The protocol interaction method incorporates a built-in intelligent protocol conversion middleware to automatically parse and verify configuration data, and to complete the mapping and format conversion of process data.
[0012] The fault diagnosis and handling method is implemented in the following three ways: 1) designing a hierarchical error checking mechanism; 2) designing a dynamic priority retransmission strategy; 3) intelligent repair of error frames. Attached Figure Description
[0013] Figure 1 This is a hardware block diagram of a high real-time Ethernet communication gateway that supports link redundancy and its communication method.
[0014] Figure 2 This is a redundant communication flowchart of a high real-time Ethernet communication gateway that supports link redundancy and its communication method.
[0015] Figure 3 This is an EtherCAT state transition diagram for a high real-time Ethernet communication gateway that supports link redundancy and its communication method. Detailed Implementation
[0016] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to specific embodiments and accompanying drawings.
[0017] This invention relates to a high real-time Ethernet communication gateway and its communication method that support link redundancy, aiming to significantly improve the real-time performance, reliability, and stability of industrial Ethernet communication. The specific embodiments of the invention are described below with reference to the accompanying drawings. It should be noted that the embodiments provided by this invention are only one implementation method within the scope of the invention, and the invention includes, but is not limited to, this embodiment. The hardware processing and software processing are described below respectively.
[0018] I. Hardware Setup
[0019] 1. In terms of hardware selection, a high-performance multi-core heterogeneous processor is chosen, equipped with a dedicated hardware acceleration engine, which can quickly process network data. It adopts a high-speed Ethernet standard interface chip, which can quickly send data to the network and receive network data in a timely manner.
[0020] 2. Regarding link redundancy, such as Figure 1 The gateway's motherboard design, as shown, integrates dual high-performance processors and configures dual independent Ethernet interfaces. The two processors communicate via a high-speed interface, enabling rapid data synchronization. Both Ethernet interfaces are connected to an industrial switch. This achieves state synchronization between the primary and backup processors, reaching millisecond-level data consistency.
[0021] II. Software Implementation
[0022] The high real-time data transmission and reception method includes: 1) optimizing the data transmission path; 2) optimizing the interrupt handling mechanism; and 3) optimizing the task waiting method.
[0023] 1) Optimize the data transmission path to ensure fast data transmission.
[0024] a. During data transmission and reception, zero-copy technology is adopted to avoid multiple copies of data in memory, reduce CPU overhead, and implement data pre-allocation and cache management strategies. Through precise memory resource allocation and efficient caching algorithms, fast data processing and transmission are ensured.
[0025] b. Design an efficient data buffer, employing buffering mechanisms such as double buffering or multiple buffering to prevent data overflow and loss. During data transmission and reception, utilize these buffering mechanisms to achieve seamless data switching, ensuring the continuity and stability of data transmission and maintaining the smooth operation of the system's data link.
[0026] 2) Optimize the interrupt handling mechanism by introducing interrupt threading technology to reduce the overhead of interrupt handling time. When an interrupt occurs, the system quickly delegates the interrupt handling task to a dedicated thread to avoid long-term blocking of other tasks during interrupt handling, ensuring that data can be responded to and processed in a timely manner and enhancing the real-time performance of the system.
[0027] 3) Optimize task waiting methods by using an event-driven mechanism, transforming the thread waiting mode from the traditional polling method to event-driven. Threads are only awakened and execute corresponding operations when a specific event occurs, effectively reducing thread idle time, improving system resource utilization and real-time performance, and enabling the system to respond more agilely to various tasks and events.
[0028] The redundant communication flowchart of the gateway dual MCU redundant system is mainly divided into two parts: redundant main MCU and redundant backup MCU.
[0029] like Figure 2 As shown, the redundant main MCU adopts the following redundant communication process.
[0030] A1. The main MCU initializes the redundant communication and establishes a redundant connection with another backup MCU in the dual-MCU redundant system of the gateway, then proceeds to B1;
[0031] B1. The main MCU synchronizes the redundant configuration with the backup MCU that has established a redundant connection with it. The redundant configuration is mainly used to distinguish the working modes of the two MCUs. It is set through the DIP switch on the gateway backplane. There are two modes: MCU0 and MCU1. (Transfer to C1)
[0032] C1. Determine whether the redundancy configurations of the two MCUs in the gateway dual-MCU redundancy system conflict, i.e., whether they are both MCU0 or both MCU1. If there is no conflict, proceed to D1; otherwise, proceed to I1.
[0033] D1. Determine the master-slave configuration of the two MCUs in the gateway. The MCU with the MCU0 option is set to run in redundant master MCU mode by default. Proceed to E1.
[0034] E1. Refresh I / O data and run user control logic, then switch to F1;
[0035] F1. Synchronize process data to the redundant standby MCU. The process data mainly includes the result data of the user control logic operation and I / O variable data. Transfer to G1.
[0036] G1. Send redundant heartbeat to redundant backup MCU, then transfer to H1;
[0037] H1. Determine whether a user's command to terminate the gateway has been received. If no command has been received, proceed to I1 to terminate the gateway; otherwise, proceed to E1 to continue running the gateway.
[0038] I1. Terminate the running gateway.
[0039] The redundant backup MCU adopts the following redundant communication process:
[0040] A2. The backup MCU initializes the redundant communication and establishes a redundant connection with the other MCU in the dual-MCU redundant system of the gateway, then proceeds to B2;
[0041] B2. The standby MCU synchronizes its redundant configuration with the master MCU with which it has established a redundant connection, then proceeds to C2;
[0042] C2. Determine whether the redundancy configurations of the two MCUs in the gateway dual-MCU redundancy system conflict. If there is no conflict, proceed to D2; otherwise, proceed to I2.
[0043] D2. Determine if the MCU is configured as a standby MCU. The MCU with the MCU1 option is set to run in redundant standby mode by default. Proceed to E2.
[0044] E2. Receive process data synchronized from the redundant master MCU via redundant communication connection, write it into the corresponding data area, and then transfer to F2;
[0045] F2. Obtain the redundant heartbeat sent by the redundant master MCU through the redundant communication connection, and transfer to G2;
[0046] G2. Diagnose whether the main MCU has an abnormal fault. If an abnormal fault is diagnosed in the main MCU, the standby MCU is promoted to the main MCU and continues to run the user control logic starting from the most recently received valid process data; otherwise, go to H2.
[0047] H2. Determine whether a user's command to terminate the gateway has been received. If a command to terminate the gateway has been received, proceed to I2 to terminate the gateway; otherwise, proceed to E2 to continue running the gateway.
[0048] I2. Terminate the running gateway.
[0049] The flexible communication configuration method offers multiple configuration options, including a web interface, facilitating network configuration for industrial environments. Based on a network protocol stack programming interface, it supports TCP Server, TCP Client, UDP Server, and UDP Client interfaces. Users can select the gateway's operating mode through the configuration interface. The interface also allows users to configure network communication parameters such as IP address, port, and timeout. This flexible parameter configuration meets the needs of different application scenarios.
[0050] The protocol interaction method includes a protocol conversion middleware, which is responsible for parsing configuration data and mapping process data. The acquired configuration data is parsed according to a pre-defined specification. The configuration data includes communication configuration information, data frame composition information, and the relative positions of variables in each frame. The absolute positions of the variables in the buffer are calculated based on the configuration information, and the acquired user data is then filled into the buffer according to the calculated positions. To ensure data consistency, a double-buffering mechanism is used, switching data copies at periodic boundaries. The specific data processing flow is shown below.
[0051] like Figure 2 The system reads data from the AL status register to respond to the EtherCAT master's status of the slave device. It determines whether the data in the AL status register indicates a safe operating state. If so, it begins input processing, comparing the data in the buffer used to store data sent by the EtherCAT master with the data in the RX buffer to determine if there are any data changes. If so, it writes the data sent by the EtherCAT master into the RX buffer. The function of input processing here is: write the data sent by the EtherCAT master into the buffer, and determine whether it is consistent with the data in the RX buffer (i.e., the previous data). If they are inconsistent, it means that the data packet sent by the EtherCAT master is a new data packet, which is pushed onto the RX buffer for data update, preparing for the next step of processing.
[0052] Otherwise, check if the AL status register is in the running state. If it is, read the data from the buffer into the EtherCAT transmit data buffer and start output processing.
[0053] After reading the status value from the status register, the station takes a corresponding action to complete the control task and ultimately completes the data exchange of the system.
[0054] In some embodiments, the fault diagnosis and error handling functions ensure the reliability of data transmission and avoid transmitting erroneous data in the following three ways: 1) designing a hierarchical error checking mechanism; 2) designing a dynamic priority retransmission strategy; 3) intelligent repair of erroneous frames.
[0055] 1) Design a layered error checking mechanism:
[0056] a. Physical layer error detection: An eye diagram detection module is integrated into the FPGA file of the gateway device. The eye diagram visually reflects communication quality. The gateway performs real-time sampling and analysis of the received signal, calculates the signal-to-noise ratio (SNR), and triggers an early warning mechanism when the SNR falls below a threshold. This warning information is sent to the data link layer and application layer via internal communication mechanisms to notify upper-layer modules of potential physical layer signal quality issues. Simultaneously, the warning information is recorded in the gateway's error log for easy troubleshooting. The eye diagram detection module continuously monitors signal quality, and cancels the warning promptly once the signal quality returns to normal.
[0057] b. Data link layer error detection innovatively introduces Hamming code verification based on traditional Cyclic Redundancy Check (CRC). CRC is primarily used to detect burst errors during data transmission, efficiently identifying multiple bit errors, but it may miss certain specific errors. Hamming code, on the other hand, excels at correcting single-bit errors and detecting multiple-bit errors. Combining the two, Hamming code first corrects the instruction content to ensure accuracy, and then CRC checks the entire data frame for other errors during transmission, greatly improving the comprehensiveness and accuracy of error detection.
[0058] c. Application layer error detection: Monitor the transmission period of data frames to ensure that the master station sends data frames according to the expected period, avoiding application layer errors caused by abnormal data frame periods. A significant deviation in the transmission period indicates a network problem.
[0059] 2) Design a dynamic priority retransmission strategy:
[0060] This system innovatively adopts an intelligent adaptive retransmission mechanism, abandoning the traditional fixed retransmission count and interval. This strategy is based on multi-dimensional real-time network environment assessment, including but not limited to error type, network congestion index, and data service priority, dynamically adjusting the retransmission strategy. For emergency control commands, an immediate retransmission strategy is adopted; once an error is detected, the retransmission mechanism is immediately activated, and the number of retransmissions is appropriately increased. Periodic data uses bandwidth-aware retransmission, dynamically adjusting the retransmission interval by monitoring network throughput in real time. For non-critical status monitoring data, delay-compensated retransmission is supported, performing supplementary transmissions during network idle periods to avoid increasing network load. Simultaneously, based on real-time network bandwidth, the size and frequency of retransmitted data are intelligently adjusted to ensure the reliability and efficiency of data transmission when network conditions change.
[0061] 3) Intelligent error frame repair:
[0062] By employing data redundancy technology, the original data is split into multiple redundant data blocks. Once an error is detected in the received data frame, the redundant data, in conjunction with a pre-set data frame reconstruction algorithm, is used to repair the erroneous data frame.
[0063] By implementing the above error handling measures, we can improve the integrity of data transmission, reduce the error rate during data transmission, and enhance the reliability and stability of the system.
[0064] In some embodiments, the high real-time Ethernet communication gateway and its communication method that support link redundancy have corresponding hardware and software interfaces, which can be easily integrated into existing industrial control systems. This configuration offers the following advantages.
[0065] 1) Easy integration: The software and hardware interfaces allow the gateway to be easily integrated into existing industrial control systems, effectively reducing integration costs and time.
[0066] 2) Improve production efficiency: By integrating the Ethernet to EtherCAT gateway into the existing system, data exchange between different devices is realized, which improves production efficiency and optimizes the production process.
[0067] 3) Expanding system functionality: This gateway can add new functions and capabilities to existing systems, enabling more complex logical control.
[0068] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A high real-time Ethernet communication gateway supporting link redundancy and its communication method, characterized in that... include: High real-time hardware architecture, high real-time data transmission and reception methods, dual-port link redundancy hardware architecture, dual-port link redundancy switching methods, flexible communication configuration methods, protocol interaction methods, and fault diagnosis and handling methods.
2. The high real-time Ethernet communication gateway and its communication method supporting link redundancy according to claim 1, characterized in that, The high real-time hardware architecture employs an industrial-grade processor with high-speed processing capabilities. This processor has multiple high-performance cores that can process massive amounts of data in parallel, achieving microsecond-level processing of critical messages and ensuring efficient and timely data processing.
3. The high real-time Ethernet communication gateway and its communication method supporting link redundancy according to claim 1, characterized in that, The high real-time data transmission and reception method includes: 1) optimizing the data transmission path; 2) optimizing the interrupt handling mechanism; and 3) optimizing the task waiting method.
4. The high real-time Ethernet communication gateway and its communication method supporting link redundancy according to claim 1, characterized in that, The dual-port link redundancy hardware architecture motherboard integrates two independent Ethernet interfaces. Each Ethernet physical interface is connected to a different physical link through an independent network controller chip. The network controller chip supports link aggregation and fault switching functions to monitor the link status in real time and provide hardware protection for link redundancy.
5. The high real-time Ethernet communication gateway and its communication method supporting link redundancy according to claim 1, characterized in that, The dual-port link redundancy switching method involves the link redundancy management software sending heartbeat detection reports at fixed intervals. If the primary link does not receive a response within a set timeout period, the system automatically triggers a fast switching mechanism to complete the switching of the primary and backup links within milliseconds, synchronously updating network configuration information to ensure seamless service switching and guarantee the continuity of data transmission.
6. The high real-time Ethernet communication gateway and its communication method supporting link redundancy according to claim 1, characterized in that, The flexible communication configuration method provides a visual graphical interface for configuration, allowing users to configure network parameters by dragging and dropping, and supports plug-in management of protocol stacks such as TCP / UDP.
7. A high real-time Ethernet communication gateway and its communication method supporting link redundancy according to claim 1, characterized in that, The protocol interaction method incorporates a built-in intelligent protocol conversion middleware to automatically parse and verify configuration data, and to complete the mapping and format conversion of process data.
8. A high real-time Ethernet communication gateway and its communication method supporting link redundancy according to claim 1, characterized in that, The fault diagnosis and handling method is implemented in the following three ways: 1) designing a hierarchical error checking mechanism; 2) designing a dynamic priority retransmission strategy; 3) intelligent repair of error frames.