Device control switching method, system, apparatus, device, medium, and product
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-09
- Publication Date
- 2026-08-11
AI Technical Summary
[0004]然而若主设备因电源故障或其他原因故障无法继续工作,在主设备向控制设备发送故障反馈的过程中,可能存在短暂的通信中断
[0011]本申请实施例提供的技术方案带来的有益效果至少包括:
Smart Images

Figure CN122546758A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of equipment control, and in particular to a method, system, device, equipment, medium, and product for switching equipment control. Background Technology
[0002] As the scale of new energy power plants continues to expand, the EMS (Energy Management System) serves as the core scheduling and control platform, undertaking multiple tasks such as power control, frequency response, inertia response, black start, and islanded operation. EMS equipment in the equipment control and switching system typically includes EMS master equipment and EMS backup equipment.
[0003] In related technologies, the equipment control switching system includes a control device, a main device, and at least one pre-provided backup device; the control device originally sends control commands (such as control command 1) to the main device, and when the main device fails, the main device sends fault feedback to the control device, and the control device searches for an idle backup device from at least one backup device to continue issuing control commands.
[0004] However, if the master device fails to continue operating due to a power failure or other reasons, a brief communication interruption may occur during the process of the master device sending fault feedback to the control device. For example, if the control device has already started sending control command 1 to the master device before receiving the fault feedback, the connection between the control device and the master device will be broken at the moment the fault occurs, causing control command 1 to fail to be successfully transmitted to the master device. Afterwards, the control device needs some time to detect and switch to the backup device. During this process, the backup device needs to reinitialize and establish a communication connection. If the backup device's takeover is not completed immediately, control command 1 will be lost or cannot be received by the backup device in time during this period. That is, the control command is lost due to communication interruption or the delay in backup device takeover. Summary of the Invention
[0005] This application provides a device control switching method, system, apparatus, device, medium, and product that, in the case of redundant device deployment, can synchronize device processing data, including first control commands, to the backup device via a second communication connection. This avoids the loss of control commands and other data during device switching between the primary and backup devices, ensuring uninterrupted communication. The technical solution is as follows.
[0006] On the one hand, a device control switching method is provided, the method comprising: Establish a first communication connection corresponding to the main device and the backup device respectively. The first communication connection is used to perform data communication between the first control device and the main device, or between the first control device and the backup device. Based on the first communication connection, a first control command is sent to the master device, and a second communication connection is established between the master device and the backup device. The second communication connection is used to synchronize the device processing data of the master device to the backup device. The device processing data includes the first control command. If the equipment switching conditions are met, a second control command is sent to the backup equipment. The second control command is a control command following the first control command.
[0007] On the other hand, a device control switching apparatus is provided, the apparatus comprising: A connection establishment module is used to establish a first communication connection corresponding to the main device and the backup device respectively. The first communication connection is used to perform data communication between the first control device and the main device, or to perform data communication between the first control device and the backup device. The instruction sending module is used to send a first control instruction to the master device based on the first communication connection. The master device and the backup device establish a second communication connection. The second communication connection is used to synchronize the device processing data of the master device to the backup device. The device processing data includes the first control instruction. The instruction sending module is also used to send a second control instruction to the backup device when the device switching conditions are met. The second control instruction is a control instruction following the first control instruction.
[0008] On the other hand, a computer device is provided, the computer device including a processor and a memory, the memory storing at least one program, the at least one program being loaded and executed by the processor to implement the device control switching method as described in any of the embodiments of this application above.
[0009] On the other hand, a computer-readable storage medium is provided, wherein at least one program is stored in the storage medium, the at least one program being loaded and executed by a processor to implement the device control switching method as described in any of the embodiments of this application above.
[0010] On the other hand, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform any of the device control switching methods described in the above embodiments.
[0011] The beneficial effects of the technical solutions provided in this application include at least the following: When a first communication connection is established between the first control device and the primary and backup devices to achieve one-to-one communication, a first control command is sent to the primary device based on the first communication connection, and a second control command is sent to the backup device when the device switching conditions are met. The second communication connection established between the primary and backup devices can synchronize device processing data, including the first control command, to the backup device, avoiding the loss of control commands and other data during device switching between the primary and backup devices. This ensures continuous communication without delay and improves the stability and security of device control switching. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1 This is a schematic diagram of the architecture of a switching system provided in an exemplary embodiment of this application; Figure 2 This is a flowchart of a device control switching method provided in an exemplary embodiment of this application; Figure 3 This is a flowchart of a device control switching method provided in another exemplary embodiment of this application; Figure 4 This is a flowchart of a device control switching method provided in an exemplary embodiment of this application; Figure 5 This is a schematic diagram of a switching architecture based on device control switching provided in another exemplary embodiment of this application; Figure 6 This is a structural block diagram of a device control switching apparatus provided in an exemplary embodiment of this application; Figure 7 This is a structural block diagram of a server provided in an exemplary embodiment of this application. Detailed Implementation
[0014] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0015] In related technologies, a device control switching system includes a control device, a primary device, and at least one pre-provided backup device. The control device initially sends control commands (such as control command 1) to the primary device. When the primary device fails, it sends fault feedback to the control device, which then searches for an available backup device from the at least one backup device to continue issuing control commands. However, if the primary device fails due to a power failure or other reasons and cannot continue operating, a brief communication interruption may occur during the process of the primary device sending fault feedback to the control device. For example, if the control device has already started sending control command 1 to the primary device before receiving the fault feedback, the connection between the control device and the primary device will be broken at the moment of the fault, causing control command 1 to fail to be successfully transmitted to the primary device. Afterward, the control device needs a certain amount of time to detect and switch to the backup device. During this process, the backup device needs to reinitialize and establish a communication connection. If the backup device's takeover is not completed immediately, control command 1 will be lost or cannot be received by the backup device in time during this period; that is, the control command is lost due to communication interruption or a delay in backup device takeover.
[0016] This application provides a device control switching method that, when redundant devices are deployed, synchronizes device processing data, including first control commands, to a backup device via a second communication connection. This avoids the loss of control commands and other data during device switching between the primary and backup devices, ensuring uninterrupted communication. The device control switching method provided in this application can be applied to various control scenarios, including energy management, industrial automation, smart home, transportation and logistics, communication and information technology, and medical and laboratory settings. This application does not limit its application to these scenarios.
[0017] It should be noted that all information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in this application have been authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant regions. For example, the first control command, second control command, and device processing data involved in this application were all obtained with full authorization.
[0018] Secondly, the device control switching system (hereinafter referred to as the switching system) involved in the embodiments of this application will be described, such as... Figure 1 As shown, the device control switching method provided in this application embodiment is executed by at least the first control device 110, the main device 120, and the backup device 130.
[0019] In some embodiments, the first control device 110 establishes a first communication connection with the main device 120 and the backup device 130.
[0020] The first communication connection is used to perform data communication between the first control device 110 and the main device 120, or between the first control device 110 and the backup device 130.
[0021] Indicatively, a first communication connection is established between the first control device 110 and the main device 120, enabling the first control device 110 to send data to the main device 120, and the main device 120 to send data to the first control device 110. In addition, a first communication connection is also established between the first control device 110 and the backup device 120, enabling the first control device 110 to send data to the backup device 130, and the backup device 130 to send data to the first control device 110.
[0022] Although the first control device 110 establishes a first communication connection with both the main device 120 and the backup device 130, data transmission based on these first communication connections is selective. For example, when data communication is performed between the first control device 110 and the main device 120, a first communication connection is established between the first control device 110 and the backup device 130, but no data communication occurs; when data communication is performed between the first control device 110 and the backup device 130, a first communication connection is established between the first control device 110 and the main device 120, but no data communication occurs.
[0023] The backup device 130 is a device that takes on the role of the main device 120 when there is a communication failure between the main device 120 and the first control device 110. Therefore, under normal circumstances, the first control device 110 initiates data communication with the main device 120 first. Only when there is a failure in the data communication transmission between the first control device 110 and the main device 120 (such as when the main device 120 fails) will the first control device 110 initiate data communication with the backup device 130 based on the first communication data.
[0024] In some embodiments, the first control device 110 sends a first control command to the master device 120 based on a first communication connection.
[0025] Indicatively, when the first control device 110 transmits data with the main device 120 based on the first communication connection, the first control device 110 can send a first control command to the main device 120. The first control command is an instruction to control the main device 120 to perform tasks, such as at least one of the following: device start command, speed control command, position control command, status query command, timing command, data acquisition command, condition judgment command, mode selection command, etc.
[0026] A second communication connection is established between the main device 120 and the backup device 130. The second communication connection is used to synchronize the device processing data of the main device 120 to the backup device 130. The device processing data includes the first control command.
[0027] Schematic illustration: In addition to establishing a first communication connection between the first control device 110 and the main device 120 and backup device 130, a second communication connection can also be established between the main device 120 and the backup device 130. The second communication connection is used to synchronize the device processing data of the main device 120 to the backup device 130. The device processing data includes at least one of various types of data related to the processing status of the main device 120, such as data acquisition results, data analysis results, data calculation results, data feedback results, and data communication results. The device processing data includes a first control command; that is, after the first control device 110 sends a first control command to the main device 120, the main device 120 can synchronize the first control command to the backup device 130 based on the second communication connection.
[0028] In some embodiments, the first control device 110 sends a second control command to the standby device 130 when the device switching conditions are met.
[0029] The second control command is the control command that follows the first control command.
[0030] Schematic illustration: The equipment switching condition is the condition under which the standby device 130 takes over the role of the primary device 120. For example, the equipment switching condition could be a fault in the primary device 120, or a fault in the first communication connection between the first control device 110 and the primary device 120. Upon detecting that the equipment switching condition is met, the first control device 110 sends a second control command, which is required after the first control command, to the standby device 130, enabling the standby device 130 to continue the equipment operation process based on the second control command.
[0031] Since the backup device 130 can realize the synchronization process of the first control command based on the second communication connection, the backup device 130 can ensure the operation and processing of the equipment without interruption based on the first control command, the second control command, etc., thereby improving the stability of the equipment control switching system.
[0032] It is worth noting that at least one of the aforementioned first control device 110, main device 120, and backup device 130 can be implemented as a terminal; or, at least one of the aforementioned first control device 110, main device 120, and backup device 130 can be implemented as a server, typically a server with high computing efficiency. The terminal includes, but is not limited to, mobile terminals such as mobile phones, tablets, portable laptops, intelligent voice interaction devices, smart home appliances, and vehicle terminals, and can also be implemented as a desktop computer; the server can be an independent physical server or a cloud server.
[0033] Based on the above-described terms and application scenarios, the device control switching method provided in this application will be explained, taking the application of this method to a first control device (such as a server) as an example. Figure 2 As shown, the method includes the following steps 210 to 230.
[0034] Step 210: Establish the first communication connection corresponding to the main device and the backup device respectively.
[0035] In illustrative terms, the main equipment is the device that undertakes the primary production, calculation, or control tasks in a task processing scenario. These scenarios can include at least one of several, such as energy management, data computing, data analysis, or sub-device management. Main equipment typically possesses superior configuration standards, stronger load capacity, and more robust safety protection mechanisms, enabling it to maintain stable operation under prolonged, high-intensity working conditions. Any malfunction in the main equipment may affect the overall operation of the task, therefore, it requires focused routine inspection and maintenance.
[0036] Backup equipment is emergency support equipment configured to ensure continuous task execution. It typically takes over operation promptly when the primary equipment fails or is under maintenance, acting as a risk buffer and ensuring business continuity, preventing task interruptions and delays. Backup equipment configurations are usually compatible with the primary equipment; they can have the same or different configurations. In the event of a task failure on the primary equipment, the backup equipment assumes its role, completing the switchover quickly and minimizing downtime losses. Therefore, backup equipment is normally in standby or low-load mode, but it still requires regular testing and maintenance to ensure stable operation during critical moments. The establishment of backup equipment significantly improves the reliability and security of task processing and is an indispensable and crucial component of modern engineering and information systems.
[0037] Optionally, the primary device and the backup device may be different servers; or the primary device and the backup device may be different terminal devices, etc., without limitation here.
[0038] In some embodiments, a primary device and a backup device are pre-configured; or, a primary device and multiple backup devices are pre-configured; or, multiple primary devices and a backup device are configured; or, multiple primary devices and multiple backup devices (the number can be the same or different) are configured, without limitation herein.
[0039] In some embodiments, the executing entity is a first control device, which is a device that complies with the overall control and management to execute the task release during the task processing process. The first control device is such as a server or a terminal. The first control device establishes a first communication connection with the main device and also establishes a first communication connection with the backup device.
[0040] The first communication connection is used to perform data communication between the first control device and the master device, or between the first control device and the backup device.
[0041] In illustrative terms, the first communication connection between the first control device and the main device is a data transmission channel established between the first control device and the main device. For example, the first communication connection can enable the first control device to transmit data to the main device to execute tasks, or the first communication connection can enable the main device to transmit data to the first control device to provide feedback on task execution status.
[0042] Furthermore, between the first control device and the backup device, the first communication connection is a data transmission channel established between the first control device and the backup device. For example, the first control device can transmit data to the backup device to execute a task through the first communication connection, and the backup device can also transmit data to the first control device to provide feedback on the task execution status.
[0043] Although the first control device establishes first communication connections with both the main device and the backup device, the backup device is designed to take over the role of the main device only in the event of a data transmission failure between the main device and the first control device. Therefore, even though the first control device establishes first communication connections with both the main device and the backup device, the data transmission process usually only sends data to either the main device or the backup device to avoid duplicate data transmission and conflicts, thereby ensuring the efficiency and reliability of communication.
[0044] This is illustrative; in actual operation, the primary device prioritizes receiving data from the first control device and undertakes normal processing tasks. The backup device only takes over data processing when the primary device fails or switches over, maintaining continuity. This not only reduces network bandwidth usage and lowers latency and error rates, but also prevents inconsistencies caused by different devices processing the same data simultaneously.
[0045] Step 220: Send a first control command to the master device based on the first communication connection.
[0046] Indicatively, when a first communication connection is established between the first control device and the master device, the first control device sends a first control command to the master device. The first control command can be regarded as a type of transmitted data. The first control command is implemented as different commands based on the differences in the tasks to be performed.
[0047] Optionally, the first control command includes at least one of a variety of commands such as a device start command, speed control command, position control command, status query command, timing command, data acquisition command, condition judgment command, and mode selection command.
[0048] In addition, the master device can also feed back task processing results to the first control device based on the first communication connection, etc., without limitation here.
[0049] A second communication connection is established between the master device and the backup device. The second communication connection is used to synchronize the device processing data of the master device to the backup device. The device processing data includes the first control command.
[0050] In illustrative terms, in addition to establishing a first communication connection between the first control device and the main device and the backup device, a second communication connection may also be established between the main device and the backup device. The second communication connection is used to synchronize the device processing data of the main device to the backup device, wherein the device processing data is at least one of various data related to the processing status of the main device.
[0051] Optionally, the data processed by the device includes at least one of several results, such as data acquisition results, data analysis results, data calculation results, data feedback results, and data communication results; wherein the data processed by the device includes a first control command.
[0052] Indicatively, after the first control device sends the first control command to the master device, the master device can synchronize the first control command to the backup device based on the second connection channel. If there is no fault in the master device, the backup device can either receive the first control command without performing task processing, or it can perform task processing after receiving the first control command.
[0053] In some embodiments, if the standby device does not receive the first control command, it can send a synchronization request to the master device through a second communication connection to request the master device to check whether the received data content needs to be synchronized, such as requesting the master device to decide whether the first control command needs to be synchronized.
[0054] In some embodiments, the purpose of the primary device and / or backup device receiving the first control instruction is to transmit the first control instruction to the load device connected to the primary device and / or backup device, or to issue sub-tasks after the first processing task corresponding to the first control instruction to the load device connected to the primary device and / or backup device, etc., without limitation here.
[0055] Step 230: If the equipment switching conditions are met, send a second control command to the standby equipment.
[0056] Indicatively, the device switching condition is a preset condition where the backup device replaces the master device when the data transmission of the first communication connection fails; that is, when the device switching condition is met, the backup device takes over the role of the master device, and the first control device needs to send control commands to the backup device other than the master device.
[0057] Optionally, the equipment switching conditions include at least one of several conditions, such as a main equipment failure condition or a channel failure condition of the first communication connection between the main equipment and the first control equipment.
[0058] The main equipment fault conditions are used to characterize the existence of faults in the main equipment, such as main equipment damage, main equipment under maintenance, main equipment overload, main equipment overheating, main equipment power failure, main equipment hardware failure, main equipment software crash, main equipment network interruption, main equipment storage full, main equipment sensor failure, etc., at least one of these conditions; the channel fault conditions include at least one of the following: insufficient bandwidth, excessive network latency, excessive packet loss rate, signal interference, data transmission error, network congestion, link disconnection, communication protocol incompatibility, data packet duplication, connection timeout, etc.
[0059] In some embodiments, when it is detected that the device switching conditions are met, i.e., data cannot be transmitted normally to the master device, a second control command is sent to the standby device.
[0060] The second control command is the control command that follows the first control command.
[0061] Indicatively, the second communication connection enables the master device to synchronize the first control command to the backup device. Therefore, when the device switching conditions are met, the first control device can continue to send the second control command after the first control command to the backup device based on the sending of the first control command.
[0062] Optionally, the first control instruction corresponds to a first instruction identifier, and the second control instruction corresponds to a second control identifier; the first control identifier and the second control identifier are arranged in sequence, and different control identifiers are used to uniquely represent control instructions.
[0063] Indicatively, after receiving the second control command, the backup device identifies the second control identifier. Based on the sequential arrangement of the control identifiers, it can determine whether the first control command has been received, preventing malfunctions caused by the first control command not being received by the master device. If the sequential arrangement of the control identifiers indicates that the first control command has been received, the backup device can process the second control command normally. If the sequential arrangement of the control identifiers indicates that the first control command has not been received, the backup device can either request the master device to synchronize the first control command or directly send a command transmission request to the first control device. This would cause the first control device to send an additional first control command to the backup device, allowing the backup device to execute the first control command first, and then the second control command, etc.
[0064] It is worth noting that the above are merely illustrative examples, and the embodiments of this application are not limited thereto.
[0065] In summary, the second communication connection established between the primary device and the backup device can synchronize device processing data, including the first control command, to the backup device, avoiding the loss of control commands and other data when switching between the primary and backup devices, ensuring that the communication process continues without delay, and improving the stability and security of device control switching.
[0066] In an optional embodiment, first communication connections are established between the first control device and the main device and the backup device through at least two data connection channels, meaning the data connection channels are also implemented as backups. (Illustrative example, such as...) Figure 3 As shown above, Figure 2 The illustrated embodiment can also be implemented as steps 310 to 340 as follows; wherein step 220 can be implemented as steps 310 and 340 as follows.
[0067] Step 310: Establish a first communication connection with the master device through at least two first data connection channels.
[0068] Indicatively, a data connection channel is a channel for establishing a communication connection; the first communication connection between the first control device and the main device is established through at least two first data connection channels, that is, the communication connection between the first control device and the main device is achieved through at least two first data connection channels.
[0069] For example, the first control device and the main device have two first data connection channels, namely the first data connection channel A1 and the first data connection channel A2; or, the first control device and the main device have more than two first data connection channels, which is not limited here.
[0070] In some embodiments, a communication channel based on the Modbus Transmission Control Protocol is established between the first control device and the master device. The Modbus TCP protocol includes the ordinary Modbus TCP protocol and the fast Modbus TCP protocol.
[0071] In an optional embodiment, a first communication connection between the first control device and the main device is established through a connection between at least one first data connection channel and a first network port, and through a connection between at least one other first data connection channel and a second network port.
[0072] The first and second network ports are different network ports on the main device. A network port is a physical interface used to connect to a computer network or industrial Ethernet, typically a Registered Jack 45 (RJ45) interface or a similar network interface. Through the network port, the main device can access a Local Area Network (LAN) or Wide Area Network (WAN) to achieve data communication with other devices, control devices, or host computers. The network port not only carries data exchange between devices but also supports various network protocols, such as Modbus TCP, Ethernet Industrial Protocol (Ethernet / IP), Hypertext Transfer Protocol (HTTP), and File Transfer Protocol (FTP), enabling the main device to remotely detect, control, or collect data. It is a key hardware interface for realizing device networking, information exchange, and system integration.
[0073] Indicatively, the first control device establishes a first communication connection with the main device by connecting to the first network port through at least one first data connection channel; in addition, the first control device can also establish a first communication connection with the main device by connecting to the second network port through at least one first data connection channel.
[0074] For example, the first control device connects to the first network port through a first data connection channel, and the first control device connects to the second network port through a first data connection channel, thereby achieving the purpose of establishing a first communication connection with the main device through at least two first data connection channels.
[0075] In an optional embodiment, a first verification result is obtained by verifying the first Internet Protocol address of the master device, and a first communication connection is established with the master device if the first verification result meets the verification conditions.
[0076] In illustrative terms, the first Internet Protocol address is the Internet Protocol address (IP) of the master device; the first verification result is the result obtained by verifying the first IP address, such as a successful verification result, a failed verification result, or a verification failure result; the verification condition is a pre-set condition used to measure whether a first communication connection can be established between the first control device and the master device.
[0077] Optionally, before establishing a first communication connection with the master device, the first control device may first verify the master device's first IP address. If the first verification result is a qualified result, it is considered to meet the verification conditions, thereby establishing a first communication connection with the master device.
[0078] For illustration, the first IP address can be obtained for verification by entering the first IP address set at the factory default of the main device or the first IP address marked on the label into the first control device; alternatively, if the first control device and the main device are on the same local area network, active devices can be detected by network scanning tools (such as Ping, Nmap), and the first IP address can be found based on the device's Media Access Control (MAC) address; or the first IP address can be obtained by broadcasting a query using an auto-discovery protocol supported by the device, such as Multicast Domain Name System (mDNS) or Simple Service Discovery Protocol (SSDP), etc., which are not limited here.
[0079] Step 320: Establish a first communication connection with the backup device through at least two second data connection channels.
[0080] In some embodiments, a communication channel based on the Modbus Transmission Control Protocol is also established between the first control device and the backup device; for example, both the primary device and the backup device support running the Modbus protocol.
[0081] In an optional embodiment, a first communication connection between the first control device and the backup device is established through a connection between at least one second data connection channel and a third network port, and through a connection between at least one other second data connection channel and a fourth network port.
[0082] Among them, the third and fourth network ports are different network ports on the backup device.
[0083] Indicatively, the first control device establishes a second communication connection with the backup device by connecting to the third network port through at least one second data connection channel; in addition, the first control device can also establish a second communication connection with the backup device by connecting to the fourth network port through at least one second data connection channel.
[0084] For example, the first control device connects to the third network port through a second data connection channel, and the first control device connects to the fourth network port through a second data connection channel, thereby achieving the purpose of establishing a second communication connection with the backup device through at least two second data connection channels.
[0085] In an optional embodiment, a second verification result is obtained by verifying the second Internet Protocol address of the backup device, and a first communication connection is established with the backup device if the second verification result meets the verification conditions.
[0086] For illustrative purposes, the second Internet Protocol address is the IP address of the backup device; the second verification result is the result obtained by verifying the second IP address, such as a successful verification result, a failed verification result, or a verification failure result; the verification conditions are pre-set conditions.
[0087] Optionally, before establishing a second communication connection with the backup device, the first control device may first verify the first IP address of the backup device. If the first verification result is a qualified result, it is considered to meet the verification conditions, thereby establishing a second communication connection with the master device.
[0088] Step 330: Send a first control command to the master device based on the first communication connection.
[0089] A second communication connection is established between the master device and the backup device; the second communication connection is used to synchronize the device processing data of the master device to the backup device, and the device processing data includes the first control command.
[0090] In an optional embodiment, the first control device establishes a first communication connection with the master device via the Modbus TCP protocol, and the first control device establishes a second communication connection with the backup device via the Modbus TCP protocol.
[0091] In an optional embodiment, a second communication connection is established between the master device and the backup device via an internal direct connection channel.
[0092] In illustration, an internal direct link is a communication path within a system used to directly connect different devices, systems, or services without going through a public network or external intermediate nodes, ensuring that data is transmitted within the internal network and reducing external threats and interference.
[0093] Alternatively, within a large data center, efficient data exchange between multiple servers may be accomplished through internal direct connections. For example, the database system and order processing system of an e-commerce platform transmit data through a dedicated internal channel; or, in industrial automation, various devices on a production line transmit production data in real time through internal direct connections to ensure timely detection and scheduling of the production process, thereby guaranteeing production efficiency and system stability. Internal direct connections are typically part of a local area network (LAN) and can be implemented through a Virtual Local Area Network (VLAN) or a dedicated fiber optic link.
[0094] Since there is a substitution effect between the primary and backup devices, a second communication connection can be established through a highly enclosed internal direct connection channel to ensure more timely data synchronization.
[0095] Step 340: If the equipment switching conditions are met, send a second control command to the standby equipment.
[0096] The second control command is the control command that follows the first control command.
[0097] Indicatively, the device switching condition is a preset condition where the backup device replaces the master device when the data transmission of the first communication connection fails; that is, when the device switching condition is met, the backup device takes over the role of the master device, and the first control device needs to send control commands to the backup device other than the master device.
[0098] In an optional embodiment, if the first communication connection fails, a second control command is sent to a backup device.
[0099] This is an illustrative example of a situation where a failure in the first communication connection affects the main device's data reception. The failure in the first communication connection could be due to at least one of the following: the first data connection channel is disconnected, the first data connection channel is congested, or the first data connection channel does not meet the protocol requirements. Based on the failure in the first communication connection, the first control device sends a second control command to the backup device.
[0100] In some embodiments, if at least one of the at least two first data connection channels fails, a second control command is sent to a backup device; or, if all the first data connection channels fail, a second control command is sent to the backup device.
[0101] That is, the device switching condition is that at least one of the two first data connection channels is faulty; or, the device switching condition is that all the first data connection channels are faulty.
[0102] Indicatively, at least one faulty first data connection channel is the first data connection channel currently in use among at least two first data connection channels. That is, if the currently used data connection channel is faulty, it is considered to meet the device switching conditions; or, the device switching conditions are met only when the number of faulty first data connection channels among at least two first data connection channels reaches a preset threshold.
[0103] In addition, the device switching condition can be considered met and the device switching process can be carried out only if all first data connection channels are faulty; this is not limited here.
[0104] Indicatively, if the device switching conditions are not met, the first control device transmits the first control command through any one of the at least two first data connection channels or a selected first data connection channel; if the device switching condition is that all of the at least two first data connection channels are faulty, then the device switching process will only be carried out when all the first data connection channels are faulty, that is, the first control device no longer uses the first data connection channels for data transmission, but transmits the second control command through any one of the at least two second data connection channels or a selected second data connection channel.
[0105] Indicatively, the first control device and the main device establish a first communication connection through the first data connection channel A1 and the first data connection channel A2; the first control device and the main device establish a second communication connection through the second data connection channel B1 and the second data connection channel B2.
[0106] If the device switching condition is that the currently used first data connection channel is faulty, then if the first data connection channel A1 is faulty, it is considered that the device switching condition is met, and the second data connection channel B1 or the second data connection channel B2 is used to perform data transmission (such as random selection, or selection of the second data connection channel B1 based on priority) to transmit the second control command.
[0107] Optionally, if at least one of the at least two first data connection channels fails, the other first data connection channel is switched to send the first control command to the master device.
[0108] To illustrate, if the device switching condition is that all first data connection channels are faulty before switching, then if the first data connection channel A1 is used, and the first data connection channel A1 is faulty, the first data connection channel A2 is used first for data transmission. Only when the first data connection channel A2 is also faulty is the device switching condition considered met, and then the second data connection channel B1 or the second data connection channel B2 is used to perform data transmission (such as random selection, or selection of the second data connection channel B1 based on priority, etc.) to transmit the second control command.
[0109] In an optional embodiment, when the operating state of the primary device reaches the device termination condition, a second control command is sent to the standby device.
[0110] Equipment operating status refers to the operating condition of the main equipment. Equipment operating status includes at least one of several states such as normal operation, warning, fault (main equipment fault), and recovery. Equipment termination condition is the situation that determines whether the equipment switching condition is met based on the equipment operating status. For example, if the equipment operating status is in fault state and the equipment termination condition is met, that is, the equipment switching condition that requires switching the main equipment to the standby equipment is met, and a second control command is sent to the standby equipment; or, if the equipment operating status is in at least one of fault state and warning state and the equipment termination condition is met, that is, the equipment switching condition that requires switching the main equipment to the standby equipment is met, and a second control command is sent to the standby equipment.
[0111] It is worth noting that the above are merely illustrative examples, and the embodiments of this application are not limited thereto.
[0112] In summary, the second communication connection established between the primary device and the backup device can synchronize device processing data, including the first control command, to the backup device, avoiding the loss of control commands and other data when switching between the primary and backup devices, ensuring that the communication process continues without delay, and improving the stability and security of device control switching.
[0113] This application describes a redundancy configuration of data connection channels to ensure stable data transmission and even device switching. Multiple data connection channels improve data transmission efficiency, ensure data transmission reliability, and enhance system experience. This ensures system stability while fully utilizing total bandwidth, reducing latency and congestion. When a data connection channel fails or becomes congested, the switching system can automatically switch to other data connection channels, enhancing fault tolerance and balancing speed, stability, and flexibility to improve overall system performance.
[0114] In an optional embodiment, device switching exists not only between the primary device and the backup device (e.g.) Figure 2 As shown in the embodiment), channel switching can also exist between different data connection channels (such as...). Figure 3 (As shown in the embodiment), a first control device and a second control device can also be configured to switch between the first control device and the second control device. (Illustrative, as shown) Figure 4 As shown above, Figure 2 The step 220 shown may be followed by the following step 410.
[0115] Step 410: In the event of a control device switching requirement from the first control device to the second control device, based on the third communication connection between the first and second control devices, a device switching command is sent to the second control device, and a control termination command is sent to the master device.
[0116] Indicatively, a control device switching requirement is the need to switch the first control device to another control device; indicatively, a control device switching requirement is a pre-set condition.
[0117] Optionally, the control device switching requirement includes at least one of the following: (1) The first control device is faulty, such as the first control device experiencing hardware failure, software failure, communication interruption, output abnormality, etc.; (2) The first control device actively requests switching, such as the first control device entering maintenance mode and actively issuing a device switching request, or the first control device actively requests switching due to excessive load or performance degradation; (3) The control device switching requirement is met based on the device switching operation, such as manually triggering the switching of the first control device to the second control device; (4) The device operating environment corresponding to the first control device meets the preset conditions, such as the operating temperature of the first control device being too high, or the response time of the first control device processing tasks exceeding the preset time threshold, etc., which are not limited here.
[0118] Optionally, at least two control devices may be pre-deployed, wherein the first control device is the currently operating control device, and the second control device is any control device other than the first control device, or the second control device is a control device other than the first control device with the highest standby priority, etc., without limitation here.
[0119] Optionally, the third communication connection is a communication connection established between the first control device and the second control device, such as a communication connection established between the first control device and each other, or a communication connection established between different control devices in pairs. Illustratively, different control devices may establish a third communication connection via the Modbus TCP protocol, or via other protocols; this is not limited to any particular protocol.
[0120] In some embodiments, if a control device switching requirement is detected, from the first control device to the second control device, a device switching instruction and a control termination instruction are sent to the second control device based on the third communication connection between the first and second control devices.
[0121] Among them, the device switching instruction is used to prompt the second control device to take over the control role of the first control device; the control termination instruction is used to indicate that the third control instruction after the first control instruction is stopped from being sent to the master device.
[0122] Indicatively, the control termination command indicates that the first control device will no longer send third control commands to the master device after the second control device is activated. The third control command can be the second control command mentioned above, and is not limited here. Based on the device switching command and the control termination command, the second control device takes over the role of the first control device, and the first control device will relinquish its ability to send data to other devices, so that the second control device can send control commands and other data content to the master device or the backup device.
[0123] The second control device is used to send a third control command to the primary or backup device based on the device switching command. Illustratively, when the first control device stops sending data to the primary or backup device, the second control command can send a third control command to the primary or backup device. For example, the third control command is sent to the primary device when it is available, and only sent to the backup device when the primary device is unavailable. The relevant details refer to the switching situation between the primary and backup devices described above.
[0124] It is worth noting that the above are merely illustrative examples, and the embodiments of this application are not limited thereto.
[0125] In summary, the second communication connection established between the primary device and the backup device can synchronize device processing data, including the first control command, to the backup device, avoiding the loss of control commands and other data when switching between the primary and backup devices, ensuring that the communication process continues without delay, and improving the stability and security of device control switching.
[0126] This application describes a redundant configuration of control devices to achieve system stability. By using multiple control devices, in the event of a failure of the first control device or the need for better handling of a particular scenario, a second control device can take over the role of the first control device, ensuring uninterrupted system operation or preventing system failures. This enhances the system's fault tolerance and reliability, avoids large-scale downtime due to single-point failures, extends system lifespan, and improves the stability, reliability, and emergency response capabilities of the control system.
[0127] In an optional embodiment, taking the application of the device control switching method to a device control switching system as an example, the device control switching system includes a first control device, a main device, and a backup device.
[0128] A first control device is configured to establish a first communication connection with a primary device and a backup device. This first communication connection is used for data communication between the first control device and the primary device, or between the first control device and the backup device. Based on the first communication connection, the first control device sends a first control command to the primary device. The primary device is configured to receive the first control command and establish a second communication connection with the backup device. A second communication connection is used to synchronize device processing data from the primary device to the backup device. This device processing data includes the first control command. The first control device is also configured to send a second control command to the backup device when device switching conditions are met. This second control command is a control command following the first control command. The backup device is configured to receive the device processing data synchronized from the primary device and to receive the second control command sent by the first control device.
[0129] Furthermore, the equipment control system may also include a second control device. If the primary and backup devices follow the Modbus protocol, the equipment control switching method can also be described as a lossless dual-machine control switching scheme based on the Modbus protocol. It is suitable for communication scenarios with high reliability requirements. In addition, it can be combined with multi-channel redundancy design to achieve zero-delay and zero-loss control command switching between the primary and backup devices, significantly improving the reliability and security of the switching system. The system supports multi-level redundancy, including control device redundancy, channel redundancy, and controlled device (primary and backup) redundancy, ensuring that the switching system can continue to operate stably under any single point of failure.
[0130] In some embodiments, the present application relates to the field of automation control and communication of new energy power plants, and in particular to a lossless switching method for dual machines based on the Modbus protocol, which can be applied to an energy management system.
[0131] The field of automation control and communication in new energy power plants involves achieving efficient and safe operation of these plants through advanced control technologies and communication networks. This primarily includes data acquisition, equipment monitoring, fault diagnosis, and power generation optimization. For example, distributed control systems (DCS), programmable logic controllers (PLCs), and supervisory control and data acquisition systems (SCADA) are used to automate the control of wind power and photovoltaic equipment. Real-time data transmission between the power plant and the dispatch center is achieved through communication protocols such as Modbus and the International Electrotechnical Commission Standard 61850 – Communication Networks and Systems in Substations (IEC 61850), ensuring the stability, efficiency, and coordination with the power grid. The core objective of this field is to improve energy utilization efficiency and grid reliability.
[0132] High availability southbound communication in EMS systems refers to reliable data exchange between EMS devices and lower-level devices. Through redundant networks, real-time communication protocols (such as Modbus and IEC 61850), and fault-to-connect mechanisms, it ensures uninterrupted acquisition of critical data such as voltage, current, and power, enabling continuous operation of power plant automation control, load dispatching, and energy storage optimization, thereby improving system stability and grid reliability. Lower-level devices include at least one of the following: Distributed Control System (DCS), Programmable Logic Controller (PLC), Remote Terminal Unit (RTU), inverter, and energy storage system.
[0133] Optionally, as the scale of new energy power plants continues to expand, the EMS, as the core scheduling and control platform, undertakes multiple tasks such as power control, frequency response, inertia response, black start, and islanded operation. To ensure high availability and reliability, EMS systems generally adopt a dual-machine redundant deployment architecture. The traditional Modbus protocol has the risk of brief communication interruptions and command loss during the switching between master and backup equipment. Especially when communication and control are performed between control equipment (such as the master station) and EMS equipment (slave station), the switching delay may lead to the loss of critical control commands, affecting the safe, stable, and reliable operation of the power plant.
[0134] Indicative, such as Figure 5 As shown, the equipment control and switching system is described below.
[0135] These include control devices (first control device 511, second control device 512, and more control devices may be set, which are not limited here) and EMS devices (main device 521 and backup device 522).
[0136] Optionally, the EMS master device and the EMS backup device adopt the same configuration and achieve data synchronization through an internal direct connection synchronization channel. In addition, multiple redundant communication channels are established between the control device (master station) and the EMS device, that is, each control device establishes two data connection channels with different EMS devices (more channels can be set, which is not limited here).
[0137] For example: the first data connection channel ① and the first data connection channel ⑤ between the first control device 511 and the main device 521; the second data connection channel ② and the second data connection channel ⑥ between the first control device 511 and the backup device 522; the data connection channel ③ and the data connection channel ⑦ between the second control device 512 and the main device 521; and the data connection channel ④ and the data connection channel ⑧ between the second control device 512 and the backup device 522.
[0138] In addition, each EMS device supports two network ports, A and B, corresponding to different network segments, with a maximum of 8 channels. Furthermore, both the control equipment and the EMS device support dual-machine redundancy deployment, with automatic switching between the primary and backup systems to ensure uninterrupted service.
[0139] Optionally, the data connection channel status is categorized as Active, Inactive, Connected, and Disconnected. During the switchover between the master and standby devices, all EMS devices can receive and respond to control commands, preventing command loss due to the switchover. Furthermore, the control device must ensure that only one master device sends control commands at any given time to avoid duplicate execution. Additionally, the two EMS devices have equal roles, and the Modbus TCP slave protocol runs simultaneously on both servers, maintaining data and parameter consistency.
[0140] In addition, active channels allow data acquisition and control distribution, while inactive channels are only established and in standby mode. Illustratively, in the communication channels between the control equipment and the EMS equipment, a maximum of two communication channels can be "active channels," and the remaining channels are "inactive channels." Two active channels cannot be on the same control equipment on opposite sides. The activity status of the channels is determined by the Modbus TCP control equipment in the control center (such as the first control equipment 511) and is switched by the Modbus TCP control equipment. For example, solid lines represent active channels. Two active channels cannot simultaneously appear in group {1,5,2,6}, for example, they cannot both be 1 and 2.
[0141] Active channels allow data acquisition and control transmission, while inactive channels are merely established and remain in standby mode. When an active channel fails, the Modbus TCP control device selects and activates one of the inactive channels, making it the new active channel. When an active channel receives control commands (such as remote control or telemetry commands) from the Modbus TCP control device, both the primary and backup Modbus TCP devices for the two active channels will respond and process them, ensuring that control commands are not lost during channel switching (the Modbus TCP control device must ensure that only one control device sends control commands during normal operation to avoid command conflicts caused by repeated execution). Inactive channels will not respond to or process similar commands.
[0142] Optionally, EMS devices can improve system security by configuring the IP address verification mechanism of the control device to restrict connection permissions.
[0143] In other words, the equipment switching system consists of control equipment, EMS master equipment, EMS backup equipment, and multiple redundant communication channels. Both the master and backup equipment run the Modbus TCP slave protocol. Typically, the control equipment communicates with the EMS master equipment first via the Modbus TCP protocol. The EMS master equipment and the EMS backup equipment synchronize data in real time through an internal direct connection channel to ensure the consistency of parameters and data.
[0144] When the EMS master device fails or is under maintenance, the EMS backup device can seamlessly take over all services, ensuring continuous and uninterrupted system operation. Each EMS device supports two network ports, A and B, with each port supporting two channels on the opposite side, for a maximum of eight channels. The channel status is determined by the control device; the active channel is used for data interaction, and the backup channel can be switched to the active channel at any time. All EMS master devices can receive instructions from the upper-level control center and simultaneously send them to lower-level devices, ensuring that no instructions are lost. At the same time, the control device must ensure that only one Modbus control device sends control instructions at any given time to avoid the EMS device repeatedly executing instructions to lower-level devices, thus preventing duplicate erroneous control.
[0145] It is worth noting that the above are merely illustrative examples, and the embodiments of this application are not limited thereto.
[0146] In summary, the second communication connection established between the primary device and the backup device can synchronize device processing data, including the first control command, to the backup device, avoiding the loss of control commands and other data when switching between the primary and backup devices, ensuring that the communication process continues without delay, and improving the stability and security of device control switching.
[0147] In this embodiment, the switching process can be completed without delay and without loss of control commands, significantly improving the reliability of the switching system. In addition, it supports multi-level redundancy of control equipment, data connection channels and lower-level devices to ensure the safe and stable operation of the power plant. Furthermore, it is compatible with the existing Modbus protocol, making it easy to deploy and expand. It also supports automatic switching between master and backup equipment, improving operation and maintenance efficiency. In addition, it enables intelligent management of channel status, which can improve communication stability and security.
[0148] Figure 6 This is a structural block diagram of a device control switching apparatus provided in an exemplary embodiment of this application, such as... Figure 6 As shown, the device includes the following parts: The connection establishment module 610 is used to establish a first communication connection corresponding to the main device and the backup device respectively. The first communication connection is used to perform data communication between the first control device and the main device, or to perform data communication between the first control device and the backup device. The instruction sending module 620 is used to send a first control instruction to the master device based on the first communication connection. The master device and the backup device establish a second communication connection. The second communication connection is used to synchronize the device processing data of the master device to the backup device. The device processing data includes the first control instruction. The instruction sending module 620 is further configured to send a second control instruction to the backup device when the device switching conditions are met, wherein the second control instruction is a control instruction following the first control instruction.
[0149] In an optional embodiment, the connection establishment module 610 is further configured to establish the first communication connection with the master device through at least two first data connection channels; and to establish the first communication connection with the backup device through at least two second data connection channels.
[0150] In an optional embodiment, the connection establishment module 610 is further configured to switch to another first data connection channel to send the first control command to the master device if at least one of the at least two first data connection channels fails.
[0151] In an optional embodiment, the instruction sending module 620 is further configured to send a second control instruction to the backup device when at least one of the at least two first data connection channels fails; or, when all the first data connection channels fail, send a second control instruction to the backup device.
[0152] In an optional embodiment, the main device includes a first network port and a second network port, and the backup device includes a third network port and a fourth network port; the first network port and the second network port each correspond to different network segments, and the third network port and the fourth network port each correspond to different network segments; The connection establishment module 610 is further configured to establish a first communication connection between the first control device and the main device through a connection relationship between the first control device and the first network port through at least one first data connection channel and a connection relationship between the first control device and the second network port through at least one other first data connection channel; and to establish a first communication connection between the first control device and the backup device through a connection relationship between the first control device and the third network port through at least one second data connection channel and a connection relationship between the first control device and the fourth network port through at least one other second data connection channel.
[0153] In an optional embodiment, the instruction sending module 620 is further configured to send the second control instruction to the backup device when the first communication connection fails; and to send the second control instruction to the backup device when the device operating state corresponding to the primary device reaches the device termination condition.
[0154] In an optional embodiment, the connection establishment module 610 is further configured to verify the first Internet Protocol address of the master device to obtain a first verification result, and establish the first communication connection with the master device if the first verification result meets the verification conditions; verify the second Internet Protocol address of the backup device to obtain a second verification result, and establish the first communication connection with the backup device if the second verification result meets the verification conditions.
[0155] In an optional embodiment, the first control device establishes a first communication connection with the master device via the Modbus TCP protocol, and the first control device establishes a second communication connection with the backup device via the Modbus TCP protocol; the master device and the backup device establish the second communication connection via an internal direct connection channel.
[0156] In an optional embodiment, the instruction sending module 620 is further configured to, when there is a control device switching requirement to switch from the first control device to the second control device, send a device switching instruction to the second control device based on the third communication connection between the first control device and the second control device, and send a control termination instruction to the master device, wherein the control termination instruction is used to indicate that the third control instruction after the first control instruction is stopped being sent to the master device; wherein the second control device is configured to send the third control instruction to the master device or the backup device based on the device switching instruction.
[0157] In summary, the second communication connection established between the primary device and the backup device can synchronize device processing data, including the first control command, to the backup device, avoiding the loss of control commands and other data when switching between the primary and backup devices, ensuring that the communication process continues without delay, and improving the stability and security of device control switching.
[0158] It should be noted that the device control switching device provided in the above embodiments is only an example of the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the device control switching device and the device control switching method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0159] Figure 7 A schematic diagram of a computer device provided in an exemplary embodiment of this application is shown. The computer device may be a terminal or a server; in this embodiment, it is described as a server. The server 700 includes a Central Processing Unit (CPU) 701, a system memory 704 including Random Access Memory (RAM) 702 and Read Only Memory (ROM) 703, and a system bus 705 connecting the system memory 704 and the CPU 701. The server 700 also includes a mass storage device 706 for storing an operating system 713, application programs 714, and other program modules 715.
[0160] Mass storage device 706 is connected to central processing unit 701 via a mass storage controller (not shown) connected to system bus 705. Mass storage device 706 and its associated computer-readable media provide non-volatile storage for server 700. That is, mass storage device 706 may include computer-readable media (not shown) such as hard disk or compact disc read-only memory (CD-ROM) drives.
[0161] Without loss of generality, computer-readable media can include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information such as computer-readable instructions, data structures, program modules or other data. The system memory 704 and mass storage device 706 described above can be collectively referred to as memory.
[0162] According to various embodiments of this application, server 700 can also be connected to a remote computer on a network, such as the Internet. That is, server 700 can be connected to network 712 via network interface unit 711 connected to system bus 705, or it can also use network interface unit 711 to connect to other types of networks or remote computer systems (not shown).
[0163] The aforementioned memory also includes one or more programs, which are stored in the memory and configured to be executed by the CPU.
[0164] Embodiments of this application also provide a computer device, which includes a processor and a memory, wherein the memory stores at least one program, which is loaded and executed by the processor to implement the device control switching method provided in the above-described method embodiments.
[0165] Embodiments of this application also provide a computer-readable storage medium storing at least one program, which is loaded and executed by a processor to implement the device control switching method provided in the above-described method embodiments.
[0166] Embodiments of this application also provide a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform any of the device control switching methods described in the above embodiments.
[0167] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for switching equipment control, characterized in that, The method includes: Establish a first communication connection corresponding to the main device and the backup device respectively. The first communication connection is used to perform data communication between the first control device and the main device, or between the first control device and the backup device. Based on the first communication connection, a first control command is sent to the master device, and a second communication connection is established between the master device and the backup device. The second communication connection is used to synchronize the device processing data of the master device to the backup device. The device processing data includes the first control command. If the equipment switching conditions are met, a second control command is sent to the backup equipment. The second control command is a control command following the first control command.
2. The method according to claim 1, characterized in that, The establishment of the first communication connection corresponding to the main device and the backup device respectively includes at least one of the following: The first communication connection with the master device is established through at least two first data connection channels; The first communication connection with the backup device is established through at least two second data connection channels.
3. The method according to claim 2, characterized in that, The method further includes: If at least one of the at least two first data connection channels fails, the other first data connection channel is switched to send the first control command to the master device.
4. The method according to claim 2, characterized in that, The step of sending a second control command to the backup device when the device switching conditions are met includes: If at least one of the at least two first data connection channels fails, a second control command is sent to the backup device; or... In the event of a failure in all first data connection channels, a second control command is sent to the backup device.
5. The method according to any one of claims 1 to 4, characterized in that, The main device includes a first network port and a second network port, and the backup device includes a third network port and a fourth network port; the first network port and the second network port each correspond to different network segments, and the third network port and the fourth network port each correspond to different network segments. Establishing the first communication connection with the master device through at least two first data connection channels includes: The first communication connection between the first control device and the main device is established through a connection relationship between at least one first data connection channel and the first network port, and through a connection relationship between at least one other first data connection channel and the second network port. Establishing the first communication connection with the backup device through at least two second data connection channels includes: The first communication connection between the first control device and the backup device is established through the connection between the first control device and the third network port through at least one second data connection channel and the fourth network port through at least one other second data connection channel.
6. The method according to any one of claims 1 to 4, characterized in that, Sending a second control command to the backup device when the device switching conditions are met includes at least one of the following: In the event of a failure in the first communication connection, the second control command is sent to the backup device; When the operating status of the main device reaches the device termination condition, the second control command is sent to the standby device.
7. The method according to any one of claims 1 to 4, characterized in that, The establishment of the first communication connection corresponding to the primary device and the backup device respectively includes: The first Internet Protocol address of the master device is verified to obtain a first verification result, and the first communication connection between the master device and the first device is established if the first verification result meets the verification conditions. The second Internet Protocol address of the backup device is verified to obtain a second verification result, and if the second verification result satisfies the verification conditions, the first communication connection with the backup device is established.
8. The method according to any one of claims 1 to 4, characterized in that, After sending the first control command to the master device based on the first communication connection, the method further includes: In the event of a control device switching requirement from the first control device to the second control device, based on the third communication connection between the first control device and the second control device, a device switching instruction is sent to the second control device, and a control termination instruction is sent to the master device. The control termination instruction is used to indicate that the third control instruction after the first control instruction is stopped from being sent to the master device. The second control device is used to send the third control command to the main device or the backup device based on the device switching command.
9. A device control switching system, characterized in that, The system includes: A first control device is configured to establish first communication connections corresponding to a primary device and a backup device, respectively. The first communication connection is used to perform data communication between the first control device and the primary device, or between the first control device and the backup device; and to send a first control command to the primary device based on the first communication connection. The master device is configured to receive the first control command; establish a second communication connection with the backup device, the second communication connection being configured to synchronize the device processing data of the master device to the backup device, the device processing data including the first control command; The first control device is further configured to send a second control instruction to the backup device when the device switching conditions are met, wherein the second control instruction is a control instruction following the first control instruction; The backup device is used to receive the device processing data synchronized by the master device, and to receive the second control command sent by the first control device.
10. A device control switching apparatus, characterized in that, The device includes: A connection establishment module is used to establish a first communication connection corresponding to the main device and the backup device respectively. The first communication connection is used to perform data communication between the first control device and the main device, or to perform data communication between the first control device and the backup device. The instruction sending module is used to send a first control instruction to the master device based on the first communication connection. The master device and the backup device establish a second communication connection. The second communication connection is used to synchronize the device processing data of the master device to the backup device. The device processing data includes the first control instruction. The instruction sending module is also used to send a second control instruction to the backup device when the device switching conditions are met. The second control instruction is a control instruction following the first control instruction.
11. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing at least one program, which is loaded and executed by the processor to implement the device control switching method as described in any one of claims 1 to 8.
12. A computer-readable storage medium, characterized in that, The storage medium stores at least one program segment, which is loaded and executed by a processor to implement the device control switching method as described in any one of claims 1 to 8.
13. A computer program product, characterized in that, It includes computer instructions that, when executed by a processor, implement the device control switching method as described in any one of claims 1 to 8.