A factory control method based on internet of things

By employing Markov modal modeling and security detection fusion in the IoT factory control system, adaptive compensation for network latency, packet loss, and quantization errors and smooth integration of security detection are achieved. This solves the problems of system instability and loss of control in existing technologies and realizes a dynamic trade-off between stability and security.

CN123029892APending Publication Date: 2026-11-03SHENYANG JIAXU TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611250048.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-18
Publication Date
2026-11-03

AI Technical Summary

Technical Problem

In IoT-based factory closed-loop control systems, existing technologies fail to effectively handle the coupled dynamic changes of network latency, packet loss, and quantization errors, resulting in the inability of control laws to compensate in real time. Furthermore, the lack of safety detection delays in the control loop design may lead to system instability or loss of control.

Method used

By mapping network latency, packet loss, and quantization error to Markov modes, iteratively solving the local algebraic Riccati equation and interpolating the gain scheduling table, the controller's adaptive gain reconstruction is achieved. Combined with the security detection results, the gain is smoothly fused to form a comprehensive feedback gain matrix, ensuring the control's real-time performance and safety.

Benefits of technology

It achieves adaptive control under dynamic changes in network status and security threats, reduces the risk of system oscillation, ensures the stability and anti-delay robustness of the controlled object, and achieves a dynamic trade-off between real-time control and network security protection redundancy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123029892A_ABST
    Figure CN123029892A_ABST
Patent Text Reader

Abstract

The application discloses a kind of factory control method based on Internet of Things, the present application relates to industrial control system technical field, the method according to the time delay, packet loss and quantization error generated by network transmission determines the Markov mode where controlled object is located, gain scheduling interpolation is carried out by solving algebra riccati equation on line, obtain network adaptive gain matrix, bypass detection is carried out to industrial internet control message, and abnormal confidence score is obtained, according to this, normal mode and security degradation mode gain matrix are smoothly fused, and security fusion gain matrix is obtained, two kinds of gain matrix are weighted and summed to obtain comprehensive feedback gain matrix and generate control instruction, the present application can realize the dynamic trade-off of control real-time and security protection redundancy when network uncertainty and security risk dynamic change, guarantee controlled object stable operation, applicable to industrial internet factory closed-loop control scene.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of industrial control system, in particular to a factory control method based on Internet of Things. BACKGROUND

[0002] With the rapid development of industrial internet technology, the factory control architecture is evolving from the traditional closed centralized control to the network control system based on the three-layer architecture of cloud, edge and end. In such a system, the process variables collected by the field sensors are packaged into network packets by the industrial internet gateway, transmitted to the edge or cloud controller through wired or wireless channels, and the controller calculates the control instructions and then returns them to the actuators through the network to complete the closed-loop control. Due to the limited bandwidth of the Internet of Things and the highly dynamic changes in the load, network-induced time-varying delay, random packet loss and dynamic quantization errors caused by heterogeneous device access will inevitably occur during the transmission of control instructions and feedback data. At the same time, the deep integration of information technology and operation technology exposes the industrial control network to the security risks of traditional information technology networks. Security protection components such as firewalls and intrusion detection systems are gradually introduced into the industrial control field to identify and prevent network attack behaviors against the factory control system.

[0003] In the prior art closest to the present application, the network-induced time delay is usually modeled as a deterministic short delay with a known upper bound or a random variable subject to a certain prior distribution during the system design phase, and the packet loss process is modeled as a binary process subject to a Bernoulli distribution. On this basis, Lyapunov functions are constructed offline and a set of fixed linear matrix inequalities are solved to obtain a set of static robust state feedback gain matrices. The gain matrix remains unchanged during system operation and does not adjust with the changes in the actual network state. On the other hand, the security protection component usually operates as a bypass module independent of the control loop and only detects and alarms the network traffic. The detection results do not participate in the calculation and adjustment of the control law, and the processing and forwarding delay introduced by the security detection is considered as additional overhead outside the control loop and is not considered in the robustness design of the controller.

