Method, medium and system for calculating ocean wave spectrum parameters of ocean digital twinning

Through a multi-step fitting optimization process of wave spectrum parameters in the ocean digital twin system, including preprocessing, fitting criteria and typhoon wave spatiotemporal matching, the problem of insufficient calculation accuracy of wave spectrum parameters was solved, and high-precision digital twin simulation of the wave field was achieved.

CN120597727AActive Publication Date: 2025-09-05BEIHAI FORECASTING CENT OF STATE OCEANIC ADMINISTRATION ((QINGDAO MARINE FORECASTING STATION OF STATE OCEANIC ADMINISTRATION) (QINGDAO MARINE ENVIRONMENT MONITORING CENT OF STATE OCEANIC ADMINISTRATION))

Patent Information

Application Number
CN202511093003.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-06
Publication Date
2025-09-05
Estimated Expiration
2045-08-06

AI Technical Summary

Technical Problem

The calculation accuracy of wave spectrum parameters in existing ocean digital twin systems is insufficient, and they cannot be accurately described and calculated. In particular, the simulation accuracy is poor at multiple temporal and spatial scales and under extreme sea conditions, which cannot meet the needs of high-precision ocean digital twin applications.

Method used

By obtaining the original wave spectrum data for preprocessing, the Jonswap frequency wave spectrum is selected as the theoretical frequency wave spectrum, and a fitting criterion is established to evaluate the degree of conformity between the fitted frequency wave spectrum and the original frequency wave spectrum. The optimal fitting peak rise factor is solved using the numerical optimization method. The typhoon wave spectrum and the non-typhoon wave spectrum are distinguished by combining the spatiotemporal matching of typhoon waves, a wave surface height model is constructed, and a wave spectrum parameter database is generated.

Benefits of technology

The simulation accuracy of wave spectrum parameters has been significantly improved, high-precision digital twin simulation of wave fields has been achieved, and the problem of accurate description and calculation of wave spectrum parameters has been solved, especially providing more realistic peak rise factor values ​​under extreme sea conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120597727A_ABST
    Figure CN120597727A_ABST
Patent Text Reader

Abstract

The invention provides a method, a medium and a system for calculating ocean wave spectrum parameters of ocean digital twinning, and belongs to the technical field of electrical digital data processing. The method comprises the following steps: acquiring and preprocessing original sea wave spectrum data, selecting a Jonswap frequency sea wave spectrum as a theoretical model, establishing a multi-index fitting criterion, optimizing and solving a peak rise factor parameter, performing statistical analysis according to a significant wave high period level, and distinguishing sea wave spectrum characteristics of typhoon and non-typhoon working conditions. And calculating the wave amplitude wave number and the random phase to construct a wave surface height model, and finally forming a sea wave spectrum parameter database. The technical problem that sea wave spectrum parameters in the ocean digital twinning system are difficult to accurately describe and calculate is solved, the extreme sea condition simulation capability is particularly optimized, and high-precision sea wave field simulation technical support is provided for the ocean digital twinning system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of electronic digital data processing, and in particular, relates to a method, medium and system for calculating wave spectrum parameters for ocean digital twins. Background Art

[0002] As a virtual representation of the physical ocean environment, ocean digital twin systems are widely used in marine engineering design, marine disaster warning, and ship navigation safety. Traditional ocean digital twin technology typically uses theoretical wave spectrum models to simulate wave fields. Commonly used models include the PM spectrum and the Jonswap spectrum. These models simplify the description of the wave field using a small number of parameters such as significant wave height and spectral peak period. However, there are significant differences between theoretical wave spectrum models and actual wave spectra, especially in terms of morphological characteristics.

[0003] Currently, wave spectrum parameter calculations primarily rely on fixed parameter methods or simple regression. The fixed parameter method uses an empirical constant as a peak-rise factor, making it incapable of adapting to the dynamic changes in the wave spectrum under varying sea areas and meteorological conditions. While the simple regression method accounts for the influence of the marine environment, it ignores the complexity and spatiotemporal variability of the wave spectrum, resulting in insufficient fitting accuracy. Especially under extreme weather conditions such as typhoons, the morphological characteristics of the wave spectrum vary significantly, making it difficult for existing methods to accurately capture this.

[0004] Due to insufficient calculation accuracy for wave spectrum parameters, existing ocean digital twin systems suffer from low simulation accuracy and poor adaptability in wave field reproduction, failing to meet the demands of high-precision ocean digital twin applications. In particular, simulation accuracy at multiple spatiotemporal scales and under extreme sea conditions needs to be improved urgently. This has become a key technical challenge limiting the development and application of ocean digital twin technology. Specifically, existing technologies present a technical challenge that makes it difficult to accurately describe and calculate wave spectrum parameters within ocean digital twin systems. Summary of the Invention

[0005] In view of this, the present invention provides a method, medium and system for calculating wave spectrum parameters for ocean digital twins, which can solve the technical problem in the existing technology that wave spectrum parameters in ocean digital twin systems are difficult to accurately describe and calculate.

[0006] The present invention is implemented as follows: In the first aspect, the present invention provides a method for calculating wave spectrum parameters for ocean digital twins, including: obtaining original wave spectrum data and preprocessing it; selecting the Jonswap frequency wave spectrum as the theoretical frequency wave spectrum; establishing a fitting criterion to evaluate the degree of conformity between the fitted frequency wave spectrum and the original frequency wave spectrum; constructing a frequency wave spectrum formula based on the effective wave height and the spectrum peak period, and solving the optimal fitting peak rise factor through a numerical optimization method; calculating the statistical characteristics of the peak rise factor according to the effective wave height period level; distinguishing typhoon wave spectrum from non-typhoon wave spectrum through typhoon wave spatiotemporal matching; calculating wave parameters based on the fitted frequency wave spectrum to construct a wave surface height model; and generating a wave spectrum parameter database.

[0007] Among them, the step of obtaining the original wave spectrum data and performing preprocessing specifically includes performing directional integration on the directional wave spectrum to obtain the frequency wave spectrum, and performing frequency interpolation on the one-dimensional frequency wave spectrum with more than 25 frequency components to ensure that the total energy difference before and after frequency interpolation is no more than 0.1 square meters per second.

[0008] The directional wave spectrum refers to the energy distribution of the wave spectrum at different frequencies and directions, which can be expressed as ,in is the frequency, The frequency wave spectrum refers to the energy distribution of the wave spectrum at different frequencies. The integral within the range is expressed as .

[0009] The frequency components refer to the frequency discrete points that describe the frequency wave spectrum. The original frequency wave spectrum is resampled into 25 frequency components. , the frequency interval is The total energy refers to the zero-order spectrum of the frequency wave spectrum, and the calculation formula is .

[0010] Among them, in the step of establishing the fitting criterion, the fitting criterion includes the spectrum peak absolute error, the zero-order spectrum distance error and the spectrum value root mean square error; the spectrum peak absolute error refers to the absolute value of the spectrum peak difference between the fitting frequency wave spectrum and the original frequency wave spectrum, and the calculation formula is: .

[0011] The zero-order spectrum error refers to the absolute value of the zero-order spectrum difference between the fitting frequency wave spectrum and the original frequency wave spectrum, and the calculation formula is: The spectral value root mean square error refers to the root mean square of the spectral value difference between the fitting frequency wave spectrum and the original frequency wave spectrum at all frequency points. The calculation formula is: .

[0012] Among them, in the step of selecting the Jonswap frequency wave spectrum as the theoretical frequency wave spectrum, the wave development energy balance equation is also introduced to analyze the physical mechanism and improve the fitting accuracy of the peak rise factor.

[0013] Among them, in the step of solving the optimal fitting peak rise factor, a pre-trained wave spectrum parameter intelligent prediction network WaveSpecNet model is also established to improve the peak rise factor prediction accuracy and computational efficiency through multimodal data fusion.

[0014] The gradient descent method is to calculate the gradient of the objective function with respect to the peak raising factor, and iteratively update the peak raising factor parameters according to the learning rate until the objective function converges or reaches the maximum number of iterations. The gradient calculation formula is: ,in , the parameter update formula is ,in The learning rate is 0.01. The numerical optimization method includes an array search method or a gradient descent method. The array search method discretizes the peak boost factor in the range of 1 to 7 with a step size of 0.01 to form a peak boost factor array with a dimension of 661. The array is substituted into the theoretical frequency wave spectrum formula in sequence, and the error with the original frequency wave spectrum is calculated. The peak boost factor value with the smallest error is selected.

[0015] Among them, the wave development energy balance equation is used to describe the evolution process of the frequency wave spectrum in time and space and the energy transfer mechanism; the wave development energy balance equation takes into account physical processes such as wind energy input, nonlinear interaction between waves, whitecap dissipation and bottom friction dissipation. The input includes average wind speed, wind direction, wind duration, water depth and effective wave height, and the output is the time and space evolution characteristics of the frequency wave spectrum and the dynamic adjustment value of the peak rise factor.

[0016] Among them, the WaveSpecNet model is a deep neural network based on an encoder-decoder architecture; the encoder part of the WaveSpecNet model uses a multi-head self-attention mechanism to process multi-source spatiotemporal data, including raw frequency wave spectrum data, meteorological data and terrain data; the decoder part uses a sparse attention mechanism to fuse different modal features and output the peak rise factor value and peak rise factor uncertainty estimate.

[0017] A second aspect of the present invention provides a computer-readable storage medium, which stores program instructions. When the program instructions are run in a computer, they are used to execute the above-mentioned method for calculating wave spectrum parameters for ocean digital twins.

[0018] The third aspect of the present invention provides a system for calculating wave spectrum parameters for ocean digital twins, comprising the above-mentioned computer-readable storage medium. The system is any one of a computer, a server, and a single-chip microcomputer. The computer-readable storage medium is arranged in the system, and the system is provided with a microprocessor for executing program instructions stored in the computer-readable storage medium.

[0019] The present invention realizes the accurate calculation and classification management of peak rise factors by establishing a multi-step fitting optimization process between the original wave spectrum data and the theoretical frequency wave spectrum. The method adopts a multi-index fitting criterion that combines the absolute error of the spectrum peak, the zero-order spectrum distance error and the root mean square error of the spectrum value to ensure the accuracy of the full spectrum segment of the fitting process. The present invention solves the problem of insufficient accuracy caused by fixed parameters or simple regression in traditional methods. It solves the optimal fitting peak rise factor through array search method or gradient descent method, establishes a statistical characteristic analysis of the peak rise factor for different effective wave height period levels, and combines typhoon data to realize the distinction of wave spectrum parameters under typhoon and non-typhoon conditions. Especially for extreme sea conditions, this method can provide more realistic peak rise factor values, which significantly improves the simulation accuracy. By constructing a wave spectrum parameter database and a wave surface height model, a high-precision digital twin simulation of the wave field is realized, solving the technical problem that the wave spectrum parameters are difficult to accurately describe and calculate. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 is a flow chart of the method of the present invention.

[0021] Figure 2 This is the wave surface distribution generated in Example 2.

[0022] Figure 3 This is a diagram distinguishing between typhoon and non-typhoon conditions in Example 2, where the light yellow circle represents the typhoon impact range (radius 200km), and the red plus sign inside the circle represents the point affected by the typhoon. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.

