An Ethernet switching device and a control method thereof, an Ethernet network

CN121967354BActive Publication Date: 2026-08-11BEIJING FANGXIN SEMICON CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-03-31
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

图1图2 所示的环网通讯对主站软件的要求较高,且无法用于现有的非环形网络的改造升级,例如在主站只有一个端口的情况下,要实现环网冗余功能需要将主站更换为有两个端口的主站,增加成本

Benefits of technology

[0018]本申请提供了一种以太网交换设备及其控制方法、一种以太网网络。上述以太网交换设备包括0端口、1端口、2端口;所述0端口与主站建立双向通讯连接,所述1端口连接从站网络的首端,所述2端口连接从站网络的尾端;所述交换设备,用于控制所述0端口、1端口和2端口中的一个或多个处于开启状态或关闭状态,和/或,控制所述2端口处于反弹状态,以切换交换设备的运行模式,调整交换设备内的数据转发路径;所述反弹状态为2端口在接收到从站网络发送的数据后再从2端口向从站网络发送。这样本申请通过对交换设备的三个端口的控制,实现主站和从站网络之间的数据传输路径的切换,以保证整个网络完成完整的数据通讯,同时减少对主站硬件配置的依赖,尤其适用于仅具备单通信端口的主站场景。此外,为2端口配置反弹模式,实现数据在从站网络尾端的回传,使得即使主站仅有一个通信端口,也能通过该交换设备构建逻辑环路,实现环网冗余通信。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121967354B_ABST
    Figure CN121967354B_ABST
Patent Text Reader

Abstract

This application provides an Ethernet switching device and its control method, as well as an Ethernet network. Relating to the field of Ethernet technology, the Ethernet switching device includes port 0, port 1, and port 2; port 0 establishes a bidirectional communication connection with the master station, port 1 connects to the beginning of the slave network, and port 2 connects to the end of the slave network; the switching device is used to control one or more of ports 0, 1, and 2 to be in an on or off state and / or to control port 2 to be in a bounce state, thereby switching the operating mode of the switching device and adjusting the data forwarding path within the switching device; the bounce state means that port 2 receives data sent by the slave network and then sends it back to the slave network from port 2. By controlling the three ports of the switching device, the data transmission path between the master station and the slave network is switched, thus reducing the dependence on the master station's hardware configuration, and is particularly suitable for scenarios where the master station only has a single communication port.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Ethernet technology, and in particular to an Ethernet switching device and its control method, and an Ethernet network. Background Technology

[0002] Ethernet networks are often configured with redundancy to ensure that communication can continue even if a single point of failure occurs. Currently, such as... Figure 1 The diagram shows a ring network structure with ring redundancy. When a break occurs at a point in the ring network, bypassing the break can be achieved, such as... Figure 2 The diagram shows a communication path in a ring network. The frame path when no breakpoints occur is as follows: Figure 2 The dotted lines in the diagram illustrate this. When a breakpoint occurs, the master station will send frames from two ports in clockwise and counterclockwise directions respectively, allowing the frames to still pass through the data exchange modules of all slave stations, thus enabling read and write operations on the slave stations. However... Figure 1 and Figure 2 The ring network communication shown places high demands on the master station software and cannot be used for the transformation and upgrading of existing non-ring networks. For example, if the master station has only one port, to achieve ring network redundancy, the master station needs to be replaced with one with two ports, which increases costs. Summary of the Invention

[0003] In view of this, this application provides an Ethernet switching device and its control method, as well as an Ethernet network, which aims to reduce dependence on the master station and facilitate the upgrading and transformation of non-ring networks.

[0004] An Ethernet switching device is characterized by comprising port 0, port 1, and port 2; port 0 establishes a bidirectional communication connection with the master station, port 1 connects to the beginning of the slave network, and port 2 connects to the end of the slave network; the switching device is used to control one or more of ports 0, 1, and 2 to be in an on or off state, and / or control port 2 to be in a bounce state, so as to switch the operating mode of the switching device and adjust the data forwarding path within the switching device; the bounce state means that port 2 receives data sent by the slave network and then sends it back to the slave network from port 2.

[0005] Optionally, the switching device includes a port monitoring module and a switching module, wherein the switching module is connected to the port monitoring module; the port monitoring module is connected to ports 0, 1, and 2 of the switching device, and is used to monitor the physical connection status between the ports of the switching device and the slave network, as well as the data transmission and reception status and timing of the ports of the switching device; the switching module is used to switch the operating mode of the switching device in response to the physical connection status being disconnected, or the transmission and reception status or timing of the ports of the switching device changing.

[0006] Optionally, the switching module is further configured to switch the operating mode of the switching device to a 2-port bounce mode in response to the restoration of the physical connection state or the restoration of the transmission and reception timing of the switching device.

