Switching control method and device of redundant controllers, electronic equipment and storage medium

CN122801600APending Publication Date: 2026-09-22HUANENG LANCANG RIVER HYDROPOWER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610664923.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-14
Publication Date
2026-09-22

AI Technical Summary

Technical Problem

[0003]现有冗余切换方法中,主机状态信号通常直接采用单路硬回路传输,由于继电器损坏或回路断线等单一故障,导致备用控制器无法及时获取主机态信息,致使主备切换逻辑失效

Benefits of technology

[0021]本公开提供的冗余控制器的切换控制方法、装置、电子设备和存储介质,通过本申请,由于采用双控制器主备开关量输出/输入通道的冗余设计,同步传输主机状态信号并通过双路信号逻辑或运算保障状态信息有效获取,同时增设双信号状态一致性校验与预警机制,从传输链路和信号验证两方面规避单一故障导致的信息丢失风险,弥补了单路硬回路传输的抗干扰短板,因此,可以解决现有冗余切换方法依赖单路硬回路传输主机状态信号,易因继电器损坏、回路断线等单一故障导致备用控制器无法获取主机态信息,主备切换逻辑失效,进而造成调速系统丧失控频与防超速功能、机组转速失控的技术问题,达到提升主备切换逻辑可靠性、增强故障容错能力、及时预警通道异常、保障调速系统持续稳定发挥控频与防超速功能,有效避免机组转速失控,维护电力系统安全稳定运行的技术效果。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122801600A_ABST
    Figure CN122801600A_ABST
Patent Text Reader

Abstract

The application discloses a switching control method and device of a redundant controller, an electronic device and a storage medium, adopts a redundant design of a double-controller master / standby switching value output / input channel, synchronously transmits a host state signal and guarantees effective acquisition of state information through double-path signal logic or operation, simultaneously adds a double-signal state consistency check and early warning mechanism, avoids information loss risks caused by single faults from two aspects of a transmission link and signal verification, makes up for the anti-interference short board of single-path hard loop transmission, achieves the technical effects of improving master / standby switching logic reliability, enhancing fault tolerance capability, timely warning of channel abnormalities, guaranteeing the continuous and stable performance of a speed regulation system in frequency control and anti-over-speed functions, effectively avoiding unit speed out of control, and maintaining the safe and stable operation of a power system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of data processing technology, and in particular to a switching control method, apparatus, electronic device, and storage medium for a redundant controller. Background Technology

[0002] As a core component in the hydropower industry for maintaining grid frequency stability, turbine governors are widely used in the power regulation of large generator units. With the development of domestic technology, control systems based on a dual-PLC redundant architecture have become mainstream. Through the coordinated operation of hardware loops, logic judgments, and actuators, a complete technical system covering speed control, load distribution, and start-stop protection has been constructed.

[0003] In existing redundancy switching methods, the master status signal is usually transmitted directly using a single hard loop. Due to single faults such as relay failure or loop breakage, the backup controller cannot obtain the master status information in a timely manner, causing the master-slave switching logic to fail. This defect is particularly serious when the controller experiences a sudden power outage, directly causing the speed control system to lose its frequency control and overspeed prevention functions, which in turn leads to uncontrolled unit speed and seriously threatens the safe and stable operation of the power system. Summary of the Invention

[0004] This disclosure provides a switching control method, apparatus, electronic device, and storage medium for redundant controllers.

[0005] According to a first aspect of this disclosure, a switching control method for redundant controllers is provided, comprising:

[0006] The first controller and the second controller drive the corresponding main signal output device through their respective main switch output channels and drive the corresponding backup signal output device through their respective backup switch output channels, so as to synchronously output the host status signal of the controller. Each controller receives a first host status signal fed back by the main signal output device of another controller through its own main switch input channel, and receives a second host status signal fed back by the backup signal output device of another controller through its own backup switch input channel. Each controller performs a logical OR operation on the received first host status signal and second host status signal. When at least one signal indicates that another controller is in host status, the other controller is determined to be the current master controller and a redundancy switch is performed. Each controller compares the received first host status signal with the second host status signal in real time to ensure consistency. If the two statuses are inconsistent, an early warning signal indicating inconsistent host status input is generated and sent to the monitoring system.

[0007] Optionally, the first controller and the second controller respectively drive the corresponding main signal output device through their respective main switch output channels and drive the corresponding backup signal output device through their respective backup switch output channels, so as to synchronously output the host status signal of the controller, including: When the first controller determines that the first controller is the current master controller, it sets the master switch output channel and the backup switch output channel of the first controller, so that the current flows through the coil of the master signal output device and the coil of the backup signal output device corresponding to the first controller, and drives the normally open contacts of the master signal output device and the backup signal output device to close. The host status signal of the first controller is synchronously transmitted to the input terminal of the second controller through two independent hard loops.

