Multi-scale ocean wave height prediction method and system based on large-scale language model
Through the Fourier transform and feature pyramid structure combined with the cross-modal attention mechanism, the amplitude phase characteristics of wind field and wave wave height are enhanced, and the problem of wind field factors and scale changes in the existing technology is solved, and the accurate prediction of wave wave height is achieved.
Patent Information
- Application Number
- CN202510847761.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2045-06-24
AI Technical Summary
The existing wave wave high prediction method fails to effectively consider wind field factors, resulting in insufficient prediction accuracy and ignore the changing characteristics of waves on different scales, resulting in the problem of high and low estimation of medium wave forecasts of abnormal waves.
The amplitude phase decoupling interaction module is used to analyze the frequency domain characteristics of wind field and wave wave height through Fourier transform, enhance the amplitude and phase characteristics, combine the characteristic pyramid structure and the cross-modal attention mechanism, dynamically fuse multi-scale semantic information, and use large language models for prediction.
It improves the accuracy and accuracy of wave height prediction, can effectively capture wave change characteristics on different scales, enhances the impact of wind field on wave height prediction, and achieves accurate prediction of wave height.
Smart Images

Figure CN120354760B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of ocean wave height prediction, and in particular relates to a multi-scale ocean wave height prediction method and system based on a large language model. Background Art
[0002] The task of predicting ocean wave height is extremely important in a variety of fields, including marine science and marine engineering. A cutting-edge wave height prediction method uses a data-driven neural network model to predict wave height. This method first uses a convolutional layer to extract global spatial information about the entire wave physics field. It then uses an LSTM (Long Short-Term Memory) network to extract the spatiotemporal characteristics of the physical field. Finally, a fully connected neural network performs a matrix transformation on the output features to achieve wave height prediction, addressing the problem of traditional methods being unable to predict certain spatial locations.
[0003] However, this approach has the following problems:
[0004] (1) This method does not take into account the complex ocean conditions. It only considers the wave height and does not consider the impact of the wind field on the wave height. It ignores the influence of wind field factors, which affects the accuracy of the prediction.
[0005] (2) The current method uses a convolutional layer to extract the global spatial information of the overall wave physical field. However, since the wave changes in most areas are not significant, the convolutional layer often ignores a few abnormal wave change values during the feature extraction process, resulting in the problem of underestimation of wave height in the abnormal wave prediction process, and is unable to effectively capture the changing characteristics of waves at different scales. Summary of the Invention
[0006] In response to the shortcomings of the existing technology, the present invention provides a multi-scale ocean wave height prediction method and system based on a large language model. It designs steps based on amplitude-phase decoupling interaction, steps based on multi-scale semantic information extraction, and steps based on domain-specific pre-trained large language model fine-tuning strategies to effectively mine the complex spatiotemporal variation information of ocean waves. Specifically, in order to solve the problem of underestimation of traditional data-driven methods in the process of abnormal wave prediction, an amplitude-phase decoupling interaction module for processing wind field and ocean wave height is used. The frequency domain characteristics of ocean data are analyzed by Fourier transform to obtain the wave height and wind field amplitude and phase characteristics. A fusion mechanism is designed to enhance the amplitude and phase of the wind field to enhance the amplitude and phase of the wave height respectively. Finally, the enhanced ocean wave height data is obtained by inverse Fourier transform. The enhanced ocean wave height data output in step S1 is systematically captured at different spatial scales by constructing a feature pyramid structure. The method outputs autoencoding features of waves at different scales, autoencodes wave height features at different scales, and outputs word vector features. A cross-modal attention mechanism is used to interact between the autoencoding features and word vector features, outputting domain-specific semantic features at different scales. Finally, a dynamic fusion mechanism is used to obtain multi-scale semantic information. The domain-specific semantic features are then fed into a large language model, outputting prediction features, and fine-tuning them using the LoRAMoE strategy. This method effectively mines the complex spatiotemporal variations of waves and achieves accurate prediction of wave height.
[0007] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0008] First, the present invention provides a multi-scale ocean wave height prediction method based on a large language model, comprising the following steps:
[0009] S1. Steps for amplitude-phase decoupling interaction:
[0010] The frequency domain characteristics of wave height and wind field are analyzed by Fourier transform to obtain the amplitude and phase characteristics of wave height and wind field. The wave height and wind field characteristics are extracted by convolution layer, and then the amplitude and phase of wave height are connected by residual connection. In this way, the amplitude and phase of wind field are respectively enhanced to the amplitude and phase of wave height. Finally, the enhanced wave height data is obtained by inverse Fourier transform. ;
[0011] S2, steps based on multi-scale semantic information extraction:
[0012] The enhanced wave height data outputted in step S1 is subjected to a feature pyramid structure to systematically capture ocean features at different spatial scales and output wave autoencoding features at different scales.
[0013] Perform word vector autoencoding on the vocabulary of the large language model and output word vector features ;
[0014] The cross-modal attention mechanism is used to realize the interaction between the wave autoencoder features and the word vector features, output domain-specific semantic features of different scales, and finally obtain multi-scale semantic information through the dynamic fusion mechanism. ;
[0015] S3. Steps for predicting a large language model driven by prompt words in the field of wave height:
[0016] Multi-scale semantic information Input into a large language model, via wave-specific embeddings The feature interpretation process is guided from the perspective of domain knowledge to achieve in-depth feature analysis based on domain knowledge, output prediction features, and obtain predicted wave heights.
[0017] Furthermore, in step S1, a convolutional layer is used and , and then use the residual connection method to connect the amplitude and phase of the wave height to realize the nonlinear interaction between the wave height and wind field characteristics in the amplitude and phase space, and obtain the enhanced wave height amplitude and phase characteristics. The formula is expressed as follows:
[0018] ;
[0019] ;
[0020] where cat(·) represents the concatenation operation along the channel dimension, where 、 、 is the wave height data x and wind field component 、 The amplitude component of 、 、 is the wave height data x and wind field component 、 The amplitude component of represents the amplitude characteristics after enhancement, represents the phase characteristics after enhancement;
[0021] Then use the inverse Fourier transform Reconstruct the enhanced features in the time domain:
[0022] ;
[0023] where IFFT stands for Inverse Fast Fourier Transform and complex(·) reconstructs the complex-valued frequency representation from the enhanced amplitude and phase components.
[0024] Furthermore, in step S2, the enhanced wave height data A feature pyramid structure is constructed through n-layer downsampling convolution to obtain wave autoencoder features F of different scales.
[0025] Furthermore, in step S2, the word vector self-encoding step is:
[0026] Starting from the original embedding dictionary D, PCA is used to reduce the dimensionality, and then the word vectors of the large language model after dimensionality reduction are linearly mapped. , output word vector features .
[0027] Furthermore, in step S2, the steps of using the cross-modal attention mechanism to realize the interaction between the wave autoencoder features and the word vector features and outputting domain-specific semantic features of different scales are as follows:
[0028] For each scale i, the query, key, and value matrices are computed using scale-specific projections, ensuring that the attention mechanism focuses on relevant features at each scale:
[0029] ;
[0030] in, 、 and are the learnable projection matrices for query, key, and value, respectively, where is the wave autoencoding feature at scale i, refers to the word vector feature, Refers to query vectors corresponding to different scales, and Represents key vector and value vector;
[0031] Next, the attention mechanism is used to exchange information between the wave height features and the semantic features:
[0032] ;
[0033] Among them S i Represents domain-specific semantic features at different scales, where is the dimension of the key, used to scale the dot product attention score.
[0034] Furthermore, the steps to obtain multi-scale semantic information based on the dynamic fusion mechanism are as follows:
[0035] Adaptively weight the contribution of each scale based on the relevance of features at different scales to the prediction task:
[0036] ;
[0037] ;
[0038] ;
[0039] Among them, AvgPool represents the average pooling operation, Conv1d is a one-dimensional convolution operation, It is the dynamic weight calculated by Sigmoid and Softmax functions. Indicates that all scale features Connect It is the multi-scale semantic information after weighted fusion.
[0040] Furthermore, in step S3, the calculation process of the large language model prediction driven by the wave height domain prompt word is as follows:
[0041] First, domain-specific cues are embedded to provide basic context for the wave prediction task. Different domain-specific cues are designed for different tasks to obtain wave-specific embeddings. :
[0042] Then, the wave-specific embedding and multi-scale semantic information Combined and processed through a large language model, the output is ;
[0043] Finally, through the upsampling convolution operation, the model output Converted into the final wave height prediction result.
[0044] Then, the present invention also provides a multi-scale ocean wave height prediction system based on a large language model, which is used to implement the multi-scale ocean wave height prediction method based on a large language model as described above. The system includes an amplitude-phase decoupling interaction module, a multi-scale semantic information extraction module, and a large language model prediction module driven by ocean wave height domain prompt words;
[0045] The amplitude-phase decoupling interaction module is used to process wind field and ocean wave height data. The frequency domain characteristics of ocean data are analyzed by Fourier transform to obtain the wave height and wind field amplitude and phase characteristics. A fusion mechanism is designed to enhance the amplitude and phase of the wind field to enhance the amplitude and phase of the wave height respectively. Finally, the enhanced ocean wave height data is obtained by inverse Fourier transform. ;
[0046] The multi-scale semantic information extraction module systematically captures ocean features at different spatial scales by constructing a feature pyramid structure for the enhanced wave height data output by the amplitude-phase decoupling interaction module, and outputs wave autoencoding features at different scales; the large language model vocabulary is autoencoded after dimensionality reduction, and word vector features are output. , using the cross-modal attention mechanism to realize the interaction between the wave autoencoder features and the word vector features, output domain-specific semantic features of different scales, and finally obtain multi-scale semantic information through the dynamic fusion mechanism ;
[0047] The large language model prediction module driven by the wave height domain prompt word combines domain-specific multi-scale semantic features Input into a large language model, through domain-specific prompt words The feature interpretation process is guided from the perspective of domain knowledge to achieve in-depth feature analysis based on domain knowledge, output prediction features, and obtain predicted wave heights.
[0048] The present invention also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it is used to implement the multi-scale semantic information fusion ocean wave height prediction method based on a large language model as described above.
[0049] The present invention also provides an electronic device, comprising: a processor and a memory, wherein when the processor executes the computer program stored in the memory, the multi-scale ocean wave height prediction method based on the large language model as described above is implemented.
[0050] Compared with the prior art, the present invention has the following advantages:
[0051] (1) This paper designs an amplitude-phase decoupling interaction strategy that uses Fourier transform to analyze frequency domain characteristics and simultaneously process the periodic patterns of wind and waves. This strategy can separate and identify wind and wave energy distributions at different scales, utilizes information about wind field wave height, and enhances prediction accuracy.
[0052] (2) This paper proposes a novel multi-scale semantic information integration framework that dynamically aligns the semantic representation derived from a large model with spatiotemporal features at different scales, enabling simultaneous processing of both local details and global wave height features. The paper successfully achieves alignment of multi-scale wave height with natural language modalities. Through this method, the rich domain knowledge from the pre-trained large language model is effectively integrated, enabling accurate prediction of wave height. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0054] Figure 1 Schematic diagram of the system structure of the present invention;
[0055] Figure 2 A method flow chart of an embodiment of the present invention;
[0056] Figure 3 Schematic diagram of the LoRAMoE structure of the present invention;
[0057] Figure 4 is a structural diagram of an electronic device of the present invention;
[0058] Figure 5 This is a visual comparison chart of the 1-hour significant wave height prediction results of different methods in the embodiments of the present invention. DETAILED DESCRIPTION
[0059] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.
[0060] Example 1
[0061] The overall design concept of the present invention is as follows Figure 1 As shown in the figure, the present invention designs a multi-scale wave height semantic feature encoding module based on an attention mechanism to effectively transform these wave features into semantically meaningful representations. The entire module consists of three main components: amplitude-phase decoupling interaction, multi-scale semantic information extraction and domain-specific semantic feature encoding based on an attention mechanism, and large language model prediction. These components are implemented through the amplitude-phase decoupling interaction module, the multi-scale semantic information extraction module, and the large language model prediction module driven by wave height domain cues.
[0062] The core of this invention is to analyze the frequency domain characteristics of ocean data through Fourier transform to obtain the amplitude and phase characteristics of wave height and wind field, and design a fusion mechanism to enhance the amplitude and phase of the wind field to enhance the amplitude and phase of wave height respectively. The enhanced multi-scale wave height information is aligned with the semantic space, converting domain-specific spatiotemporal features into domain-specific semantic features that are easier for large-scale models to understand and utilize. This approach can enhance the explanatory power of the model and the efficiency of using domain knowledge.
[0063] The implementation of each part of the present invention is described in detail below.
[0064] Combine Figure 1 and Figure 2 This embodiment 1 provides a multi-scale ocean wave height prediction method based on a large language model, comprising the following steps:
[0065] S1. Steps for amplitude-phase decoupling interaction:
[0066] The frequency domain characteristics of wave height and wind field are analyzed by Fourier transform to obtain the amplitude and phase characteristics of wave height and wind field. The wave height and wind field characteristics are extracted by convolution layer, and then the amplitude and phase of wave height are connected by residual connection. In this way, the amplitude and phase of wind field are respectively enhanced to the amplitude and phase of wave height. Finally, the enhanced wave height data is obtained by inverse Fourier transform. .
[0067] The details are as follows:
[0068] S101, frequency domain feature extraction:
[0069] Perform Fourier transform on the wave height data and wind field data to obtain frequency domain features, and extract the amplitude and phase features of the wave height and wind field from the frequency domain features;
[0070] S102, convolution feature extraction:
[0071] Use convolutional layers to extract the amplitude and phase features of wave height and wind field respectively, capturing local frequency domain patterns;
[0072] S103, residual enhancement fusion:
[0073] Combine wind field features with wave height features through residual connection:
[0074] Wind field amplitude → wave height amplitude (enhanced energy distribution);
[0075] Wind field phase → wave height phase (adjust waveform timing structure);
[0076] S104, time domain reconstruction:
[0077] The enhanced wave height amplitude and phase are inversely transformed to reconstruct higher-precision time-domain wave height data.
[0078] As an example, the wave height data x, the wind field component in the horizontal direction (i.e. x direction) , the wind field component in the vertical direction (i.e., y direction) The dimensions are all T×H×W, where T represents the length of the time series, and H and W represent the height and width of the data in space, respectively. In this embodiment, the 10m wind field components in the horizontal and vertical directions are taken.
[0079] To better capture the complex interactions between wave elements and wind fields, this paper introduces an amplitude-phase decoupled interaction module. Traditional methods often struggle to simulate the complex relationships between different ocean variables in the time domain, especially when dealing with non-stationary patterns and complex time dependencies.
[0080] The amplitude-phase decoupling interaction module of the present invention solves this limitation by decomposing the features into frequency domain representation, thus achieving separate analysis of amplitude and phase information.
[0081] The process first applies Fourier transform to obtain the wave height data x and wind field components. 、 Frequency domain representation of:
[0082] ;
[0083] ;
[0084] ;
[0085] in represents the fast Fourier transform operation, 、 、 Represents the wave height data x and wind field components respectively 、 Frequency domain representation of .
[0086] Then, from the frequency domain representation, we extract the amplitude and phase components of the wave height and wind field:
[0087] ;
[0088] ;
[0089] The |·| calculates the amplitude spectrum, and ∠ extracts the phase spectrum; the amplitude component A represents the amplitude of the signal, capturing the strength of spatial and temporal characteristics, and the phase component P describes the vibration state of the wave at a certain moment, reflecting the wave periodicity and spatial coherence. 、 、 is the wave height data x and wind field component 、 The amplitude component of 、 、 is the wave height data x and wind field component 、 Amplitude component of .
[0090] As a specific implementation, in order to capture the nonlinear interaction of wave and wind field characteristics in amplitude and phase space, a convolutional layer is used. and The amplitude and phase of the wave height are then connected using residual connections to retain important characteristic features while learning additional interactions, realizing nonlinear interactions between wave height and wind field characteristics in amplitude and phase space, and obtaining enhanced wave height amplitude and phase features, which can be expressed as follows:
[0091] ;
[0092] ;
[0093] where cat(·) represents the concatenation operation along the channel dimension, where 、 、 is the wave height data x and wind field component 、 The amplitude component of 、 、 is the wave height data x and wind field component 、 The amplitude component of represents the amplitude characteristics after enhancement, Represents the phase characteristics after enhancement.
[0094] The enhanced features are then reconstructed in the time domain using the Inverse Fourier Transform (IFFT):
[0095] ;
[0096] where IFFT stands for Inverse Fast Fourier Transform and complex(·) reconstructs the complex-valued frequency representation from the enhanced amplitude and phase components.
[0097] This reconstruction step combines enhanced amplitude and phase information while maintaining the physical meaning of the signal.
[0098] Enhanced wave height data It is then passed to the next module (based on the multi-scale semantic information extraction module) for semantic information extraction.
[0099] S2, steps based on multi-scale semantic information extraction:
[0100] The enhanced wave height data outputted in step S1 is subjected to a feature pyramid structure to systematically capture ocean features at different spatial scales and output wave autoencoding features at different scales.
[0101] After reducing the dimensionality of the vocabulary of the large language model, perform autoencoding and output word vector features .
[0102] The cross-modal attention mechanism is used to realize the interaction between the wave autoencoder features and the word vector features, output domain-specific semantic features of different scales, and finally obtain multi-scale semantic information through the dynamic fusion mechanism. .
[0103] As a specific embodiment, the step of self-encoding of ocean wave characteristics is designed: the enhanced ocean wave height data The feature pyramid structure is constructed by n layers of downsampling convolution to obtain the wave autoencoder features F of different scales. The specific steps are:
[0104] ;
[0105] ;
[0106] Among them, Conv( ) represents the input Perform standard convolution operations to obtain basic features ; Represents the i-1 layer feature Perform downsampling convolution operation to generate the i-th layer feature , as the wave autoencoder feature at scale i; n represents the total number of pyramid layers.
[0107] As a specific example, a step for autoencoding word vectors was designed. The key challenge in using large language models for ocean wave prediction is effectively processing large-scale word embeddings while preserving semantic relationships. In this example, a centroid-based embedding compression strategy effectively reduces computational complexity while maintaining the richness of semantic information.
[0108] Specifically, from the original embedding dictionary Starting with (where A is the vocabulary size and M is the embedding dimension), we perform dimensionality reduction using PCA (Principal Component Analysis) to identify the most informative dimensions:
[0109] ;
[0110] in It represents the large prediction model vocabulary after dimensionality reduction.
[0111] Then perform linear mapping on the word vector of the large language model , output word vector features :
[0112] .
[0113] As a specific embodiment, a step of encoding domain-specific multi-scale semantic features based on the attention mechanism is designed: the alignment between the wave features and the semantic representation is achieved through the cross-modal attention mechanism of the present invention, that is, in step S2, the cross-modal attention mechanism is used to realize the interaction between the wave autoencoder features and the word vector features, and output domain-specific semantic features of different scales.
[0114] Specifically, for each scale i, the query, key, and value matrices are computed using scale-specific projections, ensuring that the attention mechanism can focus on relevant features at each scale:
[0115] ;
[0116] in, 、 and are the learnable projection matrices for query, key, and value, respectively, where is the wave autoencoding feature at scale i, refers to the word vector feature, Refers to query vectors corresponding to different scales, and Represents a key vector and a value vector.
[0117] Next is the cross-attention operation, which uses the attention mechanism to exchange information between wave height features and semantic features:
[0118] ;
[0119] Among them S i Represents domain-specific semantic features at different scales, where is the dimension of the key, used to scale the dot product attention score.
[0120] As a specific embodiment, the steps of obtaining multi-scale semantic information based on the dynamic fusion mechanism are as follows: In order to effectively combine the information from different scales S i This embodiment adopts a dynamic fusion mechanism to adaptively weight the contribution of each scale according to its relevance to the prediction task:
[0121] ;
[0122] ;
[0123] ;
[0124] Among them, AvgPool represents the average pooling operation, and Conv1d is a one-dimensional convolution operation used to further process the pooled features; It is the dynamic weight calculated by Sigmoid and Softmax functions. Indicates that all scale features T i Connect It is the multi-scale semantic representation after weighted fusion. The obtained multi-scale semantic representation It is subsequently concatenated with the token embeddings and fed to the downstream fine-tuning task for further processing.
[0125] S3. Steps for predicting a large language model driven by prompt words in the field of wave height:
[0126] The calculation process of large-scale language model prediction driven by wave height domain prompt words is as follows: multi-scale semantic information Input into a large language model, via wave-specific embeddings The feature interpretation process is guided from the perspective of domain knowledge to achieve in-depth feature analysis based on domain knowledge, and the prediction features are output through the LoRAMoE strategy to obtain the predicted wave height.
[0127] Specifically, the process first embeds domain-specific cues to provide basic context for the wave prediction task, and then designs different domain-specific cues for different tasks to obtain wave-specific embeddings. :
[0128] ;
[0129] Prompts represents prior knowledge.
[0130] These wave-specific embeddings Combined with the previously extracted multi-scale semantic features Combined and processed through a large language model architecture, the output is :
[0131] ;
[0132] Among them, cat means feature concatenation, LLM means large language model;
[0133] Finally, the wave forecast is generated by:
[0134] ;
[0135] Uconv represents the upsampling convolution operation, which converts the model output into the final wave height prediction result, that is, the wave height y.
[0136] In particular, in order to leverage the semantic understanding capabilities of large language models while adapting them to the task of ocean wave prediction, this embodiment employs a carefully designed fine-tuning strategy based on the low-rank adaptive mixture of experts (LoRAMoE) language model fine-tuning strategy. This approach ensures effective adaptation to ocean wave-specific patterns while preserving the general knowledge encoded in the pre-trained model. Figure 3 As shown in Figure 2, the LoRAMoE fine-tuning method of this embodiment combines the advantages of efficient parameter adaptation and expert specialization. The LoRA component achieves efficient parameter updates through low-rank decomposition. The MoE layer integrates the outputs from multiple experts, each specializing in different aspects of wave prediction:
[0137] ;
[0138] Each of these experts Provide professional prediction and gating mechanism for different wave patterns Determine their relative importance, is the output of the fine-tuned large model. N represents the total number of experts, and h is the input hidden state.
[0139] The mean squared error (MSE) was selected as the loss function for model training. MSE quantifies the deviation between model predictions and actual observations. Because it imposes a greater penalty on larger prediction errors, it encourages the model to focus on reducing significant deviations, improving prediction accuracy and overall model stability. This penalty mechanism is particularly effective when dealing with highly complex and nonlinear wave-like spatiotemporal sequences. Backpropagation is performed using the MSE to update model parameters.
[0140] Example 2
[0141] As another embodiment of the present invention, a multi-scale ocean wave height prediction system based on a large language model is also provided, which is used to implement the multi-scale ocean wave height prediction method based on a large language model as described in the above embodiment 1. Figure 1-Figure 2 As shown, the system includes an amplitude-phase decoupling interaction module, a multi-scale semantic information extraction module, and a large language model prediction module driven by wave height domain prompt words.
[0142] The amplitude-phase decoupling interaction module is used to process the amplitude-phase decoupling interaction module of wind field and wave height. The frequency domain characteristics of ocean data are analyzed by Fourier transform to obtain the wave height and wind field amplitude and phase characteristics. A fusion mechanism is designed to enhance the amplitude and phase of the wind field to enhance the amplitude and phase of the wave height respectively. Finally, the enhanced wave height data is obtained by inverse Fourier transform. .
[0143] The multi-scale semantic information extraction module constructs a feature pyramid structure for the enhanced wave height data output by the amplitude-phase decoupling interaction module, systematically captures ocean features at different spatial scales, and outputs wave autoencoding features at different scales. After dimensionality reduction, the large language model vocabulary is autoencoded and word vector features are output. , using the cross-modal attention mechanism to realize the interaction between the wave autoencoder features and the word vector features, output domain-specific semantic features of different scales, and finally obtain multi-scale semantic information through the dynamic fusion mechanism .
[0144] The large language model prediction module driven by the wave height domain prompt word combines domain-specific multi-scale semantic features Input into a large language model, through domain-specific prompt words The feature interpretation process is guided by domain knowledge to achieve in-depth feature analysis based on domain knowledge, and fine-tuned using the LoRAMoE strategy. The predicted features are then output to obtain the predicted wave height.
[0145] like Figure 3 As shown, the LoRAMoE strategy in the large language model prediction module driven by the wave height domain prompt words activates different experts through a gating mechanism to fine-tune the pre-trained large model.
[0146] The functions and data processing procedures of each module may be found in the detailed steps of the multi-scale semantic information fusion ocean wave height prediction method based on a large language model described in the previous embodiment 1, and will not be repeated here.
[0147] In summary, the present invention designs an amplitude-phase decoupling interaction module, a multi-scale semantic information extraction module, and a large-scale language model prediction module driven by wave height domain prompt words. The frequency domain features of ocean data are analyzed by Fourier transform to obtain the wave height and wind field amplitude and phase features. A fusion mechanism is designed to enhance the amplitude and phase of the wind field to enhance the amplitude and phase of the wave height respectively. Finally, the enhanced wave height data is obtained by inverse Fourier transform. The enhanced wave height data output by the amplitude-phase decoupling interaction module is systematically captured by constructing a feature pyramid structure to capture ocean features at different spatial scales. Wave autoencoder features of different scales are output, and wave height features of different scales are autoencoded and word vector features are output. The cross-modal attention mechanism is used to realize the interaction between wave autoencoder features and word vector features. Domain-specific semantic features of different scales are output. Finally, multi-scale semantic information is obtained through a dynamic fusion mechanism. The domain-specific semantic features are input into the large language model, prediction features are output, and fine-tuning is performed using the LoRAMoE strategy. The present invention effectively mines the complex temporal and spatial variation information of ocean waves and realizes accurate prediction of ocean wave height.
[0148] Example 3
[0149] As another embodiment of the present invention, a computer-readable storage medium is also provided, storing a computer program. When the computer program is executed by a processor, it is used to implement the multi-scale wave height prediction method based on a large language model as described in the above embodiment 1.
[0150] A computer-readable storage medium may be a non-volatile computer-readable storage medium. Examples include, but are not limited to, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0151] Example 4
[0152] As another embodiment of the present invention, an electronic device is also provided. Figure 4As shown, the electronic device 100 includes: at least one processor 101, at least one memory 102, a power supply 103, a communication interface 104, an input / output interface 105, and a communication bus 106. The processor 101, communication interface 104, and memory 102 are connected via the communication bus 106. The memory 102 is used to store computer programs and may primarily include a program storage area and a data storage area. The program storage area may store an operating system, application programs required for functions, etc.; the data storage area may store data generated based on the use of the device, etc. The computer program is loaded and executed by the processor 101 to implement the relevant steps of the multi-scale ocean wave height prediction method based on a large language model disclosed in any of the aforementioned embodiments.
[0153] In addition, the method embodiments provided in the embodiments of the present disclosure may be executed in a computer terminal, a server, or a similar computing device, that is, the above-mentioned electronic device may specifically be a computer terminal, a server, or a similar computing device.
[0154] Experimental verification:
[0155] As an application example, the present invention can be used to predict significant wave heights. This embodiment takes the prediction of significant wave heights as an example and uses the ERA5 significant wave height reanalysis data as training and test data sets. The ERA5 significant wave height dataset is a comprehensive reanalysis dataset that provides high-resolution wave height information. Many researchers use the ERA5 dataset to train and predict deep learning models for a variety of applications, including extreme wave height prediction, due to its reliability and wide coverage. Specifically, this embodiment focuses on data from offshore areas with a latitude range of 20 degrees to 35.5 degrees north latitude and a longitude range of 116.5 degrees to 131.5 degrees east longitude. The data span is from 2013 to 2022, and the spatial resolution is 0.25°×0.25°.
[0156] For each dataset, this method uses 80% of the samples as the training set, 10% of the samples as the validation set, and the remaining 10% as the test set. The model uses the root mean square error (RMSE), mean absolute error (MAE) and coefficient of determination ( ) for evaluation. These model evaluation indicators are commonly used technical means in this field and will not be described in detail. The root mean square error (RMSE) measures the predicted value. and the true value The standard deviation between the two values, the smaller the value, the higher the prediction accuracy. The mean absolute error (MAE) is the average value of the absolute error between the predicted value and the true value. The coefficient of determination ( ) represents the model's ability to explain changes in actual data, and the correlation coefficient (ρ) represents a statistical indicator that measures the strength of the linear relationship between the predicted value and the true value.
[0157] The model receives data from the past 7 days to predict the wave height in the first, sixth, and 12th hour. Experiments are conducted on a single NVIDIA 4090 RTX GPU, and the network is trained for 200 epochs using the Adam optimizer with a mini-batch size of 8. During training, the learning rate is adjusted to 1e-4.
[0158] In order to prove the effectiveness of the present invention, U-Net, Conv-LSTM and FNO were selected for comparative experiments with the method proposed in the present invention. The detailed information of the experimental results is shown in Tables 1 to 4 below, which are about RMSE, MAE, , comparison of ρ.
[0159] Table 1 Comparison of RMSE between the present invention and existing methods
[0160]
[0161] Table 2 Comparison of MAE between the present invention and existing methods
[0162]
[0163] Table 3 The present invention and the existing method Comparison
[0164]
[0165] Table 4 Comparison of the present invention and existing methods on ρ
[0166]
[0167] Among all prediction time scales, the method of the present invention always shows the lowest RMSE value, especially in the 1-hour and 6-hour predictions, which are 0.0256 and 0.1180 respectively, which are significantly better than U-Net (0.0295 and 0.1328), Conv-LSTM (0.0321 and 0.1581) and LSM (0.0291 and 0.1312). This shows that the method of the present invention has higher accuracy in short-term predictions. The present invention also performs well in the MAE indicator, with MAE values of 0.0144 and 0.0702 for 1 hour and 6 hours respectively, which are lower than other methods. This further proves the effectiveness of the present invention in reducing prediction errors. In terms of indicators, the proposed method also performs best in 1-hour and 6-hour predictions, which are 0.9992 and 0.9833 respectively, showing a good ability to explain data variation. The values are generally low, especially in the longer-term forecast, showing a clear downward trend. In terms of metrics, our method also performs best across all forecast durations, with ρ values of 0.9924, 0.9835, and 0.9638, respectively, demonstrating good explanatory power for data variation. In contrast, the ρ values of other methods are generally lower, especially for longer-term forecasts, where they show a clear downward trend.
[0168] like Figure 5 As shown in the 1-hour prediction visualization of different methods, it can be seen that in the short-term prediction, the prediction results of the present invention are more consistent with the real data, indicating that the present invention has stronger stability and reliability. In order to comprehensively evaluate the prediction capabilities of various methods, three different methods, including the present invention, Conv-LSTM, and FNO, were selected to visualize the prediction results. These visualizations were performed at three different time points and were carefully selected to represent different scenarios. Figure 5 In , each column is 3 visualization graphs corresponding to each method at 3 different time points. Figure 5 The horizontal and vertical coordinates of each image in the visualization are the latitude and longitude coordinates of the selected area, and different colors represent the numerical values of the prediction results.
[0169] Of course, the above description is not a limitation of the present invention, and the present invention is not limited to the above examples. Any changes, modifications, additions or substitutions made by ordinary technicians in this technical field within the essential scope of the present invention should fall within the scope of protection of the present invention.
Claims
1. A multi-scale ocean wave height prediction method based on a large language model, characterized by: The following steps are involved: S1. Steps for amplitude-phase decoupling interaction: The frequency domain characteristics of wave height and wind field are analyzed by Fourier transform to obtain the amplitude and phase characteristics of wave height and wind field. The wave height and wind field characteristics are extracted by convolution layer, and then the amplitude and phase of wave height are connected by residual connection. In this way, the amplitude and phase of wind field are respectively enhanced to the amplitude and phase of wave height. Finally, the enhanced wave height data is obtained by inverse Fourier transform. ; S2, steps based on multi-scale semantic information extraction: The enhanced wave height data outputted in step S1 is subjected to a feature pyramid structure to systematically capture ocean features at different spatial scales and output wave autoencoding features at different scales. Perform word vector autoencoding on the vocabulary of the large language model and output word vector features ; The cross-modal attention mechanism is used to realize the interaction between the wave autoencoder features and the word vector features, output domain-specific semantic features of different scales, and finally obtain multi-scale semantic information through the dynamic fusion mechanism. ; S3. Steps for predicting a large language model driven by prompt words in the field of wave height: Multi-scale semantic information Input into a large language model, via wave-specific embeddings The feature interpretation process is guided from the perspective of domain knowledge to achieve in-depth feature analysis based on domain knowledge, output prediction features, and obtain predicted wave heights.
2. The multi-scale ocean wave height prediction method based on a large language model according to claim 1, characterized in that: In step S1, the convolutional layer is used (·)and (·), and then use the residual connection method to connect the amplitude and phase of the wave height to realize the nonlinear interaction between the wave height and wind field characteristics in the amplitude and phase space, and obtain the enhanced wave height amplitude and phase characteristics. The formula is expressed as follows: ; ; where cat(·) represents the concatenation operation along the channel dimension, where 、 、 is the wave height data x and wind field component 、 The amplitude component of 、 、 is the wave height data x and wind field component 、 The amplitude component of represents the amplitude characteristics after enhancement, represents the phase characteristics after enhancement; Then use the inverse Fourier transform Reconstruct the enhanced features in the time domain: ; where IFFT stands for Inverse Fast Fourier Transform and complex(·) reconstructs the complex-valued frequency representation from the enhanced amplitude and phase components.
3. The multi-scale ocean wave height prediction method based on a large language model according to claim 1, characterized in that: In step S2, the enhanced wave height data A feature pyramid structure is constructed through n-layer downsampling convolution to obtain wave autoencoder features F of different scales.
4. The multi-scale ocean wave height prediction method based on a large language model according to claim 1, characterized in that: In step S2, the steps of word vector self-encoding are: Starting from the original embedding dictionary D, PCA is used to reduce the dimensionality, and then the word vectors of the large language model after dimensionality reduction are linearly mapped. , output word vector features .
5. The multi-scale ocean wave height prediction method based on a large language model according to claim 1, characterized in that: In step S2, the cross-modal attention mechanism is used to implement the interaction between the wave autoencoder features and the word vector features, and the steps of outputting domain-specific semantic features of different scales are as follows: For each scale i, the query, key, and value matrices are computed using scale-specific projections, ensuring that the attention mechanism focuses on relevant features at each scale: ; in, 、 and are the learnable projection matrices for query, key, and value, respectively, where is the wave autoencoding feature at scale i, refers to the word vector feature, Refers to query vectors corresponding to different scales, and Represents key vector and value vector; Next, the attention mechanism is used to exchange information between the wave height features and the semantic features: ; Among them S i Represents domain-specific semantic features at different scales, where is the dimension of the key, used to scale the dot product attention score.
6. The multi-scale ocean wave height prediction method based on a large language model according to claim 1, characterized in that: The steps to obtain multi-scale semantic information based on the dynamic fusion mechanism are as follows: Adaptively weight the contribution of each scale based on the relevance of features at different scales to the prediction task: ; ; ; Among them, AvgPool represents the average pooling operation, Conv1d is a one-dimensional convolution operation, It is the dynamic weight calculated by Sigmoid and Softmax functions. Indicates that all scale features Connect It is the multi-scale semantic information after weighted fusion.
7. The multi-scale ocean wave height prediction method based on a large language model according to claim 6, characterized in that: In step S3, the calculation process of the large language model prediction driven by the wave height domain prompt word is as follows: First, domain-specific cues are embedded to provide basic context for the wave prediction task. Different domain-specific cues are designed for different tasks to obtain wave-specific embeddings. : Then, the wave-specific embedding and multi-scale semantic information Combined and processed through a large language model, the output is ; Finally, through the upsampling convolution operation, the model output Converted into the final wave height prediction result.
8. A multi-scale ocean wave height prediction system based on a large language model, characterized by: Used to implement the multi-scale ocean wave height prediction method based on a large language model as described in any one of claims 1 to 7, the system includes an amplitude-phase decoupling interaction module, a multi-scale semantic information extraction module, and a large language model prediction module driven by ocean wave height domain prompt words; The amplitude-phase decoupling interaction module is used to process wind field and ocean wave height data. The frequency domain characteristics of ocean data are analyzed by Fourier transform to obtain the wave height and wind field amplitude and phase characteristics. A fusion mechanism is designed to enhance the amplitude and phase of the wind field to enhance the amplitude and phase of the wave height respectively. Finally, the enhanced ocean wave height data is obtained by inverse Fourier transform. ; The multi-scale semantic information extraction module systematically captures ocean features at different spatial scales by constructing a feature pyramid structure for the enhanced wave height data output by the amplitude-phase decoupling interaction module, and outputs wave autoencoding features at different scales. After reducing the dimensionality of the vocabulary of the large language model, perform autoencoding and output word vector features , using the cross-modal attention mechanism to realize the interaction between the wave autoencoder features and the word vector features, output domain-specific semantic features of different scales, and finally obtain multi-scale semantic information through the dynamic fusion mechanism ; The large language model prediction module driven by the wave height domain prompt word combines domain-specific multi-scale semantic features Input into a large language model, through domain-specific prompt words The feature interpretation process is guided from the perspective of domain knowledge to achieve in-depth feature analysis based on domain knowledge, output prediction features, and obtain predicted wave heights.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, it is used to implement the multi-scale ocean wave height prediction method based on a large language model as described in any one of claims 1 to 7.
10. An electronic device, characterized in that: include: A processor and a memory, wherein when the processor executes the computer program stored in the memory, the multi-scale ocean wave height prediction method based on a large language model as described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Marine early warning intelligent question and answer method based on large language model and related device
CN119179756A
Sea wave height prediction method and system based on large language model, and medium
CN119622275A