[0007] Optionally, the operating modes of the switching device include full-on mode, port 1-off mode, port 2-off mode, and port 2-reverse mode. In full-on mode, ports 0, 1, and 2 are all on, and the data forwarding path within the switching device is from port 0 to port 1, from port 1 to port 2, and from port 2 to port 0. In port 1-off mode, port 1 is off and ports 0 and 2 are on, and the data forwarding path within the switching device is bidirectional communication between ports 0 and 2. In port 2-off mode, port 2 is off and ports 0 and 1 are on, and the data forwarding path within the switching device is bidirectional communication between ports 0 and 1. In port 2-reverse mode, port 2 is in reverse state and ports 0 and 1 are on, and the data forwarding path within the switching device is bidirectional communication between ports 0 and 1. After receiving data, port 2 then sends it outside the switching device.

[0008] Optionally, the switching device further includes the data switching module configured on port 0, and / or the data switching module configured on port 2; the data switching module is used to forward data from the corresponding port to the next port, or to process the data from the corresponding port and then forward it to the next port.

[0009] Secondly, this application also provides a control method for an Ethernet switching device, applied to an Ethernet switching device as described in any one of the above claims, the method comprising:

[0010] Monitor the physical connection status between the port of the switching device and the slave network, as well as the data transmission and reception status and timing of the port of the switching device; in response to the physical connection status being disconnected, or the transmission and reception status or timing of the port of the switching device changing, switch the operating mode of the switching device; in response to the physical connection status being restored, or the transmission and reception timing of the switching device being restored, switch the operating mode of the switching device to 2-port bounce mode.

[0011] Optionally, switching the operating mode of the switching device when the physical connection is disconnected, or when the transmit / receive status or timing of the port of the switching device changes, includes:

[0012] If the physical connection between port 1 of the switching device and the head end of the slave network is detected to be disconnected, it is determined that there is a breakpoint at the head end of the slave network, and the system switches to port 1 closed mode. If the physical connection between port 2 of the switching device and the tail end of the slave network is detected to be disconnected, it is determined that there is a breakpoint at the tail end of the slave network, and the system switches to port 2 closed mode. In port 2 bounce mode, if port 1 receives data sent by the slave network before port 2, it is determined that there is a breakpoint in the slave network, and the system switches to full open mode.

[0013] Optionally, in response to the restoration of the transmission and reception timing of the switching device, the operating mode of the switching device is switched to a 2-port bounce mode, including:

[0014] In full-on mode, if port 2 receives data sent by the slave network first, while port 1 does not receive data sent by the slave network, it is determined that the breakpoint in the slave network has been restored, and the system switches back to port 2 bounce mode.

[0015] Optionally, the method further includes:

[0016] If the switch only receives data and does not send data on port 0, the switch is reset and restored to port 2 bounce mode.

[0017] Thirdly, this application also provides an Ethernet network, including a master station, a slave station network, and an Ethernet switching device as described in any one of the above, wherein the switching device uses the method described in any one of the above to realize complete data communication between the master station and the slave station network.

[0018] This application provides an Ethernet switching device and its control method, as well as an Ethernet network. The Ethernet switching device includes port 0, port 1, and port 2. Port 0 establishes a bidirectional communication connection with the master station, port 1 connects to the beginning of the slave network, and port 2 connects to the end of the slave network. The switching device controls one or more of ports 0, 1, and 2 to be in an on or off state, and / or controls port 2 to be in a bounce state, thereby switching the operating mode of the switching device and adjusting the data forwarding path within the switching device. The bounce state means that port 2 receives data sent by the slave network and then sends it back to the slave network from port 2. Thus, this application achieves switching of the data transmission path between the master station and the slave network by controlling the three ports of the switching device, ensuring complete data communication across the entire network while reducing dependence on the master station's hardware configuration, making it particularly suitable for master station scenarios with only a single communication port. Furthermore, configuring port 2 in bounce mode enables data to be transmitted back to the end of the slave network, allowing even if the master station has only one communication port, a logical loop can be constructed through the switching device to achieve redundant ring network communication. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in this embodiment or the prior art, the drawings used in the description of the embodiment or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a schematic diagram of a ring network structure provided in an embodiment of this application;

[0021] Figure 2 This application provides a schematic diagram of a communication path in a ring network.

[0022] Figure 3 This is a schematic diagram of the structure of an Ethernet switching device provided in an embodiment of this application;

[0023] Figure 4 This application provides a schematic diagram of a transmission path within a switching device under different modes, as illustrated in the embodiments of this application.

[0024] Figure 5 A schematic diagram of a switching device structure with data switching modules configured on both port 0 and port 2, provided for an embodiment of this application;

[0025] Figure 6 A schematic diagram of a switching device structure with a data switching module configured on two ports is provided in an embodiment of this application;

[0026] Figure 7 A flowchart illustrating a control method for an Ethernet switching device provided in an embodiment of this application;

[0027] Figure 8 This application provides a schematic diagram of the structure of a network communication path without breakpoints, as shown in the embodiments of this application.

[0028] Figure 9 This application provides a schematic diagram of the network communication path structure in full-open mode when there is a breakpoint in the middle of the slave network;

[0029] Figure 10 A schematic diagram of a communication path in port 1 closed mode when the slave network head end is offline, provided as an embodiment of this application;

