Low-latency redundancy communication protocol based on improved PRP protocol

By introducing improved PRP protocol and link redundant entity (LRE) into the Ethernet communication protocol, combined with improved redundancy discarding algorithm and monitoring and management functions, the problem of uncertain transmission delay in the existing Ethernet communication protocol and inability to meet the three-layer reliable transmission of large network systems is solved, and low-latency and high-reliability communication is achieved.

CN119583660AActive Publication Date: 2025-03-07BEIJING AEROSPACE AUTOMATIC CONTROL RES INST

Patent Information

Application Number
CN202410988546.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-23
Publication Date
2025-03-07
Estimated Expiration
2044-07-23

AI Technical Summary

Technical Problem

When the existing Ethernet communication protocol improves communication reliability, there are uncertain transmission delay, low transmission reliability, weak fault monitoring capabilities, and inability to meet the needs of reliable transmission of Layer 3 of large network systems.

Method used

A low-latency redundant communication protocol based on the improved PRP protocol is proposed. By setting up dual redundant or triple redundant network ports on the network end nodes, and redundant management is used for link redundant management, combined with improved redundant discarding algorithm and monitoring management functions, low-latency and high-reliability communication is achieved.

Benefits of technology

It realizes that when maintaining communication reliability, reduce message transmission delay, improve network real-time, is suitable for real-time measurement and control systems, and is extended to a three-layer switching network to meet the needs of large and complex systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119583660A_ABST
    Figure CN119583660A_ABST
Patent Text Reader

Abstract

The invention provides a low-latency redundancy communication protocol based on an improved PRP protocol, which is compatible with a PRP protocol standard of IEC 62439-3-2016 and works on a link layer. The dual-redundancy port is connected to an upper-layer protocol through a link redundancy entity and is transparent to the upper-layer protocol; the network end nodes are provided with dual-redundancy or triple-redundancy network ports which are respectively connected to networks which are mutually independent and have the same topological structure, and the networks work in parallel; and the same IP address and MAC address are set for each network port to which the end node supporting the PRP protocol belongs. The method is characterized in that a redundancy discarding algorithm is changed into a mode of directly uploading a first communication frame to an application layer; taking {a source IP address, a source MAC address and a frame sequence number} as a judgment condition of a redundant frame; the method comprises the following steps: writing a single-network-port node IP address in a network into a configuration file in advance in a node by adopting a pre-configuration file mode; and network port link on-off frequency statistics, super receiving window statistics, frame number discontinuous statistics and redundant frame asynchronous frequency statistics are added.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of Ethernet communication, and in particular relates to a low-delay redundant communication protocol based on an improved PRP protocol. Background Art

[0002] At present, ordinary broadband Ethernet switching LANs are generally based on switches to build complex star networks. To improve communication reliability on ordinary Ethernet, information redundancy methods are generally used, such as repeated transmission, redundant switching retransmission or parallel redundant transmission. The repeated transmission method generally determines whether to send again based on the command reply situation on the same physical channel; the redundant switching retransmission method requires the communication network to have redundant redundant physical channels, and determines whether to use the backup physical channel to send the message again by monitoring the link connection and disconnection status or the reply command timeout. These two methods have problems such as loss of transmission messages under a single failure and uncertainty of message transmission delay. For example, the dual-network master-slave redundant switching mechanism commonly used in the field of real-time measurement and control has low transmission reliability, weak fault monitoring capabilities, and limited network scale. There are mature communication protocols for parallel redundant transmission, such as the PRP protocol described in the international standard IEC62439-3 (hereinafter referred to as the PRP protocol), but this protocol focuses on message transmission reliability. Compared with ordinary Ethernet transmission, it increases the message cache delay and reduces the responsiveness of embedded real-time systems. In addition, the original PRP protocol uses a MAC address-based de-redundancy management method and can only be applied in the second-layer network, which cannot meet the requirements of reliable transmission at the third layer of large network systems. Summary of the invention

