An intelligent prediction method and system for ship resistance

Through the dynamic weight graph attention network and physical constraint methods, the limitations of traditional neural networks in ship resistance forecasting are solved, efficient and accurate ship resistance forecasting is achieved, adapting to complex ship types and working conditions, and improving the adaptability and accuracy of the model.

CN120196902BActive Publication Date: 2025-08-01QINGDAO INNOVATION & DEV CENT OF HARBIN ENG UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510668436.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-23
Publication Date
2025-08-01
Estimated Expiration
2045-05-23

AI Technical Summary

Technical Problem

Traditional neural networks are difficult to fully utilize the relationship information between data in ship resistance forecasting. They are inefficient when processing irregular graph structure data, and they are difficult to capture local and global features in a fixed receptive field, and lack physical interpretability. They require complex adjustments when adapting to different ship types and working conditions.

Method used

Using a method based on dynamic weight graph attention network and physical constraints, nodes and edges in the graph attention network are constructed, multi-head attention mechanisms and loss functions are designed, combined with Adam and SGD optimizers, attention weights are automatically allocated to meet physical law constraints.

Benefits of technology

It improves the accuracy and efficiency of ship drag forecasting, adapts to complex ship types and different working conditions, reduces prediction errors, and improves the generalization ability and physical interpretability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120196902B_ABST
    Figure CN120196902B_ABST
Patent Text Reader

Abstract

The present invention belongs to the cross - technical field of integrating graph attention network and ship resistance. It discloses a ship resistance intelligent prediction method and system. The method constructs nodes and edges in the graph attention network and pre - processes data; designs and improves the loss function; establishes a dynamic - weight multi - head attention mechanism to automatically allocate attention weights for different ship - type characteristics; applies the training strategy of the Adam and SGD combined optimizer to obtain the graph attention network model; and conducts ship resistance prediction and evaluation through the dynamic - weight graph attention network model. By introducing the ship resistance intelligent prediction method based on the dynamic - weight graph attention network and physical constraints, the present invention has the advantages of simple structure and clear algorithm. It is specially designed for resistance prediction under different ship types and solving the matching problems of propellers and power plants, demonstrating significant innovation and practical value, and providing strong support for the optimal design, energy conservation and emission reduction, and safe navigation of ships.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the cross - technical field of integrating graph attention network and ship resistance field, and particularly relates to a ship resistance intelligent prediction method and system. Background Technique

[0002] Ship resistance is of great significance to aspects such as fuel economy, navigation safety, and environmental impact. Accurately predicting ship resistance is a key link in realizing problems such as efficient ship design and matching main engine power. Traditional ship resistance prediction methods mainly rely on model tests, theoretical calculations, and empirical formulas. Even though they have been widely used in industry, there are still differences from the actual ship resistance.

[0003] Firstly, although empirical formulas are simple and easy to use, their applicable range is limited, and it is often difficult to accurately predict for complex ship types and special working conditions. Theoretical calculation methods need to solve the basic equations of fluid mechanics, with complex calculation processes and high requirements for setting boundary conditions and initial conditions. Secondly, model tests require a large amount of time, manpower, and material resources, with high costs. In addition, with the development of computer technology and numerical simulation methods, ship resistance prediction methods based on computational fluid dynamics (CFD) have gradually been applied. However, although the CFD method can relatively accurately simulate the flow field around the ship, it has a large amount of calculation and a long calculation time, and it is difficult to meet the requirements of rapid prediction in the process of ship design and optimization.

[0004] In recent years, to overcome these problems, data - driven intelligent prediction methods have gradually become the research focus. Among them, deep learning technology has emerged in the field of ship resistance prediction due to its excellent ability in pattern recognition and non - linear function fitting. Through learning and training on a large amount of data, the deep learning model can achieve rapid prediction of ship hydrodynamic derivatives and show high prediction accuracy. However, the limitations of traditional neural networks are more obvious when dealing with irregular graph structures or explaining the relationships therein.

[0005] The limitations of traditional neural networks in predicting ship resistance are as follows:

[0006] 1. When traditional neural networks process data, they often regard data points as independent individuals and are difficult to make full use of the relationship information between data.

[0007] 2. Traditional neural networks usually assume that data has a regular grid structure. For example, the convolutional attention network (CNN) is suitable for processing data with a two - dimensional grid structure such as images. However, for graph - structured data, the connection relationships between nodes are complex and irregular, and traditional attention networks are difficult to directly process.

[0008] 3. When traditional neural networks process data, the receptive field is usually of a fixed size, making it difficult to consider both local and global features of the data simultaneously. For example, the size of the convolutional kernel in a convolutional neural network (CNN) determines the range of local features it can capture, and it is difficult to obtain global information beyond this range.

[0009] 4. For input data of different sizes or structures, traditional neural networks may need to redesign the network structure or make complex adjustments.

[0010] Through the above analysis, the problems and defects existing in the existing technologies at home and abroad are as follows:

[0011] (1) When traditional neural networks predict ship resistance, they regard data points as independent individuals and it is difficult to make full use of the relationship information between data; for graph-structured data, the connection relationships between nodes are complex and irregular, and it is difficult for traditional attention networks to directly process them.

[0012] (2) When traditional neural networks process data, the receptive field is usually of a fixed size, making it difficult to consider both local and global features of the data simultaneously; for input data of different sizes or structures, traditional neural networks may need to redesign the network structure or make complex adjustments.

[0013] (3) Currently, for ship resistance prediction based on CNN, the relevance of hull geometry, fluid, and working conditions is not considered, resulting in significant prediction errors for complex ship types.

[0014] (4) The application of GAT in flow field prediction only defines edge attributes depending on the Euclidean distance between nodes and does not embed the Navier-Stokes equation, resulting in poor physical interpretability.

[0015] (5) The combined optimization of Adam and SGD adopts a fixed switching strategy and does not dynamically allocate optimizers according to the physical meaning of parameters. Summary of the Invention

[0016] To overcome the problems existing in the related technologies, the disclosed embodiments of the present invention provide a method and system for intelligent prediction of ship resistance, particularly a method and system for intelligent prediction of ship resistance based on a dynamic weight graph attention network and physical constraints. The technical solutions are as follows:

[0017] The present invention is implemented as follows. The method for intelligent prediction of ship resistance includes the following steps:

[0018] S1. Construct nodes and edges in the graph attention network and preprocess the original data;

[0019] S2. Design and improve the loss function based on physical constraints and node and edge features;

[0020] S3. Establish a dynamic weight multi-head attention mechanism to automatically assign attention weights to different ship type features;