[0030] Figure 11 A schematic diagram of the communication path in a 2-port closed mode when the slave network tail end is disconnected, provided as an embodiment of this application;

[0031] Figure 12This is a schematic diagram of a port transmit / receive timing provided in an embodiment of this application. Detailed Implementation

[0032] See Figure 1 and Figure 2 The illustrated ring topology has no switches and is identified and routed by the master station. The master station connects to the beginning and end of the slave network through two ports to establish a ring communication path. The master station reads the content of frames retrieved from the slave network for identification and performs routing by concatenating single and mutual transmissions. Frame content identification is generally achieved through the WKC (Working Count) mechanism; each successful data exchange with a slave increases the slave's WKC. Specifically, when the ring topology is normal, the master station can access all slaves by sending a frame from one port. This frame returns to the master station from the other port, and the WKC count remains normal. If the ring topology is abnormal, the WKC in the returned frame will differ from the expected value. The master station identifies the break in the loop and sends frames from both ports. These two frames will backtrack at the break point and return to the master station from their respective ports. After receiving these two frames, the master station extracts the portion with a normal WKC, thus completing the read and write operations for all slaves. This master-dependent design increases the requirements for the master station software. Furthermore, the main station needs to have two ports. Upgrading or transforming a non-ring network, such as one where the main station only has one port, requires replacing the main station, which increases costs.

[0033] To address the aforementioned issues, this application provides an Ethernet switching device and its control method, as well as an Ethernet network. The Ethernet switching device includes port 0, port 1, and port 2. Port 0 establishes a bidirectional communication connection with the master station, port 1 connects to the beginning of the slave network, and port 2 connects to the end of the slave network. The switching device controls one or more of ports 0, 1, and 2 to be in an on or off state, and / or controls port 2 to be in a bounce state, thereby switching the operating mode of the switching device and adjusting the data forwarding path within the switching device. The bounce state means that port 2 receives data sent by the slave network and then sends it back to the slave network from port 2. By controlling the three ports of the switching device, the data transmission path between the master station and the slave network is switched, ensuring complete data communication across the entire network while reducing dependence on the master station's hardware configuration, making it particularly suitable for master station scenarios with only a single communication port. Furthermore, configuring port 2 in bounce mode enables data to be transmitted back to the end of the slave network, allowing a logical loop to be constructed through the switching device even if the master station has only one communication port, achieving redundant ring network communication.

[0034] To provide a more detailed understanding of the features and technical content of the embodiments of this disclosure, the implementation of the embodiments of this disclosure will be described in detail below with reference to the accompanying drawings. The accompanying drawings are for illustrative purposes only and are not intended to limit the embodiments of this disclosure. In the following technical description, for ease of explanation, several details are used to provide a full understanding of the disclosed embodiments. However, one or more embodiments may still be implemented without these details. In other cases, well-known structures and devices may be simplified in their depiction to simplify the drawings.

[0035] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this disclosure described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion.

[0036] Unless otherwise stated, the term "multiple" means two or more. In embodiments of this disclosure, the character " / " indicates that the preceding and following objects are in an "or" relationship. For example, A / B means: A or B. The term "and / or" describes an association between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or, A and B.

[0037] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0038] See Figure 3 , Figure 3 This is a schematic diagram of the structure of an Ethernet switching device provided in an embodiment of this application. The Ethernet switching device includes port 0, port 1, and port 2. Port 0 establishes a bidirectional communication connection with the master station, port 1 connects to the beginning of the slave network, and port 2 connects to the end of the slave network.

[0039] Port 1 enables bidirectional communication with the head end of the slave network, and port 2 enables bidirectional communication with the tail end of the slave network. The slave network can be a linear network structure composed of multiple cascaded slave devices, where each slave interacts with data via the Industrial Ethernet protocol.

[0040] Optionally, the aforementioned master station can be a slave station. In this application, the breakpoint analysis and communication path switching are completed by the switching equipment, without the need for... Figure 1 and Figure 2 The ring topology in the system depends on the master station.

[0041] The switching device is used to control one or more of the ports 0, 1, and 2 to be in an on or off state, and / or to control port 2 to be in a bounce state, so as to switch the operating mode of the switching device and adjust the data forwarding path within the switching device; the bounce state means that port 2 receives data sent by the slave network and then sends it to the slave network from port 2.

[0042] In a switching device, port 0 can remain open. If port 1 is closed, port 1 neither receives nor sends external data, and internal data is transmitted between port 0 and port 2. If port 2 is closed, port 2 neither receives nor sends external data, and internal data is transmitted between port 0 and port 1.

[0043] Furthermore, port 2 can also operate in bounce mode, where data within the switching device is transmitted between ports 0 and 1. Port 2 receives data from the slave network and sends it directly to the slave network, or processes it and sends it back to the slave network. Therefore, port 2 no longer forwards received data to port 0, but instead sends it directly back to the slave network, thus enabling real-time response and processing of data at the tail end of the slave network.

