Method and system for boundary parameter inversion and correction of digital virtual test environment of ship

By constructing a time-frequency orthogonal dual-flow network and dynamic equilibrium residual equations, and combining a heterogeneous auxiliary model for sea state parameter inversion and environmental boundary correction, the problems of dependence on external wave measurement hardware and difficulty in high-order nonlinear dynamic characterization in ship digital virtual experiments are solved. High-precision environmental boundary inversion and closed-loop correction are achieved, improving the simulation accuracy and robustness of virtual experiments.

CN123139873APending Publication Date: 2026-11-20JIANGNAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611655452.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-26
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

Existing technologies for digital virtual ship testing suffer from several problems, including high dependence on external wave measurement hardware, difficulty in characterizing high-order nonlinear dynamics under large wave heights, overfitting during fine-tuning across fluid domains, and deviations between virtual and real environments due to statically preset boundaries of the virtual test environment.

Method used

The motion response history is obtained by using a ship potential flow model and a numerical pool model. A time-frequency orthogonal dual-flow network and a multi-task prediction head are constructed. Combined with the dynamic equilibrium residual equation and heterogeneous auxiliary model, sea state parameters are inverted and environmental boundary is corrected. High-precision environmental boundary inversion and closed-loop correction are achieved through spatiotemporal physical alignment and physical regularization adjustment.

Benefits of technology

It achieves the integration of high-order nonlinear dynamic feature extraction and rigid body dynamic mechanism constraints, reduces the dependence on dedicated wave measurement hardware, improves the inversion robustness and decision credibility under complex sea conditions, reduces the risk of CFD overfitting with small samples, and improves the simulation accuracy and measured response consistency of virtual experiments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123139873A_ABST
    Figure CN123139873A_ABST
Patent Text Reader

Abstract

The present application relates to a kind of ship digital virtual test environment boundary parameter inversion and correction method and system, belong to ship digital virtual test and ocean engineering simulation technical field.The method is respectively based on potential flow model and viscous flow CFD model to generate source domain and target domain motion response time history, according to sea state triplet standardization division;Constitute time-frequency double-flow network and multi-task prediction head, fusion time-frequency characteristics, speed, ship type prior, simultaneously output wave height, period and wave direction prediction;Based on motion response difference, construct the dynamic equilibrium residual equation with mask, complete pre-training by adaptive balancing two kinds of losses;Align space-time physical quantities based on Fourier's law similarity criterion, freeze main trunk fine-tune prediction head to complete few-sample cross-fluid domain migration;Quantify uncertainty by random forward inference and jointly verify auxiliary model, generate three-level confidence decision;With residual correction network closed-loop correction environment boundary.The present application improves the precision of few-sample cross-fluid domain sea state inversion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of digital virtual testing and marine engineering simulation technology for ships, and in particular to a method and system for inverting and correcting boundary parameters of digital virtual testing environments for ships. Background Technology

[0002] Digital virtual ship simulations reproduce the motion and response characteristics of a ship in a wave environment through numerical simulation. The external wave dynamics environment serves as the key boundary condition driving the solution of the response in the virtual experiment, and the accuracy of its parameters directly determines the fidelity of the simulation results. Therefore, constructing a high-precision method for inverting the boundary parameters of the dynamic environment is a core prerequisite for ensuring the fidelity of the virtual experiment simulation.

[0003] Currently, obtaining the dynamic environment boundary mainly relies on external wave measurement hardware (such as wave-measuring buoys and radar wave-measuring devices) to measure sea state parameters. This type of hardware is costly to deploy and maintain, and the measurement points are located outside the hull, making it difficult to obtain the true dynamic boundary of the hull in situ. This results in spatial and temporal deviations between the obtained sea state parameters and the actual wave environment encountered by the hull. Furthermore, the preset environmental boundaries in virtual experiments are mostly static parameters, lacking a mechanism for adaptive updates based on measured responses. When the actual sea state deviates from the preset conditions, a discrepancy easily arises between the simulation results and the actual measured response of the hull.

[0004] Inverting sea state based on ship motion response and using the inversion results to correct simulation boundaries is an important way to reduce dependence on external wave measurement hardware and improve boundary realism. However, existing inversion techniques have the following limitations: First, traditional frequency domain inversion methods are based on the assumption of linear wave superposition, which makes it difficult to characterize the high-order nonlinear characteristics of large waves. Furthermore, there is ambiguity in the identification of navigation conditions such as following the waves and facing the waves, and the inversion results are difficult to cover complex sea conditions.

[0005] Secondly, conventional deep learning inversion models fit the mapping relationship between ship motion response and sea state parameters in a data-driven manner, lacking constraints from ship dynamics mechanisms and uncertainty assessment. This makes them prone to non-physical prediction drift under operating conditions outside the coverage of training samples.

[0006] Third, when migrating the potential flow theory model to the high-fidelity viscous flow computational fluid dynamics (CFD) model, there is a domain bias. Under the condition of scarce measured samples, fine-tuning with a small number of samples is prone to overfitting, resulting in insufficient cross-domain generalization ability.

[0007] Fourth, existing inversion processes are mostly one-way open-loop structures, and the inversion results, after being used for boundary correction, lack a deduction verification and dynamic closed-loop correction mechanism for virtual experiments. Summary of the Invention

[0008] Therefore, the technical problem to be solved by the present invention is to overcome the problems in the prior art, such as high dependence on external wave measurement hardware, difficulty in characterizing high-order nonlinear dynamics of large wave height, easy overfitting of cross-fluid domain fine-tuning, and easy virtual-real deviation caused by static preset of virtual test environment boundary.

[0009] Firstly, to address the aforementioned technical problems, this invention provides a method for inverting and correcting boundary parameters of a ship's digital virtual test environment, comprising: S1. Based on the ship potential flow model and numerical pool model, obtain the motion response time history; based on speed, wave height and period, group and segment the motion response time history to obtain a training set; preprocess the training set to obtain the standardized speed prior. S2. Construct a sea state inversion network model; wherein, the sea state inversion network model includes a time-frequency orthogonal dual-stream network and a multi-task prediction head; the time-frequency orthogonal dual-stream network is used to extract time-domain feature vectors and spectral feature vectors from the motion response time history; the time-domain feature vectors, the spectral feature vectors, the standardized speed priors and the ship type feature vectors are spliced ​​and fused and then input into the multi-task prediction head to obtain wave height prediction, period prediction and relative wave direction probability prediction; S3. Construct a dynamic equilibrium residual equation based on the motion response difference in the motion response time history; construct a normalized physical mechanism constraint loss based on the dynamic equilibrium residual equation; and pre-train the sea state inversion network model using the normalized physical mechanism constraint loss and the multi-task data total loss. S4. Perform spatiotemporal physical alignment on the viscous flow CFD data, freeze the pre-trained time-frequency orthogonal dual-stream network, and adjust the multi-task prediction head by combining slice enhancement and physical regularization terms. S5. Construct a heterogeneous auxiliary model; quantify the comprehensive prediction uncertainty through stochastic forward inference, and perform consistency cross-validation between the heterogeneous auxiliary model and the adjusted sea state inversion network model to obtain a three-level confidence decision; use the three-level confidence decision to determine the state of the sea state parameters. S6. Using the sea state parameters determined to be in the receiving state as the initial environmental boundary, the corresponding second ship response is derived; the response mismatch features between the measured first ship response and the second ship response are extracted, and the response mismatch features and the initial environmental boundary are input into the residual correction network to obtain the constrained environmental boundary correction amount to update the dynamic environmental boundary, and closed-loop simulation is performed based on the updated dynamic environmental boundary.

[0010] In one embodiment of the present invention, the step of calculating the motion response time history based on the ship potential flow model and the numerical water tank model in S1 is as follows: The motion response time history includes the source domain motion response time history and the target domain motion response time history; the frequency domain transfer function of the ship under different speeds, wave heights, periods and wave directions is calculated based on the three-dimensional potential flow theory to obtain the five-degree-of-freedom inviscid motion time history; the five-degree-of-freedom inviscid motion time history is used as the source domain motion response time history; Based on the unsteady Reynolds-averaged Navier-Stokes equations and the fluid volume method, the viscous fluid-structure interaction motion response under real waves is solved, and the heave and pitch motion times are extracted as the motion response times of the target domain.

[0011] In one embodiment of the present invention, the time-frequency orthogonal dual-stream network includes a time-domain branch and a frequency-domain branch; the time-domain branch extracts the time-domain feature vector through one-dimensional quadratic convolution and a multi-head self-attention module; the frequency-domain branch extracts the spectral feature vector through real Fourier transform.

[0012] In one embodiment of the present invention, the step of extracting the temporal feature vector through one-dimensional quadratic convolution and multi-head self-attention module in the temporal branch is as follows: A second-order nonlinear relationship is established on the motion response time history using a quadratic convolution operator to obtain the first time-domain feature; wherein the expression of the second-order nonlinear relationship is: ; in, Indicates the first time-domain feature, Represents one-dimensional convolution. Indicates input features, This represents the scaling factor for the quadratic term. Indicates bias. This represents element-wise multiplication; The first temporal features are subjected to batch normalization, GELU activation function and max pooling to obtain deep temporal features; The deep temporal features are divided into serialized local vector blocks by stride convolution and superimposed with sine and cosine absolute position encoding matrices to obtain a first vector. The first vector is input into a stacked multi-head self-attention module, and after scaling dot product attention to calculate global causal relationships, a global temporal feature vector is output by average pooling.