[0003] To solve the above problems, the present invention proposes a low-latency redundant communication protocol based on an improved PRP protocol, which is compatible with the PRP protocol standard of IEC 62439-3-2016 and works at the link layer. Figure 1 As shown, the dual redundant ports are connected to the upper layer protocol through a link redundancy entity (LRE) and are transparent to the upper layer protocol.

[0004] The present invention requires that the network end nodes have dual redundant or triple redundant network ports, which are respectively connected to independent networks with the same topological structure, and each network works in parallel. Figure 2 shown.

[0005] Each network port of the end node supporting the PRP protocol is set with the same IP address and MAC address to facilitate the de-redundancy management of multi-channel data frames.

[0006] LRE adds a redundancy check trailer (RCT) to the end of the Ethernet data frame, including the frame sequence number, network port number, LSDU length, protocol suffix, etc. The format definition is the same as the standard IEC62439-3-2016 requirements, such as Figure 3 As shown:

[0007] 1) Frame sequence number: SN, 16 bits, LRE maintains a sequence number for each MAC destination address, which is incremented by 1 each time it is sent;

[0008] 2) Network port number: LAN ID, 4 digits. For redundant network ports, network port A is 1010, network port B is 1011, and network port C is 1100.

[0009] 3) LSDU length: 12 bits, equal to the length of the user data area plus 6;

[0010] 4) Protocol suffix: 16 bits, set to a constant value of 0x88FB.

[0011] The LRE of the present invention includes three functions: redundant transmission, redundant reception and monitoring management.

[0012] Improved redundant discard algorithm

[0013] The present invention is consistent with the PRP protocol and still adopts the first-come-first-served principle for redundant data frames, and late redundant data frames are discarded; but in order to reduce the delay of message transmission and adapt to the application of real-time measurement and control systems, the present invention improves the redundant discarding algorithm: after receiving a new data frame at a certain network port, LRE checks whether it is in the receiving window. If it is in the window, it does not cache and wait for data frames from other network ports, and immediately removes the RCT of the data frame and uploads it.

[0014] When receiving data frames, the triple consisting of the source MAC address, IP address and destination MAC address is used as the condition for frame classification processing. The frame sequence number of the last frame of a triple currently received by a certain network port X is recorded as currentSN[x], and the frame sequence number of the last uploaded frame of a triple for all redundant network ports is recorded as deliverySN[y]. In this way, a hash mapping between the triple input and the currentSN[x] of each network port and the deliverySN[y] of the node can be established. Considering that the PRP protocol is generally used in closed local area networks, only the last byte of the source MAC address, IP address and destination MAC address can be taken as the hash calculation input, thereby reducing the cache and calculation time.

[0015] The redundancy discarding algorithm proposed by the present invention is divided into two steps: receiving window filtering and redundancy filtering.

[0016] 1) Receive window filtering: The LRE receive check module sets a receive window [FirstSeq, LastSeq] for each frame of different triples received by network port X. The value of FirstSeq is currentSN[x]+1, and the value of LastSeq is currentSN[x]+n. The constant n can be set according to the system communication cycle and the maximum number of frame losses that can be tolerated, and the value is consistent for each network port. After that, the frame sequence number of the received frame is discarded if it is outside the receive window; if it is within the receive window, currentSN[x] is set to the frame sequence number, and further redundancy filtering is performed.

[0017] 2) Redundancy filtering: The LRE redundancy filtering module uses triplet data and hash search algorithm to obtain the last frame sequence number deliverySN uploaded. If the frame sequence number of the data frame is greater than deliverySN, it is directly uploaded to the protocol stack and deliverySN is set to the frame sequence number, otherwise it is discarded.

[0018] Redundant sending function

[0019] The message sending process at the sender is as follows Figure 4 shown.

[0020] When the sending end finds that one network port is link down, it turns off the sending function of the network port, and the other network port directly sends the PRP data packet in the format with RCT;

