DCS autonomous transformation method and system based on redundant control module hot switching
By constructing a digital twin control module and a fusion representation method, combined with a state snapshot buffer queue and rollback anchor mechanism, the problem of seamless switching during DCS control module upgrades was solved, realizing seamless upgrades and production continuity of the DCS system, and improving the reliability and autonomous controllability of system transformation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-06
- Publication Date
- 2026-04-03
AI Technical Summary
Upgrading traditional DCS control modules requires downtime, leading to production interruptions. Furthermore, existing hot-switching technologies lack the ability to accurately model and visualize the interactions between complex control modules, making it difficult to achieve seamless switching and optimization.
By constructing a digital twin control module, dynamic visualization and deduction are performed using a fusion representation of control flow graphs and data dependency graphs. Combined with a state snapshot buffer queue and rollback anchor mechanism, precise hot switching and state synchronization between modules are achieved, switching contingency plans are generated, and synchronization compensation strategies are optimized.
It has enabled seamless upgrades and transformations of the DCS system, ensuring production continuity and stability, improving the reliability and flexibility of system transformation, reducing the risk of data loss and control fluctuations, and enhancing independent controllability.
Smart Images

Figure CN121785281A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to distributed control system technology, and more particularly to a method and system for autonomous DCS transformation based on hot switching of redundant control modules. Background Technology
[0002] Distributed control systems (DCS), as the core infrastructure in the field of industrial automation control, are widely used in the control of critical industrial processes in power, petrochemical, and metallurgical industries. With the increasing demands for continuity and safety in industrial production, upgrading and modifying DCS control modules without interrupting production has become a key technical challenge for the maintenance and updating of industrial control systems.
[0003] Traditional DCS control module upgrades typically require system downtime, which can result in significant economic losses for continuous production enterprises. To address this issue, redundant control module hot-switching technology has emerged. Its core idea is to achieve seamless online switching by constructing a redundant backup system, ensuring the continuity of the production process. With the development of digital twin technology, introducing the digital twin concept into the DCS hot-switching process enables accurate modeling of complex control systems and simulation verification before switching, providing a new technical path for the safe and stable switching of control modules.
[0004] Traditional hot-switching methods lack the ability to accurately model the impact of interactions between complex control modules. In complex DCS environments with multiple coupled modules, the switching of a single module can trigger a chain reaction. Existing technologies struggle to accurately predict such complex interactions, increasing the uncertainty and risk of the switching process.
[0005] Existing switchover schemes lack effective mechanisms for handling instantaneous state inconsistencies during the switchover process. During the switchover, there is an inevitable state synchronization delay between the old and new control modules. This state inconsistency can lead to control command jitter or even erroneous execution, affecting the stability of the production process.
[0006] Current hot-swapping technologies generally lack the ability to visualize and simulate the switching process and to review the changes. System operators find it difficult to intuitively understand the potential impact of switching plans and cannot systematically summarize experience from executed switching processes. This makes it difficult to continuously optimize switching plans and accumulate knowledge, thus hindering the improvement of DCS's independent transformation capabilities. Summary of the Invention
[0007] This invention provides a method and system for autonomous DCS transformation based on hot switching of redundant control modules, which can solve the problems in the prior art.
[0008] A first aspect of this invention provides a method for autonomous DCS modification based on hot switching of redundant control modules, comprising: Acquire real-time operating data, topological connections, and cross-module interactive data streams of the target control module in the distributed control system; perform digital twin modeling on the real-time operating data, topological connections, and cross-module interactive data streams based on a multi-level mapping mechanism to construct a digital twin control module; Based on the digital twin control module, the visualization layer adopts a fusion representation of control flow graph and data dependency graph to dynamically visualize and deduce the interaction effects of the control module to be switched, and generate a switching plan based on the deduction results. Based on the aforementioned switching plan, a state transition channel is established between the physical control module and the control module to be switched by constructing a state snapshot buffer queue and a rollback anchor point mechanism, and a hot switching execution plan is generated according to the state transition channel. The switching operation is executed according to the hot switching execution scheme. The state deviation data generated during the switching process is collected and applied to optimize the synchronization compensation strategy in the multi-level mapping mechanism. At the same time, the executed switching process is reviewed and analyzed by using the fusion representation method of the control flow graph and the data dependency graph.
[0009] Based on a multi-level mapping mechanism, digital twin modeling is performed on the real-time operating data, the topological connection relationships, and the cross-module interactive data flow to construct a digital twin control module, including: The real-time running data is timestamped and semantically classified, dividing it into state data and event data. Based on the topological connection relationship, a connection matrix and signal transmission path between modules are constructed, and the nodes in the connection matrix are associated with the state data and the event data to form a topological association model. Using the aforementioned topological association model as a basic framework, cross-layer data transmission rules are established, and the cross-module interactive data flow is parsed in layers according to the different semantic requirements of the control logic layer and the visualization presentation layer. The node mapping relationship in the topological association model is deeply integrated with the cross-layer data transmission rules to construct a multi-dimensional mapping structure. On this basis, a bidirectional real-time mapping channel from the physical control module to the digital twin control module is established. Based on the multidimensional mapping structure and the bidirectional real-time mapping channel, state synchronization and event response between the physical control module and the digital twin control module are realized, and the dynamic construction of the digital twin control module is completed.
[0010] The node mapping relationships in the topological association model are deeply integrated with the cross-layer data transmission rules to construct a multi-dimensional mapping structure. Based on this, a bidirectional real-time mapping channel from the physical control module to the digital twin control module is established, including: Extract the source node identifier, target node identifier, and connection attributes between nodes from the node mapping relationship in the topology association model; perform matching analysis between the source node identifier, target node identifier, and connection attributes and the cross-layer data transmission rules to generate a fusion mapping rule set; A multi-dimensional mapping structure is constructed based on the fusion mapping rule set. A forward real-time mapping channel from the physical control module to the digital twin control module is established using the multi-dimensional mapping structure. The operating status data of the physical control module is transmitted to the digital twin control module through the forward real-time mapping channel according to the state synchronization time window. Based on the multidimensional mapping structure, a reverse real-time mapping channel is established from the digital twin control module to the physical control module. The control commands generated by the digital twin control module are transmitted back to the physical control module according to the cross-layer data transmission rules, thus forming a bidirectional real-time mapping channel.
[0011] Based on the digital twin control module, a fusion representation of control flow graphs and data dependency graphs is used in the visualization layer to dynamically visualize and deduce the interaction effects of the control module to be switched. A switching plan is generated based on the deduction results, including: Extract the execution path sequence and state transition sequence of the control module to be switched from the control logic layer of the digital twin control module, convert the execution path sequence into nodes and directed edges in the control flow graph, and convert the state transition sequence into data nodes and dependency edges in the data dependency graph. The directed edges in the control flow graph and the dependency edges in the data dependency graph are correlated and analyzed to identify the data interaction nodes between the control module to be switched and other distributed control modules. Based on the data interaction nodes, a cross-module influence propagation path is constructed to form a fusion representation structure. In the visualization presentation layer, the switching process of the control module to be switched is time-series deduced based on the fusion representation structure. By tracing the changes in the execution path sequence and the evolution of the state transition sequence along the cross-module influence propagation path, a dynamic visualization demonstration sequence is generated. The switching time points and inter-module dependencies are extracted from the dynamic visualization demonstration sequence. Switching timing constraints are determined based on the switching time points, and inter-module dependency constraints are determined based on the inter-module dependencies. The switching timing constraints and inter-module dependency constraints are combined to form a switching plan.
[0012] In the visualization layer, the switching process of the control module to be switched is time-series deduced based on the fusion representation structure. By tracing the changes in the execution path sequence and the evolution of the state transition sequence along the cross-module influence propagation path, a dynamic visualization demonstration sequence is generated, including: Based on the control flow graph nodes and data dependency graph nodes in the fusion representation structure, the current running state of the control module to be switched is set as the starting point of the deduction, the target switching state is set as the ending point of the deduction, and the deduction process is divided into multiple consecutive time-series deduction steps according to the complexity of the state transition. For each time-series simulation step, the state of the execution node in the execution path sequence is calculated along the cross-module influence propagation path. Based on the result of the evolution calculation, the corresponding state transition in the state transition sequence is triggered. The cascading effect of the corresponding state transition is sequentially transmitted to other associated distributed control modules along the cross-module influence propagation path. At the end of each time-series simulation step, a state snapshot of each control module is generated and recorded. The state snapshot is used to compare and analyze the state changes between adjacent time-series extrapolation steps, and the change trajectory of the execution path sequence and the evolution trajectory of the state transition sequence are extracted; based on the change trajectory and the evolution trajectory, a visualization frame sequence is generated in the visualization presentation layer; The visualization frame sequence is assembled sequentially according to the strict temporal relationship of each temporal deduction step to obtain a dynamic visualization demonstration sequence from the deduction start point to the deduction end point.
[0013] Based on the aforementioned switching plan, a state transition channel is established between the physical control module and the control module to be switched by constructing a state snapshot buffer queue and a rollback anchor point mechanism. A hot-switching execution plan is generated according to the state transition channel, including: The switching timing constraints and inter-module dependency constraints are extracted from the switching plan. The collection time sequence of state snapshots is determined according to the switching timing constraints. At each time of the collection time sequence, the operating status data of the physical control module is collected and the operating status data is stored in the state snapshot buffer queue in chronological order to form a complete state snapshot queue. Based on the running status data recorded in the status snapshot queue, and combined with the inter-module dependency constraints, each status snapshot is analyzed to identify the status snapshots that meet the rollback conditions; the status snapshots that meet the rollback conditions are marked as rollback anchor points, and a corresponding status recovery mapping relationship is established for each of the rollback anchor points; By utilizing the continuous state records in the state snapshot queue and the state recovery mapping relationship, a state transition channel containing a forward transition path and a rollback protection path is established; based on the forward transition path, an execution step sequence for state transition is formulated, and at the same time, a rollback step sequence for abnormal situations is designed according to the rollback protection path; The execution step sequence and the rollback step sequence are systematically combined to form a hot-swap execution scheme that includes a normal switching process and an exception handling mechanism.
[0014] The switching operation is executed according to the hot-switching execution scheme. State deviation data generated during the switching process is collected and applied to optimize the synchronization compensation strategy in the multi-level mapping mechanism. Simultaneously, a post-mortem analysis of the executed switching process is performed using the fusion representation of the control flow graph and the data dependency graph, including: The switching operation is executed sequentially according to the sequence of execution steps in the hot switching execution scheme. During the execution process, the state deviation data is collected in real time for each execution step. The state deviation data is then associated and labeled according to the switching sequence and stored in the database. Based on the state deviation data, the corresponding mapping level is located in the multi-level mapping mechanism, and the mapping node and mapping path that cause the deviation are identified. The state synchronization triggering conditions of the mapping node are dynamically adjusted, and the data transmission timing constraints of the mapping path are optimized to form an updated synchronization compensation strategy. By using the fusion representation method of the control flow graph and the data dependency graph, the actual execution path and state transition sequence in the executed switching process are visually reconstructed, the deviation position is marked in the control flow graph, and the difference path is marked in the data dependency graph; Based on the causal correlation analysis of the deviation position and the difference path, the influencing factors that cause the state deviation are extracted, the influencing factors are systematically correlated with the updated synchronization compensation strategy, and the executed switching process is reviewed and analyzed.
[0015] A second aspect of the present invention provides a DCS autonomous transformation system based on hot switching of redundant control modules, comprising: The first module is used to acquire real-time operating data, topological connections, and cross-module interactive data streams of the target control module in the distributed control system; and to construct a digital twin control module by performing digital twin modeling on the real-time operating data, topological connections, and cross-module interactive data streams based on a multi-level mapping mechanism. The second module is used to dynamically visualize and deduce the interaction effects of the control module to be switched based on the digital twin control module in the visualization presentation layer by using a fusion representation method of control flow graph and data dependency graph, and generate a switching plan based on the deduction results. The third module is used to establish a state transition channel between the physical control module and the control module to be switched based on the switching plan by constructing a state snapshot buffer queue and a rollback anchor point mechanism, and to generate a hot switching execution plan according to the state transition channel. The fourth module is used to perform a switching operation according to the hot switching execution scheme, collect state deviation data generated during the switching process, apply the state deviation data to optimize the synchronization compensation strategy in the multi-level mapping mechanism, and at the same time use the fusion representation method of the control flow graph and the data dependency graph to perform a review analysis of the executed switching process.
[0016] A third aspect of the present invention provides an electronic device, comprising: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.
[0017] A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.
[0018] The beneficial effects of this application are as follows: The DCS autonomous transformation method based on hot switching of redundant control modules achieves seamless switching during the upgrade and transformation of the control system by constructing a digital twin control module, ensuring the continuity and stability of industrial production and avoiding downtime losses and safety risks in traditional transformation methods.
[0019] This invention employs a fusion representation method combining control flow graphs and data dependency graphs, along with a state snapshot buffer queue and rollback anchor mechanism, to achieve precise hot switching between modules in complex industrial control systems. This significantly improves the reliability and flexibility of system transformation and reduces the risk of data loss and control fluctuations during the switching process.
[0020] This method continuously optimizes the synchronization compensation strategy in the multi-level mapping mechanism by collecting and analyzing state deviation data during the switching process, forming a system upgrade methodology of adaptive iterative improvement. This enhances the autonomous controllability and technical barriers of the distributed control system, and is of great significance for promoting the localization of industrial control systems. Attached Figure Description
[0021] Figure 1 This is a flowchart illustrating the DCS autonomous transformation method based on hot switching of redundant control modules according to an embodiment of the present invention. Figure 2 This is a flowchart illustrating the generation of a hot-switching execution scheme in a distributed control system according to an embodiment of the present invention. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0023] The technical solution of the present invention will be described in detail below with reference to specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0024] Figure 1 This is a flowchart illustrating the DCS autonomous transformation method based on hot switching of redundant control modules according to an embodiment of the present invention. Figure 1 As shown, the method includes: Acquire real-time operating data, topological connections, and cross-module interactive data streams of the target control module in the distributed control system; perform digital twin modeling on the real-time operating data, topological connections, and cross-module interactive data streams based on a multi-level mapping mechanism to construct a digital twin control module; Based on the digital twin control module, the visualization layer adopts a fusion representation of control flow graph and data dependency graph to dynamically visualize and deduce the interaction effects of the control module to be switched, and generate a switching plan based on the deduction results. Based on the aforementioned switching plan, a state transition channel is established between the physical control module and the control module to be switched by constructing a state snapshot buffer queue and a rollback anchor point mechanism, and a hot switching execution plan is generated according to the state transition channel. The switching operation is executed according to the hot switching execution scheme. The state deviation data generated during the switching process is collected and applied to optimize the synchronization compensation strategy in the multi-level mapping mechanism. At the same time, the executed switching process is reviewed and analyzed by using the fusion representation method of the control flow graph and the data dependency graph.
[0025] In one optional implementation, a digital twin control module is constructed by performing digital twin modeling on the real-time running data, the topological connection relationships, and the cross-module interactive data flow based on a multi-level mapping mechanism, including: The real-time running data is timestamped and semantically classified, dividing it into state data and event data. Based on the topological connection relationship, a connection matrix and signal transmission path between modules are constructed, and the nodes in the connection matrix are associated with the state data and the event data to form a topological association model. Using the aforementioned topological association model as a basic framework, cross-layer data transmission rules are established, and the cross-module interactive data flow is parsed in layers according to the different semantic requirements of the control logic layer and the visualization presentation layer. The node mapping relationship in the topological association model is deeply integrated with the cross-layer data transmission rules to construct a multi-dimensional mapping structure. On this basis, a bidirectional real-time mapping channel from the physical control module to the digital twin control module is established. Based on the multidimensional mapping structure and the bidirectional real-time mapping channel, state synchronization and event response between the physical control module and the digital twin control module are realized, and the dynamic construction of the digital twin control module is completed.
[0026] During the implementation of timestamping and semantic classification of real-time operational data, the data acquisition module obtains raw data streams from each sensor node of the control system at a preset sampling frequency. Each data packet carries a system clock stamp with nanosecond-level precision. Timestamps are stored in UTC format with microsecond-level precision, ensuring consistency in data timing across modules. The semantic classifier divides the input stream into two categories based on data content characteristics: state data includes instantaneous values of continuous variables such as temperature, pressure, and flow rate, with a typical update frequency of 100 milliseconds to 1 second, and numerical ranges pre-configured boundary thresholds based on sensor ranges; event data covers discrete state changes such as switching actions, alarm triggers, and mode switching, stored as a combination of timestamps and state identifiers. The state identifiers use 16-bit integer encoding, supporting the differentiation of various event types.
[0027] In the technical implementation of constructing a connection matrix between modules based on topological connections, the connection matrix adopts a sparse matrix storage format. The matrix dimension is equal to the square of the total number of modules in the control system, and the matrix element values represent the connection weights between modules. Weight calculation considers three dimensions: signal strength, transmission delay, and communication bandwidth. The weight values are limited to between 0 and 1, where 0 represents no connection and 1 represents the strongest connection. Signal transmission paths are constructed using a graph traversal algorithm with a breadth-first search strategy. The path depth is limited to 8 layers to avoid excessively deep transmission links affecting real-time performance. The association mapping between nodes and state data is implemented using a hash table. The key corresponds to the module identifier, and the value contains a list of state data related to that module. Each state data item includes attributes such as data type, value range, update frequency, and historical cache length. The association mapping of event data uses a similar structure but additionally includes attributes such as event priority, propagation range, and response time. The topological association model is persistently stored in a graph database format, supporting dynamic node addition and deletion and connection relationship updates.
[0028] In establishing cross-layer data transmission rules, the control logic layer prioritizes data real-time performance and accuracy, requiring data transmission latency to be controlled within 10 milliseconds, and maintaining the original acquisition accuracy without degradation. The visualization layer focuses more on data readability and display effects, allowing for moderate data smoothing and format conversion, with an update frequency as low as 500 milliseconds, and data precision can be reasonably rounded according to display requirements. The hierarchical parser automatically selects the appropriate processing strategy based on the data target level. Data from the control logic layer is directly transmitted, maintaining the original timestamps and values. Data from the visualization layer undergoes filtering, using a moving average window length of 5 sampling points, and an outlier detection threshold set to the mean plus or minus 3 times the standard deviation. Cross-module interactive data streams are classified and routed according to data type, urgency, and transmission target. High-priority data is transmitted through a dedicated channel, while ordinary data is transmitted in batches through a shared channel. The transmission protocol supports data compression and verification, with compression rates typically reaching 30% to 50%, and verification using the CRC32 algorithm to ensure data integrity.
[0029] The multidimensional mapping structure is constructed based on the deep integration of topological association models and cross-layer data transfer rules. The mapping structure adopts a multi-layer neural network architecture, comprising three layers: an input layer, a hidden layer, and an output layer. The number of nodes in the input layer equals the total data dimension of the physical control module, typically between 100 and 1000 nodes, with each node corresponding to a specific physical quantity or state variable. The hidden layer uses a two-layer structure: the first layer has 80% of the number of nodes as the input layer, and the second layer has 60% of the number of nodes as the input layer. The ReLU activation function is used to avoid the gradient vanishing problem. The number of nodes in the output layer is consistent with the number of state variables in the digital twin module, and the output values are normalized to a range of 0 to 1. Network weights are initialized using the Xavier method, with a learning rate of 0.001, a batch size of 32, and the number of training iterations dynamically adjusted based on convergence, typically between 1000 and 5000.
[0030] The bidirectional real-time mapping channel relies on a high-speed data transmission bus with a bandwidth of no less than 1Gbps, supporting full-duplex communication. The physical-to-digital mapping channel synchronizes the real-time status of the physical control module to the digital twin module, with transmission latency controlled within 5 milliseconds and data packet size limited to 1KB, supporting data fragmentation and reassembly. The digital-to-physical mapping channel sends control commands from the digital twin module to the physical module. The command format uses a standardized protocol, including fields such as module identifier, operation type, parameter value, and timestamp. A command execution confirmation mechanism ensures operational reliability. The mapping channel is configured with a buffer queue with a depth of 100 data packets, employing a first-in, first-out (FIFO) strategy; the oldest data packet is automatically discarded when the queue overflows. The channel health monitoring mechanism checks the communication status every second; an alarm is triggered if there is no response for more than 3 seconds, and an automatic reconnection mechanism is triggered if there is more than 10 seconds of inactivity.
[0031] In the implementation of state synchronization and event response, state synchronization employs a strategy combining periodic full synchronization and incremental real-time synchronization. Full synchronization is performed once per minute to ensure eventual data consistency, while incremental synchronization transmits changed data in real time to guarantee response speed. The synchronization accuracy threshold is set according to the data type: 0.1% accuracy for analog data and complete consistency for digital data. The event response mechanism is based on a publish-subscribe model. Upon the occurrence of an event in the physical module, an event notification is immediately pushed to the digital twin module, containing information such as the event type, occurrence time, and relevant parameters. After receiving the event, the digital twin module updates its internal state and generates corresponding control strategies according to preset rules. The strategy execution time window is within 100 milliseconds after the event occurs.
[0032] In one optional implementation, the node mapping relationships in the topological association model are deeply integrated with the cross-layer data transmission rules to construct a multi-dimensional mapping structure. Based on this, a bidirectional real-time mapping channel is established from the physical control module to the digital twin control module, including: Extract the source node identifier, target node identifier, and connection attributes between nodes from the node mapping relationship in the topology association model; perform matching analysis between the source node identifier, target node identifier, and connection attributes and the cross-layer data transmission rules to generate a fusion mapping rule set; A multi-dimensional mapping structure is constructed based on the fusion mapping rule set. A forward real-time mapping channel from the physical control module to the digital twin control module is established using the multi-dimensional mapping structure. The operating status data of the physical control module is transmitted to the digital twin control module through the forward real-time mapping channel according to the state synchronization time window. Based on the multidimensional mapping structure, a reverse real-time mapping channel is established from the digital twin control module to the physical control module. The control commands generated by the digital twin control module are transmitted back to the physical control module according to the cross-layer data transmission rules, thus forming a bidirectional real-time mapping channel.
[0033] The system extracts key elements of the node mapping relationships in the topology association model. These key elements include source node identifiers, target node identifiers, and connection attributes between nodes. The source node identifier is the unique identifier of the device node in the physical control module, such as "PLC-001" representing a programmable logic controller. The target node identifier is the corresponding virtual node identifier in the digital twin environment, such as "DT-PLC-001". Connection attributes describe the relationship characteristics between the two nodes, such as the data transmission method "MQTT", transmission frequency "100ms", and data type "integer array". The system extracts all mapping pairs by traversing the node relationship graph of the topology association model. For example, it extracts the mapping relationship between the sensor node group "Sensor-Group-A" (containing temperature sensor "TS-101", pressure sensor "PS-102", and flow sensor "FS-103") on the physical production line and the corresponding virtual sensor group "DT-Sensor-Group-A" in the digital twin environment.
[0034] After extracting the node mapping relationships, these relationships are matched and analyzed with cross-layer data transfer rules. These rules define specific specifications for how data is transferred between different layers. For example, rule "Rule-001" stipulates that temperature sensor data needs to be converted to units (Celsius to Fahrenheit) before transfer; rule "Rule-002" stipulates that pressure data needs to be filtered according to a preset threshold before transfer; and rule "Rule-003" stipulates that flow rate data needs to be averaged and transferred every 5 seconds. The system pairs each mapping relationship with an applicable transfer rule; for example, it pairs the mapping from "TS-101" to "DT-TS-101" with rule "Rule-001". This matching and analysis process generates a set of fusion mapping rules, in the form of: {Source Node: "TS-101", Target Node: "DT-TS-101", Connection Attribute: {Protocol: "MQTT", Frequency: "100ms"}, Transmission Rule: "Rule-001", Conversion Function: "tempC2F"}. In this way, the system constructs detailed data transmission and conversion specifications for each pair of physical-virtual node mappings.
[0035] Based on the generated fusion mapping rule set, a multi-dimensional mapping structure is constructed. This structure is a multi-level, multi-dimensional data structure that supports indexing and access by multiple dimensions such as node type, functional domain, and physical location. The multi-dimensional mapping structure is stored in key-value pair format, where the key is a composite key containing the physical node ID, virtual node ID, and mapping type; the value contains detailed mapping rules and data transformation logic. For example, for a production line in a factory, its multi-dimensional mapping structure includes physical dimensions (the physical location of the equipment on the production line), functional dimensions (the functional module to which the equipment belongs), and data dimensions (the data types generated by the equipment). When a motor with ID "Motor-A01" on the production line needs to map its speed, temperature, and vibration data to a digital twin system, the system retrieves the corresponding mapping rules in the multi-dimensional mapping structure: {Source node: "Motor-A01", Target node: "DT-Motor-A01", Data items: ["speed", "temp", "vibration"], Transmission rules: ["Rule-010", "Rule-011", "Rule-012"]}, thus knowing how to process and forward each type of data.
[0036] Utilizing the constructed multidimensional mapping structure, a forward real-time mapping channel is established from the physical control module to the digital twin control module. This channel is a data flow pipeline that periodically collects the operating status data of the physical control module according to a state synchronization time window (e.g., 100 milliseconds). For example, the system collects joint angle data [30°, 45°, 90°, 60°, 120°, 0°], end effector status "grabbed," and operating mode "automatic" from the robot controller "Robot-Controller-01" on the physical production line. After preprocessing (e.g., unit conversion, data verification), this data is transmitted to the digital twin platform via a predefined network protocol (e.g., OPC UA). Upon receiving the data, the digital twin control module distributes it to the corresponding virtual component "DT-Robot-01" according to the rules in the multidimensional mapping structure, achieving real-time mapping from physical state to the digital twin.
[0037] A reverse real-time mapping channel is established from the digital twin control module to the physical control module based on the same multidimensional mapping structure. When new control commands are generated after simulation or optimization in the digital twin environment, such as the virtual robotic arm "DT-Robot-01" generating new motion path commands {joint angles: [35°, 50°, 85°, 65°, 110°, 10°], motion speed: 80%, motion type: "joint"}, the system will convert these commands into a format that the physical controller can understand according to the reverse mapping rules in the multidimensional mapping structure. The converted commands are sent to the physical control module "Robot-Controller-01" through the reverse channel, realizing control feedback from the digital world to the physical world. The system will verify the safety and validity of the commands to ensure that they do not cause abnormal operation of the physical equipment.
[0038] The forward and reverse channels together form a bidirectional real-time mapping channel, enabling bidirectional data exchange and control interaction between the physical control module and the digital twin control module. This bidirectional mapping mechanism allows the digital twin system not only to "see" the state of the physical world but also to "influence" its operation, achieving true physical-digital fusion control. In practical applications, the synchronization frequency of the bidirectional channel can be dynamically adjusted according to application requirements, and critical control commands can be prioritized to ensure real-time system response.
[0039] In one optional implementation, based on the digital twin control module, a fusion representation of control flow graphs and data dependency graphs is used in the visualization layer to dynamically visualize and deduce the interaction effects of the control module to be switched, and a switching plan is generated based on the deduction results, including: Extract the execution path sequence and state transition sequence of the control module to be switched from the control logic layer of the digital twin control module, convert the execution path sequence into nodes and directed edges in the control flow graph, and convert the state transition sequence into data nodes and dependency edges in the data dependency graph. The directed edges in the control flow graph and the dependency edges in the data dependency graph are correlated and analyzed to identify the data interaction nodes between the control module to be switched and other distributed control modules. Based on the data interaction nodes, a cross-module influence propagation path is constructed to form a fusion representation structure. In the visualization presentation layer, the switching process of the control module to be switched is time-series deduced based on the fusion representation structure. By tracing the changes in the execution path sequence and the evolution of the state transition sequence along the cross-module influence propagation path, a dynamic visualization demonstration sequence is generated. The switching time points and inter-module dependencies are extracted from the dynamic visualization demonstration sequence. Switching timing constraints are determined based on the switching time points, and inter-module dependency constraints are determined based on the inter-module dependencies. The switching timing constraints and inter-module dependency constraints are combined to form a switching plan.
[0040] The extraction of execution path sequences and state transition sequences in the control logic layer of the digital twin control module is achieved through a static code analysis engine. This engine parses the abstract syntax tree of the control logic code, identifying function call chains, branch structures, and loop bodies. The static code analysis engine employs a three-level processing architecture: a lexical analyzer, a syntax analyzer, and a semantic analyzer. The lexical analyzer converts the source code into a lexical unit stream, the syntax analyzer constructs an abstract syntax tree based on language syntax rules, and the semantic analyzer extracts the program's control flow and data flow information. The execution path sequence is stored using a linked list data structure. Each node contains three fields: an operation identifier, a precondition expression, and an execution time estimate. The operation identifier is a 32-bit unsigned integer, the precondition expression is a Boolean expression string, and the execution time estimate is a floating-point number in milliseconds. The state transition sequence is obtained through a state machine analyzer. The state machine analyzer scans the assignment statements and conditional statements of control variables, tracks the definition and use of variables through data flow analysis technology, and constructs a state transition graph. State identifiers are defined using enumeration types, and transition conditions are represented using predicate logic.
[0041] In the transformation from an execution path sequence to a control flow graph, each operation in the sequence is mapped to a graph node. The node data structure includes four attribute fields: node identifier, operation type, resource requirement, and execution constraint. The node identifier uses a 64-bit hash value to ensure uniqueness, employing the MD5 hash algorithm to generate a fixed-length identifier from the complete information of the operation. The operation type enumeration includes four categories: computational, I / O, synchronous, and control. Computational operations consume CPU resources, I / O operations involve external device access, synchronous operations coordinate the timing between multiple modules, and control operations change the system state. Directed edges represent execution dependencies between operations. The edge data structure includes four fields: source node identifier, target node identifier, edge weight, and transmission delay. The edge weight is normalized and calculated by analyzing the data transfer volume and call frequency between operations. In the transformation from a state transition sequence to a data dependency graph, each state variable is mapped to a data node. The data node includes four attributes: variable name, data type, value range, and update frequency. Dependency edges connect data nodes with read-write relationships. These read-write relationships are determined using a variable analysis algorithm. This algorithm tracks all references to each variable in the program, distinguishes between read and write operations, and establishes dependencies between variables.
[0042] The association analysis between directed edges in the control flow graph and dependency edges in the data dependency graph employs a bidirectional graph matching algorithm. This algorithm, based on graph isomorphism theory, establishes the correspondence between the two graphs through node attribute matching and topological comparison. The bidirectional graph matching algorithm maintains a candidate matching set and uses a backtracking search strategy to gradually expand the matching range. When a conflict is found, it reverts to the previous state and reselects. Similarity calculation is based on the cosine distance of attribute vectors. The cosine distance formula is the product of the inner product of two vectors divided by the product of their magnitudes. A distance threshold of 0.85 is set, and matches below this threshold are filtered out. Data interaction node identification is achieved through cross-graph queries. The cross-graph query algorithm traverses all nodes in both graphs, compares the data object references of the nodes, and marks nodes with identical references as interaction nodes. The construction of cross-module influence propagation paths uses a breadth-first search algorithm. Starting from the data interaction node, the breadth-first search algorithm gradually expands the search range hierarchically, maintaining an access queue and visited markers to ensure that each node is visited only once. The propagation path data structure is a directed graph. The edge weight calculation considers two factors: influence strength and propagation delay. Influence strength is calculated based on the tightness of data dependencies, and propagation delay is estimated based on the physical distance between modules and communication bandwidth.
[0043] The timing simulation based on the fusion representation structure in the visualization layer employs a discrete event-driven simulation engine. This engine, based on discrete event system theory, models system behavior as a process of event sequence processing. The discrete event-driven simulation engine maintains a global event queue and a simulation clock. The event queue is implemented using a priority queue, ordered by event trigger time. The simulation clock controls the progression of simulation time, supporting both fixed-step and event-driven modes. Timing simulation of the switching process is achieved by inserting switching-related events into the event queue. The event scheduler is responsible for event distribution and processing, calling the appropriate processing function based on the event type. Tracking changes in the execution path sequence is implemented using a path recalculation algorithm. This algorithm employs dynamic programming, recalculating the optimal execution path when the module state changes. The algorithm maintains a path cost table and a predecessor node table, finding the shortest path through iterative updates. The evolution of the state transition sequence is implemented using a state machine simulator. The state machine simulator calculates the next state based on the current state and input events. The state transition function is implemented using a lookup table method. The transition table is pre-calculated according to the state transition rules and cached in memory; the time complexity of the lookup operation is constant.
[0044] The dynamic visualization demonstration sequence is generated using keyframe interpolation technology. Keyframe technology discretizes continuous state changes into a series of key moment snapshots, with the keyframe interval determined based on system dynamism and visualization accuracy requirements. The keyframe interpolation algorithm generates intermediate frames between adjacent keyframes. The interpolation method is selected based on the data type: linear interpolation is used for continuous numerical variables, calculating the intermediate value using the equation of a straight line between two points; step interpolation is used for discrete state variables, maintaining the state value unchanged until the next keyframe. The extraction of switching moments in the dynamic visualization demonstration sequence is achieved through a state change detection algorithm. This algorithm uses a sliding window technique to monitor numerical changes in state variables. The sliding window algorithm maintains a fixed-length data window and calculates the statistical characteristics of the data within the window. When the difference in statistical characteristics between adjacent windows exceeds a preset threshold, it is identified as a change point. The threshold setting is based on statistical analysis of historical data, using the 3-sigma criterion: a change exceeding three standard deviations is considered significant.
[0045] Dependencies between modules are extracted from the influence propagation path. The dependency analysis algorithm is based on connectivity analysis in graph theory, calculating the reachability and dependency strength between modules. Dependency strength calculation uses a path weight accumulation method, summing the weights of all edges along the influence propagation path. The accumulation considers the attenuation effect of path length; the greater the distance, the greater the weight attenuation. Dependency types are determined based on data flow and control relationships. Data dependency means that the output of one module serves as the input of another module; control dependency means that the state of one module affects the execution logic of another module. The determination of switching timing constraints is based on the critical path analysis algorithm, which originates from the critical path method in project management and is used to calculate the shortest time to complete a project and the critical activities. The algorithm determines the earliest start time and earliest finish time through forward computation and the latest start time and latest finish time through backward computation. The critical path is the sequence of activities with zero total float.
[0046] The determination of inter-module dependency constraints is based on the topological sorting algorithm, which is used for the linear ordering of nodes in a directed acyclic graph, ensuring that the starting node of each edge precedes the ending node. Topological sorting is implemented using depth-first search, and the algorithm maintains access status markers and a stack of sorting results, establishing the topological order through recursive traversal. Dependency constraint checks are performed before the switchover. The constraint solver, based on constraint satisfaction problem theory, uses backtracking search and constraint propagation techniques to solve the constraint set. The process of combining switchover plans integrates and optimizes switchover timing constraints with inter-module dependency constraints. The constraint satisfaction solver takes the constraint set and optimization objective as input and uses a branch and bound algorithm to search for the optimal solution. The branch and bound algorithm divides the solution space through branch operations and prunes invalid branches through bound operations, improving solution efficiency.
[0047] In one optional implementation, the switching process of the control module to be switched is temporally deduced based on the fusion representation structure in the visualization presentation layer. This is achieved by tracing the changes in the execution path sequence and the evolution of the state transition sequence along the cross-module influence propagation path, generating a dynamic visualization demonstration sequence including: Based on the control flow graph nodes and data dependency graph nodes in the fusion representation structure, the current running state of the control module to be switched is set as the starting point of the deduction, the target switching state is set as the ending point of the deduction, and the deduction process is divided into multiple consecutive time-series deduction steps according to the complexity of the state transition. For each time-series simulation step, the state of the execution node in the execution path sequence is calculated along the cross-module influence propagation path. Based on the result of the evolution calculation, the corresponding state transition in the state transition sequence is triggered. The cascading effect of the corresponding state transition is sequentially transmitted to other associated distributed control modules along the cross-module influence propagation path. At the end of each time-series simulation step, a state snapshot of each control module is generated and recorded. The state snapshot is used to compare and analyze the state changes between adjacent time-series extrapolation steps, and the change trajectory of the execution path sequence and the evolution trajectory of the state transition sequence are extracted; based on the change trajectory and the evolution trajectory, a visualization frame sequence is generated in the visualization presentation layer; The visualization frame sequence is assembled sequentially according to the strict temporal relationship of each temporal deduction step to obtain a dynamic visualization demonstration sequence from the deduction start point to the deduction end point.
[0048] The system extracts structural information of the control module to be switched from the system database, including detailed attributes of control flow graph nodes and data dependency graph nodes. For a certain production line control system, its core control module contains 30 functional nodes, which are interconnected through 65 control flow edges and 42 data dependency edges. Based on this information, the system sets the current operating state of the control module to be switched, "normal temperature monitoring mode," as the starting point for the simulation, and sets the target switching state, "high temperature alarm mode," as the ending point. Based on the complexity assessment of the state transition, the system divides the entire simulation process into 5 consecutive time-series simulation steps, each step corresponding to 200 milliseconds of actual running time.
[0049] For each time-series simulation step, precise evolution calculations are performed. For example, in the first time-series simulation step, the system performs evolution calculations on the state of execution nodes in the execution path sequence, starting from the "temperature sensor reading node" along the cross-module influence propagation path. When the calculation results show that the temperature value rises from the normal range of 75℃ to the warning threshold of 85℃, the corresponding state transition in the state transition sequence is triggered, i.e., the transition from "normal temperature monitoring mode" to "temperature rise warning mode". The cascading effects of this state transition are sequentially transmitted to the associated "pressure control module" and "flow regulation module" through the predefined cross-module influence propagation path. At the end of the first time-series simulation step (200 milliseconds of simulation running time), the system generates and records a state snapshot of each control module, including the "temperature controller" being in "temperature rise warning mode", the "pressure control module" maintaining in "standard pressure mode", and the "flow regulation module" transitioning to "flow fine-tuning state".
[0050] The calculation continues in the second time-series simulation step. The temperature continues to rise to 95℃, triggering a transition from "temperature rise warning mode" to "high temperature warning mode," which in turn affects related modules, causing the "pressure control module" to switch from "standard pressure mode" to "pressure adjustment mode." At time 400 milliseconds, the system generates a second state snapshot, recording the latest state of each module.
[0051] These state snapshots are used to compare and analyze state changes between adjacent time-series extrapolation steps. By comparing the state differences between the first and second steps, the system extracts the change trajectory of the execution path sequence, such as "temperature detection path → threshold judgment path → early warning signal sending path → pressure adjustment triggering path," as well as the evolution trajectory of the state transition sequence, such as "normal temperature monitoring mode → temperature rise early warning mode → high temperature early warning mode." Based on these change and evolution trajectories, the system generates a sequence of visualization frames in the visualization presentation layer. Each visualization frame contains three key view areas: node status view, data flow view, and module association view. The node status view uses different colors to indicate node status (green for normal, yellow for early warning, and red for alarm); the data flow view uses dynamic flow lines to display the data transmission path; and the module association view displays the influence relationship between different modules.
[0052] In the second visualization frame, the temperature detection node in the temperature controller is highlighted in red, indicating that the temperature has exceeded the threshold; the data flow from this node to the early warning processing node is represented by a flashing orange streamline; simultaneously, in the module association view, the association edge from the temperature controller to the pressure control module is displayed as a bold dashed line, indicating that the impact is being transmitted. The system generates a corresponding visualization frame for each time-series simulation step: the first frame shows the initial state of the system, the second frame shows the temperature rise early warning stage, the third frame shows the high temperature early warning stage, the fourth frame shows the automatic pressure adjustment stage, and the fifth frame shows the final state of the system reaching the high temperature alarm mode.
[0053] These five visualization frames are assembled sequentially according to a strict temporal relationship based on their respective time-series deduction steps, generating a continuous dynamic visualization demonstration sequence. The sequence has a total duration of 1 second and a frame rate of 5 frames per second, fully demonstrating the entire switching process from "normal temperature monitoring mode" to "high temperature alarm mode," including changes in intermediate states and the transmission of influence between modules. This dynamic visualization method allows system operators to intuitively understand the state changes and potential impacts during the control module switching process, improving the predictability and safety of system operation. Operators can also adjust the playback speed (e.g., 0.5x or 2x speed) or pause at key frames for detailed observation, enhancing their understanding of the complex switching process.
[0054] In one optional implementation, based on the switching plan, a state transition channel is established between the physical control module and the control module to be switched by constructing a state snapshot buffer queue and a rollback anchor point mechanism. A hot-switching execution plan is then generated based on the state transition channel, including: The switching timing constraints and inter-module dependency constraints are extracted from the switching plan. The collection time sequence of state snapshots is determined according to the switching timing constraints. At each time of the collection time sequence, the operating status data of the physical control module is collected and the operating status data is stored in the state snapshot buffer queue in chronological order to form a complete state snapshot queue. Based on the running status data recorded in the status snapshot queue, and combined with the inter-module dependency constraints, each status snapshot is analyzed to identify the status snapshots that meet the rollback conditions; the status snapshots that meet the rollback conditions are marked as rollback anchor points, and a corresponding status recovery mapping relationship is established for each of the rollback anchor points; By utilizing the continuous state records in the state snapshot queue and the state recovery mapping relationship, a state transition channel containing a forward transition path and a rollback protection path is established; based on the forward transition path, an execution step sequence for state transition is formulated, and at the same time, a rollback step sequence for abnormal situations is designed according to the rollback protection path; The execution step sequence and the rollback step sequence are systematically combined to form a hot-swap execution scheme that includes a normal switching process and an exception handling mechanism.
[0055] like Figure 2 As shown, the method includes: The switching timing constraints and inter-module dependency constraints are extracted from the switching plan. Switching timing constraints typically include the maximum allowable time window for switching operations, the execution timing requirements of each critical operation, and the time sensitivity of state synchronization. For example, in the control system of a manufacturing equipment, the switching timing constraints stipulate that the entire switching process must be completed within 100 milliseconds, and the acquisition interval of critical state variables must not exceed 10 milliseconds. Inter-module dependency constraints describe the functional dependencies between different control components, such as the dependency of the control algorithm module on the sensor data processing module, and the dependency of the actuator drive module on the control algorithm output.
[0056] The state snapshot acquisition time sequence is determined based on the extracted switching timing constraints. An adaptive sampling strategy is used to generate the acquisition time sequence, dynamically adjusting the sampling frequency according to the system state change rate. During periods of rapid state change, the sampling interval is set to 5 milliseconds; while during relatively stable states, the sampling interval is extended to 20 milliseconds. In practical applications, such as a process control system, the state snapshot acquisition times are determined as t1=0ms, t2=5ms, t3=10ms, t4=30ms, and t5=50ms to capture key changes in the system state.
[0057] At each moment of the defined acquisition time sequence, the operational status data of the physical control module is collected. The collected status data includes, but is not limited to, the current values of control variables, internal status parameters, environmental perception data, the contents of the execution instruction buffer, and resource usage. This data is acquired through a dedicated data acquisition interface and, after data compression and integrity verification, is stored sequentially in a status snapshot buffer queue, forming a complete status snapshot queue. Each status snapshot is accompanied by a timestamp and a status identifier to ensure data traceability. In a certain industrial controller, a complete status snapshot is approximately 2.5MB in size, containing about 50 key control parameters and more than 200 internal status variables.
[0058] Based on the runtime status data recorded in the state snapshot queue, and combined with inter-module dependency constraints, each state snapshot is analyzed to identify those that meet the rollback conditions. The rollback condition determination is based on a multi-dimensional stability evaluation standard, including system state consistency indicators, resource utilization balance, key parameter stability, and the convergence characteristics of the control algorithm. In actual implementation, the system calculates a stability score for each snapshot. When the score exceeds a preset threshold (e.g., 85 points out of 100) and all key dependency constraints are met, the snapshot is determined to meet the rollback conditions.
[0059] For state snapshots that meet the rollback conditions, they are marked as rollback anchor points, and a corresponding state recovery mapping relationship is established for each rollback anchor point. The state recovery mapping relationship is a detailed data structure that records the variable mapping, value domain conversion rules, and dependency chains between the rollback anchor point state and the initial state of the control module to be switched. For example, in a temperature control system, the physical control module uses Celsius as the temperature unit, while the module to be switched uses Kelvin; the mapping relationship will include this unit conversion rule. A typical rollback anchor point state recovery mapping contains approximately 300 mapping entries, covering all key control variables and system states.
[0060] By leveraging the continuous state records and state recovery mapping in the state snapshot queue, a state transition channel is established, encompassing both a forward transition path and a rollback assurance path. The forward transition path defines the state transfer process from the physical control module to the control module to be switched, including a precise sequence of steps such as state preprocessing, value domain transformation, dependency reconstruction, and state injection. The rollback assurance path defines how to quickly restore the system to a safe and stable state using rollback anchors when an anomaly is detected during the switchover process. In a real-world system, establishing the state transition channel involves up to 50 sub-steps, each with clearly defined input requirements, execution logic, and expected output.
[0061] Based on the forward migration path, a sequence of execution steps for state migration is defined. This sequence includes detailed operational steps for stages such as initialization preparation, state data conversion, inter-module synchronization, function switching, and state verification. Simultaneously, the system designs a rollback sequence for abnormal situations based on the rollback assurance path, including anomaly detection conditions, rollback triggering mechanisms, state recovery procedures, and system stabilization measures after recovery. In a certain real-time control system, the execution step sequence contains 15 main steps, and the rollback step sequence contains 8 main steps, each with clearly defined execution conditions and completion criteria.
[0062] The execution step sequence and rollback step sequence are systematically combined to form a hot-swap execution scheme that includes normal switching procedures and exception handling mechanisms. This scheme adopts a decision tree structure, setting status checkpoints and branch logic at each key node, enabling dynamic selection of the optimal execution path based on real-time status. The complete hot-swap execution scheme is stored in the form of an executable script or state machine, and is equipped with a detailed execution log recording mechanism to ensure that each switching operation is traceable and verifiable. In actual deployment, the hot-swap execution scheme achieves an average execution success rate of 99.7%, and the average switching time is controlled within 85% of the original time window, effectively ensuring the continuous and stable operation of the industrial control system.
[0063] In one optional implementation, a switching operation is performed according to the hot-switching execution scheme. State deviation data generated during the switching process is collected, and this state deviation data is applied to optimize the synchronization compensation strategy in the multi-level mapping mechanism. Simultaneously, a post-mortem analysis of the executed switching process is performed using the fusion representation of the control flow graph and the data dependency graph, including: The switching operation is executed sequentially according to the sequence of execution steps in the hot switching execution scheme. During the execution process, the state deviation data is collected in real time for each execution step. The state deviation data is then associated and labeled according to the switching sequence and stored in the database. Based on the state deviation data, the corresponding mapping level is located in the multi-level mapping mechanism, and the mapping node and mapping path that cause the deviation are identified. The state synchronization triggering conditions of the mapping node are dynamically adjusted, and the data transmission timing constraints of the mapping path are optimized to form an updated synchronization compensation strategy. By using the fusion representation method of the control flow graph and the data dependency graph, the actual execution path and state transition sequence in the executed switching process are visually reconstructed, the deviation position is marked in the control flow graph, and the difference path is marked in the data dependency graph; Based on the causal correlation analysis of the deviation position and the difference path, the influencing factors that cause the state deviation are extracted, the influencing factors are systematically correlated with the updated synchronization compensation strategy, and the executed switching process is reviewed and analyzed.
[0064] During the hot-switch execution process, the switching operation is performed according to a pre-defined hot-switch execution plan, which contains an ordered sequence of execution steps. At each step, the system collects state deviation data in real time. This data reflects the difference between the actual and expected states during the switching process. For example, when switching from control mode A to control mode B, the system collects the following state deviation data: control parameter deviation value, response time difference, resource usage change, and data flow delay. Specifically, if the expected value of a control parameter is 95.5% and the actual collected value is 92.3%, the recorded deviation value is -3.2%; if the expected response time is 15ms and the actual response time is 18ms, the recorded difference is +3ms. The system associates and labels these collected state deviation data according to the switching sequence, for example, labeling them as "After step 2.3 execution - control parameter X deviation -3.2% - timestamp 20230615103022", and stores them in a structured database.
[0065] After the state deviation data is collected, location analysis is performed based on this data within a multi-level mapping mechanism. This multi-level mapping mechanism consists of the application layer, logic layer, data layer, and physical layer. The system first identifies the mapping node and mapping path that caused the deviation. For example, when a 20ms increase in data transmission latency is detected, the system will backtrack to locate the deviation on the mapping path between the data cache node in the data layer and the I / O node in the physical layer. After identifying the specific mapping node, the system dynamically adjusts its state synchronization triggering conditions for that node. In the example above, the synchronization trigger threshold for the data cache node is adjusted from 80% to 70%, triggering data synchronization operations earlier. Simultaneously, for the mapping path, the system optimizes its data transmission timing constraints, such as raising the transmission priority from the data layer to the physical layer to "high" and setting the maximum transmission latency to no more than 15ms. These adjustments form an updated synchronization compensation strategy for optimizing subsequent handover processes.
[0066] To conduct in-depth analysis of the executed switching process, a fusion representation of control flow graphs and data dependency graphs was used for visual reconstruction. The control flow graph describes the flow relationships of the system's execution path, while the data dependency graph shows the dependencies and transitive relationships between data. In the fusion representation, the system first reconstructs the actual execution path, for example: initial state → parameter configuration → resource allocation → mode switching → state synchronization → switching completion. Then, the system marks deviations from expectations in the control flow graph, such as marking anomalies at the "resource allocation" and "state synchronization" nodes. The execution time of the "resource allocation" node exceeded expectations by 35%, and the completion rate of the "state synchronization" node only reached 93.2%. Simultaneously, discrepancy paths were marked in the data dependency graph. For example, the path "configuration parameter A → calculation unit → control command generation" was marked as a high-latency path, where the data transmission latency increased by 24ms compared to expectations.
[0067] Based on the marked deviation locations and difference paths, causal correlation analysis was performed. By tracking the anomalies in the "resource allocation" node, the system found that it was related to a sudden increase in system load, which surged from the normal 65% to 87%, leading to intense resource contention. Analysis of the anomalies in the "state synchronization" node revealed that some state data underwent retransmission during transmission, with a retransmission rate of 12.5%, resulting in a decrease in synchronization completion rate. The system further extracted these influencing factors, such as "sudden increase in system load" and "high data transmission retransmission rate," and correlated these factors with the updated synchronization compensation strategy. For example, regarding the "sudden increase in system load" factor, the system added a dynamic resource reservation mechanism to the synchronization compensation strategy, automatically reserving an additional 20% of computing resources for critical switching operations when the load exceeds 75%. Regarding the "high data transmission retransmission rate" factor, the system added a data transmission redundancy design to the synchronization compensation strategy, where critical data is transmitted simultaneously through two independent channels, ensuring that at least one channel operates normally.
[0068] Through the above retrospective analysis, we can not only understand the problems and their causes during the current handover process, but also continuously optimize the synchronization compensation strategy to improve the reliability and efficiency of subsequent hot handover operations. For example, in the optimized hot handover execution, the execution time deviation in the resource allocation phase was reduced to within 12%, the state synchronization completion rate increased to 99.1%, and the overall state deviation of the handover process was reduced by 65%. This data-driven optimization method enables the system to continuously learn and improve, adapting to various complex handover scenarios.
[0069] In practical applications, the results of the post-mortem analysis are compiled into knowledge base entries, including four parts: problem description, cause analysis, solution, and effect evaluation. For example, for the problem of "slow state synchronization under high load," the cause is recorded as "resource contention leading to synchronization queue backlog," the solution is "implementing a hierarchical synchronization strategy and a resource reservation mechanism," and the effect evaluation is "synchronization time reduced by 47%, completion rate increased by 6.5 percentage points." These knowledge base entries will serve as an important reference for continuous system optimization.
[0070] A second aspect of the present invention provides a DCS autonomous transformation system based on hot switching of redundant control modules, comprising: The first module is used to acquire real-time operating data, topological connections, and cross-module interactive data streams of the target control module in the distributed control system; and to construct a digital twin control module by performing digital twin modeling on the real-time operating data, topological connections, and cross-module interactive data streams based on a multi-level mapping mechanism. The second module is used to dynamically visualize and deduce the interaction effects of the control module to be switched based on the digital twin control module in the visualization presentation layer by using a fusion representation method of control flow graph and data dependency graph, and generate a switching plan based on the deduction results. The third module is used to establish a state transition channel between the physical control module and the control module to be switched based on the switching plan by constructing a state snapshot buffer queue and a rollback anchor point mechanism, and to generate a hot switching execution plan according to the state transition channel. The fourth module is used to perform a switching operation according to the hot switching execution scheme, collect state deviation data generated during the switching process, apply the state deviation data to optimize the synchronization compensation strategy in the multi-level mapping mechanism, and at the same time use the fusion representation method of the control flow graph and the data dependency graph to perform a review analysis of the executed switching process.
[0071] A third aspect of the present invention provides an electronic device, comprising: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.
[0072] A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.
[0073] This invention can be a method, apparatus, system, and / or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of the invention.
[0074] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A DCS autonomous transformation method based on hot switching of redundant control modules, characterized in that, include: Acquire real-time operating data, topological connections, and cross-module interactive data streams of the target control module in a distributed control system; A digital twin model is constructed based on a multi-level mapping mechanism to model the real-time running data, the topological connection relationship, and the cross-module interactive data flow, thereby building a digital twin control module. Based on the digital twin control module, the visualization layer adopts a fusion representation of control flow graph and data dependency graph to dynamically visualize and deduce the interaction effects of the control module to be switched, and generate a switching plan based on the deduction results. Based on the aforementioned switching plan, a state transition channel is established between the physical control module and the control module to be switched by constructing a state snapshot buffer queue and a rollback anchor point mechanism, and a hot switching execution plan is generated according to the state transition channel. The switching operation is executed according to the hot switching execution scheme. The state deviation data generated during the switching process is collected and applied to optimize the synchronization compensation strategy in the multi-level mapping mechanism. At the same time, the executed switching process is reviewed and analyzed by using the fusion representation method of the control flow graph and the data dependency graph.
2. The method according to claim 1, characterized in that, Based on a multi-level mapping mechanism, digital twin modeling is performed on the real-time operating data, the topological connection relationships, and the cross-module interactive data flow to construct a digital twin control module, including: The real-time running data is timestamped and semantically classified, dividing it into state data and event data. Based on the topological connection relationship, a connection matrix and signal transmission path between modules are constructed, and the nodes in the connection matrix are associated with the state data and the event data to form a topological association model. Using the aforementioned topological association model as a basic framework, cross-layer data transmission rules are established, and the cross-module interactive data flow is parsed in layers according to the different semantic requirements of the control logic layer and the visualization presentation layer. The node mapping relationship in the topological association model is deeply integrated with the cross-layer data transmission rules to construct a multi-dimensional mapping structure. On this basis, a bidirectional real-time mapping channel from the physical control module to the digital twin control module is established. Based on the multidimensional mapping structure and the bidirectional real-time mapping channel, state synchronization and event response between the physical control module and the digital twin control module are realized, and the dynamic construction of the digital twin control module is completed.
3. The method according to claim 2, characterized in that, The node mapping relationships in the topological association model are deeply integrated with the cross-layer data transmission rules to construct a multi-dimensional mapping structure. Based on this, a bidirectional real-time mapping channel from the physical control module to the digital twin control module is established, including: Extract the source node identifier, target node identifier, and connection attributes between nodes from the node mapping relationship in the topology association model; perform matching analysis between the source node identifier, target node identifier, and connection attributes and the cross-layer data transmission rules to generate a fusion mapping rule set; A multi-dimensional mapping structure is constructed based on the fusion mapping rule set. A forward real-time mapping channel from the physical control module to the digital twin control module is established using the multi-dimensional mapping structure. The operating status data of the physical control module is transmitted to the digital twin control module through the forward real-time mapping channel according to the state synchronization time window. Based on the multidimensional mapping structure, a reverse real-time mapping channel is established from the digital twin control module to the physical control module. The control commands generated by the digital twin control module are transmitted back to the physical control module according to the cross-layer data transmission rules, thus forming a bidirectional real-time mapping channel.
4. The method according to claim 1, characterized in that, Based on the digital twin control module, a fusion representation of control flow graphs and data dependency graphs is used in the visualization layer to dynamically visualize and deduce the interaction effects of the control module to be switched. A switching plan is generated based on the deduction results, including: Extract the execution path sequence and state transition sequence of the control module to be switched from the control logic layer of the digital twin control module, convert the execution path sequence into nodes and directed edges in the control flow graph, and convert the state transition sequence into data nodes and dependency edges in the data dependency graph. The directed edges in the control flow graph and the dependency edges in the data dependency graph are correlated and analyzed to identify the data interaction nodes between the control module to be switched and other distributed control modules. Based on the data interaction nodes, a cross-module influence propagation path is constructed to form a fusion representation structure. In the visualization presentation layer, the switching process of the control module to be switched is time-series deduced based on the fusion representation structure. By tracing the changes in the execution path sequence and the evolution of the state transition sequence along the cross-module influence propagation path, a dynamic visualization demonstration sequence is generated. The switching time points and inter-module dependencies are extracted from the dynamic visualization demonstration sequence. Switching timing constraints are determined based on the switching time points, and inter-module dependency constraints are determined based on the inter-module dependencies. The switching timing constraints and inter-module dependency constraints are combined to form a switching plan.
5. The method according to claim 4, characterized in that, In the visualization layer, the switching process of the control module to be switched is time-series deduced based on the fusion representation structure. By tracing the changes in the execution path sequence and the evolution of the state transition sequence along the cross-module influence propagation path, a dynamic visualization demonstration sequence is generated, including: Based on the control flow graph nodes and data dependency graph nodes in the fusion representation structure, the current running state of the control module to be switched is set as the starting point of the deduction, the target switching state is set as the ending point of the deduction, and the deduction process is divided into multiple consecutive time-series deduction steps according to the complexity of the state transition. For each time-series simulation step, the state of the execution node in the execution path sequence is calculated along the cross-module influence propagation path. Based on the result of the evolution calculation, the corresponding state transition in the state transition sequence is triggered. The cascading effect of the corresponding state transition is sequentially transmitted to other associated distributed control modules along the cross-module influence propagation path. At the end of each time-series simulation step, a state snapshot of each control module is generated and recorded. The state snapshot is used to compare and analyze the state changes between adjacent time-series extrapolation steps, and the change trajectory of the execution path sequence and the evolution trajectory of the state transition sequence are extracted; based on the change trajectory and the evolution trajectory, a visualization frame sequence is generated in the visualization presentation layer; The visualization frame sequence is assembled sequentially according to the strict temporal relationship of each temporal deduction step to obtain a dynamic visualization demonstration sequence from the deduction start point to the deduction end point.
6. The method according to claim 1, characterized in that, Based on the aforementioned switching plan, a state transition channel is established between the physical control module and the control module to be switched by constructing a state snapshot buffer queue and a rollback anchor point mechanism. A hot-switching execution plan is generated according to the state transition channel, including: The switching timing constraints and inter-module dependency constraints are extracted from the switching plan. The collection time sequence of state snapshots is determined according to the switching timing constraints. At each time of the collection time sequence, the operating status data of the physical control module is collected and the operating status data is stored in the state snapshot buffer queue in chronological order to form a complete state snapshot queue. Based on the running status data recorded in the status snapshot queue, and combined with the inter-module dependency constraints, each status snapshot is analyzed to identify the status snapshots that meet the rollback conditions; the status snapshots that meet the rollback conditions are marked as rollback anchor points, and a corresponding status recovery mapping relationship is established for each of the rollback anchor points; By utilizing the continuous state records in the state snapshot queue and the state recovery mapping relationship, a state transition channel containing a forward transition path and a rollback protection path is established; based on the forward transition path, an execution step sequence for state transition is formulated, and at the same time, a rollback step sequence for abnormal situations is designed according to the rollback protection path; The execution step sequence and the rollback step sequence are systematically combined to form a hot-swap execution scheme that includes a normal switching process and an exception handling mechanism.
7. The method according to claim 1, characterized in that, The switching operation is executed according to the hot-switching execution scheme. State deviation data generated during the switching process is collected and applied to optimize the synchronization compensation strategy in the multi-level mapping mechanism. Simultaneously, a post-mortem analysis of the executed switching process is performed using the fusion representation of the control flow graph and the data dependency graph, including: The switching operation is executed sequentially according to the sequence of execution steps in the hot switching execution scheme. During the execution process, the state deviation data is collected in real time for each execution step. The state deviation data is then associated and labeled according to the switching sequence and stored in the database. Based on the state deviation data, the corresponding mapping level is located in the multi-level mapping mechanism, and the mapping node and mapping path that cause the deviation are identified. The state synchronization triggering conditions of the mapping node are dynamically adjusted, and the data transmission timing constraints of the mapping path are optimized to form an updated synchronization compensation strategy. By using the fusion representation method of the control flow graph and the data dependency graph, the actual execution path and state transition sequence in the executed switching process are visually reconstructed, the deviation position is marked in the control flow graph, and the difference path is marked in the data dependency graph; Based on the causal correlation analysis of the deviation position and the difference path, the influencing factors that cause the state deviation are extracted, the influencing factors are systematically correlated with the updated synchronization compensation strategy, and the executed switching process is reviewed and analyzed.
8. A DCS autonomous modification system based on hot switching of redundant control modules, used to implement the method of any one of claims 1-7, characterized in that, include: The first module is used to acquire real-time operating data, topological connection relationships, and cross-module interactive data streams of the target control module in the distributed control system. A digital twin model is constructed based on a multi-level mapping mechanism to model the real-time running data, the topological connection relationship, and the cross-module interactive data flow, thereby building a digital twin control module. The second module is used to dynamically visualize and deduce the interaction effects of the control module to be switched based on the digital twin control module in the visualization presentation layer by using a fusion representation method of control flow graph and data dependency graph, and generate a switching plan based on the deduction results. The third module is used to establish a state transition channel between the physical control module and the control module to be switched based on the switching plan by constructing a state snapshot buffer queue and a rollback anchor point mechanism, and to generate a hot switching execution plan according to the state transition channel. The fourth module is used to perform a switching operation according to the hot switching execution scheme, collect state deviation data generated during the switching process, apply the state deviation data to optimize the synchronization compensation strategy in the multi-level mapping mechanism, and at the same time use the fusion representation method of the control flow graph and the data dependency graph to perform a review analysis of the executed switching process.
9. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the method described in any one of claims 1 to 7.