Thermodynamic system topology generation folding method and device

By introducing rule-driven component screening and graph theory algorithms in the design of thermal system of nuclear power plants, the component display status and connection relationships are automatically processed, and the problem of model redundancy and topological relationships is solved, and design efficiency and consistency are improved.

CN120509253APending Publication Date: 2025-08-19CHINA STATE SHIPBUILDING CORP LTD RESEARCH INSTITUTE 719
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510611139.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-13
Publication Date
2025-08-19

AI Technical Summary

Technical Problem

The existing technology lacks an intelligent folding mechanism in the design of large thermal systems such as nuclear power plants, resulting in model redundancy and difficulty in version management, lack of dynamic mapping of topological relationships between levels, and the folding process is easy to destroy the cross-level transmission logic of matter/energy/information flow, and the visible components and ports cannot be dynamically adjusted, resulting in inefficient design and damage to model consistency.

Method used

The rules-driven component screening mechanism is adopted, combined with graph theory algorithm and hash table indexing, and redundant components are dynamically hidden, cross-level physical connections are automatically identified, and naming conflicts are resolved through standardized naming, realizing automatic processing of the entire process.

Benefits of technology

Improves design efficiency, reduces information load, reduces manual operation errors, ensures topological relationship consistency and bidirectional mapping of component identifiers, and shortens view switching time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120509253A_ABST
    Figure CN120509253A_ABST
Patent Text Reader

Abstract

The invention discloses a thermodynamic system topology generation folding method and device, and the method comprises the steps: obtaining a thermodynamic system block diagram, analyzing the hierarchical structure of the thermodynamic system block diagram, generating a hierarchical topological graph, and obtaining topology description data. According to the topology description data, visible components and ports are screened in a folding mode, and a screened data set is generated. A unit number is allocated from the screened data set to generate a set of numbered units. And searching a direct connection path from the numbering unit set, and generating a connection pair list. And generating folding components based on the connected pair list, and updating the connection of the folding components to obtain a folding component set. Normalized naming from the set of folded components generates a named folded component description. And describing the reserved numbering unit, the folding component and the port from the named folding component, and generating folded thermodynamic system block diagram data. Therefore, by means of the thermodynamic system topology generation folding method, representation of a complex thermodynamic system can be effectively simplified, system analysis and design efficiency is improved, and convenience is provided for optimization of the thermodynamic system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of digital design of thermal systems, and in particular to a method and device for generating and folding the topology of a thermal system. Background Art

[0002] The engineering design of large-scale thermal systems, such as nuclear power plants, is characterized by multidisciplinary coupling, multi-level nesting, and high reliability requirements. The system's components encompass components from multiple fields, including mechanics, thermal engineering, and control, with complex operating scenarios and intertwined logical relationships. With the widespread adoption of model-based systems engineering (MBSE) methods, constructing internal block diagrams for thermal systems using the SysML modeling language has become a mainstream design paradigm. Internal block diagrams express the functional architecture of the system through structured component connections, but face challenges in adapting to multiple scenarios in practical applications. Designers need to focus on different subsystems and equipment in different analysis scenarios (such as heat balance calculations and control logic verification), and traditional block diagram representations cannot dynamically adapt to the focus of each scenario. For example, during heat balance analysis, only the thermal parameter changes of core equipment, such as heat exchangers and pumps, need to be considered. Redundant auxiliary components, such as valves and pipe sections, significantly increase the information load and reduce design efficiency.

[0003] Existing methods suffer from three major technical flaws: First, the SysML modeling environment lacks an intelligent folding mechanism, forcing designers to manually create subgraphs or hide non-critical components to meet scenario requirements, resulting in model redundancy and difficult version management. Second, there is a lack of dynamic mapping of topological relationships between hierarchies, and folding operations can easily disrupt the cross-hierarchical transfer logic of material, energy, and information flows. Third, the naming of folded components lacks bidirectional traceability with the original model, which can easily lead to interface definition conflicts during multi-disciplinary collaborative design. These issues are particularly prominent in safety-critical systems such as nuclear power plants. Traditional methods require repeated switching between the full model and simplified views, which not only reduces design efficiency but also risks disrupting model consistency due to manual errors.

[0004] The core technical contradiction lies in the conflict between the integrity requirements of the full internal block diagram and the simplicity requirements of scenario-based design. Existing solutions often use static folding rules at fixed levels. These rules cannot dynamically adjust visible components and ports based on analysis objectives (such as thermodynamic parameter tracking and control signal flow verification). Furthermore, it is difficult to maintain the semantic integrity of cross-level connection relationships during the folding process. For example, when hiding non-thermal equipment, traditional methods may mistakenly cut off the associated energy transmission paths, causing subsequent simulation calculations to fail. Summary of the Invention

[0005] The purpose of the present invention is to provide a method and device for generating folding of thermal system topology, which can effectively simplify the representation of complex thermal systems, improve the efficiency of system analysis and design, and facilitate the optimization of thermal systems.

[0006] To achieve the above-mentioned objectives, in a first aspect, the present invention provides a folding method for generating a thermal system topology, comprising: obtaining a thermal system block diagram, parsing its hierarchical structure to generate a hierarchical topology diagram, and obtaining topology description data; according to the topology description data, using a folding mode to filter visible components and ports to generate a filtered data set; assigning unit numbers from the filtered data set to generate a numbered unit set; searching for direct connected paths from the numbered unit set to generate a connected pair list; generating folded components based on the connected pair list, updating folded component connections to obtain a folded component set; normalizing the naming from the folded component set to generate a named folded component description; retaining the numbered units, folded components and ports from the named folded component description to generate folded thermal system block diagram data, wherein the folded thermal system block diagram data includes a visual graphic and a structured metadata description.

[0007] In a second aspect, the present invention provides a thermal system topology generation and folding device, comprising: a module for obtaining topology description data, a module for generating a filtered data set, a module for generating a numbered unit set, a module for generating a connected pair list, a module for obtaining a folded component set, a module for generating a named folded component description, and a module for generating thermal system block diagram data. The module for obtaining topology description data is used to obtain a thermal system block diagram, parse its hierarchical structure to generate a hierarchical topology diagram, and obtain topology description data. The module for generating a filtered data set is used to filter visible components and ports using a folding mode based on the topology description data to generate a filtered data set. The module for generating a numbered unit set is used to assign unit numbers from the filtered data set to generate a numbered unit set. The module for generating a connected pair list is used to search for directly connected paths from the numbered unit set to generate a connected pair list. The module for obtaining a folded component set is used to generate a folded component based on the connected pair list, update the folded component connections, and obtain a folded component set. The module for generating a named folded component description is used to normalize names from the folded component set to generate a named folded component description. The module for generating thermal system block diagram data is used to retain numbered units, folded components and ports from the named folded component description to generate folded thermal system block diagram data, wherein the folded thermal system block diagram data includes visual graphics and structured metadata descriptions.

[0008] Compared with the prior art, the method and device for generating and folding the topology of a thermal system according to the present invention have the following beneficial effects:

[0009] 1. A rule-driven component screening mechanism automatically hides redundant components (such as valves and pipe sections) based on scenario requirements such as thermal balance calculations and control logic verification, reducing information load. Adjacency matrix verification and hierarchical backtracking mechanisms ensure topological consistency when switching views, reducing the risk of model damage caused by manual errors.

[0010] 2. Graph theory algorithms (Dijkstra path optimization + depth-first search) are used to achieve automatic identification and reconstruction of cross-level physical connections;

[0011] 3. Through hash table indexing and JSON structured metadata, a bidirectional mapping between component identifiers and original models is achieved, reducing naming conflicts and collaborative design interface errors.

[0012] 4. Full-process automation shortens view switching time. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 This is a flow chart of a method for generating and folding a thermal system topology in the first embodiment of the present invention;

[0014] Figure 2 This is a schematic structural diagram of a folding device for generating a topology of a thermal system in a second embodiment of the present invention;

[0015] Figure 3 is a flow chart of a method for generating and folding a thermal system topology in a specific embodiment of the present invention;

[0016] Figure 4 It is a schematic structural diagram of an internal block diagram of a water supply system of a nuclear power plant in a specific embodiment of the present invention;

[0017] Figure 5 It is a structural schematic diagram of a folded internal block diagram of a nuclear power plant water supply system in a specific embodiment of the present invention. DETAILED DESCRIPTION

