Control method and system of industrial gateway based on communication protocol
By constructing a gateway knowledge graph and digital twin space, communication protocols and paths are dynamically identified, enabling multi-level control optimization of industrial gateways. This solves the problem of insufficient sub-node identification in existing technologies and improves control accuracy and stability.
Patent Information
- Application Number
- CN202610551412.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-23
- Publication Date
- 2026-07-10
AI Technical Summary
Existing industrial gateway control methods are unable to identify sub-nodes at different levels and their coupled contextual relationships under complex operating conditions such as multi-service concurrency and high load, resulting in low accuracy of the multi-level control system of industrial gateways.
By collecting and combining the operating data of industrial gateways, constructing a gateway knowledge graph, marking the communication information of child nodes, dynamically identifying communication protocols and paths, and combining digital twin space for simulation and multi-level iterative optimization, precise control of child nodes at different levels can be achieved.
It improves the accuracy of primary control events and the accuracy of multi-level control systems in complex operating conditions of industrial gateways, ensuring the stability and efficiency of gateways in multi-service concurrent scenarios.
Smart Images

Figure CN122372592A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of communication protocols, and in particular to a control method and system for an industrial gateway based on a communication protocol. Background Technology
[0002] With the deep integration of industrial automation and IoT technologies, the heterogeneity of industrial field equipment is increasing. In actual production line deployments, such as when Modbus-RTU serial devices and high-speed EtherCAT bus networks coexist, the industrial gateway, as the core hub for protocol conversion and data interaction, directly determines the reliability of the entire control system due to its operational stability. Currently, the industry typically employs traditional techniques based on static rule configuration or single-dimensional status monitoring for the control of industrial gateways.
[0003] Most existing industrial gateway control methods treat each communication interface as an isolated channel for independent polling and forwarding. When the gateway faces complex operating conditions such as multi-service concurrency and high load, existing technologies can only rely on simple threshold alarms to trigger control commands. Existing technologies cannot extract deep-level "working characteristics" from the complex concurrent data stream, cannot identify different levels of child nodes and their inter-coupled contextual relationships, and cannot further manage multiple child nodes at different levels. This affects the accuracy of the primary control events of the industrial gateway, resulting in low accuracy of the multi-level control system of the industrial gateway. Summary of the Invention
[0004] The purpose of this invention is to overcome the shortcomings of the prior art. This invention provides a control method and system for an industrial gateway based on a communication protocol.
[0005] This invention provides a control method for an industrial gateway based on a communication protocol, comprising: The system collects a combination of operating condition data from industrial gateways, determines multiple operating characteristics based on the detection of this combination of operating condition data, constructs a corresponding gateway knowledge graph by combining the computing resources corresponding to the industrial gateway, identifies multiple child nodes at different levels based on the identification of the gateway knowledge graph, and marks the communication information of each child node. The communication information of each sub-node is input into the same communication space, the corresponding communication protocol is obtained synchronously, the corresponding communication path is determined according to the dynamic identification of the communication protocol, and the primary control event of the industrial gateway is determined by combining the communication information of each sub-node and the communication constraint relationship corresponding to the industrial gateway. Based on the identification of the primary control event, multiple key communication factors are identified, and these factors are loaded into the digital twin space. Dynamic simulation is then performed in the digital twin space in conjunction with the communication delay parameters of the industrial gateway to output the configuration optimization event of the industrial gateway during the communication process. Based on the detection of this configuration optimization event, multiple configuration optimization projects are identified, and the execution status of each configuration optimization project is marked. Furthermore, by combining the gateway knowledge graph and the time-series evolution mechanism, the content to be optimized for each sub-node is determined. Based on the multi-level iteration of the content to be optimized for each sub-node, the multi-level control system of the industrial gateway is determined.
[0006] This invention provides a control system for an industrial gateway based on a communication protocol. The control system is applied to the aforementioned control method for an industrial gateway based on a communication protocol. The control system includes: The gateway module is used to collect a combination of operating condition data from industrial gateways, determine multiple operating characteristics based on the detection of this combination of operating condition data, construct a corresponding gateway knowledge graph by combining the computing resources corresponding to the industrial gateway, determine multiple child nodes of different levels based on the identification of the gateway knowledge graph, and mark the communication information of each child node. The primary control module is used to input the communication information of each sub-node into the same communication space, synchronously acquire the corresponding communication protocol, determine the corresponding communication path based on the dynamic identification of the communication protocol, and further determine the primary control events of the industrial gateway by combining the communication information of each sub-node and the communication constraint relationship corresponding to the industrial gateway. The configuration optimization module is used to identify multiple key communication factors based on the identification of the primary control event, load the multiple key communication factors into the digital twin space, and perform dynamic simulation in the digital twin space in combination with the communication delay parameters of the industrial gateway to output the configuration optimization event of the industrial gateway in the communication process. The multi-level control module is used to determine multiple configuration optimization items based on the detection of the configuration optimization event, and mark the execution status of each configuration optimization item. It further combines the gateway knowledge graph and the time-series evolution mechanism to determine the content to be optimized for each sub-node, and determines the multi-level control system of the industrial gateway based on the multi-level iteration of the content to be optimized for each sub-node.
[0007] Compared with the prior art, the beneficial effects of the present invention are: (1) Collect the working condition data combination of the industrial gateway, determine multiple working characteristics based on the detection of the working condition data combination, and construct the corresponding gateway knowledge graph based on the computing power resources corresponding to the industrial gateway. Based on the identification of the gateway knowledge graph, determine multiple sub-nodes of different levels and mark the communication information of each sub-node. Input the communication information of each sub-node into the same communication space, synchronously obtain the corresponding communication protocol, determine the corresponding communication path based on the dynamic identification of the communication protocol, and further determine the primary control event of the industrial gateway by combining the communication information of each sub-node and the communication constraint relationship corresponding to the industrial gateway. The gateway knowledge graph is introduced to further manage multiple sub-nodes of different levels and improve the accuracy of the primary control event of the industrial gateway.
[0008] (2) Based on the identification of the primary control event, multiple key communication factors are identified, and these factors are loaded into the digital twin space. Dynamic simulation is then performed in the digital twin space in conjunction with the communication delay parameters of the industrial gateway to output the configuration optimization event of the industrial gateway during the communication process. Based on the detection of the configuration optimization event, multiple configuration optimization items are identified, and the execution status of each configuration optimization item is marked. Furthermore, the content to be optimized for each sub-node is determined by combining the gateway knowledge graph and the time-series evolution mechanism. Based on the multi-level iteration of the content to be optimized for each sub-node, the multi-level control system of the industrial gateway is determined, and the configuration optimization event is further controlled. The status of each configuration optimization item, the gateway knowledge graph, and the time-series evolution mechanism are fully considered, which improves the accuracy of the multi-level control system of the industrial gateway. Attached Figure Description
[0009] Figure 1 This is a flowchart illustrating the control method of an industrial gateway based on a communication protocol in an embodiment of the present invention. Figure 2 This is a flowchart illustrating step S11 in the control method of an industrial gateway based on a communication protocol according to an embodiment of the present invention. Figure 3 This is a flowchart illustrating step S12 in the control method of an industrial gateway based on a communication protocol according to an embodiment of the present invention. Figure 4 This is a flowchart illustrating step S13 in the control method of an industrial gateway based on a communication protocol according to an embodiment of the present invention. Figure 5 This is a flowchart illustrating step S14 in the control method of an industrial gateway based on a communication protocol in an embodiment of the present invention. Figure 6 This is a schematic diagram of the structural composition of the control system of an industrial gateway based on a communication protocol in an embodiment of the present invention. Detailed Implementation
[0010] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
[0011] Please see Figures 1 to 6 A control method for an industrial gateway based on a communication protocol, applied to communication protocol scenarios; the control method for an industrial gateway based on a communication protocol includes: Step S11: Collect the operating condition data combination of the industrial gateway, determine multiple working characteristics based on the detection of the operating condition data combination, and construct the corresponding gateway knowledge graph in combination with the computing power resources corresponding to the industrial gateway. Based on the identification of the gateway knowledge graph, determine multiple sub-nodes of different levels and mark the communication information of each sub-node. Step S12: Input the communication information of each sub-node into the same communication space, synchronously obtain the corresponding communication protocol, determine the corresponding communication path based on the dynamic identification of the communication protocol, and further combine the communication information of each sub-node and the communication constraint relationship corresponding to the industrial gateway to determine the primary control event of the industrial gateway. Step S13: Based on the identification of the primary control event, identify multiple key communication factors, load the multiple key communication factors into the digital twin space, and perform dynamic simulation in the digital twin space in combination with the communication delay parameters of the industrial gateway to output the configuration optimization event of the industrial gateway in the communication process. Step S14: Based on the detection of the configuration optimization event, multiple configuration optimization items are identified, and the execution status of each configuration optimization item is marked. Further, the content to be optimized for each sub-node is determined by combining the gateway knowledge graph and the time-series evolution mechanism. Based on the multi-level iteration of the content to be optimized for each sub-node, the multi-level control system of the industrial gateway is determined.
[0012] refer to Figure 2 In step S11, the specific steps are as follows: S111: For industrial gateways, multimodal data perception is performed on the industrial gateways, and the combination of operating condition data of the industrial gateways is determined during the data perception process. The combination of operating condition data covers the underlying bus throughput, memory dynamic load, network jitter and physical environment parameters; the combination of operating condition data is dynamically detected, and further combined with the manifold learning mechanism to trigger the extraction of nonlinear features, thereby determining multiple working characteristics of the industrial gateway under complex operating conditions. S112: Obtain the computing power resources corresponding to the industrial gateway, mark the fragmented distribution characteristics of the computing power resources, further combine multiple working characteristics to perform topology evolution, and then construct the gateway knowledge graph corresponding to the industrial gateway. Dynamically identify the gateway knowledge graph, and introduce neural networks to detect multiple child nodes of different levels in different dimensions. The multiple child nodes are in a relay relationship. Mark the corresponding type communication information for each child node. The type communication information includes data semantics, protocol cluster features and context association information.
[0013] In the embodiments of this application, for industrial gateways, multimodal data perception is performed on the industrial gateways, and the combination of operating condition data of the industrial gateways is determined during the data perception process. The combination of operating condition data covers the underlying bus throughput, dynamic memory load, network jitter, and physical environment parameters. The combination of operating condition data is dynamically detected, and further combined with the manifold learning mechanism to trigger the extraction of nonlinear features, thereby determining multiple working characteristics of the industrial gateway under complex operating conditions. This approach is compatible with the overall consideration of multimodal data perception of industrial gateways and ensures the accuracy of the combination of operating condition data of industrial gateways.
[0014] At this point, within the underlying operating cycle of the industrial gateway, the system initiates a multimodal sensing and probe mechanism to perform full-dimensional state sampling of the heterogeneous hardware links. This process is not simply data capture, but rather the spatiotemporal alignment of physical and logical quantities from different dimensions, thereby condensing them into a highly coupled "operating condition data combination." This combination precisely covers four core dimensions of measurement indicators: underlying bus throughput, dynamic memory load, network jitter, and physical environment parameters.
[0015] For the underlying bus throughput, this involves real-time capture of the EtherCAT bus periodic frame throughput rate and the concurrent byte stream density of the dual RS-232 serial ports in a "master-slave" mode; for dynamic memory load, this involves high-frequency monitoring of the stack space occupancy rate used to cache the mapping relationship between Modbus data frames and EtherCATSlot / Module during protocol conversion, as well as the rate of memory fragmentation; for network jitter, this involves calculating the time difference variance between microsecond-level EtherCAT periodic data interactions and millisecond-level Modbus-RTU polling responses; and for physical environment parameters, this involves collecting the chip junction temperature and voltage fluctuation range of the motherboard during high-speed processing of 16-channel DI / 16-channel DO digital signal switching using onboard sensors. These four types of data are rigorously timestamped and encapsulated into structured vectors at the sensing layer, thus establishing the combination of operating condition data.
[0016] After acquiring a combination of high-dimensional operating condition data with strong coupling noise, the system abandons the traditional static threshold comparison and instead introduces a dynamic detection mechanism to track the data distribution drift within the manifold space in real time. Due to the sudden changes in Modbus master station polling frequency, serial port data packet collisions, and step changes in EtherCAT bus load in industrial sites, highly nonlinear temporal evolution patterns are often observed. The system then triggers a manifold learning mechanism, which aims to penetrate the surface data disturbances and map the combination of operating condition data from high-dimensional Euclidean space to a low-dimensional intrinsic manifold structure. By preserving the local neighborhood topology of the data, it accurately extracts the "nonlinear features" that characterize the potential operating state of the system. These nonlinear features can abstract deep-level operating characteristics such as "the implicit out-of-sync trend of serial port concurrent requests and bus refresh cycles", "the nonlinear overflow risk of memory buffers under specific function code parsing", and "the congestion precursors of the underlying bus during dual protocol conversion", thereby thoroughly determining the multiple operating feature vectors that the industrial gateway actually faces under complex operating conditions.
[0017] Specifically, suppose an industrial gateway is deployed on a high-end equipment manufacturing production line. It is currently configured to poll two Modbus frequency converters of different brands at high frequency through two RS-232 serial ports in master mode, presenting a corresponding master-slave relationship. At the same time, it needs to convert data into EtherCAT protocol in real time, and its onboard 16-channel DI is receiving external encoder signals at extremely high frequency.
[0018] The multimodal sensing module at the bottom of the industrial gateway captures the current state in real time and constructs the "operating condition data combination" at this time - showing that the throughput of the underlying bus soars to the peak, the dynamic load of memory fluctuates in a sawtooth pattern, the network jitter index deteriorates sharply, and the physical environment parameters show that the temperature of the core processing unit is approaching the frequency reduction red line.
[0019] The system dynamically detects this deteriorating combination of operating data, and the manifold learning mechanism is deeply triggered. This mechanism extracts key nonlinear operating features in the manifold space through the linear phenomena of "temperature rise and memory fullness" on the surface. Specifically, it identifies "nonlinear harmonic interference features between the Modbus master station polling interval and the EtherCAT periodic refresh rate" and "memory fragmentation chain reaction features triggered when dual serial ports concurrently parse specific function codes". The identification of these two deep nonlinear features accurately presents the current collapse critical point of the industrial gateway.
[0020] Furthermore, the computing resources corresponding to the industrial gateway are acquired, and the fragmented distribution characteristics of these resources are marked. Multiple operational features are then combined to perform topology evolution, thereby constructing a gateway knowledge graph corresponding to the industrial gateway. This knowledge graph is dynamically identified, and a neural network is introduced to detect multiple child nodes at different levels across different dimensions. These child nodes are in a reciprocal relationship, and each child node is labeled with corresponding type communication information. This type communication information includes data semantics, protocol cluster features, and contextual association information, accommodating the overall considerations of neural network detection across different dimensions and ensuring the accuracy of multiple child nodes at different levels.
[0021] At this stage, in the early stages of building the gateway knowledge graph, the system performs a full scan and quantification of the computing power resources of the microcontroller at the bottom layer of the industrial gateway. This process not only measures the overall CPU frequency utilization, but more importantly, it marks the "fragmented distribution characteristics" of the memory pool and processing threads in a multi-task concurrent environment.
[0022] The system tracks the discrete distribution of each task stack, the waste rate of the isolation band between statically allocated and dynamically requested memory blocks, and the fragmentation interval of the computing power slices occupied by different interrupt priorities on the time axis. This labeling reduces the original macroscopic "remaining computing power" to a fragmented feature map with spatial heterogeneity and temporal discreteness, laying the underlying data foundation for subsequent evaluation of the actual schedulability of complex tasks in the gateway.
[0023] After establishing the fragmented distribution characteristics of computing power, the system injects multiple nonlinear working features as driving forces into the initial computing power topology network to trigger topology evolution. During the evolution process, attractive and repulsive effects are generated between working features and computing power fragments: high-time-consuming features will attempt to aggregate adjacent computing power fragments to form processing clusters, while features constrained by hard real-time constraints are forcibly isolated by topology boundaries. After multi-dimensional iterative reconstruction, the edge weights between nodes are redistributed, and finally the static computing power distribution and dynamic working features are perfectly integrated and solidified into a "gateway knowledge graph" with a self-consistent logical structure. This gateway knowledge graph not only presents "what resources the gateway has", but also "how resources are reshaped and occupied by nonlinear working conditions".
[0024] The system introduces a pre-trained multi-layer neural network architecture to dynamically identify the graph. The neural network performs penetrating detection of the clusters in the graph in multiple dimensions such as feature space, time dimension, and protocol stack depth. Based on the similarity of task attributes, temporal coupling degree, and computing power dependence level, the graph network is cut and established into multiple child nodes of different levels. These child nodes are not parallel, but strictly in a "progressive relationship", that is, the logical hierarchy of upstream and downstream callers and callees, and high preemption priority to low preemption priority, thus forming a forest of child nodes with mesh-controlled progressive links in the knowledge graph.
[0025] After the progressive architecture of child nodes is established, the system assigns and marks each child node with its own unique "type communication information". This marking process is a deep semantic encapsulation of the node's communication attributes, specifically including three core vectors: first, "data semantics", which clarifies the physical meaning and engineering dimensions of the data interacted by the node, such as temperature value and speed command; second, "protocol cluster characteristics", which accurately describes the protocol stack specifications and frame structure characteristics to which the node depends, such as frame header identifier, verification mechanism, and polling cycle; and finally, "context association information", which records the state dependencies and triggering conditions of the node in the preceding progressive link, such as the need to wait for the upstream node's data to be ready before initiating read and write operations. At this point, the child node becomes a communication entity with complete self-description capabilities.
[0026] Specifically, the system performs a microscopic scan of the computing resources of the industrial gateway, marking its fragmented distribution characteristics. The system astutely discovers that because the EtherCAT slave stack requires strict microsecond-level timekeeping, it occupies a continuous and uninterrupted high-end computing memory pool; while the dual-serial-port Modbus-RTU polling task is cut into a large number of millisecond-level tiny time slices and hashed receive buffers by the operating system's time-sharing scheduling mechanism, resulting in serious computing power and memory fragmentation.
[0027] The system uses the "features of concurrent parsing of dual serial ports and computing power contention caused by high-frequency DI interrupts" extracted from S111 as the driving force to perform topology evolution and build a gateway knowledge graph. In the graph, the originally isolated RS-232 serial port A processing thread, serial port B processing thread and 16-way DI hardware interrupt service function have undergone drastic topology reconstruction in the computing power fragment pool, mapping their implicit contention paths for the underlying shared bus lock and DMA channel.
[0028] A neural network is introduced to perform multi-dimensional detection and establish the child nodes with progressive relationships. The neural network accurately identifies three levels of child nodes in the graph: the highest level "first-level child node" is identified as the EtherCATSlot / Module dynamic mapping core; the middle level "second-level child node" consists of two RS-232 master station polling parsing clusters (which provide data sources for the first-level node); and the lowest level "third-level child node" is the 16-channel DI high-speed acquisition buffer queue. These three nodes exhibit a strict progressive relationship: the hardware interrupt of the third-level node must quickly yield the CPU to the second-level node for protocol assembly, and after the second-level node completes the assembly, it will be submitted back to the first-level node for EtherCAT frame mapping.
[0029] The system marks these progressive nodes with type communication information; for "secondary child nodes", their type communication information is marked as follows: the data semantics are "the frequency setpoint and current speed of the brand X inverter"; the protocol cluster characteristics are "Modbus-RTU function code 0x03, baud rate 115200, 8N1, start register address 0x0000"; the context association information is "data extraction must be completed within the window period of the serial port B timeout retransmission mechanism, otherwise it will cause the computing power of the secondary node to accumulate, which will in turn cause the periodic data mapping delay of the primary EtherCAT node", through such extremely detailed marking.
[0030] refer to Figure 3 In step S12, the specific steps are as follows: S121: Obtain the communication information of each child node, perform cross-domain mapping of the type communication information of each child node, and input it into the same communication space. Combine the alignment mechanism of the communication space to trigger the spatiotemporal alignment of the type communication information of each child node, synchronously obtain the corresponding communication protocol, dynamically identify the communication protocol, and introduce deep reinforcement learning in the identification process, so as to achieve adaptive reverse parsing of the communication protocol without prior protocol documents, and further output the corresponding communication path. S122: Perform routing on the communication path and combine it with graph attention network for dynamic detection, thereby autonomously perceiving the spatiotemporal evolution trend of communication congestion along the communication path, and combining the communication information of each sub-node and the communication constraint relationship corresponding to the industrial gateway in a multi-service concurrent scenario to perform multi-objective calculation, thereby determining the primary control event of the industrial gateway.
[0031] In the embodiments of this application, the communication information of each child node is obtained, the type communication information of each child node is cross-domain mapped and input into the same communication space, and the spatiotemporal alignment of the type communication information of each child node is triggered by the alignment mechanism of the communication space. The corresponding communication protocol is obtained synchronously, the communication protocol is dynamically identified, and deep reinforcement learning is introduced in the identification process, so as to realize the adaptive reverse parsing of the communication protocol without prior protocol documents, and further output the corresponding communication path.
[0032] At this point, after acquiring the communication information of each child node established in the previous steps, the system faces the barrier problem of heterogeneous data domains. Therefore, it is necessary to perform cross-domain mapping on this information and input it into the same communication space. Since the data semantics and protocol cluster characteristics of different child nodes originally exist in mutually isolated logical domains, such as low-speed serial port domain, high-speed hardware interrupt domain, and microsecond-level bus domain, the system constructs a high-dimensional virtual communication tensor space to reduce the dimensionality of heterogeneous feature vectors and reproject them. After inputting into this space, the system immediately triggers a spatiotemporal alignment mechanism based on a global clock source. This mechanism uses interpolation algorithms and timestamp compensation to forcibly align communication information with different time granularities to a unified absolute time axis and logical coordinate system, thereby eliminating the phase difference caused by sampling rate differences and asynchronous transmission, and establishing a benchmark time-space reference system for subsequent multi-protocol concurrent analysis.
[0033] Based on achieving spatiotemporal alignment, the system synchronously acquires data frames flowing through the communication space to capture the communication protocol entities corresponding to each sub-node. The system abandons the traditional static protocol stack matching mode and instead activates a dynamic identification mechanism. This mechanism performs real-time spectral and statistical analysis on the preamble, frame interval, field length distribution, and checksum characteristics of the data stream. It can not only identify variants of known protocols at the macro level, but also capture protocol field offsets and abnormal fluctuations caused by inherent characteristics of the equipment or operating condition disturbances at the micro level, thereby achieving highly robust dynamic identification of communication protocols in the running state.
[0034] When a dynamic or unknown characteristic of the protocol is identified, the system introduces a deep reinforcement learning model to intervene in the identification process. Under this mechanism, the system treats the data frame sequence as the environment state, the tentative field segmentation and semantic assumptions as the action space, and the frame verification pass rate or the self-consistency of semantic logic as the reward function. In the process of continuously interacting with the real data stream, the agent evolves itself through the policy gradient algorithm, completely getting rid of the dependence on the pre-fixed protocol specification document (i.e., no prior protocol document conditions). It can adaptively remove redundant fields, infer the implicit length indicator bit, and reverse deduce the dynamically changing payload boundary, ultimately achieving accurate reverse parsing and structural reorganization of the communication protocol.
[0035] As the deep reinforcement learning model completes the accurate parsing of protocol entities, the system combines the spatiotemporally aligned data flow characteristics to outline the exact topological trajectory of data from the source node to the destination node within the communication space. Based on the addressing fields and routing logic obtained from the protocol parsing, the system eliminates invalid broadcast storms and infinite loop links, and finally instantiates this logical trajectory into a physical and logical dual channel with a clear inbound interface, memory copy path, and outbound bus timing, thereby stably outputting the corresponding communication path.
[0036] Specifically, the system acquires the communication information marked by S112 and performs cross-domain mapping and spatiotemporal alignment. Since the Modbus polling of RS-232 serial ports A and B is a millisecond-level asynchronous event, while the 16-channel DI encoder signal is a microsecond-level hardware interrupt event, and the EtherCAT bus is a strictly microsecond-level synchronous periodic event, the system maps these three completely heterogeneous domains into the same communication space. Through the alignment mechanism, the system accurately interpolates and aligns the time when serial port A returns "brand X inverter speed" and the time when serial port B returns "brand Y inverter current" to the timestamp of a precise synchronous period that the EtherCAT master station expects to read, thus eliminating the data time base deviation caused by asynchronous acquisition.
[0037] Under a unified spatiotemporal coordinate system, the system synchronously acquires and dynamically identifies the communication protocol. The system not only identifies the standard EtherCAT slave protocol, but also dynamically detects anomalies in the dual serial port data stream: although the host computer is configured with a standard Modbus-RTU, the dynamic identification mechanism finds that due to the response delay of the "Brand Y frequency converter" under high-frequency polling, the frame gap between the returned Modbus frames exhibits a non-standard dynamic stretching phenomenon, and the slave ID byte of some data packets has an implicit bit flip risk due to electrical interference.
[0038] Faced with the variation of this standard protocol under extreme operating conditions, the system introduces deep reinforcement learning for adaptive reverse parsing without prior knowledge. In the absence of non-standard protocol documentation within the brand Y inverter, the reinforcement learning agent uses the abnormal serial port B data stream as its environment. It continuously attempts to adjust the frame header truncation point and verification algorithm, and receives a high reward when it successfully parses a current value that conforms to physical logic and passes the CRC check. Through rapid iteration, the agent adaptively reverse-parses the "non-standard byte filling pattern" and "dynamic anti-interference verification offset" of the brand Y inverter under overload conditions, successfully extracting a pure frequency setpoint from the disordered bit stream.
[0039] Based on this extreme reverse analysis result, the system outputs the corresponding communication path; the system explicitly outputs a communication path: the external encoder signal is directly mapped to memory address α through the hardware layer → the clean data after reinforcement learning analysis between serial port A and serial port B is copied across domains to memory address β through the DMA channel → the data at memory addresses α and β is packaged into a specific ProcessData image area through the underlying Slot / Module mechanism, strictly following the EtherCAT cycle timing, and finally sent to the EtherCAT network through the physical layer PHY chip.
[0040] Furthermore, routing is performed on the communication path, and dynamic detection is combined with a graph attention network to autonomously perceive the spatiotemporal evolution trend of communication congestion along the communication path. Multi-objective calculations are then performed by combining the communication information of each sub-node and the communication constraints of the industrial gateway in multi-service concurrent scenarios to determine the primary control events of the industrial gateway. This comprehensive consideration of the communication information of each sub-node and the communication constraints of the industrial gateway in multi-service concurrent scenarios ensures the accuracy of the primary control events of the industrial gateway. At the same time, a gateway knowledge graph is introduced to further manage multiple sub-nodes at different levels, improving the accuracy of the primary control events of the industrial gateway.
[0041] At this point, the system performs fine-grained routing of the actual path within the gateway's internal physical media and logical memory pool, clarifying the specific number of hops and buffer queue nodes that the data frame crosses across different bus bridging nodes. The system introduces a graph attention network mechanism to perform high-dimensional dynamic detection of this routed link. This mechanism, by assigning adaptive attention weight coefficients to adjacent forwarding nodes or shared memory areas on the path, can keenly capture the microsecond-level queuing phenomenon caused by the superposition of processing delays when the data flow passes through specific routing nodes, thereby transforming the static routing topology into a dynamic detection graph with time-aware capabilities.
[0042] Based on the high-dimensional detection output of the graph attention network, the system further delves deeper along the communication path to autonomously perceive the spatiotemporal evolution trend of communication congestion. This process is not a simple threshold alarm, but rather deconstructs the congestion phenomenon into "bottleneck node drift" in the spatial dimension and "periodic oscillation of congestion" in the temporal dimension. The system constructs a spatiotemporal tensor to accurately present the spread trajectory and intensity changes of this congestion state in the next few milliseconds, thereby achieving a forward-looking prediction of the health of the link ecosystem.
[0043] After understanding the congestion evolution trend, the system binds its communication information with each sub-node and the inherent communication constraints of the gateway in multi-service concurrent scenarios, and initiates multi-objective computation. The communication constraints cover the deadlines of hard real-time tasks, the bandwidth mutual exclusion determination between heterogeneous protocols, and the priority deprivation rules of shared bus arbitration. The multi-objective computation, under these rigid constraints, simultaneously solves the Pareto optimal solution space of multiple mutually constraining optimization objectives such as "minimizing end-to-end communication latency", "maximizing critical data throughput", and "balancing the computing power consumption of each sub-node".
[0044] After convergence and game theory through multi-objective calculations, the system selects the equilibrium point that best fits the current operating conditions in the Pareto front and maps the mathematical solution back to the physical control logic, thereby determining and outputting the primary control events of the industrial gateway. These primary control events are specifically manifested as a series of low-level micro-operation instructions with clear triggering conditions and execution objectives, such as forcibly adjusting the polling priority of a certain link, blocking the forwarding of specific non-real-time data, or triggering the dynamic expansion of the local buffer.
[0045] Specifically, the system performs routing and graph attention network dynamic detection on the communication path output by S121. The system finds that two high-frequency Modbus data streams (brand X and brand Y) and the hardware interrupt data stream of the 16-channel DI encoder both point to the same critical bottleneck node during the routing process—namely, the shared memory area of the "EtherCAT dynamic mapping module based on the Slot / Module mechanism". The graph attention network assigns a very high attention weight to this shared mapping area during dynamic detection, and keenly captures the microsecond-level interlocking wait phenomenon that occurs when the mapping area is assembling data due to the time difference between the asynchronous return data from the two RS-232 serial ports.
[0046] The system autonomously senses the spatiotemporal evolution trend of communication congestion along this path. Spatially, the congestion does not occur at the serial port physical layer, but drifts upstream and concentrates at the Slot mapping logic layer of the protocol stack. Temporally, because the 16-channel DI high-frequency interrupts are interrupting the CPU at an extremely high frequency, when the peak of the DI interrupt coincides with the peak of the Modbus response frame returned by both serial ports at the same time, it will trigger a highly destructive "periodic spatiotemporal congestion oscillation". This oscillation is showing an evolutionary trend of continuously worsening as the production line accelerates.
[0047] The system combines the communication information of child nodes with the communication constraints of the gateway to perform multi-objective calculations. System call constraints: EtherCAT bus has uncompromising microsecond-level hard real-time communication constraints, while Modbus-RTU polling, although important, has a certain millisecond-level fault tolerance margin. The multi-objective calculation engine engages in a fierce game between the two conflicting objectives of "ensuring the absolute stability of the EtherCAT cycle" and "reducing the Modbus polling packet loss rate" to calculate the optimal resource allocation strategy.
[0048] The system identifies and outputs a primary control event. Based on the above calculation results, the primary control event output by the system clearly includes two consecutive actions: First, the polling task of "Brand Y Inverter" is immediately and briefly suspended at the logic layer to release the memory fragments and computing power it occupies; Second, the released resources are used to establish a temporary computing power isolation zone for the parsing thread of "Brand X Inverter" and the interrupt service function of "16-channel DI Encoder", forcibly interrupting the oscillation cycle of spatiotemporal congestion, and ensuring that the EtherCAT Slot / Module mapping can be synchronized to the master bus without delay. The accurate output of this primary control event avoids a complete shutdown of the gateway due to the deadlock of underlying resources.
[0049] refer to Figure 4 In step S13, the specific steps are as follows: S131: Dynamically identify the primary control event, and in the process of identification, combine the causal inference network to determine multiple communication control contents, and determine the corresponding key communication factors by iterating through the multiple levels of each communication control content, so as to obtain multiple key communication factors. Each key communication factor presents the causal core features that determine the quality of communication. S132: Load multiple key communication factors into the corresponding digital twin space, and perform dynamic simulation of multi-physics coupling in the digital twin space by combining the physical mapping mechanism and the communication delay parameters of the industrial gateway, so as to predict the communication bottleneck under extreme working conditions in advance, and finally output the configuration optimization event of the industrial gateway in the communication process.
[0050] In the embodiments of this application, the primary control event is dynamically identified, and multiple communication control contents are determined by combining a causal inference network during the identification process. The corresponding key communication factors are determined by multi-level iteration along each communication control content, so as to obtain multiple key communication factors. Each key communication factor presents the causal core features that determine the communication quality, which is compatible with the overall consideration of combining the causal inference network during the identification process and ensures the accuracy of multiple communication control contents.
[0051] At this point, upon receiving a primary control event, the system does not directly send it to the hardware execution layer. Instead, it performs high-dimensional dynamic identification of the event at the logic level. This process aims to strip away the superficial descriptions of the control event, such as "congestion alarm" or "resource isolation," and instead introduce a causal inference network to dissect the underlying logic that caused the event. By constructing a counterfactual reasoning model and a structural causal graph, the causal inference network traces back the true preconditions that triggered the primary control event from a large and interconnected pool of industrial state variables. This allows it to penetrate the surface interference, accurately locate and determine the multiple specific "communication control contents" hidden behind the event, i.e., specific intervention action entities, such as buffer pointer reset, interrupt priority flip, or polling timing delay.
[0052] After clarifying each communication control content, the system did not stop at a single-layer causal relationship, but instead carried out multi-level iterative tracing along the logical link formed by these control contents. Each iteration represents a deeper exploration of the causal relationship. The system constantly asks "what underlying variables need to be changed to execute this control content" and "what micro-mechanisms are these variables subject to?" Through this multi-level iterative stripping process that goes from the surface to the core and penetrates level by level, the system reduces the macro-level control commands layer by layer until it anchors those micro-parameter variables that are at the bottom of the causal chain and have extremely high physical sensitivity. These micro-variables that are finally determined are established as the "key communication factors" in the current state of the gateway.
[0053] For the multiple key communication factors acquired, the system further utilizes a causal inference network for feature enhancement and attribute labeling. The system eliminates pseudo-factors that only have correlation but lack causal determinism, such as certain state variables that occur synchronously due to temperature increases but do not lead to congestion. It rigorously extracts the absolute core variables that, with even a small perturbation, will directly and unidirectionally determine the overall communication quality trend. Finally, the system encapsulates these key communication factors into feature vectors with strong causal orientation, making them clearly present the "causal core features that determine communication quality," providing the most accurate target parameters for subsequent digital twin simulations.
[0054] Specifically, the system dynamically identifies the primary control event output by S122 and introduces a causal inference network; the primary control event output by the preceding steps is manifested as "briefly suspending the Y-brand frequency converter for polling to establish a computing power isolation zone"; the causal inference network performs counterfactual inference on this event: The system asks, "Why must Y be suspended? Is it because of high CPU usage? No, it's because the DI high-frequency interrupt and serial port parsing are occupying memory locks." By tracing back the cause-effect graph of the network structure, the system ruled out superficial causes such as "serial port baud rate" and "slow inverter response" and accurately identified two specific communication control contents: one is "cancel the exclusive access of Modbus-RTU receive DMA to a specific area of internal SRAM", and the other is "block the unexpected preemption of Modbus parsing thread by the 16-channel DI external encoder interrupt".
[0055] The system iterates through the communication control content at multiple levels to determine key communication factors. For the first control content: revoking the DMA exclusive lock, the system iterates downwards: to revoke the exclusive lock, the residence time of the Modbus data frame in the buffer must be shortened. Continuing to iterate, the residence time depends on the pointer offset calculation time of the Slot / Module mapping mechanism when extracting the Modbus start address and the number of data. Further iterations reveal that the calculation time has increased dramatically because "the data of brand X and brand Y frequency converters are incorrectly mapped to the same cross-cache cache line, resulting in a serious false sharing phenomenon." Regarding the second control item: disabling DI preemption, iterative analysis revealed that the preemption originated from "the high-frequency edge triggering of the external encoder signal being configured as the highest priority zero-latency interrupt"; thus, the system successfully established two key communication factors: "the CacheLine alignment status of dual serial port Modbus data in the Slot-mapped memory pool" and "the interrupt latency response threshold of the 16-channel DI hardware interrupt".
[0056] The system establishes the core causal characteristics of these factors; the system verifies and confirms that as long as the "CacheLine alignment state" is misaligned, it is the core causal factor that unidirectionally determines the collapse of communication quality; as long as the "DI interrupt response threshold" is set too low, it will inevitably tear the underlying timing of Modbus protocol parsing. These two key communication factors completely strip away the surface protocol differences (EtherCAT and Modbus), pointing directly to the core causal characteristics of the chip architecture level and the underlying driver level, and determining the most decisive physical parameters for the dynamic simulation to be carried out in the digital twin space.
[0057] Furthermore, multiple key communication factors are loaded into the corresponding digital twin space, and dynamic simulation of multi-physics coupling is performed in the digital twin space by combining the physical mapping mechanism and the communication delay parameters of the industrial gateway, so as to predict the communication bottleneck under extreme working conditions in advance, and finally output the configuration optimization event of the industrial gateway in the communication process, thus introducing the configuration optimization event of the industrial gateway in the communication process.
[0058] At this point, the system constructs a digital twin space on the virtual side that is completely isomorphic to the physical gateway in terms of topology, register logic, and task scheduling queue. The system does not simply use these factors as numerical inputs, but uses a high-fidelity mapping mechanism to accurately project micro-causal parameters such as "CacheLine alignment status" and "interrupt response threshold" into the corresponding memory controller model and interrupt controller model in the digital twin space. This mapping ensures that parameter perturbations in the virtual space can absolutely and equivalently reflect the physical response laws of the underlying hardware, thereby completing the perfect loading from causal characteristics to the initial boundary conditions of the simulation model.
[0059] Within the digital twin space, the system further injects the end-to-end communication delay parameters accumulated by the gateway during the heterogeneous protocol conversion process, covering the serial port electrical layer propagation delay, the computation delay of the protocol parsing algorithm, and the queuing delay of EtherCAT bus arbitration. The system abandons the single-dimensional data flow simulation and instead starts multi-physics field coupled dynamic simulation, that is, placing the "logical data flow field", "computing resource thermal field" and "memory bus electric field" under the same simulation step size for cross-iterative solution, so as to truly restore the underlying mutual constraint mechanism when multiple services are concurrent.
[0060] Based on the high-fidelity output of multi-physics coupling simulation, the system begins to artificially inject extreme boundary conditions into the digital twin model, such as sudden frequency doubling of encoder signal frequency and avalanche retransmission after both serial ports simultaneously experience long-term frame loss, in order to deduce the system's behavior near the critical collapse point. By analyzing the timing violation reports and resource deadlock logs generated during the simulation, the system penetrates the illusion of smoothness under normal conditions and predicts in advance that under the upcoming extreme conditions, due to the chain amplification effect of specific delay parameters, an irreversible communication bottleneck will inevitably occur at a specific micro node.
[0061] After predicting the specific spatiotemporal coordinates and triggering mechanisms of the communication bottleneck in advance, the system performs reverse parameter optimization in the digital twin space to find the optimal configuration solution that can break the deadlock of multi-physics coupling. The virtual solution is then encapsulated into an instruction entity that can be sent to the physical gateway, thus ultimately outputting a configuration optimization event. This event not only includes specific configuration changes, such as memory pool isolation and polling cycle extension, but also includes the expected improvement indicators of the global latency link caused by the changes, becoming the final decision carrier connecting virtual simulation and physical execution.
[0062] Specifically, the system loads the key communication factors determined by S131 into the digital twin space. Through the mapping mechanism, the system accurately simulates the real distribution topology of the inverter data of brand X and brand Y in L2Cache in the memory controller model of the virtual gateway. At the same time, in the interrupt controller model, the affinity relationship between the virtual interrupt pins of 16 DI channels and the Modbus parsing kernel is reconstructed by an absolutely equivalent digital mirror.
[0063] The system injects the communication delay parameters of the industrial gateway and starts a multi-physics coupled dynamic simulation. The system simultaneously inputs the millisecond-level polling delay of Modbus-RTU and the 50-microsecond-level periodic transmission delay of EtherCAT, and solves the "data flow field" and "memory bus field" in the simulation space. The simulation screen clearly shows that when the DI interrupt storm occurs, the fierce competition of the memory bus causes the cache line read by the serial port DMA to be ruthlessly flushed, which in turn triggers a domino-like surge in delay.
[0064] The system performs advanced prediction of communication bottlenecks under extreme operating conditions. In the twin space, the system simulates the extreme condition of "encoder pulse frequency doubling" caused by production line acceleration. The simulation engine quickly deduces that under this extreme condition, the already tense cache pseudo-sharing will completely evolve into "bus deadlock". It predicts in advance that in the next few milliseconds, the Slot / Module dynamic mapping module will be unable to obtain valid Modbus data within the EtherCAT cycle, triggering a catastrophic "EtherCAT slave station drop" communication bottleneck.
[0065] Based on the advanced prediction results, the system outputs a configuration optimization event. In order to break this multi-physics coupling deadlock, after verifying multiple schemes in the virtual space, the final output configuration optimization event clearly stipulates: "Immediately force the Modbus receive buffers of serial port A and serial port B to be divided into independent memory pages in the underlying memory pool, and disable the cache coherence protocol of the memory page, that is, change it to non-cache mapping. At the same time, downgrade the interrupt response mode of 16-channel DI from 'zero-delay level trigger' to 'edge trigger with 50 microsecond filtering'." This configuration optimization event directly eliminates the causal interference source at the underlying hardware architecture level and will be accurately sent to the physical industrial gateway for execution.
[0066] refer to Figure 5 In step S14, the specific steps are as follows: S141: Detect configuration optimization events and determine multiple optimization paths during the detection process. Trace along each optimization path to determine the corresponding configuration optimization items to obtain multiple configuration optimization items. In each configuration optimization item, perform a status evaluation and further combine fuzzy logic to determine the execution status of each configuration optimization item. S142: Mark the execution status of each configuration optimization project with confidence weights, and further combine the global association attributes of the gateway knowledge graph with the temporal evolution mechanism based on the long short-term memory network to trigger the corresponding joint inference, thereby determining the content to be optimized for each sub-node under different time slices; S143: The optimization content of each sub-node is iterated in multiple levels, and a non-dominated sorting genetic mechanism is introduced in the iteration process. Gradient backpropagation and policy remapping are performed in each adjustment of the sub-node, thereby determining the multi-level control system of the industrial gateway. The multi-level control system presents the cross-level collaborative relationship of each sub-node.
[0067] In the embodiments of this application, configuration optimization events are detected, and multiple optimization paths are determined during the detection process. The corresponding configuration optimization items are determined by tracing along each optimization path to obtain multiple configuration optimization items. In each configuration optimization item, the status of the configuration optimization item is evaluated, and the execution status of each configuration optimization item is further determined by combining fuzzy logic. This approach takes into account the overall consideration of configuration optimization events and ensures the accuracy of multiple optimization paths.
[0068] At this point, after receiving the configuration optimization event output by the digital twin space, the system performs a deep structured inspection of the event at the event executor entry point. This process aims to decompose the macro-level optimization event into multiple micro-level intervention links that can reach different underlying hardware or logical levels, i.e., determine multiple optimization paths. By parsing the constraints and objective functions contained in the event, the system diverges outward in the configuration tree graph of the gateway to find all logical channels that can meet the expected effect of the optimization event. Each complete traversal trajectory extending from the root node to the leaf node is established as an independent optimization path.
[0069] After establishing multiple optimization paths, the system does not blindly execute them all, but instead traces back to the underlying level along each optimization path. The system penetrates the abstraction layer and driver layer of the operating system step by step until it reaches the lowest level of hardware control registers, memory mapping tables, or protocol state machine parameters. When the path traces back to the specific set of parameters that can be directly identified by the physical gateway and trigger state transitions, the system extracts and instantiates them from the path, thereby accurately obtaining multiple "configuration optimization projects" with clear operation addresses and target value domains, completing the dimensionality reduction and implementation from logical strategy to physical action.
[0070] For each configuration optimization project acquired, the system must conduct a rigorous status assessment before issuing it. Due to the complexity of the industrial environment and the tight coupling of parameters, the system abandons black-and-white Boolean judgments and instead introduces a fuzzy logic controller. The system uses the current preconditions of the project as fuzzy input, performs fuzzification processing through a predefined membership function, and performs fuzzy reasoning in combination with a rule base. Finally, after clearing the output, the system accurately determines and marks the specific execution state of the configuration optimization project, which should be "immediately enforced", "suspended and waited for", or "downgraded and replaced".
[0071] Specifically, the system detects the configuration optimization event output by S132 and determines the optimization path; the core requirement of the optimization event output by the preceding steps is to "eliminate cache false sharing and reduce the interference of DI interrupts on Modbus parsing"; the system detects the event and performs tree-like divergence to identify three feasible optimization paths: path one is to achieve physical isolation by modifying the underlying memory allocator; path two is to modify the burst transfer attribute of the DMA controller to bypass the cache; path three is to directly reconstruct the interrupt vector table to change the interrupt priority.
[0072] The system traces along the optimization path to obtain configuration optimization items. For path one, the system traces downwards to the memory protection unit configuration area of the ARM Cortex core and obtains the first configuration optimization item: "Force the Modbus receive buffer addresses of serial port A and serial port B to different MPU Regions and disable the Write-Back caching strategy of the Region". For path three, the system traces to the priority register of the NVIC and obtains the second configuration optimization item: "Downgrade the external interrupt priority of the 16-channel DI from preemption priority level 0 to level 2 and enable the interrupt waterline filtering mechanism".
[0073] The system uses fuzzy logic to assess the state and determine the execution status. For the first configuration optimization project: modifying the MPURegion, the fuzzy logic controller assesses its preconditions and finds that the dual serial ports are currently receiving data at high concurrency. Directly cutting off the buffer at this time may cause instantaneous frame loss. The membership calculation shows that it is in the "high-risk" range. Therefore, the fuzzy logic marks its execution status as "suspended and waiting, delayed until the interval of this round of polling"; For the second configuration optimization project: lowering the DI interrupt priority, the fuzzy logic assessment finds that the current system is on the verge of interrupt storm, and simply lowering the priority will not cause hardware damage. Its membership is in the "absolutely safe and urgent" range. Therefore, the system immediately marks its execution status as "immediately forced execution". This differentiated state marking based on fuzzy logic ensures that the gateway does not cause secondary disasters when performing extreme optimization configurations.
[0074] Furthermore, the execution status of each configuration optimization project is marked with confidence weights. The global association attributes of the gateway knowledge graph and the temporal evolution mechanism based on the long short-term memory network are combined to trigger the corresponding joint inference, thereby determining the content to be optimized for each sub-node under different time slices. This approach is compatible with the overall consideration of triggering the corresponding joint inference by the temporal evolution mechanism of the long short-term memory network, ensuring the accuracy of the content to be optimized for each sub-node under different time slices.
[0075] At this point, after obtaining the basic execution status of each configuration optimization project, the system further introduces a probability statistics and uncertainty quantification model to perform a secondary labeling of the execution status with confidence weights. This process aims to overcome the absolutist tendency of single fuzzy logic judgment when dealing with highly nonlinear industrial disturbances. By aggregating historical execution success rates, the response margin of the current underlying hardware registers, and the fluctuation variance of precondition monitoring data, the system calculates a confidence score between 0 and 1 for the execution status of each optimization project. This score is deeply bound to the status label, upgrading the originally flat status instructions into a three-dimensional decision vector with risk quantification capabilities, providing a fault tolerance boundary basis for subsequent dynamic scheduling.
[0076] After completing the weight labeling, the system elevates its focus to the macro-topology level, re-injecting the weighted optimization projects into the gateway knowledge graph built in the S11 phase. The system does not view these projects in isolation, but rather deeply traverses the edges and nodes in the graph, which are interwoven with computing power fragments, progressive child nodes, and type communication information, to extract their global association attributes. This mechanism can accurately identify which indirectly related hidden nodes a certain optimization project will affect through the graph's dependency links when the underlying logic is executed. Thus, from the perspective of the global resource pool, it outlines the deep topological relationships between optimization projects, such as mutual exclusion, symbiosis, or cascading amplification.
[0077] After clarifying the static global associations, the system introduces a Long Short-Term Memory (LSTM) network to capture the crucial dynamic temporal features in industrial control. The LSTM network, through the synergistic effect of its forget gate and input gate, absorbs the long-term cycle changes of the gateway's operating conditions, such as the slow temporal trends of production line acceleration and deceleration, while accurately determining the transient fluctuations of microsecond-level concurrent task scheduling, such as the short-term temporal features of high-frequency polling and interrupt collisions. The system uses the global association attributes of the knowledge graph as the spatial constraint matrix of the LSTM to trigger joint inference in the spatiotemporal dimensions, predicting how the effects of optimization projects with confidence weights diffuse and decay across different nodes on the time axis after being put into physical execution.
[0078] Based on the spatiotemporal prediction output of the joint simulation, the system divides the continuous time stream into multiple discrete time slices with engineering significance, such as the current EtherCAT cycle, the next millisecond-level polling window, and the future second-level steady-state period. Within each micro-time slice, the system combines the resource release timing and related node response latency derived from the simulation to accurately extract the specific parameters or logic blocks with the highest execution value and lowest collateral damage at that specific moment. This clearly and specifically determines the "content to be optimized" of each sub-node that is independent and highly time-coordinated under different time slices.
[0079] Specifically, the system marks the configuration optimization items obtained by S141 with confidence weights. For the previously determined item "downgrade the priority of 16-channel DI interrupt", the status is "immediately enforced". The system assesses that the current latch state of the interrupt controller is extremely chaotic, so it assigns a confidence weight of 0.95, which is a very high degree of confidence and can be executed directly. As for the item "modify the MPURegion cache disabling strategy", the status is "suspended and waiting". The system finds that the serial port DMA is at the critical point of burst transmission. Modifying it at this time is very likely to cause bus errors. Therefore, it assigns a confidence weight of only 0.35, which is a low degree of confidence and requires high vigilance against secondary risks.
[0080] The system is coupled with the global association attributes of the gateway knowledge graph. When the system puts these two items back into the knowledge graph, the global association attributes immediately issue an alarm: Although the confidence of "modify MPURegion" is low, the graph shows that the data parsing node of Brand X inverter and the 16-channel DI node share the same "computing power fragment cluster" at the underlying level. If only the DI priority is reduced, although the interruption storm is alleviated, the released computing power will be instantly swallowed up by Brand X's parsing task. This will cause Brand Y inverter to experience Modbus polling timeout due to not getting CPU time slices for a long time. This hidden global mutual exclusion relationship is completely exposed.
[0081] The system triggers joint inference based on the LSTM timing evolution mechanism. The forget gate of the LSTM network filters out invalid historical memories from early stable operation, while the input gate keenly captures the short-term timing feature that "the production line is at the rising edge of acceleration, and the encoder pulse frequency will reach its peak within the next 50 milliseconds". Combining the global mutual exclusion relationship of the graph, LSTM performs joint inference and prediction: if the buffer is forcibly closed at the 10th millisecond with a confidence level of 0.35, it will cause the data loss of brand Y at the 12th millisecond; however, if the timing is followed and the DI priority is lowered at the 5th millisecond with a confidence level of 0.95, the 50-microsecond window period of the DI filter is used to safely insert the MPU buffer isolation operation at the 6th millisecond, thus achieving a win-win situation.
[0082] The system determines the optimization content for each sub-node under different time slices. Based on the precise inference of LSTM, the system outputs an optimization list for spatiotemporal segmentation: under the [T0+5ms] time slice, the optimization content for the "16-way DI sub-node" is determined to be "execute interrupt priority downgrading and enable filtering"; under the following [T0+6ms] time slice, the optimization content for the "dual serial port Modbus mapping sub-node" is determined to be "utilize the interrupt masking gap to safely execute MPURegion cache strategy reconstruction". This arrangement of optimization content for time slices accurate to the millisecond level completely resolves configuration conflicts under multi-service concurrency.
[0083] Therefore, the optimization content of each sub-node is iterated at multiple levels, and a non-dominated sorting genetic mechanism is introduced during the iteration process. Gradient backpropagation and policy remapping are performed for each adjustment of the sub-node, thereby determining the multi-level control system of the industrial gateway. The multi-level control system presents the cross-level collaborative relationship of each sub-node. At the same time, the configuration optimization events are further controlled, and the status of each configuration optimization project, gateway knowledge graph and temporal evolution mechanism are fully considered, which improves the accuracy of the multi-level control system of the industrial gateway.
[0084] At this point, after obtaining the content to be optimized for each sub-node under different time slices, the system does not adopt a single-issue closed-loop control mode, but instead initiates a deeply nested multi-level iterative mechanism. This mechanism divides the gateway's control logic into multiple levels, from micro-level register configuration and meso-level task scheduling strategy to macro-level protocol stack architecture. For each content to be optimized, the system iteratively probes parameters and refreshes the state at its own level and adjacent context levels. Each iteration uses the output of the previous round as the initial boundary condition for the new round. Through layer-by-layer progressive closed-loop feedback, it gradually approaches and converges to the optimal control equilibrium point of the system under the current extreme conditions.
[0085] In the multi-level iterative solution space, due to the strong nonlinear coupling and objective conflicts between the optimization contents of each sub-node, such as the mutual exclusion between real-time performance and throughput, the system introduces a non-dominated sorting genetic mechanism to replace the traditional single optimization algorithm. The system encodes the optimization parameters at each level into a chromosome population of the genetic algorithm. In each iteration, the population is sorted in a non-dominated hierarchical manner according to multiple mutually constraining optimization objectives. By simulating the crossover and mutation operations of biological evolution, the algorithm drives the population to evolve towards the Pareto optimal frontier in the huge solution space, thereby selecting a set of mutually uncompromising optimal control parameter combinations in the multi-objective game.
[0086] When the non-dominated sorting genetic mechanism generates a dominant individual with significant gains at a certain iteration layer, the system immediately triggers gradient backpropagation in the control link. This process reverses the incremental gains obtained in the high-dimensional policy space along the topological edges of the gateway knowledge graph, precisely quantifies and decomposes them into adjustments that drive state transitions in each specific execution node at the bottom layer. Based on these decomposed gradient values, the system triggers policy remapping in the local control policy tables of each child node, forcibly transforming the abstract evolutionary advantage into specific micro-physical actions such as setting hardware registers, redirecting interrupt vectors, or reorganizing DMA channels.
[0087] Through continuous genetic iteration, gradient backpropagation, and policy remapping, the system ultimately solidifies the discrete optimization projects into a stable architecture with high self-healing and adaptive capabilities. This establishes a multi-level control system for industrial gateways. This system breaks away from the flat, single-threaded processing logic of traditional gateways, forming a three-dimensional network within which the underlying hardware driver level, the middle protocol conversion level, and the top bus mapping level are nested and mutually constrained. In this system, the parameter adjustment of any child node will automatically trigger the coordinated following of other level nodes along the gradient backpropagation path according to the weight ratio determined by the non-dominated sorting, thus presenting a rigorous cross-level collaborative relationship as a whole.
[0088] Specifically, the system initiates multi-level iterations for the optimization content determined in the preceding steps. The system not only repeatedly adjusts the DI filtering threshold at the "interrupt controller" level, but also extends the iteration upwards to the "Modbus protocol stack" to adjust the polling timeout window, and even further upwards to the "EtherCATSlot / Module mapping logic" to adjust the priority of data packaging. This cyclical iteration across the bottom, middle and top levels attempts to find a globally optimal solution that can simultaneously accommodate high-frequency DI and dual serial port concurrency.
[0089] Faced with the sharp contradiction between reducing the interrupt response frequency at the lower level and ensuring the real-time performance of Modbus polling at the middle level, the system introduces a non-dominated sorting genetic mechanism. The system uses "interrupt masking time length" and "number of registers read in a single Modbus operation" as chromosomes for crossover and mutation. In the iterative evolution, the algorithm found that simply shortening the masking time would lead to CPU overload, and simply reducing the number of reads would lead to incomplete data. The non-dominated sorting mechanism determined a brilliant compromise on the Pareto front: "extending the DI interrupt masking to the microsecond-level critical point, but at the same time utilizing the dead time of this masking period to move Modbus data in the background in a DMA manner," thus achieving the optimal balance between the two conflicting objectives.
[0090] The system triggers gradient backpropagation and policy remapping for this compromise solution; the global reward gradient generated by the genetic algorithm is backpropagated along the knowledge graph: it is backpropagated downwards to the 16-way DI child nodes, triggering policy remapping, remapping the underlying execution policy of its hardware interrupt from "simply clear the flag" to "clear the flag and synchronously trigger Modbus DMA request"; it is backpropagated upwards to the EtherCAT mapping child nodes, remapping its policy to "finally determine the Slot data after detecting the interrupt flag of DMA transfer completion"; the abstract algorithm reward is precisely converted into the specific linkage operation of the underlying hardware.
[0091] The system establishes a multi-level control architecture and presents a cross-level collaborative relationship. Thus, the industrial gateway is no longer a system where individual modules operate independently, but rather a robust cross-level collaborative control system is established: when the top-level EtherCAT network sends a high-priority synchronization clock pulse, the signal penetrates downwards along the control architecture, coordinating with the bottom-level DI nodes to proactively relinquish temporary bus arbitration rights, while simultaneously coordinating with the middle-level serial port nodes to precisely control the transmission interval of Modbus frames. Each sub-node forms a cross-level collaborative relationship between different control levels, much like meshing gears, completely taming communication chaos under extreme operating conditions and ensuring the absolute real-time and reliable nature of production line control commands.
[0092] Please see Figure 6 , Figure 6 This is a schematic diagram of the structural composition of a control system for an industrial gateway based on a communication protocol according to an embodiment of the present invention; the control system for the industrial gateway based on the communication protocol is applied to the above-described control method for the industrial gateway based on the communication protocol; the control system for the industrial gateway based on the communication protocol includes: Gateway module 21 is used to collect the combination of operating condition data of industrial gateway, determine multiple working characteristics based on the detection of the combination of operating condition data, construct the corresponding gateway knowledge graph in combination with the computing power resources corresponding to the industrial gateway, determine multiple sub-nodes of different levels based on the identification of the gateway knowledge graph, and mark the communication information of each sub-node. The primary control module 22 is used to input the communication information of each sub-node into the same communication space, synchronously acquire the corresponding communication protocol, determine the corresponding communication path based on the dynamic identification of the communication protocol, and further combine the communication information of each sub-node and the communication constraint relationship corresponding to the industrial gateway to determine the primary control event of the industrial gateway. The configuration optimization module 23 is used to determine multiple key communication factors based on the identification of the primary control event, load the multiple key communication factors into the digital twin space, and perform dynamic simulation in the digital twin space in combination with the communication delay parameters of the industrial gateway, so as to output the configuration optimization event of the industrial gateway in the communication process. The multi-level control module 24 is used to determine multiple configuration optimization items based on the detection of the configuration optimization event, mark the execution status of each configuration optimization item, and further combine the gateway knowledge graph and the time-series evolution mechanism to determine the content to be optimized for each sub-node. Based on the multi-level iteration of the content to be optimized for each sub-node, the multi-level control system of the industrial gateway is determined.
[0093] It should be noted that although multiple modules are mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or modules described above can be embodied in one module. Conversely, the features and functions of one module described above can be further divided and embodied by multiple modules.
[0094] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only.
[0095] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A control method for an industrial gateway based on a communication protocol, characterized in that, include: The system collects a combination of operating condition data from industrial gateways, determines multiple operating characteristics based on the detection of this combination of operating condition data, constructs a corresponding gateway knowledge graph by combining the computing resources corresponding to the industrial gateway, identifies multiple child nodes at different levels based on the identification of the gateway knowledge graph, and marks the communication information of each child node. The communication information of each sub-node is input into the same communication space, the corresponding communication protocol is obtained synchronously, the corresponding communication path is determined according to the dynamic identification of the communication protocol, and the primary control event of the industrial gateway is determined by combining the communication information of each sub-node and the communication constraint relationship corresponding to the industrial gateway. Based on the identification of the primary control event, multiple key communication factors are identified, and these factors are loaded into the digital twin space. Dynamic simulation is then performed in the digital twin space in conjunction with the communication delay parameters of the industrial gateway to output the configuration optimization event of the industrial gateway during the communication process. Based on the detection of this configuration optimization event, multiple configuration optimization projects are identified, and the execution status of each configuration optimization project is marked. Furthermore, by combining the gateway knowledge graph and the time-series evolution mechanism, the content to be optimized for each sub-node is determined. Based on the multi-level iteration of the content to be optimized for each sub-node, the multi-level control system of the industrial gateway is determined.
2. The control method for an industrial gateway based on a communication protocol according to claim 1, characterized in that, The process involves collecting operational data from the industrial gateway, identifying multiple operational characteristics based on the detection of this data combination, constructing a corresponding gateway knowledge graph by combining it with the computing resources corresponding to the industrial gateway, identifying multiple child nodes at different levels based on the recognition of this gateway knowledge graph, and marking the communication information of each child node, including: For industrial gateways, multimodal data perception is performed, and the combination of operating condition data of the industrial gateway is determined during the data perception process. This combination of operating condition data covers the underlying bus throughput, dynamic memory load, network jitter, and physical environment parameters. The combination of operating condition data is dynamically detected, and further combined with the manifold learning mechanism to trigger the extraction of nonlinear features, thereby determining multiple operating characteristics of the industrial gateway under complex operating conditions.
3. The control method for an industrial gateway based on a communication protocol according to claim 2, characterized in that, The process of collecting operational data from the industrial gateway, determining multiple operational characteristics based on the detection of this data combination, constructing a corresponding gateway knowledge graph based on the computing resources corresponding to the industrial gateway, identifying multiple child nodes at different levels based on the recognition of this gateway knowledge graph, and marking the communication information of each child node, also includes: The computing resources corresponding to the industrial gateway are obtained, and the fragmented distribution characteristics of the computing resources are marked. Then, topology evolution is carried out by combining multiple working characteristics, and a gateway knowledge graph corresponding to the industrial gateway is constructed. The gateway knowledge graph is dynamically identified, and a neural network is introduced to detect multiple child nodes of different levels in different dimensions. The multiple child nodes are in a reciprocal relationship. The corresponding type communication information is marked for each child node. The type communication information includes data semantics, protocol cluster features and context association information.
4. The control method for an industrial gateway based on a communication protocol according to claim 1, characterized in that, The process involves inputting the communication information of each sub-node into the same communication space, synchronously acquiring the corresponding communication protocol, determining the corresponding communication path based on the dynamic identification of the communication protocol, and further combining the communication information of each sub-node with the communication constraint relationship corresponding to the industrial gateway to determine the primary control events of the industrial gateway, including: The system acquires the communication information of each child node, performs cross-domain mapping on the type communication information of each child node, and inputs it into the same communication space. Combined with the alignment mechanism of the communication space, it triggers the spatiotemporal alignment of the type communication information of each child node, synchronously acquires the corresponding communication protocol, performs dynamic identification of the communication protocol, and introduces deep reinforcement learning in the identification process, so as to achieve adaptive reverse parsing of the communication protocol without prior protocol documents, and further outputs the corresponding communication path.
5. The control method for an industrial gateway based on a communication protocol according to claim 4, characterized in that, The process of inputting communication information from each sub-node into the same communication space, synchronously acquiring the corresponding communication protocol, determining the corresponding communication path based on the dynamic identification of the communication protocol, and further determining the primary control events of the industrial gateway by combining the communication information of each sub-node with the communication constraint relationship corresponding to the industrial gateway, also includes: The system performs routing on the communication path and combines it with graph attention network for dynamic detection, thereby autonomously perceiving the spatiotemporal evolution trend of communication congestion along the communication path. It also performs multi-objective calculations by combining the communication information of each sub-node and the communication constraints of the industrial gateway in multi-service concurrent scenarios, thereby determining the primary control events of the industrial gateway.
6. The control method for an industrial gateway based on a communication protocol according to claim 1, characterized in that, The process involves identifying multiple key communication factors based on the recognition of the primary control event, loading these factors into a digital twin space, and dynamically simulating the communication latency parameters of the industrial gateway within this digital twin space. This simulation outputs configuration optimization events for the industrial gateway during the communication process, including: The primary control event is dynamically identified, and multiple communication control contents are determined by combining a causal inference network during the identification process. The corresponding key communication factors are determined by multi-level iteration along each communication control content, so as to obtain multiple key communication factors. Each key communication factor presents the core causal features that determine the quality of communication.
7. The control method for an industrial gateway based on a communication protocol according to claim 6, characterized in that, The process of identifying multiple key communication factors based on the recognition of the primary control event, loading these key communication factors into a digital twin space, and performing dynamic simulation in this digital twin space in conjunction with the communication delay parameters of the industrial gateway to output configuration optimization events of the industrial gateway during the communication process, further includes: Multiple key communication factors are loaded into the corresponding digital twin space, and dynamic simulation of multi-physics coupling is performed in the digital twin space by combining the physical mapping mechanism and the communication delay parameters of the industrial gateway. This allows for the prediction of communication bottlenecks under extreme working conditions, and finally outputs the configuration optimization events of the industrial gateway during the communication process.
8. The control method for an industrial gateway based on a communication protocol according to claim 1, characterized in that, The process involves identifying multiple configuration optimization items based on the detection of the configuration optimization event, marking the execution status of each optimization item, further combining the gateway knowledge graph and temporal evolution mechanism to determine the content to be optimized for each sub-node, and determining the multi-level control system of the industrial gateway based on the multi-level iteration of the content to be optimized for each sub-node, including: Configuration optimization events are detected, and multiple optimization paths are determined during the detection process. The corresponding configuration optimization items are identified by tracing along each optimization path to obtain multiple configuration optimization items. In each configuration optimization item, the status of the configuration optimization item is evaluated, and the execution status of each configuration optimization item is further determined by combining fuzzy logic.
9. The control method for an industrial gateway based on a communication protocol according to claim 8, characterized in that, The process of identifying multiple configuration optimization items based on the detection of the configuration optimization event, marking the execution status of each configuration optimization item, further combining the gateway knowledge graph and temporal evolution mechanism to determine the content to be optimized for each sub-node, and determining the multi-level control system of the industrial gateway based on the multi-level iteration of the content to be optimized for each sub-node, also includes: The execution status of each configuration optimization project is marked with confidence weights. Then, the global association attributes of the gateway knowledge graph and the temporal evolution mechanism based on the long short-term memory network are combined to trigger the corresponding joint inference, thereby determining the content to be optimized for each sub-node under different time slices. The optimization content of each sub-node is iterated in multiple levels, and a non-dominated sorting genetic mechanism is introduced in the iteration process. Gradient backpropagation and policy remapping are performed in each adjustment of the sub-node, thereby determining the multi-level control system of the industrial gateway. The multi-level control system presents the cross-level collaborative relationship of each sub-node.
10. A control system for an industrial gateway based on a communication protocol, characterized in that, The control system of the communication protocol-based industrial gateway is applied to the control method of the communication protocol-based industrial gateway as described in any one of claims 1-9; the control system of the communication protocol-based industrial gateway includes: The gateway module is used to collect a combination of operating condition data from industrial gateways, determine multiple operating characteristics based on the detection of this combination of operating condition data, construct a corresponding gateway knowledge graph by combining the computing resources corresponding to the industrial gateway, determine multiple child nodes of different levels based on the identification of the gateway knowledge graph, and mark the communication information of each child node. The primary control module is used to input the communication information of each sub-node into the same communication space, synchronously acquire the corresponding communication protocol, determine the corresponding communication path based on the dynamic identification of the communication protocol, and further determine the primary control events of the industrial gateway by combining the communication information of each sub-node and the communication constraint relationship corresponding to the industrial gateway. The configuration optimization module is used to identify multiple key communication factors based on the identification of the primary control event, load the multiple key communication factors into the digital twin space, and perform dynamic simulation in the digital twin space in combination with the communication delay parameters of the industrial gateway to output the configuration optimization event of the industrial gateway in the communication process. The multi-level control module is used to determine multiple configuration optimization items based on the detection of the configuration optimization event, and mark the execution status of each configuration optimization item. It further combines the gateway knowledge graph and the time-series evolution mechanism to determine the content to be optimized for each sub-node, and determines the multi-level control system of the industrial gateway based on the multi-level iteration of the content to be optimized for each sub-node.