Dual-redundancy network communication switching method, device and system

通过单片机周期性查询网络交换芯片的连接状态并基于生成树协议动态调整生成树状态,实现自动切换,解决了现有技术中依赖系统主机导致的切换延迟和成本问题,实现了快速、透明的网络 Dual redundant network communication that switches and reduces costs.

CN119071142APending Publication Date: 2024-12-03WUHAN GUIDE INFRARED CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411263894.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

The existing dual-redundant network communication switching method relies on the system host, resulting in large switching delays and low data real-time performance, affecting system reliability, and large usage cost and installation space.

Method used

The microcontroller is used to periodically query the PHY port connection status of the non-management network switching chip, and dynamically adjust the spanning tree status based on the spanning tree protocol to automatically switch to the backup network connection port to avoid relying on the system host.

Benefits of technology

Fast and transparent network switching is achieved, reducing usage costs and installation space requirements, not affecting system reliability, and switching delay is within 20ms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119071142A_ABST
    Figure CN119071142A_ABST
Patent Text Reader

Abstract

The invention discloses a dual-redundancy network communication switching method, device and system, and relates to the technical field of redundant network communication, and the dual-redundancy network communication switching method comprises the following steps: periodically querying the connection state of a dual-redundancy physical layer interface device PHY port of an unmanaged network switching chip by using a single-chip microcomputer, judging whether the PHY port has physical connection or not; and dynamically adjusting the spanning tree state of the PHY port according to the connection state of the PHY port based on a spanning tree protocol so as to complete PHY port switching. According to the invention, the single-chip microcomputer is adopted to periodically query the connection state of the PHY port of the unmanaged network switching chip in the main program, when the network connection is abnormal, the network is automatically switched to the backup network connection port, a system host is not depended on, the system reliability is not influenced, and due to the fact that a dual-network card or a network management type switch is not used, the reliability of the system is improved. And the use cost and the installation space requirement are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of redundant network communications, and in particular to a dual redundant network communication switching method, device and system. Background Art

[0002] With the rapid development of information technology, network communication has become increasingly important, and Ethernet has become the main medium for interconnecting various control system interfaces. In some applications, the stability of the network system is very high. In order to improve the reliability and anti-destruction of the system, a dual redundant design is often used.

[0003] At present, the main method to achieve dual redundant network communication switching is to use dual network cards or network management switch technology. The management and switching of dual networks are all the responsibility of the system host. When one network card fails, the system host reads the failure status and switches the data network to another network card to continue network communication.

[0004] Existing technologies rely on the data processing capabilities of the system host, resulting in large switching delays, low data real-time performance, impact on system reliability, and inability to achieve transparent switching for the client. At the same time, the cost of using dual network cards or managed switches and the installation space are relatively large, so there is room for replacement and optimization. Summary of the invention

[0005] The present application provides a dual-redundant network communication switching method, device and system, which uses a single-chip microcomputer to periodically query the connection status of the PHY port of an unmanaged network switching chip in a main program. When a network connection abnormality occurs, it automatically switches to a backup network connection port. It does not rely on the system host and does not affect the system reliability. In addition, since dual network cards or managed switches are not used, the use cost and installation space requirements are reduced.

[0006] In a first aspect, an embodiment of the present application provides a dual-redundancy network communication switching method, the dual-redundancy network communication switching method comprising the following steps:

[0007] The single-chip microcomputer is used to periodically query the connection status of the dual redundant physical layer interface device PHY port of the unmanaged network switching chip to determine whether the PHY port has a physical connection;

[0008] Based on the spanning tree protocol and according to the connection status of the PHY port, the spanning tree status of the PHY port is dynamically adjusted to complete the PHY port switching.

[0009] In combination with the first aspect, in one implementation, the dynamically adjusting the spanning tree state of the PHY port based on the spanning tree protocol and according to the connection state of the PHY port to complete the PHY port switching includes:

[0010] Initialize the spanning tree state of the PHY port so that the spanning tree state of one PHY port is in the forward state and the spanning tree state of the other PHY port is in the block state;

[0011] According to the connection status result of the PHY port periodically queried by the single-chip microcomputer, dynamic adjustment is performed to set the PHY port with physical connection to the forward state and set the other PHY port to the block state to complete the PHY port switching.