[0024] like Figure 1 FIG. 1 is a flow chart of a method for calculating ocean wave spectrum parameters for ocean digital twins provided by the first aspect of the present invention. The method comprises the following steps: S01. Obtain original wave spectrum data, perform directional integration on the directional wave spectrum to obtain a frequency wave spectrum, and perform frequency interpolation on the one-dimensional frequency wave spectrum with more than 25 frequency components to ensure that the total energy difference before and after the frequency interpolation is no more than 0.1 square meters per second; S02. Select the Jonswap frequency wave spectrum as the theoretical frequency wave spectrum, construct the frequency wave spectrum formula using the known significant wave height and spectrum peak period, and determine the peak rise factor as the parameter to be fitted; S03. Establish fitting criteria, including spectrum peak absolute error, zero-order spectrum distance error, and spectrum value root mean square error, to evaluate the degree of conformity between the fitted frequency wave spectrum and the original frequency wave spectrum; S04. Substitute the initial guess values ​​of significant wave height, spectrum peak period, and peak rise factor into the theoretical frequency wave spectrum formula, and perform preliminary fitting between the theoretical frequency wave spectrum and the original frequency wave spectrum; S05, solving the optimal fitting peak rise factor based on an array search method or a gradient descent method, and selecting the peak rise factor value that minimizes the fitting criterion error as the optimal fitting parameter of the wave spectrum; S06. Classify the wave data according to the significant wave height period level, calculate the mean value, standard deviation and 95% confidence interval of the peak rise factor value of each significant wave height period level, and create a scatter plot of the peak rise factor value; S07. Perform spatiotemporal matching of typhoon waves using the tropical cyclone best path dataset, identify the wave spectrum at points within 200 kilometers from the typhoon center during the typhoon as the typhoon wave spectrum, and distinguish the wave spectrum parameters corresponding to the typhoon wave spectrum and the non-typhoon wave spectrum. S08. Calculate the fitted frequency wave spectrum using the matched peak rise factor value, calculate the wave amplitude, wave number, and wave random phase based on the fitted frequency wave spectrum, and finally construct a wave surface height model to complete the wave digital twin simulation; S09. Generate a wave spectrum parameter database based on the fitted peak rise factor parameters under multiple spatiotemporal conditions, provide real-time peak rise factor parameter support for the ocean digital twin system, and achieve high-precision wave simulation.

[0025] The directional wave spectrum refers to the energy distribution of the wave spectrum at different frequencies and directions, which can be expressed as ,in is the frequency, For direction.

[0026] The frequency wave spectrum refers to the energy distribution of the wave spectrum at different frequencies, which is obtained by integrating the directional wave spectrum in the range of 0 to 2π and is expressed as , which is used to characterize the distribution characteristics of wave energy at different frequencies.

[0027] Among them, the frequency component refers to the frequency discrete points that describe the frequency wave spectrum. The original frequency wave spectrum is resampled into 25 frequency components. , the frequency interval is .

[0028] Among them, the total energy refers to the zero-order spectrum of the frequency wave spectrum, and the calculation formula is , the difference in total energy between the original frequency wave spectrum and the interpolated frequency wave spectrum is no more than 0.1 square meters second.

[0029] Among them, Jonswap frequency wave spectrum is a classic wave theory frequency wave spectrum, and the calculation formula is: ,in , is the effective wave height, is the peak period, is the frequency, is the peak elevation factor, is the dimensionless spectral width parameter.

[0030] The peak rise factor refers to the parameter that affects the spectrum shape in the Jonswap frequency wave spectrum formula. , which ranges from 1 to 7, is a key parameter reflecting the frequency wave spectrum characteristics, and the optimal value is determined by fitting.

[0031] Among them, the spectrum peak period refers to the period corresponding to the maximum energy density in the frequency wave spectrum, which is one of the key characteristic parameters of the wave spectrum.

[0032] Among them, the significant wave height refers to the average value of the highest 1 / 3 of the wave height, which is related to the zero-order spectrum distance of the frequency wave spectrum. The calculation formula is: .

[0033] The absolute error of the spectrum peak refers to the absolute value of the difference between the peak values ​​of the fitted frequency wave spectrum and the original frequency wave spectrum. The calculation formula is: , used to evaluate the maximum energy fitting accuracy in the wave group.

[0034] Among them, the zero-order spectrum error refers to the absolute value of the zero-order spectrum difference between the fitted frequency wave spectrum and the original frequency wave spectrum. The calculation formula is: The zero-order spectral distance is calculated by integrating the frequency wave spectrum with respect to the frequency, reflecting the overall energy of the wave.

[0035] The root mean square error of the spectrum value refers to the root mean square of the difference between the fitted frequency wave spectrum and the original frequency wave spectrum at all frequency points. The calculation formula is: , reflecting the overall fitting degree of the frequency wave spectrum.

[0036] Among them, the initial guess value of the peak rise factor is set to 3.3, which is used as the starting value for peak rise factor parameter optimization.

[0037] Among them, the array search method refers to discretizing the peak rise factor in the range of 1 to 7 with a step size of 0.01 to form a peak rise factor array with a dimension of 661, substituting it into the theoretical frequency wave spectrum formula in turn, calculating the error with the original frequency wave spectrum, and selecting the peak rise factor value with the smallest error.

[0038] Among them, the gradient descent method is to calculate the gradient of the objective function with respect to the peak raising factor, and iteratively update the peak raising factor parameters according to the learning rate until the objective function converges or reaches the maximum number of iterations. The gradient calculation formula is ,in , the parameter update formula is ,in is the learning rate, and its value is 0.01.

[0039] Among them, the effective wave height period level refers to the two-dimensional grid classification formed by dividing the effective wave height into intervals ranging from 0 to 12 meters with a step size of 0.5 meters, and dividing the period into intervals ranging from 2 to 20 seconds with a step size of 1 second.

[0040] The mean of the peak rise factor value refers to the arithmetic average of all peak rise factor values ​​within a certain effective wave height cycle level, and the calculation formula is: ,in , , is the wave height, For the cycle, is the number of samples that meet the conditions.

[0041] The standard deviation of the peak rise factor refers to the square root of the mean of the sum of the squares of the differences between all peak rise factor values ​​and the mean of the peak rise factor values ​​within a certain effective wave height period level. The calculation formula is: .

[0042] The 95% confidence interval of the peak elevation factor refers to the mean of the peak elevation factor plus or minus 1.96 multiplied by the standard error, where the standard error calculation formula is: , is the standard deviation of the peak elevation factor, is the number of samples.

[0043] Among them, the peak rise factor value scatter diagram refers to the period as the horizontal axis and the effective wave height as the vertical axis. The scatter diagram adopts the form of a wave height-period joint distribution table. The horizontal axis is the period range of 2 to 20 seconds, and the vertical axis is the effective wave height range of 0 to 12 meters. The table content is the mean of the peak rise factor value within the corresponding effective wave height period range.

[0044] Among them, the tropical cyclone best path dataset refers to a time series dataset that records the central location, intensity, moving speed and direction of tropical cyclones.

[0045] Among them, the typhoon wave spectrum refers to the wave spectrum that occurs during strong tropical storms and higher-level typhoons, and is within 200 kilometers from the typhoon center.

[0046] Among them, the wave amplitude is a parameter calculated based on the frequency wave spectrum, and the calculation formula is: ,in Frequency The spectral density at is the frequency interval.

[0047] Among them, the wave number is the spatial frequency of the wave, and it is calculated with the angular frequency through the dispersion relationship. The dispersion relationship formula is: ,in is the angular frequency, is the acceleration due to gravity, which is 9.8 meters per second squared. For water depth, is the wave number.

[0048] The random phase of the wave is uniformly distributed Randomly generated parameters in , used to simulate the randomness of waves.

[0049] Among them, the wave height model is a mathematical model of sea surface fluctuations constructed by superposition of multiple simple harmonic waves. The calculation formula is: ,in is the wave amplitude, is the wave number, is the angular frequency, is the random phase of the wave, is the spatial position, For time.

[0050] Optionally, it also includes the process of fitting the frequency wave spectrum in step S02, introducing the wave development energy balance equation to perform physical mechanism analysis to improve the fitting accuracy of the peak rise factor. The wave development energy balance equation is used to describe the evolution process of the frequency wave spectrum in time and space and the energy transfer mechanism, taking into account physical processes such as wind energy input, nonlinear interaction between waves, white wave dissipation and bottom friction dissipation. The input includes average wind speed, wind direction, wind duration, water depth and effective wave height, and the output is the spatiotemporal evolution characteristics of the frequency wave spectrum and the dynamic adjustment value of the peak rise factor; the wave development energy balance equation regards the frequency wave spectrum as the distribution of the energy density function in the frequency domain and the directional domain, and establishes the energy balance equation by analyzing the three source terms of energy input, nonlinear interaction between waves and energy dissipation in wind-wave interaction. The coupling relationship between the frequency wave spectrum and the external wind field is established, so that the fitting of the peak rise factor has stronger physical significance; the wave development energy balance equation can be expressed as the rate of change of the energy density function with time is equal to the sum of the source terms. By solving the wave development energy balance equation, the dynamic response mechanism of the peak rise factor value changing with the wind field conditions can be obtained, which improves the accuracy of the peak rise factor under extreme sea conditions; at the same time, the wave development energy balance equation also takes into account the influence of shallow water effect on the peak rise factor, and corrects the peak rise factor under different water depth conditions, so that the digital twin simulation has high accuracy in nearshore waters.

[0051] Optionally, for steps S05 and S06, a pre-trained wave spectrum parameter intelligent prediction network, namely the WaveSpecNet model, is established to improve the peak rise factor prediction accuracy and computational efficiency through multimodal data fusion. The specific structure of the WaveSpecNet model is a deep neural network based on an encoder-decoder architecture. The encoder part adopts a multi-head self-attention mechanism to process multi-source spatiotemporal data, including original frequency wave spectrum data, meteorological data and terrain data; the decoder part adopts a sparse attention mechanism to fuse different modal features, and outputs a peak rise factor value and a peak rise factor uncertainty estimate; the sparse attention mechanism parameters in the WaveSpecNet model are determined by a difference contribution vector calculation function, which is constructed based on the wave wind zone development theory, considering the physical contribution of wind speed, wind zone length and wind duration to the formation of frequency wave spectrum; the difference contribution vector calculation function inputs five parameters: wind speed, wind zone length, wind duration, water depth and effective wave height, and outputs a vector representing the contribution of different parameters to the formation of frequency wave spectrum. The difference contribution vector is compared with the preset difference contribution standard vector for similarity, and the sparse attention weight is adjusted according to the similarity; the steps of establishing the training data set of the WaveSpecNet model specifically include collecting original frequency wave spectrum from multiple sites over many years. The method uses wave spectrum observation data and corresponding meteorological and topographic conditions, performs spatiotemporal alignment and scale normalization on the original frequency wave spectrum data, performs data stratification according to typhoon wave spectrum and non-typhoon wave spectrum working conditions, constructs a labeled dataset containing input features and target peak rise factor values, adopts a sliding time window method to enhance the temporal characteristics of the dataset, and divides the training set, validation set and test set into two parts through cross-validation. The steps of training the WaveSpecNet model specifically include first performing self-supervised pre-training on a large-scale frequency wave spectrum dataset to learn the intrinsic relationship between the peak rise factor and the meteorological environment, then fine-tuning using the labeled dataset to optimize the prediction performance of the WaveSpecNet model in the sea area to be tested, incorporating the output of the difference contribution vector calculation function into the training process to adjust the sparse attention parameter, so that the WaveSpecNet model pays more attention to the feature combination with significant physical significance, and at the same time introduces an uncertainty estimation module to quantify the confidence of the peak rise factor value prediction. Finally, the WaveSpecNet model parameters are continuously updated through an online learning mechanism to adapt to the dynamic changes of the ocean environment.