[0013] In one embodiment of the present invention, the step of extracting the spectral feature vector by the frequency domain branch through real Fourier transform is as follows: An orthogonal normalized real-number fast Fourier transform is performed on each channel of the motion response time history to obtain the motion response amplitude spectrum; after filtering out the DC component, the motion response amplitude spectrum is dynamically compressed logarithmically to obtain the spectral feature matrix; wherein, the expression of the spectral feature matrix is: ; in, Represents the spectral characteristic matrix, Represents the amplitude spectrum of the motion response; The spectral feature matrix is ​​input into a lightweight one-dimensional convolutional layer and an adaptive global pooling layer to extract the encountered spectral energy and spectral peak features, thus obtaining a spectral feature vector.

[0014] In one embodiment of the present invention, the step of concatenating and fusing the time-domain feature vector, the spectral feature vector, the standardized speed prior, and the ship type feature vector in step S2, and then inputting them into the multi-task prediction head to obtain wave height prediction, period prediction, and relative wave direction probability prediction is as follows: The multi-task prediction head performs channel splicing and full-connection fusion of the time-domain feature vector, the spectral feature vector, the standardized speed prior, and the ship type feature vector, and decouples them to access the parallel prediction head; the parallel prediction head includes a wave height regression head, a periodic regression head, and a wave direction classification head. The wave height regression head and the periodic regression head output the mean and logarithmic variance, respectively, and the wave direction classification head outputs the posterior probability distribution of a preset number of discrete wave direction categories. The wave height regression head and the period regression head are trained using heteroscedastic Gaussian negative log-likelihood loss, and the wave direction classification head is trained using cross-entropy loss, thus constructing a multi-task data total loss; wherein, the mathematical expression of the multi-task data total loss is: ; ; in, This represents the total data loss across multiple tasks. This represents the heteroscedastic Gaussian negative log-likelihood loss function. Indicates the true label, Indicates the wave cycle. This represents the predicted mean. This represents the predicted log-variance. Indicates the actual wave height. This represents the logarithmic variance of wave height prediction. This represents the logarithmic variance of the periodic forecast; , This represents the cross-entropy loss function for multi-class classification. This represents the wave direction classification prediction score vector. Indicates the actual category label of the wave; , , This represents the multi-task loss balance coefficient.

[0015] In one embodiment of the present invention, step S6, which uses the sea state parameters determined to be in the receiving state as the initial environmental boundary, includes the following steps in the process of deducing the corresponding second ship response: pre-constructing a response feature library containing environmental boundary, speed, ship type or loading state and corresponding response features; performing periodic parameter circular encoding and continuous parameter standardization on the initial environmental boundary; retrieving multiple nearest neighbors in the data subset with the same operating state; and using an inverse distance weighting method based on parameter distance to generate proxy features of the second ship response.

[0016] In one embodiment of the present invention, the residual correction network uses a shared response encoder to encode a first ship response feature and a second ship response feature respectively. The encoding difference between the first ship response feature and the second ship response feature, the absolute value of the encoding difference, the initial environmental boundary, and the nearest neighbor distance confidence are concatenated to obtain an environmental boundary correction amount. The environmental boundary correction amount is superimposed on the initial environmental boundary after being subject to maximum amplitude limitation and physical range projection. When the query point exceeds the coverage of the response feature library or the nearest neighbor distance exceeds a preset threshold, the environmental boundary correction amount is set to zero.

[0017] In one embodiment of the present invention, step S5, which involves obtaining a three-level confidence decision, is as follows: Monte Carlo Dropout is enabled for multiple forward samplings to calculate the cognitive uncertainty of wave height and period. This cognitive uncertainty is then combined with the variance of random observations to obtain the total standard deviation and the corresponding confidence interval. The expression for the confidence interval is: ; in, Indicates the confidence interval. This represents the predicted mean. This represents the quantile coefficient of the distribution at the corresponding confidence level. Indicates the total standard deviation; The heterogeneous auxiliary model is constructed based on multi-dimensional channel time-frequency statistics and causal dilated convolution; a three-level confidence decision of receiving, warning or blocking is obtained according to the continuous parameter difference between the two models, wave direction consistency and the inclusion relationship of the confidence interval; wherein, the two models include the heterogeneous auxiliary model and the sea state inversion network model.

[0018] In one embodiment of the present invention, step S3, the pre-training process of the sea state inversion network model includes: The motion response time history is solved by central difference to obtain the velocity sequence and acceleration sequence; Based on the velocity sequence and the acceleration sequence, dynamic equilibrium residual equations containing inertial force, damping force, linear stiffness and second-order nonlinear restoring force are constructed for each degree of freedom of motion. Based on the aforementioned dynamic equilibrium residual equation, and by introducing an explicit binary channel mask, a normalized physical mechanism constraint loss is constructed; wherein, the expression for the normalized physical mechanism constraint loss is: ; in, This represents the normalized physical mechanism constraint loss. Indicates the duration of the time-series sampling. This represents the upper limit of the time summation. Represents the dynamic residual. Indicates the first The normalization scaling factor for the dimensions of degrees of freedom. This represents an explicit binary channel mask.

[0019] In one embodiment of the present invention, the pre-training process of the sea state inversion network model further includes using particle swarm optimization to adaptively schedule the weights between data loss and physical mechanism loss in the outer training loop. The scheduling uses a comprehensive index of validation set inversion error and dynamic residual as a fitness function to periodically update the weights of data loss and physical mechanism loss.

[0020] Secondly, to solve the above-mentioned technical problems, the present invention provides a system for inverting and correcting boundary parameters of a ship's digital virtual test environment, used to implement the above-mentioned method for inverting and correcting boundary parameters of a ship's digital virtual test environment, comprising: The data generation module is used to obtain the motion response time history based on the ship potential flow model and the numerical pool model; to group and segment the motion response time history based on speed, wave height and period to obtain a training set; and to preprocess the training set to obtain a standardized speed prior. A network construction module is used to construct a sea state inversion network model. The sea state inversion network model includes a time-frequency orthogonal dual-stream network and a multi-task prediction head. The time-frequency orthogonal dual-stream network is used to extract time-domain feature vectors and spectral feature vectors from the motion response time history. The time-domain feature vectors, spectral feature vectors, standardized speed priors, and ship type feature vectors are concatenated and fused, then input into the multi-task prediction head to obtain wave height prediction, period prediction, and relative wave direction probability prediction. The physical constraint pre-training module is used to construct a dynamic equilibrium residual equation based on the motion response difference of the motion response time history; construct a normalized physical mechanism constraint loss based on the dynamic equilibrium residual equation; and pre-train the sea state inversion network model using the normalized physical mechanism constraint loss and the multi-task data total loss. The adjustment module is used to perform spatiotemporal physical alignment on viscous flow CFD data, freeze the pre-trained time-frequency orthogonal dual-stream network, and adjust the multi-task prediction head in combination with slice enhancement and physical regularization terms. The credible inversion module is used to construct a heterogeneous auxiliary model; stochastic forward inference quantifies the comprehensive prediction uncertainty, and performs consistency cross-verification with the heterogeneous auxiliary model and the adjusted sea state inversion network model to obtain a three-level confidence decision; the three-level confidence decision is used to determine the state of the sea state parameters. The closed-loop correction module is used to take the sea state parameters determined to be in the receiving state as the initial environmental boundary, deduce the corresponding second ship response, extract the response mismatch features between the measured first ship response and the second ship response, input the response mismatch features and the initial environmental boundary into the residual correction network, obtain the constrained environmental boundary correction amount to update the dynamic environmental boundary, and perform closed-loop simulation based on the updated dynamic environmental boundary.

[0021] Compared with the prior art, the above-described technical solution of the present invention has the following advantages: (1) The method and system for inverting and correcting boundary parameters of a ship's digital virtual test environment described in this invention can realize the fusion of high-order nonlinear dynamic feature extraction and rigid body dynamic mechanism constraints, and construct an environmental boundary input benchmark that conforms to the real physical dynamic characteristics for ship digital virtual tests. By introducing a one-dimensional quadratic convolution operator in the time domain branch and cascading a multi-head self-attention mechanism, explicitly modeling the second-order product interaction terms between motion responses, and capturing cross-period global causal dependencies, it is beneficial to improve the problem that traditional methods are difficult to directly fit the ship's second-order nonlinear drift force and still water restoring stiffness, and to alleviate the ambiguity in the identification of wave-following and wave-facing directions. At the same time, a five-degree-of-freedom dynamic equilibrium residual equation containing inertial force, damping force and restoring force terms is constructed, and an explicit channel mask is introduced to be compatible with missing degrees of freedom. The particle swarm optimization algorithm is used to adaptively coordinate the weights between data loss and physical mechanism loss in the training outer loop, which is beneficial to suppress gradient conflicts in multi-task training and improve the defects of existing pure data-driven models that lack physical mechanism support and are prone to non-physical drift.

