A redundant communication system based on asymmetric backup topology and a control method thereof

CN122951924APending Publication Date: 2026-10-20GREE ELECTRIC APPLIANCE INC OF ZHUHAI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611237940.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-14
Publication Date
2026-10-20

AI Technical Summary

Technical Problem

[0006]为克服现有技术的缺陷,本申请提出一种基于非对称备用拓扑的冗余通信系统及其控制方法,以单条全局备用链路实现多组主环路统一冗余覆盖,在控制部署成本、简化拓扑的基础上,解决通讯可靠性低、故障定位难、自动化运维不足等核心问题

Benefits of technology

1、通过采用非对称备用拓扑,末端节点仅需预留单通信接口(例如RS485),依靠单预留全局备用链路实现多环路冗余,大幅降低硬件成本。全局备用链路通过集线器连接至每组主链路的最后一个末端设备,备用信号沿主链路级联线缆反向传输至该组其他末端设备,N 组主链路共享同一条备用链路,无需为每组链路独立铺设备用线缆,末端设备仅需单组差分信号端子即可实现双通道接入,硬件与布线成本显著降低,新增主链路组仅需在集线器上扩展一条支线,多链路场景下扩展便捷。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

This invention discloses a redundant communication system and its control method based on an asymmetric backup topology. The system includes: a main control module with N main communication interfaces and one backup communication interface, where N ≥ 2; N main links corresponding one-to-one with the N main communication interfaces, each main link including multiple cascaded end devices; in each main link, the first end device is connected to the corresponding main communication interface; a global backup link including a hub and a branch connecting the hub to the last end device in each main link, the hub being connected to the main control module through the backup communication interface; the global backup link is shared by the N main links; each end device in the N main links simultaneously accesses the corresponding main link and the global backup link through cascading. This invention can solve core problems such as low communication reliability, difficult fault location, and insufficient automated operation and maintenance while controlling deployment costs and simplifying the topology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of redundant communication system technology, and more specifically to a redundant communication system based on asymmetric backup topology and its control method. Background Technology

[0002] RS485 bus is widely used in industrial field device communication due to its low cost and strong compatibility. Using this bus as the physical medium, the industry commonly connects all end devices in series via twisted-pair cables to form a single-chain bus topology. That is, all end devices are cascaded to the same shared physical bus, with terminating resistors placed at both ends of the link. The master device communicates with each device in a master-slave polling manner for half-duplex communication. This structure is simple to wire and easy to expand nodes, making it widely used in small to medium-scale industrial control scenarios.

[0003] However, this traditional single-chain bus topology has the potential to cause the entire link to be paralyzed due to a single point of failure. Its defects are mainly manifested in the following ways: if the connection of any device in the link is loose, the cable is damaged, or the device's RS485 port fails, all devices after the break point will lose contact with the host, causing partial or even full link communication paralysis. Moreover, due to the lack of an independent backup physical channel and fault diagnosis mechanism, the system cannot distinguish whether it is a line break or a device failure. Maintenance personnel must check each segment one by one, and fault location consumes a lot of time and manpower.

[0004] To overcome the above shortcomings, existing technologies have emerged that introduce redundancy schemes in communication systems (such as RS485 communication interfaces). These schemes are mainly divided into two categories: one is a symmetrical dual-ring network topology, which requires configuring dual RS485 interfaces for all end devices and laying two ring dual links that serve as backups for each other. As a result, the hardware and cabling costs are almost doubled, and the topology is complex and has poor scalability. The other is a local redundancy scheme based on repeaters, which can only achieve segmented fault isolation and cannot achieve global coverage and precise location of breakpoints.

[0005] It is evident that existing redundancy solutions cannot simultaneously meet the requirements of low cost, high reliability, and easy operation and maintenance. They cannot simultaneously support independent redundancy of multiple loops, rapid fault switching, and automatic back-off, and are unable to meet the stringent requirements of industrial sites for communication continuity and fault response efficiency. Summary of the Invention

[0006] To overcome the shortcomings of existing technologies, this application proposes a redundant communication system and its control method based on asymmetric backup topology. It achieves unified redundant coverage of multiple main loops with a single global backup link, and solves core problems such as low communication reliability, difficulty in fault location, and insufficient automated operation and maintenance while controlling deployment costs and simplifying the topology.

[0007] According to a first aspect of the present invention, a redundant communication system based on an asymmetric backup topology is provided. The redundant communication system includes: The main control module has N sets of main communication interfaces and one set of backup communication interfaces, where N≥2; Each of the N main communication interfaces corresponds to one of the N main links, and each main link includes multiple cascaded terminal devices; in each main link, the first terminal device is connected to the corresponding main communication interface. A global backup link includes a hub and a branch line connecting the hub to the last end device in each group of main links. The hub is connected to the main control module through the backup communication interface. The global backup link is shared by the N groups of main links. Each end device in the N groups of main links is simultaneously connected to the corresponding main link and the global backup link through cascading.

[0008] Furthermore, each main communication interface, the backup communication interface, and each end device in each main link group each include two differential signal terminals; in each main link group, the two differential signal terminals of the first end device are connected to the two differential signal terminals of the corresponding main communication interface group, the two differential signal terminals of the subsequent end device are respectively connected to the two differential signal terminals of the preceding end device, and the two differential signal terminals of the last end device are connected to the hub. Furthermore, the main control module includes a main control chip and one or more communication expansion modules connected to the main control chip; the one or more communication expansion modules are used to expand the number of main communication interfaces of the main control module.

[0009] Furthermore, the main communication interface and the backup communication interface are at least one of RS485, RS422, CAN bus and industrial Ethernet.

[0010] Furthermore, the main control module is configured as follows: Each end device is polled via the main link and the global backup link, and the response status of each end device under these two communication links is recorded. The response status is used to indicate whether each end device is online or offline on these two communication links. Cross-comparison is performed on the response status of each terminal device under these two communication links to determine the fault type and the location of the main link breakpoint; When the fault type is determined to be a recoverable fault of the main link, the terminal device to be switched in the faulty main link, which is determined by the location of the main link breakpoint, is switched to the global backup link, and the switched terminal device is automatically switched back to the corresponding main link after the faulty main link is restored. When the fault type is determined to be another fault, an alarm signal is generated and no switching is performed.

[0011] Furthermore, the main control module is configured as follows: On the main link and the global backup link, query frames are sent to each end device in a cascaded order, and the original response status of each end device on each channel is collected and recorded. The system continuously collects the original response status for multiple rounds according to the polling cycle. Only when the original response status for multiple rounds indicates that the same end device is offline for multiple consecutive polling cycles on the same communication link, will the corresponding end device be marked as offline on the corresponding communication link, and a response status after stable verification will be generated.

[0012] Furthermore, the main control module is configured as follows: If the current terminal device is online on both the primary link and the global backup link, then the current terminal device is considered to be normal. If the current terminal device is offline on the main link but online on the global backup link, it is determined that the main link is recoverable, and the location of the main link breakpoint is determined to be within the communication segment between the current terminal device and the adjacent terminal device close to the main control module. If the current end device is offline on the global backup link, it is determined to be another fault.

[0013] Furthermore, the main control module is also configured as follows: If the current terminal device is offline on both the main link and the global backup link, and all terminal devices adjacent to the current terminal device on the corresponding main link are online on both the main link and the global backup link, then the current terminal device is determined to have a hardware failure. If the current terminal device is offline on both the main link and the global backup link, and the adjacent terminal device of the current terminal device that is close to the main control module is online on the main link but offline on the global backup link, and the adjacent terminal device of the current terminal device that is close to the global backup link is offline on the main link but online on the global backup link, then it is determined that the main link connection between the current terminal device and all its adjacent terminal devices is simultaneously disconnected. If the current terminal device is online on the primary link but offline on the global backup link, and all other terminal devices on the primary link where the current terminal device is located are offline on the global backup link, then the global backup link is considered to be faulty.