[0021] The node's network driver replicates the sent messages to achieve redundant transmission of multiple network ports. The present invention proposes a method based on semaphore or spin lock to minimize the time interval for sending data frames between multiple channels, thereby reducing the cache consumption and transmission delay of the receiving node.

[0022] The first data packet sent by the sender after restart is numbered 0, and the subsequent numbers are reversed and start from 1, so that the receiver can determine whether the sender has been restarted or replaced with a new module to avoid alias frame discarding;

[0023] Redundant receiving function

[0024] Assume that network port A receives several message frames first, first check whether the frame sequence number is within the receiving window. If so, report it directly to the application layer and add the difference between the new sequence number and the window starting point minus 1 to the lost frame statistics. At the same time, update the window starting point of network port A to the new sequence number. If not, discard it and increase the over-window statistics by 1. At the same time, start the 1ms timer of network port B. If a frame with the same frame sequence number is received from network port B within 1ms, it is considered normal and the window starting point of network port B is updated to the new sequence number. If the frame with the sequence number is not received from network port B within 1ms, it is considered as a synchronization timeout and the synchronization over-error statistics are increased by 1. At the same time, the window starting point of network port B is updated to the new sequence number. If network port A receives a frame with a new sequence number within 1ms, it is considered as a frame with the previous sequence number of network port B lost, the window starting point of network port B is updated to the new sequence number, the synchronization over-error statistics are increased by 1, and the timer of the frame with the new sequence number is started.

[0025] If network port B receives the message first, similar processing is performed.

[0026] Each message stream uses its own independent list, receiving window, and aging timer.

[0027] The receiving end receives the message processing flow as follows Figure 5 .

[0028] The receiving aging time can be set according to the network status. It is for a certain receiving node. The node will receive messages sent by multiple sources with different addresses. If no message is received from a source with a certain address for more than 5 seconds, the latest frame sequence number and receiving window filter corresponding to the source address will be cleared. For example Figure 6 That is, after 5 seconds, any message with a sequence number sent by the address will be received and uploaded, and the sequence number of the message will be set to the latest frame sequence number received, and a new receiving window will be set.

[0029] Monitoring and management functions

[0030] The PRP protocol runs as a driver software at the link layer and needs to provide the application layer with the underlying network operation status. In addition to providing feedback on whether the read and write operations between the application software and the protocol stack and the network driver are executed normally, it should also have complete self-monitoring capabilities. The main monitoring content of PRP should include:

[0031] The current status of each physical network port is link or down. The total number of times each network port changes from on to off increases by 1.

[0032] The same receiving window and super window statistics are set for each network port. The starting point of the receiving window is the frame number of the previous normal received frame, the end window is the frame number plus 100, and the initial value of the super window statistics is 0. If the received frame number exceeds the receiving window, the frame is discarded and the super window statistics value is increased by 1. The maximum count value is 65535, and it rolls over when it is full.

[0033] Set the frame sequence number continuity check and lost frame statistics for each network port. The initial value of the statistics is 0. When the PRP frame sequence number of a network port does not increase by 1 continuously, the number of lost frames is accumulated (the number of lost frames is accumulated). The maximum count value is 65535, and it will roll over when it is full.

[0034] Set the frame receiving time check window and receiving time difference statistics for the redundant network port of each node. The window size is 1ms, and the initial value of the receiving time difference statistics is 0. When the received frame exceeds the window, the receiving time difference statistics value increases by 1. The maximum count value is 65535, and it rolls over when it is full.

[0035] The receiving window is set to 1ms, that is, the time difference between PRP frame reception from the same source through two independent networks should be less than 1ms to check the transmission synchronization of the source device.

[0036] Among the above statistics, 1) each network port corresponds to a monitoring result, 2) and 3) the received message stream is counted, that is, the same source MAC and different sink MAC are classified as one message stream for super window statistics and lost frame accumulation; 4) a statistical result is corresponding to the redundant network port. All self-monitoring results are provided by the underlying driver to the application layer interface.