[0008] Optionally, each controller receives a first host status signal fed back by the master signal output device of another controller through its own master switch input channel, and receives a second host status signal fed back by the backup signal output device of another controller through its own backup switch input channel, including: The first controller monitors the first host status signal fed back by the normally open contact of the main signal output device of the second controller in real time through the main switch input channel; The second host status signal is fed back by the normally open contact of the backup signal output device of the second controller in real time based on the backup switch input channel, so as to form two parallel input sources for judging the host status of the second controller.

[0009] Optionally, each controller performs a logical OR operation on the received first host status signal and second host status signal. When at least one signal indicates that another controller is in host status, determining that the other controller is the current primary controller and performing redundancy switching includes: The first controller performs a Boolean OR operation between the first host status signal from the primary switch input channel and the second host status signal from the backup switch input channel. If the calculation result is true, the second controller is determined to be the current primary controller, the first controller automatically switches its own state from primary to standby state, and stops driving the primary signal output device and standby signal output device of this controller.

[0010] Optionally, each controller compares the received first host status signal with the second host status signal in real time to ensure consistency. If the two statuses are inconsistent, a warning signal indicating inconsistent host status input is generated and sent to the monitoring system, including: The first controller synchronously reads the first host status signal value on the primary switch input channel and the second host status signal value on the backup switch input channel in each control cycle, and compares the two bit by bit. If the logic level states are different, it is determined that there is an inconsistency in the host status input of the second controller, and an alarm signal is generated.

[0011] Optionally, the method further includes: When any controller detects an inconsistency in the host status input, it records the time of the fault and the type of signal difference locally, and triggers a visual alarm on the controller's human-machine interface.

[0012] According to a second aspect of this disclosure, a switching control device for redundant controllers is provided, comprising: The output unit is used for the first controller and the second controller to drive the corresponding main signal output device through their respective main switch output channels and drive the corresponding backup signal output device through their respective backup switch output channels, so as to synchronously output the host status signal of the controller. The receiving unit is used for each controller to receive a first host status signal fed back by the main signal output device of another controller through its own main switch input channel, and to receive a second host status signal fed back by the backup signal output device of another controller through its own backup switch input channel. The logic switching unit is used for each controller to perform a logical OR operation on the received first host status signal and second host status signal. When at least one signal indicates that another controller is in the host state, the other controller is determined to be the current master controller and a redundancy switch is performed. The status warning unit is used by each controller to compare the received first host status signal with the second host status signal in real time. If the two statuses are inconsistent, a warning signal indicating inconsistent host status input is generated and sent to the monitoring system.

[0013] Optionally, the output unit is further configured to: When the first controller determines that the first controller is the current master controller, it sets the master switch output channel and the backup switch output channel of the first controller, so that the current flows through the coil of the master signal output device and the coil of the backup signal output device corresponding to the first controller, and drives the normally open contacts of the master signal output device and the backup signal output device to close. The host status signal of the first controller is synchronously transmitted to the input terminal of the second controller through two independent hard loops.

[0014] Optionally, the receiving unit is further configured to: The first controller monitors the first host status signal fed back by the normally open contact of the main signal output device of the second controller in real time through the main switch input channel; The second host status signal is fed back by the normally open contact of the backup signal output device of the second controller in real time based on the backup switch input channel, so as to form two parallel input sources for judging the host status of the second controller.

[0015] Optionally, the logic switching unit is further configured to: The first controller performs a Boolean OR operation between the first host status signal from the primary switch input channel and the second host status signal from the backup switch input channel. If the calculation result is true, the second controller is determined to be the current primary controller, the first controller automatically switches its own state from primary to standby state, and stops driving the primary signal output device and standby signal output device of this controller.

[0016] Optionally, the status warning unit is further configured to: The first controller synchronously reads the first host status signal value on the primary switch input channel and the second host status signal value on the backup switch input channel in each control cycle, and compares the two bit by bit. If the logic level states are different, it is determined that there is an inconsistency in the host status input of the second controller, and an alarm signal is generated.

[0017] Optionally, an alarm logging unit may also be included; The alarm recording unit is used for: When any controller detects an inconsistency in the host status input, it records the time of the fault and the type of signal difference locally, and triggers a visual alarm on the controller's human-machine interface.

[0018] According to a third aspect of this disclosure, an electronic device is provided, comprising: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method described in the first aspect above.

[0019] According to a fourth aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are configured to cause the computer to perform the method described in the first aspect above.

[0020] According to a fifth aspect of this disclosure, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the method described in the first aspect above.