[0018] The following is a further detailed description of the embodiments of the present invention in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely for the purpose of explaining the embodiments of the present invention and are not intended to limit the embodiments of the present invention. It should also be noted that, for ease of description, the accompanying drawings only illustrate portions of the embodiments of the present invention, rather than all structures.

[0019] To facilitate understanding, the main implementation concepts of the embodiments of the present invention are first briefly described.

[0020] Thermal system design and optimization plays a critical role in energy, chemical, and industrial production. Their efficiency directly impacts system energy consumption and operational stability. With the increasing adoption of complex thermal systems, the clear representation and efficient management of internal block diagrams have become crucial aspects of system design. Traditional block diagram representation methods often suffer from information redundancy and unclear hierarchies when dealing with complex, multi-layered, multi-component systems, leading to inefficient design and collaboration difficulties.

[0021] To address these issues, the inventors discovered that the core problems lie in the lack of a dynamic display mechanism, difficulty identifying connectivity relationships, and a lack of naming conventions. First, to address the display mechanism issue, they analyzed the functional coupling of components and proposed a rule-driven dynamic screening mechanism. Second, to identify connectivity relationships, they combined graph theory algorithms to construct a multi-level path search model. Finally, to address naming conventions, they established hierarchical encoding rules based on topology. These three technological breakthroughs form a complete solution.

[0022] Example 1: Figure 1 This is a flow chart of a method for generating a folding method for a thermal system topology in the first embodiment of the present invention. Figure 1 As shown, embodiment 1 provides a method for generating a folding method for a thermal system topology, including:

[0023] Step S100: Obtain a thermal system block diagram, analyze its hierarchical structure to generate a hierarchical topology diagram, and obtain topology description data;

[0024] Step S200 , filtering visible components and ports using a folding mode according to the topology description data to generate a filtered data set;

[0025] Step S300, assigning unit numbers from the screened data set to generate a numbered unit set;

[0026] Step S400, searching for a directly connected path from the numbered unit set to generate a connected pair list;

[0027] Step S500, generating folding components based on the connected pair list, updating folding component connections, and obtaining a folding component set;

[0028] Step S600, normalizing the names of the folding component set to generate a named folding component description;

[0029] Step S700 : generating folded thermal system block diagram data from the named folded component description by retaining numbered units, folded components, and ports, wherein the folded thermal system block diagram data includes a visual graphic and a structured metadata description.

[0030] Among them, the hierarchical topology diagram refers to the structured graph data divided into design level, system level and subsystem level through the functional coupling degree clustering algorithm, and uses the adjacency matrix to store the component connection relationship; this feature provides the data basis for dynamic screening and path identification.

[0031] Among them, folding mode filtering refers to dynamically adjusting the display status of components and ports according to preset rules, and using graph theory algorithms to verify the validity of the adjacency matrix; this feature realizes the core function of displaying and hiding on demand.

[0032] Among them, unit number allocation refers to assigning continuous identifiers according to preset rules based on functional type grouping, and constructing hash table indexes to form standardized mappings; this feature ensures unique identification of components and provides a basis for connectivity analysis.

[0033] Among them, direct connection path search refers to constructing an undirected graph to traverse the physical connection relationship, and filtering key units through preset thresholds to form an ordered connection list; this feature accurately identifies effective cross-level connections.

[0034] Among them, folded component generation refers to extracting path information based on connected pairs, constructing a local topology graph to verify geometric constraints, and then generating a component set containing port connections; this feature ensures the integrity of the topological structure after folding.

[0035] Among them, standardized naming means checking the naming consistency after sorting in alphabetical order, and generating a unique identifier mapping table through duplicate checking; this feature solves the problem of naming confusion.

[0036] Specifically, the method first establishes structured topological data through hierarchical parsing to provide standardized input for subsequent operations. A dynamic screening mechanism retains key components based on actual needs and eliminates redundant information interference. The unit numbering system establishes a unique identifier for each valid component, making the connection path search operational. Efficient path identification based on graph theory algorithms accurately extracts cross-hierarchical connection relationships, laying the foundation for the generation of folded components. During the folding process, local topology verification is used to ensure the physical feasibility of component connections, and finally a standardized naming system is used to achieve standardized output of component descriptions. The entire process forms a closed-loop process, effectively solving the problems of information redundancy, missing connections, and confusing naming in traditional methods.

[0037] Compared with the existing technology, the existing method relies on manual adjustment of component display status and cannot dynamically respond to changes in design requirements. Traditional hierarchical division lacks functional coupling analysis, resulting in unreasonable subgraph division. The present invention realizes intelligent control of component display through a rule-driven screening mechanism and optimizes hierarchical division using a clustering algorithm. In terms of connectivity relationship processing, the existing technology requires manual verification of connection relationships, while the present invention automatically identifies valid paths through undirected graph traversal. In terms of naming conventions, the existing method uses random naming, which is prone to ambiguity. The present invention ensures uniqueness and traceability through structured coding.

[0038] Through the above technical solutions, the present invention dynamically adjusts component display status based on design requirements, reducing information redundancy; uses an automated path search algorithm to quickly identify valid connections, avoiding manual errors; and employs standardized naming conventions to ensure the accuracy and consistency of component descriptions. These three technical improvements work synergistically to significantly enhance the manageability and design efficiency of complex thermal system block diagrams.

[0039] In this embodiment, step S100 includes:

[0040] Step S101: Analyze the thermal system block diagram to obtain node and edge data, and use a clustering algorithm based on functional coupling to divide the design level, system level, and subsystem level;

[0041] Step S102: Based on the hierarchical division result, an adjacency matrix is used to store component connection relationships, and component port connection data is extracted through depth-first search to generate an initial interaction relationship set.

[0042] Step S103: If the initial interaction relationship set includes a material attribute port connection, a Dijkstra algorithm is used to establish a material flow transmission path and generate a material interaction topology subgraph;

[0043] Step S104: if the initial interaction relationship set includes an energy attribute port connection, the energy flow direction is calculated based on the steady-state enthalpy value difference, and an energy interaction topology subgraph is generated;

[0044] Step S105: If the initial interaction relationship set includes a signal attribute port connection, the signal transmission path is analyzed using the Mersenne gain formula to generate an information interaction topology subgraph;

[0045] Step S106 , merging topology subgraphs by matching node IDs to generate a hierarchical topology graph, which is serialized and stored in JSON format to obtain topology description data.

[0046] Among them, the clustering algorithm based on functional coupling refers to dividing component clusters with close functional associations by calculating the weighted values of the number of interfaces, energy exchange frequency and signal dependence between components. Specifically, it can be implemented using a hierarchical clustering algorithm, which can dynamically adapt to the functional aggregation needs of different levels. The adjacency matrix stores the connection relationship of components, which means using a two-dimensional array to record the direct connection status between components. Specifically, a sparse matrix compression storage method can be used. This method effectively reduces memory usage while retaining complete topological connection information. The Dijkstra algorithm establishes the material flow transmission path, which uses the pipeline resistance and transmission efficiency between components as weight parameters to screen the optimal material flow path. Specifically, it can be implemented using a priority queue optimization algorithm, which avoids invalid path calculations. The steady-state enthalpy difference calculation of energy flow direction refers to calculating the enthalpy difference between adjacent components according to the thermodynamic formula. Specifically, the finite element method can be used to simulate the local enthalpy distribution. This simulation method accurately reflects the direction of energy transmission. The Mason gain formula analyzes signal transfer paths by calculating the signal transfer function through an algebraic combination of the forward path and the loop gain. Specifically, a topological sorting method is used to determine the order of traversal of the signal flow graph, which ensures the completeness of the gain calculation. JSON serialized storage encodes node IDs, connection properties, and hierarchical relationships as key-value pairs. This is achieved using the UTF-8 encoding specification, which supports cross-platform data parsing.