[0037] To simplify the redundant management and management information base of the PRP protocol, LRE does not send PRP protocol monitoring frames, nor does it receive or analyze PRP protocol monitoring frames sent by other nodes. Each node sends the monitoring results to the host computer through periodic network messages.

[0038] The network port A and network port B of each node independently perform super window statistics and lost frame statistics, and the statistical register is independent of the upload register; when the network packet is transmitted to the memory, the software is processed through an interrupt notification. The software first reads the system clock, then identifies which network port the data is from, and then reads the messages in the data in sequence; subtracts currentSN+1 from the read message sequence number and accumulates it to the lost frame statistics of the network port. If it exceeds the receiving window, the message is lost and the super window statistics value is increased by 1. If it is within the receiving window range, the value is compared with deliverySN. If it is less than or equal to it, it is discarded, and if it is greater than it is uploaded; the system clock value of this data is subtracted from the system clock value of the most recent data of another network port. If it is less than or equal to 1ms, no processing is performed. If it is greater than 1ms, the message sequence numbers of the two data are compared, and the number of messages with the same sequence number is accumulated to the receiving time difference statistics.

[0039] If one network port of a node fails and there is no message, while the other network port is normal, the statistical value of the failed network port remains unchanged during the failure process until a new message is received.

[0040] Communication method between DANP node and SAN node

[0041] The PRP driver software has the function of reading the static configuration of the SAN end node. The DANP end node in the system sets the devices with certain IP addresses in the network as SAN end nodes according to the configuration file or configuration message. When the DANP end node receives a message from a common network node, it determines whether it is a SAN end node through IP address identification. If so, it directly submits the protocol stack through LRE. If not, it is processed according to the above receiving process.

[0042] At the same time, the PRP Ethernet driver software with the same function can also be deployed on a single network port node to send and receive UDP frames in the PRP frame format, eliminating the need to worry about single network port node message processing errors.

[0043] The beneficial effects of the present invention are as follows:

[0044] (1) The present invention inherits the PRP frame format definition of the original international standard, but improves the redundant discard algorithm in order to reduce the delay of communication frame transmission and improve network real-time performance. In order to improve reliability, the original redundant discard algorithm needs to wait for a period of time to receive the communication frame of another channel after receiving the communication frame of one channel, and then remove redundancy according to the PRP frame sequence number. Although this method enhances the reliability of network transmission, the waiting after reception also increases the transmission delay. In order to meet the real-time requirements of real-time control systems such as aerospace, the present invention changes the redundant discard algorithm to a method in which the first arriving communication frame is directly uploaded to the application layer, eliminating the delay of the communication frame at the link layer, and improving the real-time performance of communication while maintaining compatibility with the original standard.

[0045] (2) The original international standard IEC62439-3 uses the {source MAC address, frame number} tuple as the judgment condition for redundant frames received by two redundant channels. Because the three-layer switching will replace the MAC address of the source node with the MAC address of the gateway, the original standard cannot be used in a large-scale three-layer switching network and is not suitable for the use requirements of large-scale complex multi-subsystems such as aerospace. The present invention improves the redundancy management method, uses {source IP address, source MAC address, frame number} as the judgment condition for redundant frames, and expands it to the three-layer switching network while maintaining compatibility with the original standard, realizing its application in large-scale complex systems such as aerospace.

[0046] (3) The original international standard adopted the method of broadcasting monitoring frames by all network nodes to distinguish between single-port nodes SAN and dual-port nodes DANP in the network. This method has the ability to dynamically manage the network and is suitable for industrial open network systems. For closed systems such as aerospace systems where the number, status and network connection of internal nodes are determined, this method not only increases the complexity of protocol implementation, but also increases the delay in node startup and establishment of system communication, affecting the system's rapid response capability. The present invention is oriented to the characteristics of closed systems such as aerospace, and adopts a pre-configuration file method to write the IP address of the single-port node in the network into the configuration file in advance in the node. Each node treats the node with the IP address listed in the configuration file as an ordinary non-redundant node and does not perform redundancy and other related processing. This improvement simplifies the redundant management of single and dual networks, reduces network bandwidth consumption and system power-on start-up delay, and improves the rapid startup and rapid response capabilities of nodes and systems.