[0021] The redundant controller switching control method, device, electronic equipment, and storage medium disclosed herein, through the redundant design of dual-controller main and backup switch output / input channels, synchronously transmit the host status signal and ensure effective acquisition of status information through dual-channel signal logic OR operation. Simultaneously, a dual-signal status consistency verification and early warning mechanism is added, avoiding the risk of information loss due to a single fault from both the transmission link and signal verification aspects. This compensates for the anti-interference shortcomings of single-channel hard-loop transmission. Therefore, it can solve the technical problem of existing redundant switching methods relying on single-channel hard-loop transmission of host status signals, which is prone to failure due to single faults such as relay damage or circuit disconnection, resulting in the backup controller's inability to acquire host status information, failure of the main / backup switching logic, and consequently, loss of frequency control and overspeed prevention functions of the speed control system and runaway unit speed. This achieves the technical effects of improving the reliability of the main / backup switching logic, enhancing fault tolerance, providing timely early warning of channel anomalies, ensuring the continuous and stable operation of the speed control system in terms of frequency control and overspeed prevention functions, effectively preventing runaway unit speed, and maintaining the safe and stable operation of the power system.

[0022] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description

[0023] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein: Figure 1 A flowchart illustrating a switching control method for a redundant controller provided in an embodiment of this disclosure; Figure 2 A schematic diagram of the structure of a switching control device for a redundant controller provided in an embodiment of this disclosure; Figure 3 A schematic diagram of the structure of a switching control device for a redundant controller provided in an embodiment of this disclosure; Figure 4 A schematic block diagram of an example electronic device provided for embodiments of this disclosure. Detailed Implementation

[0024] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0025] The following description, with reference to the accompanying drawings, outlines a switching control method, apparatus, electronic device, and storage medium for redundant controllers according to embodiments of the present disclosure.

[0026] Figure 1 This is a flowchart illustrating a switching control method for a redundant controller provided in an embodiment of this disclosure.

[0027] like Figure 1 As shown, the method includes the following steps: Step 101: The first controller and the second controller drive the corresponding main signal output device through their respective main switch output channels and drive the corresponding backup signal output device through their respective backup switch output channels, so as to synchronously output the host status signal of the controller. To address the issue of host status information loss due to a single signal link failure, this method configures redundant signal driving and output mechanisms for each controller. Specifically, the first controller and the second controller each possess a first signal driving path and a second signal driving path. When any controller is identified as the host, it not only drives the corresponding first signal output device through its first signal driving path but also simultaneously drives the corresponding second signal output device through its second signal driving path, thereby simultaneously transmitting the status signal indicating that the controller is the host in parallel.

[0028] The first and second signal drive paths are hardware-independent, thus creating redundancy in the drive level. In a typical implementation, the first signal drive path can be a main output circuit consisting of a controller's conventional digital output channel driving a main relay, while the second signal drive path can be a backup output circuit consisting of a controller's backup digital output channel driving a backup relay. This dual-channel parallel drive method ensures that even if one drive path or its signal output device fails, the other path can still reliably transmit the host status information to the external system, providing the remote controller with continuous and accurate switching judgment.

[0029] Step 102: Each controller receives a first host status signal fed back by the main signal output device of another controller through its own main switch input channel, and receives a second host status signal fed back by the backup signal output device of another controller through its own backup switch input channel. Each controller not only has a first signal receiving path, but also a second signal receiving path that is independent of the first signal receiving path. When another controller sends out a host status signal in parallel through its redundant signal driving path, the local controller receives the first host status signal fed back from the first signal output device of the other controller through its first signal receiving path; at the same time, the local controller receives the second host status signal fed back from the second signal output device of the other controller through its second signal receiving path.

[0030] The local controller can obtain status information representing the same peer host from two independent physical links. The first host status signal and the second host status signal are logically consistent, but isolated from each other in the transmission path. In one specific embodiment, the first signal receiving path can be an input loop composed of the controller's main digital input channel, used to receive signals fed back by the peer controller through the main relay contacts; while the second signal receiving path can be an input loop composed of the controller's backup digital input channel, used to receive signals fed back by the peer controller through the backup relay contacts. This dual-channel receiving configuration ensures that any malfunction of a single receiving path or a single output device at the peer will not block the transmission of host status information to the local end.

[0031] This receiver redundancy architecture, in conjunction with the transmitter's parallel drive mechanism, establishes a fully dualized signal channel across redundant controllers, from drive and output to reception. Even if one path experiences a disconnection or device failure, the other path can still independently complete the transmission of status information, thus completely eliminating the risk of switching failure due to a single signal link failure and significantly improving the fault tolerance of the host status determination.