[0021] S4. Apply the training strategy of the combined optimizer of Adam and SGD to obtain the graph attention network model;

[0022] S5. Through the dynamic weight graph attention network model, conduct ship resistance prediction and evaluation;

[0023] S6. Model verification and continuous optimization.

[0024] In step S1, when constructing the graph attention network, the nodes are divided into hull geometric feature nodes, hydrodynamic parameter nodes, and operating condition parameter nodes;

[0025] The edges are divided into geometric association edges, physical action edges, and operating condition influence edges; The geometric association edges are used to connect the hull part nodes with geometric adjacent relationships, and the attributes of the edges represent the distance and angle changes between the two parts to reflect the continuity and relevance of the overall hull geometric shape; The physical action edges represent the edges established between the hydrodynamic parameter nodes and the hull geometric feature nodes, which are used to transmit the interaction information between the fluid and the hull; The attributes of the edges are set as physical quantities describing the action intensity, including the pressure gradient affecting the frictional resistance and the viscous pressure resistance affected by the flow field characteristics; The operating condition influence edges are used to connect the operating condition parameter nodes, and the attributes of the edges represent the influence degree of the operating condition on the parameters;

[0026] The original data comes from ship tank tests and CFD numerical simulations, and the data has been normalized and denoised.

[0027] Furthermore, the hull geometric feature nodes include the main dimensions ratio of the ship and the form coefficients. The bow and stern are discretized into nodes, and each node contains the geometric parameters of this part. The geometric parameters include curvature, cross-sectional area, and length-width ratio; In the hydrodynamic parameter nodes, the flow velocity, pressure, density, and viscosity coefficient are set to represent the fluid parameters around the ship; The operating condition of the ship's navigation is used as a node, and the operating conditions include the speed, draft, and trim angle.

[0028] In step S2, the loss function based on physical constraints and node and edge features includes two parts:

[0029] The first part is the cross-entropy loss function between the estimated value and the actual value of the resistance, which is used to ensure the accurate estimation of the resistance value by the model;

[0030] The second part is the loss function term for predicting the viscous resistance of the ship based on the Navier-Stokes equation, which is used to ensure that the model prediction results conform to the physical laws of ship resistance prediction.

[0031] In step S2, design and improve the loss function based on physical constraints and node and edge features, including:

[0032] The physical loss constrains the model output through the integral form of the Navier-Stokes equation, and the expression is:

[0033] ;

[0034] In the formula, is the physical constraint term in the loss function, is the square of the difference between two scalar values, that is, the squared error, is the theoretical drag value calculated based on the Navier-Stokes equation, obtained by integrating the pressure gradient on the hull surface; is the drag value predicted by the model; is the total number of samples, is the th item of the sample, is a positive integer representing the numbers from 1 to ;

[0035] ;

[0036] In the formula, is the drag value calculated by the theoretical formula, is the area of the outer surface of the ship, is the hydrodynamic viscosity, is the velocity field, is the pressure field, is the normal vector of the hull surface;

[0037] The data loss is used to measure the difference between the drag value predicted by the model and the actual measured value, and the expression is:

[0038] ;

[0039] In the formula, is the data loss term in the loss function, is the actual drag value of the th sample, from ship tank experiments or CFD simulations; is the drag value of the th sample predicted by the model;

[0040] The loss function based on physical constraints and node and edge features, the expression is:

[0041] ;

[0042] In the formula, is the total loss function; is a hyperparameter used to balance the weights of data loss and physical loss.

[0043] In step S3, a dynamic weight multi-head attention mechanism is established, including:

[0044] (1) Dynamic weight generation module; Based on the attention heads of GAT, a weight generation sub-network is added. The input is node features and edge attributes, and the output is the dynamic weight coefficients of each attention head, specifically including:

[0045] Feature encoding: Jointly encode the node features and edge attributes The expression is:

[0046] ;

[0047] In the formula, is the feature vector of node after joint encoding, is a multi-layer perceptron for non-linear feature mapping; is the original feature of the geometric parameters and hydrodynamic parameters of node , is the distance of the geometrically associated edge of edge and the pressure gradient attribute of the physically acting edge, is the set of neighbor nodes of node ; is the vector concatenation operation, which concatenates the node features and edge attributes into a single input; is the expression of the j-th node;

[0048] Weight calculation: Generate the weights of K attention heads through Softmax. The expression is:

[0049] ;

[0050] In the formula, is the dynamic weight coefficient of the -th attention head, which is used to sum and aggregate the outputs of different heads; is a learnable parameter vector, representing that the -th head focuses on the physical dimensions of geometry, fluid, and working conditions; is the total number of attention heads; is the exponential function for Softmax normalized weight allocation; is the feature vector of node after joint encoding;

[0051] (2) Scene-adaptive attention aggregation; In the region of sudden change in bow curvature dominated by local geometry, the attention aggregation specifically includes:

[0052] Geometric Focus: Weight Increase, and strengthen the influence of geometric correlation edges when calculating attention;

[0053] ;

[0054] In the formula, is the attention weight of node to neighbor node ; is a learnable attention parameter vector for weight allocation of geometric features; is a learnable weight matrix for projecting node features into the feature space of the set focus head; is a vector concatenation operation that concatenates the projected features of node and ; is an activation function that introduces non-linearity and alleviates the vanishing gradient problem; is a transpose operation to adjust the vector direction to ensure the dimensional consistency of mathematical operations. Through transpose and dot product, the model automatically learns the influence weight of geometric features on ship resistance; is a learnable weight matrix, is the geometric parameter of node ; is the geometric parameter of node j;

[0055] Flow Field Focus: Weight Decrease, and finally the node features are updated to the weighted aggregation of each head;

[0056] ;

[0057] In the formula, is the combined parameter of node after update, is an activation function to enhance the non-linear expression ability of the model; is the weight matrix of the th attention head for feature transformation; is the attention weight of node to neighbor node for the kth attention head;

[0058] (3) Physical Constraint-guided Weight Optimization; Add a physical regularization term for attention weights in the loss function to ensure that the weight allocation conforms to the laws of fluid mechanics;

[0059] ;

[0060] In the formula, is the physical constraint loss term, forcing the attention weights to conform to the laws of fluid mechanics, is a hyperparameter used to control the strength of the physical constraint term; To pass The ideal weights calculated by Eq.

[0061] In step S4, the training strategy of the Adam and SGD combined optimizer is applied, including:

[0062] Phased combination: Adam optimizer is applied in the early stage of training. When the model is trained to a near-optimal solution, SGD optimizer is switched.