[0022] (2) This invention combines robust adaptation across fluid domains with a small number of samples, high-reliability self-verification, and virtual experiment closed-loop correction capabilities. Based on the Froude similarity criterion, a spatiotemporal scale mapping relationship is established. Combined with network backbone freezing, time-history slice rearrangement enhancement, and physical residual regularization constraints, only a small number of high-fidelity viscous flow CFD data are needed to reduce the risk of overfitting during fine-tuning, which is beneficial to reducing the computational cost and sample acquisition difficulty of cross-fluid domain migration. By combining the comprehensive prediction uncertainty obtained from Monte Carlo Dropout sampling with the cross-validation results of independent heterogeneous auxiliary models, a three-level confidence decision is constructed, covering continuous parameter differences, wave direction consistency, and confidence interval inclusion relationships. When the motion response signal is interfered with by composite noise or encounters unknown extreme conditions, it can actively block abnormal inversion output, which is beneficial to improving the engineering robustness and decision credibility of in-situ inversion in complex sea states. Furthermore, extracting the response mismatch characteristics between the measured ship response and the simulated ship response and inputting them into the residual correction network, outputting the constrained environmental boundary correction amount to update the dynamic environment boundary and perform closed-loop simulation, is beneficial to improving the consistency between the inverted sea state parameters and the measured response. Attached Figure Description

[0023] To make the content of this invention easier to understand, the invention will be further described in detail below with reference to specific embodiments and accompanying drawings.

[0024] Figure 1 This is a flowchart of a method for inverting and correcting boundary parameters of a ship's digital virtual test environment, as described in a preferred embodiment of the present invention. Figure 2 This is a schematic diagram of the surface mesh of the KVLCC2 hull in a preferred embodiment of the present invention; Figure 3 This is a time-history curve of the five-degree-of-freedom motion response of the source domain potential flow in a preferred embodiment of the present invention; Figure 4 This is a structural diagram of the cascaded one-dimensional quadratic convolution and multi-head self-attention mechanism in the temporal branch of the present invention in a preferred embodiment; Figure 5 This is a network structure diagram of the time-frequency orthogonal dual-current sea state inversion backbone network in a preferred embodiment of the present invention; Figure 6 This is a diagram showing the construction of the five-degree-of-freedom dynamic equilibrium residual equation and the dynamic weighted interaction diagram of the PSO outer loop in a preferred embodiment of the present invention. Figure 7 This is a flowchart of a high-fidelity CFD few-sample domain migration fine-tuning based on the Froude similarity criterion in a preferred embodiment of the present invention. Figure 8 This is a comparison diagram of the ship's heave motion response before and after the dynamic environment boundary closed-loop correction in a preferred embodiment of the present invention; Figure 9This is a structural diagram of a ship digital virtual test environment boundary parameter inversion and correction system according to a preferred embodiment of the present invention. Detailed Implementation

[0025] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments described are not intended to limit the present invention.

[0026] Example 1: Reference Figure 1 As shown, this embodiment of the invention provides a method for inverting and correcting boundary parameters of a ship's digital virtual test environment, including but not limited to the following steps: S1. Based on the ship potential flow model and numerical pool model, obtain the motion response time history; based on speed, wave height and period, group and segment the motion response time history to obtain the training set; preprocess the training set to obtain the standardized speed prior. S2. Construct a sea state inversion network model; the sea state inversion network model includes a time-frequency orthogonal dual-stream network and a multi-task prediction head; the time-frequency orthogonal dual-stream network is used to extract time-domain feature vectors and spectral feature vectors from the motion response history; the time-domain feature vectors, spectral feature vectors, standardized speed priors and ship type feature vectors are spliced ​​and fused and then input into the multi-task prediction head to obtain wave height prediction, period prediction and relative wave direction probability prediction; S3. Construct a dynamic equilibrium residual equation based on the motion response difference in the motion response time history; construct a normalized physical mechanism constraint loss based on the dynamic equilibrium residual equation; and pre-train the sea state inversion network model using the normalized physical mechanism constraint loss and the total loss of multi-task data. S4. Perform spatiotemporal physical alignment on the viscous flow CFD data, freeze the pre-trained time-frequency orthogonal dual-stream network, and adjust the multi-task prediction head by combining slice enhancement and physical regularization terms. S5. Construct a heterogeneous auxiliary model; quantify the comprehensive prediction uncertainty through stochastic forward inference, and perform consistency cross-validation between the heterogeneous auxiliary model and the adjusted sea state inversion network model to obtain a three-level confidence decision; use the three-level confidence decision to determine the state of the sea state parameters. S6. Using the sea state parameters determined to be in the receiving state as the initial environmental boundary, the corresponding second ship response is derived; the response mismatch features between the measured first ship response and the second ship response are extracted, and the response mismatch features and the initial environmental boundary are input into the residual correction network to obtain the constrained environmental boundary correction amount to update the dynamic environmental boundary, and closed-loop simulation is performed based on the updated dynamic environmental boundary.

[0027] This invention discloses a method for inverting and correcting boundary parameters in a ship's digital virtual test environment. Combining numerical pool simulation, high-order time-frequency feature modeling, and dynamic mechanism constraints and uncertainty verification techniques, it achieves high-precision, self-verifying in-situ inversion of sea state parameters under complex sea conditions and with very few high-fidelity samples. First, a numerical pool model of the ship's potential flow and high-fidelity viscous flow is constructed to simulate and generate motion response time histories under different sea states and navigation conditions, providing high-quality simulation data for pre-training and cross-domain fine-tuning. Second, a time-frequency orthogonal dual-flow network is designed, consisting of a time-domain branch with one-dimensional quadratic convolution and multi-head self-attention, and a frequency-domain branch based on real-number fast Fourier transform. The extracted deep time-frequency features are then fused with the ship's speed Froude number and ship type prior vector through multimodal analysis. This fusion is input into a multi-task decoupled prediction head with heteroscedasticity estimation to simultaneously deduce wave height, period, and relative wave direction. During training, a five-degree-of-freedom dynamic equilibrium residual equation with channel masking, incorporating inertial force, damping force, and linear and second-order nonlinear restoring forces, was constructed based on central difference. An outer-loop particle swarm optimization algorithm was used to adaptively and dynamically schedule the weights for balancing data loss and mechanistic loss, effectively suppressing gradient conflicts. Subsequently, high-fidelity viscous flow CFD data was spatiotemporally and physically aligned based on the Froude similarity law. Under the constraints of slice rearrangement enhancement and physical regularization terms, the network backbone was frozen and the prediction head was fine-tuned to achieve rapid migration across fluid domains. Finally, Monte Carlo Dropout sampling was used to quantify the comprehensive prediction uncertainty, and consensus cross-validation was performed in conjunction with independent heterogeneous auxiliary models to generate a three-level confidence decision, completing the credible sea state parameter inversion and anomaly blocking. The received sea state parameters were then injected into a digital virtual experimental system to achieve dynamic correction of the dynamic environment boundary and virtual-real closed-loop calibration. This method reduces reliance on dedicated wave measurement hardware, effectively improves the challenge of inverting high-order nonlinear dynamics under large wave heights and reduces the risk of CFD overfitting with small samples, enhancing the robustness of inversion and the reliability of decision-making under harsh operating conditions and sensor disturbances. Furthermore, by injecting inversion parameters in situ into the digital virtual experiment kernel and performing closed-loop calibration, it overcomes the virtual-real deviation caused by statically preset boundaries in traditional virtual experiment environments, providing reliable technical support for high-fidelity dynamic extrapolation and adaptive boundary correction in ship digital virtual experiments under complex and harsh sea conditions. This invention achieves high-precision, self-verifying sea state inversion and highly reliable closed-loop correction of the dynamic boundaries of virtual experiments.

[0028] Specifically, in step S1, high-fidelity numerical water tank models of ship potential flow and viscous flow CFD are constructed based on fluid dynamics theory. By setting different wave environments and speed conditions, the simulation acquisition of ship motion response signals is achieved. The specific steps are as follows: S110. Based on the ship potential flow model and the numerical water tank model, calculate the motion response time history. The specific steps are as follows: S111. The motion response time history includes the source domain motion response time history and the target domain motion response time history. Based on the three-dimensional potential flow theory, the frequency domain transfer function of the ship under different speeds, wave heights, periods and wave directions is calculated to obtain the five-degree-of-freedom inviscid motion time history. The five-degree-of-freedom inviscid motion time history is used as the source domain motion response time history (also known as the source domain potential flow motion time history).

[0029] S112. Based on the unsteady Reynolds-averaged Navier-Stokes equations and the fluid volume method, the viscous fluid-structure interaction motion response under real waves is solved, and the heave and pitch motion history is extracted as the motion response history of the target domain (also known as the viscous flow CFD motion history of the target domain).