[0052] The specific implementation of the above steps is described in detail below.

[0053] The specific implementation of step S01 is to pre-process the original wave spectrum data to ensure that the data used in the subsequent fitting process has sufficient quality. First, obtain the original directional wave spectrum data from the wave observation station or buoy system. , the numerical integration method is used to integrate the directional wave spectrum in the direction range of 0 to 2π to obtain the one-dimensional frequency wave spectrum For one-dimensional frequency wave spectra with more than 25 frequency components, the frequency points are resampled using the cubic spline interpolation algorithm, and the original irregular frequency discrete points are resampled into 25 geometric frequency discrete points. The zero-order spectral distance of the frequency wave spectrum, i.e. the total energy, is calculated by the trapezoidal integration method before and after interpolation. , ensuring that the total energy difference before and after interpolation is no greater than 0.1 square meters per second. If the interpolation result exceeds the threshold, the frequency interpolation is re-performed by adjusting the tension coefficient of the cubic spline interpolation until the energy conservation constraint is satisfied. The purpose of this step is to ensure the establishment of a standardized format for the wave spectrum data, reduce the computational effort caused by excessive data components in the subsequent fitting process, and maintain the wave energy characteristics unchanged.

[0054] The specific implementation of step S02 is to determine the theoretical frequency wave spectrum model and the parameters to be fitted. The Jonswap frequency wave spectrum is selected as the theoretical frequency wave spectrum. This model is a modification of the Pierson-Moskowitz spectrum and is suitable for describing wind waves developed under limited wind area and limited wind time conditions. Sum spectrum peak period Formula for constructing frequency wave spectrum ,in is the normalization coefficient, is the dimensionless spectrum width parameter, when hour ,when hour Determine the peak elevation factor As the parameter to be fitted, this parameter reflects the sharpness of the peak area of ​​the frequency wave spectrum and is a key parameter in describing the wave spectrum morphology. The purpose of this step is to establish a theoretical model framework to lay the foundation for subsequent parameter optimization.

[0055] The specific implementation of step S03 is to establish a fitting criterion for evaluating the degree of conformity between the fitted frequency wave spectrum and the original frequency wave spectrum. First, define the spectrum peak absolute error , used to evaluate the maximum energy fitting accuracy in the wave group, where and are the spectral values ​​of the fitted frequency wave spectrum and the original frequency wave spectrum at the peak frequency. Secondly, the zero-order spectral distance error is defined , used to evaluate the total energy difference between the fitted frequency wave spectrum and the original frequency wave spectrum, where and The zero-order spectral distances of the fitted frequency wave spectrum and the original frequency wave spectrum are calculated by the trapezoidal integration method. Finally, the root mean square error of the spectrum value is defined , which is used to evaluate the overall fitting degree of the frequency wave spectrum in the full frequency range. is the number of frequency discrete points, and The fitted frequency wave spectrum and the original frequency wave spectrum are The three criteria established in this step evaluate the fitting effect from three aspects: peak accuracy, energy conservation, and overall morphology, to ensure the comprehensiveness and accuracy of the fitting results.

[0056] The specific implementation of step S04 is to substitute the initial guess values ​​of significant wave height, spectrum peak period and peak rise factor into the theoretical frequency wave spectrum formula, and perform preliminary fitting between the theoretical frequency wave spectrum and the original frequency wave spectrum. First, extract the significant wave height from the original frequency wave spectrum data. Sum spectrum peak period , the effective wave height is calculated by the zero-order spectrum distance, that is, , the spectrum peak period is obtained by finding the frequency corresponding to the maximum energy density in the frequency wave spectrum and taking the inverse, that is, . Then set the initial guess value of the peak rise factor to 3.3, which is determined based on the statistical average of the wave observation data in the North Sea and is suitable for the initial fitting of most sea areas. Substitute these three parameters into the Jonswap frequency wave spectrum formula to calculate the preliminary fitting frequency wave spectrum. Use the fitting criterion defined in step S03 to calculate the initial fitting error as the benchmark value for subsequent optimization. The purpose of this step is to provide a reasonable initial estimate of the peak rise factor to provide a starting point for subsequent parameter optimization.

[0057] The specific implementation of step S05 is to solve the optimal fitting peak rise factor based on the optimization algorithm. First, the array search method is used to discretize the peak rise factor in the range of 1 to 7 with a step size of 0.01 to form a peak rise factor array with a dimension of 661. For each peak rise factor value in the array, the Jonswap frequency wave spectrum formula is substituted to calculate the fitting frequency wave spectrum, and the fitting criterion established in step S03 is used to calculate the fitting error. In order to comprehensively consider the three fitting criteria, a weighted error function is introduced. , where the weight coefficient , , , these weight coefficients are determined according to the actual needs of marine engineering, and more emphasis is placed on peak accuracy and energy conservation. The minimum peak rise factor value is taken as the optimal fitting result. For scenarios with limited computing resources or high real-time requirements, the gradient descent method can be used instead of the array search method to approximate the optimal solution through iteration. The gradient of the objective function with respect to the peak rise factor is calculated using numerical differentiation. The gradient calculation formula is: ,in The parameter update formula is , where the learning rate During the iteration process, the convergence condition is set as the absolute value of the gradient is less than 0.001 or the maximum number of iterations is 100. The purpose of this step is to find the peak rise factor value that makes the fitted frequency wave spectrum closest to the original frequency wave spectrum through the optimization algorithm.

[0058] The specific implementation of step S06 is to perform classification and statistical analysis based on the effective wave height period level of the wave data. First, the effective wave height is divided into intervals ranging from 0 to 12 meters with a step length of 0.5 meters, forming 24 wave height levels; the period is divided into intervals ranging from 2 to 20 seconds with a step length of 1 second, forming 18 period levels. The combination of the two forms a 24×18=432 effective wave height period level grid. For each grid unit, all peak rise factor samples belonging to the grid are collected, and the number of samples usually ranges from dozens to hundreds. For grid units with a sample size greater than 5, the mean of the peak rise factor value is calculated. ,in , , is the wave height, For the cycle, is the number of samples that meet the conditions. Calculate the standard deviation of the peak rise factor , used to characterize the degree of dispersion of the peak elevation factor within this level. Calculate the 95% confidence interval of the peak elevation factor, with the upper and lower limits of the confidence interval being Finally, a scatter plot of the peak rise factor values ​​is created, with the period as the horizontal axis and the significant wave height as the vertical axis. This table is a joint distribution table of wave height and period, showing the mean peak rise factor values ​​within the corresponding significant wave height and period range. The purpose of this step is to establish a correlation model between the peak rise factor, significant wave height, and period, providing a scientific basis for selecting wave spectrum parameters under different sea conditions.

[0059] The specific implementation method of step S07 is to divide the wave spectrum into two working conditions: typhoon wave spectrum and non-typhoon wave spectrum through the typhoon wave spatiotemporal matching process. First, obtain the tropical cyclone optimal path data set, which contains information such as the center position, time, intensity, moving speed and direction of the tropical cyclone. For each wave spectrum observation data, record its observation time and geographical location. Use the spatiotemporal matching algorithm to calculate the distance between each wave spectrum observation point and the nearest typhoon center at the same time. Time matching uses linear interpolation to interpolate the typhoon position data at 6-hour intervals to 1-hour intervals to ensure that the time matching accuracy is not less than 1 hour. The spatial distance calculation uses the spherical distance formula to calculate the great circle distance based on the longitude and latitude of the two points. The wave spectrum within 200 kilometers from the typhoon center is identified as the typhoon wave spectrum, and the rest is identified as the non-typhoon wave spectrum. For the typhoon wave spectrum and the non-typhoon wave spectrum, the peak rise factor statistical model in step S06 is established respectively to obtain the peak rise factor distribution law under the two working conditions. The purpose of this step is to distinguish the wave spectrum characteristics under different wind and wave generation mechanisms and improve the accuracy of wave simulation under special weather conditions.

[0060] The specific implementation method of step S08 is to use the matched peak rise factor value to calculate the fitting frequency wave spectrum, and calculate the wave parameters based on the fitting frequency wave spectrum to construct a wave surface height model. First, according to the effective wave height, spectrum peak period and working conditions of the observation point, the corresponding peak rise factor value is queried from the statistical model established in steps S06 and S07. Substitute the effective wave height, spectrum peak period and the peak rise factor obtained by the query into the Jonswap frequency wave spectrum formula to calculate the fitting frequency wave spectrum. The wave amplitude is calculated based on the fitting frequency wave spectrum, and the calculation formula is ,in Frequency The spectral density at is the frequency interval. Calculate the wave number by solving the dispersion relation equation Get, among them is the angular frequency, is the acceleration due to gravity, For water depth, is the wave number. The nonlinear equation is solved using the bisection method, and the initial search interval is , the convergence accuracy is set to Generate waves with random phases, from a uniform distribution Finally, the wave height model is constructed. ,in is the wave amplitude, is the wave number, is the angular frequency, is the random phase of the wave, is the spatial position, The purpose of this step is to convert the optimized frequency wave spectrum parameters into a time-domain wave surface model to realize the digital twin simulation of the ocean surface.

[0061] The specific implementation method of step S09 is to generate a wave spectrum parameter database based on the fitted peak rise factor parameters under multiple spatiotemporal conditions. First, wave observation data from major ocean areas around the world are collected, covering different latitudes, seasons and meteorological conditions. The collected wave spectrum data are gridded according to the geographical location, with a grid resolution of 1 degree × 1 degree. For each grid cell, the methods of steps S01 to S07 are applied to extract the statistical characteristics of the peak rise factor, including the monthly average, seasonal variation trend and extreme value distribution. A spatiotemporal database of peak rise factor parameters is constructed, and the database index structure adopts a quadtree method to support fast retrieval by geographical location and time. A database update mechanism is established to automatically update the peak rise factor statistical parameters of the corresponding grid cell whenever there is new wave observation data. A database interface protocol is designed to support real-time query of peak rise factor parameters by the ocean digital twin system, with an interface response time of no more than 100 milliseconds. The purpose of this step is to systematize and structure the discrete wave spectrum parameter optimization results to form a continuously updated parameter library, provide real-time and accurate peak rise factor parameter support for the ocean digital twin system, and achieve high-precision wave simulation.

