Multi-scale sea wave height prediction method and system based on large 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 characteristics 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
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2025-07-22
- 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, and extract multi-scale semantic information through feature pyramid structure and cross-modal attention mechanism, and predict it in combination with large language models.
Accurate prediction of wave heights is achieved, prediction accuracy is enhanced, wave change characteristics on different scales can be effectively captured, and wind farm information is integrated.
Smart Images

Figure CN120354760A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of ocean wave height prediction, and particularly relates to a multi-scale ocean wave height prediction method and system based on a large language model. Background Art
[0002] The task of ocean wave height prediction is of extremely important significance in many fields such as ocean science and ocean engineering. The advanced ocean wave height prediction method designs a data-driven neural network model to predict the wave height. This method first uses a convolutional layer to extract the global spatial information of the overall ocean wave physical field, uses an LSTM (Long Short-Term Memory) network to extract the spatio-temporal features of the physical field, and performs a matrix transformation on the output features through a fully connected neural network, ultimately realizing the prediction of ocean wave height and solving the problem that some spaces cannot be predicted by traditional methods.
[0003] However, this method has the following problems: (1) This method does not consider the complex ocean conditions. It only considers the ocean wave height and does not consider the influence of the wind field on the ocean wave height, ignoring the influence of the wind field factor, which affects the prediction accuracy.
[0004] (2) The current method uses a convolutional layer to extract the global spatial information of the overall ocean wave physical field. However, since the ocean wave changes are not significant in most regions, the convolutional layer often ignores the few abnormal ocean wave change values during the feature extraction process, resulting in the problem of underestimated wave height during the prediction of abnormal ocean waves and being unable to effectively capture the change characteristics of ocean waves at different scales. Summary of the Invention
[0005] Aiming at the deficiencies of the existing technology, the present invention provides a multi-scale sea wave height prediction method and system based on a large language model, and designs steps based on amplitude-phase decoupling interaction, steps based on multi-scale semantic information extraction, and steps based on a fine-tuning strategy for a domain-specific pre-trained large language model to effectively mine the complex spatio-temporal variation information of sea waves. Specifically, in order to solve the underestimation problem of traditional data-driven methods in the prediction process of abnormal sea waves, an amplitude-phase decoupling interaction module for processing the wind field and sea wave height is used. The amplitude and phase characteristics of the wave height and the wind field are obtained by analyzing the frequency domain characteristics of ocean data through Fourier transform. A fusion mechanism is designed to enhance the amplitude and phase of the wave height by the amplitude and phase of the wind field respectively. Finally, the enhanced sea wave height data is obtained through inverse Fourier transform; the enhanced sea wave height data output in step S1 is used to construct a feature pyramid structure to systematically capture ocean features at different spatial scales. The auto-encoding features of sea waves at different scales are output, the wave height features of sea waves at different scales are auto-encoded, the word vector features are output, and the cross-modal attention mechanism is used to realize the interaction between the auto-encoding features of sea waves and the word vector features, and the domain-specific semantic features at different scales are output. Finally, multi-scale semantic information is obtained through a dynamic fusion mechanism; the domain-specific semantic features are input into a large language model, prediction features are output, and fine-tuning is performed through the LoRAMoE strategy. Through the present invention, the complex spatio-temporal variation information of sea waves is effectively mined, and the accurate prediction of sea wave height is realized.
[0006] In order to solve the above technical problems, the technical solution adopted by the present invention is: First of all, the present invention provides a multi-scale sea wave height prediction method based on a large language model, including the following steps: S1. Steps of amplitude-phase decoupling interaction: The frequency domain characteristics of the sea wave height and the wind field are analyzed through Fourier transform to obtain the amplitude and phase characteristics of the wave height and the wind field. The convolutional layer is used to extract the characteristics of the sea wave height and the wind field, and then the amplitude and phase of the sea wave height are connected in a residual connection manner, so as to enhance the amplitude and phase of the wave height by the amplitude and phase of the wind field respectively. Finally, the enhanced sea wave height data is obtained through inverse Fourier transform ; S2. Steps based on multi-scale semantic information extraction: The enhanced sea wave height data output in step S1 is used to construct a feature pyramid structure to systematically capture ocean features at different spatial scales, and the auto-encoding features of sea waves at different scales are output; The word vector library of the large language model is auto-encoded for word vectors, and the word vector features are output ; Utilize the cross-modal attention mechanism to achieve the interaction between the wavelet auto-encoded features and the word vector features of ocean waves, output domain-specific semantic features at different scales, and finally obtain multi-scale semantic information through the dynamic fusion mechanism. ; S3. Steps for predicting based on the ocean wave height domain prompt words-driven large language model: Input the multi-scale semantic information into the large language model, and through the ocean wave-specific embedding to guide the feature interpretation process from the perspective of domain knowledge, so as to achieve in-depth analysis of features based on domain knowledge, output prediction features, and obtain the predicted ocean wave height.
[0007] Furthermore, in step S1, a convolutional layer and are adopted, and then the amplitude and phase of the ocean wave height are connected in a residual connection manner to achieve the non-linear interaction of the ocean wave height and wind field features in the amplitude and phase spaces, and obtain the enhanced wave height amplitude and phase features. The formula is as follows: ; ; where cat(·) represents the concatenation operation along the channel dimension, and , , are the amplitude components of the ocean wave height data x and the wind field components , , and , , are the amplitude components of the ocean wave height data x and the wind field components , . represents the enhanced amplitude feature, represents the enhanced phase feature; Then, the inverse Fourier transform is used to reconstruct the enhanced features in the time domain: ; where IFFT represents the inverse fast Fourier transform, and complex(·) reconstructs the complex-valued frequency representation from the enhanced amplitude and phase components.
[0008] Furthermore, in step S2, the enhanced ocean wave height data is used to construct a feature pyramid structure through n layers of downsampling convolution to obtain ocean wave auto-encoded features F at different scales.
[0009] Furthermore, in step S2, the steps of the word vector auto-encoding are as follows: Starting from the original embedding dictionary D, dimensionality reduction is performed through PCA, and then a linear mapping is performed on the word vectors of the large language model after dimensionality reduction , and the word vector features are output .
[0010] Furthermore, in step S2, the steps of using the cross-modal attention mechanism to achieve the interaction between the sea wave auto-encoding features and the word vector features and outputting domain-specific semantic features at different scales are as follows: For each scale i, query, key, and value matrices are calculated using scale-specific projections to ensure that the attention mechanism focuses on relevant features at each scale: ; Among them, 、 and are learnable projection matrices for the query, key, and value respectively, where is the sea wave auto-encoding feature at scale i, refers to the word vector feature, refers to the query vector corresponding to different scales, and represent the key vector and the value vector; Then, through the attention mechanism, information is exchanged between the sea wave height feature and the semantic feature: ; where S i represents the domain-specific semantic features at different scales, where is the dimension of the key, which is used to scale the dot product attention score.
[0011] Furthermore, the steps of obtaining multi-scale semantic information based on the dynamic fusion mechanism are as follows: Adaptive weights are assigned to the contributions of each scale according to the relevance of the features at different scales to the prediction task: ; ; ; Among them, AvgPool represents the average pooling operation, Conv1d is the one-dimensional convolution operation, is the dynamic weight calculated through the Sigmoid and Softmax functions, represents concatenating the features at all scales; is the multi-scale semantic information after weighted fusion.
[0012] Further, in step S3, the calculation process of the large language model prediction driven by the wave height domain prompt words is as follows: First, domain-specific prompts are embedded to provide the basic context for the wave prediction task. Different domain-specific prompt words are designed for different tasks to obtain wave-specific embeddings : Then, the wave-specific embeddings are combined with multi-scale semantic information and processed through a large language model to obtain the output ; Finally, through the upsampling convolution operation, the model output is converted into the final wave height prediction result.
[0013] Then, the present invention also provides a multi-scale wave height prediction system based on a large language model for implementing the multi-scale 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 wave height domain prompt words; The amplitude-phase decoupling interaction module is used to process the wind field and wave height data, analyze the frequency domain characteristics of the ocean data through Fourier transform to obtain the amplitude and phase characteristics of the wave height and the wind field, design a fusion mechanism to enhance the amplitude and phase of the wave height by the amplitude and phase of the wind field respectively, and finally obtain the enhanced wave height data through inverse Fourier transform ; 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 to systematically capture ocean features at different spatial scales and output wave auto-encoding features at different scales; after dimensionality reduction of the vocabulary of the large language model, auto-encoding is performed to output word vector features , and the cross-modal attention mechanism is used to realize the interaction between the wave auto-encoding features and the word vector features, output domain-specific semantic features at different scales, and finally obtain multi-scale semantic information through a dynamic fusion mechanism ; The large language model prediction module driven by wave height domain prompt words inputs the domain-specific multi-scale semantic features into the large language model, and guides the feature interpretation process from the perspective of domain knowledge through domain-specific prompt words to achieve in-depth analysis of features based on domain knowledge, output prediction features, and obtain the predicted wave height.
[0014] The present invention also provides a computer-readable storage medium storing a computer program, which when executed by a processor is used to implement the multi-scale semantic information fusion sea wave height prediction method based on a large language model as described above.
[0015] The present invention also provides an electronic device, including: a processor and a memory, and when the processor executes the computer program stored in the memory, it implements the multi-scale sea wave height prediction method based on a large language model as described above.
[0016] Compared with the prior art, the advantages of the present invention are as follows: (1) The present invention designs an amplitude-phase decoupling interaction strategy, analyzes the frequency domain characteristics using Fourier transform, and simultaneously processes the periodic patterns of the wind field and waves. This strategy can separate and identify the energy distributions of the wind field and waves at different scales, utilizes the information of the wind field on wave height, and enhances the prediction accuracy.
[0017] (2) The present invention proposes a novel multi-scale semantic information integration framework, dynamically aligns the semantic representations derived from the large model with spatio-temporal features at different scales, and can simultaneously process the local details and global scale sea wave height features. It successfully realizes the alignment of multi-scale sea wave height with the natural language modality, and through the method of the present invention, effectively integrates the rich domain knowledge in the pre-trained large language model, thereby achieving accurate prediction of sea wave height. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention, and those of ordinary skill in the art can obtain other drawings without creative efforts based on these drawings.
[0019] Figure 1 It is a schematic diagram of the system structure of the present invention; Figure 2 It is a flowchart of the method of an embodiment of the present invention; Figure 3 It is a schematic diagram of the LoRAMoE structure of the present invention; Figure 4 It is a structural diagram of the electronic device of the present invention; Figure 5 It is a visualization comparison diagram of the significant wave height prediction results of different methods in the present invention within 1 hour. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0020] The following further describes the present invention in conjunction with the drawings and specific embodiments.
[0021] Embodiment 1 The overall design concept of the present invention is as follows Figure 1 As shown, the present invention designs a multi-scale sea wave height semantic feature encoding module based on the attention mechanism to effectively convert these sea wave features into representations with semantic meanings. The entire module includes three main parts: amplitude-phase decoupling interaction, multi-scale semantic information extraction, attention mechanism-based domain-specific semantic feature encoding, and large language model prediction, which are implemented through the amplitude-phase decoupling interaction module, multi-scale semantic information extraction module, and large language model prediction module driven by sea wave height domain prompt words respectively.
[0022] The core of the present invention is to obtain the amplitude and phase features of wave height and wind field by analyzing the frequency domain features of ocean data through Fourier transform, and design a fusion mechanism to enhance the amplitude and phase of wave height by the amplitude and phase of the wind field respectively. The alignment of the enhanced multi-scale sea wave height information with the semantic space converts the domain-specific spatio-temporal features into domain-specific semantic features that are more easily understood and utilized by large models. This method can enhance the interpretability of the model and the utilization efficiency of domain knowledge.
[0023] The implementation of each part of the present invention will be described in detail below.
[0024] Combined with Figure 1 and Figure 2 , Embodiment 1 provides a multi-scale sea wave height prediction method based on a large language model, including the following steps: S1. Steps of amplitude-phase decoupling interaction: Analyze the frequency domain features of sea wave height and wind field through Fourier transform to obtain the amplitude and phase features of wave height and wind field. Use the convolutional layer to extract the features of sea wave height and wind field, and then use the residual connection method to connect the amplitude and phase of sea wave height, so as to enhance the amplitude and phase of wave height by the amplitude and phase of the wind field respectively. Finally, obtain the enhanced sea wave height data through inverse Fourier transform. .
[0025] Specifically as follows: S101. Frequency domain feature extraction: Perform Fourier transform on sea wave height data and wind field data to obtain frequency domain features, and extract the amplitude and phase features of sea wave height and wind field from the frequency domain features; S102. Convolutional feature extraction: Use the convolutional layer to extract the amplitude and phase features of sea wave height and wind field respectively to capture local frequency domain patterns; S103. Residual enhancement fusion: Combine the wind field features and wave height features through residual connection: Wind field amplitude → Wave height amplitude (enhanced energy distribution); Wind field phase → Wave height phase (adjusted waveform timing structure); S104. Time domain reconstruction: Perform inverse Fourier transform on the enhanced wave height amplitude and phase to reconstruct higher-precision time domain ocean wave height data.
[0026] As an example, for ocean wave height data x, the wind field component in the horizontal direction (i.e., the x-direction) , and the wind field component in the vertical direction (i.e., the y-direction) both have dimensions of 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, 10m wind field components in the horizontal and vertical directions are taken.
[0027] To better capture the complex interaction between ocean wave elements and the wind field, the present invention introduces an amplitude-phase decoupled interaction module. Traditional methods usually have difficulty in simulating the complex relationships between different ocean variables in the time domain, especially when dealing with non-stationary patterns and complex time dependencies.
[0028] The amplitude-phase decoupled interaction module of the present invention solves this limitation by decomposing features into frequency domain representations, achieving separate analysis of amplitude and phase information.
[0029] This process first applies Fourier transform to obtain the frequency domain representations of ocean wave height data x and wind field components , : ; ; ; where represents the fast Fourier transform operation, , , respectively represent the frequency domain representations of ocean wave height data x and wind field components , .
[0030] Then, from the frequency domain representations, extract the amplitude and phase components of the wave height and the wind field: ; ; where |·| calculates the amplitude spectrum and ∠ extracts the phase spectrum; where the amplitude component A represents the amplitude of the signal, capturing the intensity of spatial and temporal features, and the phase component P describes the vibration state of the wave at a certain moment, reflecting the periodicity and spatial coherence of the wave, , , are the wave height data x of the ocean waves and the amplitude components of the wind field components , , where , , are the wave height data x of the ocean waves and the amplitude components of the wind field components , of the amplitude components.
[0031] As a specific implementation, in order to capture the non-linear interaction of ocean wave and wind field characteristics in the amplitude and phase space, convolutional layers and are adopted. Then, the amplitude and phase of the ocean wave height are connected in the way of residual connection to retain important characteristic features while learning additional interactions, realizing the non-linear interaction of ocean wave height and wind field characteristics in the amplitude and phase space, and obtaining enhanced wave height amplitude and phase characteristics. The formula is expressed as follows: ; ; where cat(·) represents the concatenation operation along the channel dimension, where , , are the wave height data x of the ocean waves and the amplitude components of the wind field components , of the amplitude components, where , , are the wave height data x of the ocean waves and the amplitude components of the wind field components , of the amplitude components, represents the enhanced amplitude feature, represents the enhanced phase feature.
[0032] Then, the enhanced features are reconstructed in the time domain using the inverse Fourier transform IFFT: ; where IFFT represents the inverse fast Fourier transform, and complex(·) reconstructs the complex-valued frequency representation from the enhanced amplitude and phase components.
[0033] This reconstruction step combines the enhanced amplitude and phase information while maintaining the physical meaning of the signal.
[0034] The enhanced ocean wave height data is then passed to the next module (multi-scale semantic information extraction module) for semantic information extraction.
[0035] S2. Steps for multi-scale semantic information extraction: For the enhanced ocean wave height data output in step S1, by constructing a feature pyramid structure, the ocean features at different spatial scales are systematically captured, and the auto-encoding features of ocean waves at different scales are output.
[0036] After dimensionality reduction of the vocabulary of the large language model, auto-encoding is performed to output word vector features .
[0037] The cross-modal attention mechanism is used to achieve the interaction between the auto-encoding features of ocean waves and the word vector features, and the domain-specific semantic features at different scales are output. Finally, multi-scale semantic information is obtained through the dynamic fusion mechanism .
[0038] As a specific embodiment, the steps of auto-encoding of ocean wave features are designed: for the enhanced ocean wave height data A feature pyramid structure is constructed through n layers of downsampling convolution to obtain the auto-encoding features F of ocean waves at different scales. The specific steps are as follows: ; ; Among them, Conv( ) represents performing a standard convolution operation on the input to obtain the basic features ; represents performing a downsampling convolution operation on the features of the i - 1 layer to generate the features of the i-th layer , which is used as the auto-encoding feature of ocean waves at scale i; n represents the total number of layers of the pyramid.
[0039] As a specific embodiment, the steps of auto-encoding of word vectors are designed: The key challenge in using a large language model for ocean wave prediction is to effectively process large-scale word embeddings while maintaining semantic relationships. In this embodiment, the centroid-based embedding compression strategy effectively reduces the computational complexity while maintaining the richness of semantic information.
[0040] Specifically, starting from the original embedding dictionary (where A represents the vocabulary size and M represents the embedding dimension), dimensionality reduction is performed through PCA (Principal Component Analysis) to identify the most informative dimensions: ; Among them represents the vocabulary of the large prediction model after dimensionality reduction.
[0041] Then, a linear mapping is performed on the word vectors of the large language model to output the word vector features : 。
[0042] As a specific embodiment, the steps of encoding domain multi-scale specific semantic features based on the attention mechanism are designed: the alignment between the wave features and the semantic representation is realized by 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 auto-encoding features and the word vector features, and output domain-specific semantic features of different scales.
[0043] Specifically, for each scale i, query, key, and value matrices are calculated using scale-specific projections to ensure that the attention mechanism can focus on relevant features at each scale: ; Among them, 、 and are learnable projection matrices for the query, key, and value respectively, where is the wave auto-encoding feature at scale i, refers to the word vector feature, refers to the query vector corresponding to different scales, and represent the key vector and the value vector.
[0044] Next is the cross-attention operation, through which the attention mechanism enables the exchange of information between the wave height features and the semantic features: ; where S i represents the domain-specific semantic features of different scales, where is the dimension of the key, which is used to scale the dot product attention score.
[0045] 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 of, this embodiment adopts a dynamic fusion mechanism to adaptively weight the contributions of each scale according to its relevance to the prediction task: ; ; ; where, AvgPool represents the average pooling operation, and Conv1d is a one-dimensional convolution operation for further processing the pooled features; is the dynamic weight calculated through the Sigmoid and Softmax functions, represents the features of all scales T iConnect; is the multi-scale semantic representation after weighted fusion. The obtained multi-scale semantic representation is then concatenated with the token embedding and fed into the downstream fine-tuning task for further processing.
[0046] S3. Steps for prediction by a large language model driven by domain-specific prompts in the wave height of ocean waves: The calculation process for prediction by a large language model driven by domain-specific prompts in the wave height of ocean waves is as follows: The multi-scale semantic information is input into the large language model, and through the ocean-wave-specific embedding to guide the interpretation process of features from the perspective of domain knowledge, so as to achieve in-depth analysis of features based on domain knowledge, and is adjusted through the LoRAMoE strategy, outputting prediction features to obtain the predicted wave height of ocean waves.
[0047] Specifically, this process first embeds domain-specific prompts to provide basic context for the ocean wave prediction task. Different domain-specific prompts are designed by different tasks to obtain the ocean-wave-specific embedding : ; where prompts represents prior knowledge.
[0048] These ocean-wave-specific embeddings are combined with the previously extracted multi-scale semantic features and processed through the large language model architecture to obtain the output : ; where cat represents feature concatenation and LLM represents the large language model;
[0049] Finally, the ocean wave prediction is generated as follows: ; where Uconv represents the upsampling convolution operation, which converts the model output into the final predicted result of the wave height of ocean waves, that is, the wave height y of ocean waves.
[0050] It should be noted that, in order to utilize the semantic understanding ability of the large language model and at the same time make them adapt to the ocean wave prediction task, this embodiment adopts a carefully designed fine-tuning strategy based on the LoRAMoE (Low-Rank Adaptation Mixture of Experts) language model fine-tuning strategy. This method ensures effective adaptation to ocean-wave-specific patterns while retaining the general knowledge encoded in the pre-trained model. Combined Figure 3As shown, the LoRAMoE fine-tuning method of this embodiment combines the advantages of parameter-efficient adaptation and expert specialization. The LoRA component enables efficient parameter updates through low-rank factorization. The MoE layer integrates the outputs from multiple experts, with each expert focusing on different aspects of wave prediction: ; where each expert provides professional predictions for different wave patterns, and the gating mechanism determines their relative importance, which is the output after fine-tuning the large model. N represents the total number of experts, and h is the input hidden state.
[0051] In the training of the model, the mean squared error (MSE) is selected as the loss function. MSE is used to quantify the deviation between the model's predicted values and the actual observed values. Since it assigns a greater penalty to larger prediction errors, it prompts the model to focus more on reducing significant deviations, improving the prediction accuracy and the overall stability of the model. This penalty mechanism is particularly effective when dealing with highly complex and non-linear wave spatio-temporal sequences. The model parameters are updated through backpropagation operations using MSE.
[0052] Embodiment 2 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 previous Embodiment 1. As Figure 1 - Figure 2 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 ocean wave height domain prompts.
[0053] The amplitude-phase decoupling interaction module is used to process the amplitude-phase decoupling interaction of the wind field and ocean wave height. By analyzing the frequency domain characteristics of ocean data through Fourier transform to obtain the wave height, wind field amplitude, and phase characteristics, a fusion mechanism is designed to enhance the amplitude and phase of the wave height by the amplitude and phase of the wind field respectively, and finally the enhanced ocean wave height data is obtained through inverse Fourier transform .
[0054] The multi-scale semantic information extraction module systematically captures ocean features at different spatial scales by constructing a feature pyramid structure for the enhanced ocean wave height data output by the amplitude-phase decoupling interaction module, and outputs ocean wave auto-encoding features at different scales. After dimensionality reduction of the large language model's vocabulary, auto-encoding is performed to output word vector features , and the cross-modal attention mechanism is used to realize the interaction between the ocean wave auto-encoding features and the word vector features, outputting domain-specific semantic features at different scales, and finally obtaining multi-scale semantic information through a dynamic fusion mechanism 。
[0055] The large language model prediction module driven by domain-specific prompts in the wave height field of ocean waves inputs domain-specific multi-scale semantic features into the large language model, and guides the feature interpretation process from the perspective of domain knowledge through domain-specific prompts to achieve in-depth analysis of features based on domain knowledge, and is fine-tuned through the LoRAMoE strategy. Predictive features are output to obtain the predicted wave height of ocean waves.
[0056] As Figure 3 shown, in the LoRAMoE strategy of the large language model prediction module driven by domain-specific prompts in the wave height field of ocean waves, different experts are activated through a gating mechanism to fine-tune the pre-trained large model.
[0057] Among them, for the functions and data processing processes of each module, reference can be made to the detailed steps described in the multi-scale semantic information fusion ocean wave height prediction method based on a large language model recorded in the previous embodiment 1, which will not be elaborated here.
[0058] In summary, the present invention designs an amplitude-phase decoupling interaction module, a multi-scale semantic information extraction module, and a large language model prediction module driven by domain-specific prompts in the wave height field of ocean waves. By analyzing the frequency domain characteristics of ocean data through Fourier transform to obtain the wave height, wind field amplitude, and phase characteristics, a fusion mechanism is designed to enhance the amplitude and phase of the wave height by the amplitude and phase of the wind field respectively, and finally the enhanced ocean wave height data is obtained through inverse Fourier transform; for the enhanced ocean wave height data output by the amplitude-phase decoupling interaction module, a feature pyramid structure is constructed to systematically capture ocean features at different spatial scales. The self-encoded features of ocean waves at different scales are output, the wave height features of ocean waves at different scales are auto-encoded, the word vector features are output, the cross-modal attention mechanism is used to realize the interaction between the self-encoded features of ocean waves and the word vector features, the domain-specific semantic features at different scales are output, and finally the multi-scale semantic information is obtained through the dynamic fusion mechanism; the domain-specific semantic features are input into the large language model, predictive features are output, and fine-tuning is performed through the LoRAMoE strategy. Through the present invention, the complex spatio-temporal variation information of ocean waves is effectively mined, and the accurate prediction of ocean wave height is realized.
[0059] Embodiment 3 As another embodiment of the present invention, there is also provided a computer-readable storage medium storing a computer program, which when executed by a processor is used to implement the multi-scale ocean wave height prediction method based on a large language model as described in the previous embodiment 1.
[0060] A computer-readable storage medium may be a non-volatile computer-readable storage medium. For example, it may include, but is not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium that contains or stores a program, which can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0061] Embodiment 4
[0062] As another embodiment of the present invention, an electronic device is further provided, as Figure 4 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, the communication interface 104, and the memory 102 can be connected through the communication bus 106. The memory 102 is used to store a computer program. The memory 102 mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for functions, etc.; the data storage area can store data created according to the use of the device, etc. The computer program is loaded and executed by the processor 101 to implement the relevant steps in the multi-scale sea wave height prediction method based on a large language model disclosed in any of the foregoing embodiments.
[0063] In addition, the method embodiments provided by the present disclosure can be executed on a computer terminal, a server, or a similar computing device, that is, the above-mentioned electronic device can specifically be a computer terminal, a server, or a similar computing device.
[0064] Experimental verification: As an application example, the present invention can be used to predict the significant wave height. In this embodiment, taking the prediction of the significant wave height as an example, ERA5 significant wave height reanalysis data is used as the training and test data sets. The ERA5 significant wave height data set is a comprehensive reanalysis data set that provides high-resolution wave height information. Many researchers use the ERA5 data set to train and predict deep learning models for various applications including extreme wave height prediction, due to its reliability and wide coverage. Specifically, this embodiment focuses on the data in the offshore area, with a latitude range from 20°N to 35.5°N, a longitude range from 116.5°E to 131.5°E, a data time span from 2013 to 2022, and a spatial resolution of 0.25°×0.25°.
[0065] 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 is evaluated using the root mean square error (RMSE), mean absolute error (MAE), and coefficient of determination ( ), and these model evaluation metrics are all conventional technical means in this field and will not be elaborated too much. The root mean square error (RMSE) measures the standard deviation between the predicted value and the true value . The smaller the value, the higher the prediction accuracy. The mean absolute error (MAE) is the average of the absolute errors calculated between the predicted value and the true value. The coefficient of determination ( ) represents the explanatory ability of the model for the changes in the actual data, and the correlation coefficient (ρ) represents a statistical index that measures the strength of the linear relationship between the predicted value and the true value.
[0066] The model receives data from the past 7 days to predict the wave heights at the 1st hour, 6th hour, and 12th hour in the future. The experiment is conducted on a single NVIDIA 4090 RTX GPU. The network is trained for 200 epochs using the Adam optimizer, and the minimum batch size is set to 8. During training, the learning rate is adjusted to 1e-4.
[0067] To prove the effectiveness of the present invention, U-Net, Conv-LSTM, and FNO are also selected for comparative experiments with the method proposed in the present invention. The detailed information on the experimental effects is shown in Tables 1 - 4 below, which are the comparisons regarding RMSE, MAE, , and ρ respectively.
[0068] Table 1 Comparison of RMSE between the present invention and existing methods
[0069] Table 2 Comparison of MAE between the present invention and existing methods
[0070] Table 3 Comparison of the present invention with existing methods regarding
[0071] Table 4 Comparison of ρ between the present invention and existing methods
[0072] Among all prediction time scales, the method of the present invention always exhibits the lowest RMSE values. Especially in the 1-hour and 6-hour predictions, they are 0.0256 and 0.1180 respectively, significantly superior to U-Net (0.0295 and 0.1328), Conv-LSTM (0.0321 and 0.1581), and LSM (0.0291 and 0.1312). This indicates that the method of the present invention has higher accuracy in short-term predictions. The present invention also performs excellently in terms of the MAE index. The MAE values for 1 hour and 6 hours are 0.0144 and 0.0702 respectively, both lower than other methods. This further proves the effectiveness of the present invention in reducing prediction errors. In terms of the index, the method of the present invention also performs best in the 1-hour and 6-hour predictions, being 0.9992 and 0.9833 respectively, showing a good ability to explain data variations. In contrast, the values of other methods are generally lower, especially in longer-term predictions, showing an obvious downward trend. In terms of the index, the method of the present invention also performs best in all prediction durations, being 0.9924, 0.9835, and 0.9638 respectively, showing a good ability to explain data variations. In contrast, the ρ values of other methods are generally lower, especially in longer-term predictions, showing an obvious downward trend.
[0073] As Figure 5 shown, from the 1-hour prediction visualization of different methods, it can be seen that in short-term predictions, the prediction results of the present invention are more in line with the real data, indicating that the present invention demonstrates stronger stability and reliability. To comprehensively evaluate the prediction capabilities of various methods, the present invention, Conv-LSTM, and FNO, three different methods, were selected to visualize the prediction results. These visualizations were carried out at 3 different time points, carefully selected to represent different scenarios, that is Figure 5 in, each column is 3 visualization graphs corresponding to each method at 3 different time points, Figure 5 and in the visualization graphs in, the horizontal and vertical coordinates of each graph are the longitude and latitude coordinate values of the selected area, and different colors represent the numerical magnitudes of the prediction results.
[0074] Of course, the above description is not a limitation of the present invention, and the present invention is not limited to the above examples. Those of ordinary skill in the art in the technical field of the present invention, within the scope of the essence of the present invention, any changes, modifications, additions, or substitutions should fall within the protection scope of the present invention.
Claims
1. A multi-scale sea wave height prediction method based on a large language model, characterized in that, Including the following steps: Step S1, the step of amplitude-phase decoupling interaction: The frequency-domain characteristics of the wave height and wind field are analyzed by Fourier transform to obtain the amplitude and phase characteristics of the wave height and wind field. The convolutional layer is used to extract the characteristics of the wave height and wind field of the ocean waves, and then the amplitude and phase of the wave height of the ocean waves are connected by means of residual connection, so as to enhance the amplitude and phase of the wind field to the amplitude and phase of the wave height respectively. Finally, the enhanced wave height data of the ocean waves are obtained through inverse Fourier transform ; Step S2, the step of multi-scale semantic information extraction: For the enhanced sea wave height data output by step S1, by constructing a feature pyramid structure, systematically capture ocean features at different spatial scales, and output sea wave auto-encoding features at different scales; Perform word vector auto-encoding on the vocabulary of the large language model and output word vector features ; The cross-modal attention mechanism is used to achieve the interaction between the wave auto-encoding features and the word vector features, output domain-specific semantic features at different scales, and finally obtain multi-scale semantic information through the dynamic fusion mechanism ; Step S3, the step of prediction by a large language model driven by sea wave height domain prompt words: Input multi-scale semantic information into a large language model, and through wave-specific embeddings to guide the feature interpretation process from the perspective of domain knowledge, to achieve in-depth analysis of features based on domain knowledge, output predicted features, and obtain the predicted wave height of the ocean waves.
2. The multi-scale ocean wave height prediction method based on a large language model according to claim 1, wherein In step S1, a convolutional layer is adopted (·) and (·), and then the amplitude and phase of the sea wave height are connected by using a residual connection method to realize the non-linear interaction of the sea wave height and the wind field characteristics in the amplitude and phase spaces, and the enhanced wave height amplitude and phase characteristics are obtained. The formula is expressed as follows: ; ; where cat(·) represents the concatenation operation along the channel dimension, where , , are the wave height data x of the ocean wave and the amplitude components of the wind field component , , where , , are the wave height data x of the ocean wave and the amplitude components of the wind field component , ; represents the enhanced amplitude feature, represents the enhanced phase feature; Then the inverse Fourier transform is used to reconstruct the enhanced features in the time domain: ; Where IFFT represents the inverse fast Fourier transform, and complex(·) reconstructs the complex-valued frequency representation from the enhanced amplitude and phase components.
3. The multi-scale sea wave height prediction method based on a large language model according to claim 1, characterized in that In step S2, for the enhanced ocean wave height data Construct a feature pyramid structure through n layers of downsampling convolution to obtain ocean wave auto-encoding features F of different scales.
4. The multi-scale sea wave height prediction method based on a large language model according to claim 1, characterized in that, In step S2, the step of word vector auto-encoding is: Starting from the original embedding dictionary D, perform dimensionality reduction through PCA, and then perform a linear mapping on the word vectors of the large language model after dimensionality reduction , and output the 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 step of using a cross-modal attention mechanism to realize the interaction between sea wave auto-encoding features and word vector features and output domain-specific semantic features at different scales is: For each scale i, use scale-specific projections to calculate query, key, and value matrices to ensure that the attention mechanism focuses on relevant features at each scale: ; Among them, , and are learnable projection matrices for query, key, and value respectively, where is the ocean wave auto-encoding feature at scale i, refers to the word vector feature, refers to the query vectors corresponding to different scales, and represent the key vector and the value vector; Then, through the attention mechanism, exchange information between the sea wave height features and the semantic features: ; where S i represents domain - specific semantic features at different scales, where is the dimension of the key, which is used to scale the dot - product attention scores.
6. The multi-scale sea wave height prediction method based on a large language model according to claim 1, wherein The steps for obtaining multi-scale semantic information based on a dynamic fusion mechanism are as follows: Adaptive weight the contribution of each scale according to the relevance of features at different scales to the prediction task: ; ; ; Among them, AvgPool represents the average pooling operation, and Conv1d is the one-dimensional convolution operation. are the dynamic weights calculated by the Sigmoid and Softmax functions. represents concatenating the features of all scales. together; is the multi-scale semantic information after weighted fusion.
7. The multi-scale sea wave height prediction method based on a large language model according to claim 6, characterized in that, In step S3, the calculation process of prediction by a large language model driven by sea wave height domain prompt words is: First, embed domain-specific prompts to provide the basic context for the wave prediction task. Different domain-specific prompt words are designed for different tasks to obtain wave-specific embeddings : Then, wave-specific embeddings are combined with multi-scale semantic information and processed by a large language model to obtain an output ; Finally, through the upsampling convolution operation, the model output is converted into the final predicted result of the ocean wave height.
8. A multi-scale sea wave height prediction system based on a large language model, characterized in that, A system for implementing the multi-scale sea wave height prediction method based on a large language model according to any one of claims 1-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 sea wave height domain prompt words; The amplitude-phase decoupling interaction module is used to process wind field and sea wave height data. By analyzing the frequency domain characteristics of ocean data through Fourier transform, the amplitude and phase characteristics of wave height and wind field are obtained. A fusion mechanism is designed to enhance the amplitude and phase of wave height by the amplitude and phase of the wind field respectively. Finally, the enhanced sea wave height data is obtained through inverse Fourier transform. ; The multi-scale semantic information extraction module systematically captures ocean features at different spatial scales for the enhanced sea wave height data output by the amplitude-phase decoupling interaction module by constructing a feature pyramid structure, and outputs sea wave auto-encoding features at different scales; After reducing the dimensionality of the vocabulary of the large language model, perform autoencoding to output word vector features , use the cross-modal attention mechanism to achieve the interaction between the wave autoencoding features and the word vector features, output domain-specific semantic features at different scales, and finally obtain multi-scale semantic information through the dynamic fusion mechanism ; The large language model prediction module driven by domain-specific prompts in the field of ocean wave height inputs domain-specific multi-scale semantic features into the large language model, and uses domain-specific prompts to guide the feature interpretation process from the perspective of domain knowledge, so as to achieve in-depth analysis of features based on domain knowledge, output prediction features, and obtain the predicted ocean wave height.
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 sea wave height prediction method based on a large language model according to any one of claims 1-7.
10. An electronic device, characterized in that, Including: A processor and a memory, and when the processor executes the computer program stored in the memory, it implements the multi-scale sea wave height prediction method based on a large language model according to any one of claims 1-7.
Citation Information
Patent Citations
Side-scan sonar seabed sand wave detection method based on multi-scale convolution and pooling strategy
CN113516626A
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
Load quantification method for floating fan in typhoon scene
CN119862812A
Marine environmental element prediction method based on STEOF-LSTM
JP7175415B1
Cited By
Sea wave probability prediction method and system
CN120850049A
Multi-scale physical enhancement type irregular sea wave prediction method
CN121350592A
A multiscale physically enhanced irregular sea wave prediction method
CN121350592B