Low-latency redundant communication protocol based on improved prp

By introducing LRE and redundancy identifiers at the link layer through the improved PRP protocol, combined with triple hash mapping and pre-configuration files, the latency and reliability problems of Ethernet communication in the prior art are solved, realizing low-latency redundant communication, which is suitable for large and complex systems and improves real-time performance and fast response capabilities.

WO2026020674A1PCT designated stage Publication Date: 2026-01-29BEIJING AEROSPACE AUTOMATIC CONTROL RES INST

Patent Information

Application Number
PCT/CN2024/137053
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-07-23
Filing Date
2024-12-05
Publication Date
2026-01-29

AI Technical Summary

Technical Problem

Existing technologies in Ethernet communication suffer from low transmission reliability, uncertain message transmission delay, and inability to meet the needs of large-scale network systems. In particular, in the fields of real-time measurement and control and large and complex systems such as aerospace, the existing PRP protocol increases message buffering delay and reduces the responsiveness of embedded real-time systems.

Method used

The improved PRP protocol is adopted. By introducing LRE at the link layer, using redundant identifiers and improved redundancy dropping algorithms, dual or triple redundant network ports are supported. Combined with triple hash mapping and pre-configured files, low-latency redundant communication is achieved, and network self-monitoring is performed to improve real-time performance and reliability.

Benefits of technology

While maintaining compatibility with the original standard, it reduces communication latency, improves network real-time performance and reliability, adapts to the communication needs of large and complex systems, simplifies network management, reduces hardware overhead and system startup delay, and enhances the rapid response capability of nodes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024137053_29012026_PF_FP_ABST
    Figure CN2024137053_29012026_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present invention is a low-latency redundant communication protocol based on an improved PRP, which protocol is compatible with the PRP standard of IEC 62439-3-2016 and operates at a link layer. Two redundant ports are connected to an upper-layer protocol by means of a link redundancy entity, and are transparent to the upper-layer protocol; a network-end node has two or three redundant network ports, which are respectively connected to networks that are independent of each other and have the same topological structure, and the networks operate in parallel; and network ports belonging to PRP-supporting end nodes are configured with the same IP address and MAC address. The improvements in the present invention are as follows: a redundancy discarding algorithm is modified to a mode of directly uploading a first-arriving communication frame to an application layer; {source IP address, source MAC address and frame sequence number} is used as a determination condition for a redundant frame; by means of file pre-configuration, the IP address of a single-network-port node in a network is written into a configuration file in advance in a node; and statistics for the number of network port link up / down events, out-of-receive-window statistics, statistics for non-sequential frame sequence numbers, and statistics for the number of out-of-sync redundant frames are added.
Need to check novelty before this filing date? Find Prior Art

Description

Low-latency redundant communication protocol based on improved PRP protocol TECHNICAL FIELD

[0001] The application belongs to the technical field of Ethernet communication, and particularly relates to a low-latency redundant communication protocol based on an improved PRP protocol. BACKGROUND

[0002] At present, a general broadband Ethernet switching local area network is generally based on a switching mechanism to build a complex star-shaped network. The general Ethernet is generally improved in communication reliability by using information redundancy methods such as repeated transmission, redundant switching retransmission or parallel redundant transmission. The repeated transmission method generally determines whether to send again according to the instruction reply on the same physical channel. The redundant switching retransmission method requires that the communication network has a redundant physical channel, and determines whether to use the backup physical channel to send the message again by monitoring the link on-off state or the reply timeout. These two methods have problems such as message transmission loss under one-time fault and uncertain message transmission delay. For example, the dual-network master-slave redundant switching mechanism commonly used in the real-time measurement and control field has low transmission reliability, weak fault monitoring capability and limited network scale. The parallel redundant transmission method has a mature communication protocol, such as the PRP protocol (hereinafter referred to as PRP protocol) described in the international standard IEC62439-3. However, the protocol focuses on message transmission reliability, increases the message cache delay compared with the general Ethernet transmission, reduces the response capability of the embedded real-time system, and the original PRP protocol uses a MAC address-based de-redundancy management method, which can only be applied to a two-layer network and cannot meet the three-layer reliable transmission requirements of a large network system. SUMMARY