[0047] Specifically, the functional coupling clustering algorithm first calculates the connection density of inter-component interfaces, such as the number of intersections of material transfer pipelines between each pair of components, the statistical value of energy exchange frequency, and the dependency depth of signal control links. Dynamic thresholds are set to automatically divide the design hierarchy. The component coupling threshold at the system level can be 1.5 times that at the subsystem level. When traversing the adjacency matrix, the depth-first search algorithm prioritizes nodes with multiple connections, such as components with both material and energy ports, thereby fully extracting cross-hierarchical port connection data. For the material flow topology subgraph, the Dijkstra algorithm uses pipe length and the number of elbows as path weights. For example, a weight of 1 is assigned to each meter of straight pipe, and a weight of 3 is assigned to each 90-degree elbow. The minimum cumulative weight is used to determine the valid transmission path. To determine the direction of energy flow, the steady-state enthalpy difference calculation incorporates component operating temperature and pressure parameters. For example, the saturated steam enthalpy is calculated at the component outlet, and the subcooled water enthalpy is calculated at the condenser inlet. The flow direction is determined by the positive or negative sign of the difference. During the signal transmission path analysis process, the Mason gain formula considers the influence of both the forward path gain and the feedback loop. For example, in the temperature control loop, the sensor signal transmission coefficient is set as the forward gain, and the actuator response delay is set as the feedback coefficient, thereby accurately constructing the signal flow topology.

[0048] Compared with the existing technology, the traditional method adopts fixed hierarchical division rules, such as mechanical grouping by physical location or component type, while the present invention realizes adaptive hierarchical division through dynamic functional coupling evaluation, which can accurately reflect the actual interaction intensity between components. The existing technology usually adopts a unified processing method when dealing with multi-attribute connections, such as treating material and energy ports as ordinary connections, while the present invention constructs topological subgraphs for different physical properties, such as using path optimization algorithms for material flow, introducing thermodynamic calculations for energy flow, and applying control theory models to signal flow to achieve accurate mapping of physical properties. Existing topological data storage mostly uses unstructured text records, while the present invention realizes structured storage through JSON format, for example, component ID, connection type, and hierarchical relationship are defined as independent fields, supporting efficient retrieval of subsequent processing modules.

[0049] Through the above-mentioned technical solutions, the present invention achieves precise construction of the hierarchical topology of thermal systems. The functional coupling clustering algorithm reduces the hierarchical partitioning error to less than 30% of traditional methods. The independent generation of multi-attribute topological subgraphs increases the path identification accuracy of material, energy, and signal flows to 98%, 95%, and 97%, respectively. JSON structured storage improves data parsing efficiency by approximately 40%. Specifically, in a pressurized water reactor nuclear power plant, the steam generator secondary system hierarchy, which previously required manual adjustment, can now be automatically generated into three design hierarchies through an algorithm. During reactor coolant system topology construction, the material flow path identification time between the main pump and steam generator was reduced from 15 minutes to 2 minutes. During control system integration testing, the automatic generation of signal flow topology reduces the debugging cycle by 50%.

[0050] In this embodiment, step S200 includes:

[0051] Step S201, obtaining the initial states of components and ports from the topology description data, and generating an initial hidden state set based on a preset folding rule;

[0052] Step S202: If the component name specified by the user exists in the initial hidden state set, the corresponding component is updated to a visible state to generate a visible component set;

[0053] Step S203: If the port name specified by the user exists in the initial hidden state set, the corresponding port is updated to the display state to generate a visible port set;

[0054] Step S204, merging visible components and ports through a union operation to generate a preliminary data set;

[0055] Step S205, using a graph theory algorithm to verify whether the adjacency matrix of the preliminary data set complies with the connection rules, retaining valid data to generate a verified data set;

[0056] Step S206: convert the verified dataset into a screening dataset by using JSON serialization.

[0057] Among them, the initial hidden state set refers to the set of objects to be hidden that is automatically generated according to the system's preset folding rules. Specifically, it can be implemented using rules based on component function type or port attribute classification, such as setting auxiliary devices or signal ports to the default hidden state. The matching process of user-specified component names is implemented through a string comparison algorithm. When the input name completely matches the elements in the hidden set, the state update mechanism is triggered. The union operation uses the Union function in the set operation to merge visible objects to ensure that the merged data set contains all valid components and ports. The adjacency matrix verification process checks the symmetry and connectivity indicators of the matrix, such as using the Floyd-Warshall algorithm to detect path reachability, thereby excluding isolated nodes or invalid connections. JSON serialization converts the verified data set into a standardized format through a key-value pair mapping structure, such as using UTF-8 encoding to generate a parsable text file.

[0058] Specifically, the screening process first establishes an initial hidden state based on the system's preset rules. The rule can set the default hidden object based on the component hierarchy or port attributes. When the user enters a specific component or port name, the system searches the hidden set through an exact matching algorithm, and if it exists, its status is marked as displayed. The components and ports in the display state are merged into a unified data set through set operations, which may contain redundant or conflicting connection relationships. The merged adjacency matrix is traversed and verified through a graph theory algorithm, for example, to detect whether there are loops or broken paths, and only retain the topological structure that meets the physical connection rules of the thermal system. Finally, the valid data set is converted into JSON format to ensure that the subsequent processing module can directly parse the structured data.

[0059] Compared to existing technologies, traditional methods typically employ fixed-level display controls, making it impossible to dynamically adjust visible objects based on user needs. Existing technologies lack validation based on connection rules, resulting in filtered data potentially containing invalid topologies. Existing filtering mechanisms often only support display controls for a single type of object and are unable to simultaneously handle complex filtering requirements for components and ports. Existing data output formats are often unstructured text, requiring additional parsing steps in subsequent processing modules.

[0060] Through the above technical solution, the present invention can realize dynamic joint screening of components and ports, and enhance the flexibility of display control through the interaction of preset rules and user input. The adjacency matrix verification mechanism can effectively identify and eliminate data combinations that do not conform to physical connection rules, ensuring the topological validity of the screening results. JSON serialization processing gives the data set a standardized interface format, which is convenient for subsequent modules to directly call and process. Through multi-stage verification and structured processing, the present invention solves the problems of display redundancy and low operational efficiency caused by the lack of a screening mechanism during the folding process of complex thermal system block diagrams.

[0061] In this embodiment, step S300 includes:

[0062] Step S301, extracting unit identifiers and type attributes from the screening data set, grouping by functional type based on preset classification rules, and generating a grouped unit subset;

[0063] Step S302: obtaining a list of unit identifiers from the grouped unit subsets, and generating a subset to be processed by hierarchical priority sorting if the number of identifiers exceeds a preset threshold;

[0064] Step S303, extracting unit identifiers from the subset to be processed, assigning consecutive numbers in grouping order based on a preset numbering rule, and generating an initial number set;

[0065] Step S304, checking whether the connectivity of the units in the initial number set meets the topological constraints, and removing isolated units to generate a valid number set;

[0066] Step S305: extracting the mapping relationship between unit identifiers and numbers from the valid number set, serializing the data in JSON format, and generating standardized identification data;

[0067] Step S306 : constructing a hash table index based on the standardized identification data, with the key being the unit identification and the value being the allocation number, and generating a unit number set.

[0068] Among them, the preset classification rules refer to the logical conditions for dividing units into specific groups according to their functional attributes. Specifically, they can be implemented by a clustering algorithm based on functional coupling degree to ensure that units in the same group have similar functional attributes. Hierarchical priority sorting refers to a dynamic adjustment mechanism for the unit processing order based on the system design level weight. Specifically, it can be implemented by a sequential priority queue at the design level, system level, and subsystem level to give priority to key level units to avoid discrete numbering. Topological constraints refer to the connectivity conditions that units must meet in the topological structure of the thermal system. Specifically, they can be implemented by a threshold verification method for the number of unit connection edges in the adjacency matrix to exclude invalid isolated units. Hash table index refers to a data structure that establishes a fast retrieval relationship between unit identification and numbering. Specifically, it can be constructed using an open addressing method or a chain address method conflict handling mechanism to improve the efficiency of subsequent connectivity path analysis.

[0069] Specifically, the present invention realizes the optimization of number allocation through functional classification and dynamic sorting mechanism. First, the units are grouped according to the functional type to form subsets with the same attribute characteristics. When the number of units exceeds the preset threshold, the processing order is adjusted through hierarchical priority sorting to ensure that key hierarchical units are given priority to obtain consecutive numbers. The numbers are then assigned in the order of grouping, and the unit connectivity is verified during the allocation process to see whether it meets the topological constraints, and isolated units are eliminated to maintain system connectivity. Standardized identification data is serialized through JSON to achieve cross-platform compatibility, and the construction of hash table indexes provides data support for the rapid mapping of unit identification and numbering. The entire process ensures the continuity, uniqueness and matching of the numbering with the system topology through a closed-loop process of grouping, sorting and verification.

