A ship structure strength calculation method based on topological tree and atlas reasoning pruning
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA SHIP SCIENTIFIC RESEARCH CENTER
- Filing Date
- 2026-05-15
- Publication Date
- 2026-08-07
AI Technical Summary
1.计算公式库规模随规范迭代持续扩充,直接遍历查找目标公式的效率极低,查找耗时随公式数量增长呈线性上升,无法实现公式快速定位;
Smart Images

Figure CN122528299A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of marine engineering technology, and in particular to a method for calculating the structural strength of ships based on topology tree and graph reasoning pruning, which is applicable to the scenarios of formula positioning, parameter processing and automated calculation in the direct calculation process of ship structural strength. Background Technology
[0002] Ship structural strength is a core technical indicator for ensuring navigational safety, structural reliability, and service life. Currently, the industry generally relies on PDF files of ship structural strength calculation guidelines, standard texts, and historical project calculation reports. These are compiled into sets of calculation formulas and calculation logic libraries through manual sorting or simple text extraction to support actual engineering calculations. Existing technologies for formula management and calculation applications mainly fall into two categories: one is an online formula document management system, which only realizes the digital storage of formulas, input parameter input, and simple calculation output, requiring all input parameters to be known and unable to handle the needs of inter-parameter calculations; the other is dedicated ship structural strength calculation software developed based on fixed programming logic, where the calculation formulas are hard-coded into the program, and the calculation logic is bound to the standard. When the calculation guidelines are updated or the formulas are adjusted, the code must be modified again, resulting in extremely poor flexibility and scalability.
[0003] The aforementioned existing technologies have many insurmountable technical defects in practical applications: 1. The size of the calculation formula library continues to expand with the iteration of the standard. Directly traversing and searching for the target formula is extremely inefficient. The search time increases linearly with the number of formulas, making it impossible to quickly locate the formula. 2. The calculation requirements are mostly described in natural language, which results in incomplete calculation requirements and insufficient target, leading to problems such as the calculation formulas being found being missing parameters or unsuitable for the application scenario, requiring repeated searching and adjustments; 3. In actual calculations, there are cases where the input parameters and the required parameters do not match completely. It is necessary to manually refer to the specifications to find the formulas that relate unknown parameters to the current calculation formulas. This has problems such as low traceability efficiency, easy path errors, and high dependence on engineer experience. 4. Parameter calculation requires full-link traceability operations, which cannot simplify redundant calculation processes based on known parameters. The calculation steps are cumbersome, resource consumption is high, and it is difficult to adapt to parameter integrity scenarios in different design stages.
[0004] Currently, existing technologies have not yet formed an intelligent solution for ship structural strength calculation scenarios. They cannot simultaneously solve the collaborative problems of formula positioning, requirement analysis, parameter tracing, and calculation simplification, making it difficult to meet the engineering requirements for automated, efficient, and accurate calculation of ship structural strength. Summary of the Invention
[0005] To address the aforementioned problems and technical requirements, and specifically for ship structural strength calculation scenarios, the inventors propose a ship structural strength calculation method based on topology trees and graph reasoning pruning. During the use of a knowledge graph of ship structural strength calculation formulas, the method utilizes topology trees to quickly locate calculation formulas. Combined with the semantic reasoning and dynamic pruning capabilities of the knowledge graph, a fully automated framework is constructed, from calculation requirements to available calculation formulas. The hierarchical indexing characteristics of topology trees accelerate formula location, and an "input parameter traceability chain" is generated through entity relationships in the knowledge graph. Furthermore, based on known parameters, reasoning and pruning are performed using the knowledge graph to ensure the adaptability of the same calculation formula to different known parameters.
[0006] The technical solution of this invention is as follows: A method for calculating the structural strength of a ship based on topology tree and graph reasoning pruning, comprising the following steps: Construct a topology tree of the table of contents of the Guide to Ship Structural Strength Calculation, and establish a two-way mapping relationship between the topology tree and the knowledge graph of ship structural strength calculation formulas; Based on the large language model of ship structural strength calculation formula (hereinafter referred to as the large model), the language description of ship structural strength calculation requirements is analyzed in multiple rounds to extract and standardize the calculation requirement elements, which include the calculation formula name, constraints, input and output parameters and parameter values. Based on the elements of computational needs, the topology tree is filtered hierarchically, and combined with the association matching of the knowledge graph, the target computation formula triplet is quickly located. By using the associative reasoning of the knowledge graph, a source chain of input parameters for the target calculation formula is generated; Based on the known parameters in the calculation requirements, the source chain of each input parameter is pruned to obtain the input parameter pruning chain, and the ship structural strength calculation is completed based on the pruning chain.
[0007] A further technical solution involves establishing a bidirectional mapping relationship between the topology tree and the knowledge graph of ship structural strength calculation formulas, including: The topology tree is constructed as a five-level acyclic topology tree consisting of norms, chapters, sections, articles, and formulas. The unique identifier of each node at each level of the topology tree is defined, and subordinate edge relationships that exist only between adjacent levels are established. Extract the specification number, chapter, section, clause, and formula number from the unique identifier of the formula node in the topology tree; The formula identifiers in the computational formula knowledge graph are structured and parsed to obtain the standard number, chapter, section, article, and formula serial number; A forward mapping function is used to map the topology tree formula nodes to the corresponding formula identifiers in the graph, and a reverse mapping function is used to locate the graph formula identifiers to the corresponding formula nodes in the topology tree.
[0008] Its further technical solution is a method for multi-round iterative analysis of the language description of ship structural strength calculation requirements based on a large language model of ship structural strength calculation formulas, including: The second-generation computational requirement language description is obtained by identifying missing elements in the initial computational requirement language description based on a large language model and prompting for completion. The non-standardized terms in the second-generation computational requirements language description are converted into the terminology of the ship structural strength calculation standard to obtain the third-generation computational requirements language description. Associate the keywords at the topology tree level and supplement them into the third-generation computing requirement language description to generate the final standardized computing requirements. Finally, complete the requirement adaptation verification through keyword matching degree.
[0009] A further technical solution is that the method for identifying missing elements includes: The initial computational requirement language description is segmented, entity linked, and intent understood by a large language model. The set of clearly defined computational elements is extracted, including the computational objective, ship type / part, known input parameters, and output parameters. Based on the extracted computational objectives, the large language model retrieves matching standard computational element templates from the predefined computational formula ontology model in the graph, performs a difference operation with the known set of computational elements, and determines the missing elements. The missing elements are sorted according to the engineering logic of ship structural strength calculation, thereby generating standardized follow-up questions to complete the description.
[0010] Its further technical solution is that the method for quickly locating the target by calculating the triplet formula includes: Based on the hierarchical keywords in the calculation requirement elements, the topology tree is filtered layer by layer according to specifications, chapters, sections, and items to select the set of formula nodes under the target item node; The set of formula nodes is converted into a set of graph formula identifiers through bidirectional mapping; Match the triplet corresponding to the output parameter in the calculation requirement element within the set of graph formula identifiers to obtain the target calculation formula triplet.
[0011] A further technical solution is that the method for generating the input parameter traceability chain includes: Identify all input parameters for the target calculation formula, and distinguish between known direct input parameters and unknown parameters that need to be traced back. Direct input parameters are provided by the elements of the calculation requirements. Recursively traverse the edges connecting parameters and formulas in the knowledge graph, and search layer by layer for the associated formulas that generate unknown parameters; Perform closed-loop verification, integrity verification, and accuracy verification on the generated traceability chain to ensure that all unknown parameters can be traced back to the direct input parameters.
[0012] A further technical solution involves recursively traversing the edges connecting parameters and formulas in the knowledge graph, and searching layer by layer for the associated formulas that generate unknown parameters. For each unknown source parameter, the upstream formula that directly generates the parameter is found through the association edges between the parameter and the formula in the knowledge graph; Extract all input parameters of the upstream formula and distinguish between known direct input parameters and new unknown source parameters; Repeat the upstream formula search and parameter differentiation steps for new unknown source parameters until all source parameters correspond to a final formula containing only direct input parameters, or all input parameters of the upstream formula have no associated edges.
[0013] A further technical solution involves a method for reasoning and pruning the source chain of each input parameter based on known parameters in the computational requirement elements, including: For each input parameter tracing chain, locate the node to which the known parameter belongs in the input parameter tracing chain, and remove the redundant calculation link downstream of that node (corresponding to the redundant link removal principle). If there are multiple known parameters, select the known parameter that is closer to the node to which the target calculation formula belongs from the input parameter tracing chain to satisfy the principle of minimizing computation. The parameters that need to be added to the pruning process are identified to form a complete input parameter pruning chain for calculating the target formula.
[0014] A further technical solution is that the method also includes: During the input parameter tracing chain transmission process, the parameters transmitted across the spectrum are matched and converted by name mapping, dimension conversion and range verification.
[0015] The further technical solution is that the matching and conversion methods include: Traverse the parameter passing relationships of all adjacent formulas in the input parameter source chain to identify the output parameters of the upstream formula to be transformed. Input parameters of downstream formula ; when and When the parameters are synonyms but have different names, the synonym name mapping is completed through the predefined synonym edge relationships in the knowledge graph; when and When the dimensions are the same but the units are different, the dimension conversion between different units is completed according to the dimension conversion factor; when The parameter value exceeds When the parameters are within the reasonable range of the specifications, based on the given range of ship structural strength calculation specifications, limit corrections are made for parameters that exceed the range, or manual intervention is triggered to remind users.
[0016] The beneficial technical effects of this invention are: (1) The search range of triples is greatly narrowed by preprocessing and filtering with topology trees. Experiments have shown that the combination of "topology tree + graph" can reduce the time complexity of triple search. (2) The requirement description is confirmed by multiple rounds of iteration of the large language model, reducing the number of iterations for searching the calculation formula, verifying the completeness of the application scenario, and improving the efficiency of searching the calculation formula. (3) The origin and destination of each input parameter are straightened out. When the input parameter value of the calculation formula cannot be obtained directly, the input parameter value of the target calculation formula can be indirectly obtained by tracing other known variables on the input parameter traceability chain. (4) Local transmission rules of parameter values are established to ensure that the output parameter value of the upstream formula can be accurately transmitted to the input parameter of the downstream formula, avoiding calculation errors caused by differences in variable names, etc. (5) The adaptability of the same calculation formula to different known parameters is satisfied by reasoning and pruning of the knowledge graph.
[0017] This solves problems such as "slow formula positioning", "difficult parameter tracing" and "inconsistent cross-graph association", and realizes full-process automation from calculation requirements to execution program, improving the efficiency and accuracy of ship structural strength calculation. Attached Figure Description
[0018] Figure 1 This is a flowchart of the ship structure strength calculation method based on topology tree and graph reasoning pruning provided in this application; Figure 2 This is the overall logic diagram of the ship structural strength calculation method provided in this application; Figure 3 This is a schematic diagram of the main body model of the ship structural strength calculation formula provided in this application; Figure 4 This is a schematic diagram of the source chain generation of input parameters based on graph association reasoning provided in this application; Figure 5 This is a schematic diagram of parameter mapping matching and transformation across calculation formulas provided in this application; Figure 6 This is a simplified schematic diagram of the calculation formula for the pruning of the source chain of input parameters provided in this application. Detailed Implementation
[0019] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings.
[0020] One embodiment of this application provides a method for calculating the structural strength of ships based on topology tree and graph reasoning pruning, combined with... Figure 1 and Figure 2 As shown, it includes the following: (1) Based on the calculation guide topology tree-guided method for rapid location of calculation formulas, the topology tree of the table of contents of the ship structural strength calculation guide is constructed. Combined with the knowledge graph of ship structural strength calculation formulas, a two-way mapping relationship between the topology tree and the graph is constructed. The target calculation formula is quickly located by the two-step method of "hierarchical filtering + narrowing range matching" of "topology tree + graph".
[0021] (2) The method of extracting the calculation formula requirements based on the large model combines the knowledge graph of ship structural strength calculation formula and the large language model to understand the calculation requirements. Through multiple rounds of iterative optimization of the requirement description, the required standardized calculation requirement elements can be extracted: namely, the calculation formula, constraints, input parameters and parameter values to be used.
[0022] (3) Input parameter tracing chain generation method based on graph association reasoning: If the target calculation formula contains unknown input parameters, and these unknown input parameters can be calculated using other formulas in the calculation formula graph, and if these two calculation formulas have no edge relationship in the knowledge graph, then it is necessary to find the relationship across several entities through knowledge graph reasoning. Multi-level tracing sorting can be performed through knowledge graph reasoning to form a calculation formula tracing chain that prioritizes calculations. This ensures that the variables of the formula to be calculated find the original calculation formula through multi-level tracing.
[0023] (4) Parameter mapping matching and transformation method across calculation formulas (variable chain): There are inconsistencies in the letter names of calculation formulas extracted from different texts. Local transfer values are established through graph edge relationships. Through the consistent representation of the calculation formula graph group, while keeping the existing calculation formula graphs unchanged, the transformation is achieved through a unified dimensional transformation model (or transformation middleware, which transforms once before the input calculation formula graph is calculated, and transforms again as needed after the calculation is completed and output from the calculation formula graph) and a unified variable symbol transformation model (or transformation middleware).
[0024] (5) A simplified formula calculation method based on input parameter tracing chain pruning: When the given known condition is a known parameter on the tracing chain of each input parameter of the target calculation formula, the calculation can be performed directly using this known parameter to the initial target calculation formula link. Parameters after the known parameter do not need to be traced further. A calculation formula knowledge graph reasoning chain adapted to the current known parameter value is obtained, thus obtaining the "input parameter pruning chain" that needs to be calculated. The ship structural strength calculation is completed based on this pruning chain.
[0025] The detailed introduction of each of the above sections is as follows: The method for constructing the topology tree of the table of contents for quick location of calculation formulas in (1), and the implementation method of the bidirectional mapping association between the topology tree and the graph, includes the following: First, based on the PDF file of the Guide to Ship Structure Strength Calculation, a "Topology Tree of Table of Contents for Guide to Ship Structure Strength Calculation" is constructed. Then, the graph of calculation formulas extracted from the PDF file of the calculation guide is associated with the topology tree of the table of contents of the calculation guide to form a "Topology Tree of Table of Contents + Graph of Calculation Formulas" structure, which facilitates quick location of formulas. Among them, the PDF file of the calculation guide is a Markdown format file that can be used to build a vector library after being parsed by the PDF toolchain. It retains the table of contents structure and mathematical formulas, and removes watermarks and unnecessary header and footer content. The specific implementation steps given in this embodiment are as follows: Step 1. Define the topology tree hierarchy and nodes, and construct a five-level acyclic topology tree consisting of "norms, chapters, sections, clauses, and formulas". .
[0026] Specifically, the first step is to define the node set. Nodes are then divided into canonical nodes according to their hierarchy. Chapter nodes Node Nodes Formula nodes ,Right now Each node contains a unique identifier. The format is "standard number-hierarchical coding", such as gd05-2003-ch2 representing Chapter 2 of gd05-2003; Node name For example, "Chapter 2 Direct Load Calculation"; Hierarchical attributes Level 1 corresponds to a standard, Level 2 corresponds to a chapter, and so on up to Level 5 formulas.
[0027] Next, define the edge set. It exists only between adjacent level nodes and is used to describe "subordinate" relationships. If a node... For nodes The parent node, then And satisfy This ensures that the topology tree has no cross-level dependencies or circular structures. For example, canonical nodes. (gd05-2003) and chapter nodes (gd05-2003-ch2) forms an edge , nodes (gd05-2003-ch2-sec3-clause4) and formula nodes (gd05-2003-ch2-sec3-clause4-f1) constitutes an edge. .
[0028] Step 2. Define the knowledge graph triplet for ship structural strength calculation formula.
[0029] Specifically, firstly, knowledge is extracted from the ship structural strength calculation formulas by using a large model extracted from the direct calculation guide PDF or calculation analysis reports from historical projects, forming a calculation formula knowledge graph. Based on the calculation formula graph triples (S, I, O), the dispersed strength calculation logic, parameter relationships, and engineering rules can be structured, visualized, and standardized. Then, based on the calculation requirement description, the corresponding calculation formulas and constraint requirements are found from the triples to guide the actual calculation.
[0030] In the process of constructing the computational formula atlas triplet, based on the analysis of the ship structural strength calculation guideline document and guided by ontology classification, and based on the experience and knowledge of domain experts, and based on the common elements of the calculation guideline document, the computational formula atlas ontology model is defined, including the calculation formula body F, input parameter I, output parameter O, parameter constraint C, and standard source ST, as follows: Figure 3 As shown. Define the attributes of each ontology model: for example, the attributes of the calculation formula entity include the formula's unique identifier. Formulas and expressions Formula Name Standardize chapter numbering The attributes of input / output parameters include parameter identifiers. ,symbol ,dimension ,unit Range of values Physical meaning Measurement methods Accuracy requirements Establish relationships between entities to realize the interaction between formulas and input parameters. Output parameters ,constraint ,specification Binding of, etc.
[0031] Step 3. Establish a precise association between the topology tree and the computational formula graph using a bidirectional mapping function.
[0032] Formula nodes in the topology tree are mapped using forward mapping. The mapping is a unique identifier S for the formula in the graph. For example, (gd05-2003-ch2-sec3-clause4-f1) corresponds to the "Formula for Vertical Wave Moment of the Mid-Arch of an Oil Tanker" in the atlas. (gd05-2003-2.3.4-1), i.e. The "gd05-2003" indicates the document number and year of the ship structure strength calculation guideline. The formula identifier S in the diagram is located to the corresponding formula node in the topology tree through reverse mapping. ,satisfy and To ensure that the association is unambiguous.
[0033] In this embodiment, the automatic mapping algorithm based on name / number matching is as follows: (1) The topology tree is filtered hierarchically by layer according to "specification → chapter → section → article" to narrow down the matching range. (2) The unique identifier is parsed from the topology tree formula node ID: VF.id = specification number. chapter Festival strip Formula number. (3) Structured analysis of graph formula identifier: S = standard number Chapters, Sections, Articles Formula number. (4) Perform bidirectional mapping: ; (5) Uniqueness verification. Ensure that: one formula node → unique graph formula; ensure that: one graph formula → unique topology tree node.
[0034] The implementation process of the calculation formula requirement element extraction method based on the large model in (2) includes the following: Understanding the calculation requirements based on the large language model M of the ship structure strength calculation formula, and parsing out the core calculation elements such as the name of the calculation formula to be used, constraints, input parameters, and parameter values. Describing the calculation requirements in natural language, and combining with the large model M, iterating and optimizing the requirement description through multiple rounds until the core calculation elements can be extracted. This includes the calculation formula requirements used, the known variables, and the values to be calculated. Generating standardized text for adapting the directory chapter topology tree and calculation formula graph search. The specific implementation steps are as follows: For example, initial natural language requirements "Calculate the cargo pressure in the cargo holds of a 200m long double-hull bulk carrier. The cargo density is known to be 1.8t / m³, and the distance from the calculation point to the top surface of the cargo is 5m."
[0035] Step 1. The first iteration completes the elements of the initial requirement description.
[0036] Initial requirements are identified using a large model M based on a graph ontology model. Missing elements, such as "formula specification" and "unknown key parameters", will generate follow-up questions. Please provide the following information: 1. The standard on which the calculation is based (e.g., GD05-2004); 2. The angle of repose of the cargo (35° for ores, 30° for salts); 3. The angle between the bulkhead where the calculation point is located and the horizontal plane (90° for vertical bulkheads, 60° for inclined bulkheads).
[0037] After the user provides additional information, the model outputs a second-generation computational requirement language description. "Based on GD05-2004, calculate the cargo pressure in the cargo holds of a 200m long double-hull bulk carrier. The cargo density is known to be 1.8t / m³, the vertical distance from the calculation point to the top surface of the cargo is 5m, the angle of repose of the cargo is 35°, and the angle between the bulkhead and the horizontal plane is 90°."
[0038] In this embodiment, the large model M, based on the ontology model of ship structural strength calculation formulas and the standard semantic knowledge base, employs an element integrity verification mechanism. It parses the user's natural language requirements into a set of standard calculation elements, then performs a difference operation with the complete set of elements required by the target formula, thereby automatically identifying missing elements. The specific identification steps are as follows: Step 1: Large Model M vs. Initial Requirements The system performs word segmentation, entity linking, and intent understanding to extract the explicitly given calculation elements, including: calculation target (e.g., "cargo pressure in the hold"), ship type / part (e.g., "double-hull bulk carrier"), known parameters (e.g., "length 200m, cargo density 1.8t / m³"), and output target (e.g., "calculate pressure value").
[0039] Convert natural language into structured element tuples: E given ={ship type, calculation target, known parameter 1, known parameter 2, ...}.
[0040] Step 2: Match the "Standard Calculation Element Template" in the map ontology.
[0041] Based on the parsed computational objective, the large model M retrieves matching standard formula element templates from the computational formula ontology model, that is, the complete set of input elements required for this type of computation: E full ={Standard basis, ship type, load type, structural components, operating conditions, constraints, set of necessary parameters} This template comes from the predefined "formula-input-constraint-specification" ontology relationship in the graph.
[0042] Step 3: Calculate the difference between elements → Identify missing items.
[0043] Automatically calculate missing elements using set operations: E miss =E full -E given E miss This refers to content that needs to be supplemented by the user.
[0044] Step 4: Sort missing elements by project priority.
[0045] Based on the logic of ship computational engineering, the large model M sorts the missing elements: 1. The following must be determined first: specification version, calculation conditions, and structural components; 2. Required key parameters: angle of repose, bulkhead angle, correction factor, etc. 3. Constraints: Loading status, sea state, and verification targets; Step 5: Generate standardized follow-up questions. Transform missing elements into clear, unambiguous follow-up questions Q1 that conform to engineers' habits, and strictly correspond to the standard terminology in the graph ontology to avoid ambiguity.
[0046] Step 2. The second iteration standardizes the terminology of the ship structure strength calculation specification.
[0047] The large model M refers to the terminology definitions of the three types of guidelines, and will... Non-standard expressions in the text are converted into standardized terms, for example: "cargo pressure" is standardized to "cargo vertical pressure in the cargo hold"; "cargo density" is standardized to "cargo bulk density"; and a third-generation computational requirements language description is generated. For example, “Based on GD05-2004, calculate the vertical pressure of cargo in the cargo hold of a 200m long double-hull bulk carrier. The cargo bulk density is known to be 1.8t / m³, the vertical distance from the calculation point to the top surface of the cargo is 5m, the angle of repose of the cargo is 35°, and the angle between the bulkhead and the horizontal plane is 90°.”
[0048] Step 3. In the third iteration, the requirement description is associated with the topology tree hierarchy keywords.
[0049] The large model M extracts the "chapter, section, and item" level keywords from the topology tree (e.g., "cargo pressure" in gd05-2004 corresponds to "Chapter 3 Design Load - 3.1 Cargo Pressure - 3.1.1 Vertical Pressure Calculation"), and adds them to the requirements description to generate the final standardized calculation requirements. .For example, "Based on the vertical pressure calculation of Section 3.1.1 of Chapter 3 of GD05-2004, using the formula for calculating the vertical pressure of cargo in the cargo hold, calculate the vertical pressure of cargo in the cargo hold of a 200m long double-hull bulk carrier. The known cargo bulk density is 1.8t / m³, the vertical distance from the calculation point to the top surface of the cargo is 5m, the angle of repose of the cargo is 35°, and the angle between the bulkhead and the horizontal plane is 90°."
[0050] Step 4. Evaluate the fit between the requirements and the topology tree / graph and iterate repeatedly.
[0051] Evaluation by calculating "keyword matching degree" Adaptability, assuming the set of keywords at the topology tree level is (e.g., {gd05-2004, Chapter 3, Design Loads, Section 3.1.1, Vertical Pressure Calculation}). The set of keywords in the text is Matching degree The calculation formula is:
[0052] when If the requirement is met, determine if it is compatible; otherwise, iterate again until the requirement is met.
[0053] The implementation process of the method for quickly locating the target calculation formula using the two-step method of "hierarchical filtering + narrowing range matching" through "topology tree + graph" in (1) includes the following: Based on the understanding of the requirements for ship structural strength calculation, the target calculation formula triplet is searched through the structure of "catalog chapter topology tree + calculation formula knowledge graph". And it is compared with the method of directly searching triplets based on the calculation formula knowledge graph.
[0054] Step 1: First, perform a calculation on the topology tree and filter it by level.
[0055] Step 2: Then perform triplet matching for the calculation formula to find the appropriate triplet.
[0056] Step 3. Compare with the direct lookup method for triples based on computational formula knowledge graphs.
[0057] Step 4. Analysis of the advantages of the triplet search method of "Catalogue Chapter Topology Tree + Calculation Formula Knowledge Graph".
[0058] In one possible implementation, the specific steps of the above method are as follows: Step 1. First, filter the computation guide topology tree by level. Based on Hierarchical keywords in In the topology tree Positioning is performed layer by layer. For example, {gd05-2004, Chapter 3, Section 3.1.1}. (1) Positioning specification nodes ,filter Level 1 nodes, such as (gd05-2004); (2) Locating chapter nodes ,exist Filtering in child nodes Level 2 nodes, such as (Chapter 3 Design Loads); (3) Positioning Strip Nodes ,exist Filtering among the child nodes of the child node Level 4 nodes, such as (3.1.1 Vertical pressure calculation); (4) Extracting the formula node set , obtain All child nodes (level 5 formula nodes), i.e. .
[0059] Step 2. Next, perform calculation formula graph triplet matching. This is done through the forward mapping function. ,Will Convert to a set of formula identifiers in a graph And then By matching the triplet "output parameter = vertical pressure of cargo in cargo hold" in the middle, the target formula is obtained. The mathematical expression is:
[0060] Finally, a time complexity analysis is performed. Let the number of levels in the topological tree be O(n). It is fixed at level 5, that is =5. Target bar node The number of nodes in the formula below is ,generally For example, section 3.1.1 contains three formulas. Therefore, the time complexity of filtering the computation guide topology tree hierarchy is... By locating layer by layer, the method is independent of the map size; the time complexity of the calculation formula for map triple matching is O(log n). Only need to traverse The formula consists of triplets; the overall time complexity is O(n). ,because and All are constants.
[0061] Step 3. Compared with the direct lookup method based on triples in the computational formula graph, a breadth-first search (BFS) algorithm is used to perform formula lookup based on triples in the computational formula graph. The core steps are as follows: First, extract the search keywords. From... Extract two types of core keywords: standardized keywords For example, {gd05-2004}; parameter keywords Examples include {cargo vertical pressure, cargo density, angle of repose}.
[0062] Next, filter the set of formulas that are related to the standard. Iterate through all "formula, standard" triples in the graph. Filter out Formula identifier set The mathematical expression is:
[0063] For example, gd05-2004 corresponds to Includes identifiers for all 150+ formulas under this specification.
[0064] Then, match the target formula associated with the parameters. Further filtering includes The triplet of "output parameters" ,in Name the output parameters of the formula, such as "cargo hold vertical pressure", and finally obtain the target formula set. :
[0065] like If so, then directly output the target formula; if Further filtering requires additional input parameters, including keywords; if If the error message is "No matching formula found", the message will be displayed.
[0066] Finally, a time complexity analysis is performed. The total number of formulas in the designed formula knowledge graph is... ,specification The corresponding number of formulas is ( Then, the time complexity of the step of filtering the set of formulas with standardized associations is O(n). It is necessary to traverse all "formula, specification" triples in the entire graph; the time complexity of the step of matching the target formula associated with the parameters is O(n). It needs to be traversed. All "formula, output parameter" triples; the overall time complexity is O(n log n). ,because .
[0067] Step 4. The comparison shows that when the knowledge graph of ship structural strength calculation formulas has more than 10,000 formula nodes, the triplet search method combining "directory chapter topology tree + calculation formula knowledge graph" has obvious advantages.
[0068] The implementation process of the input parameter tracing chain generation method based on graph association reasoning in (3) includes the following: Rapidly locate the calculation formula guided by the topology tree of the calculation guide to obtain the target calculation formula triplet, input variables, and output variables. For each calculation formula triplet in the calculation formula knowledge graph, there are multiple input parameters and output parameters. Some input parameters are obtained by directly inputting values, while others have edge relationships within the calculation formula triplet and can be obtained by calculating the output of other calculation formula triplets. The input parameters of other calculation formula triplets also have this situation; they can be obtained by directly inputting values or calculated by other calculation formula triplets. This process continues, expanding layer by layer. Until all input parameters of the final calculation formula triplet are found to be directly input and not calculated by other formulas. For each input parameter of the calculation formula triplet, tracing the parameter edge relationships may cross multiple triplets, forming a tracing chain for each input parameter, such as... Figure 4 As shown.
[0069] In this embodiment, the target calculation formula triplet is obtained, along with input and output variables. Some input parameters of this calculation formula triplet may perfectly match the input variables provided by the requirement element. For other unknown input parameters, the calculation can be obtained by finding related calculation formula triplets through knowledge graph edge relationships, potentially spanning multiple calculation formula triplets. That is, it is necessary to find the calculation formula containing the unknown input parameters from the currently found calculation formula triplet through multi-level parameter edge relationships.
[0070] Step 1: Determine the input parameters required for the triplet in the target calculation formula.
[0071] Step 2: Iterate through each input parameter of the target calculation formula triplet. For input parameters with edge relationships, find the calculation formula triplets that are associated with this input parameter by an edge. Analyze the input and output parameters of the newly found calculation formula triplets.
[0072] Step 3: Iterate through each input parameter of the newly found triplet formula. For input parameters with edge relationships, find the triplet formulas that are associated with this input parameter by an edge. Continue in this manner until all input parameters of the found triplet formulas have no associated edges.
[0073] This allows us to identify all the multi-level related formulas and associated input parameters for each input parameter in the initial calculation formula triplet. It also forms a traceability chain for each input parameter of the calculation formula, including the input parameters, output parameters, related formulas, and the connections between these formulas.
[0074] Step 4: Organize the main body of the calculation formula, input parameters, the source chain for each input parameter, and output parameters. It's important to note that calculations using source chains for triplet calculations may require additional input parameters. These additional input parameter values are easier to obtain.
[0075] Therefore, regarding the main body of the target calculation formula itself, in addition to the directly input parameter values, other related input parameters can be obtained through multi-level calculations using other calculation formulas. In one possible implementation, the specific steps of the above method are as follows: First, define the data structure for storing the calculation formula parameter association triplet and the traceability chain.
[0076] The parameter association of the target calculation formula with a triplet is denoted as... ,in This serves as a unique identifier for the formula, such as "gd05-2004-3.1.1-1"; This is a set of parameter associations, including "hasInput" input parameter associations and "hasOutput" output parameter associations. For the parameter entity set (input parameters) Output parameters ),and ( (Number of input parameters) (Typically, a single output parameter, such as the vertical pressure of the cargo) ).
[0077] Define the parameter edge relation as . This indicates the relationship between the input parameter I and the formula F that generates that parameter, i.e. At that time, there exists , indicating that I is calculated from formula F.
[0078] Directly input parameters are denoted as The condition does not exist. This means there is no formula; users need to directly input numerical values, such as cargo density. Captain L.
[0079] The traceability chain storage data structure uses a hybrid data structure of "linked list + dictionary" to store the traceability chain for each input parameter. Defined as: head: , represents the starting point of the tracing, and is the formula to which the target parameter belongs.
[0080] nodes:[{ Formula identifier The formula takes a set of input parameters. The formula outputs parameters (i.e., input parameters for the next level of tracing), E: the associated edge relationship. The direct input parameter subset of this formula. The formula needs to trace back to the subset of input parameters, ... ].
[0081] tail: , indicates the endpoint of the tracing; all inputs are direct inputs.
[0082] Among them, nodes store the associated formula nodes in the tracing order, head corresponds to the initial formula to which the target parameter belongs, and tail corresponds to the final formula that does not need further tracing.
[0083] This embodiment uses the formula for calculating the vertical pressure of cargo in the cargo holds of a double-hull bulk carrier based on the ship's structural strength. , Taking (e.g.) as an example, the steps for generating the input parameter traceability chain are explained in detail: Step 1: Initial formula input parameter sorting.
[0084] For the already located target formula Extract its complete set of input parameters It also distinguishes between "known direct input parameters" and "unknown parameters requiring tracing": (1) Obtain known direct input parameters from the calculation requirements elements or design documents. ,For example , representing cargo density and calculation point height; (2) Screening unknown parameters that need to be traced ,For example , representing the acceleration coefficient, square root coefficient, and correction coefficient; (3) Mathematical expression: This expression indicates that there is no known value for parameter I. Furthermore, there exists an associated edge between parameter I in the graph and the formula F that generates it, meaning that the parameter is unknown but has an associated formula.
[0085] Step 2: Directly generate formulas by tracing the relationships through the primary parameters.
[0086] right Each parameter is determined through graph edge relationships. Find the formula that directly generates this parameter and construct the first-level node of the traceability chain: 1. Using acceleration coefficient For example: Searching for graphs , to generate formula Extract Input parameters (Length, speed), distinguish (Known ship length) (Unknown speed); in Add a first-level node to the nodes: .
[0087] 2. With correction factor For example: Search The formula is obtained. ;extract (Angle between the plate and the horizontal plane, angle of repose of the cargo) are all known, directly input parameters. , ;exist Add a first-level node to the nodes: ,at this time of No further tracing is needed.
[0088] 3. Using the square coefficient For example: Search The formula is obtained. Extract (Displacement volume, length, beam, draft), distinguish (Known principal scale) (Unknown drainage volume); In Add a first-level node to the nodes: .
[0089] Step 3: Expand the correlation formula through multi-level parameter tracing and recursion.
[0090] For those still existing in Step 2 The formula (such as) , The process of recursively tracing the parameters continues until all input parameters are direct inputs. 1. Speed Secondary tracing: against of Search The formula is obtained. , );extract (Design speed, speed correction factor, distinction) ), ; exist Add a second-level node to the nodes: ,at this time of .
[0091] Speed correction factor Three-level tracing: against of Search The formula is obtained. ( =“GD05 2004 1.2.1 2” , );extract (Ship length, ship width) are both known, directly input parameters. , ; exist Add third-level nodes to the nodes: , at this time of The tracing of the source has ended.
[0092] 2. Drainage volume Secondary tracing: against of Search The formula is obtained. ;extract ,in For known direct input, for The output parameters (there are circular correlations, which need to be verified).
[0093] Verification found and The output parameters overlap, and it is determined that "it can be calculated in a closed loop using existing formulas". Output , need ,form Closed loop, in actual engineering It can be obtained directly from the profile diagram, therefore... Corrected to direct input parameters ).
[0094] Revised , ,exist of Add a second-level node: , .
[0095] Step 4: Traceability chain organization and verification.
[0096] The traceability chain is output in a structured manner. For example, the structure after reorganization is as follows: ,
[0097]
[0098]
[0099] , .
[0100] Similarly, organize , ,form Complete set of input parameter traceability chains .
[0101] Verify the traceability chain. Conduct closed-loop verification to check for any circular correlations of parameters, such as... If such a parameter exists, it needs to be corrected to a direct input parameter based on engineering experience, as described above. Conduct integrity checks to ensure that each of All node input parameters are direct inputs, with no untraceable parameters. The mathematical expression is as follows: , If and only if for Conduct accuracy checks, verifying whether the input / output parameters of each association formula match the edge relationships, such as... of Must be To avoid association errors.
[0102] Step 5: Conduct example verification. After the above steps, the formula for the vertical pressure of cargo in the cargo hold is obtained. The final traceability chain of the input parameters is summarized as follows: Directly input parameters: ; Single-level traceability parameters: ( ,enter ); Multi-level traceability parameters: ( ,enter ); The result meets the requirement that "all input parameters are available".
[0103] Because the formula systems of different specifications and different calculation modules are independent of each other, the same physical parameter may have problems with inconsistent symbols, dimensions, and expressions. Parameters across modules and across spectra cannot be directly passed and referenced. Therefore, in (4) of this embodiment, a parameter mapping and matching conversion method across calculation formulas is proposed, combined with Figure 5 As shown, the implementation process of this method includes the following: In the "input parameter traceability chain" with cross-edge associations in the calculation formula graph, different calculation formulas often have different expressions for the same physical quantity, resulting in inconsistencies in variable names and dimensions, and range rationality issues. By using predefined "synonymous parameter" edge relationships in the knowledge graph, parameter mapping matching transformation functions are added to the traceability chain to further improve it. Local propagation rules for parameter values are established to ensure that the output parameter values of the upstream formula can be accurately propagated to the input parameters of the downstream formula, avoiding calculation errors caused by differences in variable names.
[0104] Step 1: Identify all relationships among the triplet of the calculation formula in the "Input Parameter Source Chain" and determine which ones require parameter mapping and matching conversion across calculation formulas.
[0105] Step 2: Construct parameter mapping matching conversion methods according to different situations.
[0106] Step 3: After matching and transforming based on the above methods, improve and supplement the "input parameter traceability chain".
[0107] In one possible implementation, the specific steps of the above method are as follows: First, define the parameter mapping relationship and the transformation model.
[0108] The parameter mapping relationship is denoted as ), indicating the output parameters of the upstream formula. Input parameters of downstream formula The mapping satisfies and They have the same physical meaning but are expressed differently.
[0109] The transformation function is denoted as , will upstream parameter values Convert to downstream parameter values It includes three types of operations: name mapping, unit conversion, and range verification.
[0110] Synonymous parameter edges are defined through predefined edge relationships in the knowledge graph. ,express and For synonymous parameters, such as .
[0111] The transformation model represents the relationship between two adjacent formulas in the traceability chain. (Upstream) and (Downstream), if Output parameters , Input parameters And exist Then the parameter value transformation satisfies:
[0112] in: For the name mapping function, confirm the synonym relationship; This is a dimensional conversion function used to unify units; This is a range check function to ensure that the parameter values are within a reasonable range.
[0113] Step 1: Identify the relationships that need to be transformed.
[0114] Traverse the parameter passing relationships of all adjacent formulas in the "input parameter source chain" and identify the relationships that need to be transformed using the following rules: Name difference recognition: If and The text labels are different, such as "breadth B" and "type width". "and the knowledge graph contains Marked as "Name mapping required".
[0115] Identification of dimensional differences: If and The units of measurement are different, such as The unit is "m". The unit is "ft". Extract the dimension conversion factor between the two. k ,like This is marked as "requires dimension conversion".
[0116] Range anomaly identification: Based on ship specifications, such as the reasonable range of parameters in the GD05 series, for example, the reasonable range of ship length L is... ,like Exceeding The specified range is marked as "range verification required".
[0117] Mathematical expression: The set of relationships to be transformed for:
[0118] For example: in the traceability chain middle, Output "Captain" =198m (unit: m)” Enter "Captain L (specification range)" )",because However, synonymous edges exist, and 198m is within a reasonable range, therefore... It requires name mapping but not unit conversion or range correction.
[0119] Step 2: Construct a parameter mapping matching transformation method.
[0120] against Three types of transformation methods are constructed based on different types of relationships: Synonymous parameter name mapping method. When and When the parameters are synonymous but have different names, a mapping is established through the synonymous edge relationships in the knowledge graph. The function is defined as follows:
[0121] For example, ;like If there is no synonym edge, a "non-synonymous parameter, cannot be mapped" warning will be triggered.
[0122] Methods for converting units of measurement. When and When the dimensions are the same but the units are different, use the dimension conversion factor. The conversion is performed, and the function is defined as follows:
[0123] in, Dimensional conversion factor (unit conversion coefficient), such as .
[0124] Common dimensional conversions in ship structural calculations, such as length unit conversions: .in, In inches Indicates tons of force. For example, (Captain), converted to meters: Force unit conversion: .For example, (Load), converted .
[0125] Methods for verifying and correcting the reasonableness of the scope. When Exceeding When the specification falls within a reasonable range, verification and correction are required. The function is defined as follows:
[0126] in The reasonable range defined by the standard, such as the angle of repose of goods in GD05-2004. The range is .
[0127] For example, ,because , revised to ; (Angle of repose), deviation exceeds 50% of the reasonable range. With the median value deviation If this triggers a "manual intervention" alert, you need to check if the parameter source is correct.
[0128] Step 3: Supplement and verify the transformation information of the traceability chain.
[0129] After applying the transformation method to the traceability chain, supplement the transformation information and verify its effectiveness. Specifically, this includes: In each parameter passing node of the "Input Parameter Traceability Chain", add a conversion information field:
[0130] in: The upstream parameter name; For downstream parameter names; For type conversion; For conversion functions; The upstream parameter values before conversion; These are the converted downstream parameter values; For conversion validity identification .
[0131] For example The conversion information is supplemented as follows:
[0132] Verify the validity of the transformation. Specifically, perform a consistency verification of the transformation validity, checking the transformed values. Does it conform to the parameter requirements of the downstream formula, such as whether the dimensions are consistent? Is it in Within the scope; conduct traceability verification to ensure the traceability of the conversion process, i.e., through... Can be reversed ,like For unit conversion, conduct batch verification, performing verification on all conversion nodes throughout the entire traceability chain. If any issues exist... For nodes that require adjustment, you need to return to Step 2 and readjust the conversion method.
[0133] Step 4: Supplement the parameter transformation relationships and integrate them to form a variable chain.
[0134] By chaining together all verified parameter transformation relationships, a "variable chain" is formed, realizing a complete transfer path from the upstream direct input parameters to the downstream target formula input parameters. The variable chain is defined as follows:
[0135] in, For direct input parameters, Input parameters for the target formula. For the first Step transformation function, satisfying For example, the variable chain for the ship's principal dimensional parameters is as follows: This indicates the length between perpendicular lines as input directly. "" converted to "captain" Then, the names are mapped to the input parameters of the target formula. .
[0136] Step 5: Perform an example verification using the parameter conversion calculated from cargo hold pressure.
[0137] In the calculation of vertical pressure on cargo holds of a double-hull bulk carrier, the traceability chain has the following parameter transfer relationships, which need to be processed through a conversion method: (1) Output → enter: , There are differences in dimensions ( ), converted to: .like ,but .
[0138] (2) Output → enter: Parameters with different names but similar meanings are converted to: .like ,but .
[0139] (3) Output → enter: , , , ,because Revised to: And mark it as "Original data requires manual review".
[0140] The above transformation ensures that all parameters are accurately transferred to the target formula. This provides reliable input data for calculating the vertical pressure of cargo in the cargo hold.
[0141] This method, through systematic parameter mapping and transformation, solves the transfer problem caused by differences in parameter names, dimensions, and ranges in cross-formula calculations, ensuring the accuracy of ship structural strength calculations. Further expansion is possible if more detailed transformation rules are needed for specific types of parameters (such as loads and stresses), or to supplement more dimensional standards from ship specifications.
[0142] The implementation process of the simplified formula calculation method based on input parameter tracing chain pruning in (5) includes the following: For each input parameter in the formula triplet with an edge relationship, there exists an "input parameter tracing chain", which is calculated and output by other related formula triplets. In the actual calculation process, some of the input parameters required by the formula triplet completely match the input variables, while other input parameters are not directly provided and need to be obtained through the "input parameter tracing chain" of the input parameters.
[0143] In actual calculations, each input parameter does not need to be obtained through a complete "input parameter tracing chain." There are input variables obtained through understanding the requirements that serve as input parameter values for the calculation triplets in the middle of the "input parameter tracing chain." The links after the known parameters in the "input parameter tracing chain" can be subtracted, eliminating the need to continue tracing calculations, thus forming an "input parameter pruning chain." Using the "input parameter pruning chain" and the known input variables directly, the input parameters required for the main body of the target calculation formula can be calculated. However, it is necessary to supplement the "input parameter pruning chain" with other input parameters needed to complete the link calculations.
[0144] The calculation steps are as follows: Step 1: Based on the understanding of the requirements for ship structural strength calculation, obtain the target calculation formula triplet, input variables, and output variables. Consider which input parameters are unknown, which can be obtained through the "input parameter traceability chain" calculation.
[0145] Step 2: For each "input parameter sourcing chain," prune the "input parameter sourcing chain" based on the input variables obtained from the understanding of the requirements, forming an "input parameter pruned chain." Simultaneously, identify any other input parameter values besides those obtained from the understanding of the requirements when using the "input parameter pruned chain" for input parameter calculation, and then supplement these values.
[0146] Step 3: For the input parameters of the main triplet of the target calculation formula, there are (1) input parameter pruning chain; (2) input parameters that can be used directly; (3) input parameters that need to be calculated through the "input parameter pruning chain"; and (4) other input parameters that need to be added to complete the "input parameter pruning chain" calculation.
[0147] like Figure 6As shown, the solid gray circles represent input parameters, which are input variables obtained based on the requirements and are distributed across the triples of the "Input Parameter Source Chain" calculation formula. The light green circles represent other input variables needed to complete the "Input Parameter Source Chain" calculation. The dashed gray circles represent input parameters that can be used directly. The solid red circles represent output parameters.
[0148] In one possible implementation, the specific steps of the above method are as follows: First, define the source chain of input parameters and determine the three pruning principles.
[0149] The input parameter traceability chain is denoted as , representing the objective formula A certain input parameter needs to be processed (Directly generate parameters) (generate (Input parameters)... (The topmost formula requires all inputs to be direct parameters) Calculate layer by layer.
[0150] The known parameter node is denoted as This refers to parameters directly obtained from calculation requirements elements or design documents, and yes A certain formula Input parameters ( ).
[0151] The input parameter pruning chain is denoted as , indicating from Remove from Upstream links ( Only retain from arrive The necessary computational links.
[0152] The supplementary parameters are denoted as ,refer to Chinese formula In the input parameters, except Other direct input parameters besides those required must be provided by the user.
[0153] The three pruning principles include: (1) Redundant link removal principle: if Input parameters Given, then and upstream formulas, used to calculate Other input parameters do not need to be called, and this part of the link can be removed directly; (2) Calculation minimization principle: It must contain the minimum number of formulas, i.e., select... The smaller formula is closest to (3) Parameter integrity principle: After pruning, the known parameter nodes are pruned. All formulas in the text must have complete input parameters, including... and To ensure that it can be calculated The target input parameters. The priority order of the three principles is generally: redundancy removal principle > minimization principle > integrity principle.
[0154] In this embodiment, the formula for the vertical pressure of cargo in the cargo holds of a double-hull bulk carrier is used. ( for Input parameters) Taking the (acceleration coefficient) traceability chain as an example, the input parameter traceability chain pruning steps are explained in detail: Known ,in: : , Used for calculation .
[0155] : , For design speed, This is the speed correction factor. Used for calculation .
[0156] : , B For the width of the boat, Used for calculation .
[0157] User requirements provide known parameters .
[0158] Step 1: Identify the relationship between unknown parameters and the traceability chain.
[0159] from input parameter set In the process of filtering unknown parameters ( (Known); match the corresponding parameter for each unknown parameter. ,For example correspond The mathematical expression is: ,and .
[0160] Step 2: Pruning and supplementing parameters of the traceability chain.
[0161] Locating nodes with known parameters: Search The formula to which it belongs. ,yes and Input parameters; ,yes The input parameters. Based on the "calculation minimization principle," select the closest... Known parameter nodes , Include ,because Compare Closer The link is shorter after pruning.
[0162] Generate pruning chain: Remove Upstream (Redundant links), reserved ,like Figure 6 As shown in the red dashed box in the image; verification integrity, Output V , enter L and V , Output It can be calculated Input parameters This meets the computational requirements.
[0163] Organize and supplement parameters: extract Chinese formula Input parameters, ; Known ,but (Speed correction factor, needs to be provided by the user); Similarly, Input parameters , V Depend on Calculations are required; no further explanation is needed. The mathematical expression is: ,in for The output parameters are used for calculation. Input.
[0164] Supplementary parameter acquisition and verification: User-supplemented According to the GD05-2004 standard, the speed correction factor is typically 0.85-0.95; verification The rationality, Within the scope of the regulations, it is confirmed to be valid.
[0165] Step 3: Parameter classification and calculation after pruning.
[0166] Post-pruning parameter classification: targeting All input parameters are categorized into four types based on their source: (1) Input parameters used directly (such as...) Figure 6 (middle dashed gray circle) (1) User provides the parameter directly, no calculation is required; (2) Input parameter pruning chain ( ): (Generated similarly) (Similarly generated); (3) Input parameters that need to be calculated through pruning chains: ,pass Calculated; (4) Additional parameters of the pruning chain (such as Figure 6 (Green Circle of Reclaimed Water) ( for (Supplementary parameters for the pruning chain).
[0167] Parameter calculation based on pruning chain: calculate : (0.5144 is the coefficient for kn to m / s), substitute into ,have to ; calculate : Substituting L=200m and V=7.00m / s, we get ; Similarly, calculate and Finally obtained Complete input parameters.
[0168] Target formula calculation: and Substitution Calculate the vertical pressure of cargo in the cargo hold. :
[0169] Substituting the parameter values, we get .
[0170] Step 4: Verify the effectiveness of pruning.
[0171] Computational efficiency comparison: Complete traceability chain Need to call There are 3 formulas in total, involving parameters ; Pruning chain Call only There are 2 formulas in total, involving parameters. The number of formula calls is reduced by 33%, and the calculation steps are simplified.
[0172] Consistency verification of results: If according to calculate, Output (Same as the supplementary parameters), final The calculation results are the same, indicating that pruning did not affect the calculation accuracy.
[0173] Parameter integrity verification: after pruning Input parameters for all formulas in ( All data is complete and without missing data, ensuring that the calculation is executable.
[0174] In summary, the ship structural strength calculation method based on topology tree and graph reasoning pruning provided in this embodiment brings the following technical effects: 1. When the knowledge graph for calculating formulas is large, the time complexity of finding the formula by directly traversing the graph is high, and the time consumption of direct lookup increases linearly with the size of the graph. This embodiment adopts a two-step method of "hierarchical filtering + narrowing range matching" based on "topology tree + graph" to solve the problem of the time consumption of direct lookup increasing linearly with the size of the graph.
[0175] (1) The time complexity of the "topology tree + graph" method is constant and minimally affected by the size of the graph: The time complexity of the "topology tree + graph" method is... , For a fixed number of levels, The number of formulas under the target node is constant-time complexity. This applies regardless of the total number of formulas in the graph. Growing from 500 to 5000, or even 10000, only requires traversing 5 levels of topological tree nodes plus an average of 8 formula nodes. In contrast, the time complexity of direct graph lookup is... Follow Growth increases linearly, when The time required is more than 30 times that of "topology tree + graph".
[0176] (2) The search range for triples is significantly narrowed through topology tree preprocessing. The hierarchical filtering function of the topology tree is equivalent to a "pre-filter," reducing the search range of the entire graph from... The formula is reduced to Formula For example, in a guide containing 3 categories, Searching for "gd05-2004 Cargo Hold Vertical Pressure Formula" in the graph directly requires traversing 1520 triples. However, with the "topology tree + graph" filtering through "gd05-2004 → Chapter 3 → Section 3.1 → Item 3.1.1", only 3 triples of the formula need to be matched, reducing the search range by 99.8% and significantly improving efficiency.
[0177] 2. To address the issues encountered in the actual process of searching for calculation formulas, such as incomplete or insufficiently targeted calculation requirements, leading to the need to re-search for formulas due to missing parameters or unsuitable application scenarios, this embodiment employs a calculation formula requirement element extraction method based on a large language model. This method iteratively optimizes the requirement description through multiple rounds until the core calculation elements can be extracted. This reduces the number of iterations in searching for calculation formulas, verifies the completeness of the application scenario, and improves the efficiency of formula search.
[0178] 3. To address the three major problems in actual calculations—low tracing efficiency, error-prone paths, and reliance on experience—this embodiment employs an input parameter tracing chain generation method based on graph association reasoning. For each input parameter in the calculation formula triplet, tracing is performed through parameter edge relationships, potentially spanning multiple triplets to form a tracing chain for each input parameter. This overcomes the bottleneck of traditional manual tracing, quickly finding the matching relationship between the calculation formula and input variables, which helps to clarify the origin and development of each input parameter. When the input parameter value of the calculation formula cannot be directly obtained, it can be indirectly calculated and obtained through other known variables in the input parameter tracing chain.
[0179] 4. When searching for calculation formulas across knowledge graphs, inconsistencies in unit dimensions and variable symbols for the same transitive variable between different graphs prevent direct cross-graph referencing. This embodiment employs a parameter mapping matching and transformation method (variable chain) across calculation formulas to ensure seamless connection across calculation formula graphs. By leveraging predefined "synonymous parameter" edge relationships in the knowledge graph, a parameter mapping matching and transformation function is added to the tracing chain, further refining it. Local transmission rules for parameter values are established to ensure that the output parameter values of upstream formulas are accurately transmitted to the input parameters of downstream formulas, avoiding calculation errors caused by differences in variable names.
[0180] 5. Addressing the issue that in actual calculations, each input parameter does not need to be obtained through a complete "input parameter traceability chain," this embodiment employs a simplified formula calculation method based on input parameter traceability chain pruning. This ensures the adaptability of the same calculation formula to different known parameters. It improves computational efficiency, reduces redundant formula calls, lowers the average number of formula calls by 20%-40%, and is suitable for batch calculations of ship structural strength. It simplifies user operation, eliminating the need for users to provide the complete set of basic parameters; only the necessary pruned parameters are required, lowering the input threshold. It maintains computational accuracy, as pruning only removes redundant links without altering the core computational logic, ensuring consistency between the calculation results and the complete chain. It offers flexible adaptation, dynamically adjusting the pruning position based on the known parameters provided by the user to accommodate parameter completeness at different design stages. For example, less pruning is needed in the preliminary design stage when there are fewer known parameters, while more pruning is needed in the detailed design stage when there are more known parameters.
[0181] The above descriptions are merely preferred embodiments of this application, and the present invention is not limited to the above embodiments. It is understood that other improvements and variations directly derived or conceived by those skilled in the art without departing from the spirit and concept of the present invention should be considered to be included within the protection scope of the present invention.
Claims
1. A method for calculating the structural strength of ships based on topological trees and graph reasoning pruning, characterized in that, The method includes: Construct a topology tree of the table of contents of the Guide to Ship Structural Strength Calculation, and establish a two-way mapping relationship between the topology tree and the knowledge graph of ship structural strength calculation formulas; Based on the large language model of ship structural strength calculation formula, the language description of ship structural strength calculation requirements is analyzed in multiple rounds of iteration, and the calculation requirement elements are extracted and standardized. The calculation requirement elements include the calculation formula name, constraints, input and output parameters and parameter values. Based on the computational requirement elements, the topology tree is filtered hierarchically, and combined with the association matching of the knowledge graph, the target computational formula triplet is quickly located. Through the associative reasoning of the knowledge graph, a source chain of input parameters for the target calculation formula is generated; Based on the known parameters in the calculation requirements, the source chain of each input parameter is pruned to obtain the input parameter pruning chain, and the ship structural strength calculation is completed based on the pruning chain.
2. The method for calculating the structural strength of a ship according to claim 1, characterized in that, Methods for establishing a bidirectional mapping relationship between the topology tree and the knowledge graph of ship structural strength calculation formulas include: The topology tree is constructed as a five-level acyclic topology tree consisting of specifications, chapters, sections, articles, and formulas. A unique identifier for each level node of the topology tree is defined, and subordinate edge relationships that exist only between adjacent levels are established. Extract the specification number, chapter, section, clause, and formula number from the unique identifier of the formula node in the topology tree; The formula identifiers in the knowledge graph of the calculation formula are structured and parsed to obtain the standard number, chapter, section, article, and formula serial number; A forward mapping function is used to map the topology tree formula nodes to the corresponding formula identifiers in the graph, and a reverse mapping function is used to locate the graph formula identifiers to the corresponding formula nodes in the topology tree.
3. The method for calculating the structural strength of a ship according to claim 1, characterized in that, The method for multi-round iterative parsing of the language description of ship structural strength calculation requirements based on a large language model of ship structural strength calculation formulas includes: Based on the large language model, the missing elements in the initial computational requirement language description are identified and prompts are given to complete them, thus obtaining the second-generation computational requirement language description. The non-standardized terms in the second-generation computational requirements language description are converted into ship structural strength calculation standard terms to obtain the third-generation computational requirements language description. Associate the keywords of the topology tree hierarchy and supplement them to the third-generation computing requirement language description to generate the final standardized computing requirements, and complete the final requirement adaptation verification through keyword matching degree.
4. The method for calculating the structural strength of a ship according to claim 3, characterized in that, Methods for identifying missing elements include: The large language model is used to perform word segmentation, entity linking and intent understanding on the initial computational requirement language description, and extract the set of clearly defined computational elements, including computational target, ship type / part, known input parameters and output parameters. Based on the extracted computational objectives, the large language model retrieves matching standard computational element templates from the predefined computational formula ontology model in the graph, performs a difference operation with the known set of computational elements, and determines the missing elements. The missing elements are sorted according to the engineering logic of ship structural strength calculation, thereby generating standardized follow-up questions to complete the description.
5. The method for calculating the structural strength of a ship according to claim 1, characterized in that, The method for calculating the rapid target location using triplet formulas includes: Based on the hierarchical keywords in the computational requirement elements, the topology tree is filtered layer by layer according to specifications, chapters, sections, and items to select the set of formula nodes under the target item node; The set of formula nodes is converted into a set of graph formula identifiers through bidirectional mapping; Match the triplet corresponding to the output parameter in the calculation requirement element within the set of graph formula identifiers to obtain the target calculation formula triplet.
6. The method for calculating the structural strength of a ship according to claim 1, characterized in that, The method for generating the input parameter traceability chain includes: Summarize all input parameters of the target calculation formula, and distinguish between known direct input parameters and unknown parameters that need to be traced back, wherein the direct input parameters are provided by the calculation requirement elements; The edges connecting parameters and formulas in the knowledge graph are recursively traversed, and the associated formulas that generate unknown parameters are searched layer by layer. Perform closed-loop verification, integrity verification, and accuracy verification on the generated traceability chain to ensure that all unknown parameters can be traced back to the direct input parameters.
7. The method for calculating the structural strength of a ship according to claim 6, characterized in that, The method of recursively traversing the edges connecting parameters and formulas in the knowledge graph and searching layer by layer for the associated formulas that generate unknown parameters includes: For each unknown source parameter, the upstream formula that directly generates the parameter is found through the association edges between the parameter and the formula in the knowledge graph; Extract all input parameters of the upstream formula and distinguish between known direct input parameters and new unknown source parameters; Repeat the upstream formula search and parameter differentiation steps for the new unknown source parameters until all source parameters correspond to a final formula containing only direct input parameters, or all input parameters of the upstream formula have no associated edges.
8. The method for calculating the structural strength of a ship according to claim 1, characterized in that, The method for reasoning and pruning the source chain of each input parameter based on the known parameters in the computational requirement elements includes: For each input parameter tracing chain, locate the node to which the known parameter belongs in the input parameter tracing chain, and remove redundant computation links downstream of that node; If there are multiple known parameters, the known parameter that is closer to the node to which the target calculation formula belongs is selected in the input parameter tracing chain to satisfy the principle of minimizing computation. The parameters that need to be added to the pruning process are identified to form a complete input parameter pruning chain for calculating the target formula.
9. The method for calculating the structural strength of a ship according to any one of claims 1-8, characterized in that, The method further includes: During the input parameter tracing chain transmission process, the parameters transmitted across the spectrum are matched and converted by name mapping, dimension conversion and range verification.
10. The method for calculating the structural strength of a ship according to claim 9, characterized in that, The matching conversion method includes: Traverse the parameter passing relationships of all adjacent formulas in the input parameter source chain to identify the output parameters of the upstream formula to be converted. Input parameters of downstream formula ; when and When the parameters are synonyms but have different names, the synonym name mapping is completed through the synonym edge relationship predefined in the knowledge graph; when and When the dimensions are the same but the units are different, the dimension conversion between different units is completed according to the dimension conversion factor; when The parameter value exceeds When the parameters are within the reasonable range of the specifications, based on the given range of ship structural strength calculation specifications, limit corrections are made for parameters that exceed the range, or manual intervention is triggered to remind users.