A Remote PLC Local Redundancy Backup System
By introducing a remote PLC local redundant backup system with cloud edge architecture into the PLC system, cloud-side redundant management and control module and edge-side redundant units are used to achieve cloud-side switching, solving the problem of redundancy during remote deployment of PLC and ensuring the reliability of device control.
Patent Information
- Application Number
- CN202410731479.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-06
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2044-06-06
AI Technical Summary
There is a lack of a solution in the prior art to solve the problem of redundancy in PLC remote deployment, resulting in the problem of equipment losing control after cloud-edge communication link failure.
The remote PLC local redundant backup system adopts the cloud edge architecture, through the cloud redundant control module and the edge redundant unit work together to realize cloud edge switching after the communication link failure, ensuring the reliability of device control.
It realizes local redundant backup of PLC devices after cloud-edge communication link failure, ensuring the reliability and continuity of device control and avoiding the loss of control of the device.
Smart Images

Figure CN118842693B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of automatic control, and particularly to a remote PLC local redundancy backup system. Background Art
[0002] Programmable Logic Controllers (PLCs) are widely used in industrial automation control systems. In the traditional PLC industrial control system architecture, the PLC controller is directly deployed at the industrial site and directly connected to the field devices through hardware connections. This makes the PLC controller tightly coupled with the controlled devices, lacking flexibility. Also, due to being deployed at the industrial site, the PLC has limited computing resources and communication resources and cannot handle complex high-computing-power control tasks. With the introduction of emerging technologies such as cloud computing technology and network communication technology, the architecture of the PLC industrial control system is constantly evolving. In the PLC cloud-edge collaborative control system, the main control tasks are uploaded to the cloud for operation, and the basic tasks are run at the edge. However, it also introduces the problem that the equipment will lose control when a communication link failure occurs between the cloud and the edge.
[0003] As can be seen from the above, in response to the failure of the cloud-edge communication link, it is very important to propose a reliability guarantee scheme for the system and consider how to enable the equipment to continue to be controlled and operated. Currently, in the existing technology, there is no relevant solution to solve the problem of how to perform redundancy when the PLC is remotely deployed. Summary of the Invention
[0004] The present invention provides a remote PLC local redundancy backup system to solve the technical problem that in the existing technology, there is no relevant solution to solve the problem of how to perform redundancy when the PLC is remotely deployed.
[0005] To solve the above technical problems, the present invention provides the following technical solutions:
[0006] A remote PLC local redundancy backup system is implemented using a cloud-edge-device architecture, including a cloud, an edge, and a device end; wherein, the cloud includes a cloud processing unit, the edge includes an edge processing unit, a cloud I / O interface, and a local I / O interface, and the device end includes at least one controlled I / O device; further, the cloud further includes a cloud redundancy management and control module, and the cloud redundancy management and control module is designed with an HMI interface for the user to select whether to enable the redundancy function; the edge further includes an edge redundancy unit.
[0007] When the redundancy function is not enabled, the cloud processing unit, the cloud I / O interface, the edge processing unit, and the local I / O interface cooperate to complete the control work of the I / O device.
[0008] After enabling the redundancy function, the cloud redundancy control module and the edge redundancy unit cooperate to complete the preparation work for the cloud-edge switching task after a communication link failure; then, the edge redundancy unit executes a communication detection task. If no communication link failure is detected between the cloud and the edge, the cloud processing unit, the cloud I / O interface, the edge processing unit, and the local I / O interface cooperate to complete the control work of the I / O device; if a communication link failure is detected between the cloud and the edge, a cloud-edge switching task for the I / O device to switch from cloud control to edge control is performed at the edge.
[0009] Further, the cooperation of the cloud processing unit, the cloud I / O interface, the edge processing unit, and the local I / O interface to complete the control work of the I / O device includes:
[0010] The local I / O interface collects the operation information of the I / O device; the edge processing unit executes an information pass-through task to upload the operation information to the cloud I / O interface; the cloud I / O interface uploads the operation information to the cloud processing unit through the communication link between the cloud and the edge; the cloud processing unit executes a device control task, generates a control instruction according to the operation information and a preset operation control program, and issues the control instruction to the cloud I / O interface; the edge processing unit executes an information pass-through task to issue the control instruction to the local I / O interface; the local I / O interface issues the control instruction to the controlled I / O device to control the controlled I / O device.
[0011] Further, the cloud processing unit is provided with a status information output interface for real-time output of the execution status information of the control task;
[0012] The cooperation of the cloud redundancy control module and the edge redundancy unit to complete the preparation work for the cloud-edge switching task after a communication link failure includes:
[0013] The cloud redundancy control module starts tasks for obtaining startup status information, communication response, and generating control programs adapted to the edge side. Among them, the status information obtaining task is used to obtain the execution status information of the control task from the status information output interface and send the obtained execution status information from the cloud to the edge redundancy unit in real time. The communication response task is used to send a command to the edge redundancy unit to start detecting cloud-edge communication link failures. After receiving the command to start detecting cloud-edge communication link failures, the edge redundancy unit starts executing the communication detection task to detect cloud-edge communication link failures. The task of generating control programs adapted to the edge side is used to generate corresponding control task programs according to the computing power level of the edge side and send the generated control task programs to the edge redundancy unit.
[0014] Further, the status information output interface is implemented using an inter-process communication mechanism or based on a communication protocol stack.
[0015] Further, the detection of cloud-edge communication link failures between the cloud and the edge side is specifically as follows: The edge redundancy unit and the cloud redundancy control module cooperate to detect cloud-edge communication link failures in the form of heartbeat packets.
[0016] Further, the generation of corresponding control task programs according to the computing power level of the edge side includes:
[0017] Evaluating the computing power level of the edge side to determine whether the edge side can stably run the complete control task program. If the edge side can stably run the complete control task program, a complete control task program is generated; otherwise, a simplified control task program is generated. Among them, the complete control task program is the same as the control task program in the cloud processing unit, while the simplified control task program only retains the control program for maintaining the basic functions of the system operation.
[0018] Further, the specific generation method of the simplified control task program is as follows: When engineers initially design the control task program, they make specific identifications for the names of the basic function programs in the PLC project tree. If the edge side cannot stably run the complete control task program, the basic function programs in the control task program in the cloud processing unit are retained according to the specific identifications and other function programs are deleted. Finally, the PLC project is compiled to generate the simplified control task program.
[0019] Further, the cloud-edge switching task of I / O devices from cloud control to edge control at the edge side is specifically as follows:
[0020] Adopt a cloud I / O interface reconfiguration scheme to perform the cloud-edge switching task of I / O devices from cloud control to edge control at the edge side;
[0021] Or,
[0022] Adopt a task reconstruction scheme for the edge processing unit to perform the cloud-edge switching task of the I / O device from cloud control to edge control at the edge.
[0023] Further, the adoption of the cloud I / O interface reconfiguration scheme to perform the cloud-edge switching task of the I / O device from cloud control to edge control at the edge includes:
[0024] After ensuring that the IP address for the edge takeover control task in the edge redundancy unit remains fixed, pre-transmit the IP address for the edge takeover control task to the cloud I / O interface shown.
[0025] When the communication response task of the edge redundancy unit detects a fault in the communication link between the cloud and the edge, send a command to start cloud-edge switching to the cloud I / O interface; after receiving the command to start cloud-edge switching, the cloud I / O interface cancels the connection with the cloud and establishes a communication connection with the edge takeover control task of the edge redundancy unit according to the IP address for the edge takeover control task.
[0026] After the cloud I / O interface establishes a communication connection with the edge takeover control task of the edge redundancy unit, the operation information is uploaded to the information transparent transmission task through the local I / O interface, and the information transparent transmission task sends the operation information to the edge takeover control task through the cloud I / O interface; after the edge takeover control task establishes a connection with the cloud I / O interface, load the previously stored control task program and execution status information into the task container, input the operation information and execution status information into the operation control task program to obtain a control instruction.
[0027] The control instruction generated by the edge takeover control task is sent to the information transparent transmission task through the cloud I / O interface, and the information transparent transmission task then issues the control instruction to the controlled I / O device through the local I / O interface.
[0028] Further, the adoption of the task reconstruction scheme for the edge processing unit to perform the cloud-edge switching task of the I / O device from cloud control to edge control at the edge includes:
[0029] After the communication response task of the edge redundant unit detects a failure in the communication link between the cloud and the edge, it sends a command to start cloud-edge switching to the idle task container in the edge processing unit. After receiving the command to start cloud-edge switching, the idle task container in the edge processing unit establishes a communication connection with the edge redundant unit, reads the control task program and execution status information stored in the edge redundant unit, and loads the read control task program and execution status information into the idle task container. In the loaded task container, the operation information and execution status information are input into the control task program to obtain a control instruction, and the generated control instruction is sent to the controlled I / O device through the local I / O interface.
[0030] The beneficial effects brought by the technical solution provided by the present invention at least include:
[0031] Before the cloud-edge communication link fails, the present invention makes redundant backup preparations through the cloud redundant management and control module and the edge redundant unit, implements the cloud I / O interface reconfiguration scheme or the edge processing unit task reconstruction scheme, and switches the device control from the cloud to the edge after the cloud-edge communication link fails, thereby achieving the purpose of local redundant backup of the remote PLC and ensuring the reliability of the PLC cloud-edge collaborative control system. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0033] Figure 1 It is a block diagram of the local redundant backup system of the remote PLC provided by the embodiment of the present invention;
[0034] Figure 2 It is a block diagram of the cloud redundant management and control module provided by the embodiment of the present invention;
[0035] Figure 3 It is a block diagram of the edge redundant unit provided by the embodiment of the present invention;
[0036] Figure 4 It is a schematic diagram of the principle of the cloud I / O interface reconfiguration scheme provided by the embodiment of the present invention;
[0037] Figure 5 It is a schematic diagram of the principle of the edge processing unit task reconstruction scheme provided by the embodiment of the present invention;
[0038] Figure 6It is the working flowchart of the remote PLC local redundancy backup system provided by the embodiments of the present invention. Detailed implementation manners
[0039] To make the objectives, technical solutions and advantages of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
[0040] First of all, it should be noted that in the embodiments of the present invention, words such as "exemplarily" and "for example" are used to represent examples, illustrations or explanations. Any embodiment or design solution described as an "example" in the present invention should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Specifically, the use of the word "exemplarily" is intended to present concepts in a specific manner. In addition, in the embodiments of the present invention, the meaning expressed by "and / or" can be both, or either of the two can be selected.
[0041] In view of the fact that there is currently no relevant solution to solve the problem of how to perform redundancy during the remote deployment of PLCs, this embodiment provides a remote PLC local redundancy backup system. In addition to setting up a cloud processing unit commonly used in the prior art solutions in the cloud, a redundancy control module is introduced in the cloud, and a processing unit, a redundancy unit and an I / O interface are introduced at the edge. The device control redundancy function is realized at the edge in advance. Once it is detected that a communication link failure occurs between the cloud and the edge, the task of switching device control from the cloud to the edge is realized at the edge, thereby ensuring the reliability of the PLC cloud-edge collaborative control system.
[0042] As Figure 1As shown in the figure, the remote PLC local redundancy backup system architecture of this embodiment consists of three levels: the cloud, the edge, and the I / O device end; among them, the cloud includes two parts: the cloud processing unit and the cloud redundancy control module; the edge includes four parts: the edge processing unit, the edge redundancy unit, the cloud I / O interface, and the local I / O interface; the I / O device end includes multiple controlled I / O devices. When the redundancy function is not enabled, the cloud-edge collaboration of these four parts, namely the cloud processing unit, the cloud I / O interface, the edge processing unit, and the local I / O interface, completes the control work of the I / O devices. After the user enables the redundancy function, the cloud redundancy control module will execute three control tasks, including obtaining status information from the cloud processing unit and sending it to the edge, detecting the communication status through cloud-edge collaboration, and adapting and generating a control program for the edge and sending it to the edge. The edge redundancy unit needs to execute the communication detection task. When it detects a failure in the cloud-edge communication link, it performs a cloud-edge switch of the I / O device control from the cloud control to the edge control at the edge. And, for the cloud-edge switch problem, this embodiment designs two switching schemes, one is the cloud I / O interface reconfiguration scheme, and the other is the edge processing unit task reconstruction scheme. Among them, in the cloud I / O interface reconfiguration scheme, after receiving the information of the communication link failure, the cloud I / O interface disconnects from the device control task in the cloud control unit and establishes a connection with the edge takeover control task in the edge redundancy unit, thereby taking over the control work of the I / O devices. In the edge processing unit task reconstruction scheme, after receiving the information of the communication link failure, the idle task container in the edge processing unit runs the control task of the I / O devices in the idle task container, thereby taking over the control work of the I / O devices.
[0043] Next, the main modules in the system of this embodiment will be described in detail.
[0044] The cloud redundancy control module is located in the cloud and makes necessary preparations in advance for the cloud-edge switch after the communication link failure. The design of the cloud redundancy control module is as Figure 2 shown as follows:
[0045] The cloud redundancy control module is designed with an HMI interface for the user to select whether to enable the redundancy function. When the user enables the redundancy, an enable signal will be sent to each task respectively and the corresponding tasks will run, including the status information acquisition task, the communication response task, and the task of adapting and generating a control program for the edge.
[0046] Among them, for the implementation of the status information acquisition task, in addition to receiving device operation information, executing control programs, and generating control instructions for the running device control tasks in the cloud processing unit, a dedicated interface for real-time output of the execution status information of the control task needs to be established. This interface can be accessed by the status information acquisition task in the cloud redundant management and control module for real-time acquisition of the execution status information of the control task. The status information output interface can be implemented using an inter-process communication mechanism. The cloud redundant management and control module and the cloud processing unit can be deployed on the same computing node, and the status information acquisition task can directly access the memory to obtain the status information; it can also be implemented based on a communication protocol stack, so as to support the cloud redundant management and control module and the cloud processing unit to be deployed on different computing nodes, and the status information acquisition task can obtain the status information in real time through a high-performance network. The status information acquisition task does not need to process the status information, but needs to send the status information from the cloud to the edge redundant unit at the edge in real time, so as to ensure the real-time nature of the status information during cloud-edge switching. Among them, the device operation information refers to the useful information generated during the operation of on-site devices required during the execution of the control program. For example, the operation information of a motor device can include its current position information, running speed information, etc.; and the execution status information refers to information such as the internal variable information of the program generated during the execution of the control program and the execution stage information where the control program is currently located. This execution status information helps the edge control device obtain the last execution status of the cloud control during fault recovery.
[0047] After the communication response task is enabled to run, it will send a command to start detecting the cloud-edge communication link failure to the communication detection task in the edge redundant unit at the edge, and then it needs to immediately return the heartbeat packet after receiving the heartbeat packet sent by the communication detection task.
[0048] After the control program task generation adapted to the edge is enabled to run, it will generate a complete control task program and a streamlined control task program respectively. The complete control task program is the same as the device control task in the cloud processing unit, while the streamlined control task program only retains the control program for maintaining the basic functions of the system operation. This requires engineers to make specific identifications for the names of the basic function programs in the PLC engineering tree when initially designing the control task, so that the generated control task program can retain the basic function programs and delete other function programs according to the specific identifications, and finally generate a streamlined control task program after compiling the PLC project. In addition, the control program task generation adapted to the edge needs to evaluate the computing power level of the edge device, then judge whether the edge device can stably run the complete control task program, and finally select the complete or streamlined control task program and send it to the edge redundant unit.
[0049] Edge processing unit. When the system is in the cloud-edge collaborative working state, the edge processing unit uploads the device operation information collected by the local I / O interface to the cloud processing unit through the cloud I / O interface without processing by running the information transparent transmission task. The idle task container in the edge processing unit is a key part when performing cloud-edge switching using the task reconstruction scheme, while it is not required when using the cloud I / O interface reconfiguration scheme.
[0050] Edge redundancy unit. The design of the edge redundancy unit is as Figure 3 shown. When the communication detection task in the edge redundancy unit receives the command for communication link fault detection sent from the cloud, it sends heartbeat packets to the communication response task running in the cloud at a nearly real-time rate with a short time interval. Considering that the heartbeat packets will be immediately returned by the communication response task and the communication time for the heartbeat packets to return from the cloud to the edge, the communication detection task uses a value slightly greater than the communication time as the detection standard. When the time since the last received heartbeat packet has exceeded the detection standard and no new heartbeat packet has been received, it can be determined that a communication link fault has occurred. The edge redundancy unit also stores the status information and control program sent from the cloud and loads the edge takeover control task or the idle task container during cloud-edge switching. The edge takeover control task in the edge redundancy unit is a key part when performing cloud-edge switching using the cloud I / O interface reconfiguration scheme, while it is not required when using the task reconstruction scheme.
[0051] When performing cloud-edge switching using the cloud I / O interface reconfiguration scheme, the edge redundancy unit, cloud I / O interface, edge processing unit, and local I / O interface of the edge need to cooperate to complete. The design of the cloud I / O interface reconfiguration scheme is as Figure 4As shown. After ensuring that the IP address for the edge takeover control task in the edge redundancy unit remains fixed, the IP address needs to be sent to the cloud I / O interface in advance. When the communication detection task of the edge redundancy unit determines that a communication link failure has occurred, it will immediately send a command to start cloud-edge switching to the cloud I / O interface. After the communication link fails, the connection between the cloud I / O interface and the cloud processing unit is interrupted. After receiving the switching command, the cloud I / O interface will cancel the connection with the cloud and establish a communication connection with the edge takeover control task of the edge redundancy unit based on the previously received IP address. When the cloud controls the I / O device, the operating information of the I / O device is uploaded to the information pass-through task through the local I / O interface, and the information pass-through task then uploads it to the cloud processing unit through the cloud I / O interface; when the edge controls the I / O device after cloud-edge switching, the operating information is also uploaded to the information pass-through task through the local I / O interface, but the information pass-through task sends it to the edge takeover control task through the cloud I / O interface. After establishing a connection with the cloud I / O interface, the edge takeover control task will immediately load the previously stored control program and status information into the task container. The loading can be achieved by directly accessing the memory. Using the obtained device operating information and control status information as input information, the control program is run and control instructions are output, so as to ensure that the edge's control of the I / O device continues on the basis of the disconnection of the cloud control. The control instructions generated by the edge takeover control task are sent to the information pass-through task through the cloud I / O interface, and the information pass-through task then issues them to the I / O device through the local I / O interface.
[0052] When using the task reconstruction scheme for cloud-edge switching, the edge processing unit, edge redundancy unit, and local I / O interface need to cooperate to complete it, and the cloud I / O interface is no longer required to participate. The design of the edge processing unit task reconstruction scheme is as Figure 5As shown in the figure. Since the communication link fails and the device operation information uploaded by the local I / O interface to the information transparent transmission task cannot be uploaded to the cloud through the cloud I / O interface anymore, the task reconstruction scheme chooses not to use the information transparent transmission task and the cloud I / O interface, but to reconstruct the task and run a new device control task through the idle task container. When the communication detection task of the edge redundant unit determines that the communication link fails, it will immediately send a command to start cloud-edge switching to the idle task container in the edge processing unit. After receiving this command, the idle task container will immediately establish a communication connection with the edge redundant unit, read the control program and status information stored in the edge redundant unit and load them into the task container. Specifically, it can be achieved by directly accessing the memory through inter-process communication or based on the communication protocol stack. In the task container, the obtained device operation information and control status information are used as input information and the device control program is executed, that is, a new device control task is run. Since the task reconstruction is completed in the edge processing unit, the device control task running in the idle task container and the previous information transparent transmission task are in the same processing unit, and the local I / O interface has established a communication connection with the edge processing unit when executing the information transparent transmission task. Therefore, the device control task running in the idle task container also receives the device operation information and issues control instructions through the local I / O interface.
[0053] Based on the above, the overall working process of this system is as Figure 6 shown below, and the working process of this system will be described below.
[0054] When the cloud-edge communication link is normal, the local I / O interface collects the operation information of the on-site I / O devices and uploads it to the information transparent transmission task of the edge processing unit. The information transparent transmission task does not process the operation information and uploads it to the cloud I / O interface. The cloud I / O interface uploads the operation information to the device control task of the cloud processing unit through the cloud-edge communication link. The device control task generates control instructions according to the received device operation information and the running control program, issues them to the cloud I / O interface, and the cloud I / O interface then issues them to the information transparent transmission task. The information transparent transmission task also does not process the control instructions and issues them to the local I / O interface. The local I / O interface issues the control instructions to each I / O device for control.
[0055] After the user enables the redundancy function, the status information acquisition task of the cloud redundancy management and control module obtains the status information in real time through the status information output interface exposed by the device control task of the cloud processing unit and sends it to the edge redundancy unit for storage. The communication response task of the cloud redundancy management and control module and the communication detection task of the edge redundancy unit cooperate to detect the cloud-edge communication link failure. The task of generating a control program adapted to the edge of the cloud redundancy management and control module selects from the complete control program and the streamlined control program according to the edge computing power resources and sends it to the edge redundancy unit for storage. After the user enables redundancy, the work carried out by the cloud redundancy management and control module and the edge redundancy unit is the necessary preparation for cloud-edge switching.
[0056] When the cloud-edge communication link fails, two solutions are designed to ensure the reliability of the system during cloud-edge switching. When the cloud I / O interface reconfiguration solution is adopted, after the communication detection task of the edge redundancy unit determines the cloud-edge communication link failure, it immediately sends a command for cloud-edge switching to the cloud I / O interface. After receiving the command, the cloud I / O interface establishes a communication connection with the edge takeover control task of the edge redundancy unit and sends the device operation information to it. The edge takeover control task loads the previously stored control program and status information, runs the control program with the operation information and status information as inputs, and sends the generated control instructions to the cloud I / O interface. The cloud I / O interface sends the control instructions to the information transparent transmission task of the edge processing unit, and the information transparent transmission task then sends them to the field I / O device for control through the local I / O interface. When the edge processing unit task reconstruction solution is adopted, after the communication detection task of the edge redundancy unit determines the cloud-edge communication link failure, it immediately sends a command for cloud-edge switching to the idle task container of the edge processing unit. After receiving the command, the idle task container receives the device operation information through the local I / O interface, loads the control program and status information by establishing a communication connection with the edge redundancy unit, runs the control program with the operation information and status information as inputs, and sends the generated control instructions to the local I / O interface. The local I / O interface then sends them to the field I / O device for control.
[0057] In summary, this embodiment provides a remote PLC local redundancy backup system, and proposes an implementation mechanism and workflow for the remote cloud PLC to perform redundancy backup at the local edge side, and for the cloud I / O interface reconfiguration scheme or the edge-side processing unit task reconstruction scheme for device control to switch from the cloud to the edge side. It designs a cloud processing unit, a cloud redundancy management and control module, an edge-side processing unit, an edge-side redundancy unit, a cloud I / O interface, and a local I / O interface for implementing this mechanism. The remote PLC local redundancy backup system prepares for redundancy backup through the cloud redundancy management and control module and the edge-side redundancy unit before the cloud-edge communication link fails, implements the cloud I / O interface reconfiguration scheme or the edge-side processing unit task reconstruction scheme, and performs the work of switching device control from the cloud to the edge side after the cloud-edge communication link fails, thereby achieving the purpose of local redundancy backup of the remote PLC, and further ensuring the reliability of the control of the PLC cloud-edge collaborative control system.
[0058] In addition, it should be noted that the present invention can be provided as a method, a device, or a computer program product. Therefore, the embodiments of the present invention can take the form of all or part of a hardware embodiment, all or part of a software embodiment, or an embodiment combining software and hardware aspects. Moreover, when implemented using software, the embodiments of the present invention can take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on the computer, the processes or functions described in the embodiments of the present invention are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wired (such as infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that the computer can access, or a data storage device such as a server or a data center containing a set of one or more available media. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state drive.
[0059] Embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, and the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing terminal device generate a device for implementing the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 or multiple blocks.
[0060] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device that implements the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 or multiple blocks. These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device, such that a series of operation steps are executed on the computer or other programmable terminal device to generate a computer-implemented process, so that the instructions executed on the computer or other programmable terminal device provide steps for implementing the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 or multiple blocks.
[0061] It should also be noted that in this text, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, such that a process, method, article or terminal device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or elements inherent to such process, method, article or terminal device. Without further limitation, an element defined by the statement "comprising one..." does not exclude the existence of additional identical elements in the process, method, article or terminal device comprising said element. In addition, the term "and / or" is merely a description of the relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. Here, A and B can be singular or plural. Additionally, in this text, the character " / " generally indicates an "or" relationship between the associated objects before and after, but it may also represent an "and / or" relationship, which can be understood specifically by referring to the context. "At least one" means one or more, and "a plurality" means two or more. "At least one of the following (items)" or similar expressions refer to any combination of these items, including any combination of single (item) or plural (items). For example, at least one of a, b or c can represent: a, b, c, a - b, a - c, b - c, or a - b - c, where a, b, c can be single or multiple.
[0062] Furthermore, it can be understood that in various embodiments of the present invention, the magnitudes of the sequence numbers of the above processes do not imply the order of execution. The order of execution of each process should be determined by its function and internal logic, and should not impose any limitation on the implementation process of the embodiments of the present invention.
[0063] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0064] In several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of functional modules / units is only a logical functional division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of devices or units can be in electrical, mechanical, or other forms. The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in each embodiment of the present invention, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit.
[0065] If the method is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs.
[0066] Finally, it should be noted that the above description is only a preferred embodiment of the present invention. It should be pointed out that although the preferred embodiments of the present invention have been described, for those of ordinary skill in the art, once they know the basic creative concept of the present invention, without departing from the principle described in the present invention, several improvements and refinements can still be made, and these improvements and refinements should also be regarded as the protection scope of the present invention. Therefore, the appended claims are intended to be construed as including the preferred embodiments and all changes and modifications falling within the scope of the embodiments of the present invention.
Claims
1. A remote PLC local redundant backup system is implemented using a cloud-edge-end architecture, including a cloud, an edge, and a device; wherein: The cloud includes a cloud processing unit, the edge includes an edge processing unit, a cloud I / O interface and a local I / O interface, and the device includes at least one controlled I / O device; the cloud also includes a cloud redundancy control module, and the cloud redundancy control module is designed with an HMI interface for users to select whether to enable the redundancy function; the edge also includes an edge redundancy unit; When the redundancy function is not enabled, the cloud processing unit, the cloud I / O interface, the edge processing unit and the local I / O interface collaborate to complete the control of the I / O device; After the redundancy function is enabled, the cloud-side redundancy control module and the edge-side redundancy unit collaborate to complete the preparation work for the cloud-edge switching task after the communication link fails; thereafter, the edge-side redundancy unit performs the communication detection task. If no failure in the communication link between the cloud and the edge is detected, the cloud-side processing unit, the cloud-side I / O interface, the edge-side processing unit and the local I / O interface collaborate to complete the control of the I / O device; if a failure in the communication link between the cloud and the edge is detected, the cloud-side switching task of the I / O device from the cloud control to the edge control is performed at the edge; The cloud processing unit is provided with a status information output interface for real-time output of execution status information of the control task; The cloud redundancy control module and the edge redundancy unit cooperate to complete the preparation work for the cloud-edge switching task after the communication link failure, including: The cloud-side redundancy management and control module starts the status information acquisition task, the communication response task and the edge-side adaptation control program generation task; wherein the status information acquisition task is used to obtain the execution status information of the control task from the status information output interface, and send the obtained execution status information from the cloud to the edge-side redundancy unit in real time; the communication response task is used to send a command to the edge-side redundancy unit to start cloud-edge communication link fault detection, and after the edge-side redundancy unit receives the command to start cloud-edge communication link fault detection, it starts to execute the communication detection task to perform communication link fault detection between the cloud and the edge; the edge-side adaptation control program generation task is used to generate a corresponding control task program according to the computing power level of the edge, and send the generated control task program to the edge-side redundancy unit shown; The generating of the corresponding control task program according to the computing power level of the edge terminal includes: Evaluate the computing power level of the edge and determine whether the edge can stably run the complete control task program. If the edge can stably run the complete control task program, generate a complete control task program; otherwise, generate a simplified control task program. The complete control task program is consistent with the control task program in the cloud processing unit, while the simplified control task program is a control program that only retains the basic functions of the system operation.
2. The remote PLC local redundant backup system according to claim 1, characterized in that: The cloud processing unit, the cloud I / O interface, the edge processing unit and the local I / O interface collaborate to complete the control of the I / O device, including: The local I / O interface collects the operating information of the I / O device; the edge processing unit performs the information transmission task and uploads the operating information to the cloud I / O interface; the cloud I / O interface uploads the operating information to the cloud processing unit through the communication link between the cloud and the edge; the cloud processing unit performs the device control task, generates control instructions according to the operating information and a preset operating control program, and sends the control instructions to the cloud I / O interface; the edge processing unit performs the information transmission task and sends the control instructions to the local I / O interface; the local I / O interface sends the control instructions to the controlled I / O device to control the controlled I / O device.
3. The remote PLC local redundant backup system according to claim 1, characterized in that: The status information output interface is implemented using an inter-process communication mechanism or based on a communication protocol stack.
4. The remote PLC local redundant backup system according to claim 1, characterized in that: The communication link fault detection between the cloud and the edge is specifically: the edge redundancy unit cooperates with the cloud redundancy management and control module to perform communication link fault detection between the cloud and the edge in the form of heartbeat packets.
5. The remote PLC local redundant backup system according to claim 1, characterized in that: The specific method for generating the streamlined control task program is as follows: when engineers initially design the control task program, they specifically mark the name of the basic function program in the PLC project tree; if the edge cannot stably run the complete control task program, the basic function program in the control task program in the cloud processing unit is retained according to the specific mark and other function programs are deleted, and finally the PLC project is compiled to generate a streamlined control task program.
6. The remote PLC local redundant backup system according to claim 1, characterized in that: The cloud-edge switching task of performing I / O device control from the cloud control to the edge control at the edge is specifically: A cloud I / O interface reconfiguration solution is adopted to perform a cloud-edge switching task of I / O devices from the cloud control to the edge control at the edge; or, An edge processing unit task reconstruction scheme is adopted to perform a cloud-edge switching task of I / O devices from the cloud control to the edge control at the edge.
7. The remote PLC local redundant backup system according to claim 6, characterized in that: The cloud-side I / O interface reconfiguration solution is adopted to perform a cloud-side switching task of I / O devices from the cloud-side control to the edge-side control at the edge, including: After ensuring that the IP address of the edge-end takeover control task in the edge-end redundancy unit remains unchanged, the IP address of the edge-end takeover control task is sent in advance to the cloud I / O interface shown; When the communication response task of the edge redundant unit detects that the communication link between the cloud and the edge fails, it sends a command to the cloud I / O interface to start cloud-edge switching; after receiving the command to start cloud-edge switching, the cloud I / O interface cancels the connection with the cloud, and establishes a communication connection with the edge takeover control task of the edge redundant unit according to the IP address of the edge takeover control task; After the cloud I / O interface establishes a communication connection with the edge takeover control task of the edge redundant unit, the operation information is uploaded to the information transparent transmission task through the local I / O interface, and the information transparent transmission task sends the operation information to the edge takeover control task through the cloud I / O interface; after the edge takeover control task establishes a connection with the cloud I / O interface, the control task program and execution status information stored previously are loaded into the task container, and the operation information and execution status information are input into the operation control task program to obtain the control instruction; The control instructions generated by the edge takeover control task are sent to the information transparent transmission task through the cloud I / O interface, and the information transparent transmission task then sends the control instructions to the controlled I / O device through the local I / O interface.
8. The remote PLC local redundant backup system according to claim 6, characterized in that: The edge processing unit task reconstruction scheme is adopted to perform a cloud-edge switching task of an I / O device from the cloud control to the edge control at the edge, including: When the communication response task of the edge redundancy unit detects that the communication link between the cloud and the edge has failed, it sends a command to the idle task container in the edge processing unit to start cloud-edge switching; after receiving the command to start cloud-edge switching, the idle task container in the edge processing unit establishes a communication connection with the edge redundancy unit, reads the control task program and execution status information stored in the edge redundancy unit, and loads the read control task program and execution status information into the idle task container, and in the loaded task container, inputs the running information and execution status information into the control task program to obtain control instructions; and sends the generated control instructions to the controlled I / O device through the local I / O interface.
Citation Information
Patent Citations
Disaster recovery data processing method, device and system
CN110581782A
Automatic switching method and device for main link and standby link of edge computing gateway and storage medium
CN116232863A