[0004] The aforementioned existing technical solutions have the following drawbacks: First, because existing solutions treat latency and packet loss as independent deterministic or simple probabilistic models, they do not consider the coupled dynamic changes of these three factors in the actual industrial IoT environment. Therefore, when the actual network state deviates from the fixed distribution assumed in the design phase, such as the combined abnormal condition of simultaneous long latency bursts and continuous packet loss, the fixed gain matrix obtained by offline solution cannot match the current actual network state. Consequently, the control law cannot compensate for uncertainties in real time, ultimately leading to the risk of oscillation or even instability of the controlled object. Second, because existing safety protection components operate independently of the control loop, their detection results do not participate in the adjustment of the control law. Therefore, once a complex security detection mechanism is enabled in a critical closed-loop control link, the computation and forwarding delay introduced by the security detection will be directly added to the round-trip delay of the control loop. The controller still operates with the original fixed gain and does not make any robust compensation for the additional delay, which leads to a sharp drop in the performance of the control system. Under network attacks or high-intensity network probing, it may even cause the controlled physical object to lose control. It can be seen that the existing technology has failed to achieve a deep integration of online network uncertainty compensation capability and security detection capability in the closed-loop control loop, and it is difficult to ensure the real-time control while taking into account the redundancy of network security protection. To this end, we propose a factory control method based on the Internet of Things. Summary of the Invention

[0005] The purpose of this invention is to provide a factory control method based on the Internet of Things.

[0006] The technical problem to be solved by this invention is: in a factory closed-loop control system built on the Internet of Things, how to achieve online adaptive reconfiguration of controller gain under the dynamic coupling of three uncertainties of network latency, packet loss and quantization error, and how to deeply integrate security detection capability with real-time closed-loop control of the factory, so that when the system suffers network attacks or high-intensity network probing causes additional delays introduced by security detection, the controlled object can still be guaranteed not to become unstable or collapse, and a dynamic trade-off between control real-time performance and network security protection redundancy can be achieved.

[0007] To address the aforementioned technical problems, this invention provides an IoT-based factory control method, applied to an IoT factory control system including field sensors, field actuators, and edge controllers. The method first acquires the actual transmission delay, packet loss status, and feedback data quantization error generated during the transmission of process variable data collected by field sensors to the edge controller via the industrial IoT. Based on these three types of uncertainties, the Markov mode of the current control cycle is jointly determined. For the current Markov mode, a search is performed in a preset gain scheduling table to check if a corresponding state feedback gain matrix obtained by solving the algebraic Licati equation already exists. If not, the gain matrix corresponding to the neighboring mode is used as the initial value, and the local algebraic Licati equation corresponding to that mode is iteratively solved to obtain the state feedback gain matrix corresponding to that mode. When the actual network state is in a transitional state between two adjacent preset modes, based on the current... The distance between the current network state feature vector and the adjacent preset modal feature vectors determines the convex combination coefficients, and convex combination interpolation is performed on the adjacent modal gain matrices accordingly to obtain the network adaptive gain matrix. Simultaneously, the method performs bypass deep packet inspection on industrial IoT control messages passing through the edge gateway, extracting features such as abnormal message frequency, abnormal load characteristics, and abnormal address access patterns, and calculating an anomaly confidence score. The smoothing switching coefficient is calculated based on the difference between this anomaly confidence score and a preset switching threshold, and a weighted fusion of the preset normal mode state feedback gain matrix and the safety degradation mode state feedback gain matrix is ​​performed to obtain the safety fusion gain matrix. Finally, the network adaptive gain matrix and the safety fusion gain matrix are weighted and summed to obtain the comprehensive feedback gain matrix. The control command is then calculated by combining the system state vector of the current control cycle and output to the field actuator to complete closed-loop control.

[0008] Compared with the prior art, the beneficial effects of the present invention by adopting the above technical solution are as follows:

[0009] 1. This invention maps the triple uncertainties of time delay, packet loss, and quantization error into Markov jump system modes, and performs online iterative solution of local algebraic Riccati equations and gain scheduling table interpolation, enabling the controller to adaptively adjust the feedback gain according to the dynamic changes of the network state. This achieves disturbance-free adaptive control under dynamic network topology, significantly reduces the risk of system oscillation and instability, and overcomes the defect of the fixed gain matrix in the prior art that cannot match the real-time network state.

[0010] 2. This invention uses the abnormal confidence score of the security detection output as the feedforward disturbance input variable to drive the control law to smoothly switch between normal mode and security degradation mode. This enables the system to automatically tend towards higher anti-latency and anti-disturbance robustness margin when detecting potential network attack characteristics, thereby ensuring that the controlled physical object does not go out of control and collapse when subjected to network attacks or high-intensity probing. This overcomes the defect in the prior art that the security detection delay is not included in the robustness design consideration of the controller.