[0032] Step 103: Each controller performs a logical OR operation on the received first host status signal and second host status signal. When at least one signal indicates that another controller is in host status, the other controller is determined to be the current master controller and a redundancy switch is performed. The local controller uses the first host status signal obtained through the first signal receiving path and the second host status signal obtained through the second signal receiving path as input parameters for a logical OR operation. The logical processing mechanism is defined as follows: as long as at least one of the first host status signal and the second host status signal is in a valid state and can indicate that the other controller is the host, the local controller determines that the other controller is the current master controller and executes the corresponding redundancy switching procedure based on this determination result.

[0033] By using this "OR" logic decision method, the controller's confirmation of the host identity does not depend on the integrity of any single path signal. Even if a signal transmission link is interrupted due to a fault or remains at an invalid level for a long time, as long as another redundant link can still transmit a valid host status identifier normally, the system can accurately complete the judgment and switching of the host and backup identities.

[0034] In one embodiment, the logical OR operation can be implemented by configuring two Boolean variables corresponding to the first and second switch input points as a logical OR relationship in the controller's program logic. For example, two input signals received from the autonomous relay contact and the standby relay contact can be logically ORed to generate a comprehensive "peer is master" status flag to participate in subsequent program control.

[0035] Step 104: Each controller compares the received first host status signal with the second host status signal in real time to ensure consistency. If the two statuses are inconsistent, an early warning signal indicating inconsistent host status input is generated and sent to the monitoring system.

[0036] Each controller, after acquiring the first host status signal and the second host status signal through the first signal receiving path and the second signal receiving path respectively, not only uses them for logical decision-making but also continuously compares the states of these two signals for consistency. This comparison operation aims to diagnose whether there are abnormal differences between the two redundant signal transmission links. When the logical states represented by the first host status signal and the second host status signal are inconsistent with each other—that is, when one path indicates that the peer controller is the host while the other path does not make the same indication—the controller determines that there is a fault in the redundant signal transmission link. At this time, the controller automatically generates an early warning signal representing the inconsistency of the host status input and sends the early warning signal to the monitoring system to prompt maintenance personnel to check and maintain the relevant hardware loops.

[0037] This mechanism ensures that even if the system's fault-tolerant logic can tolerate a single-link failure and maintain normal operation, the failure itself will not remain hidden but will be promptly revealed and reported. In one specific implementation, this consistency comparison can be achieved through real-time logical comparison of two variables corresponding to the primary and backup switch input points, respectively, by the controller program. When the two level states are inconsistent, alarm logic is triggered and corresponding alarm information is output to the monitoring backend.

[0038] In some embodiments, the first controller and the second controller respectively drive corresponding primary signal output devices through their respective primary digital output channels and drive corresponding backup signal output devices through their respective backup digital output channels, so as to synchronously output the host status signal of the controller, including: When the first controller determines that the first controller is the current master controller, it sets the master switch output channel and the backup switch output channel of the first controller, so that the current flows through the coil of the master signal output device and the coil of the backup signal output device corresponding to the first controller, and drives the normally open contacts of the master signal output device and the backup signal output device to close. The host status signal of the first controller is synchronously transmitted to the input terminal of the second controller through two independent hard loops.

[0039] When the first controller determines through its internal logic that it is the current primary controller, its processor simultaneously issues set commands to both the primary and backup digital output channels. Specifically, the primary digital output channel of the first controller outputs a drive voltage in the set state. This voltage is applied to the coil of the primary signal output device electrically connected to the first controller. Current flows through the coil, generating electromagnetic force that drives the normally open contact of the primary signal output device to close. At the same time, the backup digital output channel of the first controller is also set synchronously, outputting a drive voltage to the coil of the backup signal output device, energizing the coil and driving the normally open contact of the backup signal output device to close.

[0040] In a typical embodiment, both the primary signal output device and the backup signal output device are electromagnetic relays. For example, the relay defined as "Set A is host 1" in the original system can be used as the primary signal output device, and the newly added relay defined as "Set A is host 2" can be used as the backup signal output device. The coil of the primary relay is connected to the conventional switching output point of the first controller, and the coil of the backup relay is connected to the backup switching output point A-BO06 of the first controller. When the first controller is the host, it simultaneously sets both output points, the coils of both relays are energized simultaneously, and their normally open contacts immediately close.

[0041] The first relay's normally open contacts send the host status signal to the first digital input point of the second controller via a hard loop; the second relay's normally open contacts send the same host status signal to the second digital input point of the second controller via a separate, physically independent hard loop, thus achieving synchronous transmission of the host status signal to the second controller's input along two independent circuit paths. Similarly, when the second controller determines itself to be the host, it drives its corresponding primary and backup relays in the same way to feed back the host status signal to the first controller.