[0030] Furthermore, a three-dimensional geometric and fluid simulation model was established using the KVLCC2 standard large crude oil tanker as the research object. First, based on three-dimensional potential flow theory and the boundary element method, the wetted surface of the hull was meshed, and a definite solution problem for the velocity potential of the inviscid flow field was established to solve for the Froude number of the hull at different speeds. ), with meaningful waves ( ), wave cycle ( ) and encountering waves ( The motion response amplitude operator (RAO) under combined working conditions was developed. Then, using the two-parameter Bretschneider wave spectrum and random phase superposition method, a five-DOF motion response time history including sway, roll, heave, pitch, and yaw was numerically synthesized, generating 4172 sets of samples with reference parameter labels as the source domain dataset for deep learning pre-training. Furthermore, a high-fidelity viscous two-phase numerical water tank model was established in computational fluid dynamics (CFD) software, using the unsteady Reynolds-averaged Navier-Stokes (URANS) equations as the fluid flow governing equations, and SST was used for turbulence closure. - The model employs the Volume of Fluid (VOF) method for free surface capture and sets numerical wave-damping zones at the wave generation and attenuation boundaries to reduce reflected waves from the pool walls. The model simulates the strongly nonlinear fluid-structure interaction motion of the hull in a viscous wave field using sliding mesh and overlapping mesh techniques. The model focuses on extracting the heave and pitch motion response time histories, which include nonlinear damping and wave-making effects, as the target domain dataset for subsequent cross-domain migration. Figures 2 to 3 This is a schematic diagram illustrating the construction and motion response time history of the ship numerical tank simulation model in an embodiment of the present invention, wherein... Figure 2 The surface structure grid of the KVLCC2 hull is shown. Figure 3 The five-degree-of-freedom motion response time-history curves calculated by the source domain potential flow model are shown.

[0031] S120. After generating the motion history of the potential flow in the source domain and the CFD motion history of the viscous flow in the target domain, the motion response time history data is subjected to quality verification, leakage prevention grouping and segmentation, and dimensionless standardization, as follows: Each motion response sample contains a discrete time series of length 256, with channels covering 5 degrees of freedom of motion response. The input tensor dimension is represented as... ,in The batch size is specified. Integrity checks are performed on each time series record, examining time series monotonicity, channel integrity, time series length, and speed stability. To avoid data leakage caused by random segmentation resulting in similar motion waveforms of the same physical sea state falling into both the training and test sets, this invention uses the Froude number of speed records... Actual wave height With wave cycle The three-dimensional group of sea states Independent grouping was performed, resulting in 4172 training samples, 896 validation samples, and 896 test samples.

[0032] Before feature extraction, statistical features for each channel are calculated based solely on the training set. The input motion history, prior speed, and regression labels are then Z-score standardized using the following method: ; ; ; in, This represents the original 5-channel motion response history matrix. Number of motion channels This is the sampling duration length; This indicates the speed, represented by the Froude number. A continuous true label vector representing wave height and period, i.e., sea state regression label; The symbol for the transpose of a matrix; These represent the mean values ​​corresponding to the training set; These represent the standard deviations of the training set. The calculated normalization parameters ( , , The parameters are solidified and saved to the model checkpoint, and reused during inference deployment, noise resistance testing, and CFD migration.

[0033] Specifically, in step S2, a time-frequency orthogonal dual-stream neural network model, namely the sea state inversion network model, is constructed. The sea state inversion network model includes a time-frequency orthogonal dual-stream network and a multi-task prediction head. The time-frequency orthogonal dual-stream network includes a time-domain branch and a frequency-domain branch; the time-domain branch extracts time-domain feature vectors through one-dimensional quadratic convolution (Quadratic Conv1D) and a multi-head self-attention (MHA) module; the frequency-domain branch extracts spectral feature vectors through real Fourier transform. The multi-task prediction head takes the fused features from the time-domain feature vector, spectral feature vector, standardized speed prior, and ship type feature vector as input, and outputs wave height prediction, period prediction, and relative wave direction probability prediction. The execution steps of the sea state inversion network model are as follows: S210. To explicitly model the higher-order nonlinear dynamics of ships in waves, a one-dimensional quadratic convolution operator is introduced in the time-domain branch. Traditional one-dimensional linear convolution only involves linear weighting of the input features. The one-dimensional quadratic convolution, while retaining the linear convolution term, simultaneously constructs a second-order product convolution term for the input time history itself. The specific steps for the temporal branch to extract temporal feature vectors through the one-dimensional quadratic convolution and multi-head self-attention module are as follows: S211. Establish a second-order nonlinear relationship on the motion response time history using a quadratic convolution operator; the expression for the second-order nonlinear relationship is: ; in, This represents the output features of the second convolutional layer, i.e., the first temporal features; Represents one-dimensional convolution. Represents input features; This represents the scaling factor for the quadratic term, preferably 0.25; This represents the learnable bias term. This represents the Hadamard element-wise multiplication operation; This represents the second-order product convolution term of the input time history itself.

[0034] The quadratic convolution operator described in this embodiment of the invention can directly capture the nonlinear autocorrelation between input motion amplitudes, second-order wave drift force, and nonlinear hydrostatic restoring stiffness, reducing the dependence on multi-layer approximation of deep networks.

[0035] S212. For the first temporal features obtained after two layers of one-dimensional quadratic convolution (Q-Conv1D, with the number of channels expanded to 128), batch normalization, GELU activation function, and max pooling are applied to extract deep temporal features. .

[0036] S213. The deep temporal features are segmented along the temporal dimension using stride convolution to obtain serialized local vector blocks. (wherein the time slice length) The feature dimension is 16. (128), and superimposed with sine and cosine absolute position encoding matrices. This yields the first vector.

[0037] Furthermore, in order to enable the subsequent attention mechanism to perceive the temporal evolution direction of the waves, a sine and cosine absolute position encoding matrix is ​​injected into each slice. The expression is: ; ; in, This is the location index of a local time block. For feature channel index, 10000 is the feature dimension; 10000 is the preset position encoding wavelength basis constant.

[0038] S214. The first vector is input into the stacked multi-head self-attention module. After scaling dot product attention to calculate the global causal relationship, the global temporal feature vector is output through average pooling, as follows: The first vector after injection position encoding The input is fed into two cascaded multi-head self-attention (MHA) modules, where, This is the local temporal slice feature matrix after superimposing sine and cosine absolute position encoding matrices.

[0039] Each multi-head self-attention module is configured with two attention heads, and cross-period global dependencies are calculated by scaling the dot product: ; in, For query matrix, For the key matrix, For value matrices, This is the scaling factor; , , These represent the query learnable projective weight matrix, the key learnable projective weight matrix, and the value learnable projective weight matrix, respectively.

[0040] In this embodiment of the invention, an attention mechanism is used to capture long-range fluid memory effects spanning multiple encounter wave cycles, encounter frequency evolution caused by speed, and minute phase delays between multi-degree-of-freedom channels. After processing by the attention layer, global average pooling is performed on the token dimension to output a temporal feature vector. Temporal feature vector This represents the global temporal feature vector. Used to characterize second-order wave forces and cross-period long-range memory effects.

[0041] S220. To capture the dominant frequency and energy distribution of the encountered wave, the frequency domain branch extracts the spectral feature vector through real Fourier transform. The specific steps are as follows: S221. Perform an orthogonal normalized real-number fast Fourier transform on each channel of the motion response time history to obtain the motion response amplitude spectrum; wherein, the expression for the motion response amplitude spectrum is: ; in, This represents the normalized real number fast Fourier transform function.

[0042] Furthermore, after filtering out the zero-frequency DC component, logarithmic dynamic compression is applied to the motion response amplitude spectrum to suppress extreme dynamic range, resulting in the spectral characteristic matrix; the expression for the spectral characteristic matrix is: ; in, This represents the spectral feature matrix after dynamic compression using a nonlinear logarithmic scale. This represents the motion response amplitude spectrum extracted after undergoing a real-number fast Fourier transform for each motion channel.

[0043] S222. Input the spectral feature matrix into a lightweight one-dimensional convolutional layer and an adaptive global average pooling layer to extract compact encounter spectral energy and spectral peak features, thus obtaining the spectral feature vector. ,in This refers to the frequency domain feature dimension. In this embodiment of the invention, The value is 64.

[0044] Furthermore, referring to Figures 4 to 5 As shown, Figure 4 This is a structural diagram of the cascaded one-dimensional quadratic convolution and multi-head self-attention mechanism in the temporal branch of this invention. Figure 5 This is a network structure diagram of the time-frequency orthogonal dual-flow sea state inversion backbone network in an embodiment of the present invention. Table 1 shows the specific structural parameters of the time-frequency orthogonal dual-flow backbone network.

[0045] Table 1: Structural Parameters of Time-Frequency Dual-Stream Backbone Network

[0046] S230, Extracting global temporal feature vectors With spectral eigenvectors Then, the global time-domain feature vector, spectral feature vector, standardized speed prior, and ship type feature vector are concatenated and fused before being input into the multi-task prediction head to obtain wave height prediction, period prediction, and relative wave direction probability prediction. The specific steps are as follows: S231, The multi-task prediction head will use the temporal feature vector Spectral eigenvectors Standardized speed prior and ship shape feature vector Channel concatenation and fully connected fusion are performed to obtain a global fused feature vector. .

[0047] S232. Input the global fused feature vector into a shared multilayer perceptron (MLP) to extract high-level semantic representation. The high-level semantic representation is decoupled and connected to the parallel prediction head; the parallel prediction head includes a wave height regression head, a period regression head, and a wave direction classification head.

[0048] S233, the wave height regression head, and the periodic regression head output the mean and logarithmic variance, respectively, while the wave direction classification head outputs the posterior probability distribution of a preset number of discrete wave direction categories. Specifically, the wave height regression head outputs the predicted mean wave height. With log variance The periodic regression head outputs the periodic predicted mean. With log variance The wave direction classification head output corresponds to 7 preset relative wave directions ( Logits (classification) The wave direction probability distribution is obtained by using the Softmax function. .

[0049] S234. In constructing the supervised loss, heteroscedastic Gaussian negative log-likelihood loss is used to train the wave height regression head and the periodic regression head, so that the model can adaptively quantify the uncertainty of random observations according to the sample characteristics; wherein, the expression of the heteroscedastic Gaussian negative log-likelihood loss function is: ; in, This represents the heteroscedastic Gaussian negative log-likelihood loss function. This represents the predicted mean. This represents the predicted logarithmic variance.

[0050] Furthermore, cross-entropy loss is used to train the wave-oriented classification head, constructing the total loss for multi-task data; the mathematical expression for the total loss for multi-task data is: ; in, This represents the total data loss across multiple tasks. Indicates the true label, Indicates the wave cycle. Indicates the actual wave height. This represents the logarithmic variance of wave height prediction. This represents the logarithmic variance of the periodic forecast; , This represents the cross-entropy loss function for multi-class classification. This represents the wave direction classification prediction score vector. Indicates the actual category label of the wave; , , This represents the multi-task loss balancing coefficient, initially set to 1.0.

[0051] Specifically, in step S3, to reduce the non-physical prediction drift that deep neural networks, as purely data-driven neural network models lacking transparent physical mechanisms, are prone to produce, this invention constructs a five-degree-of-freedom physical residual equation based on rigid body dynamics and implements dynamic weight scheduling through an outer-loop particle swarm optimization algorithm. The specific steps for pre-training the sea state inversion network model based on the above strategy are as follows: S310. Perform a central difference solution on the discrete motion response time history of the input to obtain the velocity sequence of each degree of freedom. With acceleration sequence Among them, velocity sequence With acceleration sequence The mathematical expression is: ; ; in, Indicates the sampling time interval. ; This represents the displacement during the motion response of a ship in each degree of freedom.

[0052] S320, based on the velocity sequence With acceleration sequence Dynamic equilibrium residual equations are constructed. Specifically, for the five degrees of freedom of motion—sway, roll, heave, pitch, and yaw—continuous dynamic equilibrium residual equations are established, including equivalent mass force, viscous damping force, first-order linear stiffness restoring force, and second-order nonlinear restoring force. ; in, Indicates the first Equivalent mass or moment of inertia of a degree of freedom This represents the equivalent linear damping coefficient. This represents the first-order linear restoring stiffness coefficient. This represents the second-order nonlinear restoring stiffness coefficient; These correspond to the five degrees of freedom of motion of a ship: sway, roll, heave, trim, and bow roll.

[0053] S330. Based on the dynamic equilibrium residual equation and by introducing an explicit binary channel mask, a normalized physical mechanism constraint loss is constructed. Specifically, in actual CFD simulations or sensor measurement-constrained conditions, some degrees of freedom may not be collected. To avoid the false dynamic penalty caused by the zero-filling method in conventional methods, this invention introduces an explicit binary channel mask. If the first If channel data exists If missing Physical mechanism constraint loss Defined as the weighted mean square error of the physical residuals of all valid channels, its specific expression is: ; in, This represents the normalized physical mechanism constraint loss. Indicates the duration of the time-series sampling. This represents the upper limit of the time summation. Represents the dynamic residual. Indicates the first The normalization scaling factor for the dimensions of degrees of freedom. This represents an explicit binary channel mask. In embodiments of the invention, .

[0054] Furthermore, in order to synergistically optimize the data-driven task and physical mechanism constraints, this invention defines the total training loss as a weighted objective: ; in, Indicates the total training loss; and These represent the data loss weight and the physical mechanism loss weight, respectively.

[0055] Furthermore, since the magnitudes and directions of the data loss gradient and the physical mechanism loss gradient differ significantly during backpropagation, manually setting fixed weights can easily lead to the physical term suppressing feature learning or causing network convergence stagnation. Therefore, this invention deploys a particle swarm optimization (PSO) algorithm on the outer loop of the network gradient backpropagation training. The weights between the data loss and physical mechanism loss are adaptively scheduled in the outer loop of the training using the PSO method. The scheduling uses a comprehensive index of the validation set inversion error and the dynamic residual as the fitness function, and the data loss weights and physical mechanism loss weights are periodically updated. The specific steps are as follows: The particle swarm size is set to 20, the search dimension is 2, and the particle position vector corresponds to the weight combination. The PSO algorithm is independent of backpropagation in each batch, with an update cycle triggered every 10 iterations. It calculates the fitness function values ​​of the current network at different particle positions on the validation set. The fitness function is defined as the weighted sum of the validation set weighted inversion error and the dynamic self-consistency residual. Particle velocities and positions are updated based on individual and global extrema, while maintaining the normalization of the weight sum. (Refer to...) Figure 6 As shown, Figure 6 This paper presents the construction of the five-degree-of-freedom dynamic equilibrium residual equation and the dynamic weighted interaction diagram of the PSO outer loop in an embodiment of the present invention.

[0056] Specifically, in step S4, a small-sample cross-fluid domain migration fine-tuning mechanism based on the Froude similarity law is constructed to bridge the fluid domain differences between potential flow simulation and high-fidelity viscous flow CFD numerical pooling. Specifically, let the geometric scale ratio between the scaled physical model in the numerical pool and the full-size ship be... The timescale ratio is determined based on the Froude similarity criterion dominated by gravity. The processing flow for the unsteady time history obtained from CFD calculations includes: removing the initial transient oscillation phase of the numerical values; multiplying the model scale time by... Map to full-size time axis; multiply the heave displacement amplitude by The pitch angle remains unchanged; the non-uniform time step sequence is resampled to a 1Hz reference sampling rate using cubic spline interpolation; the input window is filled to 256 points using autoregressive harmonic extrapolation; and masks are applied to the unmonitored sway, roll, and pitch channels. , , .

[0057] Furthermore, during the domain transfer training phase, the model checkpoint weights of the pre-trained backbone network are loaded, and the parameters of the time-frequency feature extraction backbone (Q-Conv1D, MHA, and rFFT modules) are frozen. Gradient updates are only enabled for the fully connected parameters of wave height, period, and wave direction prediction heads. For scenarios with limited CFD sample size (using only 16 sets of high-fidelity samples), a slice rearrangement data augmentation mechanism is introduced at the input, including row-level and batch-level randomized arrangement with a slice length of 32 points, constraining the network to learn global invariance between discrete wave blocks; simultaneously, the physical mechanism loss regularization term is retained in the transfer loss. The solution space is constrained by the law of conservation of dynamics to prevent parameter drift and severe overfitting caused by small-sample fine-tuning. The fine-tuning process uses the Adam optimizer with a learning rate of [value missing]. An early stopping strategy is introduced, terminating fine-tuning when there is no improvement on the validation set for 15 consecutive iterations. (See reference...) Figure 7 As shown in the figure, this diagram illustrates the high-fidelity CFD few-sample domain migration fine-tuning process based on the Froude similarity criterion.

[0058] Specifically, in step S5, an uncertainty inference process based on Monte Carlo Dropout is deployed during the model inference stage, and consistency cross-validation is performed in conjunction with independent heterogeneous auxiliary models to obtain a three-level confidence decision. The specific steps are as follows: S510. Enable Monte Carlo Dropout for multiple forward samplings, calculate the cognitive uncertainty of wave height and period, and perform a secondary synthesis of the cognitive uncertainty and the variance of random observations to obtain the total standard deviation and the corresponding confidence interval; wherein, the expression for the confidence interval is: ; in, Indicates the confidence interval. This represents the predicted mean. This represents the quantile coefficient of the distribution at the corresponding confidence level. This represents the total standard deviation.

[0059] For example, during the test inference phase, the model maintains batch normalization in the evaluation state, forcibly activating the Dropout layer (deactivation probability) in the fully connected layer of the prediction head. For the same set of input ship motion time histories, execute... The nth random forward propagation inference, the th The mean of continuous parameters output during the second forward propagation. and discrete wave direction probability distribution The final output and cognitive uncertainty are obtained through statistical calculations: ; .

[0060] Simultaneously calculate the average posterior probability of wave direction: , And wave-oriented classification information entropy: .

[0061] Furthermore, the cognitive uncertainty is combined with the random observation uncertainty of the heteroscedasticity predictor output. Perform quadratic synthesis, where To obtain the mean of the logarithmic variances from multiple forward inferences, we obtain the final total uncertainty of the total probability: .

[0062] This allows us to construct 95% confidence intervals for continuous parameters. , where 1.96 is the normal distribution quantile corresponding to the 95% confidence level.

[0063] S520. Based on multi-dimensional channel time-frequency statistics and causal dilated convolution, a heterogeneous auxiliary model is constructed. Based on the difference of continuous parameters between the two models, wave direction consistency, and the inclusion relationship of confidence intervals, a three-level confidence decision of reception, early warning, or blocking is obtained. Among them, the two models include a heterogeneous auxiliary model and a sea state inversion network model.

[0064] For example, a heterogeneous auxiliary model (MLP+TCN) consisting of a 25-channel time-frequency statistics multilayer perceptron and a causal dilated temporal convolutional network is independently deployed for parallel inference. The mean, standard deviation, root mean square, peak-to-peak value, and spectral amplitude are extracted from the five motion channels to form 25-dimensional statistical features, and reference values ​​are output independently. The prediction results from the main model and the auxiliary model are aggregated into the decision logic unit, which performs a three-level decision based on the envelope threshold: if the absolute difference of the continuous parameters satisfies... and The main and auxiliary models have consistent wave direction decisions. If the auxiliary predicted value falls within the 95% confidence interval of the main model, the system determines it to be in a receiving state and delivers a high-confidence inversion result to the digital virtual experiment system; if the continuous difference slightly exceeds the limit or the confidence interval shows a critical edge overlap, it is determined to be in a warning state, and the predicted value is output with a verification warning mark attached; if the wave direction decision of the main and auxiliary models conflicts, the auxiliary predicted value deviates from the confidence interval, or the wave direction information entropy Exceeding the preset divergence threshold, or the total uncertainty If a sudden change exceeds the engineering envelope, the system determines that it is in a blocked state, actively terminates the delivery of sea state parameters, and records the fault time history segment.

[0065] Specifically, in step S6, the sea state parameters determined to be in the receiving state in step S5 are used as the initial environmental boundary. The second ship response is obtained based on the initial environmental boundary, and the consistency between the first and second ship responses is used as the basis for boundary correction. A lightweight residual correction network outputs a limited correction amount, forming a closed-loop calibration with out-of-domain backoff capability. In this embodiment of the invention, the first ship response is the hull motion response obtained under the current operating conditions, and the second ship response is calculated by the physical simulation solver based on the initial environmental boundary.

[0066] Furthermore, the process of obtaining the corresponding second ship response through deduction includes: pre-constructing a response feature library containing environmental boundaries, speed, ship type or loading status, and corresponding response characteristics; performing periodic parameter circular encoding and continuous parameter standardization on the initial environmental boundary; retrieving multiple nearest neighbors in a data subset with the same operating status; and generating proxy features of the second ship response using an inverse distance weighting method based on parameter distance. The specific steps are as follows: The mean wave height prediction, mean period prediction, and relative wave direction category obtained from the inversion are combined with the current speed, ship type, and loading status to form an initial environmental boundary parameter set. In the baseline implementation, this parameter set is dynamically loaded into the ship hydrodynamic and structural dynamics simulation kernel, and the corresponding five-degree-of-freedom second ship motion time history is obtained through numerical derivation. The second ship motion time history is compared with the first ship response obtained from the ship's end sensors. Aligning with the same sampling frequency and time window, calculate the normalized root mean square error for each degree of freedom channel: ; in, This represents the time-series sampling length.

[0067] Furthermore, to avoid the phase divergence and fitting overhead caused by lightweight networks directly processing high-dimensional random time-domain waveforms, the response history of the first ship is... The second ship response time history obtained from the simulation Extracting low-dimensional physical feature vectors respectively : ; in, Let be the root mean square effective value vector of motion for each degree of freedom. Let be the peak-to-peak vector of the extreme values ​​of the motion in each degree of freedom. This is the peak energy vector of the encounter amplitude spectrum for each degree of freedom, extracted based on the real-number fast Fourier transform. To encounter the dominant energy scalar, The total dimension of the low-dimensional physical feature vector.

[0068] Furthermore, the residual correction network uses a shared response encoder to encode the first ship response feature and the second ship response feature respectively. The encoding difference between the first and second ship response features, the absolute value of the encoding difference, the initial environmental boundary, and the nearest neighbor distance confidence are concatenated to obtain the environmental boundary correction amount. This environmental boundary correction amount is then superimposed on the initial environmental boundary after being subject to maximum amplitude limitation and physical range projection. The environmental boundary correction amount is set to zero when the query point exceeds the coverage of the response feature database or the nearest neighbor distance exceeds a preset threshold. The specific steps are as follows: A lightweight residual correction network is constructed to achieve closed-loop mapping of boundary parameters. The lightweight residual correction network includes a shared feature encoder and a bounded residual prediction head: the shared feature encoder... The structure adopted is The feedforward layer respectively incorporates the first ship response characteristics. With the second ship response characteristics Mapped to a 64-dimensional hidden layer coding vector; explicit computation of the coding difference vector. and the vector of absolute differences and compare it with the initial environmental boundary. and the prediction uncertainty scalar output in step S5 Concatenate to construct a 133-dimensional fused input vector : ; fusion vector The data is fed into a multilayer sensing residual prediction head configured with a hidden layer, and then processed through the hyperbolic tangent function (…). The increment is constrained within the confidence boundary, and the controlled parameter correction is output. : ; in, , , , For learnable network parameters; To correct the parameter values; For the single-parameter maximum correction allowable magnitude vector, its first... Each parameter component takes the smaller value between 25% of the physical span of the corresponding parameter and the half-width of the 95% confidence interval of the sample in step S5. This represents the Sigmoid weighted linear unit activation function.

[0069] The corrected environmental boundary parameters, constrained by the physical boundary operator, are expressed as follows: ; in, This refers to operators that truncate and project parameters onto the physical domain (e.g., ensuring wave height). ,cycle The corrected dynamic environment boundary. The driving fluid kernel of the digital virtual test system is re-injected to perform a second simulation, and the root mean square error between the updated simulation response and the measured first response is evaluated. ;like The residual calibration was deemed valid and adopted. Perform closed-loop simulation as the final dynamic environment boundary; if The system proactively triggers a defense rollback mechanism, forcibly adjusting the amount. Maintain the initial environmental boundary output in step S5. This avoids non-physical divergence caused by reverse iteration.

[0070] Specifically, refer to Figure 8As shown in the figure, this diagram compares the ship's heave response before and after closed-loop correction of the dynamic environment boundary under a typical operating condition according to an embodiment of the present invention. In the figure, the solid line represents the original input response (i.e., the first ship response), the dashed line represents the response obtained by deducing the initial sea state inversion boundary received in step S5 (i.e., the second ship response), and the dotted-dashed line represents the response obtained after secondary deduction following the output constraint correction amount of the lightweight residual correction network and updating the dynamic environment boundary. Figure 8 The comparison shows that when directly extrapolating from the initial inversion parameters, the resulting heave response (dashed line) and the original response (solid line) exhibit a certain dynamic deviation in peak and trough amplitude and phase evolution. However, after introducing a lightweight residual correction network for adaptive boundary calibration, the extrapolated response (dotted line) corresponding to the corrected parameters closely matches the original input response (solid line) in terms of periodic phase, waveform profile, and peak-to-peak value, significantly improving waveform overlap and reducing root mean square error. This result intuitively verifies that the closed-loop correction mechanism of this invention, which adjusts the environmental boundary through response mismatch feature feedback, can effectively overcome the virtual-real deviation caused by static boundary preset, greatly improving the fidelity and physical consistency of the digital virtual experiment.

[0071] During the offline training phase of the lightweight residual correction network, the pre-trained backbone network in step S2 is frozen throughout, and cross-validation is used to generate the training set for extrapolating sea state parameters. With real-world environmental labels Using the numerical water tank simulation sample set as the truth benchmark, a smooth L1 loss function incorporating a sparse regularization penalty term is defined to optimize the network parameters: ; in, To smooth the L1 loss function, and to reduce the time cost of frequently calling the real high-fidelity physical simulator during the offline training phase, a feature library is established in the offline training set construction using the numerical water tank database pre-built in step S1. Inverse distance squared weighted local interpolation is used to quickly generate second ship response features in surrogate form in batches, driving the low-cost offline pre-training of the lightweight residual correction network.

[0072] Furthermore, the virtual test system is driven again using the corrected environmental boundary, and the consistency between the first ship's response and the updated second ship's response is evaluated. When the response deviation decreases and the response generation confidence meets the requirements, the corrected environmental boundary is accepted. When the deviation does not decrease, the query exceeds the coverage of the response library, or the corrector confidence is insufficient, the system reverts to the initial environmental boundary output in step S5. This achieves constrained residual correction, anomaly backoff, and closed-loop simulation of the environmental boundary parameters.

[0073] This embodiment constructs a numerical pool model of ship potential flow and viscous flow, generates high-fidelity time-history data with dynamic characteristics, and implements sea state triplet leakage prevention segmentation, providing an effective way to solve the problems of scarce real-world marine environmental labels and high measurement costs. In the inversion model construction and training, the time-frequency orthogonal dual-flow backbone explicitly extracts the interaction features of second-order wave force and stiffness through one-dimensional quadratic convolution, effectively capturing the cross-period fluid memory effect by combining multi-head self-attention, and simultaneously extrapolating the probability distribution of sea state parameters by integrating prior information, effectively alleviating the ambiguity of wave-following and wave-following. The five-DOF dynamic residual with channel masking and the PSO adaptive weighting mechanism ensure that the deep network follows physical laws and suppresses multi-task conflicts during multi-task inversion. The Froude similarity criterion alignment and fine-tuning regularization mechanism enable the network to reduce viscous damping with very few CFD samples. Domain bias; the linkage between Monte Carlo Dropout uncertainty assessment and heterogeneous auxiliary models constructs a highly reliable self-verifying closed loop and anomaly blocking gating; furthermore, by injecting the self-consistent environmental boundary parameters determined as received into the ship digital virtual test system in real time, the system is driven to deduce dynamic response, and adaptive fine-tuning calibration of environmental boundary parameters is achieved based on confidence index quantification and uncertainty feasible domain constraints, which effectively alleviates the virtual-real systemic bias caused by the static boundary setting of traditional virtual tests, and improves the simulation fidelity and engineering usability of ship digital virtual tests in harsh environments.

[0074] The environmental boundary parameter inversion and correction method described in this embodiment of the invention has the following advantages: First, it achieves the fusion of high-order nonlinear dynamic feature extraction and rigid body mechanism self-consistency constraint, constructing an environmental boundary input benchmark that conforms to the real physical dynamic characteristics for digital virtual experiments. By introducing a one-dimensional quadratic convolution operator and cascading a multi-head self-attention mechanism into the time-domain network, it explicitly models the second-order product interaction terms between motion responses and captures cross-period global causal dependencies, improving the problem that traditional methods have difficulty directly fitting the second-order nonlinear drift force and still water restoring stiffness of ships, as well as the ambiguity problem of wave-following identification. At the same time, it constructs a five-degree-of-freedom dynamic equilibrium residual equation including inertial force, damping force, restoring force, and channel mask, and uses the particle swarm optimization algorithm to adaptively coordinate data fitting and mechanism loss weights in the training outer loop, effectively suppressing multi-task gradient conflicts and effectively improving the shortcomings of existing pure data-driven models that lack physical rationality support and are prone to non-physical drift.

[0075] Second, it possesses both robust cross-fluid domain adaptation with minimal sample size and highly reliable self-verification and virtual experimental simulation closed-loop correction capabilities. Based on the spatiotemporal scale mapping relationship established by the Froude similarity law, combined with backbone feature freezing, time-history slice rearrangement enhancement, and physical regularization constraints, it can significantly reduce the risk of overfitting with only a small number of high-fidelity viscous flow CFD samples, greatly reducing the computational cost and sample acquisition difficulty of cross-domain fine-tuning. It enables the collaboration of the comprehensive prediction uncertainty of Monte Carlo Dropout sampling and the cross-verification of independent heterogeneous auxiliary models to construct a three-level confidence decision system covering continuous parameter differences, classification consistency, and confidence intervals: "receive-warning-blocking." This system can proactively block abnormal outputs when sensors are subjected to complex noise interference or encounter unknown extreme conditions, significantly improving the engineering robustness and decision reliability of in-situ inversion in complex sea states.

[0076] Example 2: Based on the same inventive concept, this embodiment provides a system for inverting and correcting boundary parameters of a ship's digital virtual test environment. The principle of solving the problem is similar to the method for inverting and correcting boundary parameters of a ship's digital virtual test environment provided in Embodiment 1, and the repeated parts will not be described again.

[0077] Reference Figure 9 As shown, this embodiment provides a system for inverting and correcting boundary parameters of a ship's digital virtual test environment, used to implement the method for inverting and correcting boundary parameters of a ship's digital virtual test environment described in Embodiment 1, including: The data generation module is used to obtain the motion response time history based on the ship potential flow model and the numerical pool model; to group and segment the motion response time history based on speed, wave height and period to obtain the training set; and to preprocess the training set to obtain the standardized speed prior. The network construction module is used to build a sea state inversion network model. The sea state inversion network model includes a time-frequency orthogonal dual-stream network and a multi-task prediction head. The time-frequency orthogonal dual-stream network is used to extract time-domain feature vectors and spectral feature vectors from the motion response history. The time-domain feature vectors, spectral feature vectors, standardized speed priors, and ship type feature vectors are concatenated and fused and then input into the multi-task prediction head to obtain wave height prediction, period prediction, and relative wave direction probability prediction. The physical constraint pre-training module is used to construct the dynamic equilibrium residual equation based on the motion response difference in the motion response history; construct the normalized physical mechanism constraint loss based on the dynamic equilibrium residual equation; and pre-train the sea state inversion network model using the normalized physical mechanism constraint loss and the total loss of multi-task data. The adjustment module is used to perform spatiotemporal physical alignment on viscous flow CFD data, freeze the pre-trained time-frequency orthogonal dual-stream network, and adjust the multi-task prediction head by combining slice enhancement and physical regularization terms. The credible inversion module is used to construct a heterogeneous auxiliary model; stochastic forward inference quantifies the comprehensive prediction uncertainty, and performs consistency cross-verification with the heterogeneous auxiliary model and the adjusted sea state inversion network model to obtain a three-level confidence decision; the three-level confidence decision is used to determine the state of the sea state parameters. The closed-loop correction module is used to take the sea state parameters determined to be in the receiving state as the initial environmental boundary, and deduce the corresponding second ship response; extract the response mismatch features between the measured first ship response and the second ship response, input the response mismatch features and the initial environmental boundary into the residual correction network, obtain the constrained environmental boundary correction amount to update the dynamic environmental boundary, and perform closed-loop simulation based on the updated dynamic environmental boundary.

[0078] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0079] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0080] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0081] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0082] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.