[0062] Optionally, for the frequency wave spectrum fitting process in step S02, the wave development energy balance equation is introduced to perform physical mechanism analysis to improve the fitting accuracy of the peak rise factor. First, a wave development energy balance equation model is established. The model uses the frequency wave spectrum as the state variable to describe the evolution process of the frequency wave spectrum in time and space and the energy transfer mechanism. The model input parameters include average wind speed, wind direction, wind duration, water depth and effective wave height. The energy balance equation is solved by numerical integration method to obtain the spatiotemporal evolution characteristics of the frequency wave spectrum. The wave development energy balance equation considers four key physical processes: wind energy input, nonlinear interaction between waves, whitecap dissipation and bottom friction dissipation. The wind energy input source term adopts the Miles mechanism formula to describe the energy transfer between the wind field and the wave surface; the nonlinear interaction source term between waves adopts the discrete interaction approximation method, considering the four-wave resonance interaction; the whitecap dissipation source term adopts the saturation spectrum theory and is related to the wave steepness; the bottom friction dissipation source term adopts an empirical formula and is related to the water depth and track speed. The wave development energy balance equation establishes the coupling relationship between the frequency wave spectrum and the external wind field, and can dynamically calculate the theoretical value of the peak rise factor under different wind field conditions. For extreme sea conditions, a parameterized adjustment method is adopted. When the wind speed exceeds 25 meters per second, the peak rise factor is dynamically adjusted according to the ratio of wind speed to wave age, which improves the accuracy of the peak rise factor under extreme sea conditions. At the same time, considering the influence of shallow water effect on the peak rise factor, the relative water depth parameter is introduced. ,when When performing the peak rise factor analysis, the peak rise factor is modified according to an empirical formula, ensuring that the digital twin simulation also has high accuracy in nearshore waters. This optimization step transforms the determination of the peak rise factor from a purely statistical fit to a parameterized method based on physical mechanisms, enhancing the model's adaptability and reliability in complex sea conditions.

[0063] This optimization step fundamentally strengthens the physical basis of wave spectrum parameter fitting by introducing the wave development energy balance equation for physical mechanism analysis. The optimization establishes a dynamic coupling relationship between the frequency wave spectrum and the external wind field conditions, so that the determination of the peak rise factor no longer relies solely on numerical fitting, but incorporates the comprehensive influence of physical processes such as wind energy input, nonlinear interaction between waves, whitecap dissipation and bottom friction dissipation. This parameter adjustment mechanism based on physical mechanisms can capture the evolution characteristics of the wave spectrum driven by the wind field, especially for more accurate prediction of the changes in the wave spectrum morphology under extreme sea conditions. At the same time, the optimization also takes into account the influence of water depth on wave propagation characteristics. Through the shallow water effect correction mechanism, it solves the problem of reduced accuracy of traditional methods in complex nearshore terrain areas, so that the calculation of wave spectrum parameters maintains a high degree of accuracy under different water depth conditions, thereby expanding the applicability of digital twin technology in the entire sea area.

[0064] Optionally, for steps S05 and S06, a pre-trained intelligent prediction network for wave spectrum parameters, namely the WaveSpecNet model, is established. This model improves the prediction accuracy and computational efficiency of the peak rise factor through multimodal data fusion. The WaveSpecNet model is based on an encoder-decoder architecture. The encoder utilizes a multi-head self-attention mechanism to process multi-source spatiotemporal data, including raw frequency wave spectrum data, meteorological data, and topographic data. The encoder consists of three multi-head attention layers, each with eight attention heads and a hidden layer dimension of 512. The decoder utilizes a sparse attention mechanism to fuse features from different modalities. The decoder consists of two sparse attention layers and a three-layer feedforward neural network, outputting the peak rise factor value and its uncertainty estimate. The parameters of the sparse attention mechanism in the WaveSpecNet model are determined by a difference contribution vector calculation function, which is based on the theory of wave wind zone development and considers the physical contributions of wind speed, wind zone length, and wind duration to the formation of the frequency wave spectrum. The difference contribution vector calculation function inputs five parameters: wind speed, wind zone length, wind duration, water depth, and significant wave height, and outputs a vector representing the contribution of each parameter to the formation of the frequency wave spectrum. This vector is compared with a pre-set standard vector for difference contribution using cosine similarity, with a similarity threshold of 0.85. The sparse attention weights are adjusted based on the similarity. The WaveSpecNet model training dataset contains over one million records of raw frequency wave spectrum observations from multiple sites over multiple years and corresponding meteorological and topographical conditions. A sliding time window approach is used to enhance the temporal characteristics of the dataset, with a window size of 24 hours and a step size of 6 hours. The training, validation, and test sets are divided into training, validation, and test sets using a five-fold cross-validation method, with a ratio of 8:1:1. The training process begins with self-supervised pre-training on a large-scale frequency wave spectrum dataset, using a masked autoencoder to learn the intrinsic structural features of the frequency wave spectrum. Then, supervised fine-tuning is performed using a labeled dataset to optimize the model's prediction performance in the test area. An adaptive learning rate strategy is used during training, with an initial learning rate of 0.001 decaying by 0.1 every 30 training cycles. An uncertainty estimation module is introduced, using an ensemble learning approach to quantify the confidence level of the peak rise factor predictions, providing a risk assessment basis for the digital twin system. This optimization step combines deep learning techniques with ocean physics mechanisms to significantly improve the accuracy of peak rise factor predictions. For water depth, is the wave number.

[0065] The random phase of the wave is uniformly distributed Randomly generated parameters in , used to simulate the randomness of waves.

[0066] Among them, the wave height model is a mathematical model of sea surface fluctuations constructed by superposition of multiple simple harmonic waves. The calculation formula is: ,in is the wave amplitude, is the wave number, is the angular frequency, is the random phase of the wave, is the spatial position, For time.

[0067] Optionally, it also includes the process of fitting the frequency wave spectrum in step S02, introducing the wave development energy balance equation to perform physical mechanism analysis to improve the fitting accuracy of the peak rise factor. The wave development energy balance equation is used to describe the evolution process of the frequency wave spectrum in time and space and the energy transfer mechanism, taking into account physical processes such as wind energy input, nonlinear interaction between waves, white wave dissipation and bottom friction dissipation. The input includes average wind speed, wind direction, wind duration, water depth and effective wave height, and the output is the spatiotemporal evolution characteristics of the frequency wave spectrum and the dynamic adjustment value of the peak rise factor; the wave development energy balance equation regards the frequency wave spectrum as the distribution of the energy density function in the frequency domain and the directional domain, and establishes the energy balance equation by analyzing the three source terms of energy input, nonlinear interaction between waves and energy dissipation in wind-wave interaction. The coupling relationship between the frequency wave spectrum and the external wind field is established, so that the fitting of the peak rise factor has stronger physical significance; the wave development energy balance equation can be expressed as the rate of change of the energy density function with time is equal to the sum of the source terms. By solving the wave development energy balance equation, the dynamic response mechanism of the peak rise factor value changing with the wind field conditions can be obtained, which improves the accuracy of the peak rise factor under extreme sea conditions; at the same time, the wave development energy balance equation also takes into account the influence of shallow water effect on the peak rise factor, and corrects the peak rise factor under different water depth conditions, so that the digital twin simulation has high accuracy in nearshore waters.

[0068] Optionally, for steps S05 and S06, a pre-trained wave spectrum parameter intelligent prediction network, namely the WaveSpecNet model, is established to improve the peak rise factor prediction accuracy and computational efficiency through multimodal data fusion. The specific structure of the WaveSpecNet model is a deep neural network based on an encoder-decoder architecture. The encoder part adopts a multi-head self-attention mechanism to process multi-source spatiotemporal data, including original frequency wave spectrum data, meteorological data and terrain data; the decoder part adopts a sparse attention mechanism to fuse different modal features, and outputs a peak rise factor value and a peak rise factor uncertainty estimate; the sparse attention mechanism parameters in the WaveSpecNet model are determined by a difference contribution vector calculation function, which is constructed based on the wave wind zone development theory, considering the physical contribution of wind speed, wind zone length and wind duration to the formation of frequency wave spectrum; the difference contribution vector calculation function inputs five parameters: wind speed, wind zone length, wind duration, water depth and effective wave height, and outputs a vector representing the contribution of different parameters to the formation of frequency wave spectrum. The difference contribution vector is compared with the preset difference contribution standard vector for similarity, and the sparse attention weight is adjusted according to the similarity; the steps of establishing the training data set of the WaveSpecNet model specifically include collecting original frequency wave spectrum from multiple sites over many years. The method uses wave spectrum observation data and corresponding meteorological and topographic conditions, performs spatiotemporal alignment and scale normalization on the original frequency wave spectrum data, performs data stratification according to typhoon wave spectrum and non-typhoon wave spectrum working conditions, constructs a labeled dataset containing input features and target peak rise factor values, adopts a sliding time window method to enhance the temporal characteristics of the dataset, and divides the training set, validation set and test set into two parts through cross-validation. The steps of training the WaveSpecNet model specifically include first performing self-supervised pre-training on a large-scale frequency wave spectrum dataset to learn the intrinsic relationship between the peak rise factor and the meteorological environment, then fine-tuning using the labeled dataset to optimize the prediction performance of the WaveSpecNet model in the sea area to be tested, incorporating the output of the difference contribution vector calculation function into the training process to adjust the sparse attention parameter, so that the WaveSpecNet model pays more attention to the feature combination with significant physical significance, and at the same time introduces an uncertainty estimation module to quantify the confidence of the peak rise factor value prediction. Finally, the WaveSpecNet model parameters are continuously updated through an online learning mechanism to adapt to the dynamic changes of the ocean environment.

[0069] The specific implementation of the above steps is described in detail below.

[0070] The specific implementation of step S01 is to pre-process the original wave spectrum data to ensure that the data used in the subsequent fitting process has sufficient quality. First, obtain the original directional wave spectrum data from the wave observation station or buoy system. , the numerical integration method is used to integrate the directional wave spectrum in the direction range of 0 to 2π to obtain the one-dimensional frequency wave spectrum For one-dimensional frequency wave spectra with more than 25 frequency components, the frequency points are resampled using the cubic spline interpolation algorithm, and the original irregular frequency discrete points are resampled into 25 geometric frequency discrete points. The zero-order spectral distance of the frequency wave spectrum, i.e. the total energy, is calculated by the trapezoidal integration method before and after interpolation. , ensuring that the total energy difference before and after interpolation is no greater than 0.1 square meters per second. If the interpolation result exceeds the threshold, the frequency interpolation is re-performed by adjusting the tension coefficient of the cubic spline interpolation until the energy conservation constraint is satisfied. The purpose of this step is to ensure the establishment of a standardized format for the wave spectrum data, reduce the computational effort caused by excessive data components in the subsequent fitting process, and maintain the wave energy characteristics unchanged.

[0071] The specific implementation of step S02 is to determine the theoretical frequency wave spectrum model and the parameters to be fitted. The Jonswap frequency wave spectrum is selected as the theoretical frequency wave spectrum. This model is a modification of the Pierson-Moskowitz spectrum and is suitable for describing wind waves developed under limited wind area and limited wind time conditions. Sum spectrum peak period Formula for constructing frequency wave spectrum ,in is the normalization coefficient, is the dimensionless spectrum width parameter, when hour ,when hour Determine the peak elevation factor As the parameter to be fitted, this parameter reflects the sharpness of the peak area of ​​the frequency wave spectrum and is a key parameter in describing the wave spectrum morphology. The purpose of this step is to establish a theoretical model framework to lay the foundation for subsequent parameter optimization.