[0011] 3. By imposing dwell time constraints on the safety mode switching process, this invention avoids system instability caused by frequent fluctuations in the switching coefficient near the threshold, further ensuring the stability of the overall closed-loop system during the switching process. In summary, this invention realizes an overall control architecture in which the network uncertainty adaptive compensation branch and the security event-driven degradation branch are independent yet synergistically integrated, achieving a dynamic trade-off between control real-time performance and network security protection redundancy. Attached Figure Description

[0012] Fig. 1 This is a schematic diagram of the overall control flow in an embodiment of the present invention;

[0013] Fig. 2 This is a schematic diagram of the network adaptive gain solution sub-process in an embodiment of the present invention;

[0014] Fig. 3 This is a schematic diagram of the smooth switching sub-process for security degradation in an embodiment of the present invention. Detailed Implementation

[0015] The following is in conjunction with the appendix Figs. 1-3 The specific embodiments of the present invention will be further described below. It should be noted that the description of these embodiments is for the purpose of helping to understand the present invention, but does not constitute a limitation of the present invention.

[0016] Furthermore, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0017] I. System Overall Architecture:

[0018] The IoT-based factory control method described in this embodiment is implemented using a three-layer architecture of cloud, edge, and terminal. The terminal layer consists of field sensor groups and field actuator groups deployed at the factory site, used to collect process variables and execute control commands respectively. The edge layer consists of industrial IoT gateways and edge controllers deployed at the factory site, used to complete the core computing processing for local closed-loop control. The cloud layer is a supervisory monitoring and parameter distribution platform, used for storing historical data, remotely updating model parameters, and displaying human-machine interaction. The process variable data collected by the field sensor groups is encapsulated by the industrial IoT gateway and transmitted to the edge controller via industrial IoT uplink that supports time-sensitive networking or OPC UA protocol. After the edge controller completes the adaptive gain reconstruction and security degradation fusion calculation described in this invention, it transmits the output control commands downlink to the field actuator group via the same network to complete the closed-loop control of one control cycle. The core adaptive control logic and security degradation logic are both implemented inside the edge controller to ensure the low latency characteristics of local closed-loop processing and avoid introducing additional network round-trip latency due to reliance on cloud computing.

[0019] The edge controller is functionally divided into a network state awareness module, a Markov mode online estimation module, an adaptive gain reconstruction module, a multimodal feedback matrix set storage unit, a security detection module, a security degradation decision and smooth switching module, and a control law output module. Among them, the network state awareness module, the Markov mode online estimation module, and the adaptive gain reconstruction module together constitute the network uncertainty compensation branch, and the security detection module and the security degradation decision and smooth switching module together constitute the security event-driven degradation branch. The two branches independently complete their respective gain calculations, and their calculation results are collaboratively fused in the control law output module to jointly determine the final control command acting on the actuator.

[0020] II. Network State Awareness and Markov Jump System Modeling:

[0021] Within each control cycle, the edge controller parses the timestamp and sequence number of received packets to obtain the actual transmission delay, whether packet loss occurred, and the quantization error level of the feedback data for the current cycle. It then jointly maps these three types of uncertainty to a specific mode within a finite set of modes, denoted as . ,in For discrete control cycle number, in a specific embodiment, the transmission delay can be pre-divided into several intervals, such as low delay interval, medium delay interval and high delay interval, the packet loss state can be divided into two cases: no packet loss and packet loss, the quantization error can be divided into two levels: low quantization error and high quantization error, and the combination of the above three dimensions can be mapped into a total of six Markov modes, each corresponding to different network quality conditions. Those skilled in the art can adjust the granularity of mode division according to the actual factory network conditions and control accuracy requirements, and the number of modes is not limited to this specific value.

[0022] The dynamic equation model of the controlled object under network uncertainty is as follows: a Markov jump system:

[0023] ;