Claims

1. A method for inverting and correcting boundary parameters of a ship's digital virtual test environment, characterized in that, include: S1. Obtain the motion response time history based on the ship potential flow model and the numerical water tank model; Based on speed, wave height, and period, the motion response time history is grouped and segmented to obtain a training set; the training set is preprocessed to obtain a standardized speed prior. S2. Construct a sea state inversion network model; wherein, the sea state inversion network model includes a time-frequency orthogonal dual-stream network and a multi-task prediction head; the time-frequency orthogonal dual-stream network is used to extract time-domain feature vectors and spectral feature vectors from the motion response time history; the time-domain feature vectors, the spectral feature vectors, the standardized speed priors and the ship type feature vectors are spliced ​​and fused and then input into the multi-task prediction head to obtain wave height prediction, period prediction and relative wave direction probability prediction; S3. Construct a dynamic equilibrium residual equation based on the motion response difference in the motion response time history; construct a normalized physical mechanism constraint loss based on the dynamic equilibrium residual equation; and pre-train the sea state inversion network model using the normalized physical mechanism constraint loss and the multi-task data total loss. S4. Perform spatiotemporal physical alignment on the viscous flow CFD data, freeze the pre-trained time-frequency orthogonal dual-stream network, and adjust the multi-task prediction head by combining slice enhancement and physical regularization terms. S5. Construct a heterogeneous auxiliary model; quantify the comprehensive prediction uncertainty through stochastic forward inference, and perform consistency cross-validation between the heterogeneous auxiliary model and the adjusted sea state inversion network model to obtain a three-level confidence decision; use the three-level confidence decision to determine the state of the sea state parameters. S6. Using the sea state parameters determined to be in the receiving state as the initial environmental boundary, the corresponding second ship response is derived; the response mismatch features between the measured first ship response and the second ship response are extracted, and the response mismatch features and the initial environmental boundary are input into the residual correction network to obtain the constrained environmental boundary correction amount to update the dynamic environmental boundary, and closed-loop simulation is performed based on the updated dynamic environmental boundary.