[0044] Based on the aforementioned switching equipment, the data transmission path between the master station and slave station networks can be switched by controlling the three ports of the switching equipment, so as to ensure that the entire network can complete complete data communication, while reducing the dependence on the master station hardware configuration. It is especially suitable for master station scenarios with only a single communication port, so that even if the master station has only one communication port, a logical loop can be built through the switching equipment to achieve ring network redundant communication.

[0045] Based on the above embodiments, see Figure 4 The diagram shows a transmission path within a switching device under different modes. The operating modes of the switching device in this application may include: full-on mode, port 1 closed mode, port 2 closed mode, and port 2 bounce mode.

[0046] like Figure 4 (a) In full-on mode, ports 0, 1, and 2 are all enabled. The data forwarding path within the switch is from port 0 to port 1, from port 1 to port 2, and from port 2 to port 0. Simultaneously, ports 0, 1, and 2 can all receive and send data.

[0047] like Figure 4(b) In port 1 closed mode, port 1 is closed, and data is only exchanged through ports 0 and 2, with bidirectional transmission between ports 0 and 2 via a forwarding path. Port 1 neither receives nor sends data. Both ports 0 and 2 can receive and send data.

[0048] like Figure 4 (c) In port 2-off mode, port 2 is off while ports 0 and 1 are on. The data forwarding path within the switch is bidirectional communication between ports 0 and 1. Port 2 neither receives nor sends data. Both ports 0 and 1 can receive and send data.

[0049] like Figure 4 (d) In the 2-port bounce mode, port 2 is in bounce mode while ports 0 and 1 are both open. The data forwarding path within the switch is bidirectional communication between ports 0 and 1. Port 2 receives data and then sends it outside the switch. Port 0 can interact with the master station, port 1 can interact with the slave network, and port 2 directly sends back the received slave data or processes it before sending it back to the slave network. In this mode, data achieves rapid response at the tail end without passing through the master station, thus reducing communication latency.

[0050] Based on the above Figure 4 In the embodiments described above, the switching device may further include a data switching module configured on port 0, and / or a data switching module configured on port 2;

[0051] The data exchange module is used to forward data from the corresponding port to the next port, or to process the data from the corresponding port and then forward it to the next port.

[0052] In one example, see Figure 5 A schematic diagram of a switching device structure in which data switching modules are configured on both port 0 and port 2.

[0053] like Figure 5 (a) In full-on mode, both ports 0 and 2 are configured with data exchange modules. Data from port 0 is forwarded to port 1 via the data exchange module of port 0 (which may or may not process the transmitted data depending on the configuration) and output to the slave network. Data received by port 1 from the slave network is forwarded to the data processing module of port 2. The data processing module of port 2 outputs through port 2. Data received by port 2 from the slave network is sent to port 0 via the data exchange module of port 2 and then forwarded to the master station from port 0.

[0054] like Figure 5(b) In the port 1 closed mode, port 1 is closed, and bidirectional data forwarding is achieved between ports 0 and 2 through their respective data exchange modules. After receiving data from the master station, port 0 processes it through its data exchange module or transmits it directly to the data exchange module of port 2, and then port 2 sends it to the slave network. Data returned from the slave network is received by port 2 and forwarded to port 0 through its data exchange module, and then transmitted back to the master station from port 0, thus realizing bidirectional communication between the master station and the slave station.

[0055] like Figure 5 (c) In port 2 closed mode, the data exchange module on port 0 forwards the received master station data directly to port 1, which then sends it to the slave network. Data returned by the slave is received by port 1, processed by the data exchange module on port 0, or directly transmitted to port 0, and then transmitted back to the master station from port 0. At this time, port 2 is closed and does not participate in any data transmission or reception.

[0056] like Figure 5 (d) In the port 2 bounce mode, the data exchange module on port 0 forwards the received master station data directly to port 1, from which port 1 sends it to the slave network. The data returned by the slave is received by port 1, processed by the data exchange module on port 0, or directly transmitted to port 0, and then transmitted back to the master station from port 0. At this time, port 2 is in bounce mode, and the received slave data is processed by the data processing module on port 2 and then output from port 2 to the slave network.

[0057] In one example, see Figure 6 A schematic diagram of a switching device with a data exchange module configured on two ports.

[0058] like Figure 6 (a) In full-open mode, only port 2 is configured with a data exchange module. The master station data received by port 0 is directly forwarded to the slave network via port 1. The data returned by the slave station is received by port 1 and processed by the data exchange module of port 2 or directly transmitted to port 2 for output to the slave network. The data fed back by the slave network is transmitted to port 0 via the data exchange module of port 2.

[0059] like Figure 6 (b) In the port 1 closed mode, port 1 is closed, and bidirectional data forwarding is achieved between port 0 and port 2 through the data exchange module of port 2.

[0060] like Figure 6 (c) In port 2 closed mode, ports 0 and 1 are directly connected. Data from the master station enters through port 0 and is forwarded to the slave network through port 1. Data returned from the slave station is received by port 1 and then transmitted back to the master station through port 0. At this time, port 2 is closed, and the data exchange module on port 2 does not participate in data transmission.