[0070] Compared to existing technologies, traditional methods typically use global sequential numbering or manual allocation, which cannot handle the dynamic needs of functional grouping and hierarchical priority, and lack a topology constraint verification mechanism, resulting in redundant or missing numbering. This invention combines functional classification with hierarchical sorting to dynamically adjust the numbering strategy, while also introducing topology constraint checking. This ensures numbering compliance while enhancing compatibility with the system structure.

[0071] Through the above technical solution, the present invention solves the problems of chaotic unit number allocation and difficulty in balancing hierarchical priorities and topological constraints during the folding of thermal system block diagrams, realizes the continuous allocation and unique identification of unit numbers, avoids the interference of isolated units in subsequent connectivity path analysis, and improves the number allocation efficiency and system maintainability through structured data processing.

[0072] In this embodiment, step S400 includes:

[0073] Step S401, extracting unit numbers from the numbered unit set, and constructing an undirected graph, where nodes are unit numbers and edges are connected paths based on topological connection relationships;

[0074] Step S402, traversing all edges in the undirected graph, and if there is a direct physical connection between the starting unit and the end unit in the original topology graph, adding the connected pair to the valid connected pair set;

[0075] Step S403, traversing the effective connected pair set, counting the number of directly connected neighbors of each unit, and adding the unit to the key unit set if the number exceeds a preset threshold;

[0076] Step S404, extracting the start and end point numbers of connected pairs from the valid connected pair set to generate a preliminary connected pair list;

[0077] Step S405 , sorting the unit numbers in the preliminary connected pair list according to a hierarchical structure to generate an ordered connected pair set;

[0078] Step S406: Convert the ordered connected pair set into a JSON format document to generate a connected pair list.

[0079] Among them, the undirected graph model refers to a mathematical structure constructed with unit numbers as nodes and topological connection relationships as edges. Specifically, it can be implemented using adjacency lists or adjacency matrix data structures. This model provides a mathematical expression basis for connectivity path analysis. Direct physical connection verification refers to checking whether there are actual material, energy, or signal transmission paths between units in the original topological graph. Specifically, it can be implemented using adjacency matrix traversal or path backtracking algorithms to ensure that the connection relationships retained after folding are consistent with the real physical system. The key unit set refers to the core connection nodes selected based on the number of directly connected neighbors exceeding a preset threshold. Specifically, it can be stored in a hash table and set with a threshold parameter. For example, the threshold can be 3-5 neighbor units. This mechanism can prioritize core components with high connectivity. Hierarchical structure sorting refers to the order of connected pairs according to system design hierarchy or functional priority. Specifically, it can be implemented using a topological sorting algorithm to maintain the logical interpretability of the folded structure.

[0080] Specifically, the present invention first establishes a mathematical framework for unit connection relationships through undirected graph modeling to provide data structure support for path identification. Subsequently, invalid or virtual connections are filtered out through a physical connection verification mechanism, retaining only real physical connection pairs to solve the problem of information redundancy after folding. The key unit screening step identifies core connection nodes by setting a threshold for the number of neighbors, and prioritizes high-connectivity units to avoid missing key paths. The verified connection pairs are hierarchically sorted and converted into structured JSON documents to form a standardized connection relationship description system, providing standardized input data for subsequent folding component generation.

[0081] Compared with existing technologies, traditional methods rely on manual annotation or simple adjacency identification, making it difficult to distinguish physical connections from logical associations, which can easily lead to the loss of key paths or the retention of redundant connections after folding. This invention combines an undirected graph model with a physical verification mechanism to achieve automated identification of real connections. By screening key units and sorting them hierarchically, it optimizes the data structure while preserving core connections, overcoming the inefficiency and error-proneness of manual processing.

[0082] Through the above-mentioned technical solution, the present invention can accurately identify direct physical connectivity paths between units in multi-level thermal systems, avoiding the loss of key connections or redundant information interference after folding. For example, during the folding of a reactor protection system block diagram, this method can automatically identify the signal transmission path between the pressurizer pressure control valve and the containment spray system, eliminating non-physical connections such as control signals. At the same time, it can retain core reaction units with high connectivity through key unit screening, ultimately generating folded topology description data with clear structure and logical coherence.

[0083] In this embodiment, step S500 includes:

[0084] Step S501, traversing each connected pair in the connected pair list, extracting the unit number and path information of the current connected pair, generating a corresponding folding component, including an inflow port connected to an outlet, and an outflow port connected to an inlet, to obtain a folding component description set;

[0085] Step S502, extracting port connection information one by one from the foldable component description set, and constructing a local topology graph corresponding to each foldable component;

[0086] Step S503, obtaining a connection path from each of the local topological graphs, determining whether the geometric constraints are satisfied, and marking a valid folding component set;

[0087] Step S504: extracting unit numbers from the valid folding component set, generating a complete mapping from unit numbers to folding components using a hash table, and obtaining a component index structure;

[0088] Step S505: Obtain all unit numbers from the component index structure, count the number of associated components of each unit, and if the number exceeds a preset threshold, mark it as a critical unit set;

[0089] Step S506, based on the key unit set and all the local topology graphs, a depth-first search is used to analyze the extended connected paths to generate an extended connected pair set;

[0090] Step S507: merging the extended connected pair set with the valid folding component set, updating the port connection relationship of the folding components, and generating a folding component set.

[0091] The "connected pair list" refers to an ordered set of unit numbers containing directly connected paths. Specifically, it can be generated using an undirected graph traversal combined with hierarchical sorting to accurately describe the physical connection relationships between components. The "local topology map" refers to a micro-network structure constructed based on port connection information. Specifically, it can be implemented using an adjacency list or adjacency matrix. It is used to verify the geometric feasibility of the internal connections of the folded component. Geometric constraints refer to the spatial matching rules between component port locations and connection paths. Specifically, they can be implemented using coordinate offset threshold detection to prevent path misalignment or breakage after folding. The "hash table mapping" refers to a key-value pair index structure between unit numbers and folded components. Specifically, it can be implemented using open addressing or chain addressing methods to quickly retrieve and update component associations. The "critical unit set" refers to a set of core nodes whose number of associated components exceeds a threshold. Specifically, it can be screened using a counter and sorting algorithm to identify important hub nodes in the topology. Depth-first search refers to a graph algorithm that recursively traverses along connection path branches. Specifically, it can be implemented using a stack data structure to discover potential but unexplicitly labeled extended connectivity paths.

[0092] Specifically, when traversing the connected pairs to generate folded components, the system first extracts the unit number and connection path of each connected pair to form a folded component description set containing the inflow / outflow port attributes. Subsequently, a local topology graph is constructed for each folded component, and the geometric constraints of the port connection are verified through coordinate offset detection to screen out valid folded components. After establishing the hash table mapping relationship, the system counts the number of associated components of each unit and identifies the key unit set that affects the topological integrity. Based on the key unit set, a depth-first search algorithm is used to expand the search for potential connection paths in the local topology graph to generate an extended connected pair set containing the newly added paths. Finally, the expanded connected pairs are merged with the verified valid folded components, and the port connection relationship of the folded components is updated to ensure that the folded topology information completely covers the core interaction path of the original system.

[0093] Compared with the existing technology, the traditional method only relies on the static connectivity list when generating folding components, and lacks a dynamic verification mechanism for geometric constraints, which leads to port misalignment or path breakage after folding. The present invention effectively verifies the structural rationality of the folding component through local topology graph construction and geometric constraint detection. The existing technology uses fixed rule screening when processing key nodes, which is difficult to adapt to the topological characteristics of different systems. The present invention dynamically marks key units based on the number of associated components, combines depth-first search to expand the path, and significantly improves the recognition accuracy of the key path. The existing folding component update mechanism uses a linear traversal method. The present invention uses hash table mapping to achieve rapid retrieval and update of component relationships, which improves the processing efficiency of large-scale systems by two orders of magnitude.

[0094] Through the above technical solution, the present invention solves the problem of topological information loss caused by the lack of dynamic verification during the generation of folding components, ensuring that the folded system block diagram completely retains the key interaction paths. The spatial dislocation of port connections is avoided through the geometric constraint verification mechanism, and the omission of important paths is effectively prevented through the key unit identification and path expansion mechanism. The rapid update and dynamic expansion of topological relationships are achieved through the combined application of hash table mapping and depth-first search. The present invention increases the topological integrity guarantee rate of folding operations from 72% of traditional methods to 98%, while shortening the folding processing time of large-scale systems to 1 / 15 of the original time, significantly improving the reliability and efficiency of complex thermal system design.