[0063] Important parameter combination: For the node weights corresponding to the parameters closely related to the ship geometry, the SGD optimizer is used to update; for the partial weights related to the fluid dynamics parameter nodes and the operating condition parameter nodes, the Adam optimizer is used;

[0064] Dynamic weight combination: During the training process, the weights of the Adam optimizer and the SGD optimizer in parameter updates are dynamically adjusted according to the training effect of the model, and weight coefficients are introduced. ;

[0065] Balancing the fast convergence of the Adam optimizer and the stability of the SGD optimizer, the expression is:

[0066] ;

[0067] Where, For the Model parameters of node weights and edge attributes for each iteration; For the Model parameters of node weights and edge attributes for each iteration; is the global learning rate, which controls the step size of parameter update; is the dynamic weight coefficient, which controls the mixing ratio of Adam and SGD optimizers; It is the momentum term of the Adam optimizer, combined with the first-order moment estimate of the historical gradient; The current batch gradient of the SGD optimizer is directly calculated as the derivative of the loss function with respect to the parameters.

[0068] In step S5, the trained dynamic weight graph attention network model is used to predict the data in the test set, and the model prediction results are compared and verified with the results obtained by computational fluid dynamics.

[0069] In step S6, based on the results of the prediction evaluation, the model is iteratively optimized, including adjusting the network structure, optimizing the loss function and selecting the optimization algorithm, and finally the optimized model is applied to the prediction of the actual ship swaying motion.

[0070] Another object of the present invention is to provide an intelligent ship resistance prediction system, which is used to control the intelligent ship resistance prediction method described above. The system includes:

[0071] A graph attention network construction module, which is used to construct nodes and edges in the graph attention network and preprocess the original data;

[0072] A data preprocessing module, which is used to design and improve a loss function based on physical constraints and node and edge features;

[0073] A loss function construction module, which is used to establish a dynamic weight multi-head attention mechanism to automatically assign attention weights to different ship type features;

[0074] An attention weight automatic assignment module, which is used to establish a dynamic weight multi-head attention mechanism to automatically assign attention weights to different ship type features;

[0075] A combined training module, which is used to apply the training strategy of an Adam and SGD combined optimizer to obtain a graph attention network model;

[0076] A ship resistance prediction and evaluation module, which is used to perform ship resistance prediction and evaluation through a dynamic weight graph attention network model;

[0077] A model verification and continuous optimization module, which is used for model verification and continuous optimization.

[0078] Combining all the above technical solutions, the beneficial effects of the present invention are as follows:

[0079] In view of the limitations of current neural networks, the present invention proposes an intelligent ship resistance prediction method based on a dynamic weight graph attention network and physical constraints. According to the construction of nodes and edges in the graph attention network, and according to the relationships between different nodes and edges, a dynamic weight multi-head attention mechanism is introduced to dynamically assign different weights to the neighbor nodes of each node. The specific process is to project the node features into a new space through a linear transformation, calculate the attention scores between nodes using an attention function (such as a shared linear function activated by LeakyReLU), normalize them through a softmax function to obtain the weights of each neighbor node, and add the weighted sum of the neighbor node features according to the weights to update the current node features in the original cross-entropy loss function.

[0080] The present invention constructs information such as the geometric characteristics, hydrodynamic parameters, and navigation conditions of a ship into graph-structured data, and utilizes the powerful graph data processing ability of the graph attention network to automatically learn the complex non-linear relationships therein; with the cooperation of the dynamic weight allocation and physical condition constraints, an accurate ship resistance value can be obtained quickly, overcoming the limitations of traditional ship resistance prediction methods, improving the accuracy and efficiency of ship resistance prediction, and providing strong support for the optimal design, energy conservation and emission reduction, and safe navigation of ships.

[0081] The present invention introduces an intelligent ship resistance prediction method based on a dynamic weight graph attention network and physical constraints, which is designed specifically for resistance prediction under different ship types and for solving the matching problems of propellers and power plants, demonstrating significant innovation and practical value. Compared with the prior art, the present invention has the advantages of simple structure and clear algorithm, providing strong support for the optimal design, energy conservation and emission reduction, and safe navigation of ships. In addition, by accurately capturing the characteristics of the ship type, operating conditions, hydrodynamic parameters, etc., this method effectively improves the resistance prediction accuracy under complex ship types, different drafts, and speeds, and solves the limitations of traditional models in dealing with irregular graph structures. Therefore, the present invention not only provides an advanced technical means for resistance prediction under different ship types and for solving the matching problems of propellers and power plants, but also opens up new ways for research and application in related fields, having important theoretical significance and broad application prospects.

[0082] Aiming at the limitations of traditional ship resistance prediction methods, the present invention constructs the geometric characteristics, hydrodynamic parameters, and navigation conditions of a ship into graph-structured data; by constructing a multi-level graph structure including geometric correlation edges, physical action edges, and operating condition influence edges, and combining the Navier-Stokes equation to constrain the edge attributes, the deep integration of the graph structure and fluid mechanics mechanism is realized, and the physical interpretability of the model is improved. The present invention introduces a dynamic weight multi-head attention mechanism, which automatically allocates weights according to the ship type characteristics and physical scenarios, enhancing the ability to capture complex relationships. A loss function based on physical constraints and node and edge characteristics is designed, and an optimization strategy combining the Adam optimizer and the SGD optimizer is used to train the model. Verified by simulation experiments, compared with traditional neural networks and graph attention networks, the present invention has higher resistance prediction accuracy, stronger generalization ability, and higher computational efficiency under complex ship types and different operating conditions, and can effectively support the optimal design, energy conservation and emission reduction, and safe navigation of ships.

[0083] The intelligent prediction method of ship resistance based on the dynamic weight graph attention network and physical constraints of the present invention not only proposes a new construction relationship of the graph attention network theoretically, but also provides an effective ship resistance prediction method in practical applications. By means of optimizing model design, introducing physical constraints, combining optimizer training strategies, etc., the present invention can accurately predict the complex ship type resistance and under different basic working conditions and has physically interpretable prediction results, significantly improving the accuracy and reliability of ship resistance prediction. Brief Description of the Drawings

[0084] The drawings herein are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure;

[0085] Figure 1 is the flowchart of the intelligent prediction method of ship resistance provided by the embodiment of the present invention;

[0086] Figure 2 is the schematic diagram of the principle of the intelligent prediction method of ship resistance provided by the embodiment of the present invention;

[0087] Figure 3 is the schematic diagram of the multi-head attention mechanism provided by the embodiment of the present invention (k = 3). Detailed Embodiment