[0061] like Figure 6 (d) In the 2-port bounce mode, the master station data received by port 0 is forwarded to the slave network via port 1. The data returned by the slave is received by port 1 and fed back to port 0. Port 2 processes the received slave data according to the configuration or directly returns it to the slave network through the data exchange module of port 2.

[0062] Of course, a data exchange module can also be configured on port 0, which is the same principle as configuring a data exchange module on port 2, and will not be elaborated here.

[0063] Optionally, the data exchange module configured above can perform parsing, verification, filtering, or forwarding of the received data according to the configuration.

[0064] Based on the above embodiments, the switching device of this application may further include a port monitoring module and a switching module, with the switching module connected to the port monitoring module. Through the cooperation of the port monitoring module and the switching module, the switching of the switching device's operating mode is performed, specifically as follows:

[0065] In one possible implementation, the port monitoring module is used to monitor the physical connection status between the port of the switching device and the slave network, as well as the data transmission and reception status and timing of the port of the switching device.

[0066] The data transmission and reception status of the above ports can include receiving data only, sending data only, and receiving and sending data (receiving and sending data). In addition, port 2 is also configured with the above-mentioned bounce status.

[0067] The switching module is used to switch the operating mode of the switching device in response to the physical connection being disconnected or the transmit / receive status or transmit / receive timing of the port of the switching device changing.

[0068] The switching equipment connects to the slave network and has the function of detecting whether the other device connected to each port has gone offline (the physical connection between the two is broken). The port monitoring module is used to monitor the on / off status of the physical connection between the port of the switching equipment and the slave network; the switching module switches the operating mode of the switching equipment according to the on / off status of the physical connection. Therefore, after the port monitoring module detects that the slave network has gone offline, it changes the state of the port according to the location of the offline. For example, if the first end goes offline, the switching module switches the switching equipment to port 1 off mode, thereby modifying the data forwarding path inside the switching equipment (through bidirectional communication between port 2 and the slave network), to bypass the offline port 1 (e.g., port 1 is offline). Figure 10 ).

[0069] Furthermore, the aforementioned switching equipment can also monitor the data frame transmission and reception times of each port (including port 0, port 1, and port 2) through a port monitoring module, and determine whether there is a breakpoint in the slave network connected to ports 1 and 2 based on the frame transmission and reception sequence. For example, in port 2 bounce mode, the normal transmission path is port 0 → port 1 → slave network → port 2 → slave network → port 1 → port 0. That is, after port 1 sends data, port 2 receives the data before port 1. However, if port 1 receives the data before port 2 (port 2 has no data), a breakpoint is detected in the slave network, and the data frame cannot be transmitted to port 2. To ensure communication integrity, the switching module switches the switching equipment from port 2 bounce mode to full-open mode, ensuring that slaves closer to port 1 from the breakpoint send and receive data through port 1, and slaves closer to port 2 from the breakpoint send and receive data through port 2. The internal data forwarding path of the switching equipment is modified, and the slave network automatically folds back to bypass the breakpoint (e.g., ...). Figure 9 ).

[0070] Furthermore, the switching module is also used to switch the operating mode of the switching device to port 2 bounce mode in response to the restoration of the physical connection state (e.g., restoration of the connection between port 1 or port 2 and the slave network), or restoration of the transmit and receive timing of the switching device (e.g., restoration of the connection at an intermediate breakpoint, restoration of transmit and receive timing).

[0071] Based on the embodiments of the Ethernet switching device described above, this application also provides a control method for the Ethernet switching device described in any of the above embodiments, see [link to relevant documentation]. Figure 7 The diagram illustrates a control method for an Ethernet switching device. The control method for an Ethernet switching device includes:

[0072] S701. Monitor the physical connection status between the port of the switching device and the slave network, as well as the data transmission and reception status and timing of the port of the switching device.

[0073] The switching device connects to the slave network and has a disconnection detection function to detect whether the other connected device has gone offline (the physical connection between the two devices is broken). For example, the aforementioned monitoring of the physical connection status could be that the switching device detects that the physical connection between port 1 of the switching device and the slave network is either disconnected or connected, or detects that the physical connection between port 2 of the switching device and the slave network is either disconnected or connected. Then, if the switching device detects that the port connection is broken, it executes the subsequent step S702 to switch the operating mode of the switching device.

[0074] S702. In response to the physical connection being disconnected, or the transmit / receive status or transmit / receive timing of the port of the switching device changing, the operating mode of the switching device is switched.

[0075] In one example, in response to a slave network outage, the port status is changed based on the location of the outage. For instance, if the headend goes offline, the switching module switches the switching device to port 1 shutdown mode, thereby modifying the internal data forwarding path of the switching device (which uses port 2 for bidirectional communication with the slave network) to bypass the offline port 1. Figure 10 As shown.

[0076] S703. In response to the restoration of the physical connection state or the restoration of the transmission and reception timing of the switching device, the operating mode of the switching device is switched to 2-port bounce mode.

