Prp device with multiple redundant ports and packet transmission method, device and medium
By using PRP devices with multiple redundant ports and combining switching modules and redundant processing modules, zero packet loss and no redundant bandwidth occupation during wireless transmission in large factories are achieved, solving the problem that traditional PRP devices cannot meet the needs of multi-AP network communication.
Patent Information
- Application Number
- CN202211635054.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-19
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2042-12-19
AI Technical Summary
Existing PRP devices can only connect two APs, which cannot meet the network communication needs of multiple APs in a large factory, resulting in affected network performance and real-time performance, and failing to achieve the goal of zero packet loss and no redundant packets occupying link bandwidth.
Design a multi-redundant port PRP device. Through a switching module and a redundancy processing module, several Ethernet interface chips are used to realize packet replication and redundancy deletion, ensuring zero packet loss and no redundant occupancy of link bandwidth during data transmission.
It achieves zero packet loss during wireless transmission, avoids network congestion, and meets the data transmission needs of large factories.
Smart Images

Figure CN115987921B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of industrial data communication technology, and in particular to a PRP device with multiple redundant ports and a message transmission method, device, and medium. Background Technology
[0002] Existing industrial manufacturing sites often have large factory buildings that are hundreds or even thousands of meters long. These factory buildings often require aerial locomotives to perform heavy-duty transport work. These aerial locomotives are usually equipped with various intelligent devices to meet different business needs.
[0003] In today's digital and intelligent world, various intelligent devices mounted on aerial locomotives need to wirelessly interact with ground-based APs via APs (Access Points) mounted on the locomotives. The ground APs then transmit this information to the control center via a wired network, enabling the control center to monitor and control the various intelligent devices on the locomotives. Due to the limitations of wireless link signal transmission distance, to ensure absolutely reliable, zero-packet-loss communication between the ground APs and the locomotive APs, several APs need to be deployed at intervals on the ground, based on their signal range. However, this deployment method can also lead to the locomotive receiving multiple redundant data packets when multiple ground APs send data to the locomotive APs, causing network congestion on the locomotive and, conversely, causing network congestion on the ground as well.
[0004] To solve the above problems, such as Figure 1 As shown, the existing technology uses a PRP (Parallel Redundancy Protocol) device based on the IEC62439-3 standard. This PRP device includes two interfaces that can connect to two APs. By deploying this PRP device on the locomotive and the ground respectively, when the locomotive needs to send a data packet to the ground, the locomotive's PRP device will copy the data packet to be sent into two copies, and then send it out through the two APs connected to it. After the two APs on the ground receive the same two data packets, they will remove the redundant data packet through the ground PRP device before sending it to the control center. In this way, redundancy backup can be guaranteed during the data packet transmission process, and the excess redundant packets can be avoided from occupying the bandwidth of the wired network. This achieves the goal of zero packet loss and no redundant packets occupying the bandwidth of the wired link, and will not cause network congestion on the locomotive side or the ground side.
[0005] However, since the existing PRP device can only connect two APs, and a large factory building of hundreds of meters will be arranged with multiple APs, at least half of the number of PRP devices corresponding to the APs need to be arranged to connect all the APs on the ground. When the locomotive moves in the air, the two APs of the locomotive send the same two data packets, which are received by two APs on the ground located in different PRP devices. At this time, the two PRP devices will send the same two data packets to the control center through the wired link, which will also affect the network performance and real-time performance, and cannot meet the data transmission requirements of the existing large factory building. SUMMARY
[0006] Therefore, the present application provides a PRP device with multiple redundant ports and a message transmission method, device and medium, which can realize zero packet loss in wireless data transmission and ensure that no redundant data occupies the link bandwidth, avoiding network congestion.
[0007] In a first aspect, the present application provides a PRP device with multiple redundant ports, which comprises a switching module and a redundancy processing module connected with each other, and a plurality of Ethernet interface chips connected with the redundancy processing module;
[0008] The switching module is used for receiving a message to be forwarded, and performing the forwarding of the message according to a MAC table item;
[0009] The redundancy processing module is used for receiving the message forwarded by the switching module, copying the message into a plurality of copies and adding a PRP label to each copy respectively, and forwarding the generated plurality of PRP messages to the outside through the plurality of Ethernet interface chips;
[0010] The redundancy processing module further receives at least one PRP message of an external terminal through the plurality of Ethernet interface chips connected therewith, performs redundancy deletion on the at least one PRP message, and then uploads the PRP message to the switching module.
[0011] From the above, the PRP device with multiple redundant ports provided by the application sets a redundant processing module and connects a plurality of Ethernet interface chips on one side of the redundant processing module. When the switching module receives a message from an external device through its port, the message can be forwarded to the redundant processing module for duplication and PRP label addition according to the MAC table item stored therein, so as to form a plurality of PRP messages, which are then forwarded to the outside through the plurality of connected Ethernet interface chips. When the redundant processing module receives a plurality of PRP messages through the plurality of Ethernet interface chips, the same PRP messages in the plurality of PRP messages are redundantly deleted and then sent to the switching module, which forwards the messages to the external device. Through the application, redundant transmission of data messages in wireless transmission can be realized, zero packet loss in the process of message transmission can be ensured, and redundant messages can be redundantly deleted before being sent upwards, so as to avoid occupying link bandwidth and network congestion.
[0012] Optionally, the MAC table item comprises a MAC address and a port corresponding to the MAC address, and the forwarding by the switching module according to the MAC table item comprises:
[0013] querying a destination MAC address of the message through the switching module;
[0014] if the MAC table item stores the destination MAC address, forwarding the message to a port corresponding to the destination MAC address, the port comprising a port connected to the redundant processing module;
[0015] if the MAC table item does not store the destination MAC address, broadcasting the message to all ports of the switching module.
[0016] From the above, the switching module is connected to external devices and the redundant processing module through a plurality of ports thereof, and the switching module pre-stores a MAC table item, which specifically comprises a destination MAC address and a port corresponding to the destination MAC address. When the switching module receives a message to be forwarded, the destination MAC address of the message is queried, and the port corresponding to the destination MAC address is found in the MAC table item. When the MAC table item stores the destination MAC address, the message is forwarded to the corresponding port. When the MAC table item does not store the destination MAC address, the message can be discarded, for example, broadcast to all ports of the switching module.
[0017] Optionally, the redundant processing module stores a first node table, and after the redundant processing module receives the message forwarded by the switching module, the redundant processing module further comprises:
[0018] determining whether the message is received for the first time according to a source MAC address of the message forwarded by the switching module and a source MAC address recorded in the first node table;
[0019] If so, the source MAC address of the message is added to the first node table, and the message reception time is recorded.
[0020] If not, then refresh the message reception time recorded in the first node table.
[0021] As described above, by constructing a proxy node table in the redundancy processing module to record message information forwarded by the switching module, when the redundancy processing module receives a message forwarded by the switching module, it determines whether the message is being received for the first time based on the source MAC address of the message. If so, the source MAC address of the received message is added to the proxy node table, and the message reception time is recorded. If not, the message reception time recorded in the proxy node table is refreshed. The proxy node table can record the source and time of messages forwarded by the switching module received by the redundancy processing module.
[0022] Optionally, the redundancy processing module stores a second node table, and after receiving the at least one PRP message, the redundancy processing module further includes:
[0023] Based on the source MAC address of the PRP message and the source MAC address recorded in the second node table, determine whether the PRP message is being received for the first time.
[0024] If so, the source MAC address of the PRP message is added to the second node table, and the reception time of the PRP message is recorded.
[0025] If not, then refresh the reception time of the PRP message recorded in the second node table.
[0026] As described above, by constructing a second node table in the redundancy processing module to record the addresses of PRP packets sent by Ethernet interface chips, when the redundancy processing module receives PRP packets through its multiple Ethernet interface chips, it determines whether the PRP packet is being received for the first time based on the source MAC address of the PRP packet. If so, the source MAC address of the received PRP packet is added to the second node table, and the reception time of the PRP packet is recorded. If not, the reception time of the PRP packet recorded in the second node table is refreshed. Through this second node table, the source and time of the PRP packets sent by the Ethernet interface chips received by the redundancy processing module can be recorded.
[0027] Optionally, it also includes: if the redundancy processing module does not receive the PRP message again within a specified time, deleting the source MAC address and reception time of the corresponding PRP message recorded in the second node table.
[0028] As described above, by setting a timer to delete the source MAC address stored in the second node table at a specified time, if the redundancy processing module receives the same PRP packet again within the specified time, the reception time of the PRP packet in the second node table is refreshed. If the redundancy processing module does not receive the PRP packet again within the specified time, the source MAC address and reception time of the PRP packet stored in the second node table can be deleted. If the redundancy processing module receives the PRP packet again after deletion, its source MAC address can be added back to the second node table.
[0029] Optionally, the redundancy removal of at least one PRP message includes:
[0030] When the redundancy processing module receives the PRP message, it queries the time when the same PRP message was last received.
[0031] If the time difference between two received PRP messages is less than the set input forget time, then the received PRP message is deleted.
[0032] As described above, the redundancy processing module can perform redundancy deletion on multiple identical PRP packets received, avoiding repeated uploading of the same PRP packets to the switching module for forwarding and causing network congestion. Specifically, the redundancy processing module can set an entry forget time for PRP packets. When the redundancy processing module receives a PRP packet sent from the Ethernet, it queries the time of the last reception of the same PRP packet and calculates the time difference between the two receptions. If the time difference is lower than the set entry forget time, the PRP packet is determined to be redundant and is deleted. If the time difference exceeds the set entry forget time, the PRP packet is considered valid and can be uploaded to the switching module for forwarding. By setting the entry forget time for PRP packets, redundant PRP packets can be deleted, ensuring that the first received PRP packet is sent to the switching module while avoiding redundant PRP packets consuming link bandwidth.
[0033] Optionally, the switching module and the redundancy processing module are implemented using a programmable logic chip (FPGA).
[0034] As described above, by using a programmable logic chip (FPGA) to construct the switching module and redundancy processing module of this application, the FPGA supports the expansion of multiple Ethernet interface chips. Then, by programming and controlling the FPGA, the message transmission process of this application can be easily realized, meeting the usage requirements.
[0035] Optionally, it also includes a CPU processor for global management and functional configuration of the switching module and the redundancy processing module.
[0036] As described above, by connecting a CPU processor to the port of the switching module, the switching module and the redundancy processing module can be globally managed and configured through the CPU processor. Furthermore, the CPU processor can also be used as an external device for the switching module to send and receive messages.
[0037] Secondly, this application provides a message transmission method, executed by the aforementioned multi-redundant port PRP device, the method comprising:
[0038] The switching module forwards the packets to be forwarded to the redundancy processing module.
[0039] The redundancy processing module copies the packets forwarded by the switching module into several PRP packets, which are then forwarded outward through several Ethernet interface chips connected to it.
[0040] The redundancy processing module receives at least one PRP message uploaded by several Ethernet interface chips, performs redundancy deletion on the at least one PRP message, and sends it to the switching module.
[0041] Thirdly, this application provides a computing device, the computing device comprising:
[0042] processor;
[0043] Memory, used to store one or more programs;
[0044] When the processor executes one or more programs, the processor implements the above-described message transmission method.
[0045] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a computer, implements the aforementioned message transmission method.
[0046] These and other aspects of this application will become more apparent in the description of the following embodiments(s). Attached Figure Description
[0047] Figure 1 Here is a structural diagram of an existing PRP device;
[0048] Figure 2 A structural diagram of a PRP device with multiple redundant ports provided in an embodiment of this application;
[0049] Figure 3 A flowchart illustrating how a switching module forwards packets to a redundancy processing module, as provided in an embodiment of this application;
[0050] Figure 4A flowchart illustrating how a redundancy processing module forwards packets to a switching module, as provided in an embodiment of this application;
[0051] Figure 5 This is a structural diagram of a computing device provided in an embodiment of this application.
[0052] It should be understood that the dimensions and shapes of the block diagrams in the above structural diagrams are for reference only and should not constitute an exclusive interpretation of the embodiments of this application. The relative positions and inclusion relationships between the block diagrams presented in the structural diagrams are only schematic representations of the structural relationships between the block diagrams, and are not intended to limit the physical connection methods of the embodiments of this application. Detailed Implementation
[0053] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will now be described in further detail with reference to the accompanying drawings.
[0054] like Figure 1 As shown, traditional PRP (Parallel Redundancy Protocol) devices based on the IEC 62439-3 standard have only two redundant ports. When sending a message, the same message is sent from both redundant ports to the other end. The other end forwards the first received message and discards the other redundant message to achieve zero packet loss and no redundant messages occupying link bandwidth. However, in large industrial manufacturing sites, this traditional PRP solution with only two redundant ports, implemented according to the IEC standard, can only connect a maximum of two Access Points (APs). Since the signal transmission distance of APs is limited, traditional PRP devices cannot meet the network communication needs of vehicles moving within factory buildings spanning thousands of meters.
[0055] In view of this, this application provides a PRP device with multiple redundant ports. This PRP device can be deployed on the overhead locomotive and the ground in a large factory. Its multiple redundant ports can connect to multiple APs to enable communication between multiple APs on the overhead locomotive and multiple APs on the ground. This solves the problem that the large area of a large factory makes it difficult to cover with redundant networks. Through this PRP device with multiple redundant ports, it is possible to realize the service requirement of copying a message into multiple copies for distribution and sending only one copy after receiving multiple redundant messages.
[0056] like Figure 2As shown in the figure, the multi-redundant port PRP device provided in this application embodiment includes a switching module 100 and a redundancy processing module 200. The switching module 100 is connected to the port Port provided by the Ethernet interface chip PHY on one side of the redundancy processing module 200 through a serial bus to realize message interaction with the redundancy processing module 200. The other side of the redundancy processing module 200 is also provided with N redundant Ethernet interface chips PHY1-PHYn, so as to realize that the received message is copied into N copies and forwarded to the external terminal connected by the port PortA-PortN through the N Ethernet interface chips PHY1-PHYn, or the N messages sent by the external terminal through the port PortA-PortN are received through the N Ethernet interface chips PHY1-PHYn. After redundancy processing in the redundancy processing module, the redundant identical messages are deleted, and only one message is uploaded to the switching module 100.
[0057] In some embodiments, a CPU 300 connected to the switching module 100 is also included. The CPU 300 may be a built-in CPU or an external CPU. The CPU 300 is used for global management and function configuration of the PRP device with multiple redundant ports. By programming and controlling the switching module 100 and the redundancy processing module 200, the service requirements in the message forwarding process of this application embodiment can be realized.
[0058] In some embodiments, the aforementioned switching module 100 and redundancy processing module 200 can be implemented by a programmable FPGA, which can configure different logic functions. Relying on the high-speed communication interface of the programmable FPGA, it can realize the fast forwarding of messages. Furthermore, the programmable FPGA has strong digital signal processing capabilities and greater parallelism, enabling it to quickly copy and send received messages in parallel, or to quickly delete multiple parallel redundant messages and only send the first received message.
[0059] based on Figure 2 The PRP device shown has multiple redundant ports. Figure 3 A flowchart illustrating the forwarding of messages from a switching module to a redundancy processing module is shown. This flowchart describes the process where the switching module 100 receives messages from external devices, performs redundant replication through the redundancy processing module 200, and then distributes the messages to multiple external terminals. Figure 3As shown, the switching module 100 in this embodiment has a switch port (Port SAN) for connecting to external devices. The switching module 100 can receive packets sent by external devices through the switch port (Port SAN) and forward the packets according to the MAC entries stored in its MAC table. Specifically, the MAC entries in the switching module 100 include MAC addresses and their corresponding ports. When the switching module 100 receives a packet sent by an external device, it queries the destination MAC address of the packet. If the destination MAC address of the packet is stored in the MAC entry of the switching module 100, the packet is forwarded to the port corresponding to the destination MAC address. For example, if the corresponding port is the port connected to the redundancy processing module 200, the packet is forwarded to the redundancy processing module 200 through the port and the Ethernet interface chip PHY. If the corresponding port is the port connected to the CPU 300, the packet is forwarded to the CPU 300 for processing. If the destination MAC address of the packet is not stored in the MAC entry of the switching module 100, the packet can be discarded, for example, by broadcasting the packet to all ports of the switching module 100.
[0060] The redundancy processing module 200 stores a proxy node table for recording message information forwarded by the switching module 100. When the redundancy processing module 200 receives a message forwarded by the switching module 100 through the Ethernet interface chip PHY and port, it queries the source MAC address of the message and confirms whether the message is being received for the first time based on the source MAC address. If so, it adds the source MAC address of the received message to the proxy node table and records the message reception time. If not, it refreshes the message reception time recorded in the proxy node table.
[0061] After receiving the message sent by the switching module 100, the redundancy processing module 200 can copy the message N times according to the number of redundant ports connected to it, and add PRP tags (A, B, C, up to N ports) to generate N PRP messages. Then, it forwards the messages to the external terminals connected to the corresponding ports PortA-PortN through the Ethernet interface chips PHY1-PHYn, thereby realizing redundant transmission of messages.
[0062] based on Figure 2 The PRP device shown has multiple redundant ports. Figure 4 A flowchart illustrating a message forwarding process from a redundancy processing module to a switching module is shown. This process involves the redundancy processing module 200 receiving multiple PRP messages from an external terminal, performing redundancy removal, and then forwarding them to the switching module 100. The switching module 100 then forwards these messages according to MAC table entries.Figure 4 As shown, the redundant processing module 200 Ethernet interface chip PHY1-PHYn receives N PRP messages sent by external terminals through their respective ports PortA-PortN.
[0063] The redundancy processing module 200 stores a node table for recording the addresses of PRP packets sent by Ethernet interface chips. When the redundancy processing module 200 receives PRP packets through its multiple Ethernet interface chips, it queries the source MAC address of the PRP packet and determines whether it is the first time the PRP packet has been received based on the source MAC address. If so, it adds the source MAC address of the received PRP packet to the node table and records the reception time of the PRP packet. If not, it refreshes the reception time of the PRP packet recorded in the second node table. In some embodiments, a Node Forget Time for PRP packets can be set in the Node Table, for example, setting it to 10 seconds. After the redundancy processing module 200 receives and records a PRP packet, it starts timing. If the redundancy processing module 200 does not receive the PRP packet again for more than 10 seconds, it can delete the source MAC address and reception time of the PRP packet recorded in the Node Table. If the redundancy processing module receives the PRP packet again after deletion, it can add the source MAC address back to the Node Table. When the redundancy processing module 200 receives the PRP packet again within 10 seconds, it refreshes the reception time of the PRP packet in the Node Table, resets the Node Forget Time to 0, and restarts timing. By setting the Node Forget Time, information that has not been used for a period of time in the Node Table can be deleted, avoiding excessive content stored in the Node Table and affecting the process.
[0064] When the redundancy processing module 200 in this embodiment receives N redundant PRP messages sent by an external terminal through ports PortA-PortN, it needs to perform redundancy removal processing before sending them to the switching module 100 to avoid redundant messages occupying link bandwidth and causing network congestion. Specifically, the redundancy processing module 200 can set the entry forget time for each PRP packet based on its source MAC address and sequence number. When the redundancy processing module 200 receives a PRP packet sent by an external terminal through the corresponding port via the Ethernet interface chip, it queries the time when the same PRP packet was last received based on its source MAC address and sequence number. If the PRP packet was not received before, the first received PRP packet is directly sent to the switching module 100 for forwarding. If the PRP packet has been received before, the time difference between the two receptions is calculated based on the time when the same PRP packet was last received. If the time difference is lower than the set entry forget time, the PRP packet is considered redundant and is deleted. If the time difference exceeds the set entry forget time, the PRP packet is considered valid and can be sent to the switching module 100 for forwarding. By setting the EntryForget Time for PRP messages, redundant PRP messages can be deleted, ensuring that the first received PRP message is sent to the switching module while avoiding redundant PRP messages from consuming link bandwidth.
[0065] In some embodiments, before sending a valid PRP message to the switching module 100, the redundancy processing module 200 may delete the PRP tag in the PRP message according to service requirements, and then send it to the switching module 100. After receiving the message sent by the redundancy processing module 200, the switching module 100 can forward the message to the corresponding external device according to its stored MAC table entry and the destination MAC address of the message, thereby realizing the transmission process of the message from the redundancy processing module to the switching module.
[0066] In summary, the multi-redundant port PRP device provided in this application embodiment, by setting up a redundancy processing module and connecting several Ethernet interface chips to one side of the redundancy processing module, allows the switching module to forward packets from external devices to the redundancy processing module for copying and adding PRP tags according to its stored MAC entries when the switching module receives packets from external devices through its ports. This results in multiple PRP packets being formed and then forwarded outward through the connected Ethernet interface chips. When the redundancy processing module receives multiple PRP packets through the Ethernet interface chips, it performs redundancy removal on identical PRP packets before sending them to the switching module, which then forwards them to external devices. This application enables redundant transmission of data packets during wireless transmission, ensuring zero packet loss during transmission. Furthermore, redundancy removal before upward transmission prevents redundant packets from consuming link bandwidth and avoiding network congestion.
[0067] Figure 5 This is a schematic structural diagram of a computing device 1000 provided in an embodiment of this application. The computing device 1000 includes: a processor 1010, a memory 1020, a communication interface 1030, and a bus 1040.
[0068] It should be understood that Figure 5 The communication interface 1030 in the computing device 1000 shown can be used to communicate with other devices.
[0069] The processor 1010 can be connected to the memory 1020. The memory 1020 can be used to store the program code and data. Therefore, the memory 1020 can be a storage unit inside the processor 1010, an external storage unit independent of the processor 1010, or a component that includes both the storage unit inside the processor 1010 and the external storage unit independent of the processor 1010.
[0070] Optionally, the computing device 1000 may also include a bus 1040. The memory 1020 and communication interface 1030 can be connected to the processor 1010 via the bus 1040. The bus 1040 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus 1040 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 The symbol is represented by only one line, but this does not mean that there is only one bus or one type of bus.
[0071] It should be understood that in the embodiments of this application, the processor 1010 may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor. Alternatively, the processor 1010 may employ one or more integrated circuits to execute relevant programs to implement the technical solutions provided in the embodiments of this application.
[0072] The memory 1020 may include read-only memory and random access memory, and provides instructions and data to the processor 1010. A portion of the processor 1010 may also include non-volatile random access memory. For example, the processor 1010 may also store device type information.
[0073] When the computing device 1000 is running, the processor 1010 executes the computer execution instructions in the memory 1020 to perform the operation steps of the above method.
[0074] It should be understood that the computing device 1000 according to the embodiments of this application can correspond to the corresponding subject in executing the methods according to the various embodiments of this application, and the other operations and / or functions of each module in the computing device 1000 are respectively for implementing the corresponding processes of the methods of this embodiment. For the sake of brevity, they will not be described in detail here.
[0075] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0076] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0077] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0078] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0079] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0080] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0081] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, is used to perform the above-described method, which includes at least one of the schemes described in the above embodiments.
[0082] The computer storage medium in this application embodiment can be any combination of one or more computer-readable media. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. For example, a computer-readable storage medium can be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0083] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0084] The program code contained on a computer-readable medium may be transmitted using any suitable medium, including, but not limited to, wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0085] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0086] It should be noted that the embodiments described in this application are merely some embodiments, not all embodiments. The components of the embodiments of this application typically described and shown in the accompanying drawings can be arranged and designed in various different configurations. Therefore, the above detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0087] The terms "first, second, third, etc." or similar terms such as module A, module B, module C, etc., used in the specification and claims are only used to distinguish similar objects and do not represent a specific ordering of objects. It is understood that a specific order or sequence may be interchanged where permitted so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0088] In the above description, the labels indicating the steps do not necessarily mean that the steps will be executed. They may include intermediate steps or be replaced by other steps. Where permissible, the order of the steps may be interchanged or executed simultaneously.
[0089] The term "comprising" as used in the specification and claims should not be construed as limiting itself to what follows; it does not exclude other elements or steps. Therefore, it should be interpreted as specifying the presence of the mentioned feature, integral, step, or component, but does not exclude the presence or addition of one or more other features, integrals, steps, or components, or groups thereof. Thus, the statement "device comprising means A and B" should not be limited to a device consisting solely of components A and B.
[0090] The terms "an embodiment" or "an embodiment" as used in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in at least one embodiment of this application. Therefore, the terms "in one embodiment" or "in an embodiment" appearing throughout this specification do not necessarily refer to the same embodiment, but may refer to the same embodiment. Furthermore, in the various embodiments of this application, unless otherwise specified or in case of logical conflict, the terminology and / or descriptions between different embodiments are consistent and can be mutually referenced. Technical features in different embodiments can be combined to form new embodiments based on their inherent logical relationships.
[0091] Note that the above are merely preferred embodiments and the technical principles employed in this application. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present application has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, all of which fall within the scope of protection of the present invention.
Claims
1. A PRP device with multiple redundant ports, characterized in that, It includes an interconnected switching module and a redundancy processing module, as well as several Ethernet interface chips connected to the redundancy processing module; The switching module is used to receive packets to be forwarded and to forward the packets according to the MAC table entries; The redundancy processing module is used to receive packets forwarded by the switching module, copy the packets into several copies and add PRP tags to each copy, and forward the generated PRP packets outward through several Ethernet interface chips. The redundancy processing module stores a first node table. After receiving a packet forwarded by the switching module, the redundancy processing module determines whether it is receiving the packet for the first time based on the source MAC address of the packet forwarded by the switching module and the source MAC address recorded in the first node table. If yes, add the source MAC address of the message to the first node table and record the message reception time; if no, refresh the message reception time recorded in the first node table. The redundancy processing module also receives at least one PRP message from an external terminal through several Ethernet interface chips connected to it, performs redundancy deletion on the at least one PRP message, and then sends it to the switching module. The redundancy processing module stores a second node table. After receiving the at least one PRP message, the redundancy processing module determines whether it is receiving the PRP message for the first time based on the source MAC address of the PRP message and the source MAC address recorded in the second node table. If yes, add the source MAC address of the PRP message to the second node table and record the reception time of the PRP message; otherwise, refresh the reception time of the PRP message recorded in the second node table.
2. The device according to claim 1, characterized in that, The MAC entry includes a MAC address and its corresponding port. The switching module performs packet forwarding based on the MAC entry, including: The destination MAC address of the packet is queried through the switching module; If the MAC entry stores the destination MAC address, the packet is forwarded to the port corresponding to the destination MAC address, including the port connected to the redundancy processing module; If the MAC entry does not store the destination MAC address, the message will be broadcast to all ports of the switching module.
3. The device according to claim 1, characterized in that, Also includes: If the redundancy processing module does not receive the PRP message again within a specified time, it deletes the source MAC address and reception time of the corresponding PRP message recorded in the second node table.
4. The device according to claim 1 or 3, characterized in that, The redundancy removal of at least one PRP message includes: When the redundancy processing module receives the PRP message, it queries the time when the same PRP message was last received. If the time difference between two received PRP messages is less than the set input forget time, then the received PRP message is deleted.
5. The device according to claim 1, characterized in that, The switching module and the redundancy processing module are implemented using programmable logic chips (FPGAs).
6. The device according to claim 1, characterized in that, It also includes a CPU processor for global management and function configuration of the switching module and the redundancy processing module.
7. A message transmission method, characterized in that, Performed by a PRP device with multiple redundant ports as described in any one of claims 1 to 6, the method includes: The switching module forwards the packets to be forwarded to the redundancy processing module. The redundancy processing module copies the packets forwarded by the switching module into several PRP packets, which are then forwarded outward through several Ethernet interface chips connected to it. The redundancy processing module receives at least one PRP message uploaded by several Ethernet interface chips, performs redundancy deletion on the at least one PRP message, and sends it to the switching module.
8. A computing device, characterized in that, include: processor; Memory, used to store one or more programs; When the processor executes the one or more programs, the processor implements a message transmission method as described in claim 7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a computer, the computer program implements a message transmission method as described in claim 7.
Citation Information
Patent Citations
Industrial Ethernet switch integrating PRP / HSR redundant protocols
CN106209694A