[0047] (4) The original international standard includes the following monitoring contents for abnormalities: frame check error, channel number mismatch error, and frame sequence number mismatch error. According to the above-mentioned improved features, the present invention improves the network self-monitoring capability, adds statistics on the number of times the network port link is on and off, statistics on super receiving windows, statistics on discontinuous frame sequence numbers, and statistics on the number of times redundant frames are not synchronized. Through these statistics, the network link status, node receiving and sending status, and network transmission status can be comprehensively monitored, helping the system to promptly discover abnormalities of nodes and networks.

[0048] (5) The present invention proposes an implementation method based on network link layer driver software, which is particularly suitable for processor chips with dual network ports. It can achieve highly reliable parallel redundant communication without increasing hardware overhead. Compared with hardware implementation solutions based on FPGA or chips, it has the characteristics of low implementation cost and flexible implementation. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 It is the schematic diagram of the PRP protocol;

[0050] Figure 2 This is a typical diagram of the hardware configuration of a network node with redundant network ports;

[0051] Figure 3 It is the PRP protocol format diagram;

[0052] Figure 4 It is a sending flow chart;

[0053] Figure 5 It is a receiving flow chart;

[0054] Figure 6 This is a schematic diagram of the aging timer operation. DETAILED DESCRIPTION

[0055] The technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection claimed by the present invention.

[0056] The hardware used is the Z7 series produced by XILINX, with the brand name XC7Z045-2FFG900I. The software is fixed in the FLASH chip and runs in the ARM core of Z7. There is no operating system environment. Except for hardware interrupt processing, all functions are completed in the main process. The network protocol stack uses LWIP, and the PRP protocol is extended on the basis of LWIP.

[0057] Network-related software can be divided into four parts:

[0058] Network card driver: provides API functions to directly access MAC and PHY hardware registers;

[0059] Interface layer: connects the network protocol stack and the network card driver layer;

[0060] LWIP network protocol stack: provides network protocols such as ARP, ICMP, IP, UDP, TCP, DHCP, IGMP, and supports RAWAPI and socketAPI;

[0061] Application layer: LRM software uses RAWAPI to implement network communication and sends PRP-related statistical information periodically through heartbeats.

[0062] The PRP protocol works at the link layer and has three main functions: redundant transmission, duplicate data frame reception, and redundant monitoring management. The module software implements the above three functions by modifying the interface layer. The application layer periodically sends monitoring results to the outside.

[0063] The specific modifications are as follows:

[0064] (a) Network data structure

[0065] The following figure lists the important data structures of the network protocol stack, interface layer and network card driver respectively. The software modifies the structural layer data structure xemacpsif_s. It originally managed one network port, but after modification it manages two network ports, and the receiving and sending spaces are also changed from one network port to two network ports.

[0066] (b) Network initialization

[0067] Modify the interface layer code. Originally, only one network was initialized during initialization. Now, two networks are initialized.

[0068] (c) Redundant transmission of PRP data

[0069] The application layer UDP transmission only uses the PBUF_RAM format, not the PBUF_REF format. Modify the interface layer code low_level_output, apply for two PBUF_RAM spaces q and r, size p->len+12, copy the content of p passed down by the protocol layer to q, and add 12 bytes of RCT (A network port) at the end of q. Then copy the content of q to r, and change the A network port in RCT to the B network port. Then send q and r from the A network port and the B network port respectively.

[0070] (d)PRP data reception and discarding

[0071] Modify the interface layer data reception interrupt code to determine whether the received data is a PRP message. If not, it is directly queued as a normal message. If the PRP message is within the receiving range and is the first packet received, it is queued and uploaded. If not, it is discarded.