[0077] Based on the above method, this application can determine whether the connectivity of the slave network is abnormal by monitoring the communication status of the switching device ports, thereby dynamically adjusting the operating mode of the switching device and adjusting the data forwarding path to ensure the continuity and reliability of communication. This eliminates the need for software configuration from the master station, reducing reliance on the master station.

[0078] Based on the above method, for step S702, based on the above-mentioned operating mode of the switching equipment, the specific implementation method can be as follows:

[0079] If the physical connection between port 1 of the switching device and the headend of the slave network is broken, a breakpoint is determined at the headend of the slave network. The system switches to port 1-off mode, thereby modifying the data forwarding path within the switching device (using port 2 for bidirectional communication with the slave network) to bypass the disconnected port 1 (e.g., ...). Figure 10 );

[0080] If the physical connection between port 2 of the switching device and the slave network endpoint is broken, a breakpoint is identified at the slave network endpoint. The system switches to port 2-off mode, thereby modifying the internal data forwarding path of the switching device (using port 1 for bidirectional communication with the slave network) to bypass the disconnected port 2 (e.g., ...). Figure 11 );

[0081] In port 2 bounce mode, if port 1 receives data sent by the slave network before port 2, it is determined that there is a breakpoint in the slave network, and the system switches to full-open mode (e.g., ...). Figure 9 (As shown).

[0082] Furthermore, after the breakpoint is recovered, step S703 is executed, in response to the restoration of the physical connection state or the restoration of the transmission and reception timing of the switching device, the operating mode of the switching device is switched to 2-port bounce mode.

[0083] In the example where the breakpoint occurs in the middle of the slave network, if port 1 receives data sent by the slave network before port 2, it is determined that there is a breakpoint in the middle of the slave network, and port 2 of the switching device switches from bounce mode to full open mode.

[0084] When the switching equipment is running normally (without interruptions), it can be in port 2 bounce mode. See [link / reference]. Figure 8 The diagram shows a network communication path without interruption. Its output transmission path is port 0 → port 1 → slave network → port 2 (bounce state) → slave network → port 1 → port 0. Therefore, under normal operation, port 1 sends out data, port 2 receives the data first, and port 1 receives the data later.

[0085] In the example where the breakpoint occurs between slave stations in a slave network, after port 1 sends data, the data will be directly redirected at the breakpoint. At this point, port 2 will not receive the data, while port 1 will receive the redirected data before port 2. Therefore, when it is detected that port 1 receives data earlier than port 2, it is determined that there is a breakpoint in the slave network, and in this case, it is necessary to switch to full-on mode. Figure 9 The diagram shows the network communication path structure in full-open mode when there is a breakpoint in the middle of the slave network. Ports 1 and 2 are both open. At this time, data from port 0 is sent to port 1. Port 1 sends data to the slave station closest to port 1 from the breakpoint and then returns to port 1. The data is forwarded from port 1 to port 2. Port 2 sends data to the slave station closest to port 2 from the breakpoint and then returns to port 2. After receiving the data, port 2 sends it back to port 0.

[0086] Furthermore, when the switching device is operating in full-on mode, if it is detected that port 2 receives data sent by the slave network first, while port 1 does not receive data sent by the slave network, it is determined that the breakpoint in the slave network has been restored, and the device switches back to port 2 bounce mode.

[0087] like Figure 9 When there is a breakpoint in the slave network, the communication path in full-on mode can be: Port 0 → Port 1 → Slave network (the network closest to Port 1 from the breakpoint) → Port 1 → Port 2 (open state) → Slave network (the network closest to Port 2 from the breakpoint) → Port 2 → Port 0.

[0088] Based on the fully open mode described above, when the communication path changes back to port 0 → port 1 → slave network → port 2 → port 0, port 2 normally receives data and sends it back to port 0, while port 1 no longer receives data back. This indicates that the breakpoint in the slave network has been recovered. Therefore, if port 2 receives data before port 1 (port 1 did not receive data sent by the slave network), the breakpoint can be confirmed to have been recovered, and the system can be switched back to port 2's bounce mode to resume the normal communication flow (port 0 → port 1 → slave network → port 2 → slave network → port 1 → port 0).

[0089] In this way, the data reception timing of the two ports (port 1 and port 2) is continuously monitored and judged to ensure that when the intermediate breakpoint of the slave network occurs again, it can respond in a timely manner and switch modes, thus ensuring the continuity and stability of slave network communication, realizing automatic fault tolerance and rapid recovery, and improving the reliability and operating efficiency of the overall industrial communication system.

[0090] In the example where the breakpoint appears at the beginning of the slave network, such as Figure 10 The diagram illustrates the communication path in port 1 closed mode when the head end of a slave network goes offline. If the switching device detects a physical disconnection at port 1 of the slave network head end, it determines that a break has occurred at the slave network head end and switches to port 1 closed mode. If the switching device detects that the physical connection with the slave network head end has been restored at port 1 of the slave network head end, it switches back to port 2 bounce mode.

[0091] like Figure 10 If the slave network leader goes offline, the communication path in port 1 closed mode is: port 0 → port 2 → slave network (slave network leader back) → port 2 → port 0. During the period when the physical connection of port 1 is disconnected, the data interacting with the slave network is transmitted through port 2.