[0014] According to a second aspect of the present invention, a control method for a redundant communication system based on an asymmetric backup topology as described in the first aspect of the present invention is provided, executed at the main control module, characterized in that it includes: Each end device is polled via the main link and the global backup link, and the response status of each end device under these two communication links is recorded. The response status is used to indicate whether each end device is online or offline on these two communication links. Cross-comparison is performed on the response status of each terminal device under these two communication links to determine the fault type and the location of the main link breakpoint; When the fault type is determined to be a recoverable fault of the main link, the terminal device to be switched in the faulty main link, which is determined by the location of the main link breakpoint, is switched to the global backup link, and the switched terminal device is automatically switched back to the corresponding main link after the faulty main link is restored. When the fault type is determined to be another fault, an alarm signal is generated and no switching is performed.

[0015] Furthermore, the step of simultaneously polling each end device through both the main link and the global backup link, and recording the response status of each end device under these two communication links, includes: On the main link and the global backup link, query frames are sent sequentially to each end device to collect and record the original response status of each end device on each channel. The system continuously collects the original response status for multiple rounds according to the polling cycle. Only when the original response status for multiple rounds indicates that the same end device is offline for multiple consecutive polling cycles on the same communication link, will the corresponding end device be marked as offline on the corresponding communication link, and a response status after stable verification will be generated.

[0016] Furthermore, the cross-comparison of the response status of each end device under these two communication links to determine the fault type and the location of the main link breakpoint includes: If the current terminal device is online on both the primary link and the global backup link, then the current terminal device is considered to be normal. If the current terminal device is offline on the main link but online on the global backup link, it is determined that the main link is recoverable, and the location of the main link breakpoint is determined to be within the communication segment between the current terminal device and the adjacent terminal device close to the main control module. If the current terminal device is offline on the global backup link, it is determined to be another fault. The specific fault type is determined based on the response status of other terminal devices on the main link and backup link of the current terminal device.

[0017] Furthermore, determining the specific fault type based on the response status of other terminal devices on the main link and backup link of the current terminal device includes: If the current terminal device is offline on both the main link and the global backup link, and all terminal devices adjacent to the current terminal device on the corresponding main link are online on both the main link and the global backup link, then the current terminal device is determined to have a hardware failure. If the current terminal device is offline on both the main link and the global backup link, and the adjacent terminal device of the current terminal device that is close to the main control module is online on the main link but offline on the global backup link, and the adjacent terminal device of the current terminal device that is close to the global backup link is offline on the main link but online on the global backup link, then it is determined that the main link connection between the current terminal device and all its adjacent terminal devices is simultaneously disconnected. If the current terminal device is online on the primary link but offline on the global backup link, and all other terminal devices on the primary link where the current terminal device is located are offline on the global backup link, then the global backup link is considered to be faulty.

[0018] According to a third aspect of the present invention, a terminal is provided, comprising a processor and a storage medium; The storage medium is used to store instructions; the processor is used to operate according to the instructions to perform the steps of the method according to the second aspect of the invention.

[0019] According to a fourth aspect of the present invention, a computer-readable storage device is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in the second aspect of the present invention.

[0020] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. By adopting an asymmetric backup topology, the end node only needs to reserve a single communication interface (e.g., RS485), relying on a single reserved global backup link to achieve multi-loop redundancy, significantly reducing hardware costs. The global backup link is connected to the last end device of each group of main links through a hub. The backup signal is transmitted in reverse along the cascaded cable of the main link to other end devices in the group. N groups of main links share the same backup link, eliminating the need to lay separate backup cables for each group of links. End devices only need a single set of differential signal terminals to achieve dual-channel access, significantly reducing hardware and cabling costs. Adding a new main link group only requires extending one branch line on the hub, making expansion convenient in multi-link scenarios.

[0021] 2. The controller relies on a primary and backup link collaborative verification mechanism to accurately locate breakpoints online, resulting in high fault diagnosis efficiency. It polls each end device through both the primary and global backup links, performing cross-comparisons on the response status of each link. The fault type is determined based on the combination of the current end device's online and offline status on both links. The primary link breakpoint is identified as being located within the communication segment between the current end device and the adjacent end device closest to the main control module, enabling automatic online fault diagnosis and reducing the time cost of manual segment-by-segment troubleshooting.

[0022] 3. Simultaneous dual-side data acquisition with zero data loss during multiple link failures. When two or more main links fail concurrently, the normal main links continue to acquire service data. The terminal device to be switched in the failed main link, determined by the breakpoint location, switches to the global backup link to handle data acquisition in the faulty area. The two links work in parallel without overlap. The main control module merges the data into a network-wide device data table by device ID, ensuring continuous communication and data integrity during the failure period.

[0023] 4. Autonomous and rapid switching and automatic failover: The system boasts strong fault tolerance and can handle faults without manual intervention, significantly improving operational stability and ease of maintenance. When a fault is determined to be a recoverable primary link, the system automatically switches the terminal devices downstream of the failure point to the global backup link. Once the faulty primary link is restored, the switched terminal devices are automatically switched back to the corresponding primary link. When other faults are determined, an alarm signal is generated, but no switchover is performed, forming a complete autonomous fault handling closed loop, ensuring stable and reliable system operation. Attached Figure Description

[0024] Figure 1 This is a schematic diagram of the architecture of the redundant communication system based on asymmetric backup topology of the present invention; Figure 2 This is a flowchart illustrating a redundant communication method based on an asymmetric backup topology according to an embodiment of the present invention. Figure 3 This is a schematic diagram of the normal operation state of the redundant communication system based on asymmetric backup topology according to the present invention; Figure 4 This is a schematic diagram of the system operating state of the redundant communication system based on asymmetric backup topology of the present invention when a single main loop is disconnected. Figure 5 This is a schematic diagram of the system operation state of the redundant communication system based on asymmetric backup topology of the present invention when the RS485 port of a single device is damaged or the lines before and after the device are disconnected. Figure 6 This is a schematic diagram of the system operating state of the redundant communication system based on asymmetric backup topology of the present invention when multiple interval lines are disconnected in a single master link. Figure 7 This is a schematic diagram of the system operating state of the redundant communication system based on asymmetric backup topology of the present invention when multiple main links fail concurrently; Figure 8 This is a detailed control flowchart of a redundant communication method based on an asymmetric backup topology, according to another embodiment of the present invention. Detailed Implementation

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

[0026] In this invention, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Without further limitation, an element defined by the phrase "comprising..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0027] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms used in this application include and have, and any variations thereof, are intended to cover non-exclusive inclusion. The term "multiple" in this application refers to two or more. The terms used in this application and / or refer to one of the embodiments, or any combination of multiple embodiments.

[0028] According to a first aspect of the invention, a redundant communication system based on an asymmetric backup topology is provided.

[0029] In one exemplary embodiment, please refer to Figure 1 This paper presents a redundant communication system based on an asymmetric backup topology. The redundant communication system includes a master control module, N sets of master links, and a global backup link, where N is a positive integer greater than or equal to 2.

[0030] The main control module has N sets of main communication interfaces and one set of backup communication interfaces. Each set of main communication interfaces consists of two differential signal terminals, denoted as terminal A and terminal B, used to connect to the corresponding main link. The backup communication interface also consists of two differential signal terminals, used to connect to the global backup link. The global backup link is shared by the N sets of main links, meaning that multiple sets of main links share the same backup link, forming an asymmetric redundant topology.

[0031] In this embodiment, the main control module is a patented custom-designed industrial gateway device, model GBM-IP100. Its core functions include acquiring the status of the primary and backup links, cross-referencing faults, making and executing switching decisions, and outputting alarms. It is understood that the main control module is also applicable to other gateway controllers with multi-serial port expansion capabilities, and this invention does not limit this application.