[0072] The specific implementation of step S03 is to establish a fitting criterion for evaluating the degree of conformity between the fitted frequency wave spectrum and the original frequency wave spectrum. First, define the spectrum peak absolute error , used to evaluate the maximum energy fitting accuracy in the wave group, where and are the spectral values ​​of the fitted frequency wave spectrum and the original frequency wave spectrum at the peak frequency. Secondly, the zero-order spectral distance error is defined , used to evaluate the total energy difference between the fitted frequency wave spectrum and the original frequency wave spectrum, where and The zero-order spectral distances of the fitted frequency wave spectrum and the original frequency wave spectrum are calculated by the trapezoidal integration method. Finally, the root mean square error of the spectrum value is defined , which is used to evaluate the overall fitting degree of the frequency wave spectrum in the full frequency range. is the number of frequency discrete points, and The fitted frequency wave spectrum and the original frequency wave spectrum are The three criteria established in this step evaluate the fitting effect from three aspects: peak accuracy, energy conservation, and overall morphology, to ensure the comprehensiveness and accuracy of the fitting results.

[0073] The specific implementation of step S04 is to substitute the initial guess values ​​of significant wave height, spectrum peak period and peak rise factor into the theoretical frequency wave spectrum formula, and perform preliminary fitting between the theoretical frequency wave spectrum and the original frequency wave spectrum. First, extract the significant wave height from the original frequency wave spectrum data. Sum spectrum peak period , the effective wave height is calculated by the zero-order spectrum distance, that is, , the spectrum peak period is obtained by finding the frequency corresponding to the maximum energy density in the frequency wave spectrum and taking the inverse, that is, . Then set the initial guess value of the peak rise factor to 3.3, which is determined based on the statistical average of the wave observation data in the North Sea and is suitable for the initial fitting of most sea areas. Substitute these three parameters into the Jonswap frequency wave spectrum formula to calculate the preliminary fitting frequency wave spectrum. Use the fitting criterion defined in step S03 to calculate the initial fitting error as the benchmark value for subsequent optimization. The purpose of this step is to provide a reasonable initial estimate of the peak rise factor to provide a starting point for subsequent parameter optimization.

[0074] The specific implementation of step S05 is to solve the optimal fitting peak rise factor based on the optimization algorithm. First, the array search method is used to discretize the peak rise factor in the range of 1 to 7 with a step size of 0.01 to form a peak rise factor array with a dimension of 661. For each peak rise factor value in the array, the Jonswap frequency wave spectrum formula is substituted to calculate the fitting frequency wave spectrum, and the fitting criterion established in step S03 is used to calculate the fitting error. In order to comprehensively consider the three fitting criteria, a weighted error function is introduced. , where the weight coefficient , , , these weight coefficients are determined according to the actual needs of marine engineering, and more emphasis is placed on peak accuracy and energy conservation. The minimum peak rise factor value is taken as the optimal fitting result. For scenarios with limited computing resources or high real-time requirements, the gradient descent method can be used instead of the array search method to approximate the optimal solution through iteration. The gradient of the objective function with respect to the peak rise factor is calculated using numerical differentiation. The gradient calculation formula is: ,in The parameter update formula is , where the learning rate During the iteration process, the convergence condition is set as the absolute value of the gradient is less than 0.001 or the maximum number of iterations is 100. The purpose of this step is to find the peak rise factor value that makes the fitted frequency wave spectrum closest to the original frequency wave spectrum through the optimization algorithm.

[0075] The specific implementation of step S06 is to perform classification and statistical analysis based on the effective wave height period level of the wave data. First, the effective wave height is divided into intervals ranging from 0 to 12 meters with a step length of 0.5 meters, forming 24 wave height levels; the period is divided into intervals ranging from 2 to 20 seconds with a step length of 1 second, forming 18 period levels. The combination of the two forms a 24×18=432 effective wave height period level grid. For each grid unit, all peak rise factor samples belonging to the grid are collected, and the number of samples usually ranges from dozens to hundreds. For grid units with a sample size greater than 5, the mean of the peak rise factor value is calculated. ,in , , is the wave height, For the cycle, is the number of samples that meet the conditions. Calculate the standard deviation of the peak rise factor , used to characterize the degree of dispersion of the peak elevation factor within this level. Calculate the 95% confidence interval of the peak elevation factor, with the upper and lower limits of the confidence interval being Finally, a scatter plot of the peak rise factor values ​​is created, with the period as the horizontal axis and the significant wave height as the vertical axis. This table is a joint distribution table of wave height and period, showing the mean peak rise factor values ​​within the corresponding significant wave height and period range. The purpose of this step is to establish a correlation model between the peak rise factor, significant wave height, and period, providing a scientific basis for selecting wave spectrum parameters under different sea conditions.

[0076] The specific implementation method of step S07 is to divide the wave spectrum into two working conditions: typhoon wave spectrum and non-typhoon wave spectrum through the typhoon wave spatiotemporal matching process. First, obtain the tropical cyclone optimal path data set, which contains information such as the center position, time, intensity, moving speed and direction of the tropical cyclone. For each wave spectrum observation data, record its observation time and geographical location. Use the spatiotemporal matching algorithm to calculate the distance between each wave spectrum observation point and the nearest typhoon center at the same time. Time matching uses linear interpolation to interpolate the typhoon position data at 6-hour intervals to 1-hour intervals to ensure that the time matching accuracy is not less than 1 hour. The spatial distance calculation uses the spherical distance formula to calculate the great circle distance based on the longitude and latitude of the two points. The wave spectrum within 200 kilometers from the typhoon center is identified as the typhoon wave spectrum, and the rest is identified as the non-typhoon wave spectrum. For the typhoon wave spectrum and the non-typhoon wave spectrum, the peak rise factor statistical model in step S06 is established respectively to obtain the peak rise factor distribution law under the two working conditions. The purpose of this step is to distinguish the wave spectrum characteristics under different wind and wave generation mechanisms and improve the accuracy of wave simulation under special weather conditions.

[0077] The specific implementation method of step S08 is to use the matched peak rise factor value to calculate the fitting frequency wave spectrum, and calculate the wave parameters based on the fitting frequency wave spectrum to construct a wave surface height model. First, according to the effective wave height, spectrum peak period and working conditions of the observation point, the corresponding peak rise factor value is queried from the statistical model established in steps S06 and S07. Substitute the effective wave height, spectrum peak period and the peak rise factor obtained by the query into the Jonswap frequency wave spectrum formula to calculate the fitting frequency wave spectrum. The wave amplitude is calculated based on the fitting frequency wave spectrum, and the calculation formula is ,in Frequency The spectral density at is the frequency interval. Calculate the wave number by solving the dispersion relation equation Get, among them is the angular frequency, is the acceleration due to gravity, For water depth, is the wave number. The nonlinear equation is solved using the bisection method, and the initial search interval is , the convergence accuracy is set to Generate waves with random phases, from a uniform distribution Finally, the wave height model is constructed. ,in is the wave amplitude, is the wave number, is the angular frequency, is the random phase of the wave, is the spatial position, The purpose of this step is to convert the optimized frequency wave spectrum parameters into a time-domain wave surface model to realize the digital twin simulation of the ocean surface.

[0078] The specific implementation method of step S09 is to generate a wave spectrum parameter database based on the fitted peak rise factor parameters under multiple spatiotemporal conditions. First, wave observation data from major ocean areas around the world are collected, covering different latitudes, seasons and meteorological conditions. The collected wave spectrum data are gridded according to the geographical location, with a grid resolution of 1 degree × 1 degree. For each grid cell, the methods of steps S01 to S07 are applied to extract the statistical characteristics of the peak rise factor, including the monthly average, seasonal variation trend and extreme value distribution. A spatiotemporal database of peak rise factor parameters is constructed, and the database index structure adopts a quadtree method to support fast retrieval by geographical location and time. A database update mechanism is established to automatically update the peak rise factor statistical parameters of the corresponding grid cell whenever there is new wave observation data. A database interface protocol is designed to support real-time query of peak rise factor parameters by the ocean digital twin system, with an interface response time of no more than 100 milliseconds. The purpose of this step is to systematize and structure the discrete wave spectrum parameter optimization results to form a continuously updated parameter library, provide real-time and accurate peak rise factor parameter support for the ocean digital twin system, and achieve high-precision wave simulation.

[0079] Optionally, for the frequency wave spectrum fitting process in step S02, the wave development energy balance equation is introduced to perform physical mechanism analysis to improve the fitting accuracy of the peak rise factor. First, a wave development energy balance equation model is established. The model uses the frequency wave spectrum as the state variable to describe the evolution process of the frequency wave spectrum in time and space and the energy transfer mechanism. The model input parameters include average wind speed, wind direction, wind duration, water depth and effective wave height. The energy balance equation is solved by numerical integration method to obtain the spatiotemporal evolution characteristics of the frequency wave spectrum. The wave development energy balance equation considers four key physical processes: wind energy input, nonlinear interaction between waves, whitecap dissipation and bottom friction dissipation. The wind energy input source term adopts the Miles mechanism formula to describe the energy transfer between the wind field and the wave surface; the nonlinear interaction source term between waves adopts the discrete interaction approximation method, considering the four-wave resonance interaction; the whitecap dissipation source term adopts the saturation spectrum theory and is related to the wave steepness; the bottom friction dissipation source term adopts an empirical formula and is related to the water depth and track speed. The wave development energy balance equation establishes the coupling relationship between the frequency wave spectrum and the external wind field, and can dynamically calculate the theoretical value of the peak rise factor under different wind field conditions. For extreme sea conditions, a parameterized adjustment method is adopted. When the wind speed exceeds 25 meters per second, the peak rise factor is dynamically adjusted according to the ratio of wind speed to wave age, which improves the accuracy of the peak rise factor under extreme sea conditions. At the same time, considering the influence of shallow water effect on the peak rise factor, the relative water depth parameter is introduced. ,when When performing the peak rise factor analysis, the peak rise factor is modified according to an empirical formula, ensuring that the digital twin simulation also has high accuracy in nearshore waters. This optimization step transforms the determination of the peak rise factor from a purely statistical fit to a parameterized method based on physical mechanisms, enhancing the model's adaptability and reliability in complex sea conditions.

[0080] This optimization step fundamentally strengthens the physical basis of wave spectrum parameter fitting by introducing the wave development energy balance equation for physical mechanism analysis. The optimization establishes a dynamic coupling relationship between the frequency wave spectrum and the external wind field conditions, so that the determination of the peak rise factor no longer relies solely on numerical fitting, but incorporates the comprehensive influence of physical processes such as wind energy input, nonlinear interaction between waves, whitecap dissipation and bottom friction dissipation. This parameter adjustment mechanism based on physical mechanisms can capture the evolution characteristics of the wave spectrum driven by the wind field, especially for more accurate prediction of the changes in the wave spectrum morphology under extreme sea conditions. At the same time, the optimization also takes into account the influence of water depth on wave propagation characteristics. Through the shallow water effect correction mechanism, it solves the problem of reduced accuracy of traditional methods in complex nearshore terrain areas, so that the calculation of wave spectrum parameters maintains a high degree of accuracy under different water depth conditions, thereby expanding the applicability of digital twin technology in the entire sea area.

