A hierarchical graph-based approach and system for autonomous control of a marine engine room
Patent Information
- Application Number
- CN202611215960.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-11
- Publication Date
- 2026-11-03
AI Technical Summary
Existing automated control schemes for ship engine rooms cannot achieve fully unmanned operation, do not treat propulsion, power and auxiliary systems as an organic whole, lack cross-system collaborative control, cannot replace the core work of marine engineers, have poor visualization effects, lack dynamic path replanning capabilities when responding to faults, and have a high risk of subjective errors in human operation.
Using a layered graph theory approach, ship engine room equipment is abstracted into equipment nodes in the control, power, and auxiliary layers. A three-layer weighted directed graph model is constructed. An improved A* path planning algorithm combined with a heuristic function of inter-layer penalty is used to automatically remove faulty equipment nodes and invalid dynamic edges, update equipment status in real time and trigger fault isolation mechanisms, and provide a visual display by combining static layout rendering and dynamic animation updates.
It has achieved fully automated operation of engine room equipment, improved path planning efficiency and system automation level, reduced the mental burden of marine engineers, ensured system stability and reliability, provided a clear display of engine room operating conditions, and supported flexible adaptation to engine rooms of different types of ships.
Smart Images

Figure CN123029932A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent control technology for ship engine rooms, specifically relating to a hierarchical graph theory method and system for autonomous control of ship engine rooms. Background Technology
[0002] In the development of autonomous surface vessels (MASS), while ship autonomous maneuvering technology has advanced rapidly, the level of intelligence in the operation of electromechanical equipment has lagged significantly, creating a technological gap. Currently, the operation of ship engine room equipment requires separate sequential commands, resulting in poor user experience, high mental workload, and low efficiency, whether operated on board or remotely from a shore-based center. Furthermore, remote operation is prone to safety hazards due to data transmission failures. Simultaneously, existing research largely focuses on improving the reliability of individual devices or systems, failing to consider the ship's propulsion, electrical, and auxiliary systems as an organic whole, and neglecting to propose effective technical solutions to replace the operational role of marine engineers. Consequently, large ocean-going vessels still cannot operate independently of manual labor, hindering the practical application of autonomous vessels.
[0003] Existing technical solutions mainly consist of centralized ship engine room automation control schemes, supplemented by single-dimensional technologies such as fault diagnosis, parameter prediction, and power plant reconfiguration. The core approach relies on a single control node to coordinate equipment operation, and path planning uses traditional algorithms like A* and Dijkstra's, which only consider physical distance. The visualization module only displays static equipment parameters and basic operating status. This solution suffers from four major drawbacks:
[0004] 1. With the sole aim of reducing the probability of equipment failure, it focuses on auxiliary technologies such as fault early warning and equipment maintenance, without proposing a feasible intelligent operation system. It cannot replace the core work of marine engineers and is seriously out of touch with the requirements of unmanned operation of autonomous ships throughout the entire process.
[0005] 2. The optimization focuses on individual devices / subsystems, failing to treat propulsion, power, and auxiliary systems as an organic whole, ignoring the coupling relationships between systems, lacking a cross-system collaborative control architecture, and thus failing to meet the overall automated operation requirements of the cabin.
[0006] 3. Artificial intelligence is only used for auxiliary analysis and has not been extended to the core links of equipment operation and process execution; graph theory technology has not been applied to the engine room operation scenario, and topology analysis methods in the power field have not been combined with engine room operation; equipment maintenance has not been unmanned, and power plant reconfiguration strategies are only adapted to specific scenarios and lack a general and autonomous system.
[0007] 4. The lack of a standardized and hierarchical instruction system makes it unable to adapt to different operating scenarios; the visualization effect is poor, and the static data display cannot intuitively reflect the real-time operating conditions of the cabin; there is no dynamic path replanning capability during fault response, the efficiency of instruction transmission and execution is low, and the risk of subjective error in manual operation is high. Summary of the Invention
[0008] This invention addresses the problem that existing automated control schemes for ship engine rooms still cannot eliminate manual operation, and provides a hierarchical graph theory method and system for autonomous control of ship engine rooms.
[0009] The technical solution claimed by this invention is as follows:
[0010] A hierarchical graph theory method for autonomous control of ship engine rooms includes the following steps:
[0011] S1: Modeling Phase: The ship's engine room equipment is abstracted into equipment nodes of the control layer, power layer, and auxiliary layer according to their functions. The connections between equipment are abstracted into dynamic edges with four-tuple attributes, and a three-layer weighted directed graph model is constructed. The four-tuple includes: source device, target device, distance / weight, and connection type.
[0012] S2: Planning Phase: Taking the device nodes of the starting device and the ending device as input, read the data in the three-layer weighted directed graph model, and based on the read data, call the improved A* path planning algorithm to output an ordered sequence of device nodes; the improved A* path planning algorithm combines a heuristic function with inter-layer device penalty, takes into account physical distance and layer differences, automatically removes faulty device nodes / invalid dynamic edges, and solves the optimal path;
[0013] S3: Execution phase: The task execution engine of the automated terminal executes the device operations sequentially according to the ordered device node sequence and records the operation information in real time; during the execution process, the status of the devices and dynamic edges is updated in real time. Once a faulty device or an invalid dynamic edge is detected, the fault isolation mechanism is immediately triggered to bypass the faulty device node and replan the local path.
[0014] S4: Visualization Phase: During execution, the device status, connection status, and operation process are intuitively displayed through static layout rendering, dynamic animation updates, and real-time information panels.
[0015] Preferably, the device node includes: device ID, level, node coordinates, and health; the dynamic edge includes: weight, connection type, and validity; the node coordinates are two-dimensional X and Y coordinates pre-assigned to each device node according to the cabin equipment layering arrangement rules during the initialization phase of the three-layer weighted directed graph model modeling.
[0016] Preferably, the improved A* path planning algorithm specifically includes the following steps:
[0017] Step 1, Input parameters: Use the starting device node ID and ending device node ID in the three-layer weighted directed graph model as the algorithm input, read all device nodes, levels, node coordinates, and dynamic edge quadruples attributes in the three-layer weighted directed graph model; traverse, filter and remove two types of objects: device nodes marked as faulty and invalid dynamic edges with a weight of 0, and only perform path iteration calculation based on valid nodes and valid edges;
[0018] Step 2: Design the cost function to obtain the total cost. The total path cost function of the algorithm is:
[0019] f(a) = g(a) + h(a, b)
[0020] In the formula: f(a) represents the total cost; g(a) represents the actual cumulative path cost from the starting device node to the current device node a, summing the weights of each dynamic edge along the path; h(a,b) represents the heuristic function from the current device node a to the target device node b, calculated as follows:
[0021] h(a,b)=D_ {Euclidean} (a,b)+|Layer_a-Layer_b|×2.0
[0022] In the formula: D_ {Euclidean} (a,b) represents the Euclidean physical distance between device node a and device node b; Layer_a and Layer_b are the cabin layers to which device node a and device node b belong, respectively; |Layer_a-Layer_b|×2.0 is the inter-layer penalty term;
[0023] Step 3, Iterative Pathfinding Process:
[0024] (1) Initialize the start set, store the starting device node into the set, and initialize the path cost;
[0025] (2) Loop through the device nodes with the smallest total cost in the set and determine whether the device node is the target endpoint device node; if so, stop the iteration and backtrack to reconstruct the complete path.
[0026] (3) If the destination is not reached, traverse all adjacent device nodes of the current device node and check whether the dynamic edge between them is valid;
[0027] (4) If the dynamic edge is valid, calculate the cumulative actual cost of the adjacent device node; if the newly calculated actual cost is better than the historical record of the adjacent device node, update the path cost, record the predecessor device node, and add the adjacent device node to the open set, and repeat the loop iteration.
[0028] Step 4, Algorithm Output: After the iteration is complete, the output consists of an ordered sequence of device nodes, which is then transmitted to the task execution engine of the automated terminal.
[0029] Step 5, Fault Dynamic Replanning Logic: If a new faulty device node / failed dynamic edge is detected during the execution phase, the updated three-layer weighted directed graph model is used as the basis to return to step 1, complete the local path replanning, and automatically bypass the faulty object to ensure the continuous execution of the task.
[0030] Preferably, the invalid dynamic edges include: dynamic edges with a weight of 0; dynamic edges where either of the two device nodes is marked as faulty; and dynamic edges where abnormal device operation causes the physical connection to be broken.
[0031] Preferably, the device status includes: normal operation status, fault status, current operation status, standby status, and maintenance status; the connection status includes: validity, connection priority type, and visual operation mode; the validity includes: valid dynamic edge and invalid dynamic edge; the connection priority type includes: normal, critical, and emergency; the visual operation mode includes: normal solid line, disconnected dashed line, and green animated path for task planning.
[0032] This invention also provides a hierarchical graph theory system for autonomous control of a ship's engine room, comprising a modeling module, a planning module, an execution module, and a visualization module connected in sequence. The modeling module abstracts the ship's engine room equipment into equipment nodes of the control layer, power layer, and auxiliary layer according to their functions, and abstracts the connections between equipment into dynamic edges with four-tuple attributes, constructing a three-layer weighted directed graph model. The planning module takes the equipment nodes of the starting and ending equipment as inputs, reads the data in the three-layer weighted directed graph model, and, based on the read data, calls an improved A* path planning algorithm to output an ordered sequence of equipment nodes. The execution module's automated terminal task execution engine executes equipment operations sequentially according to the ordered sequence of equipment nodes and records operation information in real time. During execution, the status of equipment and dynamic edges is updated in real time. Once a faulty equipment or an invalid dynamic edge is detected, a fault isolation mechanism is immediately triggered to bypass the faulty equipment node and replan the local path. During execution, the visualization module intuitively displays the equipment status, connection status, and operation process through static layout rendering, dynamic animation updates, and a real-time information panel.
[0033] In the above system, the modeling module includes a device node module and a dynamic edge module; the device node module includes nodes of all devices; the dynamic edge module includes the connection relationships between all devices; the device node includes: device ID, level, node coordinates, and health; the connection relationships between devices include: weight, connection type, and validity; the execution module includes: task execution engine, operation log recording module, and fault handling module; the visualization module includes: static layout rendering module, animation engine, and information panel module.
[0034] In the above system, the improved A* path planning algorithm specifically includes the following steps:
[0035] Step 1, Input parameters: Use the starting device node ID and ending device node ID in the three-layer weighted directed graph model as the algorithm input, read all device nodes, levels, node coordinates, and dynamic edge quadruples attributes in the three-layer weighted directed graph model; traverse, filter and remove two types of objects: device nodes marked as faulty and invalid dynamic edges with a weight of 0, and only perform path iteration calculation based on valid nodes and valid edges;
[0036] Step 2: Design the cost function to obtain the total cost. The total path cost function of the algorithm is:
[0037] f(a) = g(a) + h(a, b)
[0038] In the formula: f(a) represents the total cost; g(a) represents the actual cumulative path cost from the starting device node to the current device node a, summing the weights of each dynamic edge along the path; h(a,b) represents the heuristic function from the current device node a to the target device node b, calculated as follows:
[0039] h(a,b)=D_ {Euclidean} (a,b)+|Layer_a-Layer_b|×2.0
[0040] In the formula: D_ {Euclidean} (a,b) represents the Euclidean physical distance between device node a and device node b; Layer_a and Layer_b are the cabin layers to which device node a and device node b belong, respectively; |Layer_a-Layer_b|×2.0 is the inter-layer penalty term;
[0041] Step 3, Iterative Pathfinding Process:
[0042] (1) Initialize the start set, store the starting device node into the set, and initialize the path cost;
[0043] (2) Loop through the device nodes with the smallest total cost in the set and determine whether the device node is the target endpoint device node; if so, stop the iteration and backtrack to reconstruct the complete path.
[0044] (3) If the destination is not reached, traverse all adjacent device nodes of the current device node and check whether the dynamic edge between them is valid;
[0045] (4) If the dynamic edge is valid, calculate the cumulative actual cost of the adjacent device node; if the newly calculated actual cost is better than the historical record of the adjacent device node, update the path cost, record the predecessor device node, and add the adjacent device node to the open set, and repeat the loop iteration.
[0046] Step 4, Algorithm Output: After the iteration is complete, the output consists of an ordered sequence of device nodes, which is then transmitted to the task execution engine of the automated terminal.
[0047] Step 5, Fault Dynamic Replanning Logic: If a new faulty device node / failed dynamic edge is detected during the execution phase, the updated three-layer weighted directed graph model is used as the basis to return to step 1, complete the local path replanning, and automatically bypass the faulty object to ensure the continuous execution of the task.
[0048] In the aforementioned system, the architecture is divided into a presentation layer, a control layer, a logic layer, and a data layer from top to bottom. The visualization module is entirely deployed in the presentation layer, which uses a dynamic visualizer to achieve full visualization rendering and real-time operational status display. The execution module is entirely deployed in the control layer, which uses an automated terminal and a built-in task execution engine to achieve device command issuance, fault isolation, and operation log recording. The modeling module and planning module are uniformly integrated within the hierarchical operation graph module of the logic layer. The hierarchical operation graph has a built-in improved A* path planning algorithm, and the planning module relies on the improved A* path planning algorithm built into the hierarchical operation graph to solve for the optimal path. The data layer does not carry independent functional modules but only serves as a common data storage carrier: storing device node and dynamic edge graph model data generated by the modeling module, providing data reading and status update support for the entire process of the visualization module, execution module, modeling module, and planning module.
[0049] 1. The hierarchical graph theory system for autonomous control of ship engine room as described in claim 6, characterized in that: the static layout rendering specifically involves drawing a hierarchical background, with different colors selected for different layers, and different colors used for device and status edges; the dynamic animation update specifically involves: updating frame by frame through an animation engine, highlighting the current operation node, and bolding the planned path; the real-time information panel specifically involves: the information panel synchronously displaying the total number of devices, the total number of connections, device health, and task execution progress, stopping and displaying a "Automation operation completed" prompt when the device operation is completed.
[0050] The beneficial effects of this invention are as follows:
[0051] This invention provides a layered graph theory method and system for autonomous control of ship engine rooms. The method includes: abstracting ship engine room equipment into control, power, and auxiliary layers according to function; abstracting the connections between equipment into dynamic edges with four-tuple attributes, forming a three-layer weighted directed graph model, achieving functional separation of equipment and intra-layer fault isolation, avoiding cascading failures, and significantly improving reliability and maintainability; calling an improved A* path planning algorithm to output an ordered sequence of equipment nodes. The improved A* path planning algorithm, combined with a heuristic function with inter-layer penalties, incorporates equipment level differences into the path planning consideration for the first time, taking into account both physical distance and level differences, automatically eliminating faulty equipment nodes / invalid dynamic edges, solving for the optimal path, and completing the optimal path solution in milliseconds. The path planning efficiency and rationality are significantly improved compared to traditional algorithms, meeting real-time control requirements; the task execution engine of the automated terminal executes equipment operations sequentially according to the output ordered sequence of equipment nodes (optimal path) and records operation information in real time; during execution, the equipment is updated in real time. The system monitors the status of dynamic edges. Upon detecting faulty equipment or invalid dynamic edges, a fault isolation mechanism is immediately triggered, bypassing the faulty node and replanning the local path. This achieves real-time fault response and path replanning without manual intervention, significantly improving system automation and achieving "one command, complete process." The automatic execution process of ship engine room equipment is visually displayed through static layout rendering, dynamic animation updates, and a real-time information panel, providing operators with a clear understanding of engine room operating conditions. The method achieves closed-loop control throughout the entire process—from model building, path planning, automated execution to dynamic status display—through four core stages: modeling, planning, execution, and visualization. Compared to traditional fragmented control schemes, this significantly improves system integration and operational efficiency, effectively reducing the mental burden on marine engineers and solving the problem that existing ship engine room automation control schemes still cannot eliminate the need for manual operation.
[0052] The system highlights the current operation node, bolds the planned path, and displays core data such as equipment health and task progress in real time. Operators can intuitively grasp the engine room status, significantly improving fault response efficiency. In addition, the system supports standardized coding and can flexibly adapt to the engine room needs of different types of ships.
[0053] After the system provided by this invention is put into operation, it can quickly complete the calculation of the optimal path, automatically identify and avoid faulty equipment, achieve rapid and accurate isolation of faults within a layer, ensure that a fault at a single level will not propagate to other levels, and guarantee the overall stability of the system operation. The system can automatically execute various operational tasks of the engine room equipment throughout the entire process without manual intervention. Simultaneously, it intuitively presents the real-time operating status of the engine room through dynamic visualization, allowing operators to clearly understand the equipment status, operational progress, and overall system status. Compared with traditional control schemes, the system provided by this invention achieves significant improvements in path planning efficiency, fault response speed, and overall operational reliability. Furthermore, it adopts standardized coding and attribute definition methods for equipment nodes and connecting edges, allowing for flexible increases or decreases in the number of nodes and edges according to the actual equipment configuration of different ship engine rooms. It possesses good scalability and adaptability, and can meet the automated control needs of various ship engine rooms. Attached Figure Description
[0054] Figure 1 This is a flowchart of a hierarchical graph theory method for autonomous control of a ship's engine room, as described in an embodiment of the present invention.
[0055] Figure 2 This is a schematic diagram of the overall process of the hierarchical graph theory method for automated control of ship engine room in an embodiment of the present invention.
[0056] Figure 3 This is a schematic diagram of the execution flow of the A* path planning algorithm in an embodiment of the present invention.
[0057] Figure 4 This is a schematic diagram of the architecture of the ship engine room automated control system in an embodiment of the present invention.
[0058] Figure 5 This is a schematic diagram of the three-layer weighted directed graph topology in an embodiment of the present invention.
[0059] Figure 6 This is a schematic diagram of the visual display interface in an embodiment of the present invention. Detailed Implementation
[0060] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions are described in further detail and completely below with reference to the accompanying drawings. It should be understood that the following embodiments are used to illustrate the technical solutions of this invention and are not intended to limit the scope of protection of this invention. Those skilled in the art can make equivalent substitutions, combinations, or splits of the steps, modules, or data structures without departing from the concept of this invention.
[0061] This invention provides a hierarchical graph theory method for autonomous control of ship engine rooms, such as... Figure 1 As shown, it includes the following steps:
[0062] S1: Modeling Phase: The ship's engine room equipment is abstracted into Device Nodes of the control layer, power layer, and auxiliary layer according to their functions. The connections between devices are abstracted into Dynamic Edges with four-tuple attributes. A three-layer weighted directed graph model is constructed to achieve separation of device functions and isolation of faults within layers. In a specific embodiment of the present invention, the 12 core devices in the engine room are abstracted into Device Nodes of the control layer, power layer, and auxiliary layer (for example, the device IDs of the 12 core devices are set to 0-11, the control layer includes 4 devices with device IDs of 0-3, the power layer includes 4 devices with device IDs of 4-7, and the auxiliary layer includes 4 devices with device IDs of 8-11). 22 Dynamic Edges are constructed to connect the devices. The attributes of DeviceNodes and Dynamic Edges are defined and stored, and a three-layer weighted directed graph model is constructed. Figure 5 The basic data model is as follows: device nodes are encoded by hierarchical IDs, and the attributes of edges are quadruples (source device ID, target device ID, distance / weight, connection type). The weight of intra-layer connections is 1.0-1.5, and that of cross-layer connections is 1.7-2.3. The connection types are divided into normal, critical, and emergency. Device nodes include attributes such as device ID, hierarchical level, node coordinates, and health. Dynamic edges include attributes such as weight, connection type, and validity, providing data support for subsequent processes. The node coordinates are two-dimensional X and Y coordinates pre-assigned to each device node during the initialization phase of the three-layer weighted directed graph model, based on the hierarchical arrangement rules of the cabin equipment.
[0063] S2: Planning Phase: Taking the device nodes of the starting and ending devices in the three-layer weighted directed graph model as input, the data in the three-layer weighted directed graph model is read, and based on the read data, the improved A* path planning algorithm is called to output an ordered sequence of device nodes; the improved A* path planning algorithm combines a heuristic function with inter-layer device penalties, takes into account physical distance and layer differences, automatically removes faulty device nodes / invalid dynamic edges, and solves the optimal path; in a specific embodiment of the present invention, the improved A* path planning algorithm, as follows: Figure 3 As shown, the specific steps include the following:
[0064] Step 1, Input Parameters: Using the starting device node ID and ending device node ID in the three-layer weighted directed graph model as algorithm input, read all device nodes, levels, node coordinates, and dynamic edge quadruples attributes in the three-layer weighted directed graph model; traverse, filter, and remove two types of objects: device nodes marked as faulty and invalid dynamic edges with a weight of 0. Only perform path iteration calculation based on valid nodes and valid edges; the invalid dynamic edges include: dynamic edges with a weight of 0; dynamic edges where either of the two device nodes is marked as faulty; and dynamic edges where abnormal device operation causes the physical connection to be broken.
[0065] Step 2: Design the cost function to obtain the total cost. The total path cost function of the algorithm is:
[0066] f(a) = g(a) + h(a, b)
[0067] In the formula: f(a) represents the total cost; g(a) represents the actual cumulative path cost from the starting device node to the current device node a, summing the weights of each dynamic edge along the path; h(a,b) represents the heuristic function from the current device node a to the target device node b, calculated as follows:
[0068] h(a,b)=D_ {Euclidean} (a,b)+|Layer_a-Layer_b|×2.0
[0069] In the formula: D_ {Euclidean} (a,b) represents the Euclidean physical distance between device node a and device node b; Layer_a and Layer_b are the engine room layers to which device node a and device node b belong, respectively; |Layer_a-Layer_b|×2.0 represents the inter-layer penalty, which will increase the path cost for cross-layer operations. The same-layer operation path is output first, which conforms to the operation logic of ship engine room engineering.
[0070] Step 3, Iterative Pathfinding Process:
[0071] (1) Initialize the open set, store the starting device node into the set, and initialize the path cost;
[0072] (2) Loop through the device node with the smallest total cost in open_set and determine whether the device node is the target endpoint device node; if so, stop the iteration and backtrack to reconstruct the complete path;
[0073] (3) If the destination is not reached, traverse all adjacent device nodes of the current device node and check whether the dynamic edge between them is valid;
[0074] (4) If the dynamic edge is valid, calculate the cumulative actual cost g of the adjacent device node (the actual cumulative path cost from the starting device node to the current device node); if the newly calculated g value is better than the historical record of the adjacent device node, update the path cost, record the predecessor device node, and add the adjacent device node to open_set, and repeat the loop iteration.
[0075] Step 4, Algorithm Output: After the iteration is completed, the output is an ordered sequence of device nodes consisting of ordered device node IDs, which is then transmitted to the task execution engine of the automation terminal.
[0076] Step 5, Fault Dynamic Replanning Logic: If a new faulty device node / failed dynamic edge is detected during the execution phase, the updated three-layer weighted directed graph model is used as the basis to return to step 1, complete the local path replanning, and automatically bypass the faulty object to ensure the continuous execution of the task.
[0077] In a specific embodiment of the present invention, the operator issues an operation task to start the host (device node 4 in the power layer) from the console (device at device node 0 in the control layer). During the planning phase, the starting device ID=0 and the ending device ID=4 are used as inputs. The improved A* path planning algorithm reads the node levels and dynamic edge weights within the three-layer weighted directed graph model, calculates the total path cost using a heuristic function with inter-layer penalties, automatically filters faulty devices and invalid edges, and finally outputs an ordered list of nodes [0,4] as the optimal operation path. If the host node fails, the algorithm will automatically avoid it. For the faulty node, a new, adapted path is re-solved. For example, the initial task is: starting device node 0 (console), ending device node 4 (host), and the initial planned path is [0,4]. When the target device host, i.e. the ending device, fails, the fault isolation mechanism is triggered. During the execution phase, a host hardware failure is detected, and the three-layer weighted directed graph model is updated synchronously. Device node 4 is marked as a faulty device node, and all connected dynamic edges of device node 4 are determined to be invalid edges. The basis is re-planned: the improved A is re-executed using the new three-layer weighted directed graph model after removing the faulty device node 4. * Route planning algorithm; A *The route planning algorithm traverses all valid nodes. The original endpoint, node 4, becomes invalid, and the task objective automatically switches to the auxiliary power equipment (assuming node 5). The system automatically solves for two alternative paths: Path 1: 0→1→6→5, with a lower total cost; Path 2: 0→2→5, with a higher total cost. A new optimal path is output: [0,1,6,5]. The automated terminal switches to this path and starts the auxiliary equipment to replace the main unit in completing the power supply task, with uninterrupted operation throughout. In summary, after any equipment failure, the first step is to synchronously update the three-layer weighted directed graph model, marking the faulty equipment node and invalidating all associated dynamic edges of that node. Based on the updated three-layer weighted directed graph model, the complete improved algorithm is re-executed. * The path planning process automatically skips all faulty device nodes and invalid edges; if the original device node's starting point fails, it automatically selects a normal, standby control device node at the same level as the new device node's starting point; if the original device node's ending point fails, it selects a device at the same level with equivalent function as the new device node's ending point; A * The path planning algorithm combines Euclidean distance and inter-layer penalty to calculate the total cost of all feasible paths, and outputs the ordered node sequence with the lowest cost as the new path. The automated terminal immediately switches to the new path to execute the operation, so as to achieve uninterrupted task execution.
[0078] S3: Execution Phase: The task execution engine of the automated terminal executes device operations sequentially according to the optimal path and records operation information in real time; during the execution process, the status of devices and dynamic edges is updated in real time. Once a faulty device or an invalid dynamic edge is detected, the fault isolation mechanism is immediately triggered to bypass the faulty node and replan the local path. After the task is completed, an operation report is generated.
[0079] S4: Visualization Stage: This stage uses static layout rendering (layered backgrounds: different backgrounds for the control layer, power layer, and auxiliary layer; stateful device nodes / dynamic edges) + dynamic animation updates (updated frame-by-frame by an animation engine, highlighting the currently operating device node and bolding the planned path) + a real-time information panel (simultaneously displaying the total number of devices, total number of connections, device health, and task execution progress; stopping and displaying a "Automation completed" message when device operation is complete) to intuitively display device status, connection status, and operation process. In a specific embodiment of this invention, layered backgrounds (control layer - blue, power layer - red, auxiliary layer - green) and stateful device nodes / dynamic edges are drawn using static layout rendering. Edge (Device running - green, Device failure - red, Dynamic edge critical connection - red, Dynamic edge emergency connection - orange); updated frame by frame through the animation engine, with the currently operating device node (DeviceNode) highlighted in gold and the planned path drawn with thick green lines; the information panel synchronously displays core statistics such as the total number of devices, the total number of connections, device health, and task execution progress; the animation stops when the operation is completed and displays a "Automation operation completed" prompt. Figure 6 ).
[0080] This invention also provides a hierarchical graph theory system for autonomous control of a ship's engine room, comprising a modeling module, a planning module, an execution module, and a visualization module connected in sequence. The modeling module abstracts the ship's engine room equipment into equipment nodes of the control layer, power layer, and auxiliary layer according to their functions, and abstracts the connections between equipment into dynamic edges with four-tuple attributes, constructing a three-layer weighted directed graph model. The planning module takes the equipment nodes of the starting and ending equipment as inputs, reads the data in the three-layer weighted directed graph model, and, based on the read data, calls an improved A* path planning algorithm to output an ordered sequence of equipment nodes. The execution module's automated terminal task execution engine executes equipment operations sequentially according to the ordered sequence of equipment nodes and records operation information in real time. During execution, the status of equipment and dynamic edges is updated in real time. Once a faulty equipment or an invalid dynamic edge is detected, a fault isolation mechanism is immediately triggered to bypass the faulty equipment node and replan the local path. During execution, the visualization module intuitively displays the equipment status, connection status, and operation process through static layout rendering, dynamic animation updates, and a real-time information panel.
[0081] Preferably, the modeling module includes a device node module and a dynamic edge module; the device node module includes nodes of all devices; the dynamic edge module includes all connections between devices; the device node includes: device ID, level, node coordinates, and health; the connections between devices include: weight, connection type, and validity; the execution module includes: a task execution engine, an operation log recording module, and a fault handling module; the visualization module includes: a static layout rendering module, an animation engine, and an information panel module. During the initialization phase of the three-layer weighted directed graph modeling, the node coordinates are pre-assigned two-dimensional X and Y coordinates to each device node according to the cabin equipment layering rules, and stored as inherent attributes of the device nodes in the data layer; during the planning phase, the improved A* path planning algorithm directly reads the pre-stored coordinate values of each node in the data layer for subsequent calculation of the Euclidean distance between nodes.
[0082] like Figure 4 As shown, the architecture of the hierarchical graph theory system is divided into a presentation layer, a control layer, a logic layer, and a data layer from top to bottom. The visualization module is entirely deployed in the presentation layer, which uses a dynamic visualizer to achieve full visualization rendering and real-time operational status display functions. The execution module is entirely deployed in the control layer, which uses an automated terminal and a built-in task execution engine to achieve execution functions such as device command issuance, fault isolation, and operation log recording. The modeling module and planning module are uniformly integrated within the hierarchical operation graph module of the logic layer: the hierarchical operation graph has a built-in improved A* path planning algorithm, and the planning module relies on the improved A* path planning algorithm built into the hierarchical operation graph to solve for the optimal path. The data layer does not carry independent functional modules, but only serves as a common data storage carrier: storing device node and dynamic edge graph model data generated by the modeling module, and providing data reading and status update support for the entire process of the visualization module, execution module, modeling module, and planning module.
[0083] In a specific embodiment of the present invention, the improved A* path planning algorithm in the above system is as follows: Figure 3 As shown, the specific steps include the following:
[0084] Step 1, Input Parameters: Using the starting device node ID and ending device node ID in the three-layer weighted directed graph model as algorithm input, read all device nodes, levels, node coordinates, and dynamic edge quadruples attributes in the three-layer weighted directed graph model; traverse, filter, and remove two types of objects: device nodes marked as faulty and invalid dynamic edges with a weight of 0. Only perform path iteration calculation based on valid nodes and valid edges; the invalid dynamic edges include: dynamic edges with a weight of 0; dynamic edges where either of the two device nodes is marked as faulty; and dynamic edges where abnormal device operation causes the physical connection to be broken.
[0085] Step 2: Design the cost function to obtain the total cost. The total path cost function of the algorithm is:
[0086] f(a) = g(a) + h(a, b)
[0087] In the formula: f(a) represents the total cost; g(a) represents the actual cumulative path cost from the starting device node to the current device node a, summing the weights of each dynamic edge along the path; h(a,b) represents the heuristic function from the current device node a to the target device node b, calculated as follows:
[0088] h(a,b)=D_ {Euclidean} (a,b)+|Layer_a-Layer_b|×2.0
[0089] In the formula: D_ {Euclidean} (a,b) represents the Euclidean physical distance between device node a and device node b; Layer_a and Layer_b are the engine room layers to which device node a and device node b belong, respectively; |Layer_a-Layer_b|×2.0 represents the inter-layer penalty, which will increase the path cost for cross-layer operations. The same-layer operation path is output first, which conforms to the operation logic of ship engine room engineering.
[0090] Step 3, Iterative Pathfinding Process:
[0091] (1) Initialize the open set, store the starting device node into the set, and initialize the path cost;
[0092] (2) Loop through the device node with the smallest total cost in open_set and determine whether the device node is the target endpoint device node; if so, stop the iteration and backtrack to reconstruct the complete path;
[0093] (3) If the destination is not reached, traverse all adjacent device nodes of the current device node and check whether the dynamic edge between them is valid;
[0094] (4) If the dynamic edge is valid, calculate the cumulative actual cost g of the adjacent device node (the actual cumulative path cost from the starting device node to the current device node); if the newly calculated g value is better than the historical record of the adjacent device node, update the path cost, record the predecessor device node, and add the adjacent device node to open_set, and repeat the loop iteration.
[0095] Step 4, Algorithm Output: After the iteration is completed, the output is an ordered sequence of device nodes consisting of ordered device node IDs, which is then transmitted to the task execution engine of the automation terminal.
[0096] Step 5, Fault Dynamic Replanning Logic: If a new faulty device node / failed dynamic edge is detected during the execution phase, the updated three-layer weighted directed graph model is used as the basis to return to step 1, complete the local path replanning, and automatically bypass the faulty object to ensure the continuous execution of the task.
[0097] The data layer (graph model) includes the Device Node and Dynamic Edge core modules, which store device attributes, status information, and connection weights, types, and validity information. It supports real-time updates of dynamic status and provides data support for the entire system.
[0098] The logical layer (graph algorithm): its core is the Layered Operation Graph module, which integrates the improved A* path planning algorithm, the heuristic function with inter-layer penalties, and the path cost calculation module. It is the core of the system's intelligent planning and is responsible for solving and outputting the optimal operation path.
[0099] The control layer (task execution): The core is the Automation Terminal, which includes a task execution engine, an operation log recording module, and a fault handling module. It is responsible for executing operations, updating status, fault isolation, and log recording, and is the core of the system's execution.
[0100] The presentation layer (visualization): The core is the Dynamic Visualizer, which includes static layout rendering, animation engine, and information panel modules, to realize real-time dynamic display of device status and operation process, and provide operators with a visual interactive interface.
[0101] In a specific embodiment of the present invention, the operator inputs the starting and ending device IDs of the operation task in the display layer. The control layer then passes the planning request to the logic layer. The logic layer reads the device layering, node health, dynamic edge weights, and type data within the graph, calls the improved A* path planning algorithm, and combines it with a heuristic function with inter-layer penalties to solve for the optimal path while considering physical distance and layer differences. It automatically removes faulty devices, invalid devices, and invalid edges from the three-layer weighted directed graph model, outputs an ordered list of device node sequences, and returns the optimal path node ID list (ordered device node sequence list) to the control layer. After receiving the optimal path, the automated terminal in the control layer sends operation instructions to each device sequentially through the task execution engine. The operation log recording module records the time, device ID, status, and result of each operation step in real time. During execution, the data layer updates the running status of devices and edges in real time. If the fault handling module detects a faulty device / edge, it immediately triggers the fault isolation mechanism, bypasses the faulty node, and calls the logic layer to replan the local path, restores the effective connection, and ensures the continuous execution of the task. The dynamic visualizer in the presentation layer acquires device / edge status and operation process data in real time from the data layer and control layer. It renders layered backgrounds (control layer - blue, power layer - red, auxiliary layer - green) and stateful nodes / edges (running - green, fault - red, critical connection - red, emergency connection - orange) through static layout rendering. The animation engine updates frame-by-frame, highlighting the current operation node in gold and drawing the planned path with thick green lines. The information panel simultaneously displays core statistical data such as the total number of devices, total number of connections, device health, and task execution progress. The animation stops and displays a "Automation operation completed" message upon completion. Throughout the operation, the data logger continuously collects node / edge status data from the data layer and operation logs from the control layer, storing them in a historical database. After the task is completed, the report generator generates a PDF system operation report based on the collected data, including device status statistics, task execution status, fault records, and path planning information, achieving full-process traceability. The data logger is an independent auxiliary unit that relies on the data flow of the three-layer weighted directed graph model in the data layer to capture the dynamic changes of the graph model throughout the process, and synchronously receive the operation logs of the control layer for data persistence and to provide a data source for the report generator.
[0102] In a specific embodiment of the present invention, the method described herein is implemented based on the architecture of the system, and the specific process is as follows: Figure 2As shown, specifically: Upon receiving a user task instruction, the automated terminal invokes the path planner. The path planner, relying on a three-layer weighted directed graph model, solves the path and outputs equipment operation instructions. On one hand, these instructions are sent to the equipment controller to drive the cabin equipment operation. The equipment controller collects real-time equipment status feedback to the path planner and adds / updates equipment node information in the three-layer weighted directed graph model. On the other hand, the path planner simultaneously pushes the operation equipment information to the dynamic visualizer. The dynamic visualizer reads the configuration file and initialization data to complete the initial loading and continuously receives status update information, driving the user interface to display graphically. The data from the three-layer weighted directed graph model is synchronously sent to the data logger for persistent storage. Finally, the report generator retrieves all the information stored in the data logger to generate a cabin operation report.
[0103] The hierarchical operation graph module of the logic layer includes a path planner, which is an entity functional unit of the hierarchical operation graph module of the logic layer and is specifically used to implement all the technical logic of the planning stage. In the modeling stage, a three-layer weighted directed graph model is pre-built in the data layer to provide the computational basis for the path planner. When the automated terminal transmits the user operation task, the path planner starts and runs the improved A* path planning algorithm based on the three-layer weighted directed graph to complete the optimal path solution, fully implementing all the steps of the planning stage: "input node ID, graph model reading, algorithm iteration, and output path list". The path data output by the path planner is sent to the device controller to enter the execution stage and pushed to the visualizer for rendering in the visualization stage, thereby completing the functional binding between the path planner and the planning stage and connecting the four stages of the method.
[0104] The automated terminal module of the control layer includes a device controller, which is the physical functional unit of the automated terminal of the control layer, specifically used to implement all the technical logic of the execution phase. After the optimal path is output in the planning phase, it provides the basis for the device controller to issue operation instructions. When the path planner outputs the device operation instructions, the device controller starts and drives the cabin physical equipment to run based on the correspondence of device nodes in the three-layer weighted directed graph model, fully implementing all the steps of the execution phase: "sequentially issuing device operations, collecting real-time device status, updating graph model node information, and fault isolation and replanning". The real-time device status data collected by the device controller is fed back to the path planner for fault judgment and synchronous update of the three-layer weighted directed graph model, thereby completing the functional binding between the device controller and the execution phase and connecting the four phases of the method.
[0105] The report generator and the data logger are independent auxiliary units supporting the system according to the present invention. The report generator and the data logger work in pair in a coordinated manner, and are specifically configured to implement the functions of full-process data traceability and report output; during the entire operation process of all stages including modeling, planning, execution and visualization, real-time dynamic data of the three-layer weighted directed graph model is continuously sent to the data logger for persistent storage, so as to provide a complete time-series data basis for the report generator; after the task is completed, the report generator retrieves all information stored in the data logger, such as full graph model snapshots, operation logs, and fault records, to fully implement the function of automatically generating a standardized traceable cabin operation report after the task ends; the report generator relies on the data logger to receive all operation data of the four stages, so as to realize archiving and review of the full-process operation process.
Claims
1. A hierarchical graph theory method for autonomous control of ship engine rooms, characterized in that, Includes the following steps: S1: Modeling Phase: The ship's engine room equipment is abstracted into equipment nodes of the control layer, power layer, and auxiliary layer according to their functions. The connections between equipment are abstracted into dynamic edges with four-tuple attributes, and a three-layer weighted directed graph model is constructed. The four-tuple includes: source device, target device, distance / weight, and connection type. S2: Planning Phase: Taking the device nodes of the starting device and the ending device as input, read the data in the three-layer weighted directed graph model, and based on the read data, call the improved A* path planning algorithm to output an ordered sequence of device nodes; the improved A* path planning algorithm combines a heuristic function with inter-layer device penalty, takes into account physical distance and layer differences, automatically removes faulty device nodes / invalid dynamic edges, and solves the optimal path; S3: Execution phase: The task execution engine of the automated terminal executes the device operations sequentially according to the ordered device node sequence and records the operation information in real time; during the execution process, the status of the devices and dynamic edges is updated in real time. Once a faulty device or an invalid dynamic edge is detected, the fault isolation mechanism is immediately triggered to bypass the faulty device node and replan the local path. S4: Visualization Phase: During execution, the device status, connection status, and operation process are intuitively displayed through static layout rendering, dynamic animation updates, and real-time information panels.
2. The hierarchical graph theory method for autonomous control of ship engine rooms as described in claim 1, characterized in that, The device node includes: device ID, level, node coordinates, and health; the dynamic edge includes: weight, connection type, and validity; the node coordinates are two-dimensional X and Y coordinates pre-assigned to each device node according to the cabin equipment layering arrangement rules during the initialization phase of the three-layer weighted directed graph model modeling.
3. The hierarchical graph theory method for autonomous control of ship engine rooms as described in claim 2, characterized in that, The improved A* path planning algorithm specifically includes the following steps: Step 1, Input parameters: Use the starting device node ID and ending device node ID in the three-layer weighted directed graph model as the algorithm input, read all device nodes, levels, node coordinates, and dynamic edge quadruples attributes in the three-layer weighted directed graph model; traverse, filter and remove two types of objects: device nodes marked as faulty and invalid dynamic edges with a weight of 0, and only perform path iteration calculation based on valid nodes and valid edges; Step 2: Design the cost function to obtain the total cost. The total path cost function of the algorithm is: f(a) = g(a) + h(a, b) In the formula: f(a) represents the total cost; g(a) represents the actual cumulative path cost from the starting device node to the current device node a, summing the weights of each dynamic edge along the path; h(a,b) represents the heuristic function from the current device node a to the target device node b, calculated as follows: h(a,b)=D_ {Euclidean} (a,b)+|Layer_a-Layer_b|×2.0 In the formula: D_ {Euclidean} (a,b) represents the Euclidean physical distance between device node a and device node b; Layer_a and Layer_b are the cabin layers to which device node a and device node b belong, respectively; |Layer_a-Layer_b|×2.0 is the inter-layer penalty term; Step 3, Iterative Pathfinding Process: (1) Initialize the start set, store the starting device node into the set, and initialize the path cost; (2) Loop through the device nodes with the smallest total cost in the set and determine whether the device node is the target endpoint device node; if so, stop the iteration and backtrack to reconstruct the complete path. (3) If the destination is not reached, traverse all adjacent device nodes of the current device node and check whether the dynamic edge between them is valid; (4) If the dynamic edge is valid, calculate the cumulative actual cost of the adjacent device nodes; If the newly calculated actual cost is better than the historical value of the adjacent device node, then update the path cost, record the predecessor device node, and add the adjacent device node to the open set, repeating the loop iteration. Step 4, Algorithm Output: After the iteration is complete, the output consists of an ordered sequence of device nodes, which is then transmitted to the task execution engine of the automated terminal. Step 5, Fault Dynamic Replanning Logic: If a new faulty device node / failed dynamic edge is detected during the execution phase, the updated three-layer weighted directed graph model is used as the basis to return to step 1, complete the local path replanning, and automatically bypass the faulty object to ensure the continuous execution of the task.
4. The hierarchical graph theory method for autonomous control of ship engine rooms based on claim 2 or 3, characterized in that, The invalid dynamic edges include: dynamic edges with a weight of 0; dynamic edges where either of the two device nodes is marked as faulty; and dynamic edges where abnormal device operation causes the physical connection to be broken.
5. The hierarchical graph theory method for autonomous control of ship engine rooms as described in claim 4, characterized in that, The device status includes: normal operation status, fault status, current operation status, standby status, and maintenance status; the connection status includes: validity, connection priority type, and visual operation mode; the validity includes: valid dynamic edge and invalid dynamic edge; the connection priority type includes: normal, critical, and emergency; the visual operation mode includes: normal solid line, disconnected dashed line, and green animated path for task planning.
6. A hierarchical graph theory system for autonomous control of a ship's engine room, characterized in that, The system comprises a modeling module, a planning module, an execution module, and a visualization module connected in sequence. The modeling module abstracts the ship's engine room equipment into equipment nodes of the control layer, power layer, and auxiliary layer according to their functions, and abstracts the connections between equipment into dynamic edges with four-tuple attributes, constructing a three-layer weighted directed graph model. The planning module takes the equipment nodes of the starting and ending equipment as inputs, reads the data from the three-layer weighted directed graph model, and, based on the read data, calls an improved A* path planning algorithm to output an ordered sequence of equipment nodes. The execution module's automated terminal task execution engine executes equipment operations sequentially according to the ordered sequence of equipment nodes and records operation information in real time. During execution, the status of equipment and dynamic edges is updated in real time. Once a faulty equipment or an invalid dynamic edge is detected, a fault isolation mechanism is immediately triggered to bypass the faulty equipment node and replan the local path. During execution, the visualization module intuitively displays the equipment status, connection status, and operation process through static layout rendering, dynamic animation updates, and a real-time information panel.
7. The hierarchical graph theory system for autonomous control of ship engine rooms as described in claim 6, characterized in that, The modeling module includes a device node module and a dynamic edge module; The device node module includes nodes for all devices; The dynamic edge module includes all the connections between devices; The device nodes include: device ID, level, node coordinates, and health; the device connection relationships include: weight, connection type, and validity; the execution module includes: task execution engine, operation log recording module, and fault handling module; the visualization module includes: static layout rendering module, animation engine, and information panel module.
8. The hierarchical graph theory system for autonomous control of ship engine rooms based on claim 7, characterized in that, The improved A* path planning algorithm specifically includes the following steps: Step 1, Input parameters: Use the starting device node ID and ending device node ID in the three-layer weighted directed graph model as the algorithm input, read all device nodes, levels, node coordinates, and dynamic edge quadruples attributes in the three-layer weighted directed graph model; traverse, filter and remove two types of objects: device nodes marked as faulty and invalid dynamic edges with a weight of 0, and only perform path iteration calculation based on valid nodes and valid edges; Step 2: Design the cost function to obtain the total cost. The total path cost function of the algorithm is: f(a) = g(a) + h(a, b) In the formula: f(a) represents the total cost; g(a) represents the actual cumulative path cost from the starting device node to the current device node a, summing the weights of each dynamic edge along the path; h(a,b) represents the heuristic function from the current device node a to the target device node b, calculated as follows: h(a,b)=D_ {Euclidean} (a,b)+|Layer_a-Layer_b|×2.0 In the formula: D_ {Euclidean} (a,b) represents the Euclidean physical distance between device node a and device node b; Layer_a and Layer_b are the cabin layers to which device node a and device node b belong, respectively; |Layer_a-Layer_b|×2.0 is the inter-layer penalty term; Step 3, Iterative Pathfinding Process: (1) Initialize the start set, store the starting device node into the set, and initialize the path cost; (2) Loop through the device nodes with the smallest total cost in the set and determine whether the device node is the target endpoint device node; if so, stop the iteration and backtrack to reconstruct the complete path. (3) If the destination is not reached, traverse all adjacent device nodes of the current device node and check whether the dynamic edge between them is valid; (4) If the dynamic edge is valid, calculate the cumulative actual cost of the adjacent device nodes; If the newly calculated actual cost is better than the historical value of the adjacent device node, then update the path cost, record the predecessor device node, and add the adjacent device node to the open set, repeating the loop iteration. Step 4, Algorithm Output: After the iteration is complete, the output consists of an ordered sequence of device nodes, which is then transmitted to the task execution engine of the automated terminal. Step 5, Fault Dynamic Replanning Logic: If a new faulty device node / failed dynamic edge is detected during the execution phase, the updated three-layer weighted directed graph model is used as the basis to return to step 1, complete the local path replanning, and automatically bypass the faulty object to ensure the continuous execution of the task.
9. The hierarchical graph theory system for autonomous control of ship engine rooms according to claim 8, characterized in that, The system architecture is divided into a top-down layer: presentation layer, control layer, logic layer, and data layer. The visualization module is entirely deployed in the presentation layer, which uses a dynamic visualizer to achieve full visualization rendering and real-time operational status display. The execution module is entirely deployed in the control layer, which uses an automated terminal and a built-in task execution engine to achieve device command issuance, fault isolation, and operation log recording. The modeling module and planning module are uniformly integrated within the hierarchical operation graph module of the logic layer. The hierarchical operation graph has a built-in improved A* path planning algorithm, and the planning module relies on the improved A* path planning algorithm built into the hierarchical operation graph to solve for the optimal path. The data layer does not carry independent functional modules; it only serves as a common data storage carrier, storing device node and dynamic edge graph model data generated by the modeling module, and providing data reading and status update support for the entire process of the visualization module, execution module, modeling module, and planning module.
10. The hierarchical graph theory system for autonomous control of ship engine rooms according to claim 6, characterized in that, The static layout rendering specifically involves drawing layered backgrounds, with different colors selected for different layers, and different colors used for device and status edges; the dynamic animation update specifically involves updating frame by frame through an animation engine, highlighting the current operation node, and bolding the planned path; the real-time information panel specifically involves synchronously displaying the total number of devices, the total number of connections, device health, and task execution progress, stopping and displaying a "Automatic operation completed" prompt when the device operation is completed.