[0042] In some embodiments, each controller receives a first master status signal fed back by the master signal output device of another controller through its respective master digital input channel, and receives a second master status signal fed back by the backup signal output device of another controller through its respective backup digital input channel, including: The first controller monitors the first host status signal fed back by the normally open contact of the main signal output device of the second controller in real time through the main switch input channel; The second host status signal is fed back by the normally open contact of the backup signal output device of the second controller in real time based on the backup switch input channel, so as to form two parallel input sources for judging the host status of the second controller.

[0043] The following explanation uses the example of the first controller receiving the host status signal from the second controller. The first controller is equipped with two independent signal acquisition ports: a primary switch input channel and a backup switch input channel. The input terminal of the primary switch input channel is electrically connected to the normally open contact of the primary signal output device of the second controller. One end of this normally open contact is connected to a DC voltage source, and the other end is led to the primary switch input point of the first controller via a signal line. When the second controller is the host, the coil of its primary signal output device—that is, the relay defined in the original system as "B set is host 1"—is energized, the normally open contact closes, and the DC voltage is conducted to the primary switch input channel of the first controller through the closed contact. The first controller monitors the first host status signal fed back by this contact by scanning the level status of this channel in real time.

[0044] Meanwhile, the input terminal of the backup digital input channel of the first controller is electrically connected to the normally open contact of the backup signal output device of the second controller. This backup signal output device is a newly added relay defined as "B set is host 2". One end of its normally open contact is also connected to a DC voltage source, and the other end is led to the backup digital input point A-BIO20 of the first controller. When the second controller is the host, its backup output channel synchronously drives the coil of this backup relay, causing its normally open contact to close. The DC voltage is then conducted to the backup digital input channel of the first controller through this contact. The first controller also monitors this channel in real time, acquiring the second host status signal fed back by the normally open contact.

[0045] Therefore, the first controller acquires the first host status signal and the second host status signal from the second controller through two physically independent and non-interfering digital input channels, forming two parallel input sources for judging the host status of the second controller. The second controller receives the host status signal from the first controller in a symmetrical manner, that is, the second controller receives the contact feedback signals from the main relay "Set A is host 1" and the backup relay "Set A is host 2" of the first controller through its main digital input point B-BIO12 and backup digital input point B-BIO20, respectively.

[0046] In some embodiments, each controller performs a logical OR operation on the received first host status signal and second host status signal. When at least one signal indicates that another controller is in a host state, determining that the other controller is the current primary controller and performing redundancy switching includes: The first controller performs a Boolean OR operation between the first host status signal from the primary switch input channel and the second host status signal from the backup switch input channel. If the calculation result is true, the second controller is determined to be the current primary controller, the first controller automatically switches its own state from primary to standby state, and stops driving the primary signal output device and standby signal output device of this controller.

[0047] Taking the first controller as an example, its internal program assigns two Boolean variables to the two host status signals received from the second controller. The first Boolean variable maps to the level state acquired by the primary switch input channel of the first controller, corresponding to the first host status signal fed back by the normally open contact of the primary signal output device of the second controller. The second Boolean variable maps to the level state acquired by the backup switch input channel of the first controller, corresponding to the second host status signal fed back by the normally open contact of the backup signal output device of the second controller. In each program scan cycle, the processor of the first controller performs a Boolean logical OR operation on the first and second Boolean variables. The rule for this operation is: if the first Boolean variable is true, or the second Boolean variable is true, or both are true, the result is true; the result is false only when both Boolean variables are false.

[0048] When the result of the logical OR operation is true, it indicates that at least one redundant signal link has successfully transmitted the status identifier of the second controller as the master controller. Based on this, the first controller determines that the second controller is the current master controller. Subsequently, the first controller automatically executes the master-slave state switching procedure, switching its own operating state from the master state to the standby state, and simultaneously performing two operations: resetting the master switch output channel of the controller, removing the voltage that originally drove the coil of the master signal output device of the controller, and restoring the normally open contact of the master signal output device to the open state; resetting the standby switch output channel of the controller, removing the voltage that originally drove the coil of the standby signal output device of the controller, and restoring the normally open contact of the standby signal output device to the open state. Thus, the first controller completely releases its external declaration of its master status, completing the role transition to the standby controller.

[0049] Conversely, if the result of the logical OR operation is false, meaning neither input signal indicates that the second controller is the master, the first controller maintains its current master state. The logic processing on the second controller side is completely symmetrical. It also performs a Boolean logical OR operation on the first master state signal and the second master state signal received from the first controller. When the result is true, the second controller determines that the first controller is the master, switches itself to standby state, and stops driving its master and standby signal output devices.