[0081] Optionally, for steps S05 and S06, a pre-trained intelligent prediction network for wave spectrum parameters, namely the WaveSpecNet model, is established. This model improves the prediction accuracy and computational efficiency of the peak rise factor through multimodal data fusion. The WaveSpecNet model is based on an encoder-decoder architecture. The encoder utilizes a multi-head self-attention mechanism to process multi-source spatiotemporal data, including raw frequency wave spectrum data, meteorological data, and topographic data. The encoder consists of three multi-head attention layers, each with eight attention heads and a hidden layer dimension of 512. The decoder utilizes a sparse attention mechanism to fuse features from different modalities. The decoder consists of two sparse attention layers and a three-layer feedforward neural network, outputting the peak rise factor value and its uncertainty estimate. The parameters of the sparse attention mechanism in the WaveSpecNet model are determined by a difference contribution vector calculation function, which is based on the theory of wave wind zone development and considers the physical contributions of wind speed, wind zone length, and wind duration to the formation of the frequency wave spectrum. The difference contribution vector calculation function inputs five parameters: wind speed, wind zone length, wind duration, water depth, and significant wave height, and outputs a vector representing the contribution of each parameter to the formation of the frequency wave spectrum. This vector is compared with a pre-set standard vector for difference contribution using cosine similarity, with a similarity threshold of 0.85. The sparse attention weights are adjusted based on the similarity. The WaveSpecNet model training dataset contains over one million records of raw frequency wave spectrum observations from multiple sites over multiple years and corresponding meteorological and topographical conditions. A sliding time window approach is used to enhance the temporal characteristics of the dataset, with a window size of 24 hours and a step size of 6 hours. The training, validation, and test sets are divided into training, validation, and test sets using a five-fold cross-validation method, with a ratio of 8:1:1. The training process begins with self-supervised pre-training on a large-scale frequency wave spectrum dataset, using a masked autoencoder to learn the intrinsic structural features of the frequency wave spectrum. Then, supervised fine-tuning is performed using a labeled dataset to optimize the model's prediction performance in the test area. An adaptive learning rate strategy is used during training, with an initial learning rate of 0.001 decaying by 0.1 every 30 training cycles. An uncertainty estimation module is introduced, using an ensemble learning approach to quantify the confidence level of the peak rise factor predictions, providing a risk assessment basis for the digital twin system. This optimization step combines deep learning technology with ocean physics mechanisms to significantly improve the accuracy of peak rise factor prediction. The calculation formula for the geometric frequency point is: ; Where, For the frequency points, The value ranges from 1 to 25; The minimum frequency point is usually 0.03 Hz; The maximum frequency point is usually set to 0.5 Hz. The zero-order spectrum of the frequency wave spectrum is calculated by the trapezoidal integration method before and after interpolation, that is, the total energy , the calculation formula is: ; The discrete form is: ; Where, is the number of frequency discrete points; For the frequency discrete points; is the frequency interval, and the calculation method is For the boundary points and Ensure that the total energy difference before and after interpolation is no more than 0.1 square meters per second, that is: ; Where, is the zero-order spectrum distance of the original frequency wave spectrum; is the zero-order spectrum distance of the frequency wave spectrum after interpolation. If the interpolation result exceeds the threshold, the tension coefficient of the cubic spline interpolation is adjusted. Re-interpolate the frequency. The initial value of is 0.5, and the adjustment range is 0.1 to 0.9, with a step size of 0.1 each time, until the energy conservation constraint is satisfied.

[0082] The specific implementation of step S02 is to determine the theoretical frequency wave spectrum model and the parameters to be fitted. The Jonswap frequency wave spectrum is selected as the theoretical frequency wave spectrum. This model is a modification of the Pierson-Moskowitz spectrum and is suitable for describing wind waves developed under limited wind area and limited wind time conditions. Sum spectrum peak period Formula for constructing frequency wave spectrum: ; Where, is the normalization coefficient, and the calculation formula is: ; is the significant wave height in meters; is the spectrum peak period, in seconds; is the frequency in Hertz; is the peak elevation factor, ranging from 1 to 7; is the dimensionless spectrum width parameter, when hour ,when hour ,in is the spectrum peak frequency. Determine the peak elevation factor As a parameter to be fitted, this parameter reflects the sharpness of the peak area of ​​the frequency wave spectrum and is a key parameter for describing the wave spectrum morphology. The larger the peak rise factor, the sharper the peak area of ​​the frequency wave spectrum and the higher the energy concentration; the smaller the peak rise factor, the flatter the peak area of ​​the frequency wave spectrum and the more uniform the energy distribution. In the Jonswap frequency wave spectrum model, when When , the model degenerates into the Pierson-Moskowitz spectrum, which is suitable for fully developed wind waves; when , the model is able to describe the developing wind and wave characteristics.

[0083] The specific implementation of step S03 is to establish a fitting criterion for evaluating the degree of conformity between the fitted frequency wave spectrum and the original frequency wave spectrum. First, define the spectrum peak absolute error , the calculation formula is: ; Where, is the spectrum value of the fitting frequency wave spectrum at the peak frequency; is the spectrum value of the original frequency wave spectrum at the spectrum peak frequency. The spectrum peak absolute error is used to evaluate the maximum energy fitting accuracy in the wave group, and its threshold is usually set at 10% of the original spectrum peak, that is, Next, define the zero-order spectral distance error , the calculation formula is: ; Where, is the zero-order spectrum distance of the fitted frequency wave spectrum; is the zero-order spectrum distance of the original frequency wave spectrum. The zero-order spectrum distance is calculated by the trapezoidal integration method, and the formula is: ; ; The zero-order spectral distance error is used to evaluate the total energy difference between the fitted frequency wave spectrum and the original frequency wave spectrum, and its threshold is usually set at 0.1 square meters per second, that is, Finally, the root mean square error of the spectrum value is defined as , the calculation formula is: ; Where, is the number of frequency discrete points; To fit the frequency wave spectrum in Spectral value at frequency point; The original frequency wave spectrum is The spectrum value at each frequency point. The root mean square error of the spectrum value is used to evaluate the overall fitting degree of the frequency wave spectrum in the full frequency band, and its threshold is usually set at 20% of the root mean square value of the original frequency wave spectrum, that is, .

[0084] The specific implementation of step S04 is to substitute the initial guess values ​​of significant wave height, spectrum peak period and peak rise factor into the theoretical frequency wave spectrum formula, and perform preliminary fitting between the theoretical frequency wave spectrum and the original frequency wave spectrum. First, extract the significant wave height from the original frequency wave spectrum data. Sum spectrum peak period , the effective wave height is calculated by the zero-order spectrum distance, and the calculation formula is: ; The peak period is obtained by finding the frequency corresponding to the maximum energy density in the frequency wave spectrum and taking the inverse. The calculation formula is: ; Where, is the spectrum peak frequency. Then the peak rise factor is initially guessed to be 3.3. This value is determined based on the statistical average of the North Sea wave observation data and is suitable for the initial fitting of most sea areas. Substituting these three parameters into the Jonswap frequency wave spectrum formula, the preliminary fitting frequency wave spectrum is calculated: ; Where, is the initial guess value of the peak rise factor. Use the fitting criterion defined in step S03 to calculate the initial fitting error and calculate the absolute error of the spectrum peak value respectively. , zero-order spectral distance error RMS error of the sum spectrum , as the benchmark value for subsequent optimization.

[0085] The specific implementation of step S05 is to solve the optimal fitting peak raising factor based on the array search method or the gradient descent method. First, the array search method is used to discretize the peak raising factor in the range of 1 to 7 with a step size of 0.01 to form a peak raising factor array with a dimension of 601: ; Where, is the array index, ranging from 1 to 601; For the For each peak-raising factor value in the array, substitute the Jonswap frequency wave spectrum formula to calculate the fitted frequency wave spectrum: ; Where, To correspond to The normalization coefficient is calculated as follows: .

[0086] The fitting error is calculated using the fitting criterion established in step S03, and a weighted error function is introduced. , the calculation formula is: ; Where, 、 and Use The absolute error of the spectrum peak, the zero-order spectrum distance error and the root mean square error of the spectrum value during fitting; 、 and is the weight coefficient, usually taken as 、 and , these weight coefficients are determined according to the actual needs of marine engineering, and more emphasis is placed on peak accuracy and energy conservation. The smallest peak elevation factor value is taken as the best fitting result: .

[0087] For scenarios with limited computing resources or high real-time requirements, the gradient descent method can be used instead of the array search method to approximate the optimal solution through iteration. The gradient of the objective function with respect to the peak rise factor is calculated using numerical differentiation. The gradient calculation formula is: ; Where, is the step size for gradient calculation. The parameter update formula is: ; Where, For the The peak elevation factor value of the iteration; For the The peak elevation factor value of the iteration; is the learning rate, the value is 0.01; For the The gradient of the objective function at the iteration. During the iteration, the convergence condition is set as the absolute value of the gradient is less than 0.001 or the maximum number of iterations is 100, that is: or .

[0088] The specific implementation of step S06 is to perform classification and statistical analysis based on the significant wave height period level of the wave data. First, the significant wave height is divided into intervals ranging from 0 to 12 meters with a step length of 0.5 meters, forming 24 wave height levels; the period is divided into intervals ranging from 2 to 20 seconds with a step length of 1 second, forming 18 period levels. The combination of the two forms a 24×18=432 significant wave height period level grid. For each grid cell, , collect all peak rise factor samples belonging to the grid, and the sample collection conditions are: and ; Where, For the The effective wave height of each sample; For the The peak period of each sample; is the significant wave height at the grid center; For grid cells with more than 5 samples, calculate the mean of the peak rise factor values. , the calculation formula is: ; Where, For grid cells The number of samples within For the Calculate the peak elevation factor standard deviation of the sample. , the calculation formula is: ; Calculate the 95% confidence interval of the peak elevation factor. The upper and lower limits of the confidence interval are calculated as follows: ; Where, The standard error is . Finally, a scatter plot of the peak rise factor values ​​is made, with the period as the horizontal axis and the significant wave height as the vertical axis. A wave height-period joint distribution table is used, and the table content is the mean of the peak rise factor values ​​within the corresponding significant wave height period range.

[0089] The specific implementation of step S07 is to divide the ocean wave spectrum into two working conditions: typhoon ocean wave spectrum and non-typhoon ocean wave spectrum through the typhoon wave spatiotemporal matching process. First, obtain the tropical cyclone optimal path data set, which contains the central position, time, intensity, moving speed and direction of the tropical cyclone. For each ocean wave spectrum observation data, record its observation time. and geographical location ,in is the longitude, is the latitude. The time-space matching algorithm is used to calculate the distance between each wave spectrum observation point and the nearest typhoon center at the same time. Time matching uses linear interpolation to interpolate the typhoon position data at 6-hour intervals to 1-hour intervals. The interpolation formula is: ; ; Where, and Separate moments The longitude and latitude of the typhoon's center; and are the left and right boundary moments of the interpolation interval, satisfying ; 、 、 and Separate moments and The longitude and latitude of the typhoon center. The spatial distance calculation uses the spherical distance formula to calculate the great circle distance based on the longitude and latitude of two points: ; Where, is the radius of the Earth, which is 6371 km; and are the latitude and longitude of the wave spectrum observation point, respectively, in radians; and are the latitude and longitude of the typhoon center, in radians. The wave spectrum within 200 kilometers from the typhoon center is identified as the typhoon wave spectrum, that is, The peak rise factor statistical model in step S06 is established for the typhoon wave spectrum and the non-typhoon wave spectrum respectively, and the peak rise factor distribution law under the two working conditions is obtained.