[0088] To make the above objects, features, and advantages of the present invention more obvious and understandable, the following will describe the detailed embodiments of the present invention in conjunction with the drawings. Many specific details are set forth in the following description to fully understand the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without departing from the connotation of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed below.

[0089] The innovation points of the intelligent prediction method and system of ship resistance provided by the embodiment of the present invention are as follows:

[0090] 1. Deep integration of multi-level graph structure modeling and physical constraints

[0091] Traditional ship resistance prediction methods (such as CFD) rely on discretized grids and numerical iterations, with high computational complexity and difficulty in capturing multi-physical field coupling effects. The present invention proposes a multi-scale modeling method based on a graph structure:

[0092] Node definition: Model the hull geometric features (curvature, cross-sectional area), hydrodynamic parameters (flow velocity, pressure gradient), and working conditions (speed, trim angle) as independent nodes respectively to form a multi-dimensional feature space.

[0093] Edge attribute physical quantification: Through the finite volume method after discretizing the Navier-Stokes equation, directly calculate the attributes of the edges of physical actions.

[0094] Mechanism-driven modeling: In traditional graph networks (such as GAT), edge attributes mostly rely on Euclidean distance or simple associations. In this method, edge attributes are directly constrained by physical equations, enabling the graph structure to naturally reflect the laws of fluid mechanics and significantly improving the interpretability of the model.

[0095] 2. Scene adaptability of the dynamic weight multi-head attention mechanism

[0096] Traditional GAT uses static weight allocation and cannot adapt to complex physical scenarios in ship resistance prediction (such as sudden changes in bow curvature and changes in ship speed). The innovation of this invention lies in:

[0097] Dynamic weight generation sub-network: Input node features and edge attributes are jointly encoded into a feature vector through a multi-layer perceptron (MLP) and the weights of the attention heads are generated.

[0098] Scene-adaptive attention aggregation: Taking the sudden change in bow curvature as an example, the weights of the focusing heads automatically increase, strengthening the influence of local geometric features on resistance; when the ship speed changes, the weights of the flow field heads increase, emphasizing the correlation between working conditions and the flow field. The establishment of this mechanism enables the model to automatically allocate computing resources in complex scenarios, reducing the prediction error compared to traditional GATs.

[0099] 3. Design and optimization of the physical constraint loss function

[0100] Traditional data-driven models (such as CNN, LSTM) are prone to failure under extreme working conditions due to the lack of physical law constraints. This invention proposes a dual-driven loss function:

[0101] Data loss: The cross-entropy loss measures the difference between the predicted value and the measured value: The cross-entropy loss measures the difference between the predicted value and the measured value.

[0102] Physical loss: Constraining the output through the integral form of the Navier-Stokes equation to ensure that the prediction conforms to the laws of fluid mechanics.

[0103] Dynamic weight adjustment: The hyperparameter λ balances the data and physical losses. When data is scarce (such as for new ship types), increase λ to strengthen physical constraints; when data is sufficient, decrease λ to focus on fitting accuracy.

[0104] 4. Improvement of the efficiency and stability of the combined optimization strategy

[0105] Traditional optimizers (such as the Adam optimizer or SGD optimizer) are difficult to balance the convergence speed and accuracy in complex tasks. This invention proposes a dynamic hybrid optimization strategy:

[0106] Stagewise combination: Adam is used for fast convergence at the initial stage of training. When the model training approaches the optimal solution, it is switched to the SGD optimizer; in the later stage, it is switched to the SGD optimizer for fine-tuning of parameters.

[0107] Important parameter combination: For the key parameters that have a greater impact on the ship resistance prediction result and have clear physical meanings, including the node weights corresponding to the parameters closely related to the ship geometry, the SGD optimizer is used for updating; for some of the weights related to the hydrodynamic parameter nodes and operating condition parameter nodes, the Adam optimizer is used;

[0108] Dynamic weight combination: During the training process, the weights of the Adam optimizer and the SGD optimizer in parameter update are dynamically adjusted according to the training effect of the model, and a weight coefficient ;

[0109] The role of this model is to balance the fast convergence of the Adam optimizer and the stability of the SGD optimizer. At the initial stage of training: mainly use the Adam optimizer to quickly approach the optimal solution. In the later stage of training: enhance the fine-tuning ability of the SGD optimizer to avoid the oscillation caused by the adaptive learning rate of Adam. The expression is:

[0110] ;

[0111] In the formula, is the model parameter of the node weight and edge attribute at the th iteration, is the global learning rate, which controls the step size of parameter update; is the dynamic weight coefficient, which controls the mixing ratio of the Adam optimizer and the SGD optimizer; is the momentum term of the Adam optimizer, which combines the first-order moment estimation of the historical gradient; is the current batch gradient of the SGD optimizer, which directly calculates the derivative of the loss function with respect to the parameter;

[0112] Dynamic mixing mechanism:

[0113] Automatically adjust according to the training progress of loss change and gradient magnitude;

[0114] ;

[0115] In the formula, is the attenuation rate, which decreases with the increase of the iteration number , gradually decreases, and the proportion of the SGD optimizer increases;

[0116] Sub-parameter optimization: Force the use of the SGD optimizer for geometric-related parameters (such as ship form coefficients) to avoid the adaptive noise of the Adam optimizer; use the Adam optimizer for fluid parameters to automatically adapt to complex relationships.

[0117] Key parameters (such as ship form parameters): Force the use of the SGD optimizer for updates to avoid the noise introduced by the adaptive mechanism of the Adam optimizer.

[0118] General parameters (such as fluid parameters): Use the Adam optimizer to automatically adapt to complex relationships.

[0119] Experimental advantages:

[0120] In the ship resistance prediction task, this strategy reduces the error by 15% and improves the convergence speed by 30% compared to a single optimizer.

[0121] Example 1, as Figure 1 shown, the intelligent ship resistance prediction method provided by the embodiment of the present invention includes the following steps:

[0122] S1, construct nodes and edges in the graph attention network, and preprocess the original data;

[0123] When constructing the graph attention network, the nodes are divided into hull geometric feature nodes, hydrodynamic parameter nodes, and operating condition parameter nodes; input the constructed graph structure data into the graph attention network, and set the input parameters of the ship form for which the resistance needs to be predicted as and the input parameters of other similar ship forms are respectively , is the node feature vector, is the number of nodes (the graph structure of the input ship form includes the ship form to be predicted itself), is the node feature dimension, which is used as the initial input and is expressed as:

[0124] ;