[0050] In some embodiments, each controller compares the received first host status signal with the second host status signal in real time to ensure consistency. If the two statuses are inconsistent, a warning signal indicating inconsistent host status input is generated and sent to the monitoring system, including: The first controller synchronously reads the first host status signal value on the primary switch input channel and the second host status signal value on the backup switch input channel in each control cycle, and compares the two bit by bit. If the logic level states are different, it is determined that there is an inconsistency in the host status input of the second controller, and an alarm signal is generated.

[0051] The following explanation uses the example of the first controller monitoring two host status signals from the second controller. Within each scan cycle of its control program, the first controller performs a synchronous sampling operation, that is, at the same moment or within a very short adjacent moment, it reads the input image register status corresponding to the primary switch input channel and the backup switch input channel, respectively. Specifically, the register bits of the primary switch input channel store the logic level value of the first host status signal, which corresponds to the on / off state of the normally open contact of the second controller's primary signal output device; in a specific embodiment, this is represented by the level of input point A-BIO12. The register bits of the backup switch input channel store the logic level value of the second host status signal, which corresponds to the on / off state of the normally open contact of the second controller's backup signal output device; in a specific embodiment, this is represented by the level of input point A-BIO20.

[0052] After retrieving these two register bits, the first controller performs a bit-by-bit comparison to determine whether their logic levels are consistent. This comparison operation can be implemented using an XOR logic instruction: if the logic values ​​of the two bits are the same, the XOR result is false, indicating that the host status information transmitted by the two redundant signal links is consistent, and the system determines that the redundant transmission links are in normal working condition; if the logic values ​​of the two bits are different, i.e., one is true and the other is false, the XOR result is true, indicating that the two links have given opposite indications to the same host status at the same time, and the system determines that there is an inconsistency in the host status input of the second controller.

[0053] Once this abnormal state is detected, the first controller immediately triggers the alarm generation logic and outputs a preset alarm signal to the monitoring system. In a specific embodiment, the alarm signal reads "Inconsistent input of the main unit status of speed controller B," indicating to maintenance personnel that there may be problems such as open circuits, stuck contacts, or relay failures in the main or backup signal output device and its related circuits on the second controller side.

[0054] In some embodiments, the method further includes: When any controller detects an inconsistency in the host status input, it records the time of the fault and the type of signal difference locally, and triggers a visual alarm on the controller's human-machine interface.

[0055] When any controller—taking the first controller as an example—determines, through the aforementioned synchronous sampling and bit-by-bit comparison operations, that the logic level of the host status signal fed back from the primary switch input channel and the backup switch input channel of the second controller is inconsistent, in addition to sending an alarm signal to the monitoring system, it also simultaneously performs local fault recording and human-machine interface alarm operations.

[0056] Specifically, the first controller has a non-volatile memory area for recording fault diagnosis information. Upon detecting an inconsistency, the first controller reads its system clock and writes the current timestamp as the fault occurrence time into the memory area. Simultaneously, the controller records the signal difference type, clearly identifying the specific level state of the primary and backup digital input channels. For example, it records combinations such as "A-BIO12 is high, A-BIO20 is low" or "A-BIO12 is low, A-BIO20 is high," clearly indicating which link experienced an anomaly and its direction.

[0057] The fault log can be retained even after the controller loses power, facilitating post-event review and analysis by maintenance personnel. Simultaneously, the first controller activates the visual alarm indicator on its human-machine interface, triggering a visual alarm notification. In a typical embodiment, this visual alarm indicator can be an alarm indicator light on the controller panel or an alarm icon on the display screen; the controller visually alerts on-site personnel by flashing the indicator or changing its color. The second controller performs a fully equivalent local response: when it detects inconsistencies in the status signals from the two hosts of the first controller, it records the fault occurrence time and the type of signal difference, and activates a visual alarm notification on its own human-machine interface.

[0058] Corresponding to the aforementioned switching control method for redundant controllers, this invention also proposes a switching control device for redundant controllers. Since the device embodiments of this invention correspond to the aforementioned method embodiments, details not disclosed in the device embodiments can be referred to the aforementioned method embodiments, and will not be repeated here.

[0059] Figure 2 This is a schematic diagram of the structure of a switching control device for a redundant controller provided in an embodiment of this disclosure, as shown below. Figure 2 As shown, it includes: Output unit 21 is used for the first controller and the second controller to drive the corresponding main signal output device through their respective main switch output channels and drive the corresponding backup signal output device through their respective backup switch output channels, so as to synchronously output the host status signal of the controller. The receiving unit 22 is used for each controller to receive a first host status signal fed back by the main signal output device of another controller through its own main switch input channel, and to receive a second host status signal fed back by the backup signal output device of another controller through its own backup switch input channel. The logic switching unit 23 is used for each controller to perform a logical OR operation on the received first host status signal and second host status signal. When at least one signal indicates that another controller is in the host state, the other controller is determined to be the current master controller and a redundancy switch is performed. The status warning unit 24 is used for each controller to compare the received first host status signal and the second host status signal in real time. If the two statuses are inconsistent, a warning signal indicating inconsistent host status input is generated and sent to the monitoring system.