[0032] Specifically, the main control module includes a main control chip and one or more communication expansion modules connected to the main control chip. The main control chip is responsible for executing core logic such as dual-channel polling, cross-comparison judgment, switching decisions, and back-off control. The communication expansion modules are used to expand the number of main communication interfaces of the main control module. When the system needs to connect more main links and the number of interfaces provided by the main control chip is insufficient, ports can be added through the communication expansion modules. The communication expansion modules are uniformly managed and scheduled by the main control chip and do not work independently. Regardless of whether the communication expansion modules are connected, the core logic such as fault detection, cross-comparison, and switching decisions for all main links and global backup links is executed by the main control chip.

[0033] The main communication interface and backup communication interface can adopt any physical layer interface from RS485, RS422, CAN bus, or industrial Ethernet. The asymmetric backup topology and dual-channel cross-comparison, switching back control logic described in this invention are not limited to a specific physical layer standard in their underlying architecture. When applied to communication systems with different physical layer standards, only the link relay devices such as transceivers and hubs need to be replaced according to the electrical specifications of the corresponding bus, and the underlying message transmission and reception drivers need to be adapted. The core control algorithms executed by the main control module, such as dual-channel cross-comparison fault location, dual-side parallel acquisition, data fusion, and automatic switching back, can be completely reused. For hard real-time synchronous buses or wireless transmission systems, additional timing compensation or channel filtering modules are required for adaptation.

[0034] like Figure 1 There are N sets of main links and N sets of main communication interfaces, one-to-one. Each set of main links consists of multiple cascaded end devices. Specifically, for example... Figure 3 As shown, the first group of main link ports A1 / B1 includes multiple end devices, namely end 1, end 2, and end 3; the second group of main link ports A2 / B2 includes multiple end devices, namely end 4, end 5, and end 6; the third group of main link ports A3 / B3 includes multiple end devices, namely end 7, end 8, and end 9; and the fourth group of main link ports A4 / B4 includes multiple end devices, namely end 10, end 11, and end 12.

[0035] It should be noted that the term "main link" in this invention is an engineering term referring to a linear communication link formed by a single communication port of the main control module and multiple terminal devices connected in series. The signal flow path of each main link corresponds only to the main communication interface of the main control module and the terminal device connected in series within that group, without passing through backup communication interfaces, hubs, or any backup link cables. The main link is not an electrically closed loop, but rather a linear topology formed by the terminal devices connected in a daisy-chain configuration. Signals originating from the main control module pass sequentially through each terminal device along the cascading direction, and then return to the main control module along the cascading path.

[0036] like Figure 3 As shown, in each main link group, taking the first main link group as an example, the two differential signal terminals of the first end device along the signal transmission direction, namely end 1, are connected to the two differential signal terminals A1 and B1 of the corresponding main communication interface of the main control module. Adjacent end devices are cascaded sequentially, with the two differential signal terminals of the next end device, such as end 2, connected to the two differential signal terminals of the previous end device, such as end 1. Similarly, the two differential signal terminals of end 3 are connected to the two differential signal terminals of end 2. In this way, the signal is emitted from the main control module and passes through end 1, end 2, and end 3 sequentially, realizing master-slave polling communication. It should be noted that the main link described in this invention is not a closed loop in the electrical sense, but rather an independent linear communication bus composed of a single communication port of the main control module and multiple end devices connected in series. The signal flow path of each main link group corresponds only to the main communication interface of the main control module and the series-connected end device in the same group, without passing through backup communication interfaces, hubs, or any backup link cables.

[0037] Taking the A2 / B2 interface as an example, A2 is the RS485 DATA- signal line terminal, and B2 is the RS485 DATA+ signal line terminal. The two form an RS485 interface in pairs, and the polarity of A / B cannot be interchanged. Twisted-pair cables are led out from the A2 / B2 ports of the main control module and connected to the A / B terminals of the first end device of the corresponding main link. Subsequent end devices are cascaded in sequence.

[0038] like Figure 1 and Figure 3As shown, the global backup link includes a hub and branch lines connecting the hub to the last end device in each group of main links. The hub is connected to the main control module via the backup communication interface A9 / B9 port. The hub has one uplink port and multiple downlink ports. The uplink port is connected to the main control module via the backup communication interface, and each downlink port is connected to the end device of a group of main links via an independent star branch line. For example, in the first group of main links, one branch line of the hub is connected to end device 3; in the second group of main links, one star branch line of the hub is connected to end device 6. Each group of main links is connected to the hub via its respective branch line, and thus accesses the global backup link.

[0039] Each end device in the N main links connects simultaneously to its respective main link and the global backup link via cascading. Specifically, each end device has a communication interface with two differential signal terminals. This interface connects to the corresponding terminals of the preceding or following devices of the main link and to the star branch of the global backup link. Each end device connects to two independent physical communication lines—the main link and the global backup link—which are physically isolated from each other, forming two independent and parallel communication cabling systems. In this invention, the end device only needs one communication interface to connect to both the main link and the backup link simultaneously, eliminating the need to configure a separate communication interface for each link. This is fundamentally different from the traditional dual-ring network redundancy scheme where end devices need to be configured with dual communication interfaces, significantly reducing hardware costs.

[0040] Based on the above hardware architecture, the main control module is configured to execute the following control logic: First, the main control module polls each end device via the primary link and the global backup link, recording the response status of each end device on both links. The response status indicates whether each end device is online or offline on these two links. The main control module sends query frames (e.g., standard Modbus 0x03 function code) to each end device in a cascading order on both the primary and global backup links, collecting and recording the raw response status of each end device on each channel. The collected raw response status includes four types of parameters: on / off status, response delay, response frame sequence number, and CRC checksum. The main control module establishes a dual-channel parameter matrix, where rows correspond to end devices, and columns correspond to the response status and response delay of each end device on the primary and global backup links.

[0041] To avoid misjudgments caused by transient electromagnetic interference, the main control module continuously collects the original response status multiple times according to the system polling cycle. Only when the original response status indicates that the same end device is offline for multiple consecutive polling cycles on the same communication link, is the corresponding end device marked as offline on the corresponding communication link, and a stable and verified response status is generated. The multiple polling cycles can be configured to 3 to 10 complete polling cycles, preferably 5. The system polling cycle can be configured to 100 milliseconds to 5 seconds, preferably 500 milliseconds. That is, the same end device is judged to be offline only if it has no response for 5 consecutive polling cycles totaling 2.5 seconds on the same communication link. The parameter selection is based on the following: too short a polling cycle will increase the bus load, and too long a cycle will reduce the fault response speed; too few consecutive cycles are prone to misjudgments due to transient interference, and too many cycles will delay the fault detection time. According to industrial field tests, a 500-millisecond polling cycle combined with 5 consecutive judgments can ensure that the fault is detected within 2.5 seconds while filtering out more than 99% of transient interference misjudgments. This multi-round confirmation mechanism can effectively filter out transient electromagnetic interference caused by the start-up and shutdown of high-power motors and the operation of frequency converters, and avoid unnecessary link switching caused by system misjudgment due to instantaneous signal fluctuations.

[0042] Second, a cross-comparison is performed on the response status of each terminal device under these two communication links to determine the fault type and the location of the main link breakpoint. The specific judgment rules for the cross-comparison are as follows: If the current terminal device is online on both the primary link and the global backup link, then the current terminal device is considered to be normal.