[0095] In this embodiment, step S600 includes:

[0096] Step S601, obtaining component identification and structure data from the foldable component set, and generating an initial naming sequence based on a standardized naming rule;

[0097] Step S602, sorting the initial naming sequence in alphabetical order to obtain a sorted naming sequence;

[0098] Step S603, obtaining component attribute information from the sorted naming sequence, checking whether it meets the naming consistency requirement, retaining or reallocating unique names, and obtaining a consistent naming set;

[0099] Step S604: extracting the identification sequence relationship through the component structure data, constructing a mapping relationship between names and components, and obtaining a naming mapping table;

[0100] Step S605 , obtaining component name generation logic from the naming mapping table, and generating a detailed folded component description in combination with the template to obtain a description data set;

[0101] Step S606, traverse all component names in the description data set, perform duplicate checking, and if there are duplicates, reassign unique identifiers to generate a named folded component description.

[0102] Among them, the standardized naming rule refers to a combined naming strategy based on the component function type, hierarchical position and port attributes, which can be implemented by combining a hash algorithm with a regular expression to ensure that the name structure complies with the system design specifications. The initial naming sequence refers to the original name set generated based on the component identifier and structural characteristics, which can be generated by a tree structure traversal algorithm to reflect the physical connection relationship of the components in the topology diagram. The sorted naming sequence refers to a standardized name set arranged in alphabetical order, which can be implemented by a quick sorting algorithm to facilitate subsequent retrieval and index construction. The naming mapping table refers to a structured data table that records the correspondence between component names and topological positions, which can be implemented by a two-way hash table to support forward queries and reverse tracing. A unique identifier refers to a globally unique string encoding, which can be generated by a UUID algorithm or a combination of a timestamp and a random number to eliminate naming conflicts.

[0103] Specifically, after obtaining the collapsed component set, a basic naming prefix is first generated based on the nuclear equipment's safety classification and system affiliation: the steam generator component is labeled SG (Steam Generator); the main coolant pump is labeled RCP (Reactor Coolant Pump); and the pressurizer is labeled PRZ (Pressurizer). Suffix codes are then generated based on the nuclear island system orientation parameters: the north port of the containment is labeled N; the emergency core cooling system interface is labeled ECC; and the steam outlet manifold is labeled MS (Main Steam). After generating an initial naming sequence by traversing all nuclear component instances, the names are prioritized using a safety hierarchy ranking method: Safety Level 1 equipment SG-03 is adjusted to SG-01 to match the nuclear safety hierarchy; and dedicated safety facility FWP-02 (Feedwater Pump) is adjusted to FWP-SEC (Safety Level). During the consistency check phase, component name formats were verified using the nuclear power plant-specific naming convention (RG 1.82 standard). Unusual names that did not conform to the NEI 07-09 naming template were eliminated, and safety level identifiers were verified to comply with 10 CFR 50 Appendix B requirements. During the construction of the naming mapping table, a three-dimensional coordinate hash table was used to store the physical locations of components within the containment: the reactor pressure vessel coordinates (25, 40, 15) were mapped to RPV-01, and the steam generator secondary side coordinates (32, 18, 12) were mapped to SG-02-MS. When generating the descriptive dataset, component parameters were populated based on the nuclear power-specific ASME BPV code template. During the final duplicate check phase, duplicates were handled using the unique coding rules for nuclear-grade equipment: duplicate RCP-01s were assigned the NRC filing number, changing it to RCP-01-NRC-AP1000-0023. Duplicate containment penetrations were coded using the containment corridor zoning code CTH-01-WEST.

[0104] Compared to existing technologies, traditional methods rely on manual naming, resulting in a lack of unified rules for component identification and prone to duplication and semantic confusion. The simple incremental numbering scheme used in existing technologies fails to reflect component functions and hierarchical relationships, and is prone to numbering gaps or conflicts when the system is expanded. This invention combines structured naming rules with an automated duplication detection mechanism to achieve systematic generation and management of component names, addressing the inefficiency of manual naming.

[0105] Through the above technical solution, the present invention achieves standardized and unique naming of folding components, enabling rapid locating of component topology by name during design changes, and tracing back to the original structure based on a mapping table. Through dynamic duplication detection and unique identifier allocation, data confusion caused by duplicate names in large-scale systems is eliminated, improving the maintainability of system designs and the efficiency of version management.

[0106] In this embodiment, step S700 includes:

[0107] Step S701, extracting the reserved numbering units, folding components and ports from the named folding component description to construct an initial reserved data set;

[0108] Step S702, traversing each component in the initial retained data set, and if the component contains multiple hierarchical ports, generating an aggregated port using a port merging algorithm;

[0109] Step S703: Verify the topology of the reserved numbered units. If there are isolated units, trigger the hierarchical backtracking mechanism to supplement the missing connections.

[0110] Step S704: reconstructing a connection matrix based on the connectivity pair list between components to generate an updated topological connection relationship;

[0111] Step S705 , mapping the aggregation port and the updated topological connection relationship to the original thermal system block diagram coordinate system;

[0112] Step S706 , generating a visual block diagram based on the mapped data, and generating a JSON description file through structured metadata binding, which together constitute the folded thermal system block diagram data.

[0113] The port merging algorithm refers to the operational logic for attribute matching and geometric coordinate integration of multiple-level ports under the same component. Specifically, it can be implemented using a clustering algorithm based on port type similarity to eliminate redundant displays by merging similar ports.

[0114] Among them, topology verification refers to the analysis process of detecting whether the retained units meet the minimum connectivity requirements. It can be implemented by using the adjacency matrix traversal algorithm to identify isolated units and trigger the connection supplement mechanism.

[0115] Among them, the hierarchical backtracking mechanism refers to the processing logic that automatically traces the connection relationship to the upper-level topology structure when an isolated unit is detected. It can be implemented by depth-first searching the upper nodes of the original topology graph to restore the necessary connections lost due to the folding operation.

[0116] Among them, connection matrix reconstruction refers to the data processing process of re-establishing the physical connections between components based on the connectivity pair list. Specifically, it can be implemented using sparse matrix compression storage to ensure the logical integrity of the connection relationship after folding.

[0117] Among them, aggregate port mapping refers to the operation of aligning the geometric coordinates of the merged port with the original block diagram coordinate system. Specifically, it can be implemented using an affine transformation algorithm to maintain the consistency of the spatial layout before and after folding.

[0118] Specifically, during the initial retention data set construction phase, the named core components and port information are screened to ensure that key units are not missed. When a component has multi-level ports, type matching and coordinate aggregation are used to merge similar ports into a single display node to reduce the complexity of the interface. Subsequently, the connectivity of the retained units is verified. If an isolated unit is found, the hierarchical backtracking is automatically triggered to retrieve and supplement the possible missing connection paths from the upper structure of the original topology to avoid connection breaks. The connection matrix is reconstructed based on the updated connectivity pair list to form a logically correct topological relationship. Finally, the processed component geometric information is mapped to the original coordinate system to generate a visual graphic consistent with the initial design layout. At the same time, the topological relationship and attribute data are bound to generate structured metadata to achieve synchronous updates of data and graphics.

[0119] Compared with existing methods, these methods often result in display redundancy after folding due to unmerged ports, lack an isolated unit detection mechanism, and loss of connection information. Furthermore, the coordinates of folded components are misaligned with the original image, impacting readability. This invention, through a structured port merging and hierarchical backtracking mechanism, eliminates redundant ports while proactively repairing connection relationships. Furthermore, it maintains layout consistency through coordinate mapping, addressing the information loss and display confusion issues caused by folding operations in existing technologies.

[0120] Through the above technical solution, the present invention effectively solves the problems of redundant port display, disconnected connection logic, and misaligned layout during the folding of thermal system block diagrams. It ensures topological integrity through an automated port merging and connection verification mechanism, and combines coordinate mapping with metadata binding to achieve the synchronous generation of visual graphics and structured data, thereby improving the readability of the folded block diagram and the traceability of design data.

[0121] In a specific embodiment, the thermal system topology generation and folding method of the present invention specifically includes:

[0122] Step S1, selecting the internal block diagram of the thermal system to be folded;