[0003] To solve the above problems, the application provides 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, works in the link layer, and is connected to an upper layer protocol through a link redundancy entity (LRE), as shown in FIG. 1.

[0004] The application requires that the network end node has dual-redundant or triple-redundant network ports, which are respectively connected to independent networks with the same topology, and the networks work in parallel, as shown in FIG. 2.

[0005] The end nodes supporting the PRP protocol set the same IP address and MAC address for each network port, which facilitates the de-redundancy management of multi-channel data frames.

[0006] LRE appends a redundancy check trailer (RCT) at the end of the Ethernet data frame, including frame number, LAN ID, LSDU length, protocol suffix, etc., the format definition is the same as the requirement of standard IEC62439-3-2016, as shown in Figure 3:

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

[0008] 2) LAN ID: LAN ID, 4 bits, for redundant LAN ports, LAN port A is 1010, LAN port B is 1011, and LAN 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 application includes three functions: redundancy sending, redundancy receiving and monitoring management.

[0012] Improved redundancy discard algorithm

[0013] The application is consistent with the PRP protocol, and the first-to-valid principle is still adopted for redundant data frames, and the late-arriving redundant data frames are discarded; however, in order to reduce the delay of message transmission and adapt to real-time measurement and control system applications, the application improves the redundancy discard algorithm: after LRE receives a new data frame at a LAN port, it checks whether it is in the receiving window, if it is in the window, it does not cache other LAN port data frames, and immediately uploads the data frame after removing the RCT.

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

[0015] The redundancy discard algorithm proposed in the application is divided into two steps: receiving window filtering and redundancy filtering.

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

[0017] 2) Redundancy filter: The LRE redundancy filter module uses the triplet data and hash lookup algorithm to obtain the last frame sequence number deliverySN uploaded, and 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.

[0018] ● Redundancy sending function

[0019] The sending end message sending process is shown in Figure 4.

[0020] When the sending end discovers that one network interface link is down, the sending function of the network interface is closed, and the other network interface directly sends the PRP data packet in the format with RCT;

[0021] The network driver of the node replicates the messages issued to realize the redundancy sending of multiple network interfaces. The application proposes a method based on semaphore or spin lock to minimize the time interval of data frame sending between multiple channels, and to reduce the cache consumption and transmission delay of the receiving node.

[0022] The first data packet sequence number sent after the sending end restarts is 0, and the subsequent sequence number is flipped and starts from 1, so that the receiving end can judge whether the sending end has restarted or replaced a new module, and to avoid alias frame discard;

[0023] ● Redundancy receiving function

[0024] Assuming the network port A first receives several message frames, first check the frame sequence number in the receiving window, if yes, report to the application layer directly and add the difference between the new sequence number and the start point of the window minus 1 to the lost frame statistics, and update the start point of the window of port A to the new sequence number, if not, discard and increase the super window statistics by 1; At the same time, start the 1ms timer of network port B, if the same frame sequence number frame of network port B is received within 1ms, it is considered normal and the start point of the window of network port B is updated to the new sequence number, if it is not received within 1ms, it is considered that the synchronization is timed out and the synchronization difference statistics is increased by 1, and the start point of the window of network port B is updated to the new sequence number; If network port A receives a new sequence number frame within 1ms, it is considered that the frame of the previous sequence number of network port B is lost, the start point of the window of network port B is updated to the new sequence number, the synchronization difference statistics is increased by 1 and the timer of the new sequence number frame is started.

[0025] If network port B receives first, similar processing.

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

[0027] The processing flow of receiving messages at the receiving end is shown in Figure 5.

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

[0029] Monitoring management function

[0030] The PRP protocol runs as a driving software in the link layer, and needs to provide the underlying network running situation to the application layer. In addition to feeding back whether the read and write operations between the application software and the protocol stack and the network driver are normally executed, it should also have complete self-monitoring capability. The main monitoring content of PRP should include:

[0031] The current state of each physical network port is link or down, and the total number of changes between on and off of each network port is increased by 1;

[0032] The same receiving window and super window statistics are set for each network port. The start point of the receiving window is the frame sequence number of the previous normally received frame, and the end window is the frame sequence number plus 100. The initial value of the super window statistics is 0. If the received frame sequence 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 the count is reset when it is full.

[0033] Set 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 is not continuous plus 1, then the lost frame number is accumulated (the more lost, the more accumulated), the maximum count value is 65535, and the count is full to flip;

[0034] Set 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 receiving time difference statistics initial value is 0; when the received frame exceeds the window, the receiving time difference statistics value is increased by 1, the maximum count value is 65535, and the count is full to flip.

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

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

[0037] Simplify the redundancy management and management information base of the PRP protocol, the LRE does not send PRP protocol monitoring frames, and does not receive and analyze PRP protocol monitoring frames sent by other nodes. Each node sends the monitoring results to the upper 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 statistics register and upload register are independent; after the network packet is transmitted to the memory, the software is notified through an interrupt; the software first reads the system clock, then identifies which network port data, then reads the messages in the data in turn; the read message sequence number is subtracted by currentSN+1, and accumulated 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, the value is compared with deliverySN, less than or equal to, then discarded, greater than, then uploaded; the system clock value of the current data is subtracted from the system clock value of the latest data of the other network port, if less than or equal to 1ms, no processing is performed, if greater than 1ms, the message sequence numbers of the two data are compared, and the message number with the same sequence number is accumulated to the receiving time difference statistics.

[0039] If one network port of a node fails without messages, and the other network port is normal, the statistics value of the failed network port does not change during the failure process until a new message is received.

[0040] Communication method of DANP node and SAN node

[0041] The PRP driving software has the function of reading the static configuration of the SAN end node. The DANP end node in the system sets the device with certain IP address in the network as the SAN end node according to the configuration file or the configuration message. When the DANP end node receives the message of the normal network node, the IP address is identified to determine whether it is the SAN end node, if yes, the protocol stack is directly submitted through the LRE, if not, the above-mentioned receiving process is processed.

[0042] Meanwhile, the PRP Ethernet driving software with the same function can also be deployed in the single network port node, and the UDP frame is received and transmitted according to the PRP frame format, so that the problem of the message of the single network port node being incorrectly processed is not considered.

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

[0044] (1) The present application inherits the PRP frame format definition of the original international standard, but improves the redundancy discarding algorithm in order to reduce the transmission delay of the communication frame and improve the real-time performance of the network. The original redundancy discarding 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 performs the redundancy discarding according to the PRP frame sequence number. Although this method enhances the reliability of network transmission, the waiting after receiving also increases the transmission delay. In order to meet the real-time performance requirements of space and other real-time control systems, the redundancy discarding algorithm is improved to the mode of directly uploading the first-arrived communication frame to the application layer, which eliminates the delay of the communication frame in the link layer and improves the real-time performance of the communication while maintaining compatibility with the original standard.

[0045] (2) The original international standard IEC62439-3 uses the {source MAC address, frame sequence number} two-tuple as the redundancy frame judgment condition for the redundant communication frames received by two redundant channels. Because the three-layer switch 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 switch network, and is not suitable for the use requirements of large and complex multi-subsystem space and other systems. The redundancy management method is improved in the present application, and {source IP address, source MAC address, frame sequence number} is used as the redundancy frame judgment condition, which is compatible with the original standard and is extended to the three-layer switch network, and the application in large and complex systems such as space is realized.