[0125] The edges are divided into geometric association edges, physical action edges, and operating condition influence edges; the geometric association edges are used to connect the hull part nodes with geometric adjacent relationships, and the attributes of the edges represent the distance and angle changes between the two parts to reflect the continuity and relevance of the overall hull geometric shape; the physical action edges represent the edges established between the hydrodynamic parameter nodes and the hull geometric feature nodes to transmit the interaction information between the fluid and the hull; the attributes of the edges are set as physical quantities describing the action intensity, including the pressure gradient affecting the frictional resistance and the viscous pressure resistance affected by the flow field characteristics; the operating condition influence edges are used to connect the operating condition parameter nodes, and the attributes of the edges represent the influence degree of the operating condition on the parameters; the original data comes from ship tank tests and CFD numerical simulations, and is data that has been normalized and denoised.

[0126] The nodes include the main dimensions ratio and form coefficients of the ship. The bow and stern are discretized into nodes, and each node contains the geometric parameters of that part. The geometric parameters include curvature, cross-sectional area, and length-width ratio. In the nodes of hydrodynamic parameters, the flow velocity, pressure, density, and viscosity coefficient are set to represent the fluid parameters around the ship. The operating conditions of the ship's navigation are taken as nodes, and the operating conditions include the speed, draft, and trim angle.

[0127] S2. Design and improve the loss function based on physical constraints and node and edge features;

[0128] The loss function based on physical constraints and node and edge features consists of two parts:

[0129] The first part is the cross-entropy loss function between the estimated value and the actual value of the resistance, which is used to ensure the accurate estimation of the resistance value by the model;

[0130] The second part is the loss function term for predicting the viscous resistance of the ship based on the Navier-Stokes equation, which is used to ensure that the model prediction results conform to the physical laws of ship resistance prediction.

[0131] To calculate the features of the edges between nodes in the graph attention network, the relevance function needs to consider the influence of two nodes simultaneously, as shown in the following formula:

[0132] ;

[0133] In the formula, is a dimensional learnable parameter matrix. Therefore, is to map the dimensional vector to the dimensional space. The calculation dimension of is . For the features of all vertices, mapping is required, so the calculation dimension is . Among them, is to map the dimensional vector to a real number, and its calculation dimension . When calculating the attention coefficient, each edge in the graph needs to be calculated, so its calculation dimension is . That is, when outputting the ship form resistance, the influence of its neighboring nodes will be considered.

[0134] ;

[0135] The above formula is to splice the node with and then map it to a scalar. At this time, , indicating asymmetry at this time. In addition to splicing, neighbor information needs to be aggregated, so the attention of all neighbors of each node needs to be normalized. The attention coefficient obtained after normalization can be used as the true aggregation coefficient.

[0136] Calculate its weight through the dynamic weight multi-head attention mechanism.

[0137] Head 1 (geometric focus) weight Increase, strengthening the influence of geometric correlation edges when calculating attention;

[0138] ;

[0139] In the formula, is the attention weight of node to neighbor node ; is a learnable attention parameter vector for weight allocation of geometric features; is a learnable weight matrix for projecting node features into the feature space of the set focus head; is the vector splicing operation, splicing the projected features of node and ; is the activation function, introducing non-linearity and alleviating the problem of gradient disappearance; is the transpose operation to adjust the vector direction to ensure the dimensional consistency of mathematical operations. Through transpose and dot product, the model automatically learns the influence weight of geometric features on ship resistance; is a learnable weight matrix, is the geometric parameter of node , is the geometric parameter of node j;

[0140] Head 2 (flow field focus) weight Decrease, and finally the node features are updated to the weighted aggregation of each head;

[0141] ;

[0142] In the formula, is the combined parameter of node after update, is the activation function to enhance the non-linear expression ability of the model; is the weight matrix of the th attention head for feature transformation; is the attention weight of node to neighbor node for the kth attention head;

[0143] Multi-head attention, with multiple heads working in parallel, can capture richer and more diverse feature relationships as each head can focus on different aspects of information. According to Figure 3 shown, its value is taken as 3. For example, in resistance prediction, different heads can separately focus on different dimensional information such as the main dimension ratios and various ship type parameters of different ship types, enabling the model to have a more comprehensive understanding of the graph structure and the relationships between nodes.

[0144] Design and improve the loss function based on physical constraints and node and edge features, including:

[0145] The physical loss constrains the model output through the integral form of the Navier-Stokes equation, and the expression is:

[0146] ;

[0147] In the formula, is the physical constraint term in the loss function, is the square of the difference between two scalar values, that is, the squared error, is the theoretical resistance value calculated based on the Navier-Stokes equation, obtained by integrating the pressure gradient on the hull surface; is the resistance value predicted by the model; is the total number of samples, is the th item of the sample, is a positive integer representing the numbers from 1 to ;

[0148] ;

[0149] In the formula, is the resistance value calculated by the theoretical formula, is the area of the outer surface of the ship, is the hydrodynamic viscosity, is the velocity field, is the pressure field, is the normal vector of the hull surface;

[0150] The data loss is used to measure the difference between the resistance value predicted by the model and the actual measured value, and the expression is:

[0151] ;

[0152] In the formula, is the data loss term in the loss function, is the actual resistance value of the th sample, from ship tank experiments or CFD simulations; is the Resistance value of each sample;

[0153] The loss function based on physical constraints and node and edge features is expressed as:

[0154] ;

[0155] Where, is the total loss function; is a hyperparameter used to balance the weight of data loss and physical loss.

[0156] S3, establishes a dynamic weighted multi-head attention mechanism to automatically assign attention weights to different ship type features;

[0157] Establish a dynamic weighted multi-head attention mechanism, including:

[0158] (1) Dynamic weight generation module: Based on the GAT attention head, a weight generation subnetwork is added. The input is node features and edge attributes, and the output is the dynamic weight coefficient of each attention head, which includes:

[0159] Feature encoding: node features and edge attributes Perform joint coding, the expression is:

[0160] ;

[0161] Where, For nodes The jointly encoded feature vector of It is a multi-layer perceptron used for nonlinear feature mapping; For nodes The original characteristics of geometric parameters and fluid dynamic parameters, For the edge The distance of the geometrically associated edge and the pressure gradient property of the physically acting edge, For nodes The set of neighbor nodes of It is a vector concatenation operation that concatenates node features and edge attributes into a whole input; is the expression of the j-th node;

[0162] Weight calculation: The weights of K attention heads are generated by Softmax, and the expression is:

[0163] ;