[0060] Furthermore, in one possible implementation of this disclosure, the output unit 21 is further configured to: When the first controller determines that the first controller is the current master controller, it sets the master switch output channel and the backup switch output channel of the first controller, so that the current flows through the coil of the master signal output device and the coil of the backup signal output device corresponding to the first controller, and drives the normally open contacts of the master signal output device and the backup signal output device to close. The host status signal of the first controller is synchronously transmitted to the input terminal of the second controller through two independent hard loops.

[0061] Furthermore, in one possible implementation of this disclosure, the receiving unit 22 is further configured to: The first controller monitors the first host status signal fed back by the normally open contact of the main signal output device of the second controller in real time through the main switch input channel; The second host status signal is fed back by the normally open contact of the backup signal output device of the second controller in real time based on the backup switch input channel, so as to form two parallel input sources for judging the host status of the second controller.

[0062] Furthermore, in one possible implementation of this disclosure, the logic switching unit 23 is further configured to: The first controller performs a Boolean OR operation between the first host status signal from the primary switch input channel and the second host status signal from the backup switch input channel. If the calculation result is true, the second controller is determined to be the current primary controller, the first controller automatically switches its own state from primary to standby state, and stops driving the primary signal output device and standby signal output device of this controller.

[0063] Furthermore, in one possible implementation of this disclosure embodiment, the status warning unit 24 is further configured to: The first controller synchronously reads the first host status signal value on the primary switch input channel and the second host status signal value on the backup switch input channel in each control cycle, and compares the two bit by bit. If the logic level states are different, it is determined that there is an inconsistency in the host status input of the second controller, and an alarm signal is generated.

[0064] Furthermore, in one possible implementation of the embodiments of this disclosure, such as Figure 3 As shown, it also includes an alarm recording unit 25; The alarm recording unit 25 is used for: When any controller detects an inconsistency in the host status input, it records the time of the fault and the type of signal difference locally, and triggers a visual alarm on the controller's human-machine interface.

[0065] It should be noted that the foregoing explanation of the method embodiments also applies to the apparatus of the embodiments of this disclosure, and the principle is the same. Therefore, the embodiments of this disclosure are not limited thereto.

[0066] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0067] Figure 4 A schematic block diagram of an example electronic device 400 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0068] like Figure 4As shown, device 400 includes a computing unit 401, which can perform various appropriate actions and processes based on a computer program stored in ROM (Read-Only Memory) 402 or a computer program loaded from storage unit 408 into RAM (Random Access Memory) 403. RAM 403 may also store various programs and data required for the operation of device 400. The computing unit 401, ROM 402, and RAM 403 are interconnected via bus 404. I / O (Input / Output) interface 405 is also connected to bus 404.

[0069] Multiple components in device 400 are connected to I / O interface 405, including: input unit 406, such as keyboard, mouse, etc.; output unit 407, such as various types of monitors, speakers, etc.; storage unit 408, such as disk, optical disk, etc.; and communication unit 409, such as network card, modem, wireless transceiver, etc. Communication unit 409 allows device 400 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0070] The computing unit 401 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, CPUs (Central Processing Units), GPUs (Graphics Processing Units), various special-purpose AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, DSPs (Digital Signal Processors), and any suitable processor, controller, microcontroller, etc. The computing unit 401 performs the various methods and processes described above, such as the switching control method for a redundant controller. For example, in some embodiments, the switching control method for a redundant controller may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 408. In some embodiments, part or all of the computer program may be loaded and / or installed on device 400 via ROM 402 and / or communication unit 409. When the computer program is loaded into RAM 403 and executed by the computing unit 401, one or more steps of the methods described above may be performed. Alternatively, in other embodiments, the computing unit 401 may be configured to perform the aforementioned switching control method for redundant controllers by any other suitable means (e.g., by means of firmware).

[0071] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application-Specific Standard Products), SOCs (System-on-Chips), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various implementations may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0072] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0073] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, RAM, ROM, EPROM (Electrically Programmable Read-Only Memory) or flash memory, optical fiber, CD-ROM (Compact Disc Read-Only Memory), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0074] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0075] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include LANs (Local Area Networks), WANs (Wide Area Networks), the Internet, and blockchain networks.