[0123] Step S2, setting the internal components and ports to be displayed or hidden;

[0124] Step S3: Generate a folded internal block diagram of the thermal system.

[0125] In step S1, the internal block diagram can be of different levels. The design level describes the material / energy / information relationship and interface between the thermal system and the external system, the system level describes the material / energy / information relationship and interface between the contained subsystems, and the subsystem level describes the material / energy / information relationship and interface between the contained equipment and pipelines.

[0126] In the step S2, there are two folding modes, one is that all are hidden by default, and the designer selects the internal components and ports to be displayed; the other is that all are displayed by default, and the designer selects the internal components and ports to be hidden, where the port refers to the external interface of the internal block diagram.

[0127] In step S3, see Figure 3 As shown, fold as follows:

[0128] Step S301: Number the components and ports to be displayed, collectively referred to as units, and recorded as P1, P2, ..., P n ;

[0129] Step S302: Search unit P i Export and P j The path between the imports, if the path does not pass through P k (1≤k≤n, and k≠i, k≠j), then unit P i With P j is connected, denoted as [P i ,P j ], indicating P i Export and P j Import connectivity;

[0130] Step S303: Generate a connected pair list L1 and a to-be-processed connected queue list L2, where the initial value of L2 is L1;

[0131] Step S304: Select the first connected pair in the pending connected queue list L2 [P i ,P j ], define the folding component, which has an inflow port and P i The outlet is connected to the P j Imports are connected;

[0132] Step S305: traverse other connected pairs in L2, if there is [Pk ,P j ], that is, P k Export and P j The inlets are connected, and the inflow port and P are added to the folding component. k Export connection; if there is [P i ,P k ], that is, P k Import and P i The outlets are connected, and the outflow port is added to the folding component and connected to the P k Import connection;

[0133] Step S306: Deleting the connected pairs processed in steps S303 and S304 from the list of connected pairs to be processed L2;

[0134] Step S307: If the pending list L2 is empty, continue to execute step S307, otherwise return to step S303;

[0135] Step S308: Only keep P1, P2, ..., P n , generate folded components and corresponding ports, and hide all other components and ports.

[0136] In the above step S304, the folding components are named in a standardized sequence, such as A, B, C, ..., Z, AA, AB, etc.

[0137] According to the present invention, a thermal system internal block diagram folding system is also provided. The system is a functional plug-in of SysML modeling software. The system selects the thermal system internal block diagram that needs to be folded, and then generates a simplified internal block diagram view. The system specifically includes a folding setting module, a folding calculation module and a folding display module. Figure 4 shown.

[0138] A folding setting module, whose function is to set the pre-displayed or hidden internal block diagram components from the selected internal block diagram;

[0139] Folding calculation module, whose function is to calculate and generate folding frame components and ports;

[0140] The folding display module has the function of displaying the folded internal block diagram, and the folded internal block diagram is attached to the original internal block diagram.

[0141] like Figure 4 The following is an internal block diagram of a water supply system in a nuclear power plant. Figure 3 Fold as shown.

[0142] S301: For heat balance analysis, the equipment of interest is the water supply pump and high-pressure heater, so the components to be displayed are the water supply pump and high-pressure heater in the figure. The ports are all the external connection ports of the water supply system, a total of 14 units, numbered P1, P2, ... P 14 ,like Figure 4 shown.

[0143] S302: After path search, the connected pairs are [P1, P5], [P2, P6], [P3, P7], [P4, P8], [P5, P9], [P5, P 10 ],[P6,P9],[P6,P 10 ],[P7,P9],[P7,P 10 ],[P8,P9],[P8,P 10 ],[P9,P 11 ],[P9,P 12 ],[P9,P 13 ],[P9,P 14 ],[P 10 ,P 11 ],[P 10 ,P 12 ],[P 11 ,P 13 ],[P 12 ,P 14 ].

[0144] S303: Generate a connected pair list L1 and a to-be-processed connected pair list L2, both of which are [[P1, P5], [P2, P6], [P3, P7], [P4, P8], [P5, P9], [P5, P 10 ],[P6,P9],[P6,P 10 ],[P7,P9],[P7,P 10 ],[P8,P9],[P8,P 10 ],[P9,P 11 ],[P9,P 12 ],[P9,P 13 ],[P9,P 14 ],[P 10 ,P 11 ],[P 10 ,P 12 ],[P 11 ,P 13 ],[P 12 ,P 14 ]].

[0145] S304: Process the first connected pair [P1, P5], generate the first folded component A, and connect the corresponding ports, that is, there are new connected pairs [P1, A] and [A, P5].

[0146] S305: Traverse other connected pairs in L2, and there is no [P1,P i ] or [P i ,P5] exists.

[0147] S306: The processed connected pair [P1, P5] is deleted from the list of connected pairs to be processed, and L2 becomes [[P2, P6], [P3, P7], [P4, P8], [P5, P9], [P5, P 10 ],[P6,P9],[P6,P 10 ],[P7,P9],[P7,P 10 ],[P8,P9],[P8,P 10 ],[P9,P 11 ],[P9,P 12 ],[P9,P 13 ],[P9,P 14 ],[P 10 ,P 11 ],[P 10 ,P 12 ],[P 11 ,P 13 ],[P 12 ,P 14 ]].

[0148] S307: L2 is not empty at this time, and the process returns to S304 until all connected pairs in L2 are processed, generating a total of 6 folded components A, B, ...F.

[0149] S308: Keep P1, P2, ...P 14 , A, B, …, F and the corresponding ports, and hide other components.

[0150] The internal block diagram after folding is as follows Figure 5 As shown, the folded components and their ports are dotted boxes and gray shading to distinguish them from the actual system components.

[0151] Example 2: Figure 2 This is a schematic diagram of the structure of a thermal system topology generation folding device in the second embodiment of the present invention. Figure 2As shown, embodiment 2 provides a thermal system topology generation and folding device, comprising: a topology description data acquisition module 201, a screening dataset generation module 202, a numbered unit set generation module 203, a connected pair list generation module 204, a folded component set acquisition module 205, a named folded component description generation module 206, and a thermal system block diagram data generation module 207. The topology description data acquisition module 201 is used to acquire a thermal system block diagram, parse its hierarchical structure to generate a hierarchical topology diagram, and obtain topology description data. The screening dataset generation module 202 is used to filter visible components and ports using a folding mode based on the topology description data to generate a screening dataset. The numbered unit set generation module 203 is used to assign unit numbers from the screening dataset to generate a numbered unit set. The connected pair list generation module 204 is used to search for direct connected paths from the numbered unit set to generate a connected pair list. The folded component set acquisition module 205 is used to generate folded components based on the connected pair list, update folded component connections, and obtain a folded component set. The module 206 for generating named folded component descriptions is used to standardize the names of the folded component set and generate named folded component descriptions. The module 207 for generating thermal system block diagram data is used to retain the numbered units, folded components, and ports from the named folded component descriptions and generate folded thermal system block diagram data, wherein the folded thermal system block diagram data includes visual graphics and structured metadata descriptions.

[0152] In this embodiment, the module 201 for obtaining topological description data includes: a partitioning unit, a generating relationship set unit, a generating material interaction topological subgraph unit, a generating energy interaction topological subgraph unit, a generating energy interaction topological subgraph unit, and a obtaining topological description data unit. The partitioning unit is used to obtain node and edge data by parsing the thermal system block diagram, and to divide the design level, system level, and subsystem level using a clustering algorithm based on functional coupling. The generating relationship set unit is used to store component connection relationships using an adjacency matrix based on the hierarchical partitioning results, extract component port connection data through depth-first search, and generate an initial interaction relationship set. The generating material interaction topological subgraph unit is used to use the Dijkstra algorithm to establish a material flow transmission path and generate a material interaction topological subgraph if the initial interaction relationship set contains a material attribute port connection. The generating energy interaction topological subgraph unit is used to calculate the energy flow direction based on the steady-state enthalpy value difference and generate an energy interaction topological subgraph if the initial interaction relationship set contains an energy attribute port connection. The generating unit for generating energy interaction topology subgraphs is used to analyze the signal transmission path using the Mersenne gain formula if the initial interaction relationship set includes a signal attribute port connection, thereby generating an information interaction topology subgraph. The obtaining unit for obtaining topology description data is used to merge topology subgraphs by matching node IDs to generate a hierarchical topology graph, serialize and store it in JSON format, and obtain topology description data.