[0090] The specific implementation of step S08 is to calculate the fitting frequency wave spectrum using the peak rise factor value after matching, and calculate the wave parameters based on the fitting frequency wave spectrum to construct the wave surface height model. , spectral peak period and its corresponding working conditions, query the corresponding peak rise factor value from the statistical model established in steps S06 and S07 Substitute the significant wave height, spectrum peak period and peak rise factor obtained from the query into the Jonswap frequency wave spectrum formula to calculate the fitted frequency wave spectrum Calculate wave amplitude based on the fitted frequency wave spectrum , the calculation formula is: ; Where, Frequency The wave amplitude at Frequency spectral density at ; is the frequency interval. Calculate the wave number , by solving the dispersion relation equation we get: ; Where, is the angular frequency; is the acceleration due to gravity, which is 9.8 meters per second squared; is the water depth in meters; is the wave number in radians per meter. The nonlinear equation is solved using the bisection method, and the initial search interval is , the convergence accuracy is set to The binary iteration formula is: ; Where, For the The estimated wave number for the iteration; For the The estimated wave number for the iteration; and are the lower and upper bounds of the current iteration interval respectively. The iteration termination condition is: or .

[0091] Generates random phases of waves , from a uniform distribution Random sampling from: ; Finally, the wave surface height model is constructed, and the calculation formula is: ; Where, For location and time The wavefront height at is the number of frequency components, usually 25; For the The wave amplitude of each frequency component; For the The wave number of each frequency component; For the The angular frequency of each frequency component; For the The random phase of the wave of each frequency component; is the spatial position in meters; The time is in seconds.

[0092] The specific implementation of step S09 is to generate a wave spectrum parameter database based on the fitted peak rise factor parameters under multiple spatiotemporal conditions. First, collect wave observation data from major sea areas around the world, covering different latitudes, seasons and meteorological conditions. The collected wave spectrum data is gridded according to the geographical location, with a grid resolution of 1 degree × 1 degree. For each grid cell , apply the method of steps S01 to S07 to extract the statistical characteristics of the peak rise factor, including the monthly average , seasonal change trends and the extreme value distribution parameter and The monthly average is calculated as follows: ; Where, For grid cells In the month The number of samples within For the The peak rise factor value of each sample. The seasonal variation trend is obtained by Fourier series fitting: ; Where, 、 and is the Fourier coefficient, obtained by least squares fitting; is the fundamental frequency, corresponding to the four seasons; is the seasonal index, spring is 1, summer is 2, autumn is 3, and winter is 4. The extreme value distribution uses the generalized extreme value distribution to describe the maximum value distribution characteristics of the peak rise factor, and the cumulative distribution function is: ; Where, is a positional parameter; is the scale parameter; is the shape parameter. These three parameters are estimated by the maximum likelihood method: ; Where, is the probability density function of the generalized extreme value distribution, and the calculation formula is: .

[0093] A spatiotemporal database of peak rise factor parameters is constructed. The database index structure uses a quadtree method to support fast retrieval by geographic location and time. The process of constructing a quadtree is to recursively divide the space into four sub-regions. Each leaf node corresponds to a grid cell and its peak rise factor statistical characteristics. The quadtree node structure is: ; Where, 、 、 and are the longitude and latitude ranges of the node’s corresponding area respectively; It is a list of child nodes, empty if it is a leaf node; The peak rise factor statistical characteristics stored for the node are empty if it is a non-leaf node. The retrieval algorithm starts from the root node and visits it layer by layer according to the latitude and longitude of the query point until it reaches a leaf node or finds the minimum area node containing the query point. Time retrieval is achieved by maintaining 12 months of peak rise factor statistical characteristics in each spatial node, supporting fast queries by month. A database update mechanism is established to automatically update the peak rise factor statistical parameters of the corresponding grid cell whenever new wave observation data is available. The update formula uses the exponential sliding average method: ; Where, and are the monthly averages after and before the update, respectively; is the peak elevation factor value of the new observation sample; is the smoothing coefficient, with a value of 0.1. A database interface protocol is designed to support real-time query of peak rise factor parameters in the marine digital twin system, with an interface response time of no more than 100 milliseconds. The database interface includes three modes: spatial query, time query, and comprehensive query. The spatial query interface is: ; The time query interface is: ; The comprehensive query interface is: ; Where, It refers to sea conditions, including typhoon and non-typhoon types.

[0094] In another specific embodiment of the present invention, optimization steps for S02, S05 and S06 are considered, which are described in detail below.

[0095] The specific implementation method of the optimization step 1 is to introduce the wave development energy balance equation to analyze the physical mechanism of the frequency wave spectrum fitting process in step S02 to improve the fitting accuracy of the peak rise factor. First, a wave development energy balance equation model is established. The model describes the evolution process of the frequency wave spectrum in time and space and the energy transfer mechanism. The wave development energy balance equation is expressed as: ; Where, is the energy density of the wave spectrum in the frequency direction, in square meters seconds per arc; is the time in seconds; is the spatial gradient operator; is the group velocity vector in meters per second; Enter the source term for wind energy; is the source term of nonlinear interaction between waves; is the whitecap dissipation source term; is the bottom friction dissipation source term. The wind energy input source term adopts the Miles mechanism formula: ; Where, is the exponential growth rate, and the calculation formula is: ; Where, is the density of air, which is 1.29 kg per cubic meter; is the density of water, which is 1025 kg per cubic meter; is the friction speed in meters per second; is the phase velocity, and the calculation formula is ; is the direction of wave propagation; is the wind direction. The discrete interaction approximation method is used for the nonlinear interaction source term between waves: ; Where, and are energy gain and energy loss terms respectively, and the specific calculation adopts the four-wave interaction model: ; ; Where, and is the coupling coefficient, with values ​​of 0.25 and 0.75 respectively; is the acceleration due to gravity, which is 9.8 meters per square second. The white wave dissipation source term adopts the saturation spectrum theory: ; Where, is the dissipation coefficient, which is 0.0023; is the wave number in radians per meter; is the water depth in meters; is the Pierson-Moskowitz equilibrium spectrum value, and the calculation formula is ,in ; is a nonlinear exponent with a value of 2. The bottom friction dissipation source term uses the empirical formula: ; Where, is the bottom friction coefficient, which is 0.015. Based on the solution of the energy balance equation, the peak rise factor is established. and the dimensionless parameter wave age Functional relationship: ; Where, is the wave age, is the acceleration due to gravity, is the peak period, is the wind speed at a height of 10 meters. For shallow water conditions, the relative water depth correction formula is introduced: ,when hour; Where, is the peak wave number, For water depth, This optimization step transforms the determination of the peak rise factor from a purely statistical fitting method to a parameterization method based on physical mechanisms, thus enhancing the adaptability of the model in complex sea conditions.

[0096] The specific implementation of the optimization step 2 is to establish a pre-trained wave spectrum parameter intelligent prediction network, namely the WaveSpecNet model, for steps S05 and S06. This model improves the prediction accuracy and computational efficiency of the peak rise factor through multimodal data fusion. The WaveSpecNet model is based on an encoder-decoder architecture, and the input and output relationship of the model is expressed as: ; Where, is the peak elevation factor output value; is the original frequency wave spectrum data; Meteorological data, including wind speed, wind direction, air pressure and other parameters; is the topographic data, including parameters such as water depth and seabed slope. The encoder uses a multi-head self-attention mechanism to process multi-source spatiotemporal data. The attention calculation formula is: ; Where, 、 and They are query matrix, key matrix and value matrix respectively, with dimensions of 、 and ; is the dimension of the key; and are the number of queries and keys, respectively; is the dimension of the value. The multi-head attention mechanism is expressed as: ; Where, ; 、 and Respectively Note that the extreme value distribution describes the maximum distribution characteristics of the peak rise factor, and the cumulative distribution function is: ; Where, is a positional parameter; is the scale parameter; is the shape parameter. These three parameters are estimated by the maximum likelihood method: ; Where, is the probability density function of the generalized extreme value distribution, and the calculation formula is: .

[0097] A spatiotemporal database of peak rise factor parameters is constructed. The database index structure uses a quadtree method to support fast retrieval by geographic location and time. The process of constructing a quadtree is to recursively divide the space into four sub-regions. Each leaf node corresponds to a grid cell and its peak rise factor statistical characteristics. The quadtree node structure is: ; Where, 、 、 and are the longitude and latitude ranges of the node’s corresponding area respectively; It is a list of child nodes, empty if it is a leaf node; The peak rise factor statistical characteristics stored for the node are empty if it is a non-leaf node. The retrieval algorithm starts from the root node and visits it layer by layer according to the latitude and longitude of the query point until it reaches a leaf node or finds the minimum area node containing the query point. Time retrieval is achieved by maintaining 12 months of peak rise factor statistical characteristics in each spatial node, supporting fast queries by month. A database update mechanism is established to automatically update the peak rise factor statistical parameters of the corresponding grid cell whenever new wave observation data is available. The update formula uses the exponential sliding average method: ; Where, and are the monthly averages after and before the update, respectively; is the peak elevation factor value of the new observation sample; is the smoothing coefficient, with a value of 0.1. A database interface protocol is designed to support real-time query of peak rise factor parameters in the marine digital twin system, with an interface response time of no more than 100 milliseconds. The database interface includes three modes: spatial query, time query, and comprehensive query. The spatial query interface is: ; The time query interface is: ; The comprehensive query interface is: ; Where, It refers to sea conditions, including typhoon and non-typhoon types.

[0098] In another specific embodiment of the present invention, optimization steps for S02, S05 and S06 are considered, which are described in detail below.

[0099] The specific implementation method of the optimization step 1 is to introduce the wave development energy balance equation to analyze the physical mechanism of the frequency wave spectrum fitting process in step S02 to improve the fitting accuracy of the peak rise factor. First, a wave development energy balance equation model is established. The model describes the evolution process of the frequency wave spectrum in time and space and the energy transfer mechanism. The wave development energy balance equation is expressed as: ; Where, is the energy density of the wave spectrum in the frequency direction, in square meters seconds per arc; is the time in seconds; is the spatial gradient operator; is the group velocity vector in meters per second; Enter the source term for wind energy; is the source term of nonlinear interaction between waves; is the whitecap dissipation source term; is the bottom friction dissipation source term. The wind energy input source term adopts the Miles mechanism formula: ; Where, is the exponential growth rate, and the calculation formula is: ; Where, is the density of air, which is 1.29 kg per cubic meter; is the density of water, which is 1025 kg per cubic meter; is the friction speed in meters per second; is the phase velocity, and the calculation formula is ; is the direction of wave propagation; is the wind direction. The discrete interaction approximation method is used for the nonlinear interaction source term between waves: ; Where, and are energy gain and energy loss terms respectively, and the specific calculation adopts the four-wave interaction model: ; ; Where, and is the coupling coefficient, with values ​​of 0.25 and 0.75 respectively; is the acceleration due to gravity, which is 9.8 meters per square second. The white wave dissipation source term adopts the saturation spectrum theory: ; Where, is the dissipation coefficient, which is 0.0023; is the wave number in radians per meter; is the water depth in meters; is the Pierson-Moskowitz equilibrium spectrum value, and the calculation formula is ,in ; is a nonlinear exponent with a value of 2. The bottom friction dissipation source term uses the empirical formula: ; Where, is the bottom friction coefficient, which is 0.015. Based on the solution of the energy balance equation, the peak rise factor is established. and the dimensionless parameter wave age Functional relationship: ; Where, is the wave age, is the acceleration due to gravity, is the peak period, is the wind speed at a height of 10 meters. For shallow water conditions, the relative water depth correction formula is introduced: ,when hour; Where, is the peak wave number, For water depth, This optimization step transforms the determination of the peak rise factor from a purely statistical fitting method to a parameterization method based on physical mechanisms, thus enhancing the adaptability of the model in complex sea conditions.