2. The method for inverting and correcting boundary parameters of a ship's digital virtual test environment according to claim 1, characterized in that, In step S1, the steps for calculating the motion response time history based on the ship potential flow model and the numerical water tank model are as follows: The motion response time history includes the source domain motion response time history and the target domain motion response time history; the frequency domain transfer function of the ship under different speeds, wave heights, periods and wave directions is calculated based on the three-dimensional potential flow theory to obtain the five-degree-of-freedom inviscid motion time history; the five-degree-of-freedom inviscid motion time history is used as the source domain motion response time history; Based on the unsteady Reynolds-averaged Navier-Stokes equations and the fluid volume method, the viscous fluid-structure interaction motion response under real waves is solved, and the heave and pitch motion times are extracted as the motion response times of the target domain.

3. The method for inverting and correcting boundary parameters of a ship's digital virtual test environment according to claim 1, characterized in that, The time-frequency orthogonal dual-stream network includes a time-domain branch and a frequency-domain branch; the time-domain branch extracts the time-domain feature vector through one-dimensional quadratic convolution and a multi-head self-attention module; the frequency-domain branch extracts the spectral feature vector through real Fourier transform.

4. The method for inverting and correcting boundary parameters of a ship's digital virtual test environment according to claim 3, characterized in that, The steps for extracting the temporal feature vector through one-dimensional quadratic convolution and multi-head self-attention module in the temporal branch are as follows: A second-order nonlinear relationship is established on the motion response time history using a quadratic convolution operator to obtain the first time-domain feature; wherein the expression of the second-order nonlinear relationship is: ; in, Indicates the first time-domain feature, Represents one-dimensional convolution. Indicates input features, This represents the scaling factor for the quadratic term. Indicates bias. This represents element-wise multiplication; The first temporal features are subjected to batch normalization, GELU activation function and max pooling to obtain deep temporal features; The deep temporal features are divided into serialized local vector blocks by stride convolution and superimposed with sine and cosine absolute position encoding matrices to obtain a first vector. The first vector is input into a stacked multi-head self-attention module, and after scaling dot product attention to calculate global causal relationships, a global temporal feature vector is output by average pooling.