[0092] In an example where the breakpoint appears at the end of the slave network, such as... Figure 11 The diagram illustrates the communication path in port 2-off mode when the slave network terminator goes offline. If the switching device detects a physical disconnection at port 2 of the slave network terminator, it determines that a breakpoint has occurred at the slave network terminator and switches to port 2-off mode. If the switching device detects that the physical connection with the slave network terminator has been restored at port 2 of the slave network, it switches back to port 2-rebound mode.

[0093] like Figure 11 If the slave network ends out of the network, the communication path in port 2 closed mode is: port 0 → port 1 → slave network (slave network ends back) → port 1 → port 0. During the period when the physical connection of port 1 is disconnected, the data interacting with the slave network is transmitted through port 1.

[0094] When both ports 1 and 2 detect a normal physical connection and the data reception timing meets expectations, the switching device maintains port 2 bounce mode, and its operating mode is as follows: Figure 8 As shown.

[0095] Based on the above embodiments, see Figure 12 The diagram shows a port transmit / receive timing sequence.

[0096] ① In the 2-port bounce mode, if it is detected that port 2 receives data before port 1 (port 0 receives data from the master station, port 2 receives data from the slave network first, and then port 1 receives data from the slave network), then it is determined that the connection between the switching device and the slave network is uninterrupted, and the switching device continues to operate in the 2-port bounce mode.

[0097] ② It was detected that port 1 received data before port 2 (port 0 receives data from the master station, port 1 receives data sent from the slave station network, and then port 0 sends data to the master station), and port 2 did not receive any data. It was determined that a breakpoint occurred in the slave station network, and the system switched from the bounce mode of port 2 to the full open mode.

[0098] ③ In full-open mode, after detecting that port 0 is receiving data sent by the master station, such as Figure 9 When a breakpoint exists in the slave network (a breakpoint occurs between any two connected slaves in a cascaded slave network), the communication path in full-on mode is: Port 0 → Port 1 → Slave network (the network closest to Port 1 from the breakpoint) → Port 1 → Port 2 (open state) → Slave network (the network closest to Port 2 from the breakpoint) → Port 2 → Port 0. That is, Port 1 receives data from the slave network first, and then Port 2 receives data from the slave network subsequently; therefore, the breakpoint in the slave network is not recovered.

[0099] ④ In full-open mode, after detecting that port 0 receives data sent by the master station, and assuming there are no breakpoints in the slave network, the communication path becomes port 0 → port 1 → slave network → port 2 → port 0. That is, in full-open mode, port 2 receives data sent by the slave network, and the data is then fed back from port 2 to port 0. However, port 1 does not receive data sent by the slave network, confirming that the breakpoint in the slave network has been resolved, and switches back to port 2 bounce mode.

[0100] ⑤ When the physical connection between port 1 and the breakpoint at the beginning of the slave network is detected to be broken, determine that the breakpoint is at the beginning of the slave network and switch to port 1 closed mode.

[0101] ⑥ When the physical connection between port 1 and the breakpoint at the beginning of the slave network is restored, switch back to the unbroken port 2 bounce mode.

[0102] ⑦ When the physical connection between port 2 and the breakpoint at the end of the slave network is detected to be broken, determine that the breakpoint is at the end of the slave network and switch to port 2 closed mode.

[0103] ⑧ When the physical connection between port 2 and the end of the slave network is restored, switch back to the unbroken port 2 bounce mode.

[0104] ⑨ If data is received on port 0 but no data is sent, and then port 0 receives data again, indicating that there is a problem with the current network and that data frames are completely blocked from returning to the switch, then the switch should be reset.

[0105] ⑩ After the reset, the switching device immediately and automatically switches to the 2-port bounce mode without any breakpoints. This is the default mode, which waits for the next new frame coming in from port 0 to detect network breakpoints.

[0106] In this application, each communication begins with a frame originating from the master station and ends with a frame returning to the master station to complete the communication. A complete communication requires the frame to pass through the switching equipment and all slave stations, and the frame must pass through the data exchange modules of all slave stations so that the master station can exchange data with any slave station. Based on the embodiments of the above method, when a breakpoint occurs at the beginning, middle, or end of the slave network, the switching equipment can accurately identify the breakpoint location and switch to the corresponding operating mode to ensure that the communication link can still complete the entire communication even with a breakpoint, achieving reliable data transmission. When the breakpoint is restored, it automatically returns to the 2-port bounce mode. Thus, when a breakpoint occurs, the switching equipment detects the breakpoint, and if a communication frame is blocked and a complete communication cannot be completed, the switching equipment will adjust the data forwarding path of the switch. After adjustment, the new communication path will be able to complete the entire communication.

[0107] This application also provides a corresponding Ethernet network for implementing the solution provided in this application.

[0108] An Ethernet network includes a master station, a slave station network, and an Ethernet switching device as described in any of the above embodiments. The switching device uses the method described in any of the above embodiments to achieve complete data communication between the master station and the slave station network.

