This invention relates to the field of industrial
automation control and communication systems, and provides a PLC
library management method based on cloud function-driven architecture. The method includes defining PLC
control logic as
library module source files,
parsing and function-converting them into cloud functions and uploading them to a cloud function
library; dragging the target cloud function into the
business process or logic diagram, automatically identifying the corresponding function ID and generating a
queue of function execution requests to be called; receiving call requests from the
queue, determining whether there are existing cloud function instances available for scheduling; if no available instances are found, dynamically instantiating the target cloud function and performing function calculations based on an
event queue mechanism; and filtering out a set of functions to be deployed to edge devices based on the calculation results and distributing them to the edge cloud devices. By combining the PLC
library management module with cloud function-driven architecture, the basic unit of PLC
cloud computing is reduced to a function, providing finer
granularity, allowing users to directly deploy
function code, and automatically completing tasks such as
data redundancy, load balancing, regional redundancy, and log recording.