[0024] in, Indicates the first The state vector of a system in one control cycle Indicates the first The control quantity output by the controller in each control cycle and These are the corresponding modes. The state transition matrix and input matrix are given, and different modes correspond to different combinations of time delay intervals, packet loss states, and quantization error levels. This is a bounded external disturbance vector, used to characterize the impact of disturbance factors other than the modeled uncertainties on the controlled object. Belongs to set , for Markov mode labels, Given the predefined total number of modes, the transition rules between modes are determined by the transition probability matrix. Description, in which The modality is represented by Jump to The edge controller updates the row elements related to the current mode in the transition probability matrix online based on the statistical frequency of mode transitions in the most recent control cycles. This allows the transition probability estimation to continuously reflect the recent trend of network quality changes, rather than being limited to the fixed distribution assumed in the system design phase.

[0025] III. Online Adaptive Gain Reconstruction:

[0026] For the Markov transition system model described above, the edge controller, during the system startup phase, performs a pre-defined... There are 1 network state modes, and the nominal state transition matrix for each mode is pre-set offline. Nominal input matrix (in ), state weighting matrix and control weighting matrix Based on this, an initial gain scheduling table is constructed. At the beginning of each control cycle, the edge controller determines the Markov mode at the current moment in the aforementioned manner. Then, for this mode, the gain scheduling table is searched to see if a pre-defined convergent solution already exists. If not, or if the current network parameters deviate significantly from the existing polyhedral vertices, the gain matrix of the neighboring vertices is used as the initial value for iteration, and the following local algebraic Riccati equation corresponding to this mode is solved through a finite number of iterations:

[0027] ;

[0028] in, For modality The corresponding positive definite symmetric matrix to be solved, superscript Indicates matrix transpose, superscript This indicates matrix inversion; the remaining symbols have the same meaning as before, based on the obtained matrix. Calculate the modes as follows The corresponding state feedback gain matrix:

[0029] ;

[0030] By adopting the method of iterative local algebraic Riccati equations combined with gain scheduling table interpolation, compared with the traditional method of solving a set of fixed linear matrix inequalities offline, the huge computing power required for unified offline optimization of all working conditions is avoided, so that the gain reconstruction process can be completed online under the limited computing power of the edge controller.

[0031] When the actual network parameters are in a transitional state between two adjacent preset modes, the edge controller uses a convex combination method within the vertices of a local polyhedron to interpolate the gain matrices of adjacent modes, obtaining a smoothly transitioning adaptive gain matrix for the network.

[0032] ;

[0033] in, For the first The convex combination coefficients corresponding to each vertex satisfy the following condition: ,and Its value is determined by the distance normalization between the current network state feature vector and the feature vectors of each vertex. The closer the vertex is, the larger the convex combination coefficient it corresponds to. The edge controller will then use the newly obtained coefficients... and Write the data into the gain scheduling table so that subsequent control cycles can directly look up and reuse the data when encountering the same or similar modes, thereby further reducing the overhead of repeated calculations.

[0034] IV. Security event-driven closed-loop control redundancy degradation:

[0035] To address the structural contradiction between the latency introduced by security detection and the real-time nature of control, this implementation deploys a lightweight security detection module within the edge controller. This module performs bypass deep packet inspection on industrial IoT control messages passing through the industrial IoT gateway. The inspection process is performed in a bypass mirroring manner, without occupying or blocking the forwarding path of normal control messages. The security detection module extracts features such as abnormal message frequency, abnormal payload characteristics, and abnormal address access patterns, and calculates the anomaly confidence score for the current control cycle using a pre-built lightweight discriminant model. Its value range is an interval The closer the score is to 1, the higher the likelihood of being under cyberattack or being subjected to unusual probing.

[0036] The edge controller internally designs and stores two sets of state feedback gain matrices with different robust performance metrics in advance, which are denoted as normal mode gain. Gain with security degradation mode The sampling period corresponding to the security degradation mode gain is longer than that corresponding to the normal mode gain, and its transient performance indicators are relatively more lenient. However, its robustness margin to delay and external disturbances is significantly higher than that of the normal mode gain, based on the anomaly confidence score. The switching coefficient is calculated using the following smooth switching function:

[0037] ;

[0038] in, For the range of values ​​to be in the interval Smooth switching coefficients between them This is a preset switching steepness parameter; the larger the value, the closer the switching transition is to a step-like hard switch. The preset threshold for switching anomaly confidence levels. As a natural constant, the switching coefficient is weighted and fused with the aforementioned two sets of gain matrices to obtain the safety fused gain matrix that is actually effective in the current control cycle:

[0039] ;

[0040] To avoid system instability caused by frequent fluctuations in the switching coefficients near the abnormal confidence threshold, the edge controller verifies the time interval between two adjacent mode switches. If the time interval is less than a preset dwell time threshold, the current safe fusion gain matrix remains unchanged until the time interval reaches the preset dwell time threshold, at which point the switching coefficients are allowed to continue evolving. The theoretical stability of this dwell time constraint is guaranteed by the theory of multi-dwell time switching systems, thus ensuring both timely response and overall closed-loop system stability during the safe mode switching process.

[0041] V. Coordinated Determination of Network Adaptive Gain and Security Fusion Gain:

[0042] The network adaptive gain matrix output by the network uncertainty compensation branch Security fusion gain matrix with security event-driven degradation branch output The weighted summation is performed according to preset weighting coefficients. Since the two branches independently respond to two non-overlapping dynamic coupled disturbance sources—network performance uncertainty and network security risk—if only a hard switching method is used to select one of them, the control law will oscillate between two extreme gains when network degradation and security risks occur simultaneously. However, the weighted fusion mechanism of this invention ensures that the comprehensive feedback gain matrix retains the robust margin components of both types of compensation capabilities at any given time. Thus, even under the combined conditions of network uncertainty and security risks, the closed-loop stability of the controlled object can still be maintained. This synergistic effect is not a simple superposition of the capabilities of the two branches or a conventional combination that is easily conceived by those skilled in the art. The comprehensive feedback gain matrix actually used to calculate the control command in the current control cycle is obtained as follows:

[0043] ;

[0044] in, The preset weighting coefficients take values ​​within a range. The real number within the matrix is ​​used to allocate the relative contributions of the network uncertainty compensation branch and the security degradation compensation branch in the integrated feedback gain matrix. It can be preset according to the stability margin requirements of the controlled object. In one specific embodiment, it can be set to 0.5, meaning the contributions of the two branches are roughly equal. Those skilled in the art can also preset other values ​​based on the relative sensitivity of the actual factory controlled object to network performance fluctuations and network security risks. The edge controller will then integrate the feedback gain matrix... Substitute into the control law It calculates and outputs the control command for the current control cycle, applies it to the field actuator to complete the closed-loop control, and then returns to the network status real-time acquisition stage to process the relevant calculations for the next control cycle.

[0045] The overall architecture of network uncertainty compensation branch and security event-driven degradation branch is independent yet synergistic. This allows the two branches to be designed and optimized specifically for their respective sources of uncertainty, avoiding the modeling complexity caused by coupling network performance fluctuations and network security risks in the same gain solution framework. At the same time, the weighted fusion method of comprehensive feedback gain matrix ensures that the two types of compensation capabilities play a role in the final control law.

[0046] VI. Specific Application Examples:

[0047] Taking the closed-loop control scenario of temperature and pressure in an injection molding equipment in a factory as an example, the specific implementation process of this invention is explained. A field sensor group collects process variables such as melt temperature and cavity pressure in real time. After being encapsulated by an industrial IoT gateway, the data is transmitted uplink to an edge controller deployed in the workshop. The edge controller pre-divides the network state into six Markov modes, covering typical operating condition combinations such as low latency and low packet loss, medium latency and low packet loss, high latency and low packet loss, low latency and high packet loss, medium latency and high packet loss, and high latency and high packet loss. For each mode, a nominal state transition matrix and input matrix are pre-set offline. During system operation, the edge controller parses the message timestamp and sequence number in each control cycle to determine the current mode and iteratively solves the local algebraic Riccati equation to obtain a network adaptive gain matrix matching the current network condition. Simultaneously, a safety detection mode... The block performs bypass detection on control messages passing through the gateway. Under normal production conditions, the abnormal confidence score is at a low level, the switching coefficient is close to 0, and the security fusion gain matrix is ​​close to the normal mode gain. When suspected network attack characteristics are detected, the abnormal confidence score gradually increases and exceeds the preset switching threshold, the switching coefficient gradually approaches 1, and the security fusion gain matrix gradually transitions to the security degradation mode gain. The controller automatically increases the sampling period and relaxes the transient performance index to improve the robustness margin to delays and disturbances, and avoids the additional delay caused by network attacks that may cause severe temperature or pressure fluctuations or even equipment failure. The calculation results of the above two branches are weighted and summed according to the preset weighting coefficients to obtain the comprehensive feedback gain matrix and generate the final control command, which is applied to the heating and pressure regulating actuators to achieve stable closed-loop control of melt temperature and cavity pressure.