[0046] (3) The original international standard adopts a method of broadcasting monitoring frames by all network nodes to realize the distinction of single-network-port nodes SAN and double-network-port nodes DANP in the network, the method has the ability of network dynamic management, and is suitable for industrial open network systems. For closed systems such as aerospace systems, the number, state and network connection of internal nodes are determined, the method not only increases the complexity of protocol implementation, but also increases the delay of node startup and system communication establishment, and affects the system fast response capability. The application faces the characteristics of closed systems such as aerospace systems, adopts a pre-configuration file method, writes the IP addresses of single-network-port nodes in the network into the configuration file in advance, and each node regards the nodes listed in the configuration file as ordinary non-redundant nodes, and does not perform redundant and related processing. The improvement simplifies the network single and double network redundancy management, reduces the network bandwidth consumption and the system power-on startup delay, and improves the fast startup and fast response capability of the node and the system.

[0047] (4) The monitoring content of the original international standard includes: frame check error, channel number mismatch error, frame sequence number mismatch error. According to the characteristics of the above improvement, the application perfects the network self-monitoring capability, and increases the network port link on-off times statistics, the super-receiving window statistics, the frame sequence number discontinuity statistics and the redundant frame asynchronization times statistics. Through these statistics, the network link situation, the node receiving and transmitting situation, and the network transmission situation can be comprehensively monitored, and the system can help to find the node and network abnormalities in time.

[0048] (5) The application provides an implementation method based on a network link layer driving software, which is particularly suitable for a processor chip with double network ports, and can realize high-reliable parallel redundant communication without increasing hardware cost, compared with a hardware implementation scheme based on FPGA or chip, has the characteristics of low implementation cost and flexible implementation. BRIEF DESCRIPTION OF DRAWINGS

[0049] Fig. 1 is a PRP protocol principle diagram;

[0050] Fig. 2 is a typical structure diagram of a network node hardware with redundant network ports;

[0051] Fig. 3 is a PRP protocol format diagram;

[0052] Fig. 4 is a sending flowchart;

[0053] Fig. 5 is a receiving flowchart;

[0054] Fig. 6 is an aging timer action schematic diagram. DETAILED DESCRIPTION

[0055] The technical solutions of the present application will be further described in detail below in combination with the drawings and specific embodiments. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of the present application.

[0056] The hardware is selected from the Z7 series of XC7Z045-2FFG900I produced by XILINX company, the software is solidified in a FLASH chip, runs in the ARM core of Z7, and has no operating system environment. Except for the hardware interrupt processing, all functions are completed in the main flow. The network protocol stack adopts LWIP, and the PRP protocol is extended on the basis of LWIP.

[0057] The network related software can be divided into four parts:

[0058] The network card driver: provides API functions, directly accesses the MAC and PHY hardware registers;

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

[0060] The LWIP network protocol stack: provides ARP, ICMP, IP, UDP, TCP, DHCP, IGMP and other network protocols, supports RAW API and socket API;

[0061] The application layer: the LRM software uses RAW API to realize network communication, and periodically sends out the PRP related statistical information through the heartbeat.

[0062] The PRP protocol works in the link layer, and the main functions are three: redundant sending, duplicate data frame receiving and redundancy monitoring management. The module software realizes the above three functions by modifying the interface layer. The application layer periodically sends out the monitoring results.

[0063] The specific modifications are as follows:

[0064] (a) Network data structure

[0065] The important data structures of the network protocol stack, the interface layer and the network card driver are listed in the following figure. The software modifies the structure layer data structure xemacpsif_s. The original structure manages one network, and after modification, it manages two networks, and the receiving and sending space is also changed from one network to two networks.

[0066] (b) Network initialization

[0067] The interface layer code is modified. The original initialization only initializes one network, and the modified initialization initializes two networks.

[0068] (c) PRP data redundancy sending

[0069] The application layer UDP sending only adopts the PBUF_RAM form, and does not use the PBUF_REF form. The interface layer code low_level_output is modified, two PBUF_RAM spaces q and r are applied, the size is p->len+12, the p content transmitted from the protocol layer is copied to q, and 12 bytes of RCT (A network port) are added at the tail of q. The q content is copied to r, and the A network port in the RCT is changed to the B network port. Then q and r are sent out from the A network port and the B network port respectively.