[0043] If the current terminal device is offline on the main link but online on the global backup link, it is determined that the main link is a recoverable fault, and the location of the main link breakpoint is determined to be within the communication segment between the current terminal device and the adjacent terminal device closest to the main control module. In simpler terms, when a device is offline on the main link but normal on the backup link, it means that the device itself is intact, and the fault lies in the cable of the main link—the breakpoint is between this device and the device before it. The main control module constructs a one-dimensional array of the main link online status of all devices in this group of main links based on the daisy-chain sequence. Each element in the array corresponds to a terminal device, with the first state value representing online and the second state value representing offline. The array is traversed in order from the main control module to the remote end, retrieving all stable online-to-offline state transition boundaries. Each valid transition corresponds to a cable breakpoint between a group of devices. The main link communication delay gradient is used for auxiliary verification: if the main link delay of the front-end device is normal during the transition, and the main link communication of the back-end device times out during the transition, the actual physical breakpoint is confirmed. After traversal, the coordinates of all device intervals corresponding to breakpoints are recorded in batches. Multiple isolated communication segments are divided based on continuously online device intervals, and precise alarms for multiple breakpoints are output. After repair, automatic reconnection is performed segment by segment in sequence. Figure 4For example, when the breakpoint is located between end 2 and end 3, end 3 is offline on the main link but online on the backup link. The main control module will determine the breakpoint location as between end 2 and end 3.

[0044] If the current end device goes offline on the global backup link, it is determined to be another type of fault. Further: If the current terminal device is offline on both the primary link and the global backup link, and all terminal devices adjacent to the current terminal device on the corresponding primary link are online on both the primary link and the global backup link, then the current terminal device is determined to have a hardware fault, such as a damaged RS485 port. Figure 5 For example, if Terminal 2 is offline on both the main link and the backup link, while Terminal 1 and Terminal 3 are normal on both links, it indicates that the communication port of Terminal 2 itself is damaged or the lines on both sides of it are disconnected at the same time. In this case, the system determines that the device is a hardware failure.

[0045] If the current terminal device is offline on both the primary link and the global backup link, and the terminal device closest to the main control module of the current terminal device is online on the primary link but offline on the global backup link, and the terminal device closest to the global backup link of the current terminal device is offline on the primary link but online on the global backup link, then it is determined that the primary link connection between the current terminal device and all its adjacent terminal devices is simultaneously disconnected. This situation is relatively rare and belongs to an extreme fault scenario where both sides of the device are disconnected at the same time.

[0046] If the current terminal device is online on the primary link but offline on the global backup link, and all other terminal devices on the primary link where the current terminal device is located are offline on the global backup link, then the global backup link is considered to be faulty. That is, when multiple devices simultaneously experience backup link offline, it indicates that the root cause of the fault lies in the global backup link itself, such as a hub failure or a break in the backup backbone, rather than a problem with each device itself.

[0047] Third, when the fault type is determined to be a recoverable primary link fault, the terminal device to be switched in the faulty primary link, determined by the location of the primary link breakpoint, is switched to the global backup link. After the faulty primary link is restored, the switched terminal device is automatically switched back to the corresponding primary link. Specifically, when the fault is determined to be a single primary link disconnection fault, as follows... Figure 4 As shown, the main control module generates a switching command, switching the data acquisition and command interaction channels of all end devices after the breakpoint from the main link to the global backup link. When a fault is determined to be a multiple-interval line breakage fault on a single main link, as follows... Figure 6 As shown, the main control module traverses the coordinates of all device intervals corresponding to the breakpoints, switching the end devices in each isolated communication segment to the global backup link. All segments containing breakpoints share the same global backup link. When a concurrent failure of two or more main links is detected, as follows... Figure 7As shown, the main control module performs simultaneous dual-side data acquisition, compiles a list of all faulty links and offline devices behind each link breakpoint, generates a data acquisition routing table, and clarifies that the data for each faulty device is obtained from the global backup link.

[0048] The specific conditions for the switchback process are as follows: After the faulty line is repaired, the main control module performs link status checks on the repaired main link, using the system polling cycle as the single-round detection cycle. The main control module determines whether all link stability judgment conditions are met in the current round of detection.

[0049] The link stability determination conditions are simultaneously met as follows: all end devices on the main link are online; the round-trip latency of all devices is within a preset normal range, preferably less than 50 milliseconds; the CRC check error rate of each device's response frame is lower than a preset threshold, preferably less than one-thousandth; and the polling frame sequence number is consecutive with no packet loss. The query frame timeout is preset to 100 milliseconds. If all the above conditions are met in the current round, the stability cycle count is incremented by 1; if any condition is not met in any round of detection, the stability cycle count is cleared and re-accumulated. When the stability cycle count reaches a preset threshold N (N is preferably 5, i.e., all stability conditions are met for 5 consecutive complete polling cycles), the main control module performs an automatic switchback operation, switching the data acquisition and command interaction channel of the end devices back from the global backup link to the main link, and the global backup link returns to the low-frequency heartbeat silent monitoring state. This mechanism effectively avoids frequent ping-pong switching between the main and backup links, ensuring a smooth transition of the system after fault repair.

[0050] Fourth, when the fault type is determined to be another fault, such as a hardware failure of the terminal device or a global backup link failure, an alarm signal is generated, and no handover is performed. When the RS485 port of the terminal device itself is damaged or the lines on both sides are simultaneously disconnected, switching to the backup link cannot restore the communication of the device, because the communication port of the device has been damaged or disconnected from all physical connections. Therefore, the system only generates alarm information containing the location of the faulty device, and the remaining terminal devices maintain communication on the main link. When the global backup link itself fails, such as a hub failure, the backup channel has failed, and the system cannot perform a handover. In this case, the backup link must be repaired before the system's redundancy capability can be restored.

[0051] Normal working state corresponding Figure 3 .like Figure 3As shown, under normal system operation, multiple main links operate independently. The main control module sends polling frames to the end devices it covers through each main link (A1 / B1, A2 / B2, A3 / B3, A4 / B4) and receives response data. All end devices complete data upload and command reception through their respective main links, ensuring stable and orderly data transmission. At this time, the global backup link is in silent standby mode. The main control module sends a broadcast heartbeat frame every 2 seconds through the backup link, and each end device replies with a heartbeat response message. The heartbeat response message includes the device's online status, communication latency, CRC checksum, and hardware status word. This heartbeat interaction message is short and sent at long intervals, without consuming the main link's service transmission bandwidth. The main control module continuously counts the number of response timeouts, CRC checksum errors, transmission latency exceeding limits, and hardware status anomalies for each device over three consecutive rounds of heartbeat responses. If any one of these indicators fails to meet the standard for three consecutive rounds, the backup link heartbeat for that device is deemed abnormal, and the abnormal results are included in the cross-comparison input parameters for fault location.

[0052] Single main link disconnection fault corresponding Figure 4 .

[0053] like Figure 4 As shown, when a break occurs in the first main link (A1 / B1) of a certain main link group, the break point is located between terminal 2 and terminal 3. After the fault occurs, the main link is disconnected at the break point, the main lines of terminal 1 and terminal 2 are unobstructed, and the main line of terminal 3 is broken (terminal 3 and its downstream devices cannot communicate with the main control module through the main link). The main control module quickly identifies the communication anomaly through polling detection. Combined with dual-channel cross-comparison, it finds that terminal 1 and terminal 2 are online on both the main link and the backup link, while terminal 3 is offline on the main link but online on the backup link. Based on this, the main control module determines that it is a single main link disconnection fault, with the break point located between terminal 2 and terminal 3.

[0054] The main control module then generates a switching command, switching the communication link of Terminal 3 after the breakpoint to the global backup link. After the switch, Terminal 3 communicates with the main control module via a branch line through the hub and then through the A9 / B9 ports. Terminals 1 and 2 continue to communicate normally through the main link. After the faulty line is repaired, the main control module continuously monitors the status of the main link. Once the round-trip latency of Terminal 3 on the main link is within the normal range, the CRC check error rate is below the preset threshold, and there are no consecutive packet losses for five complete polling cycles, the system automatically performs a switchback operation, restoring Terminal 3 to communication on the main link. The backup link returns to silent monitoring status, requiring no manual intervention throughout the process.