[0048] VII. Alternative Implementation Methods:

[0049] In the network state perception and pattern recognition stage, as an alternative implementation method, the mode division method based on Markov transition system can be abandoned. Instead, a delay and packet loss sequence prediction model based on recurrent neural network or long short-term memory network can be used. By rolling the prediction of historical network state time series, the predicted delay and packet loss probability of the next control cycle can be directly output, and the control gain can be adjusted online accordingly. This replaces the Markov mode transition mechanism based on the transition probability matrix. The other gain fusion and security degradation processing methods remain unchanged.

[0050] In the safety degradation handover phase, as an alternative implementation method, instead of using the smooth handover coefficient calculation method based on logic functions, a handover strategy based on multiple candidate control modes and multiple Lyapunov functions can be used. That is, several sets of fixed feedback gain matrices corresponding to different safety levels are pre-designed. When the abnormal confidence score crosses a preset threshold, the system directly switches to the fixed gain matrix of the corresponding level. The stability of the overall handover process is proved by the energy non-incremental property of multiple Lyapunov functions at the handover point. This replaces the continuous fusion handover mechanism based on smooth handover functions and dwell time constraints.

[0051] Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of the present invention. Therefore, any modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention shall fall within the protection scope defined by the claims of the present invention.

Claims

1. A factory control method based on the Internet of Things (IoT), applied in an IoT factory control system including field sensors, field actuators, an industrial IoT gateway, and an edge controller, wherein process variable data collected by the field sensors is encapsulated by the industrial IoT gateway and transmitted, the method comprising: The actual transmission delay, packet loss status, and feedback data quantization error generated during the transmission of process variable data collected by the field sensors to the edge controller via the Industrial Internet of Things are obtained. The feature is that it further includes: determining the Markov mode of the current control cycle based on the actual transmission delay, the packet loss status and the feedback data quantization error, wherein the Markov mode is used to characterize the mode of the state transition matrix and input matrix in the dynamic equation of the controlled object under the influence of network uncertainty; For the Markov mode in which the current control cycle is located, search in the preset gain scheduling table for a state feedback gain matrix that corresponds to the Markov mode and is obtained by solving the algebraic Licati equation. If it does not exist, the state feedback gain matrix corresponding to the adjacent preset Markov mode is used as the initial value, and the local algebraic Riccati equation corresponding to the Markov mode is solved iteratively to obtain the state feedback gain matrix corresponding to the Markov mode, and it is written into the gain scheduling table. When the network state of the current control cycle is in a transitional state between two adjacent preset Markov modes, the convex combination coefficients corresponding to each adjacent preset Markov mode are determined based on the distance between the current network state feature vector and the corresponding feature vectors of each adjacent preset Markov mode. The state feedback gain matrix corresponding to the adjacent preset Markov mode is then subjected to convex combination interpolation based on the convex combination coefficients to obtain the network adaptive gain matrix. Bypass deep packet inspection is performed on the industrial IoT control messages passing through the industrial IoT gateway to extract abnormal message frequency features, abnormal load features, and abnormal address access patterns. Based on these features, the abnormal confidence score for the current control cycle is calculated. The smoothing switching coefficient is calculated based on the difference between the abnormal confidence score and the preset abnormal confidence switching threshold. Based on the smooth switching coefficient, the preset normal mode state feedback gain matrix and the security degradation mode state feedback gain matrix are weighted and fused to obtain a security fusion gain matrix, wherein the sampling period corresponding to the security degradation mode state feedback gain matrix is ​​longer than the sampling period corresponding to the normal mode state feedback gain matrix. The integrated feedback gain matrix is ​​determined based on the network adaptive gain matrix and the security fusion gain matrix. Based on the integrated feedback gain matrix and the system state vector of the current control cycle, the control command for the current control cycle is calculated and output to the field actuator.

2. The factory control method based on the Internet of Things according to claim 1, characterized in that, Also includes: Based on the jump statistics frequency of the Markov mode within the most recent preset number of control cycles, the row elements in the transition probability matrix that describes the jump rules between the Markov modes are updated online to be related to the Markov mode in the current control cycle.