[0070] (d) PRP data receiving and discarding

[0071] The interface layer data receiving interrupt code is modified, whether the received data is a PRP message is judged, if not, the PRP message is directly enqueued as a normal message. The PRP message is in the receiving range and is the first packet received, and is enqueued and transmitted, and if not, the PRP message is discarded.

[0072] (e) Redundancy monitoring management

[0073] The timer interrupt service program is used to maintain the data structure content required by the prp, to check the receiving window 1ms and the receiving aging time 5s and other indicators, and to report the monitoring situation to the upper computer through the heartbeat message.

[0074] The redundancy discarding algorithm, the three-layer redundancy communication method and the network monitoring method of the application can be realized in the form of software driver, and can also be realized in the form of FPGA, ASIC chip and the like.

[0075] Meanwhile, the patent protection points of the application can be used not only for the double-redundancy ordinary Ethernet network, but also for other multi-redundancy independent redundant bus networks. For example, the patent protection points of the application are used for the time-triggered Ethernet TTE, so as to enhance the transmission reliability without reducing the BE flow delay.

[0076] The above description of disclosed embodiments enables a person skilled in the art to implement or use the application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the scope of the application. Therefore, the application will not be limited to these embodiments shown herein, but will conform 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, The PRP protocol standard compatible with IEC62439-3-2016 works at the link layer; the dual-redundant ports are connected to the upper layer protocol through a link redundancy entity and are transparent to the upper layer protocol; the network end node has dual-redundant or triple-redundant network ports and is connected to independent networks with the same topology, and the networks work in parallel; the network ports of the end node supporting the PRP protocol are set with the same IP address and MAC address.

2. The low-latency redundant communication protocol based on the improved PRP protocol according to claim 1, characterized in that, The link redundancy entity appends a redundancy identifier to the tail of an Ethernet data frame, including a frame sequence number, a network port number, an LSDU length, a protocol suffix, etc., and the format definition is the same as the requirement of the standard IEC62439-3-2016; The link redundancy entity checks whether a new data frame received by a certain network port is in the receiving window, and if so, does not cache other data frames of the network port, removes the redundancy identifier from the data frame immediately and uploads the data frame; the source MAC address, IP address and destination MAC address of the data frame are used as the condition for frame classification processing, the frame sequence number of the last frame of a certain triple 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 and the currentSN[x] of each network port and the deliverySN[y] of the node can be established.

3. The low-latency redundant communication protocol based on the improved PRP protocol according to claim 2, characterized in that, The receiving checking module of the link redundancy entity sets a receiving window [FirstSeq, LastSeq] for the frames of different triples received by the 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 period and the maximum number of tolerable frame loss, and the values of each network port are consistent, and the frame sequence number of the received frame is discarded if it is outside the receiving window; if the frame sequence number is within the receiving window, the currentSN[x] is set as the frame sequence number, and further redundancy filtering is performed.

4. The low-latency redundant communication protocol based on the improved PRP protocol according to claim 3, wherein, The redundancy filtering module of the link redundancy entity uses the triple data and the hash lookup algorithm to obtain the last frame sequence number deliverySN, if the frame sequence number of the data frame is greater than deliverySN, the protocol stack is directly uploaded, and deliverySN is set as the frame sequence number, otherwise the frame is discarded.

5. The low-latency redundant communication protocol based on the improved PRP protocol of claim 1, wherein, The link redundancy entity includes redundancy sending, redundancy receiving and monitoring management functions.

Citation Information

Patent Citations

  • High-availability industrial Ethernet redundancy method

    CN101753348A

  • FPGA based redundant double-network-interface configurable Ethernet IP core

    CN107395396A

  • Parallel redundancy Ethernet transport protocol stack system and implementation method

    CN116455842A

  • Scalable service level agreement (SLA) verification and action using a data plane

    US20180034712A1

Cited By

  • False data injection method, medium and equipment for AFDX (Avionics Full Duplex Switched Ethernet) network security test

    CN122120038A