[0109] In the embodiments of this application, the terms "first" and "second" (if they exist) are used only as name identifiers and do not represent the order of first and second.

[0110] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that all or part of the steps in the methods of the above embodiments can be implemented by means of software plus a general-purpose hardware platform. Based on this understanding, the technical solution of this application can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as a read-only memory (ROM) / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, a server, or a network communication device such as a router) to execute the methods described in various embodiments or some parts of the embodiments of this application.

[0111] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on its differences from other embodiments. In particular, the apparatus embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0112] The above description is merely an exemplary implementation of this application and is not intended to limit the scope of protection of this application.

Claims

1. An Ethernet switching device, characterized in that, It includes port 0, port 1, and port 2; port 0 establishes a bidirectional communication connection with the master station, port 1 connects to the beginning of the slave station network, and port 2 connects to the end of the slave station network. The switching device is used to control one or more of the 0 port, 1 port and 2 port to be in an on or off state, and to control the 2 port to be in a bounce state, so as to switch the operating mode of the switching device and adjust the data forwarding path within the switching device. The bounce state is that after receiving data sent by the slave network, port 2 does not forward the data to port 0, but instead sends it back to the slave network from port 2.

2. The switching device according to claim 1, characterized in that, The switching device includes a port monitoring module and a switching module, and the switching module is connected to the port monitoring module. The port monitoring module is connected to ports 0, 1, and 2 of the switching device and is used to monitor the physical connection status between the ports of the switching device and the slave network, as well as the data transmission and reception status and timing of the ports of the switching device. The switching module is used to switch the operating mode of the switching device in response to the physical connection being disconnected or the transmit / receive status or transmit / receive timing of the port of the switching device changing.

3. The switching device according to claim 2, characterized in that, The switching module is also used to switch the operating mode of the switching device to 2-port bounce mode in response to the restoration of the physical connection state or the restoration of the transmission and reception timing of the switching device.

4. The switching device according to claim 3, characterized in that, The operating modes of the switching equipment include full-on mode, port 1 off mode, port 2 off mode, and port 2 bounce mode; In full-open mode, ports 0, 1, and 2 are all open. The data forwarding path within the switching device is forwarded from port 0 to port 1, from port 1 to port 2, and from port 2 to port 0. In port 1 off mode, port 1 is off and ports 0 and 2 are on. The data forwarding path within the switching device is bidirectional communication between ports 0 and 2. In port 2-off mode, port 2 is off and ports 0 and 1 are on. The data forwarding path within the switching device is bidirectional communication between ports 0 and 1. In the 2-port bounce mode, port 2 is in bounce state and ports 0 and 1 are both open. The data forwarding path within the switch is bidirectional communication between ports 0 and 1. After receiving data, port 2 sends it out of the switch.

5. The switching device according to claim 4, characterized in that, The switching device further includes the data switching module configured with port 0, and / or the data switching module configured with port 2; The data exchange module is used to forward data from the corresponding port to the next port, or to process the data from the corresponding port and then forward it to the next port.

6. A control method for an Ethernet switching device, characterized in that, The method, applied to an Ethernet switching device according to any one of claims 1-5, comprises: Monitor the physical connection status between the port of the switching device and the slave network, as well as the data transmission and reception status and timing of the port of the switching device; In response to the physical connection being disconnected, or the transmit / receive status or transmit / receive timing of the port of the switching device changing, the operating mode of the switching device is switched. In response to the restoration of the physical connection state or the restoration of the transmission and reception timing of the switching device, the operating mode of the switching device is switched to 2-port bounce mode.

7. The method according to claim 6, characterized in that, In response to a disconnected physical connection, or a change in the transmit / receive status or timing of a port on the switching device, the operating mode of the switching device is switched, including: If the physical connection between port 1 of the switching device and the head end of the slave network is detected to be disconnected, it is determined that there is a break at the head end of the slave network and the device is switched to port 1 closed mode. If the physical connection between port 2 of the switching device and the end of the slave network is detected to be disconnected, it is determined that there is a break at the end of the slave network and the device is switched to port 2 closed mode. In the 2-port bounce mode, if port 1 receives data sent by the slave network before port 2, it is determined that there is a breakpoint in the slave network, and the system switches to full-open mode.

8. The method according to claim 6, characterized in that, In response to the restoration of the transmission and reception timing of the switching device, the operating mode of the switching device is switched to 2-port bounce mode, including: In full-on mode, if port 2 receives data sent by the slave network first, while port 1 does not receive data sent by the slave network, it is determined that the breakpoint in the slave network has been restored, and the system switches back to port 2 bounce mode.

9. The method according to claim 6, characterized in that, The method further includes: If the switch only receives data and does not send data on port 0, the switch is reset and restored to port 2 bounce mode.

10. An Ethernet network, characterized in that, It includes a master station, a slave station network, and an Ethernet switching device as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Two-way loop network system and its control method

    CN101262406A

  • System and method for implementing reflector ports within hierarchical networks

    US20060250969A1