[0164] Where, For the The dynamic weight coefficient of each attention head is used to add the output of different heads; is a learnable parameter vector representing the The first head focuses on the physical dimensions of geometry, fluid, and working conditions; is the total number of attention heads; is the exponential function used for Softmax normalized weight assignment; is the node after the joint encoding of the feature vector;

[0165] (2) Scene - adaptive attention aggregation; In the region of sudden change in bow curvature dominated by local geometry, the attention aggregation specifically includes:

[0166] Geometry focusing: The weight increases, and when calculating attention, it strengthens the influence of geometric correlation edges;

[0167] ;

[0168] In the formula, is the attention weight of node to its neighbor node ; is the learnable attention parameter vector for weight assignment of geometric features; [[ID=۳۳]] is the learnable weight matrix for projecting node features into the feature space of the set - focusing head; is the vector concatenation operation that concatenates the projected features of node and ; is the activation function that introduces non - linearity and alleviates the vanishing gradient problem; is the transpose operation to adjust the vector direction to ensure the dimensional consistency of mathematical operations. Through transpose and dot - product, the model automatically learns the influence weight of geometric features on ship resistance; is the learnable weight matrix, is the geometric parameter of node , is the geometric parameter of node j;

[0169] Flow - field focusing: The weight decreases, and finally the node features are updated to the weighted aggregation of each head;

[0170] ;

[0171] In the formula, is the combined parameter after the update of node , is the activation function to enhance the non - linear expression ability of the model; is the weight matrix of the th attention head for feature transformation; is the node to its neighbor node The attention weights of the k-th attention head;

[0172] (3) Physics-constrained weight optimization; adding a physical regularization term for the attention weights in the loss function to ensure that the weight distribution conforms to the laws of hydrodynamics;

[0173] ;

[0174] In the formula, is the physical constraint loss term, forcing the attention weights to conform to the laws of hydrodynamics, is a hyperparameter used to control the strength of the physical constraint term; is the ideal weight calculated through the equation.

[0175] S4. Apply the training strategy of the combined Adam and SGD optimizers to obtain the graph attention network model;

[0176] Phased combination: Apply the Adam optimizer at the initial stage of training. When the model training approaches the optimal solution, switch to the SGD optimizer;

[0177] Important parameter combination: For the node weights corresponding to the parameters closely related to the ship geometry, use the SGD optimizer to update; for some of the weights related to the hydrodynamic parameter nodes and operating condition parameter nodes, use the Adam optimizer;

[0178] Dynamic weight combination: During the training process, dynamically adjust the weights of the Adam optimizer and the SGD optimizer in parameter updates, introducing the weight coefficient ;

[0179] Balance the fast convergence of the Adam optimizer and the stability of the SGD optimizer. The expression is:

[0180] ;

[0181] In the formula, is the model parameter of the node weights and edge attributes at the -th iteration; is the model parameter of the node weights and edge attributes at the -th iteration; is the global learning rate, controlling the step size of parameter updates; is the dynamic weight coefficient, controlling the mixing ratio of the Adam optimizer and the SGD optimizer; is the momentum term of the Adam optimizer, combining the first-order moment estimate of the historical gradient; is the current batch gradient of the SGD optimizer, directly calculating the derivative of the loss function with respect to the parameters.

[0182] S5. Conduct ship resistance prediction and evaluation through a dynamic weight graph attention network model;

[0183] Use the trained dynamic weight graph attention network model to predict the data in the test set, and compare the model prediction results with the results obtained by computational fluid dynamics for verification. Use the trained graph attention network model to predict the test set data, focusing on its performance in terms of resistance prediction speed and accuracy. By comparing the model prediction results with the results obtained by computational fluid dynamics (CFD), verify the effectiveness and superiority of the model in constructing an intelligent ship resistance prediction. Based on the prediction and evaluation results, iteratively optimize the model, such as adjusting the network structure, optimizing the loss function, and selecting an optimization algorithm, etc., to further improve the prediction accuracy and generalization ability of the model. Finally, apply the optimized model to the prediction of the real ship's swaying motion to provide decision-making support for ship performance evaluation and navigation state prediction. The schematic diagram of the intelligent ship resistance prediction method provided by the embodiments of the present invention is as Figure 2 shown.

[0184] S6. Verification and continuous optimization of the model.

[0185] According to the prediction and evaluation results, iteratively optimize the model, including adjusting the network structure, optimizing the loss function, and selecting an optimization algorithm, and finally apply the optimized model to the prediction of the real ship's swaying motion.

[0186] Embodiment 2. The intelligent ship resistance prediction system provided by the embodiments of the present invention includes:

[0187] A graph attention network construction module for constructing nodes and edges in the graph attention network; among them, the nodes are divided into hull geometric feature nodes, hydrodynamic parameter nodes, and operating condition parameter nodes, and the edges are divided into geometric association edges, physical action edges, and operating condition influence edges;

[0188] A data preprocessing module for preprocessing the raw data from ship tank tests and CFD numerical simulations by normalizing and denoising;

[0189] A loss function construction module for designing and improving a loss function based on physical constraints and node and edge features, including a physical constraint loss based on the resistance prediction model and a prediction error loss based on data;

[0190] An attention weight automatic allocation module for establishing a dynamic weight multi-head attention mechanism to automatically allocate attention weights to different ship type features;

[0191] A combined training module for adopting a training strategy of an Adam and SGD combined optimizer in ship resistance prediction to obtain a dynamic weight graph attention network model;

[0192] The ship resistance prediction and evaluation module is used to predict the data in the test set through the dynamic weight graph attention network model and compare the prediction results with the results obtained by computational fluid dynamics;

[0193] The model verification and continuous optimization module is used to iteratively optimize the model according to the results of the prediction evaluation, and finally apply the optimized model to the prediction of the real ship's sway motion.

[0194] To further prove the positive effects of the above embodiments, the present invention conducts the following experiments based on the above technical solutions. The comparison between the present invention (GATs) and traditional neural networks is shown in Table 1.

[0195] Table 1 Comparison with traditional neural networks

[0196]

[0197] The comparison between the present invention and the loss functions of existing models is shown in Table 2. In the simulation experiments carried out on the model, the node features obtained after cleaning the original data are further optimized by constructing the relationship of the corresponding edges. After adjusting the hyperparameters, the combined optimization algorithm of the Adam optimizer and the SGD optimizer is adopted to ensure the stability and convergence of the model training. In the experiments on existing ship types such as KCS and KVLCC2 and relatively complex ship types, comparisons are made with traditional finite element models and other neural network models (PINN, LSTM, MLP, etc.) to verify the response accuracy and real-time performance of the present invention under complex ship types and different basic working conditions.