5. The method for inverting and correcting boundary parameters of a ship's digital virtual test environment according to claim 3, characterized in that, The steps for extracting the spectral feature vector through the frequency domain branch using real Fourier transform are as follows: An orthogonal normalized real-number fast Fourier transform is performed on each channel of the motion response time history to obtain the motion response amplitude spectrum; after filtering out the DC component, the motion response amplitude spectrum is dynamically compressed logarithmically to obtain the spectral feature matrix; wherein, the expression of the spectral feature matrix is: ; in, Represents the spectral characteristic matrix, Represents the amplitude spectrum of the motion response; The spectral feature matrix is ​​input into a lightweight one-dimensional convolutional layer and an adaptive global pooling layer to extract the encountered spectral energy and spectral peak features, thus obtaining a spectral feature vector.

6. The method for inverting and correcting boundary parameters of a ship's digital virtual test environment according to claim 1, characterized in that, In step S2, the steps of concatenating and fusing the time-domain feature vector, the spectral feature vector, the standardized speed prior, and the ship type feature vector, and then inputting them into the multi-task prediction head to obtain wave height prediction, period prediction, and relative wave direction probability prediction are as follows: The multi-task prediction head performs channel splicing and full-connection fusion of the time-domain feature vector, the spectral feature vector, the standardized speed prior, and the ship type feature vector, and decouples them to access the parallel prediction head; the parallel prediction head includes a wave height regression head, a periodic regression head, and a wave direction classification head. The wave height regression head and the periodic regression head output the mean and logarithmic variance, respectively, and the wave direction classification head outputs the posterior probability distribution of a preset number of discrete wave direction categories. The wave height regression head and the period regression head are trained using heteroscedastic Gaussian negative log-likelihood loss, and the wave direction classification head is trained using cross-entropy loss, thus constructing a multi-task data total loss; wherein, the mathematical expression of the multi-task data total loss is: ; ; in, This represents the total data loss across multiple tasks. This represents the heteroscedastic Gaussian negative log-likelihood loss function. Indicates the true label, Indicates the wave cycle. This represents the predicted mean. This represents the predicted log-variance. Indicates the actual wave height. This represents the logarithmic variance of wave height prediction. This represents the logarithmic variance of the periodic forecast; , This represents the cross-entropy loss function for multi-class classification. This represents the wave direction classification prediction score vector. Indicates the actual category label of the wave; , , This represents the multi-task loss balance coefficient.