[0012] In combination with the first aspect, in one implementation, the use of a single-chip microcomputer to periodically query the connection status of a dual redundant physical layer interface device PHY port of an unmanaged network switch chip to determine whether the PHY port has a physical connection includes:

[0013] The single-chip microcomputer is used to periodically query the function register address 0x01H of the PHY chip in the PHY port to determine whether the PHY port has a physical connection.

[0014] In a second aspect, an embodiment of the present application provides a dual-redundancy network communication switching device, characterized in that the dual-redundancy network communication switching device includes:

[0015] A query module, which periodically queries the connection status of the dual redundant physical layer interface device PHY port of the unmanaged network switch chip based on the single chip microcomputer, and determines whether the PHY port has a physical connection;

[0016] The switching module is based on the spanning tree protocol and dynamically adjusts the spanning tree state of the PHY port according to the connection state of the PHY port to complete the PHY port switching.

[0017] In combination with the second aspect, in one implementation, the switching module is based on a spanning tree protocol and dynamically adjusts the spanning tree state of the PHY port according to the connection state of the PHY port to complete the PHY port switching, including:

[0018] Initialize the spanning tree state of the PHY port so that the spanning tree state of one PHY port is in the forward state and the spanning tree state of the other PHY port is in the block state;

[0019] According to the connection status result of the PHY port periodically queried by the single-chip microcomputer, dynamic adjustment is performed to set the PHY port with physical connection to the forward state and set the other PHY port to the block state to complete the PHY port switching.

[0020] In combination with the second aspect, in one implementation, the query module periodically queries the connection status of the dual redundant physical layer interface device PHY port of the unmanaged network switch chip based on the single chip microcomputer to determine whether the PHY port has a physical connection, including:

[0021] The single-chip microcomputer periodically queries the function register address 0x01H of the PHY chip in the PHY port to determine whether the PHY port has a physical connection.

[0022] In a third aspect, an embodiment of the present application provides a dual-redundant network communication switching system, the dual-redundant network communication switching system comprising an embedded real-time operating platform and a switch;

[0023] The embedded real-time operating platform includes a single-chip microcomputer, and the switch includes an unmanaged network switching chip;

[0024] The single chip microcomputer is used to periodically query the connection status of the dual redundant physical layer interface device PHY port of the unmanaged network switching chip to determine whether the PHY port has a physical connection;

[0025] The single chip microcomputer also dynamically adjusts the spanning tree state of the PHY port based on the spanning tree protocol and according to the connection state of the PHY port to complete the PHY port switching.

[0026] In conjunction with the third aspect, in one implementation, the single chip microcomputer is used for:

[0027] Initialize the spanning tree state of the PHY port so that the spanning tree state of one PHY port is in the forward state and the spanning tree state of the other PHY port is in the block state;

[0028] According to the connection status result of the PHY port periodically queried, dynamic adjustment is performed to set the PHY port with physical connection to the forward state and set the other PHY port to the block state to complete the PHY port switching.

[0029] In combination with the third aspect, in one implementation, a PHY chip is provided in the PHY port, and the single-chip microcomputer is used to query the function register address 0x01H of the PHY chip to determine whether the PHY port has a physical connection.

[0030] In conjunction with the third aspect, in one implementation, the single-chip microcomputer and the unmanaged network switching chip are connected via a media independent interface.

[0031] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:

[0032] The dual-redundant network communication switching method in the present application uses a single-chip microcomputer to periodically query the connection status of the dual-redundant physical layer interface device PHY port of the unmanaged network switching chip to determine whether the PHY port has a physical connection; based on the spanning tree protocol, and according to the connection status of the PHY port, the spanning tree status of the PHY port is dynamically adjusted to complete the PHY port switching. That is, the present application uses a single-chip microcomputer to periodically query the connection status of the PHY port of the unmanaged network switching chip in the main program, and when a network connection abnormality occurs, it automatically switches to the backup network connection port, does not rely on the system host, does not affect the system reliability, and because it does not use dual network cards or network management switches, it reduces the use cost and installation space requirements. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 A schematic diagram of a flow chart of an embodiment of a dual-redundancy network communication switching method of the present application;

[0034] Figure 2 The implementation flow chart of dual redundant network for this application;

[0035] Figure 3 This is a structural block diagram of an embodiment of a dual-redundant network communication switching device of the present application;