[0072] (e) Redundant monitoring management

[0073] It is implemented using the timer interrupt service program to maintain the data structure content required by prp, check indicators such as the receiving window 1ms and the receiving aging time 5s, and report the monitoring situation to the host computer through the heartbeat message.

[0074] The patent protection points of the redundant discarding algorithm, three-layer redundant communication method, network monitoring method and the like described in the present invention can be realized in the form of software drive, or in the form of FPGA, ASIC chip and the like.

[0075] Meanwhile, the patent protection point of the present invention can be used not only for ordinary dual-redundant Ethernet networks, but also for other redundant independent redundant bus networks, such as time-triggered Ethernet TTE, to enhance the reliability of its transmission without reducing the delay of BE flow.

[0076] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A low-latency redundant communication protocol based on an improved PRP protocol, characterized in that: Compatible with the PRP protocol standard of IEC 62439-3-2016, it works at the link layer; the dual redundant ports are connected to the upper layer protocol through the link redundant entity and are transparent to the upper layer protocol; the network end nodes have dual redundant or triple redundant network ports, which are respectively connected to independent networks with the same topology, and each network works in parallel; each network port of the end node supporting the PRP protocol is set with the same IP address and MAC address.

2. A low-latency redundant communication protocol based on the improved PRP protocol according to claim 1, characterized in that: The link redundancy entity adds a redundant identifier to the end of the Ethernet data frame, including the frame sequence number, network port number, LSDU length, protocol suffix, etc. The format definition is the same as the requirements of standard IEC62439-3-2016; After receiving a new data frame at a certain network port, the link redundancy entity checks whether it is in the receiving window. If it is in the window, it will not cache and wait for data frames from other network ports, and immediately remove the redundant identifier from the data frame and upload it. When receiving data frames, the triple consisting of the source MAC address, IP address and sink MAC address is used as the condition for frame classification processing. The frame sequence number of the last frame of a certain triple currently received by a certain network port X is recorded as currentSN[x], and the frame sequence number of the last uploaded frame of a certain triple by all redundant network ports is recorded as deliverySN[y], so that a hash mapping of the triple input with the currentSN[x] of each network port and the deliverySN[y] of the node can be established.

3. A low-latency redundant communication protocol based on the improved PRP protocol according to claim 2, characterized in that: The link redundancy entity receiving check module sets a receiving window [FirstSeq, LastSeq] for frames of different triples received by network port X, where the value of FirstSeq is currentSN[x]+1, and the value of LastSeq is currentSN[x]+n. The constant n can be set according to the system communication cycle and the maximum number of tolerable frame losses, and the values ​​of each network port are consistent. After that, the frame sequence number of the received frame is discarded if it is outside the receiving window; if it is within the receiving window, currentSN[x] is set to the frame sequence number, and further redundancy filtering is performed.

4. A low-latency redundant communication protocol based on the improved PRP protocol according to claim 3, characterized in that: The link redundancy entity redundancy filtering module uses triplet data and hash search algorithm to obtain the last frame sequence number deliverySN uploaded. If the frame sequence number of the data frame is greater than deliverySN, the protocol stack is directly uploaded and deliverySN is set to the frame sequence number, otherwise it is discarded.

5. A low-latency redundant communication protocol based on an improved PRP protocol according to claim 1, characterized in that: The link redundancy entity includes redundant sending, redundant receiving and monitoring management functions.

Citation Information

Patent Citations

  • Method for realizing dual-network redundancy of protection device on the basis of PRP parallel redundancy

    CN104283658A

  • Parallel redundancy protocol (PRP) network connection method under Windows system

    CN107332834A

  • Parallel redundant Ethernet communication controller and control method thereof

    CN110493147A

  • Parallel redundancy Ethernet transport protocol stack system and implementation method

    CN116455842A

  • Parallel redundant network equipment and system

    CN116743327A

Cited By

  • Parallel redundancy Ethernet message processing method and system

    CN121619305A