[0055] If a single device's communication port is damaged or both the front and rear lines of the device are disconnected, the corresponding... Figure 5 .

[0056] like Figure 5As shown, when the RS485 hardware port of Terminal 2 is damaged or both its upstream and downstream lines are simultaneously disconnected, Terminal 2 cannot communicate with the main control module through either the main link or the global backup link, and is in a dual-channel offline state. The main control module, through dual-channel polling verification, finds that Terminal 2 has no response on either the main link or the backup link, but Terminals 1 and 3 respond normally on both channels. Based on this, the main control module rules out a simple line breakage problem and accurately determines the fault source as a hardware failure of Terminal 2 or a simultaneous disconnection of the lines on both sides of the device. The system then generates corresponding alarm information, marking the location of the faulty device and the fault type, reminding maintenance personnel to perform repairs. This fault does not affect the normal operation of other devices in the network; the remaining terminals still rely on the main link to complete data interaction. Since switching to the backup link cannot restore the communication of Terminal 2, the system does not perform a switching operation, but only pushes an alarm.

[0057] Multiple disconnections on a single main link Figure 6 .

[0058] like Figure 6 As shown, when two interrupted lines occur on the first main link, interruption point one is located between end 1 and end 2, and interruption point two is located on the star branch line between end 3 and the hub. After the fault occurs, the main link is divided into three isolated independent segments: in segment one, end 1 is normal on the main link and the backup link is also normal; in segment two, end 2 is offline on the main link (after interruption point one), and the backup link is normal; in segment three, end 3 is offline on the main link (after interruption point one), and the backup branch line is also disconnected (interruption point two). The main control module finds through dual-channel polling comparison that: end 1 is online on both the main link and the backup link; end 2 is offline on the main link but online on the backup link; and end 3 is offline on both the main link and the backup link. Combining the status of the adjacent devices of end 3 (end 2 is offline on the main link but online on the backup link, end 3 is offline on both the main link and the backup link), the main control module determines that there are two interruptions, located between end 1 and end 2, and between end 3 and the hub, respectively.

[0059] The main control module outputs multiple breakpoint coordinate alarms in batches based on the boundary jump search results, and switches each isolated segment to the global backup link. Specifically, end segment 2 switches to the backup link (via the backup link branch to the hub and then to A9 / B9); end segment 3 cannot communicate via the backup link due to a broken backup branch, and communication can only be restored after breakpoint 2 is repaired. After all faulty lines are repaired, the entire main link is fully connected and operating stably, the system automatically switches back to the main link working mode segment by segment.

[0060] Response to concurrent failures of multiple main links Figure 7 .

[0061] like Figure 7As shown, when two or more main links fail simultaneously, the first main link failure point is located between terminal devices 1 and 2, and the second main link failure point is located between terminal devices 5 and 6. The main control module initiates a dual-side simultaneous data acquisition mode. The main links that have not failed maintain their original operating status and continue to acquire data from the corresponding terminal devices. All terminal devices in the faulty area acquire data in parallel through the global backup link.

[0062] The main control module compiles a list of all failed links and offline devices behind each link breakpoint, generating a data collection routing table to determine whether data for each device is obtained from the primary link or the global backup link. Specifically, in the first group of primary links, terminal 1 uses the primary link, while terminals 2 and 3 use the backup link; in the second group of primary links, terminals 4 and 5 use the primary link, while terminal 6 uses the backup link. After the two data streams are transmitted back to the main control module, the module merges them into a network-wide device data table using the device ID as the primary key, receiving complete information about all network devices. Data aggregation follows the principle of primary link priority and backup link supplementation: if the primary link can collect data for the same device, it uses the primary link data; only if the primary link cannot collect data does it use the backup link data. If both sides receive data from the same device simultaneously, the primary link data takes precedence, and the backup link data is discarded. Since the same device only collects data from one link at a time, traditional data deduplication is not involved. This mechanism achieves zero data loss in scenarios with concurrent failures of multiple links.

[0063] During fault handling, the system simultaneously completes the location of breakpoints in multiple areas. After all faults are repaired one by one and all main links are running stably, the system automatically switches back to the normal working mode and restores the initial topology operation state.

[0064] According to a second aspect of the present invention, a control method for a redundant communication system based on an asymmetric backup topology is also provided, which is executed at the main control module of the redundant communication system. Figure 2 The method includes the following steps: Step S1: Poll each end device through the main link and the global backup link, and record the response status of each end device under these two communication links. The response status is used to indicate whether each end device is online or offline on these two communication links.

[0065] Step S2: Perform cross-comparison on the response status of each terminal device under these two communication links to determine the fault type and the location of the main link breakpoint.

[0066] Step S3: When the fault type is determined to be a recoverable fault of the main link, the terminal device to be switched in the faulty main link, determined by the location of the main link breakpoint, is switched to the global backup link, and the switched terminal device is automatically switched back to the corresponding main link after the faulty main link is restored; when the fault type is determined to be another fault, an alarm signal is generated and no switching is performed.

[0067] The aforementioned method achieves automatic fault detection, precise fault location, and autonomous repair through a collaborative mechanism of dual-channel polling and cross-comparison. The asymmetric topology of the primary link and the global backup link enables redundant coverage of all primary links with only one additional backup link. Compared to configuring an independent backup link for each primary link, this invention significantly reduces hardware costs and cabling complexity with its one-to-many asymmetric architecture. Simultaneously, the cross-comparison mechanism allows the system to accurately distinguish between line breaks and equipment hardware faults, avoiding unnecessary switching operations. The automatic failback mechanism ensures that the system can autonomously recover to its optimal operating state after fault repair without manual intervention, greatly improving the ease of system operation and maintenance.

[0068] In a further preferred embodiment, step S1 includes the following specific sub-steps: Sub-step S1-1: The main control module sends query frames to each end device sequentially on the main link and the global backup link, respectively, and collects and records the original response status of each end device on each channel.

[0069] The original response status includes four types of parameters: connectivity status, response delay, response frame sequence number, and CRC checksum. Connectivity status refers to whether the device responds in this round of queries; response delay refers to the time difference between the main control module sending the query frame and receiving the response frame; the response frame sequence number is used to detect whether the frame sequence numbers are consecutive (non-consecutive sequences indicate packet loss); and the CRC checksum is used to detect whether errors occurred during data transmission. These four types of parameters reflect the health status of the communication link from different dimensions.

[0070] Sub-step S1-2: The main control module continuously collects the original response status multiple times according to the system polling cycle. Only when the original response status in multiple rounds indicates that the same end device is offline for multiple consecutive polling cycles on the same communication link, will the corresponding end device be marked as offline on the corresponding communication link, and a response status after stability verification be generated.

[0071] The beneficial effect of the aforementioned stability verification mechanism is that in industrial environments, operations such as starting high-power motors and adjusting frequency converter speeds generate strong electromagnetic pulse interference, causing millisecond-level transient fluctuations in bus signals. These transient fluctuations may cause a terminal device to temporarily become unresponsive during a single round of polling, but this is not a true physical disconnection or equipment failure. If the system directly determines the fault based on a single round of polling results, it is highly likely to trigger erroneous switching, leading to frequent ping-pong switching between primary and backup links, severely compromising the stability of the control system. This embodiment, through a continuous multi-round confirmation mechanism—marking a device as offline only when the same device is offline on the same channel for five consecutive complete polling cycles—effectively filters out occasional unresponsiveness caused by transient electromagnetic interference, significantly improving the accuracy of fault determination and the stability of system operation. The value of the five consecutive polling cycles is based on a balance between false detection rate and detection delay—a value that is too small, such as one round, is prone to false detection, while a value that is too large, such as ten rounds, results in excessively long fault detection delays. Five rounds is an empirically optimized value that can be adaptively adjusted within the range of three to ten rounds depending on the intensity of the electromagnetic environment at the site.