[0036] Figure 4 This is a structural block diagram of an embodiment of a dual-redundant network communication switching system of the present application;

[0037] Figure 5 This is a schematic diagram of the internal information cross-linking of the dual redundant network of this application. DETAILED DESCRIPTION

[0038] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0039] The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings 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 limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices. The terms "first", "second" and "third" are used to distinguish different objects, etc., and do not represent a sequence, nor do they limit "first", "second" and "third" to different types.

[0040] In the description of the embodiments of the present application, "exemplary", "for example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary", "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "for example" or "for example" is intended to present related concepts in a specific way.

[0041] In the description of the embodiments of the present application, unless otherwise specified, “ / ” means or, for example, A / B can mean A or B; the “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.

[0042] In some processes described in the embodiments of the present application, multiple operations or steps that appear in a specific order are included, but it should be understood that these operations or steps may not be executed in the order in which they appear in the embodiments of the present application or in parallel, and the sequence number of the operation is only used to distinguish the different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed in sequence or in parallel, and these operations or steps may be combined.

[0043] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.

[0044] In a first aspect, an embodiment of the present application provides a dual-redundancy network communication switching method.

[0045] In one embodiment, referring to Figure 1 , Figure 1 This is a flow chart of an embodiment of a dual redundant network communication switching method of the present application. Figure 1 As shown, the dual redundant network communication switching method includes:

[0046] S1, using a single-chip microcomputer to periodically query the connection status of the dual redundant physical layer interface device PHY port of the unmanaged network switch chip to determine whether the PHY port has a physical connection;

[0047] S2. Based on the spanning tree protocol and according to the connection status of the PHY port, the spanning tree status of the PHY port is dynamically adjusted to complete the PHY port switching.

[0048] Specifically, the protocol of the dual redundant network in this embodiment adopts STP (Spanning Tree Protocol). The main idea of ​​STP is that when there are redundant links, only the main link is allowed to be activated. If the main link is disconnected due to a fault, the backup link will be opened. STP spanning tree is a protocol for building a loop-free network structure. STP can build a spanning tree by selecting a root node, thereby avoiding loops in the network. The spanning tree is a subgraph containing all network nodes. It connects all nodes by connecting the minimum set of edges while maintaining loop-freeness. The STP protocol spanning tree has the function of prohibiting unnecessary connections. The dual redundancy function uses this function of the spanning tree to achieve simultaneous access of two network cables to avoid conflicts.

[0049] Each PHY port of the switch in this embodiment has a PHY chip. The function register (BASIC STATUS REGISTER) address 0x01H of each PHY chip is read to determine whether the PHY end has a physical connection. The spanning tree state of the storage register port of the unmanaged network switch chip is set to a forward state or a block state. In the main loop of the single-chip program, the PHY port state is periodically read, and the PHY port with a physical connection is set to a forward state, and the other PHY port is set to a block state, completing the network port switching and realizing the dual redundant network function.

[0050] For details, see Figure 2 As shown:

[0051] Step 1: Initialize the spanning tree status of the dual redundant PHY ports: port 1, forward status; port 2, block status;

[0052] Step 2, the main cycle of the MCU program reads the PHY port connection status of port1 and port2;

[0053] Step 3, determine whether the PHY port of port1 or port2 is in a connected state, if not, return to step 2, if yes, execute step 4;

[0054] Step 4: Read the spanning tree status of the PHY port in the connected state;

[0055] Step 5: Determine whether the spanning tree state of the PHY port in the connected state is the forward state. If so, return to step 2; if not, go to step 6;

[0056] It can be understood that the default initialization is that the PHY port of port1 is in the connected state. If the PHY port of port1 is still in the connected state during the periodic reading, it will remain the same. If the PHY port of port1 is not in the connected state, it will be disconnected due to a fault, and the backup link will be opened;

[0057] Step 6. Set the PHY port to forward state and return to step 2.

[0058] At this point, the network port switching is completed and the dual redundant network function is realized.

[0059] It is understandable that the present application uses a non-management network switching chip to complete the transmission and reception of network data, assumes the dual redundant interface function, and the single-chip microcomputer periodically queries the PHY network connection status in the main program. When a network connection abnormality occurs, it automatically switches to the backup network connection port, and the switching time is consistent with the system sampling cycle. The test results show that the dual redundant network switching delay time of the present application is within 20ms;