[0198] Table 2 Prediction accuracy test of four models in different ship types

[0199]

[0200] The comparison between the dynamic weight GATs of the present invention and traditional GATs is shown in Table 3.

[0201] Table 3 Comparison between traditional GAT and the model of the present invention

[0202]

[0203] 2. Experimental verification

[0204] (1) Scenario of abrupt change in bow curvature

[0205] Test ship type: bulbous bow container ship (the proportion of the abrupt change area is 15%).

[0206] Result comparison:

[0207] Dynamic weight GAT: Geometric head weight , accurately capturing the contribution of curvature to friction (prediction error 2.1%).

[0208] Traditional GAT: Equal distribution of the weights of each head , with an error of 8.7%.

[0209] (2) Scenario of speed change

[0210] Operating condition: The speed increases from 15 knots to 25 knots (significant change in Reynolds number).

[0211] Result comparison:

[0212] Dynamic-weight GAT: Weight of the flow field head

[0213] Traditional GAT: Due to the inability of the static weight to adapt to the change of the flow field, the error reaches 12.3%.

[0214] In summary, the intelligent ship resistance prediction method based on the dynamic-weight graph attention network and physical constraints proposed by the present invention not only theoretically proposes a new construction relationship of the graph attention network, but also provides an effective ship resistance prediction method in practical applications. By means of optimizing the model design, introducing physical constraints, and combining optimization strategies of the optimizer, etc., the present invention can accurately predict the complex ship type resistance and the prediction results with physical interpretability under different basic operating conditions, significantly improving the accuracy and reliability of ship resistance prediction.

[0215] The technical solution of the present invention has significant commercial value in the fields of ship design, manufacturing and operation; economic benefits: By optimizing the ship type design through high-precision resistance prediction, the ship design cycle can be shortened by about 40%, the CFD simulation cost can be reduced by 60%, and the annual fuel cost of a single ship can be saved by about 12% (corresponding to a CO2 emission reduction of 500 tons). Market competitiveness: Provide a rapid resistance optimization tool for shipyards to help seize the high-energy efficiency ship market. For example, in the design of ultra-large container ships (24,000 TEU), the method of the present invention can control the resistance error within 3%, which is better than the traditional CFD method (error > 5%). Environmental compliance: Meet the IMO (International Maritime Organization) carbon emission regulations, and optimize the navigation strategy through accurate resistance prediction to help shipping companies reduce carbon tax expenditures.

[0216] The present invention realizes the deep coupling of the graph neural network and the fluid mechanics mechanism for the first time: By directly constraining the edge attributes and attention weights through the Navier-Stokes equation, the problem of poor physical interpretability of traditional GATs in ship engineering is solved. Dynamic-weight multi-head attention mechanism: It breaks through the static weight limit of traditional GATs and realizes the automatic focusing on geometry, fluid, and operating conditions under complex ship types for the first time. Combined optimization strategy: A dynamic hybrid optimization method (Adam optimizer + SGD optimizer) with parameter grouping is proposed, and the convergence speed is increased by 30% and the error is reduced by 15% compared with the existing stage switching strategy.

[0217] The Disconnection between Data and Physical Models: In traditional methods, data-driven models (such as CNN and LSTM) lack physical constraints, while CFD relies on numerical simulations with large computational amounts. This technology realizes data-mechanism dual-driving for the first time through physical loss functions and the embedding of the NS equation, reducing the prediction error by 60% compared to pure data models.

[0218] Adaptive Modeling for Complex Ship Forms: Traditional neural networks need to redesign the network for different ship forms, while this technology automatically adapts through a dynamic weight mechanism (such as when the ship speed changes, the weight of the flow field head is increased to 72%), with the generalization ability improved by 50%.

[0219] Stability under Extreme Conditions: Under off-design conditions with a longitudinal inclination angle > 5°, the error of this technology is only 2.8%, while the error of traditional CFD reaches 4.5% due to grid distortion.

[0220] As mentioned above, the above are only the relatively optimal specific implementation manners of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention, any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention should all be covered within the protection scope of the present invention.

Claims

1. An intelligent prediction method for ship resistance, characterized in that The method includes the following steps: S1. Construct nodes and edges in the graph attention network, and preprocess the original data; S2. Design and improve the loss function based on physical constraints and node and edge features; S3. Establish a dynamic weight multi-head attention mechanism to automatically assign attention weights to different ship type features; S4. Apply the training strategy of the combined optimizer of Adam and SGD to obtain the graph attention network model; S5. Through the dynamic weight graph attention network model, conduct ship resistance prediction and evaluation; S6. Verification and continuous optimization of the model; In step S1, when constructing the graph attention network, the nodes are divided into hull geometric feature nodes, hydrodynamic parameter nodes, and operating condition parameter nodes; the constructed graph structure data is input into the graph attention network, the input parameter of the ship type to be predicted for resistance is set as h1, and the input parameters of other similar ship types are h2, h3... h n , h n is the node feature vector, n is the number of nodes, and the graph structure of the input ship type includes the ship type to be predicted itself; F is the node feature dimension and is used as the initial input, which is expressed as: h = {h1, h2, h3…h n}, h i ∈R F Edges are divided into geometric association edges, physical action edges, and working condition influence edges; Geometric association edges are used to connect hull part nodes with geometric adjacent relationships, and the attributes of the edges represent the distance and angle changes between two parts to reflect the continuity and relevance of the overall hull geometry; Physical action edges represent the edges established between hydrodynamic parameter nodes and hull geometric feature nodes, which are used to transmit the interaction information between the fluid and the hull; The attributes of the edges are set as physical quantities describing the action intensity, including the pressure gradient affecting frictional resistance and the viscous pressure resistance affected by the flow field characteristics; Working condition influence edges are used to connect working condition parameter nodes, and the attributes of the edges represent the influence degree of the working condition on the parameters; The original data comes from ship tank tests and CFD numerical simulations, and is data that has been normalized and denoised; In step S2, the loss function based on physical constraints and node and edge features includes two parts: The first part is the cross-entropy loss function between the estimated value and the actual value of the resistance, which is used to ensure the accurate estimation of the resistance value by the model; The second part is the loss function term for predicting the viscous resistance of the ship based on the Navier-Stokes equation, which is used to ensure that the model prediction results conform to the physical laws of ship resistance prediction; Designing and improving the loss function based on physical constraints and node and edge features includes: The physical loss constrains the model output through the integral form of the Navier-Stokes equation, and the expression is: In the formula, is the physical constraint term in the loss function, || || 2 is the square of the difference between two scalar values, R 理论,i is the theoretical drag value calculated based on the Navier-Stokes equation, R 预测,i is the drag value predicted by the model; N is the total number of samples, i is the i-th item of the sample, and k is a positive integer representing numbers from 1 to N; where R 理论 is the resistance value calculated by the theoretical formula, S is the area of the outer surface of the ship hull, μ is the hydrodynamic viscosity, u is the velocity field, p is the pressure field, and n is the normal vector of the ship hull surface; The data loss is used to measure the difference between the predicted resistance value of the model and the actual measured value, and the expression is: Wherein, is the data loss term in the loss function, and y i is the actual resistance value of the i-th sample, is the resistance value of the i-th sample predicted by the model; The loss function based on physical constraints and node and edge features, the expression is: Wherein, is the total loss function; λ is a hyperparameter.

