Method, device and storage medium for improving PROFINET master-slave chain reconstruction process in MRP ring network
By monitoring the MRP ring network status in real time and cache DCP_req messages in the PROFINET network, the problem of packet loss caused by network failure is solved, and the service link is quickly restored, which improves network reliability and availability.
Patent Information
- Application Number
- CN202411639901.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-11-18
AI Technical Summary
In the PROFINET network, a network failure causes the first DCP_req message sent by the PN master to fail to reach the slave, and the wait timeout of the master station stipulated in the protocol is too long, resulting in too long service recovery time.
By monitoring the status of the MRP redundant ring network in real time, obtaining the DCP_req message sent by the PN master station, and cache it in the message buffer. When the loop state changes from closed loop to open loop, it detects whether there are messages in the buffer, and sends the cached DCP_req message to the PN slave through the MRP master switch.
After the network reconstruction is completed, the first DCP_req message can arrive at the slave station in time, shortening the service reconstruction chain time between the PN master and slave stations, reducing it from a few seconds to tens to hundreds of milliseconds, and improving the PROFINET network Reliability and availability.
Smart Images

Figure CN119155140B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to PROFINET industrial Ethernet, and more particularly to a method, device and storage medium for improving a PROFINET master-slave chain reconstruction process in an MRP ring network. Background Art
[0002] PROFINET (hereinafter referred to as PN) is the 10th category fieldbus / industrial Ethernet standard published by IEC61158 and belongs to real-time Ethernet. In actual networking, in order to ensure the reliability and availability of the network, redundant transmission paths are usually used (such as ring topology, such as Figure 1 As shown in Figure 1, when a single point failure occurs in the network and causes a transmission path to fail, another replacement path can take effect and network communication can quickly return to normal. The Media Redundancy Protocol (MRP) is defined in PROFINET. MRP implements redundant transmission paths by monitoring and controlling the status of the ring Ethernet.
[0003] Real-time data in the PN network includes periodic interactive data between the PN master and slave. The typical real-time communication data refresh cycle between the PN master and slave is 1~128ms. The watchdog time means that if the PN device does not receive the other party's periodic data within this time, it is considered that the other party's device has a fault and triggers a fault report. The default watchdog time in the PN device is 3 times the data refresh cycle time, corresponding to a typical value of 3~384ms. The performance requirement for MRP in the PROFINET protocol is that when the network nodes are 50 and a single point failure occurs in the network, the network reconstruction time is no more than 200 milliseconds. This reconstruction time cannot meet the business requirements of a shorter data refresh cycle time (1~32ms). When a fault occurs in the network, the watchdog of these devices will time out, resulting in a business interruption between the PN master and slave, so that the business link between the PN master and slave needs to be re-established.
[0004] When the link needs to be rebuilt due to a network failure, the PN master station needs to send a DCP_req message and wait for the PN slave station to reply with a DCP_rsp message. However, since the network reconstruction has not been completed at this time, the first DCP_req message sent by the PN master station cannot reach the slave station. The PN master station needs to wait for a timeout (usually 2 seconds) before resending the DCP_req message. At this time, the network reconstruction is complete, and the PN slave station can receive this message and reply with a DCP_rsp message to the PN master station. After that, the PN master station and the slave station continue to rebuild the link process and restore normal business. Since the waiting timeout (2 seconds) is long, the overall PN business recovery time must be greater than 2 seconds. In contrast, the ring network reconstruction time is less than 200 milliseconds, but the PN business recovery time is greater than 2 seconds. The cause of the problem is that the first DCP_req message sent by the PN master station cannot reach the slave station, and the master station waiting timeout time (2 seconds) specified in the protocol is too long. Summary of the invention
[0005] The main purpose of this application is to provide a method, device and storage medium for improving the PROFINET master-slave chain reconstruction process in an MRP ring network, so as to solve the technical problem that the first DCP_req message sent by the PN master station cannot reach the slave station and the master station waiting timeout time specified in the protocol is too long.
[0006] To achieve the above object, the present invention provides a method for improving the PROFINET master-slave chain reconstruction process in an MRP ring network, comprising: real-time monitoring of the state of the MRP redundant ring network, and obtaining a DCP_req message sent by a PN master station in the MRP redundant ring network;
[0007] Cache the obtained DCP_req message into a message buffer through the MRP master switch in the MRP redundant ring network;
[0008] In response to monitoring that the state of the MRP redundant ring network changes from a closed-loop state to an open-loop state, detecting whether the message buffer is empty;
[0009] In response to determining that the message buffer is not empty, the DCP_req message is sent to the PN slave station through the MRP master switch.
[0010] Optionally, the step of caching the acquired DCP_req message into a message buffer through an MRP master switch in the MRP redundant ring network includes:
[0011] Determine, according to the station name corresponding to the DCP_req message, whether the DCP_req message corresponds to the MRP master switch;
[0012] In response to determining that the DCP_req message does not correspond to the MRP master switch, determining whether the MRP role corresponding to the MRP master switch is MRM;
[0013] In response to determining that the MRP role corresponding to the MRP master switch is MRM, determining a state of the MRP redundant ring network corresponding to the MRP master switch;
[0014] In response to determining that the state of the MRP redundant ring network corresponding to the MRP master switch is a closed loop state, the acquired DCP_req message and the corresponding current time are cached in a message buffer.
[0015] Optionally, in response to determining that the MRP role corresponding to the MRP master switch is not MRM, the DCP_req message is not saved.
[0016] Optionally, in response to determining that the state of the MRP redundant ring network corresponding to the MRP master switch is an open-loop state, the DCP_req message is not saved.
[0017] Optionally, in response to monitoring that the state of the MRP redundant ring network changes from a closed-loop state to an open-loop state, detecting whether the message buffer is empty includes:
[0018] In response to receiving a notification of a state change of the MRP redundant ring network, determining whether the state change is a change in the state of the MRP redundant ring network from a closed-loop state to an open-loop state;
[0019] In response to determining that the state change is that the state of the MRP redundant ring network changes from a closed-loop state to an open-loop state, it is determined whether there is a DCP_req message in the message buffer.
[0020] Optionally, in response to determining that the message buffer is not empty, sending the DCP_req message to the PN slave station through the MRP master switch includes:
[0021] In response to determining that the message buffer is not empty, selecting a DCP_req message from the message buffer;
[0022] Determining whether the DCP_req message is within the message validity period according to the current time corresponding to the DCP_req message;
[0023] In response to determining that the DCP_req message is within a message validity period, determining whether the working state of the MRP port of the MRP redundant ring network is changed from block to forward;
[0024] In response to the working state of the MRP port changing from block to forward, the MRP master switch sends the DCP_req message to the PN slave station through the MRP port.
[0025] Optionally, after the MRP master switch sends the DCP_req message to the PN slave station through the MRP port in response to the working state of the MRP port changing from block to forward, the method further includes:
[0026] Determine whether the message buffer is empty;
[0027] In response to determining that the message buffer is not empty, the DCP_req message is sent to the PN slave station through the MRP master switch.
[0028] Optionally, in response to the working state of the MRP port not changing from block to forward, determining whether the message buffer is empty;
[0029] In response to determining that the message buffer is empty, the MRP master switch does not send a DCP_req message to the PN slave station.
[0030] In addition, to achieve the above-mentioned purpose, the present invention also provides a device for improving the PROFINET master-slave chain reconstruction process in an MRP ring network, characterized in that the device for improving the PROFINET master-slave chain reconstruction process in an MRP ring network comprises: a memory, a processor, and a program for improving the PROFINET master-slave chain reconstruction process in an MRP ring network stored in the memory and executable on the processor, wherein the program for improving the PROFINET master-slave chain reconstruction process in an MRP ring network implements the steps of the method for improving the PROFINET master-slave chain reconstruction process in an MRP ring network as described in any one of the above when executed by the processor.
[0031] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, characterized in that a program for improving the PROFINET master-slave chain reconstruction process in an MRP ring network is stored on the computer-readable storage medium, and when the program for improving the PROFINET master-slave chain reconstruction process in the MRP ring network is executed by a processor, the steps of the method for improving the PROFINET master-slave chain reconstruction process in the MRP ring network as described in any one of the above are implemented.
[0032] Compared with the prior art, the present invention has the following beneficial effects:
[0033] By real-time monitoring of the state of the MRP redundant ring network, and obtaining the DCP_req message sent by the PN master station in the MRP redundant ring network; caching the obtained DCP_req message into the message buffer through the MRP master switch in the MRP redundant ring network; in response to monitoring that the state of the MRP redundant ring network changes from a closed loop state to an open loop state, detecting whether the message buffer is empty; in response to determining that the message buffer is not empty, sending the DCP_req message to the PN slave station through the MRP master switch. This embodiment makes up for the defects of the chain reconstruction process in the PROFINET protocol, and can solve the problem of abnormal discarding of DCP_req due to network failure and long PN service recovery time; it can greatly shorten the service chain reconstruction time between PN master and slave stations, reducing it from several seconds to tens to hundreds of milliseconds; and further improve the reliability and availability of the PROFINET network. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 Schematic diagram of MRP ring network topology of PROFINET in an embodiment of the present invention;
[0035] Figure 2 A schematic diagram of an embodiment of a method for improving a PROFINET master-slave chain reconstruction process in an MRP ring network in an embodiment of the present invention;
[0036] Figure 3 A schematic diagram of a cache flow of a DCP_req message of a method for improving a PROFINET master-slave chain reconstruction process in an MRP ring network in an embodiment of the present invention;
[0037] Figure 4 A schematic diagram of a retransmission flow of a DCP_req message in a method for improving a PROFINET master-slave chain reconstruction process in an MRP ring network in an embodiment of the present invention;
[0038] Figure 5 The present invention is a schematic diagram of an embodiment of a device for improving a PROFINET master-slave chain reconstruction process in an MRP ring network. DETAILED DESCRIPTION
[0039] The main purpose of the present invention is to provide a method for improving the PROFINET master-slave chain reconstruction process in an MRP ring network; when the MRP ring network fails, it can still ensure that the first DCP_req message can reach the slave station after the network reconstruction is completed, without relying on the DCP_req message resent by the PN master station; and the DCP_rsp message restored by the PN slave station can reach the PN master station normally. Then, the chain reconstruction time of the PN master station and the slave station does not need to wait for an extra 2s timeout, but can be completed within hundreds of milliseconds.
[0040] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0041] When a single point failure occurs in the MRP ring network, triggering the PN master and slave watchdog timeout failure, the service recovery time between the PN master and slave is greater than 2 seconds. The reason for this problem is that before the MRP ring network reconstruction is completed, when the PN master and slave reestablish the chain, the first DCP_req message sent by the master cannot be transmitted to the PN slave. Although the MRP ring network reconstruction is completed within 200 milliseconds, the master still needs to wait for 2 seconds before the timeout, and then resend the DCP_req message to continue the chain reconstruction process.
[0042] In view of the cause of the problem, if it can be ensured that the first DCP_req message sent by the PN master station is delivered to the slave station in time after the MRP ring network reconstruction is completed, the reconstruction chain of the PN service can be completed within hundreds of milliseconds. Figure 1 , is a schematic diagram of the MRP ring network topology of PROFINET in an embodiment of the present invention;
[0043] from Figure 1 It can be seen from the topology that the MRP master switch is responsible for monitoring the status of the ring network and can obtain the DCP_req message sent by the PN master station. By caching the DCP Req message sent by the PN master station in the MRP master switch, after the ring network reconstruction is completed, the MRP master switch immediately resends the DCP_req message on behalf of the PN master station, thereby not relying on the retransmission mechanism of the PN master station itself. Since the message retransmission is performed after the ring network reconstruction is completed, the DCP_req message resent by the switch can reach the PN slave station, and the DCP_rsp message replied by the PN slave station can also be received by the PN master station, thereby speeding up the process of rebuilding the service chain between the PN master and slave stations.
[0044] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 2 , is a schematic diagram of an embodiment of a method for improving a PROFINET master-slave chain reconstruction process in an MRP ring network in an embodiment of the present invention; comprising:
[0045] Step 201, monitor the status of the MRP redundant ring network in real time, and obtain the DCP_req message sent by the PN master station in the MRP redundant ring network.
[0046] It is understandable that the execution subject of the present invention may be a method for improving the PROFINET master-slave chain reconstruction process in an MRP ring network, or a terminal or a server, which is not specifically limited here. The embodiment of the present invention is described by taking a server as the execution subject as an example.
[0047] The execution subject may be an MRP (Media Redundancy Protocol) master switch; the MRP master switch is responsible for monitoring the state of the ring network and can obtain the DCP_req message sent by the PN master station. The state of the ring network may include a closed loop state and an open loop state, wherein the closed loop state may be a fault state. When the ring network link is interrupted or faulty, such as a certain line is damaged or a port of a certain device has a problem, the ring network will be in an open state. If neither of the two interfaces of the manager receives the detection frame from the other, the ring network is considered to be in an open state. In this state, data transmission may be affected or even interrupted, and timely troubleshooting and repair are required to restore the normal operation of the ring network. The open loop state may be a normal state. In this state, all devices in the ring network are working normally and connected completely, and data can be transmitted normally on the ring network. The device as the MRP manager will periodically send MRP detection data frames on the two ring network interfaces. The MRP client on the ring network will only forward the MRP detection frames on the ring network interface. If any ring network interface of the manager can receive the detection frame of the other interface, the ring network is considered to be closed. At this time, the network communication is stable and can meet the normal operation requirements of the system.
[0048] Step 202: Cache the acquired DCP_req message into a message buffer through the MRP master switch in the MRP redundant ring network.
[0049] The above execution subject can buffer the DCP Req message sent by the PN master station in the MRP master switch.
[0050] Optionally, caching the acquired DCP_req message into a message buffer through the MRP master switch in the MRP redundant ring network includes: determining whether the DCP_req message corresponds to the MRP master switch according to the station name corresponding to the DCP_req message; in response to determining that the DCP_req message does not correspond to the MRP master switch, determining whether the MRP role corresponding to the MRP master switch is MRM; in response to determining that the MRP role corresponding to the MRP master switch is MRM, determining a state of the MRP redundant ring network corresponding to the MRP master switch; in response to determining that the state of the MRP redundant ring network corresponding to the MRP master switch is a closed-loop state, caching the acquired DCP_req message and the corresponding current time into a message buffer.
[0051] The above-mentioned station name corresponds to the MRP master switch. After identifying it as a message sent by the PN master station to other PN slave stations, it is determined whether the MRP role corresponding to the MRP master switch is MRM; the above-mentioned MRP roles can be MRM (MediaRedundancy Manager), MRP Client (media redundancy client) and Redundant Port (redundant port); MRM is usually the core device responsible for managing redundancy in the network, which can monitor the network status, control the status switching of redundant ports, etc.; after determining that the MRP role corresponding to the MRP master switch is MRM, the status of the MRP redundant ring network corresponding to the MRP master switch is determined; after determining that the status of the MRP redundant ring network corresponding to the MRP master switch is a closed loop state, the acquired DCP_req message and the corresponding current time are cached in the message buffer.
[0052] Optionally, in response to determining that the MRP role corresponding to the MRP master switch is not MRM, the DCP_req message is not saved.
[0053] Optionally, in response to determining that the state of the MRP redundant ring network corresponding to the MRP master switch is an open-loop state, the DCP_req message is not saved.
[0054] Regarding the cache of DCP_req messages, such as Figure 3 As shown, it is a schematic diagram of a cache process of a DCP_req message of a method for improving a PROFINET master-slave chain reconstruction process in an MRP ring network in an embodiment of the present invention;
[0055] On the MRP master switch of the MRP redundant ring network, the DCP_req message sent by the PN master station is captured, and after identifying it as a message sent by the PN master station to other PN slave stations, the current state of the MRP ring network is judged. If the conditions are met, the message is cached.
[0056] When the execution subject receives the DCP_req message;
[0057] Determine whether the corresponding station name is the switch device;
[0058] When the station name is the switch device, the original processing flow of the device is followed;
[0059] When the station name is not the switch device, determine whether the MRP role is MRM;
[0060] If not, the message is not cached.
[0061] If so, determine whether MRP is in a closed loop state;
[0062] If MRP is in a closed-loop state, save this message and record the current time.
[0063] If the MRP is not in a closed loop state, the message is not cached.
[0064] Step 203: in response to monitoring that the state of the MRP redundant ring network changes from a closed-loop state to an open-loop state, detecting whether the message buffer is empty.
[0065] The execution subject can monitor that the state of the MRP redundant ring network changes from a closed loop state to an open loop state, and detect whether the message buffer is empty. That is, if the MRP controller switch finds that a fault occurs in the network, the ring network changes from an open loop state to a closed loop state, and a link switching is required, then after completing the link switching, the ring network changes from a closed loop state to an open loop state; and checks whether there is a DCP_req message cached.
[0066] Optionally, in response to monitoring that the state of the MRP redundant ring network changes from a closed-loop state to an open-loop state, detecting whether the message buffer is empty includes: in response to receiving a state change notification of the MRP redundant ring network, determining whether the state change is that the state of the MRP redundant ring network changes from a closed-loop state to an open-loop state; in response to determining that the state change is that the state of the MRP redundant ring network changes from a closed-loop state to an open-loop state, determining whether there is a DCP_req message in the message buffer.
[0067] The above-mentioned state change notification can be that the ring network changes from an open loop state to a closed loop state or from a closed loop state to an open loop state; when it is determined that the state change is that the state of the MRP redundant ring network changes from a closed loop state to an open loop state, it is determined whether there is a DCP_req message in the message buffer.
[0068] Step 204: In response to determining that the message buffer is not empty, the DCP_req message is sent to the PN slave station through the MRP master switch.
[0069] It is determined that the message buffer is not empty, and the DCP_req message is sent to the PN slave station through the MRP master switch; a PN (PROFINET) master station can correspond to multiple PN slave stations, and there is no fixed standard for the specific number.
[0070] Optionally, in response to determining that the message buffer is not empty, sending the DCP_req message to the PN slave station through the MRP master switch includes: in response to determining that the message buffer is not empty, selecting a DCP_req message from the message buffer; determining whether the DCP_req message is within the message validity period according to the current time corresponding to the DCP_req message; in response to determining that the DCP_req message is within the message validity period, determining whether the working state of the MRP port of the MRP redundant ring network is changed from block to forward; in response to the working state of the MRP port being changed from block to forward, the MRP master switch sends the DCP_req message to the PN slave station through the MRP port.
[0071] The saved current time is the message cache time, and the message cache time and the current processing time are within 50ms, that is, the DCP_req message is within the message validity period; when the MRP (Media Redundancy Protocol) port changes from the "block" state to the "forward" state, it means that an important change has occurred in the working state of the port. In the "block" state, the port is blocked, usually to prevent problems such as loops in the network. When it changes to the "forward" state, the port starts forwarding data. This state change may be due to a change in the network topology or a readjustment of the redundancy mechanism. For example, when a failure is detected in the main link, the port of the redundant link may switch from the "block" state to the "forward" state to ensure normal data transmission.
[0072] Optionally, after the MRP master switch sends the DCP_req message to the PN slave station through the MRP port in response to the working state of the MRP port changing from block to forward, the method further includes: determining whether the message buffer is empty; in response to determining that the message buffer is not empty, sending the DCP_req message to the PN slave station through the MRP master switch.
[0073] Optionally, in response to the working state of the MRP port not changing from block to forward, determining whether the message buffer is empty; in response to determining that the message buffer is empty, the MRP master switch does not send a DCP_req message to the PN slave station.
[0074] Regarding the retransmission of the cached DCP_req message, such as Figure 4 , which is a schematic diagram of a retransmission process of a DCP_req message of a method for improving a PROFINET master-slave chain reconstruction process in an MRP ring network in an embodiment of the present invention;
[0075] If the MRP controller switch finds a fault in the network and the ring network changes from closed to open, link switching is required, it checks whether there are DCP_req messages cached after completing the link switching. If so, these cached messages are resent to the network.
[0076] Receiving a status change notification of the MRP redundant ring network;
[0077] Determine whether the state of the MRP redundant ring network changes from a closed loop state to an open loop state;
[0078] If not, the DCP_req message is not resent.
[0079] If yes, determine whether the DCP Req message is cached;
[0080] If not, the DCP_req message is not resent.
[0081] If yes, take a cached message and determine whether the message is within the validity period (the message cache time and the current processing time are within 50ms);
[0082] If so, the MRP ring port changes from block to forward;
[0083] If so, send the cached message through this port;
[0084] If not, determine whether the message buffer is empty;
[0085] If not, take a cached message;
[0086] If yes, the DCP_req message is not resent.
[0087] This embodiment monitors the state of the MRP redundant ring network in real time, and obtains the DCP_req message sent by the PN master station in the MRP redundant ring network; caches the obtained DCP_req message in the message buffer through the MRP master switch in the MRP redundant ring network; in response to monitoring that the state of the MRP redundant ring network changes from a closed loop state to an open loop state, detects whether the message buffer is empty; in response to determining that the message buffer is not empty, sends the DCP_req message to the PN slave station through the MRP master switch. This embodiment makes up for the defects of the chain reconstruction process in the PROFINET protocol, and can solve the problem of abnormal discarding of DCP_req due to network failure and long PN service recovery time; it can greatly shorten the service chain reconstruction time between PN master and slave stations, reducing it from several seconds to tens to hundreds of milliseconds; and further improve the reliability and availability of the PROFINET network.
[0088] The following describes in detail the device for improving the PROFINET master-slave chain reconstruction process in the MRP ring network in the embodiment of the present invention from the perspective of hardware processing.
[0089] Figure 5 1 is a schematic diagram of the structure of a device for improving the PROFINET master-slave chain reconstruction process in an MRP ring network provided by an embodiment of the present invention. The device 500 for improving the PROFINET master-slave chain reconstruction process in an MRP ring network may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 510 (for example, one or more processors) and a memory 520, and one or more storage media 530 (for example, one or more mass storage devices) storing application programs 533 or data 532. Among them, the memory 520 and the storage medium 530 may be temporary storage or permanent storage. The program stored in the storage medium 530 may include one or more modules (not shown in the figure), and each module may include a series of computer program operations in the device 500 for improving the PROFINET master-slave chain reconstruction process in an MRP ring network. Furthermore, the processor 510 may be configured to communicate with the storage medium 530, and execute a series of computer program operations in the storage medium 530 on the device 500 for improving the PROFINET master-slave chain reconstruction process in an MRP ring network.
[0090] The device 500 for improving the PROFINET master-slave chain reconstruction process in the MRP ring network may also include one or more power supplies 540, two or more wired or wireless network interfaces 550, one or more input and output interfaces 560, and / or one or more operating systems 531, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, etc. It will be appreciated by those skilled in the art that Figure 5 The device structure of the improved PROFINET master-slave chain reconstruction process in the MRP ring network does not constitute a limitation on the device of the improved PROFINET master-slave chain reconstruction process in the MRP ring network, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0091] The present invention also provides a device for improving the PROFINET master-slave chain reconstruction process in an MRP ring network, comprising: a memory and at least one processor, wherein a computer program is stored in the memory, and the memory and the at least one processor are interconnected through a line; the at least one processor calls the computer program in the memory so that the device for improving the PROFINET master-slave chain reconstruction process in the MRP ring network executes the steps in the method for improving the PROFINET master-slave chain reconstruction process in the MRP ring network.
[0092] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. A computer program is stored in the computer-readable storage medium. When the computer program runs on a computer, the computer executes the steps of a method for improving the PROFINET master-slave chain reconstruction process in an MRP ring network.
[0093] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0094] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several computer programs to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
[0095] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for improving the PROFINET master-slave chain reconstruction process in an MRP ring network, characterized in that: include: Monitor the status of the MRP redundant ring network in real time and obtain the DCP_req message sent by the PN master station in the MRP redundant ring network; Cache the obtained DCP_req message into a message buffer through the MRP master switch in the MRP redundant ring network; In response to monitoring that the state of the MRP redundant ring network changes from a closed-loop state to an open-loop state, detecting whether the message buffer is empty; In response to determining that the message buffer is not empty, the DCP_req message is sent to the PN slave station through the MRP master switch.
2. A method for improving the PROFINET master-slave chain reconstruction process in an MRP ring network according to claim 1, characterized in that: The step of caching the acquired DCP_req message into a message buffer through the MRP master switch in the MRP redundant ring network includes: Determine, according to the station name corresponding to the DCP_req message, whether the DCP_req message corresponds to the MRP master switch; In response to determining that the DCP_req message does not correspond to the MRP master switch, determining whether the MRP role corresponding to the MRP master switch is MRM; In response to determining that the MRP role corresponding to the MRP master switch is MRM, determining a state of the MRP redundant ring network corresponding to the MRP master switch; In response to determining that the state of the MRP redundant ring network corresponding to the MRP master switch is a closed loop state, the acquired DCP_req message and the corresponding current time are cached in a message buffer.
3. A method for improving the PROFINET master-slave chain reconstruction process in an MRP ring network according to claim 2, characterized in that: The method further comprises: In response to determining that the MRP role corresponding to the MRP master switch is not MRM, the DCP_req message is not saved.
4. A method for improving the PROFINET master-slave chain reconstruction process in an MRP ring network according to claim 2, characterized in that: The method further comprises: In response to determining that the state of the MRP redundant ring network corresponding to the MRP master switch is a closed-loop state, the DCP_req message is not saved.
5. The method for improving the PROFINET master-slave chain reconstruction process in an MRP ring network according to claim 1, characterized in that: In response to monitoring that the state of the MRP redundant ring network changes from a closed-loop state to an open-loop state, detecting whether the message buffer is empty includes: In response to receiving a notification of a state change of the MRP redundant ring network, determining whether the state change is a change in the state of the MRP redundant ring network from a closed-loop state to an open-loop state; In response to determining that the state change is that the state of the MRP redundant ring network changes from a closed-loop state to an open-loop state, it is determined whether there is a DCP_req message in the message buffer.
6. The method for improving the PROFINET master-slave chain reconstruction process in an MRP ring network according to claim 1, characterized in that: In response to determining that the message buffer is not empty, sending the DCP_req message to the PN slave station through the MRP master switch includes: In response to determining that the message buffer is not empty, selecting a DCP_req message from the message buffer; Determining whether the DCP_req message is within the message validity period according to the current time corresponding to the DCP_req message; In response to determining that the DCP_req message is within a message validity period, determining whether the working state of the MRP port of the MRP redundant ring network is changed from block to forward; In response to the working state of the MRP port changing from block to forward, the MRP master switch sends the DCP_req message to the PN slave station through the MRP port.
7. A method for improving the PROFINET master-slave chain reconstruction process in an MRP ring network according to claim 6, characterized in that: After the MRP master switch sends the DCP_req message to the PN slave station through the MRP port in response to the working state of the MRP port changing from block to forward, the method further includes: Determine whether the message buffer is empty; In response to determining that the message buffer is not empty, the DCP_req message is sent to the PN slave station through the MRP master switch.
8. The method for improving the PROFINET master-slave chain reconstruction process in an MRP ring network according to claim 6, characterized in that: The method further comprises: In response to the working state of the MRP port not being changed from block to forward, determining whether the message buffer is empty; In response to determining that the message buffer is empty, the MRP master switch does not send a DCP_req message to the PN slave station.
9. A device for improving the PROFINET master-slave chain reconstruction process in an MRP ring network, characterized in that: The device for improving the PROFINET master-slave chain reconstruction process in an MRP ring network includes: a memory, a processor, and a program for improving the PROFINET master-slave chain reconstruction process in an MRP ring network stored in the memory and executable on the processor. When the program for improving the PROFINET master-slave chain reconstruction process in an MRP ring network is executed by the processor, the steps of the method for improving the PROFINET master-slave chain reconstruction process in an MRP ring network as described in any one of claims 1 to 8 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program for improving the PROFINET master-slave chain reconstruction process in an MRP ring network. When the program for improving the PROFINET master-slave chain reconstruction process in an MRP ring network is executed by a processor, the steps of the method for improving the PROFINET master-slave chain reconstruction process in an MRP ring network as described in any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Method and system for network closed-loop control and interactive acquisition terminal
CN101552720A
Method for realizing redundant ring and network recovery in Ethernet
CN101741674A