[0060] In addition, the present invention increases the reliability of network transmission, realizes transparent switching for the client, and does not affect the system task; and realizes a dual redundant network function without increasing IP addresses.

[0061] Since the data processing of the present application is completed by a single-chip microcomputer, it does not rely on the system host and does not affect the system reliability; furthermore, the present application does not use dual network cards or network management switches, which greatly reduces the cost of use and installation space requirements.

[0062] In summary, the dual-redundant network communication switching method in the present application uses a single-chip microcomputer to periodically query the connection status of the dual-redundant physical layer interface device PHY port of the unmanaged network switching chip to determine whether the PHY port has a physical connection; based on the spanning tree protocol, and according to the connection status of the PHY port, the spanning tree status of the PHY port is dynamically adjusted to complete the PHY port switching. That is, the present application uses a single-chip microcomputer to periodically query the connection status of the PHY port of the unmanaged network switching chip in the main program, and when a network connection abnormality occurs, it automatically switches to the backup network connection port, does not rely on the system host, does not affect the system reliability, and because it does not use dual network cards or network management switches, it reduces the use cost and installation space requirements.

[0063] In a second aspect, an embodiment of the present application also provides a dual-redundant network communication switching device.

[0064] In one embodiment, referring to Figure 3 , Figure 3 This is a functional module diagram of an embodiment of a dual-redundant network communication switching device of the present application. Figure 3As shown, the dual-redundancy network communication switching device includes a query module and a switching module.

[0065] Among them, the query module periodically queries the connection status of the dual redundant physical layer interface device PHY port of the unmanaged network switch chip based on the single chip microcomputer to determine whether the PHY port has a physical connection;

[0066] The switching module is based on the spanning tree protocol and dynamically adjusts the spanning tree state of the PHY port according to the connection state of the PHY port to complete the PHY port switching.

[0067] Further, in one embodiment, the switching module dynamically adjusts the spanning tree state of the PHY port based on the spanning tree protocol and according to the connection state of the PHY port to complete the PHY port switching, including:

[0068] Initialize the spanning tree state of the PHY port so that the spanning tree state of one PHY port is in the forward state and the spanning tree state of the other PHY port is in the block state;

[0069] According to the connection status result of the PHY port periodically queried by the single-chip microcomputer, dynamic adjustment is performed to set the PHY port with physical connection to the forward state and set the other PHY port to the block state to complete the PHY port switching.

[0070] Further, in one embodiment, the query module periodically queries the connection status of the dual redundant physical layer interface device PHY port of the unmanaged network switch chip based on the single chip microcomputer to determine whether the PHY port has a physical connection, including:

[0071] The single-chip microcomputer periodically queries the function register address 0x01H of the PHY chip in the PHY port to determine whether the PHY port has a physical connection.

[0072] In a third aspect, an embodiment of the present application also provides a dual redundant network communication switching system.

[0073] In one embodiment, referring to Figure 4 , Figure 4 This is a structural block diagram of an embodiment of the dual redundant network communication switching system of the present application. Figure 4 As shown, the dual redundant network communication switching system includes an embedded real-time operation platform and a switch.

[0074] Wherein, the embedded real-time operating platform includes a single-chip microcomputer, and the switch includes an unmanaged network switching chip;

[0075] The single chip microcomputer is used to periodically query the connection status of the dual redundant physical layer interface device PHY port of the unmanaged network switching chip to determine whether the PHY port has a physical connection;

[0076] The single chip microcomputer also dynamically adjusts the spanning tree state of the PHY port based on the spanning tree protocol and according to the connection state of the PHY port to complete the PHY port switching.

[0077] See also Figure 5 As shown, the single-chip microcomputer and the unmanaged network switching chip in this application are introduced below:

[0078] a) Chip Introduction

[0079] 1) The core CPU adopts 32-bit ARM chip, the single-chip model is GD32F407VET6, the main frequency reaches more than 100M, and it has MII interface to realize network communication;

[0080] 2) The unmanaged network switching chip model is SW8328. SW8328 integrates 8-way Gigabit electrical port PHY and supports 10 / 100 / 1000BASE-T and 100BASE-FX functions; supports 1 GMII or 2 MII / RGMII interfaces as expandable management interfaces.

[0081] b) Power supply

