Programmable logic controller programming system with Internet of Things function
By adopting heterogeneous multi-core processors and multi-protocol communication interfaces in the PLC system, combined with task allocation and dynamic loading modules, the problems of PLC system in terms of protocol enclosure, low resource utilization and insufficient real-time performance are solved, and efficient, secure and real-time industrial control is achieved.
Patent Information
- Application Number
- CN202510365574.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-26
- Publication Date
- 2025-06-27
AI Technical Summary
The existing PLC systems are difficult to adapt to the general protocol and efficient computing needs in the Internet of Things environment because of the problems of closed protocols, low utilization of multi-core resources, high downtime and maintenance costs, slow failure recovery speed, weak security mechanisms and insufficient real-time performance.
It adopts a heterogeneous multi-core processor architecture, integrates MQTT, CoAP, and HTTP multi-protocol communication interfaces, and realizes multi-core collaboration and dynamic resource scheduling through task allocation modules and dynamic loading modules, and supports hot deployment and security verification units to ensure the real-time and security of the system.
It significantly improves the real-time and resource efficiency of the industrial control system, realizes zero downtime upgrades and fault-tolerant transmission, reduces production line maintenance costs and interruption risks, and builds full-link security protection capabilities.
Smart Images

Figure CN120215405A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of industrial automation control, and particularly to a programmable logic controller programming system with Internet of Things functions. Background Art
[0002] Existing PLC systems face multiple challenges in practical applications: The single communication protocol makes it only compatible with traditional industrial protocols such as Modbus and Profibus, and it is difficult to adapt to general protocols such as MQTT, CoAP, and HTTP in the Internet of Things scenario, significantly increasing the docking cost and compatibility obstacles with cloud platforms and edge devices; The problem of low utilization rate of multi-core resources is prominent. The rigid polling or static task allocation strategy causes load imbalance between cores. The measured multi-core utilization rate is less than 50%, resulting in serious waste of computing resources; The cost of shutdown maintenance is high. Program updates require the production line to be shut down for burning. Taking automobile manufacturing as an example, a single 1-hour shutdown results in millions of economic losses; The fault recovery speed lags behind. The traditional redundancy scheme relying on hardware devices has a switching time of ≥200 ms and lacks the ability of virtualization reconstruction, and the recovery efficiency of key control logic is low; The security mechanism is weak, and user programs lack digital signature verification; The lack of real-time performance is reflected in the time delay fluctuation of protocol conversion and task scheduling, and it is difficult to meet the strict requirements of the industrial Internet of Things for millisecond-level response (such as the robot collaborative control requires a synchronization accuracy of the order of 10 ms); These problems jointly restrict the in-depth application of PLCs in emerging scenarios such as intelligent manufacturing and smart energy;
[0003] Due to the closed nature of its protocol, the current PLC system only supports traditional industrial protocols and is difficult to adapt to general protocols in the Internet of Things environment, resulting in high cross-platform docking costs; Due to the rigid polling or static task allocation strategy, the computing power of multi-core processors is severely wasted; The production line must be shut down for maintenance during program updates, resulting in an extended fault recovery time and a lack of virtualization technology for rapid reconstruction; In addition, existing PLC systems are vulnerable to malicious tampering attacks; During protocol conversion and task scheduling, the time delay fluctuation makes it difficult to meet the strict requirements of the industrial Internet of Things for synchronization accuracy, and a programmable logic controller programming system with Internet of Things functions is also proposed. Summary of the Invention
[0004] The purpose of the present invention is to address the closed nature of the current PLC system protocol, the severe waste of the computing power of multi-core processors, the requirement of shutting down the production line for maintenance during program updates, the vulnerability of existing PLC systems to malicious tampering attacks, and the time delay fluctuation that makes it difficult to meet the strict requirements of the industrial Internet of Things for synchronization accuracy, and to propose a programmable logic controller programming system with Internet of Things functions and its system.
[0005] To achieve the above object, the present invention adopts the following technology. A programmable logic controller programming system with Internet of Things functions includes:
[0006] A main control module, based on a heterogeneous multi-core processor architecture, is used to execute user program logic and coordinate the operation of a communication module, a task allocation module, a dynamic loading module, and a security verification unit;
[0007] A communication module, integrating MQTT, CoAP, and HTTP multi-protocol communication interfaces, configures a protocol conversion engine to synchronize data interaction between a cloud platform, edge computing devices, and Internet of Things terminals;
[0008] A task allocation module, according to the real-time load status of the multi-core processor, calculates the task weights of physical cores, and allocates tasks to different physical cores according to the task weights of physical cores to optimize resource utilization;
[0009] A dynamic loading module, including a soft guardian, supports hot deployment and reconstruction of user programs, and realizes updating the PLC control logic without shutting down;
[0010] A security verification unit, uses digital signature and encryption algorithms to perform integrity verification and tampering protection on user program packages, and configures an automatic rollback mechanism to restore to the historical safe version at a preset time threshold when the verification fails.
[0011] The dynamic loading module includes:
[0012] A segmented compilation unit, used to divide the user program into multiple program blocks according to logical function modules, and each program block includes a header, a code segment, and a tail check code;
[0013] A writing information generation unit, dynamically allocates a target core number according to the characteristics of the multi-core processor architecture, and generates a writing information packet including a deployment priority and a CRC32 check code;
[0014] A redundant transmission unit, distributes program packages through a main channel and a redundant channel in a dual-way manner. When the target core does not return an ACK, the writing process is re-executed according to a preset number of retry times;
[0015] A breakpoint resume transmission unit, records the program block numbers that have been successfully written, and automatically resumes transmission from the breakpoint after a network interruption.
[0016] The redundant transmission unit performs the following operations:
[0017] If the target core does not return a confirmation instruction within the timeout window, switch to the standby physical core and re-initiate a writing request;
[0018] The load level of the standby physical core needs to meet:
[0019] L backup≤0.5×L target
[0020] wherein, L target is the target core load level, and L backup is the spare physical core load level.
[0021] The soft guarder includes:
[0022] A status monitoring subunit, which collects the running status and resource occupancy data of the virtual PLC instance in real time;
[0023] A fault decision subunit, which triggers the microkernel reconstruction process when the virtual PLC heartbeat is lost or the resources are exceeded;
[0024] A resource reservation subunit, which pre-allocates CPU and memory resources for the target microkernel at 1.2 times the historical peak resources.
[0025] The soft guarder is deployed in an independent microkernel, and is physically isolated from the microkernel where the virtual PLC is located through the isolation mechanism of the virtualized real-time operating system, ensuring that the reconstruction operation does not affect the operation of other PLC functional modules.
[0026] The dynamic weight algorithm of the task allocation module is:
[0027]
[0028] wherein, W i is the task weight of the i-th physical core, and are the CPU and memory utilization rates of the i-th physical core respectively, and α and β are weighting coefficients (default values: α = 0.6, β = 0.4, α + β = 1).
[0029] The delay constraint of the protocol conversion engine is:
[0030]
[0031] wherein, D is the total protocol conversion delay, S data is the data packet size, B min is the minimum communication bandwidth, and B min ≥10, N hops is the number of transmission hops, and T proc is the single-hop processing delay.
[0032] The CPU and memory resources pre-allocated for the target microkernel satisfy the following formula:
[0033] R reserved = γ·R peak
[0034] wherein, Rreserved Pre-allocate CPU and memory resources for the target microkernel, R peak is the historical peak resource demand, and γ is the redundancy coefficient.
[0035] The rollback mechanism of the security verification unit satisfies the following formula:
[0036] T rollback ≤T task -T verify
[0037] Where, T rollback is the maximum allowed time for the rollback operation, T task is the task cycle (range: 10ms~100ms), T verify Verification time (measured ≤ 3ms).
[0038] In summary, due to the use of the above-mentioned technology, a programmable logic controller programming system with Internet of Things function has the following beneficial effects:
[0039] 1. The Internet of Things Programmable Logic Controller (PLC) programming system of the present invention significantly improves the real-time performance and resource efficiency of industrial control systems through heterogeneous multi-core collaboration, dynamic resource scheduling and multi-protocol compatibility technology; based on the differentiated division of labor between ARM and FPGA, the master core global scheduling is combined with the slave core high real-time control to ensure millisecond-level response of key tasks, and optimize multi-core utilization through real-time load monitoring and intelligent task allocation; integrates MQTT, CoAP, HTTP and other multi-protocol interfaces, opens up heterogeneous data links between cloud platforms, edge devices and industrial terminals, and combines adaptive path optimization technology to ensure priority transmission of key instructions and enhance communication reliability in complex Internet of Things environments; the system supports hot-swap expansion and segmented hot deployment to achieve zero-downtime upgrades and fault-tolerant transmission, significantly reducing production line maintenance costs and interruption risks;
[0040] 2. Through active security defense and intelligent fault self-healing mechanism, this system has built a full-link security protection capability, using digital signatures and hash verification to intercept malicious tampering, and through microkernel-level rapid reconstruction triggered by the soft daemon to ensure millisecond-level recovery and resource isolation of abnormal modules; in scenarios such as smart manufacturing and smart energy, the system uses dynamic resource scheduling, highly reliable communication and flexible expansion characteristics to meet the needs of high-precision equipment collaborative control, rapid switching of production lines and security protection of key facilities; compared with traditional PLCs, the present invention breaks through the limitations of protocol closure, rigid resource allocation and shutdown dependence, and provides a flexible, stable and secure intelligent control core for the industrial Internet of Things, promoting the evolution of industrial automation towards efficiency, networking and high availability. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1The system block diagram of the present invention is shown. Detailed implementation manners
[0042] The programmable logic controller programming system with Internet of Things functions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0043] The Internet of Things programmable logic controller (PLC) programming system of the present invention realizes function decoupling and collaborative operation through modular design. The specific implementation manners are as follows:
[0044] The program package of the user is compiled in a segmented manner, including the following steps:
[0045] Perform static analysis on the user program, divide the code segments according to logical function modules (such as control loops, communication protocol processing, exception handling), ensure that each program block has high cohesion and low coupling; according to the characteristics of the multi-core processor architecture (such as the ARM core is suitable for logical operations, and the FPGA core is suitable for high-speed control), dynamically allocate the target core number, and generate the "deployment priority" field of the programming information packet;
[0046] The header of each program block contains the following metadata: block number: a globally unique sequential identifier (such as Block_001); version number: supports version tracing during incremental updates; target core identifier: specifies the physical core number to which this block needs to be programmed (such as Core_2); the trailing check code is generated using the CRC32 algorithm, covering the header + code segment content;
[0047] Dynamically adjust the programming order according to the real-time load status (CPU / memory utilization rate): high-priority modules (such as emergency stop logic) are preferentially deployed to low-load cores; redundant transmission strategy trigger condition: if the target core responds with a timeout (default 2×RTT), start parallel programming of the standby physical core; the programming information packet embeds a global check table, records the CRC32 values and hash tree structures of all program blocks, and supports fast integrity verification;
[0048] The main control module distributes the program package through the second communication channel, and adopts dual-channel verification: main channel: sequentially transmit the numbered program blocks; redundant channel: parallelly transmit copies of key blocks (such as system initialization code); if the target core does not return an ACK, re-execute the programming process according to the preset number of retries; record the block numbers that have been successfully programmed, and automatically resume from the breakpoint after a network interruption to avoid repeated transmissions;
[0049] After the target core receives the program block, the following operations are performed: Pre-verification: Compare the tail CRC32 with the verification table of the programming information packet; Memory staging: Write the verified code segment into the buffer; Atomic replacement: During the PLC scan cycle gap, replace the old code segment with the new one to ensure logical continuity; The soft guardian monitors the programming process. If it detects that the target core resources are overloaded (such as memory occupancy ≥ 80%), according to the formula R reserved = γ·R peak Reserve resources and trigger microkernel reconstruction;
[0050] After the system starts up, the soft guardian checks the consistency between the runtime code and the programming information packet block by block. When an anomaly occurs, it triggers a warning; If the number of verification failures exceeds the threshold (such as 3 times), according to the historical version record in the programming information packet, according to the formula T rollback ≤ T task - T verify Perform millisecond-level rollback.
[0051] A programmable logic controller programming system with Internet of Things functions includes:
[0052] A1. The main control module, which is based on a heterogeneous multi-core processor architecture; It is used to execute the user program logic and coordinate the operation of the communication module, task allocation module, dynamic loading module, and security verification unit; The main core monitors the load status (CPU utilization rate, memory occupancy rate) of each physical core in real time, and allocates tasks through a priority preemption scheduling strategy, so as to achieve multi-core dynamic coordination; It allows physical cores to be dynamically connected or removed during operation (hot plug support) to ensure system scalability.
[0053] Heterogeneous multi-core processor architecture: The main core uses an ARM processor, which is responsible for global task scheduling and protocol parsing; The slave core uses an FPGA chip to execute high-real-time control logic (such as robot motion control); Based on the differential division of labor between the ARM main core and the FPGA slave core (the main core for global scheduling and protocol parsing, the slave core for high-real-time control), the collaborative optimization of task execution efficiency and real-time performance is realized, meeting the millisecond-level response requirements in scenarios such as robot motion control; The heterogeneous architecture isolates functions at the hardware level to prevent key tasks from being interfered by non-real-time operations and ensure the stable operation of the control logic.
[0054] Dynamic coordination mechanism: The main core monitors the load status (CPU utilization rate U cpu , memory occupancy rate U men ) of each physical core in real time, and allocates tasks through a preemptive priority scheduling strategy; The main core monitors the CPU and memory load status of each physical core in real time, and dynamically allocates tasks through a preemptive priority scheduling strategy to ensure that high-real-time tasks are preferentially scheduled to low-load cores, optimizing the utilization rate of multi-core resources; The intelligent coordination mechanism effectively prevents core resource overload or idleness, and significantly improves the overall throughput of the system.
[0055] Hot-swap support: supports dynamic access or removal of physical cores during operation. For example, when expanding visual inspection cores in an automobile production line, there is no need to shut down for maintenance, which greatly reduces the cost of equipment upgrades and the risk of production line interruptions. The plug-and-play nature of the physical core enables the system to flexibly adapt to the dynamic adjustment needs of smart manufacturing production lines (such as fast switching of flexible production lines), enhancing system scalability and scenario adaptability.
[0056] By combining heterogeneous computing, dynamic scheduling and hot-swap technology, the present invention breaks through the bottleneck of rigid resource allocation and insufficient scalability of traditional PLC systems, and provides an efficient, flexible and stable control core for industrial Internet of Things scenarios.
[0057] A2. Communication module, integrating MQTT, CoAP, HTTP multi-protocol communication interfaces, and configuring protocol conversion engines to synchronize data interaction between cloud platforms, edge computing devices, and IoT terminals;
[0058] The protocol conversion engine is used to convert MQTT / CoAP messages into PLC internal instructions. The conversion delay model is:
[0059]
[0060] Where D is the total delay of protocol conversion, S data is the packet size (unit: bytes), B min is the minimum communication bandwidth (unit: Mbps), and B min ≥10, N hops is the number of transmission hops, T proc is the single-hop processing delay (unit: ms);
[0061] The system integrates multi-protocol communication interfaces such as MQTT, CoAP, and HTTP, effectively connects heterogeneous data links between cloud platforms, edge devices, and IoT terminals, eliminates the data island problem caused by the closed protocol of traditional PLC systems, and reduces the complexity of cross-platform docking; supports hybrid networking of industrial equipment, sensors, and IoT terminals, and provides a unified communication portal for scenarios such as smart manufacturing and smart energy;
[0062] The protocol conversion engine uses intelligent parsing and dynamic mapping technology to quickly convert the diverse messages of IoT terminals (such as MQTT topic messages, CoAP resource status) into PLC executable instructions, significantly reducing the protocol conversion delay and meeting the stringent real-time requirements of industrial control; by optimizing the message processing flow and memory resource allocation, it ensures stable transmission capabilities in high-concurrency data scenarios.
[0063] Dynamic path optimization: Dynamically select the optimal transmission path according to the real-time network status (bandwidth, hop count, latency), avoid the risks of network congestion or link failures, and improve the reliability of data transmission; adaptively adjust the communication strategy to ensure the priority transmission of critical control instructions (such as emergency shutdown signals), and enhance the robustness of the system in complex IoT environments.
[0064] A3. Task allocation module: Calculate the task weights of physical cores based on the real-time load status of the multi-core processor, and allocate tasks to different physical cores according to the task weights of physical cores to optimize resource utilization.
[0065] The task allocation module uses a dynamic weight algorithm to allocate tasks, which is specifically as follows:
[0066]
[0067] In the formula, W i is the dynamic weight, that is, the task weight of the i-th physical core, is the CPU utilization rate of the i-th physical core (range 0% - 100%); is the memory utilization rate of the i-th physical core (range 0% - 100%), and α and β are weighting coefficients (default values α = 0.6, β = 0.4) and α + β = 1.
[0068] Based on the real-time load status of physical cores (CPU and memory utilization rates), use a dynamic weight algorithm to allocate tasks, and preferentially schedule high-real-time tasks to low-load cores to optimize the utilization of multi-core resources; balance the requirements of compute-intensive and memory-intensive tasks through a weighting strategy to avoid local overload of core resources and improve the overall operating efficiency of the system;
[0069] Support the dynamic task migration function. When it is detected that the load of a certain physical core exceeds the preset threshold (W i ≥80), automatically and seamlessly migrate some tasks to idle cores to ensure the continuity and response real-time of critical control logic; the elastic resource pool design enhances the stability of the system in high-concurrency task scenarios and prevents performance bottlenecks caused by single-point overload;
[0070] Combined with the heterogeneous characteristics of the multi-core processor, dynamically adjust the task allocation strategy to flexibly adapt to the diverse requirements of complex industrial scenarios (such as robot collaborative control, large-scale data acquisition, etc.); by continuously optimizing the load distribution between cores, reduce the latency fluctuation of task execution, and meet the stringent requirements of industrial IoT for high-precision synchronous control.
[0071] A4. Dynamic loading module, including a soft guardian, supports the hot deployment and reconstruction of user programs, and realizes the update of PLC control logic without downtime;
[0072] The dynamic loading module includes:
[0073] A segmented compilation unit, which divides a user program into multiple program blocks according to logical function modules. Each block includes a header (block number, version number), a code segment, and a CRC32 tail check code;
[0074] A programming information generation unit, which dynamically allocates a target core number according to the characteristics of the multi-core processor architecture and generates a programming information packet containing a deployment priority and a CRC32 check code; thus supporting the segmented compilation and on-demand loading of user programs. Only local logic modules (such as optimized control algorithms) need to be updated, avoiding the time delay and resource consumption caused by full-program transmission, and realizing seamless upgrade under the continuous operation state of the production line;
[0075] A redundant transmission unit, which distributes program packets through both a main channel and a redundant channel. When the target core does not return an ACK, the programming process is re-executed according to a preset number of retries; the redundant transmission unit performs the following operations:
[0076] If the target core does not return a confirmation instruction within the timeout window, switch to the standby physical core and re-initiate a programming request;
[0077] The load level of the standby physical core needs to meet:
[0078] L backup ≤0.5×L target
[0079] where L target is the load level of the target core, and L backup is the load level of the standby physical core.
[0080] A breakpoint resumption unit, which records the program block numbers that have been successfully programmed and automatically resumes transmission from the breakpoint after a network interruption.
[0081] Thus, it realizes the parallel distribution of program packets through the main-redundant dual channels. When the target core responds abnormally, it automatically switches to the standby physical core with a low load for retransmission, effectively coping with network fluctuations or instantaneous hardware failures, and significantly improving the programming success rate; the breakpoint resumption function automatically resumes transmission after a network interruption, avoiding resource waste and time loss caused by repeated transmission.
[0082] The soft guard includes:
[0083] A status monitoring subunit, which collects the running status and resource occupancy data of the virtual PLC instance in real time;
[0084] A fault decision subunit, which triggers the microkernel reconstruction process when detecting the loss of the virtual PLC heartbeat or resource overrun;
[0085] The resource reservation subunit pre-allocates CPU and memory resources for the target microkernel at 1.2 times the historical peak resources. The CPU and memory resources pre-allocated for the target microkernel satisfy the following formula:
[0086] R reserved =γ·R peak
[0087] In the formula, R reserved is the CPU and memory resources pre-allocated for the target microkernel, R peak is the historical peak resource requirement, and γ is the redundancy coefficient (γ≥1.2);
[0088] The soft guardian is deployed in an independent microkernel and physically isolates the virtual PLC from the microkernel where it is located through the isolation mechanism of the virtual real-time operating system, ensuring that the reconstruction operation does not affect the operation of other PLC function modules.
[0089] The soft guardian monitors the running status of the virtual PLC instance in real time. When a heartbeat loss or resource overlimit is detected, it triggers a microkernel-level rapid reconstruction to ensure the continuous availability of critical control logic; through the physical resource isolation of the virtual real-time operating system, it blocks the interference of faulty modules to other functions and guarantees the overall stability of the system; based on the dynamic reservation strategy of historical resource requirements, it pre-allocates sufficient computing resources for the reconstruction operation to prevent secondary failures caused by resource contention.
[0090] The present invention breaks through the limitations of traditional PLC systems that rely on shutdown maintenance and hardware redundancy, realizes the high efficiency of program update, the robustness of the transmission process, and the autonomy of fault recovery, and provides the industrial scenario with the ability to provide continuous online and highly available control services.
[0091] A5. The security verification unit uses digital signatures and encryption algorithms to verify the integrity of the user program package and prevent tampering, and configures an automatic rollback mechanism to restore to the historical safe version at a preset time threshold when the verification fails.
[0092] Digital signature verification: Sign the program package using the RSA-2048 algorithm and generate a hash value using SHA-256;
[0093] Verification formula:
[0094] In the formula, Code is the user program code or data content to be verified (such as PLC control logic, configuration parameters, etc.); Sig is the digital signature, which is encrypted by the sender using the RSA-2048 private key for SHA256(Code); Sig decryptedThe data obtained by the recipient after decrypting the signature Sig using the RSA-2048 public key should theoretically be the original hash value SHA256(Code); V is the verification result, through exclusive OR operation Compare the consistency of the two hash values;
[0095] If V = 0, determine that the program is legal.
[0096] Adopt an automatic rollback mechanism:
[0097] The security verification unit triggers the automatic rollback mechanism when the verification fails, and the rollback time threshold satisfies:
[0098] T rollback ≤T task -T verify
[0099] In the formula, T rollback is the rollback time threshold, T task is the task cycle, T verify is the verification time consumption.
[0100] Trusted source verification: Perform digital signature verification on the user program package to prevent unauthorized code injection.
[0101] Exceptional fast rollback: When program tampering or abnormal operation is detected, automatically switch to the historical safe version to ensure system continuity; Application scenario: In the power dispatching system, intercept maliciously forged dispatching instructions and restore to the legal control logic within milliseconds.
[0102] Adopt digital signature and hash verification technologies to perform source trustworthiness verification and integrity protection on the user program package, effectively intercept unauthorized malicious code injection, and prevent industrial control logic from being tampered with or backdoor programs from being implanted; Based on the signature mechanism of the asymmetric encryption algorithm, ensure the full-link trustworthiness of the program update process, and meet the high standards of data security requirements for industrial control systems;
[0103] When program tampering or abnormal operation is detected, automatically trigger the millisecond-level rollback mechanism, seamlessly switch to the historical safe version, minimize the system service interruption time, and ensure the continuous and stable operation of the production line; The rollback operation is strictly synchronized with the task cycle to avoid timing confusion problems introduced by the recovery process, and ensure the continuity and accuracy of the control logic;
[0104] In scenarios with extremely high security requirements such as power dispatching and traffic signal control, intercept forged instructions or abnormal operations in real time, quickly restore to the legal control logic, and effectively prevent the risk of large-scale system paralysis; Through multi-level security verification and autonomous recovery mechanisms, significantly reduce the operation and maintenance costs and business losses caused by cyber attacks or accidental failures.
[0105] As described above, it is only the preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention, according to the technical concept of the present invention, makes equivalent substitutions or changes, and all should be covered within the protection scope of the present invention.
Claims
1. A programmable logic controller programming system with Internet of Things function, characterized in that: include: The main control module, based on a heterogeneous multi-core processor architecture, is used to execute user program logic and coordinate the operation of the communication module, task allocation module, dynamic loading module, and security verification unit; The communication module integrates MQTT, CoAP, and HTTP multi-protocol communication interfaces, and configures a protocol conversion engine to synchronize data interactions between cloud platforms, edge computing devices, and IoT terminals; The task allocation module calculates the task weight of the physical core according to the real-time load status of the multi-core processor, and allocates tasks to different physical cores according to the task weight of the physical core to optimize resource utilization; Dynamic loading modules, including soft daemons, support hot deployment and reconstruction of user programs, and update PLC control logic without stopping the machine; The security verification unit uses digital signatures and encryption algorithms to verify the integrity and tamper protection of user program packages, and configures an automatic rollback mechanism to restore to the historical security version according to the preset time threshold when verification fails.
2. According to the programmable logic controller programming system with Internet of Things function as claimed in claim 1, it is characterized in that: The dynamic loading module includes: The segmented compilation unit is used to divide the user program into multiple program blocks according to the logical function modules. Each program block contains a header, a code segment and a tail check code. The burning information generation unit dynamically allocates the target core number according to the characteristics of the multi-core processor architecture, and generates a burning information package including the deployment priority and the CRC32 check code; The redundant transmission unit distributes the program package through the main channel and the redundant channel. When the target core does not return an ACK, the programming process is re-executed according to the preset number of retries; The breakpoint resume unit records the program block number that has been successfully burned and automatically resumes the transmission from the breakpoint after the network is interrupted.
3. A programmable logic controller programming system with Internet of Things function according to claim 2, characterized in that: The redundant transmission unit performs the following operations: If the target core does not return a confirmation command within the timeout window, switch to the backup physical core and re-initiate the programming request; The load level of the standby physical core must meet the following requirements: Lbackup≤0.5×Ltarget Where Ltarget is the target core load level, and Lbackup is the backup physical core load level.
4. The programmable logic controller programming system with Internet of Things function according to claim 1, characterized in that: The soft guardian comprises: The status monitoring subunit collects the operating status and resource usage data of the virtual PLC instance in real time; The fault decision subunit triggers the microkernel reconstruction process when it detects that the virtual PLC heartbeat is lost or the resources are exceeded; The resource reservation subunit pre-allocates CPU and memory resources for the target microkernel at 1.2 times the historical peak resources.
5. The programmable logic controller programming system with Internet of Things function according to claim 4 is characterized in that: The soft daemon is deployed in an independent microkernel, and isolates physical resources from the microkernel where the virtual PLC is located through the isolation mechanism of the virtualized real-time operating system, ensuring that the reconstruction operation does not affect the operation of other PLC functional modules.
6. The programmable logic controller programming system with Internet of Things function according to claim 1, characterized in that: The dynamic weight algorithm of the task allocation module is: Where Wi is the task weight of the ith physical core, and are the CPU and memory utilization of the ith physical core, α and β are weighting coefficients.
7. The programmable logic controller programming system with Internet of Things function according to claim 1, characterized in that: The delay constraint of the protocol conversion engine is: Where D is the total delay of protocol conversion, Sdata is the data packet size, Bmin is the minimum communication bandwidth, and B min ≥10, N hops is the number of transmission hops, T proc This is the single-hop processing delay.
8. The programmable logic controller programming system with Internet of Things function according to claim 4, characterized in that: The target microkernel pre-allocates CPU and memory resources to satisfy the following formula: Rreserved=γ·Rpeak Where Rreserved is the pre-allocated CPU and memory resources of the target microkernel, Rpeak is the historical peak resource demand, and γ is the redundancy coefficient.
9. The programmable logic controller programming system with Internet of Things function according to claim 1, characterized in that: The rollback mechanism of the security verification unit satisfies the following formula: Trollback ≤ Ttask - Tverify Where Trollback is the maximum allowed time for the rollback operation, Ttask is the task cycle, and Tverify is the verification time.
Citation Information
Cited By
Hot update control method and system for industrial PLC (Programmable Logic Controller) of microkernel operating system
CN121092201A
Microkernel operating system industrial controller plc hot update control method and system
CN121092201B
Universal control system and method based on cloud soft correlation compensation
CN121585659A
A numerical control ethercat master station bandwidth adaptive scheduling and link fault bypass control system and method
CN122640271A