7. The method for inverting and correcting boundary parameters of a ship's digital virtual test environment according to claim 1, characterized in that, In step S6, the process of using the sea state parameters determined to be in the receiving state as the initial environmental boundary to deduce the corresponding second ship response includes: pre-constructing a response feature library containing environmental boundary, speed, ship type or loading state and corresponding response features; performing periodic parameter circular encoding and continuous parameter standardization on the initial environmental boundary; retrieving multiple nearest neighbors in the data subset with the same operating state; and using an inverse distance weighting method based on parameter distance to generate proxy features of the second ship response.

8. The method for inverting and correcting boundary parameters of a ship's digital virtual test environment according to claim 7, characterized in that, The residual correction network uses a shared response encoder to encode the first ship response feature and the second ship response feature respectively. The encoding difference between the first ship response feature and the second ship response feature, the absolute value of the encoding difference, the initial environmental boundary, and the nearest neighbor distance confidence are concatenated to obtain the environmental boundary correction amount. The environmental boundary correction amount is superimposed on the initial environmental boundary after being subject to maximum amplitude limitation and physical range projection. When the query point exceeds the coverage of the response feature library or the nearest neighbor distance exceeds a preset threshold, the environmental boundary correction amount is set to zero.

9. The method for inverting and correcting boundary parameters of a ship's digital virtual test environment according to claim 1, characterized in that, In step S5, the steps for obtaining the three-level confidence decision are as follows: Monte Carlo Dropout is enabled for multiple forward samplings to calculate the cognitive uncertainty of wave height and period. This cognitive uncertainty is then combined with the variance of random observations to obtain the total standard deviation and the corresponding confidence interval. The expression for the confidence interval is: ; in, Indicates the confidence interval. This represents the predicted mean. This represents the quantile coefficient of the distribution at the corresponding confidence level. Indicates the total standard deviation; The heterogeneous auxiliary model is constructed based on multi-dimensional channel time-frequency statistics and causal dilated convolution; a three-level confidence decision of receiving, warning or blocking is obtained according to the continuous parameter difference between the two models, wave direction consistency and the inclusion relationship of the confidence interval; wherein, the two models include the heterogeneous auxiliary model and the sea state inversion network model.

10. The method for inverting and correcting boundary parameters of a ship's digital virtual test environment according to claim 1, characterized in that, In step S3, the pre-training process of the sea state inversion network model includes: The motion response time history is solved by central difference to obtain the velocity sequence and acceleration sequence; Based on the velocity sequence and the acceleration sequence, dynamic equilibrium residual equations containing inertial force, damping force, linear stiffness and second-order nonlinear restoring force are constructed for each degree of freedom of motion. Based on the aforementioned dynamic equilibrium residual equation, and by introducing an explicit binary channel mask, a normalized physical mechanism constraint loss is constructed; wherein, the expression for the normalized physical mechanism constraint loss is: ; in, This represents the normalized physical mechanism constraint loss. Indicates the duration of the time-series sampling. This represents the upper limit of the time summation. Represents the dynamic residual. Indicates the first The normalization scaling factor for the dimensions of degrees of freedom. This represents an explicit binary channel mask.

11. The method for inverting and correcting boundary parameters of a ship's digital virtual test environment according to claim 1, characterized in that, In step S3, during the pre-training process of the sea state inversion network model, the weights between data loss and physical mechanism loss are adaptively scheduled in the outer training loop using the particle swarm optimization method. The scheduling uses a comprehensive index of validation set inversion error and dynamic residual as the fitness function, and periodically updates the weights of data loss and physical mechanism loss.

12. A system for inverting and correcting boundary parameters of a ship's digital virtual test environment, used to implement the method for inverting and correcting boundary parameters of a ship's digital virtual test environment as described in any one of claims 1 to 11, characterized in that, include: The data generation module is used to obtain the motion response time history based on the ship potential flow model and the numerical water tank model; Based on speed, wave height, and period, the motion response time history is grouped and segmented to obtain a training set; the training set is preprocessed to obtain a standardized speed prior. A network construction module is used to construct a sea state inversion network model. The sea state inversion network model includes a time-frequency orthogonal dual-stream network and a multi-task prediction head. The time-frequency orthogonal dual-stream network is used to extract time-domain feature vectors and spectral feature vectors from the motion response time history. The time-domain feature vectors, spectral feature vectors, standardized speed priors, and ship type feature vectors are concatenated and fused, then input into the multi-task prediction head to obtain wave height prediction, period prediction, and relative wave direction probability prediction. The physical constraint pre-training module is used to construct a dynamic equilibrium residual equation based on the motion response difference of the motion response time history; construct a normalized physical mechanism constraint loss based on the dynamic equilibrium residual equation; and pre-train the sea state inversion network model using the normalized physical mechanism constraint loss and the multi-task data total loss. The adjustment module is used to perform spatiotemporal physical alignment on viscous flow CFD data, freeze the pre-trained time-frequency orthogonal dual-stream network, and adjust the multi-task prediction head in combination with slice enhancement and physical regularization terms. The credible inversion module is used to construct a heterogeneous auxiliary model; stochastic forward inference quantifies the comprehensive prediction uncertainty, and performs consistency cross-verification with the heterogeneous auxiliary model and the adjusted sea state inversion network model to obtain a three-level confidence decision; the three-level confidence decision is used to determine the state of the sea state parameters. The closed-loop correction module is used to take the sea state parameters determined to be in the receiving state as the initial environmental boundary, deduce the corresponding second ship response, extract the response mismatch features between the measured first ship response and the second ship response, input the response mismatch features and the initial environmental boundary into the residual correction network, obtain the constrained environmental boundary correction amount to update the dynamic environmental boundary, and perform closed-loop simulation based on the updated dynamic environmental boundary.