[0082] Provides an external 28VDC power supply interface, which is converted into 3.3V to power GD32, and converted into +1.1V, +2.5V and +3.3V to power the unmanaged network switch chip SW8328

[0083] Rated working voltage: 28VDC (general DC power equipment: 22.0V~30.0V).

[0084] Product power consumption: system power ≤4W.

[0085] c) Communication

[0086] 1) The microcontroller and the unmanaged network switch chip are interconnected through a media independent interface, namely, an MII interface, which supports 10Mbit / s and 100Mbit / s data transmission modes.

[0087] 2) The MII signals between the microcontroller MAC controller and the unmanaged network switch chip PHY include:

[0088] 3) ETH_MII_TX_CLK: The clock signal used to send data. This solution uses 100Mbit / s data transmission and the clock is 25MHz.

[0089] 4) ETH_MII_RX_CLK: The clock signal used to receive data. This solution uses 100Mbit / s data transmission and the clock is 25MHz.

[0090] 5)ETH_MII_TX_EN: Send enable signal, which remains until the transmission is completed.

[0091] 6)ETH_MII_TXD[3:0]: Transmit data line, 4 bits of data are transmitted each time, and the data is valid when the MII_TX_EN signal is valid. MII_TXD[0] is the least significant bit of the data, and MII_TXD[3] is the most significant bit. When the MII_TX_EN signal is invalid, the PHY ignores the transmitted data.

[0092] 7) ETH_MII_CRS: Carrier sense signal, which only works in half-duplex mode and is controlled by the unmanaged network switch chip PHY. The PHY of this solution works in full-duplex mode, so it can be ignored.

[0093] 8) ETH_MII_COL: collision detection signal, which only works in half-duplex mode and is controlled by the unmanaged network switch chip PHY. The PHY of this solution works in full-duplex mode, so it can be ignored.

[0094] 9)ETH_MII_RXD[3:0]: Receive data line, receives 4 bits of data each time, and the data is valid when the MII_RX_DV signal is valid. MII_RXD[0] is the lowest bit of the data, and MII_RXD[3] is the highest bit.

[0095] 10)ETH_MII_RX_DV: Receive data enable signal, controlled by PHY, this signal is valid when PHY is ready for MAC to receive data. This signal must appear synchronously with the first 4 bits of frame data and remain valid until the data transmission is completed. This signal must become invalid before the first clock after the last 4 bits of data are transmitted.

[0096] 11)ETH_MII_RX_ER: Receive error signal, maintains a valid state for one or more clock cycles (MII_RX_CLK), indicating that the MAC detected an error during the reception process.

[0097] 12) The microcontroller MAC controller communicates with the unmanaged network switch chip through the ETH_MDC clock line and the ETH_MDIO data line, and can access any register of the external physical layer interface PHY.

[0098] 13) ETH_MDC: The maximum frequency of the clock signal is 2.5MHz. In the idle state, this pin is kept at a low level. When transmitting data, the shortest holding time of the high level and low level of the signal is 160ns, and the minimum period of the signal is 400ns;

[0099] 14)ETH_MDIO: used for data transmission between PHY and cooperates with the MDC clock line to receive / send data.

[0100] After adopting the dual redundant network communication switching system in this embodiment, the specific effects achieved are:

[0101] 1) Ethernet A connects to external devices;

[0102] 2) Ethernet B connects external devices;

[0103] 3) Ethernet A and Ethernet B are connected at the same time. If either of the cables is disconnected, the other will establish a connection within 20ms.

[0104] 4) Connect only one network cable to Ethernet A or Ethernet B (such as connecting only Ethernet A), connect the other one (such as connecting Ethernet B), disconnect the previous communicating Ethernet (such as Ethernet A), and Ethernet B can still be connected.

[0105] Furthermore, in one embodiment, the single chip microcomputer is used for:

[0106] Initialize the spanning tree state of the PHY port so that the spanning tree state of one PHY port is in the forward state and the spanning tree state of the other PHY port is in the block state;

[0107] According to the connection status result of the PHY port periodically queried, dynamic adjustment is performed to set the PHY port with physical connection to the forward state and set the other PHY port to the block state to complete the PHY port switching.

[0108] Furthermore, in one embodiment, a PHY chip is provided in the PHY port, and the single chip microcomputer is used to query the function register address 0x01H of the PHY chip to determine whether the PHY port has a physical connection.