[0076] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. A server can be a cloud server, also known as a cloud computing server or cloud host, a hosting product within the cloud computing service system that addresses the shortcomings of traditional physical hosts and VPS (Virtual Private Server) services, such as high management difficulty and weak business scalability. Servers can also be servers for distributed systems or servers incorporating blockchain technology.

[0077] It's important to note that artificial intelligence (AI) is the study of enabling computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). It encompasses both hardware and software technologies. AI hardware technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, and big data processing. AI software technologies primarily include computer vision, speech recognition, natural language processing, machine learning / deep learning, big data processing, and knowledge graph technologies.

[0078] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0079] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A switching control method for a redundant controller, characterized in that, include: The first controller and the second controller drive the corresponding main signal output device through their respective main switch output channels and drive the corresponding backup signal output device through their respective backup switch output channels, so as to synchronously output the host status signal of the controller. Each controller receives a first host status signal fed back by the main signal output device of another controller through its own main switch input channel, and receives a second host status signal fed back by the backup signal output device of another controller through its own backup switch input channel. Each controller performs a logical OR operation on the received first host status signal and second host status signal. When at least one signal indicates that another controller is in host status, the other controller is determined to be the current master controller and a redundancy switch is performed. Each controller compares the received first host status signal with the second host status signal in real time to ensure consistency. If the two statuses are inconsistent, an early warning signal indicating inconsistent host status input is generated and sent to the monitoring system.

2. The method according to claim 1, characterized in that, The first controller and the second controller each drive their respective primary signal output devices through their primary digital output channels and their respective backup signal output devices through their backup digital output channels, so as to synchronously output the host status signal of their respective controllers, including: When the first controller determines that the first controller is the current master controller, it sets the master switch output channel and the backup switch output channel of the first controller, so that the current flows through the coil of the master signal output device and the coil of the backup signal output device corresponding to the first controller, and drives the normally open contacts of the master signal output device and the backup signal output device to close. The host status signal of the first controller is synchronously transmitted to the input terminal of the second controller through two independent hard loops.

3. The method according to claim 1, characterized in that, Each controller receives a first host status signal fed back by the master signal output device of another controller through its own master switch input channel, and receives a second host status signal fed back by the backup signal output device of another controller through its own backup switch input channel, including: The first controller monitors the first host status signal fed back by the normally open contact of the main signal output device of the second controller in real time through the main switch input channel; The second host status signal is fed back by the normally open contact of the backup signal output device of the second controller in real time based on the backup switch input channel, so as to form two parallel input sources for judging the host status of the second controller.

4. The method according to claim 1, characterized in that, Each controller performs a logical OR operation on the received first host status signal and second host status signal. When at least one signal indicates that another controller is in host status, determining that the other controller is the current primary controller and performing redundancy switching includes: The first controller performs a Boolean OR operation between the first host status signal from the primary switch input channel and the second host status signal from the backup switch input channel. If the calculation result is true, the second controller is determined to be the current primary controller, the first controller automatically switches its own state from primary to standby state, and stops driving the primary signal output device and standby signal output device of this controller.

5. The method according to claim 1, characterized in that, Each controller compares the received first host status signal with the second host status signal in real time to ensure consistency. If the two statuses are inconsistent, an early warning signal indicating inconsistent host status input is generated and sent to the monitoring system, including: The first controller synchronously reads the first host status signal value on the primary switch input channel and the second host status signal value on the backup switch input channel in each control cycle, and compares the two bit by bit. If the logic level states are different, it is determined that there is an inconsistency in the host status input of the second controller, and an alarm signal is generated.

6. The method according to claim 1, characterized in that, The method further includes: When any controller detects an inconsistency in the host status input, it records the time of the fault and the type of signal difference locally, and triggers a visual alarm on the controller's human-machine interface.

7. A switching control device for redundant controllers, characterized in that, include: The output unit is used for the first controller and the second controller to drive the corresponding main signal output device through their respective main switch output channels and drive the corresponding backup signal output device through their respective backup switch output channels, so as to synchronously output the host status signal of the controller. The receiving unit is used for each controller to receive a first host status signal fed back by the main signal output device of another controller through its own main switch input channel, and to receive a second host status signal fed back by the backup signal output device of another controller through its own backup switch input channel. The logic switching unit is used for each controller to perform a logical OR operation on the received first host status signal and second host status signal. When at least one signal indicates that another controller is in the host state, the other controller is determined to be the current master controller and a redundancy switch is performed. The status warning unit is used by each controller to compare the received first host status signal with the second host status signal in real time. If the two statuses are inconsistent, a warning signal indicating inconsistent host status input is generated and sent to the monitoring system.

8. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.

9. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-6.

10. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method according to any one of claims 1-6.