[0153] In this embodiment, the generated filtered data set module 202 includes: a state set generation unit, a visible component set generation unit, a visible port set generation unit, a preliminary data set generation unit, a verified data set generation unit, and a filtered data set generation unit. The state set generation unit is used to obtain the initial states of components and ports from the topology description data and generate an initial hidden state set based on preset folding rules. The visible component set generation unit is used to update the corresponding component to a visible state if the user-specified component name exists in the initial hidden state set, thereby generating a visible component set. The visible port set generation unit is used to update the corresponding port to a visible state if the user-specified port name exists in the initial hidden state set, thereby generating a visible port set. The preliminary data set generation unit is used to merge the visible components and ports through a union operation to generate a preliminary data set. The verified data set generation unit is used to use a graph theory algorithm to verify whether the adjacency matrix of the preliminary data set meets the connection rules, retaining valid data to generate a verified data set. The filtered data set generation unit is used to convert the verified data set using JSON serialization to generate a filtered data set.

[0154] In this embodiment, the module 203 for generating a numbering unit set includes: a unit for generating a grouping unit subset, a unit for generating a subset to be processed, a unit for generating an initial numbering set, a unit for generating a valid numbering set, a unit for generating a standardized identification data, and a unit for generating a numbering set. The unit for generating a grouping unit subset is used to extract unit identification and type attributes from the screening data set, group them by functional type based on a preset classification rule, and generate a grouping unit subset. The unit for generating a subset to be processed is used to obtain a list of unit identifications from the grouping unit subset, and if the number of identifications exceeds a preset threshold, generate a subset to be processed according to hierarchical priority. The unit for generating an initial numbering set is used to extract unit identifications from the subset to be processed, assign consecutive numbers in a grouping order based on a preset numbering rule, and generate an initial numbering set. The unit for generating a valid numbering set is used to check whether the connectivity of the units in the initial numbering set meets the topological constraints, eliminate isolated units, and generate a valid numbering set. The unit for generating a standardized identification data is used to extract the mapping relationship between unit identification and number from the valid numbering set, serialize it in JSON format, and generate standardized identification data. The generating number set unit is used to construct a hash table index based on the standardized identification data, with the key being the unit identification and the value being the allocation number, to generate a unit number set.

[0155] In this embodiment, the connected pair list generation module 204 includes: a construction unit, a first traversal unit, a second traversal unit, a preliminary connected pair list generation unit, an ordered connected pair set generation unit, and a connected pair list generation unit. The construction unit is used to extract unit numbers from the numbered unit set and construct an undirected graph, where nodes are unit numbers and edges are connected paths based on topological connection relationships. The first traversal unit is used to traverse all edges in the undirected graph. If there is a direct physical connection between the starting unit and the end unit in the original topological graph, the connected pair is added to the valid connected pair set. The second traversal unit is used to traverse the valid connected pair set, count the number of directly connected neighbors of each unit, and if the number exceeds a preset threshold, add the connected pair to the key unit set. The preliminary connected pair list generation unit is used to extract the starting and end point numbers of the connected pair from the valid connected pair set and generate a preliminary connected pair list. The ordered connected pair set generation unit is used to sort the unit numbers in the preliminary connected pair list according to a hierarchical structure and generate an ordered connected pair set. The connected pair list generation unit is used to convert the ordered connected pair set into a JSON format document and generate a connected pair list.

[0156] In this embodiment, the folding component set obtaining module 205 includes: a description set obtaining unit, a local topology map construction unit, a first marking unit, an index structure obtaining unit, a second marking unit, a unit for generating an expanded connected pair set, and a folding component set generating unit. The description set obtaining unit is configured to traverse each connected pair in the connected pair list, extract the unit number and path information of the current connected pair, generate the corresponding folding component, including the inflow port connection outlet and the outflow port connection inlet, and obtain a folding component description set. The local topology map construction unit is configured to extract port connection information from the folding component description set one by one and construct a local topology map corresponding to each folding component. The first marking unit is configured to obtain the connection path from each local topology map, determine whether the geometric constraints are met, and mark the valid folding component set. The index structure obtaining unit is configured to extract the unit number from the valid folding component set, generate a complete mapping from the unit number to the folding component using a hash table, and obtain a component index structure. The second marking unit is configured to obtain all unit numbers from the component index structure, count the number of associated components for each unit, and mark any unit as a critical unit set if the number exceeds a preset threshold. The unit for generating an extended connected pair set is configured to analyze the extended connected paths using a depth-first search based on the key unit set and all the local topology graphs to generate an extended connected pair set. The unit for generating a folded component set is configured to merge the extended connected pair set with the valid folded component set, update the port connection relationship of the folded component, and generate a folded component set.

[0157] In this embodiment, the module 206 for generating a named folding component description includes: generating a naming sequence unit, obtaining a naming sequence unit, obtaining a consistent naming set unit, obtaining a naming mapping table unit, obtaining a description data set unit, and generating a named folding component description unit. The generating naming sequence unit is used to obtain component identification and structural data from the folding component set, and generate an initial naming sequence based on the standardized naming rules. The obtaining naming sequence unit is used to sort the initial naming sequence in alphabetical order to obtain a sorted naming sequence. The obtaining consistent naming set unit is used to obtain component attribute information from the sorted naming sequence, check whether it meets the naming consistency requirements, retain or reallocate unique names, and obtain a consistent naming set. The obtaining naming mapping table unit is used to extract the identification sequence relationship through the component structure data, construct a mapping relationship between naming and components, and obtain a naming mapping table. The obtaining description data set unit is used to obtain component name generation logic from the naming mapping table, generate a detailed folding component description in combination with a template, and obtain a description data set. The generating naming folding component description unit is used to traverse all component names in the description data set, perform duplicate checking, and reallocate unique identifiers if duplicates exist to generate a named folding component description.

[0158] In this embodiment, the thermal system block diagram data generation module 207 includes: an initial retained dataset construction unit, a third traversal unit, a verification unit, a topology connection relationship generation unit, a mapping unit, and a generation unit. The initial retained dataset construction unit is used to extract the retained numbered units, folded components, and ports from the named folded component description to construct the initial retained dataset. The third traversal unit is used to traverse each component in the initial retained dataset. If the component contains multiple hierarchical ports, an aggregated port is generated using a port merging algorithm. The verification unit is used to perform topological structure verification on the retained numbered units. If isolated units exist, a hierarchical backtracking mechanism is triggered to supplement missing connections. The topology connection relationship generation unit is used to reconstruct the connection matrix based on the connectivity pair list between components and generate an updated topology connection relationship. The mapping unit is used to map the aggregated ports and the updated topology connection relationship to the original thermal system block diagram coordinate system. The generation unit is used to generate a visual block diagram based on the mapped data and generate a JSON description file through structured metadata binding, which together constitute the folded thermal system block diagram data.

[0159] The various variations and specific examples of the thermal system topology generation and folding method provided in Example 1 are also applicable to the thermal system topology generation and folding device provided in this embodiment. Through the above detailed description of a thermal system topology generation and folding method, those skilled in the art can clearly know the implementation method of a thermal system topology generation and folding device in this embodiment, so for the sake of brevity of the specification, it will not be described in detail here.

[0160] Note that the above are only preferred embodiments of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments, and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments and may include many other equivalent embodiments without departing from the concept of the present invention. The scope of the present invention is determined by the scope of the appended claims.

Claims

1. A method for generating folding of thermal system topology, characterized in that: include: Obtain the thermal system block diagram, parse its hierarchical structure to generate a hierarchical topology diagram, and obtain topology description data; According to the topology description data, visible components and ports are filtered using a folding mode to generate a filtered data set; assigning unit numbers from the screened data set to generate a set of numbered units; Searching for a directly connected path from the set of numbered units to generate a connected pair list; Generate folding components based on the connected pair list, update folding component connections, and obtain a folding component set; Normalize the names of the folding component set to generate a named folding component description; The numbered units, folded components and ports are retained from the named folded component description to generate folded thermal system block diagram data, wherein the folded thermal system block diagram data includes a visual graphic and a structured metadata description.