[0072] In a further preferred embodiment, step S2 includes the following specific sub-steps: If the current terminal device is online on both the primary link and the global backup link, then the current terminal device is considered to be normal.

[0073] If the current terminal device is offline on the main link but online on the global backup link, it is determined that the main link is recoverable from the fault, and the location of the main link breakpoint is determined to be within the communication segment between the current terminal device and the adjacent terminal device close to the main control module.

[0074] If the current terminal device is offline on the global backup link, it is determined to be another fault. The specific fault type is determined based on the response status of other terminal devices on the main link and backup link of the current terminal device.

[0075] The core idea behind the aforementioned cross-comparison judgment rule is that the combination of on / off states of the same terminal device on two independent physical channels determines the nature of the fault. Specifically: When the terminal device is online on both the primary link and the backup link, it indicates that the device itself is normal, both physical channels are normal, and the system is in a completely healthy state.

[0076] When a terminal device goes offline on the main link but is online on the backup link, it indicates that the terminal device itself is intact (because communication is normal on the backup link), and the fault must lie in the cable of the main link. By observing the topology of the main link, that is, the cascading order along the main link, the cable segment between the first terminal device that goes offline on the main link and the preceding adjacent terminal device is the location of the main link breakpoint. This judgment logic allows the system to accurately locate the breakpoint between two adjacent terminal devices, rather than simply determining that a certain link is faulty, which greatly improves the efficiency of fault diagnosis. Traditional manual troubleshooting methods require maintenance personnel to inspect the cable segment by segment, which takes several hours; this invention reduces the fault location time to the millisecond level through cross-comparison algorithms.

[0077] When a terminal device goes offline on the global backup link, it indicates a problem with the device's backup channel. Possible causes include: hardware failure of the device itself causing both channels to go offline, disconnection of the device's backup branch line, or a failure of the global backup link backbone. In this case, it is necessary to further consider the response status of other devices for a comprehensive judgment. For specific judgment methods, please refer to Example 3.

[0078] In a further preferred embodiment, determining the specific fault type based on the response status of other end devices on the main link and backup link of the current end device includes the following three scenarios: Scenario 1: If the current terminal device is offline on both the main link and the global backup link, and all terminal devices adjacent to the current terminal device on the corresponding main link are online on both the main link and the global backup link, then the current terminal device is determined to have a hardware failure.

[0079] by Figure 5 Taking the scenario shown as an example, Terminal 2 is offline on both the primary and backup links, while Terminals 1 and 3 are normal on both links. This eliminates the possibility of a line break (if it were, all devices downstream of the break would go offline on the primary link, not just Terminal 2), and also eliminates the possibility of a backup link failure (if the backup link were faulty, Terminals 1 and 3 should also be offline on the backup link). The only reasonable explanation is that Terminal 2's RS485 communication port is damaged, preventing it from communicating with the main control module through any channel. Based on this, the system generates an alarm message containing the location of the faulty device, notifying maintenance personnel to replace or repair the device.

[0080] Scenario 2: If the current terminal device is offline on both the main link and the global backup link, and the adjacent terminal device of the current terminal device that is close to the main control module is online on the main link but offline on the global backup link, and the adjacent terminal device of the current terminal device that is close to the global backup link is offline on the main link but online on the global backup link, then it is determined that the main link connection between the current terminal device and all its adjacent terminal devices is simultaneously disconnected.

[0081] This is a rather extreme scenario—the cables on both sides of the device break simultaneously, causing the connection between the device and both the front-end and back-end of the main link to be interrupted. At the same time, the backup branch line also fails for some reason, such as physical damage. In this case, the system marks the device as unreachable, sends an alarm, and awaits manual repair.

[0082] Scenario 3: If the current terminal device is online on the main link but offline on the global backup link, and all other terminal devices on the main link where the current terminal device is located are offline on the global backup link, then the global backup link is determined to be faulty.

[0083] When multiple end devices simultaneously exhibit a primary link online but a backup link offline state, it indicates that these end devices themselves are intact, and the primary link is also intact, but the backup link has experienced a common fault. The cause could be a hub failure, a broken backup backbone line, or a fault in the backup communication interface A9 / B9 port. In this case, the system determines it as a global backup link failure, sends a separate alarm, and does not perform link switching (because the backup link itself has failed, switching is meaningless). Once the backup link is repaired, the system automatically restores its redundancy capability.

[0084] The distinction between the three scenarios described above constitutes a complete fault type identification system, enabling the system not only to determine whether a fault exists but also to accurately identify at which level the fault occurs, such as the equipment layer, cable layer, or backup link layer. This multi-layered fault diagnosis capability is one of the important improvements of this invention compared to existing technologies. Existing redundancy solutions can only detect a single broken link, but cannot distinguish between equipment faults and line faults, requiring maintenance personnel to still conduct on-site inspections one by one. This invention, through combined analysis of dual-channel response states, achieves automatic fault type identification and precise location of breakpoints, significantly reducing the workload of manual troubleshooting.

[0085] It is important to note that steps S1 to S3 are not executed in isolation, but rather in conjunction with the periodic heartbeat monitoring of the global backup link. When the global backup link is functioning normally, it is in silent standby mode, and the main control module sends a broadcast heartbeat frame every 2 seconds through the backup link. Upon receiving the heartbeat frame, each end device replies with a heartbeat response message, including the device's online status, communication latency, CRC checksum, and hardware status word. The main control module counts the number of response timeouts, CRC checksum errors, transmission latency exceeding limits, and hardware status anomalies for each device over three consecutive rounds of heartbeat responses. If any one of these indicators fails to meet the standard for three consecutive rounds, the backup link heartbeat for that device is deemed abnormal, and the abnormal result is used as the input parameter for the dual-channel cross-comparison in step S2.

[0086] The synergistic effect of the heartbeat mechanism and the dual-channel cross-comparison mechanism lies in the following: Before a fault occurs, the heartbeat signal continuously monitors the health status of the backup link, ensuring its availability in the event of a primary link failure; after a fault occurs, abnormal heartbeat data serves as supplementary information for cross-comparison, assisting the system in more accurately determining the fault type—for example, when a device is offline on the primary link and exhibits an abnormal heartbeat on the backup link, the system can more quickly determine that the fault is in the device itself rather than a line break. This closed-loop mechanism, from monitoring to verification to determination, significantly improves the efficiency and accuracy of the system's fault diagnosis.

[0087] In a further preferred embodiment, refer to Figure 8 The redundant communication system control method of the present invention is executed according to closed-loop logic. This closed-loop logic generally includes a system initialization phase, a dual-channel polling phase, a fault judgment branch and fault identification, classification and handling phase, a continuous monitoring and repair phase, and a stability verification and automatic switchback phase.

[0088] During the system initialization phase: After the system is powered on, the main control module performs initialization configuration, starts the business communication functions of N main links, and each main link enters normal working state, carrying out data acquisition and command interaction of the terminal devices; at the same time, the global backup link enters silent standby mode, and the main control module sends broadcast heartbeat frames to each terminal device at a fixed period, such as once every 2 seconds, through the backup communication interface to continuously monitor the physical connectivity of the backup link and ensure that the backup link is available at any time.

[0089] During the dual-channel polling phase: After initialization, the main control module polls each end device sequentially via the main link and the global backup link, according to a system polling cycle of 500 milliseconds. It records the response status of each end device on both communication links, collecting the dual-channel communication status in real time. To eliminate misjudgments caused by transient electromagnetic interference, the main control module performs multi-cycle stability checks on the collected raw response status. Only when the same end device shows an offline status for multiple consecutive polling cycles (e.g., 5 cycles) on the same communication link is it marked as offline.