[0109] Furthermore, in one embodiment, the single chip microcomputer and the unmanaged network switch chip are connected via a media independent interface.

[0110] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A dual redundant network communication switching method, characterized in that: The dual redundant network communication switching method comprises: The single-chip microcomputer is used to periodically query the connection status of the dual redundant physical layer interface device PHY port of the unmanaged network switching chip to determine whether the PHY port has a physical connection; Based on the spanning tree protocol and according to the connection status of the PHY port, the spanning tree status of the PHY port is dynamically adjusted to complete the PHY port switching.

2. The dual redundant network communication switching method according to claim 1, characterized in that: The method of dynamically adjusting the spanning tree state of the PHY port based on the spanning tree protocol and according to the connection state of the PHY port to complete the PHY port switching includes: Initialize the spanning tree state of the PHY port so that the spanning tree state of one PHY port is in the forward state and the spanning tree state of the other PHY port is in the block state; According to the connection status result of the PHY port periodically queried by the single-chip microcomputer, dynamic adjustment is performed to set the PHY port with physical connection to the forward state and set the other PHY port to the block state to complete the PHY port switching.

3. The dual redundant network communication switching method according to claim 1, characterized in that: The method of periodically querying the connection status of the dual redundant physical layer interface device PHY port of the unmanaged network switch chip by using the single chip microcomputer to determine whether the PHY port has a physical connection includes: The single-chip microcomputer is used to periodically query the function register address 0x01H of the PHY chip in the PHY port to determine whether the PHY port has a physical connection.

4. A dual redundant network communication switching device, characterized in that: The dual redundant network communication switching device comprises: A query module, which periodically queries the connection status of the dual redundant physical layer interface device PHY port of the unmanaged network switch chip based on the single chip microcomputer, and determines whether the PHY port has a physical connection; The switching module is based on the spanning tree protocol and dynamically adjusts the spanning tree state of the PHY port according to the connection state of the PHY port to complete the PHY port switching.

5. The dual redundant network communication switching device according to claim 4, characterized in that: The switching module is based on the spanning tree protocol and dynamically adjusts the spanning tree state of the PHY port according to the connection state of the PHY port to complete the PHY port switching, including: Initialize the spanning tree state of the PHY port so that the spanning tree state of one PHY port is in the forward state and the spanning tree state of the other PHY port is in the block state; According to the connection status result of the PHY port periodically queried by the single-chip microcomputer, dynamic adjustment is performed to set the PHY port with physical connection to the forward state and set the other PHY port to the block state to complete the PHY port switching.

6. The dual redundant network communication switching device according to claim 4, characterized in that: The query module periodically queries the connection status of the dual redundant physical layer interface device PHY port of the unmanaged network switch chip based on the single chip microcomputer, and determines whether the PHY port has a physical connection, including: The single-chip microcomputer periodically queries the function register address 0x01H of the PHY chip in the PHY port to determine whether the PHY port has a physical connection.

7. A dual redundant network communication switching system, characterized in that: The dual-redundant network communication switching system includes an embedded real-time operating platform and a switch; The embedded real-time operating platform includes a single-chip microcomputer, and the switch includes an unmanaged network switching chip; The single chip microcomputer is used to periodically query the connection status of the dual redundant physical layer interface device PHY port of the unmanaged network switching chip to determine whether the PHY port has a physical connection; The single chip microcomputer also dynamically adjusts the spanning tree state of the PHY port based on the spanning tree protocol and according to the connection state of the PHY port to complete the PHY port switching.

8. The dual redundant network communication switching system according to claim 7, characterized in that: The single chip microcomputer is used for: Initialize the spanning tree state of the PHY port so that the spanning tree state of one PHY port is in the forward state and the spanning tree state of the other PHY port is in the block state; According to the connection status result of the PHY port periodically queried, dynamic adjustment is performed to set the PHY port with physical connection to the forward state and set the other PHY port to the block state to complete the PHY port switching.

9. The dual redundant network communication switching system according to claim 7, characterized in that: The PHY port is provided with a PHY chip, and the single chip microcomputer is used to query the function register address 0x01H of the PHY chip to determine whether the PHY port has a physical connection.

10. The dual redundant network communication switching system according to claim 7, characterized in that: The single chip microcomputer and the unmanaged network switching chip are connected via a medium-independent interface.