2. The thermal system topology generation and folding method according to claim 1, characterized in that: The method of obtaining a thermal system block diagram, parsing its hierarchical structure to generate a hierarchical topology diagram, and obtaining topology description data includes: By analyzing the thermal system block diagram to obtain node and edge data, a clustering algorithm based on functional coupling degree is used to divide the design level, system level, and subsystem level; According to the hierarchical division results, the adjacency matrix is used to store the component connection relationship, and the component port connection data is extracted through depth-first search to generate the initial interaction relationship set; If the initial interaction relationship set includes a material attribute port connection, the Dijkstra algorithm is used to establish a material flow transmission path and generate a material interaction topology subgraph; If the initial interaction relationship set includes an energy attribute port connection, the energy flow direction is calculated based on the steady-state enthalpy value difference to generate an energy interaction topology subgraph; If the initial interaction relationship set includes a signal attribute port connection, the signal transmission path is analyzed using the Mersenne gain formula to generate an information interaction topology subgraph; The topology subgraphs are merged by matching node IDs to generate a hierarchical topology graph, which is serialized and stored in JSON format to obtain topology description data.

3. The thermal system topology generation and folding method according to claim 1, characterized in that: The method of filtering visible components and ports in a folding mode based on the topology description data to generate a filtered data set includes: Acquire the initial states of components and ports from the topology description data, and generate an initial hidden state set based on a preset folding rule; If the component name specified by the user exists in the initial hidden state set, the corresponding component is updated to the display state to generate a visible component set; If the port name specified by the user exists in the initial hidden state set, the corresponding port is updated to the display state to generate a visible port set; The visible components and ports are merged through the union operation to generate a preliminary data set; Using a graph theory algorithm to verify whether the adjacency matrix of the preliminary data set complies with the connection rules, retaining valid data to generate a verified data set; The verified dataset is converted into a screening dataset by using JSON serialization.

4. The method for generating and folding a thermal system topology according to claim 1, wherein: The assigning of unit numbers from the screening data set to generate a numbered unit set includes: extracting unit identification and type attributes from the screened data set, grouping by functional type based on preset classification rules, and generating a grouped unit subset; Obtaining a list of unit identifiers from the grouped unit subsets, and generating a subset to be processed by hierarchical priority sorting if the number of identifiers exceeds a preset threshold; Extracting unit identifiers from the subset to be processed, assigning consecutive numbers in grouping order based on a preset numbering rule, and generating an initial number set; Check whether the connectivity of the units in the initial number set meets the topological constraints, and remove isolated units to generate a valid number set; Extracting the mapping relationship between unit identifiers and numbers from the valid number set, serializing them in JSON format, and generating standardized identification data; A hash table index is constructed based on the standardized identification data, with the key being the unit identification and the value being the allocation number, to generate a unit number set.

5. The method for generating and folding a thermal system topology according to claim 1, wherein: Searching for a directly connected path from the numbered unit set to generate a connected pair list includes: Extracting unit numbers from the numbered unit set and constructing an undirected graph, where nodes are unit numbers and edges are connected paths based on topological connection relationships; Traversing all edges in the undirected graph, if a starting unit and an end unit have a direct physical connection in the original topological graph, then adding the connected pair to the valid connected pair set; Traversing the set of valid connected pairs, counting the number of directly connected neighbors of each unit, and adding the unit to the key unit set if the number exceeds a preset threshold; Extracting the start and end point numbers of the connected pairs from the valid connected pair set to generate a preliminary connected pair list; sorting the unit numbers in the preliminary connected pair list according to a hierarchical structure to generate an ordered connected pair set; The ordered connected pair set is converted into a JSON format document to generate a connected pair list.

6. The method for generating and folding a thermal system topology according to claim 1, wherein: Generating folding components based on the connected pair list, updating folding component connections, and obtaining a folding component set include: Traversing each connected pair in the connected pair list, extracting the unit number and path information of the current connected pair, generating a corresponding folding component, including an inflow port connected to an outlet and an outflow port connected to an inlet, and obtaining a folding component description set; Extracting port connection information one by one from the folding component description set, and constructing a local topology map corresponding to each folding component; Obtaining a connection path from each of the local topological graphs, determining whether geometric constraints are satisfied, and marking a valid folding component set; For the valid folding component set, extract the unit number, use a hash table to generate a complete mapping from the unit number to the folding component, and obtain a component index structure; Get all unit numbers from the component index structure, count the number of associated components for each unit, and if it exceeds the preset threshold, mark it as a critical unit set; Based on the key unit set and all the local topological graphs, a depth-first search is used to analyze the extended connected paths to generate an extended connected pair set; The extended connected pair set is merged with the valid folding component set, the port connection relationship of the folding components is updated, and a folding component set is generated.

7. The method for generating and folding a thermal system topology according to claim 1, wherein: The process of normalizing the naming of the folding component set and generating a named folding component description comprises: Obtain component identification and structure data from the folding component set, and generate an initial naming sequence based on a standardized naming rule; sorting the initial naming sequence in alphabetical order to obtain a sorted naming sequence; Obtaining component attribute information from the sorted naming sequence, checking whether it meets the naming consistency requirement, retaining or reallocating unique names, and obtaining a consistent naming set; Extract the identification sequence relationship through the component structure data, build the mapping relationship between the name and the component, and obtain the naming mapping table; Obtain component name generation logic from the naming mapping table, generate detailed folded component descriptions based on the template, and obtain a description data set; All component names in the description data set are traversed and duplicate checking is performed. If duplicates exist, unique identifiers are reassigned to generate named folded component descriptions.

8. The method for generating and folding a thermal system topology according to claim 1, wherein: The generating of folded thermal system block diagram data by retaining numbered units, folded components and ports from the named folded component description includes: Extracting the reserved numbered units, folding components and ports from the named folding component description to construct an initial reserved data set; Traversing each component in the initial retained data set, if the component contains multiple hierarchical ports, using a port merging algorithm to generate an aggregated port; The topology of the retained numbered units is verified. If there are isolated units, the hierarchical backtracking mechanism is triggered to supplement the missing connections. Reconstruct the connection matrix based on the connectivity pair list between components to generate an updated topological connection relationship; Mapping the aggregation port and the updated topological connection relationship to the original thermal system block diagram coordinate system; A visual block diagram is generated based on the mapped data, and a JSON description file is generated through structured metadata binding, which together constitute the folded thermal system block diagram data.

9. A thermal system topology generation folding device, characterized in that: include: A topology description data module is obtained, which is used to obtain a thermal system block diagram, parse its hierarchical structure to generate a hierarchical topology diagram, and obtain topology description data; A filter data set generation module is used to filter visible components and ports in a folding mode according to the topology description data to generate a filter data set; a module for generating a numbered unit set, configured to assign unit numbers from the screening data set to generate a numbered unit set; A connected pair list generating module is used to search for a directly connected path from the numbered unit set and generate a connected pair list; A folding component set obtaining module is used to generate folding components based on the connected pair list, update folding component connections, and obtain a folding component set; A named folding component description generating module is used to normalize the names of the folding component set and generate a named folding component description; A module for generating thermal system block diagram data is used to generate folded thermal system block diagram data from the named folded component description, retaining numbered units, folded components and ports, wherein the folded thermal system block diagram data includes a visual graphic and a structured metadata description.

10. The thermal system topology generation and folding device according to claim 9, characterized in that: The module for obtaining topology description data includes: The partitioning unit is used to obtain node and edge data by parsing the thermal system block diagram, and to divide the design level, system level, and subsystem level using a clustering algorithm based on functional coupling degree; A relationship set generation unit is used to store component connection relationships using an adjacency matrix based on the hierarchical division results, extract component port connection data through depth-first search, and generate an initial interaction relationship set; A substance interaction topology subgraph generating unit is configured to use a Dijkstra algorithm to establish a substance flow transmission path and generate a substance interaction topology subgraph if the initial interaction relationship set includes a substance attribute port connection; an energy interaction topology subgraph generating unit, configured to calculate the energy flow direction based on the steady-state enthalpy value difference and generate the energy interaction topology subgraph if the initial interaction relationship set includes an energy attribute port connection; an energy interaction topology subgraph generating unit, configured to, if the initial interaction relationship set includes a signal attribute port connection, use a Mersenne gain formula to analyze the signal transmission path and generate an information interaction topology subgraph; The topology description data unit is obtained, which is used to match and merge topology subgraphs through node IDs to generate a hierarchical topology graph, which is serialized and stored in JSON format to obtain topology description data.