[0090] In the fault diagnosis branch: the main control module performs a cross-comparison of the dual-channel response status of each terminal device based on the relevant information mentioned in step S2 above to determine whether there is a communication fault in the system. If there is no communication fault, the system maintains the main loop communication, the backup link remains in standby state, and returns to the dual-channel polling stage to continue periodic detection, forming a fault-free working cycle. If a communication fault exists, the system enters the fault identification stage.

[0091] In the fault identification and classification phase: the main control module classifies faults into four operating conditions based on cross-comparison results and handles them accordingly: Condition 1, Single main loop disconnection fault: If the fault is determined to be a recoverable fault in the main link, the terminal devices to be switched after the disconnection will be automatically switched to the global backup link. Condition 2, equipment port damage or dual-link failure: If the fault is determined to be other faults, an alarm signal is generated and the fault location is marked. The backup link remains in a ready state and no switching is performed. Condition 3: Multiple disconnection faults in a single loop: Locate all disconnection points and switch the terminal devices in each isolation section to the global backup link. Condition 4, multiple main loops experiencing concurrent failures: The dual-side simultaneous data acquisition mode is activated. The normal main link continuously acquires service data, while the device waiting to be switched on the failed main link acquires data through the global backup link. The two data streams are merged into a network-wide device data table using the device ID as the primary key.

[0092] During the continuous monitoring and repair phase: After the fault handling is completed, the main control module continuously monitors the repair status of the faulty main link and checks the response status of the terminal devices in the faulty section on the main link according to the polling cycle. If the fault is not repaired, the current switching state is maintained and monitoring continues; if the fault has been repaired, the stability verification phase begins.

[0093] During the stability verification and automatic switchback phase: After the faulty line is repaired, the main control module performs link stability testing on the repaired main link using the system polling cycle as a single testing cycle. Link stability is determined when the following conditions are simultaneously met: all end devices on the main link are online; the round-trip latency of all devices is within a preset normal range (less than 50 milliseconds); the CRC check error rate of each device's response frame is lower than a preset threshold (less than one-thousandth); and the polling frame sequence number is consecutive with no packet loss. Only when the above stability conditions are met for multiple consecutive complete testing cycles (e.g., 5 cycles) will the main control module perform an automatic switchback operation, switching the end devices switched to the global backup link back to the corresponding main link. The global backup link returns to silent heartbeat monitoring status, the system recovers to its initial operating mode, and the entire fault handling loop is completed.

[0094] According to a third aspect of the present invention, a terminal is also provided. The terminal includes a processor, a memory, an input / output interface, a communication interface, a display screen, and an input device. The processor provides computing and control capabilities, the memory stores computer programs, the input / output interface facilitates information exchange between the processor and external devices, and the communication interface enables wired or wireless communication with external terminals.

[0095] The memory is used to store instructions.

[0096] The processor is configured to operate according to the instructions to execute the steps described in any of the above control method embodiments.

[0097] Specifically, when executing the instructions, the processor performs the following operations: polling each end device through the main link and the global backup link, and recording the response status of each end device under these two communication links; performing cross-comparison on the response status of each end device under these two communication links to determine the fault type and the location of the main link breakpoint; when the fault type is determined to be a recoverable fault of the main link, switching the end device to be switched in the faulty main link, as determined by the location of the main link breakpoint, to the global backup link, and automatically switching the switched end device back to the corresponding main link after the faulty main link is restored; when the fault type is determined to be another fault, generating an alarm signal and not performing a switch.

[0098] In this embodiment, the terminal is the aforementioned main control module, namely the dedicated industrial gateway device GBM-IP100. The processor is an industrial-grade embedded processor such as an ARM Cortex-A7 or RISC-V processor, with a main frequency of no less than 500MHz, possessing sufficient computing power to execute multi-channel polling, cross-comparison, and fault diagnosis algorithms. The memory includes non-volatile memory such as Flash, with a capacity of no less than 128MB, and random access memory such as DDR3, with a capacity of no less than 64MB. The non-volatile memory is used to store the operating system, application programs, and configuration parameters, while the random access memory is used for data caching during program execution. The terminal also includes a power module that supports a wide voltage input from 9 to 36V to adapt to industrial field power supply environments; the casing adopts an industrial-grade protection design with a protection level of no less than IP30, and an operating temperature range of -40 degrees Celsius to +85 degrees Celsius.

[0099] The terminal provided in this embodiment can be an industrial computer, a programmable logic controller, an embedded industrial control computer, a gateway device, or a dedicated communication controller, etc. By executing the above control method, the terminal realizes unified management and scheduling of multiple main links and global backup links, and has complete functions of automatic fault detection, precise location, autonomous switching, and automatic back-off.

[0100] According to a fourth aspect of the present invention, a computer-readable storage medium is provided having a computer program stored thereon. When executed by a processor, the program implements the steps described in any of the above-described control method embodiments.

[0101] The computer-readable storage medium may be a tangible device capable of holding and storing instructions used by an instruction execution device, such as, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof.

[0102] More specific examples of computer-readable storage media (a non-exhaustive list) include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) or flash memory, static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices (such as punch cards or recessed protrusions storing instructions thereon), and any suitable combination of the above.

[0103] When the computer program in the storage medium is executed by the processor, the terminal can act as the main control module to perform core functions such as dual-channel polling, cross-comparison judgment, switching decision and back-off control, thereby realizing unified management and redundancy control of multiple main links and global backup links.

[0104] In summary, the present invention has the following advantages over the prior art: 1. Employing an asymmetric backup topology, N main links share a single global backup link. End devices require only one communication interface to simultaneously connect to both the main and backup links. Compared to the traditional symmetrical dual-ring network solution (which requires dual communication interfaces and double cabling for each end device), this significantly reduces hardware costs and cabling complexity. When the number of main links is N, the traditional solution requires N backup links, while this invention requires only one. Hardware costs decrease significantly as N increases. For example, in a scenario with 8 main links and 10 end devices per group, hardware costs are reduced by approximately 40%, and cabling costs by approximately 50%.

[0105] 2. Through a dual-channel cross-comparison mechanism, the system can accurately locate breakpoints online—down to the cable segment between two adjacent end devices, rather than simply determining that "a certain link is faulty." Fault location time is reduced from hours to milliseconds compared to traditional manual troubleshooting, significantly improving operational efficiency.

[0106] 3. Through a multi-round stability verification mechanism (e.g., five consecutive rounds of confirmation), the system can effectively filter out occasional unresponsiveness caused by transient electromagnetic interference, avoiding ping-pong switching of the primary and backup links due to transient signal fluctuations, and significantly improving the system's operational stability in environments with strong electromagnetic interference. Compared with a single-cycle judgment scheme, the false switching rate is reduced by more than 90%, the transient interference filtering rate reaches more than 99%, and the ping-pong switching rate is less than one in a thousand.

[0107] 4. Through a comprehensive fault type identification system, the system can accurately distinguish between three different types of faults: line disconnection, equipment hardware failure, and global backup link failure, and take differentiated handling strategies such as switching and alarms respectively, thus avoiding unnecessary switching operations.

[0108] 5. Through an automatic switching and back-off mechanism, the system autonomously switches to a backup link when a recoverable fault occurs on the primary link. After the fault is repaired, it automatically switches back to the primary link after five consecutive complete polling cycles that meet all link stability conditions. The entire process requires no manual intervention, significantly improving the system's fault tolerance and ease of maintenance. The five consecutive complete polling cycles are an empirically optimized value and can be adaptively adjusted within the range of 3 to 8 rounds based on the strength of the electromagnetic environment. In harsh electromagnetic environments, the number of rounds is appropriately increased to improve the confidence of stability assessment; in favorable electromagnetic environments, the number of rounds is appropriately reduced to accelerate the back-off response speed.