[0100] The specific implementation of the optimization step 2 is to establish a pre-trained wave spectrum parameter intelligent prediction network, namely the WaveSpecNet model, for steps S05 and S06. This model improves the prediction accuracy and computational efficiency of the peak rise factor through multimodal data fusion. The WaveSpecNet model is based on an encoder-decoder architecture, and the input and output relationship of the model is expressed as: ; Where, is the peak elevation factor output value; is the original frequency wave spectrum data; Meteorological data, including wind speed, wind direction, air pressure and other parameters; is the topographic data, including parameters such as water depth and seabed slope. The encoder uses a multi-head self-attention mechanism to process multi-source spatiotemporal data. The attention calculation formula is: ; Where, 、 and They are query matrix, key matrix and value matrix respectively, with dimensions of 、 and ; is the dimension of the key; and are the number of queries and keys, respectively; is the dimension of the value. The multi-head attention mechanism is expressed as: ; Where, ; 、 and Respectively Note the mean; is the standard deviation; For grid cells with insufficient sample size, the Bayesian interpolation method with physical constraints is used to supplement the data. The interpolation formula is: Where, is the interpolation result; For the The mean of the peak elevation factors of adjacent grid cells; is the weight coefficient, and the calculation formula is: Where, is the grid distance; is the smoothing parameter, and its value is 0.1; and are the wave ages of the adjacent grid and the target grid respectively; is the attenuation coefficient, which is set to 0.5. In this step, the WaveSpecNet model is combined with a multidimensional classification method to establish a comprehensive correlation between the peak rise factor and the ocean environment parameters, thereby improving the accuracy of the wave spectrum parameters in complex sea conditions.

[0101] In order to better understand and implement the present invention, Example 2 of a specific application scenario of the present invention is provided below: When researchers were building an ocean digital twin system in a certain sea area, they applied the wave spectrum parameter calculation method of the present invention to process the measured data. The buoy stations in this sea area are often affected by typhoons, which is of great significance for the distinction and characteristic research between typhoon waves and non-typhoon waves. The researchers collected wave data from the site from 2018 to 2022, totaling 36,792 hours of directional wave spectrum records. First, the original directional wave spectrum data was directionally integrated to obtain the frequency wave spectrum, and then the frequency wave spectrum with more than 25 frequency components was resampled by the cubic spline interpolation method to ensure that the total energy difference before and after interpolation does not exceed 0.1 square meters second.

[0102] The researchers chose the Jonswap frequency wave spectrum as a theoretical model to extract the effective wave height from the original frequency wave spectrum. Sum spectrum peak period , the peak rise factor was initially guessed at 3.3 for preliminary fitting. The array search method was used to optimize the peak rise factor. The optimal peak rise factor value was determined by comprehensively considering three fitting criteria: the absolute error of the spectrum peak value, the zero-order spectrum distance error, and the root mean square error of the spectrum value. Based on the tropical cyclone best path data set, the researchers identified the wave spectrum within 200 kilometers from the typhoon center as the typhoon wave spectrum, and statistically obtained the mean peak rise factor of each wave height period level under typhoon conditions, as shown in Table 1: Table 1 Mean values ​​of γ at each level under point typhoon conditions

[0103] In the above table, the values ​​in the five columns with HS of 1.5, 2.5, 13.5, 14.5, and 15.5 are all 0 and are omitted here and not displayed in the table.

[0104] To evaluate the statistical stability of the peak rise factor, the researchers also calculated the 95% confidence intervals of the peak rise factor values ​​at different wave height period levels. The results are shown in Table 2: Table 2 Variation range of 95% confidence interval of γ value at each level under point typhoon conditions

[0105] In the above table, the values ​​in the five columns with HS of 1.5, 2.5, 13.5, 14.5, and 15.5 are all 0 and are omitted here and not displayed in the table.

[0106] Through comparative analysis, the researchers found that the peak rise factor values ​​showed a clear regular distribution under typhoon conditions. To assess the reliability of the statistical results, the researchers further calculated the standard deviation and sample size of the γ value at each level, as shown in Tables 3 and 4 respectively:

[0107] Table 3 Standard deviation of γ values ​​at different levels under point typhoon conditions

[0108] Table 4 Number of wave spectra at each level under point typhoon conditions

[0109] From the above data, it can be seen that the peak rise factor values ​​under typhoon conditions are mostly distributed between 1.2 and 1.8, which is significantly lower than the 3.3 value commonly used in the traditional Jonswap model, and shows a certain pattern with the change of significant wave height and period. The researchers selected typhoon sea conditions with a significant wave height of 4.5 meters and a spectrum peak period of 9.5 seconds, and used the traditional fixed peak rise factor value (γ=3.3) and the peak rise factor value optimized by the present invention (γ=1.65) to construct the wave spectrum model, and generated wave surface simulation results (such as Figure 2 The results are compared with the measured data, as shown in Table 5: Table 5 Comparison of wave surface simulation accuracy under typhoon sea conditions with different peak rise factors

[0110] Traditional ocean digital twin methods usually use a fixed peak rise factor value (γ=3.3) to construct the Jonswap frequency wave spectrum model, which cannot adapt to different sea conditions, especially the special forms of the wave spectrum under typhoon conditions. This paper systematically analyzes the original frequency wave spectrum data, establishes a correlation model between the peak rise factor and the significant wave height and spectrum peak period, and distinguishes between typhoon and non-typhoon conditions (such as Figure 3 (as shown in the figure) to optimize the peak rise factor. Compared with traditional methods, this method improves spectral peak fitting accuracy by 77.4%, wave surface correlation by 33.3%, wave height prediction accuracy by 67.9%, and maximum wave height prediction accuracy by 71.8% under typhoon sea conditions. This method is particularly suitable for digital twin simulations of extreme sea conditions such as typhoons, providing more reliable technical support for marine engineering safety design, offshore platform operation risk assessment, and navigation safety warnings.

[0111] It should be noted that the variables involved in the present invention are explained in detail as shown in Tables 6, 7, 8 and 9 below.

[0112] Table 6 Variable Explanation Table (Part I)

[0113] Table 7 Variable Explanation Table (Part II)

[0114] Table 8 Variable Explanation Table (Part 3)

[0115] Table 9 Variable Explanation Table (Part 4)

[0116] The above description is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with this technical field can easily think of changes or replacements within the technical scope disclosed by the present invention, which should be covered by the scope of protection of the present invention.

Claims

1. A method for calculating wave spectrum parameters for ocean digital twins, characterized in that: include: Obtain raw wave spectrum data and perform preprocessing; The Jonswap frequency wave spectrum is selected as the theoretical frequency wave spectrum; Establish fitting criteria to evaluate the degree of conformity between the fitted frequency wave spectrum and the original frequency wave spectrum; construct the frequency wave spectrum formula based on the effective wave height and spectrum peak period, and solve the optimal fitting peak rise factor through numerical optimization method; calculate the statistical characteristics of the peak rise factor according to the effective wave height period level; distinguish typhoon wave spectrum from non-typhoon wave spectrum through typhoon wave spatiotemporal matching; calculate wave parameters based on the fitted frequency wave spectrum to construct a wave surface height model; and generate a wave spectrum parameter database.

2. The method for calculating ocean wave spectrum parameters of ocean digital twin according to claim 1, characterized in that: The step of obtaining the original wave spectrum data and performing preprocessing specifically includes performing directional integration on the directional wave spectrum to obtain the frequency wave spectrum, and performing frequency interpolation on the one-dimensional frequency wave spectrum with more than 25 frequency components to ensure that the total energy difference before and after the frequency interpolation is no more than 0.1 square meters per second.

3. The method for calculating ocean wave spectrum parameters of ocean digital twin according to claim 2, characterized in that: The directional wave spectrum refers to the energy distribution of the wave spectrum at different frequencies and directions, and the frequency wave spectrum refers to the energy distribution of the wave spectrum at different frequencies.

4. The method for calculating ocean wave spectrum parameters of ocean digital twin according to claim 3, characterized in that: The frequency components refer to discrete frequency points that describe the frequency wave spectrum.

5. The method for calculating ocean wave spectrum parameters of ocean digital twin according to claim 4, characterized in that: In the step of establishing the fitting criterion, the fitting criterion includes the spectrum peak absolute error, the zero-order spectrum distance error and the spectrum value root mean square error; the spectrum peak absolute error refers to the absolute value of the spectrum peak difference between the fitting frequency wave spectrum and the original frequency wave spectrum.

6. The method for calculating ocean wave spectrum parameters of ocean digital twin according to claim 5, characterized in that: The zero-order spectral distance error refers to the absolute value of the zero-order spectral distance difference between the fitted frequency wave spectrum and the original frequency wave spectrum; the spectral value root mean square error refers to the root mean square of the spectral value difference between the fitted frequency wave spectrum and the original frequency wave spectrum at all frequency points.

7. The method for calculating ocean wave spectrum parameters of ocean digital twin according to claim 6, characterized in that: In the step of selecting the Jonswap frequency wave spectrum as the theoretical frequency wave spectrum, the wave development energy balance equation is also introduced to analyze the physical mechanism and improve the fitting accuracy of the peak rise factor.

8. The method for calculating ocean wave spectrum parameters for ocean digital twins according to claim 7, characterized in that: In the step of solving the optimal fitting peak rise factor, a pre-trained wave spectrum parameter intelligent prediction network WaveSpecNet model is also established to improve the peak rise factor prediction accuracy and computational efficiency through multimodal data fusion.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores program instructions, and when the program instructions are run in a computer, they are used to execute the method for calculating wave spectrum parameters for ocean digital twins according to any one of claims 1 to 8.

10. A system for calculating wave spectrum parameters for ocean digital twins, characterized in that: The computer-readable storage medium according to claim 9 is included, the system is any one of a computer, a server, and a single-chip microcomputer, the computer-readable storage medium is arranged in the system, and the system is provided with a microprocessor for executing program instructions stored in the computer-readable storage medium.

Citation Information

Patent Citations

  • Sea wave information prediction method and system based on multi-dimensional EMD-PSO-LSTM neural network

    CN116933152A

  • Multi-parameter sea wave spectrum fitting method

    CN118536406A

  • Wave spectrum model selection method

    CN119004254A

  • Method, medium and system for constructing digital twinning system for near-shore overtopping disasters

    CN119048706A

  • Method for determining hydrographic parameters, which describe a sea swell field in situ, using a radar device

    WO2002008786A1

Cited By

  • Sea area digital twinning method and system based on buoy and station data fusion

    CN121093292A

  • Wave spectrum intelligent rapid construction method based on parameter spectrum constraint and computer equipment

    CN121168530A

  • Extreme wave spectrum calculation method based on wave element co-occurrence recurrence period

    CN121598640A