2. The intelligent prediction method for ship resistance according to claim 1, wherein Hull geometric feature nodes include the main dimension ratio of the ship and the form coefficient. The bow and stern are discretized into nodes, and each node contains the geometric parameters of this part. The geometric parameters include curvature, cross-sectional area, and length-width ratio; In the hydrodynamic parameter nodes, the flow velocity, pressure, density, and viscosity coefficient are set to represent the fluid parameters around the ship.

3. The intelligent prediction method for ship resistance according to claim 1, wherein In step S3, establish a dynamic weight multi-head attention mechanism, including: (1) Dynamic weight generation module; Based on the attention heads of GAT, a weight generation sub-network is added. The input is node features and edge attributes, and the output is the dynamic weight coefficients of each attention head, specifically including: Feature Encoding: Jointly encode the node feature h i and the edge attribute e ij The expression is: where z i is the jointly encoded feature vector of node i, MLP() is the multi-layer perceptron, h i is the original feature of the geometric parameters and hydrodynamic parameters of node i, e ij is the distance of the geometric correlation edge and the pressure gradient attribute of the physical action edge of edge ij, and N(i) is the set of neighbor nodes of node i; is the vector concatenation operation, which concatenates the node feature and the edge attribute into a single overall input; j is the representation of the j-th node; Weight calculation: Generate the weights of K attention heads through Softmax, and the expression is: where ω k is the dynamic weight coefficient of the k-th attention head, θ k is the learnable parameter vector, K is the total number of attention heads; exp() is the exponential function, z i is the feature vector after the joint encoding of node i; (2) Scene-adaptive attention aggregation; In the area of sudden change in bow curvature dominated by local geometry, the attention aggregation includes: Geometric focusing: The weight ω1 increases, and the influence of geometric association edges is strengthened when calculating attention; wherein, is the attention weight of node i to neighbor node j; a1 is a learnable attention parameter vector, W1 is a learnable weight matrix, || is the vector concatenation operation, Leaky ReLU is an activation function, T is the transpose operation to adjust the vector direction, W is a learnable weight matrix, h i is the geometric parameter of node i, h j is the geometric parameter of node j; Flow field focusing: The weight ω2 is reduced, and the node features are updated to the weighted aggregation of each head; where h' i is the combined parameter after updating for node i, σ is the activation function, and W k is the weight matrix of the k-th attention head, is the attention weight of the k-th attention head of node i for neighbor node j; (3) Physics-constrained weight optimization; adding a physical regularization term for the attention weights in the loss function to ensure that the weight distribution conforms to the laws of hydrodynamics; In the formula, is the physical constraint loss term, which forces the attention weights to conform to the laws of hydrodynamics, and λ is a hyperparameter. is the ideal weight calculated by the NS equation.

4. The intelligent prediction method for ship resistance according to claim 1, wherein In step S4, the training strategy of applying a combined Adam and SGD optimizer includes: Phased combination: Apply the Adam optimizer at the initial stage of training. When the model is trained to the optimal solution, switch to the SGD optimizer; Important parameter combination: Use the SGD optimizer to update the node weights corresponding to the parameters closely related to the ship geometry; for some weights related to the hydrodynamic parameter nodes and operating condition parameter nodes, use the Adam optimizer; Dynamic weight combination: During the training process, dynamically adjust the weights of the Adam optimizer and the SGD optimizer in parameter update according to the training effect of the model, and introduce the weight coefficient λ, 0 ≤ λ ≤ 1; Balance the fast convergence of the Adam optimizer and the stability of the SGD optimizer. The expression is: where θ t+1 is the model parameter of the node weight and edge attribute at the (t + 1)-th iteration; θ t is the model parameter of the node weight and edge attribute at the t-th iteration; η is the global learning rate, controlling the step size of parameter update; α t is the dynamic weight coefficient, controlling the mixing ratio of the Adam optimizer and the SGD optimizer; is the momentum term of the Adam optimizer, combining the first-order moment estimate of the historical gradient; is the current batch gradient of the SGD optimizer, directly calculating the derivative of the loss function with respect to the parameter.

5. The intelligent prediction method for ship resistance according to claim 1, characterized in that, In step S5, use the trained dynamic weight graph attention network model to predict the data in the test set, and compare and verify the model prediction results with the results obtained by computational fluid dynamics.

6. The intelligent prediction method for ship resistance according to claim 1, wherein, In step S6, according to the results of the prediction evaluation, iteratively optimize the model, including adjusting the network structure, optimizing the loss function, and optimizing the algorithm selection. Finally, apply the optimized model to the prediction of the real ship's sway motion.

7. An intelligent ship resistance prediction system, characterized in that, This system is used to regulate the intelligent ship resistance prediction method described in any one of claims 1-6. This system includes: A graph attention network construction module for constructing nodes and edges in the graph attention network and preprocessing the original data; A data preprocessing module for designing and improving the loss function based on physical constraints and node and edge features; A loss function construction module for establishing a dynamic weight multi-head attention mechanism to automatically allocate attention weights to different ship type features; An attention weight automatic allocation module for establishing a dynamic weight multi-head attention mechanism to automatically allocate attention weights to different ship type features; A combined training module for applying the training strategy of a combined Adam and SGD optimizer to obtain a graph attention network model; A ship resistance prediction evaluation module for performing ship resistance prediction evaluation through a dynamic weight graph attention network model; A model verification and continuous optimization module for model verification and continuous optimization.

Citation Information

Patent Citations

  • Sonar image classification method combining SLIC superpixel and graph attention network

    CN116468995A

  • Method and device for constructing multi-task graph network model framework for predicting plastic behavior of polycrystalline material

    CN118194705A