[0109] 6. Through a dual-side simultaneous data acquisition mechanism, the system can simultaneously acquire data through the main link and backup link when multiple main links fail concurrently, and merge the data into a complete network device data table with the device ID as the primary key, achieving zero data loss.

[0110] This disclosure can be a system, method, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of this disclosure.

[0111] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination of the foregoing. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.

[0112] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.

[0113] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, etc., and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.

[0114] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the protection scope of the claims of the present invention.

Claims

1. A redundant communication system based on an asymmetric backup topology, characterized in that, include: The main control module has N sets of main communication interfaces and one set of backup communication interfaces, where N≥2; Each of the N main communication interfaces corresponds to one of the N main links, and each main link includes multiple cascaded terminal devices; in each main link, the first terminal device is connected to the corresponding main communication interface. A global backup link includes a hub and a branch line connecting the hub to the last end device in each group of main links. The hub is connected to the main control module through the backup communication interface. The global backup link is shared by the N groups of main links. Each end device in the N groups of main links is simultaneously connected to the corresponding main link and the global backup link through cascading.

2. The redundant communication system based on asymmetric backup topology according to claim 1, characterized in that, Each main communication interface, the backup communication interface, and each end device in each main link group includes two differential signal terminals. In each main link group, the two differential signal terminals of the first end device are connected to the two differential signal terminals of the corresponding main communication interface group, the two differential signal terminals of the subsequent end device are respectively connected to the two differential signal terminals of the preceding end device, and the two differential signal terminals of the last end device are connected to the hub.

3. The redundant communication system based on asymmetric backup topology according to claim 1, characterized in that, The main control module includes a main control chip and one or more communication expansion modules connected to the main control chip; the one or more communication expansion modules are used to expand the number of main communication interfaces of the main control module.

4. The redundant communication system based on asymmetric backup topology according to claim 1, characterized in that, The main communication interface and the backup communication interface are at least one of RS485, RS422, CAN bus and industrial Ethernet.

5. The redundant communication system based on asymmetric backup topology according to claim 1, characterized in that, The main control module is configured as follows: Each end device is polled via the main link and the global backup link, and the response status of each end device under these two communication links is recorded. The response status is used to indicate whether each end device is online or offline on these two communication links. Cross-comparison is performed on the response status of each terminal device under these two communication links to determine the fault type and the location of the main link breakpoint; When the fault type is determined to be a recoverable fault of the main link, the terminal device to be switched in the faulty main link, which is determined by the location of the main link breakpoint, is switched to the global backup link, and the switched terminal device is automatically switched back to the corresponding main link after the faulty main link is restored. When the fault type is determined to be another fault, an alarm signal is generated and no switching is performed.

6. The redundant communication system based on asymmetric backup topology according to claim 5, characterized in that, The main control module is configured as follows: On the main link and the global backup link, query frames are sent to each end device in a cascaded order, and the original response status of each end device on each channel is collected and recorded. The system continuously collects the original response status for multiple rounds according to the polling cycle. Only when the original response status for multiple rounds indicates that the same end device is offline for multiple consecutive polling cycles on the same communication link, will the corresponding end device be marked as offline on the corresponding communication link, and a response status after stable verification will be generated.

7. The redundant communication system based on asymmetric backup topology according to claim 5, characterized in that, The main control module is configured as follows: If the current terminal device is online on both the primary link and the global backup link, then the current terminal device is considered to be normal. If the current terminal device is offline on the main link but online on the global backup link, it is determined that the main link is recoverable, and the location of the main link breakpoint is determined to be within the communication segment between the current terminal device and the adjacent terminal device close to the main control module. If the current end device is offline on the global backup link, it is determined to be another fault.

8. The redundant communication system based on asymmetric backup topology according to claim 7, characterized in that, The main control module is also configured to: If the current terminal device is offline on both the main link and the global backup link, and all terminal devices adjacent to the current terminal device on the corresponding main link are online on both the main link and the global backup link, then the current terminal device is determined to have a hardware failure. If the current terminal device is offline on both the main link and the global backup link, and the adjacent terminal device of the current terminal device that is close to the main control module is online on the main link but offline on the global backup link, and the adjacent terminal device of the current terminal device that is close to the global backup link is offline on the main link but online on the global backup link, then it is determined that the main link connection between the current terminal device and all its adjacent terminal devices is simultaneously disconnected. If the current terminal device is online on the primary link but offline on the global backup link, and all other terminal devices on the primary link where the current terminal device is located are offline on the global backup link, then the global backup link is considered to be faulty.

9. A control method for a redundant communication system based on an asymmetric backup topology as described in any one of claims 1 to 4, executed at the main control module, characterized in that, include: The system polls each end device through the main link and the global backup link, and records the response status of each end device under these two communication links. The response status is used to indicate whether each end device is online or offline on the two communication links; Cross-comparison is performed on the response status of each terminal device under these two communication links to determine the fault type and the location of the main link breakpoint; When the fault type is determined to be a recoverable fault of the main link, the terminal device to be switched in the faulty main link, which is determined by the location of the main link breakpoint, is switched to the global backup link, and the switched terminal device is automatically switched back to the corresponding main link after the faulty main link is restored. When the fault type is determined to be another fault, an alarm signal is generated and no switching is performed.

10. The control method according to claim 9, characterized in that, The process of polling each end device through the main link and the global backup link, and recording the response status of each end device under these two communication links, includes: On the main link and the global backup link, query frames are sent sequentially to each end device to collect and record the original response status of each end device on each channel. The system continuously collects the original response status for multiple rounds according to the polling cycle. Only when the original response status for multiple rounds indicates that the same end device is offline for multiple consecutive polling cycles on the same communication link, will the corresponding end device be marked as offline on the corresponding communication link, and a response status after stable verification will be generated.

11. The control method according to claim 9, characterized in that, The process of cross-comparing the response status of each end device under these two communication links to determine the fault type and the location of the main link breakpoint includes: If the current terminal device is online on both the primary link and the global backup link, then the current terminal device is considered to be normal. If the current terminal device is offline on the main link but online on the global backup link, it is determined that the main link is recoverable, and the location of the main link breakpoint is determined to be within the communication segment between the current terminal device and the adjacent terminal device close to the main control module. If the current terminal device is offline on the global backup link, it is determined to be another fault. The specific fault type is determined based on the response status of other terminal devices on the main link and the global backup link where the current terminal device is located.

12. The control method according to claim 11, characterized in that, The determination of the specific fault type based on the response status of other terminal devices on the main link and the global backup link of the current terminal device includes: If the current terminal device is offline on both the main link and the global backup link, and all terminal devices adjacent to the current terminal device on the corresponding main link are online on both the main link and the global backup link, then the current terminal device is determined to have a hardware failure. If the current terminal device is offline on both the main link and the global backup link, and the adjacent terminal device of the current terminal device that is close to the main control module is online on the main link but offline on the global backup link, and the adjacent terminal device of the current terminal device that is close to the global backup link is offline on the main link but online on the global backup link, then it is determined that the main link connection between the current terminal device and all its adjacent terminal devices is simultaneously disconnected. If the current terminal device is online on the primary link but offline on the global backup link, and all other terminal devices on the primary link where the current terminal device is located are offline on the global backup link, then the global backup link is considered to be faulty.

13. A terminal, comprising a processor and a storage medium; characterized in that: The storage medium is used to store instructions; the processor is used to operate according to the instructions to perform the steps of the method according to any one of claims 9 to 12.

14. A computer-readable storage device having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the steps of the method described in any one of claims 9 to 12.