3. The factory control method based on the Internet of Things according to claim 1, characterized in that: The iterative solution of the local algebraic Licati equation corresponding to the Markov mode includes: based on the nominal state transition matrix, nominal input matrix, preset state weighting matrix and preset control weighting matrix corresponding to the Markov mode, performing a finite number of iterative solutions to the local algebraic Licati equation to obtain the positive definite symmetric matrix corresponding to the Markov mode. The state feedback gain matrix corresponding to the Markov mode is calculated based on the positive definite symmetric matrix, the nominal state transition matrix, the nominal input matrix, and the preset control weighting matrix.

4. The factory control method based on the Internet of Things according to claim 1, characterized in that: The convex combination coefficients corresponding to each adjacent preset Markov mode are all non-negative, and the sum of the convex combination coefficients corresponding to each adjacent preset Markov mode is 1.

5. The factory control method based on the Internet of Things according to claim 1, characterized in that: The process of performing bypass deep packet inspection on the industrial IoT control messages passing through the industrial IoT gateway does not occupy or block the normal forwarding path of the industrial IoT control messages.

6. The factory control method based on the Internet of Things according to claim 1, characterized in that: The step of calculating the smooth switching coefficient based on the difference between the abnormal confidence score and the preset abnormal confidence switching threshold includes: substituting the difference into a preset monotonically increasing logic function to obtain a smooth switching coefficient with a value range between 0 and 1. The smooth switching coefficient increases as the anomaly confidence score increases.

7. The factory control method based on the Internet of Things according to claim 1, characterized in that: Also includes: Verify the time interval between two consecutive mode switches; If the time interval is less than a preset dwell time threshold, the current security fusion gain matrix remains unchanged until the time interval reaches the preset dwell time threshold, at which point the smooth switching coefficient is allowed to continue updating.

8. A factory control method based on the Internet of Things according to claim 1, characterized in that: The step of determining the integrated feedback gain matrix based on the network adaptive gain matrix and the security fusion gain matrix includes: weighting and summing the network adaptive gain matrix and the security fusion gain matrix according to preset weighting coefficients to obtain the integrated feedback gain matrix.

9. A factory control system based on the Internet of Things (IoT), comprising a field layer and an edge controller layer, wherein the field layer includes a field sensor group, a field actuator group, and an industrial IoT gateway, wherein process variable data collected by the field sensor group is encapsulated by the industrial IoT gateway and transmitted uplink to the edge controller layer via the industrial IoT gateway, and control commands output by the edge controller layer are transmitted downlink to the field actuator group via the industrial IoT gateway; Its features are, The edge controller layer includes: a network state awareness module, used to acquire the actual transmission delay, packet loss status and feedback data quantization error generated during the transmission of the process variable data; The Markov mode online estimation module is connected to the network state perception module and is used to determine the Markov mode of the current control cycle based on the actual transmission delay, the packet loss status and the quantization error of the feedback data. The adaptive gain reconstruction module is connected to the online Markov mode estimation module. It is used to perform iterative solution of the local algebraic Licati equation and interpolation of the gain scheduling table for the Markov mode in the current control cycle to obtain the network adaptive gain matrix. The security detection module is used to perform bypass deep packet inspection on the industrial IoT control messages passing through the industrial IoT gateway and output anomaly confidence scores. The security degradation decision and smooth switching module is connected to the security detection module. It is used to calculate the smooth switching coefficient based on the abnormal confidence score, and to perform weighted fusion of the preset normal mode state feedback gain matrix and the security degradation mode state feedback gain matrix based on the smooth switching coefficient to obtain the security fusion gain matrix. The control law output module is connected to the adaptive gain reconstruction module and the safety degradation decision and smooth switching module, respectively. It is used to determine the comprehensive feedback gain matrix based on the network adaptive gain matrix and the safety fusion gain matrix, and to calculate the control command based on the comprehensive feedback gain matrix and the system state vector of the current control cycle.

10. A factory control system based on the Internet of Things according to claim 9, characterized in that: It also includes a cloud monitoring platform, which is connected to the edge controller layer via a wide area network for storing historical data, remotely updating model parameters, and displaying human-computer interaction.