Signaling method and apparatus for transmitting a service guide
By filtering data related to significant wave height for two-layer decomposition and utilizing a bidirectional long short-term memory network with an attention mechanism, the problems of high computational cost and mode mixing in existing technologies are solved, thereby improving the accuracy and efficiency of significant wave height prediction.
Patent Information
- Application Number
- CN202511278172.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-09
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2045-09-09
AI Technical Summary
Existing effective wave height prediction methods are computationally intensive and complex. Single prediction models are unable to capture long-term relationships in the data, and traditional decomposition algorithms are unable to solve the mode aliasing problem, resulting in insufficient prediction accuracy.
By selecting data with high correlation to significant wave height as input, a two-level decomposition is performed. Adaptive noise complete set empirical mode decomposition and K-means clustering of mode components are used, and variational mode decomposition is combined to optimize the decomposition parameters. Finally, a bidirectional long short-term memory network based on an attention mechanism is used to extract data features.
It reduces computational load and data complexity, improves the accuracy of effective wave height prediction, enhances the ability to capture long-term dependencies, and improves prediction performance.
Smart Images

Figure CN120763594B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of ocean wave data processing technology, and in particular to an effective wave height prediction method, apparatus, and electronic device. Background Technology
[0002] Compared with wind and solar energy, wave energy is a clean and renewable energy source with higher energy density. The effective wave height is a key parameter in the wave energy power generation process. Waves are affected by many factors such as wind, ocean currents, and topography, and have the characteristics of high randomness and sudden change, which brings great difficulty to the prediction of effective wave height.
[0003] Among existing methods for predicting significant wave height, numerical models involve large computational loads and high computational complexity; single prediction models struggle to capture long-term relationships in the data and exhibit poor generalization ability when dealing with complex data; traditional data decomposition algorithms are unable to solve the modal aliasing problem, and predictions cannot fully extract data features, thus limiting the accuracy of significant wave height prediction. Summary of the Invention
[0004] The purpose of this invention is to provide a method, apparatus, and electronic device for predicting significant wave height. First, data with high correlation to significant wave height are selected as input data to reduce computational load. Then, significant wave height is decomposed into two layers to reduce nonlinearity and lower data complexity. Finally, a bidirectional long short-term memory network based on an attention mechanism is used to fully extract data features and make comprehensive predictions, thereby improving the accuracy of significant wave height prediction.
[0005] In a first aspect, the present invention provides an effective wave height prediction method, comprising:
[0006] Historical feature data for wave height prediction is obtained and preprocessed to obtain a significant wave height dataset. The significant wave height dataset includes: significant wave height, wind direction, average wind speed, instantaneous wind speed, dominant wave period, average wave period, average wave direction, sea level pressure, air temperature, sea surface temperature, and dew point temperature.
[0007] Data in the significant wave height dataset that meet the preset conditions for correlation with the significant wave height are selected as model input data.
[0008] The effective wave heights after primary and secondary decompositions are determined as input data. The primary decomposition includes: empirical mode decomposition based on adaptive noise complete set and K-means clustering of mode components. The secondary decomposition includes: variational mode decomposition. The number of decompositions and the penalty factor of variational mode decomposition are optimized based on the Crowned Porcupine optimization algorithm.
[0009] The model input data is fed into a bidirectional long short-term memory network based on an attention mechanism until the preset conditions are met, thus obtaining an effective wave height prediction model.
[0010] Input the target feature data into the significant wave height prediction model and output the significant wave height prediction value.
[0011] In some preferred embodiments of the present invention, the preprocessing includes: outlier removal, missing data imputation, and normalization.
[0012] In some preferred embodiments of the present invention, the correlation is determined based on the following formula:
[0013] ;
[0014] Where ρ represents the correlation; R(x) i ) is the variable x i The order of things; R(y) is the average rank of all x values. i ) is the variable y i The order of things; The average rank of all y values; n is the number of data pairs; x i Let y be the i-th sample data in variable x; x is a variable data in correlation calculation; y i Let be the i-th sample data in the variable y; y is another variable data in the correlation calculation.
[0015] In some preferred embodiments of the present invention, the step of adaptive noise complete set empirical mode decomposition includes:
[0016] Gaussian white noise was added to all the original sequences to be decomposed for the significant wave height, resulting in the data to be decomposed.
[0017] After performing empirical mode decomposition on the data to be decomposed, ensemble averaging is performed to obtain the first mode component and residual term;
[0018] Gaussian white noise is added to all sequences to be decomposed in the residual terms obtained after each empirical mode decomposition, and then empirical mode decomposition and ensemble averaging are performed until the preset conditions are met to obtain multiple first mode components.
[0019] In some preferred embodiments of the present invention, the step of K-means clustering of modal components includes:
[0020] Calculate the fuzzy entropy of multiple first-mode components;
[0021] K-means clustering was performed on multiple fuzzy entropies to obtain high-frequency components, mid-frequency components, and low-frequency components.
[0022] The high-frequency component, mid-frequency component, and low-frequency component are aggregated separately.
[0023] In some preferred embodiments of the present invention, the secondary decomposition step includes:
[0024] Variational mode decomposition was performed on the high-frequency components after aggregation to obtain multiple second-mode components.
[0025] In some preferred embodiments of the present invention, the method further includes: determining the number of decompositions and the penalty factor of the variational mode decomposition through the following steps:
[0026] Initialize the search range for the number of decompositions in variational mode decomposition, the search range for the penalty factor, the population size of the hog optimization algorithm, and the maximum number of iterations of the hog optimization algorithm, and define the convergence threshold;
[0027] The number of decompositions and the penalty factor are iteratively optimized using the Crown Porcupine optimization algorithm until the maximum number of iterations is reached, thus obtaining the final number of decompositions and the final penalty factor.
[0028] In some preferred embodiments of the present invention, in a bidirectional long short-term memory network based on an attention mechanism, the attention mechanism layer is disposed between the bidirectional long short-term memory network and the fully connected layer.
[0029] In a second aspect, the present invention provides an effective wave height prediction device, comprising:
[0030] The data processing module is used to acquire historical feature data for wave height prediction, preprocess the historical feature data to obtain the significant wave height dataset; the significant wave height dataset includes: significant wave height, wind direction, average wind speed, instantaneous wind speed, dominant wave period, average wave period, average wave direction, sea level pressure, air temperature, sea surface temperature and dew point temperature.
[0031] The first input data determination module is used to determine the data in the significant wave height dataset whose correlation with the significant wave height meets the preset conditions as model input data;
[0032] The second input data determination module is used to determine the effective wave height after primary and secondary decomposition as input data. The primary decomposition includes: empirical mode decomposition based on adaptive noise complete set and K-means clustering of mode components; the secondary decomposition includes: variational mode decomposition; the number of decompositions and the penalty factor of variational mode decomposition are optimized based on the Crowned Porcupine optimization algorithm.
[0033] The prediction model processing module is used to input the model input data into a bidirectional long short-term memory network based on an attention mechanism until the preset conditions are met, thereby obtaining an effective wave height prediction model.
[0034] The data prediction module is used to input target feature data into the significant wave height prediction model and output the significant wave height prediction value.
[0035] Thirdly, the present invention provides an electronic device including a processor and a memory, the memory storing computer-executable instructions that can be executed by the processor, the processor executing the computer-executable instructions to implement the effective wave height prediction method provided in the first aspect above.
[0036] This invention brings the following beneficial effects:
[0037] This invention provides a method, apparatus, and electronic device for predicting significant wave height. The method includes: acquiring historical feature data for wave height prediction; preprocessing the historical feature data to obtain a significant wave height dataset; wherein the significant wave height dataset includes: significant wave height, wind direction, average wind speed, instantaneous wind speed, dominant wave period, average wave period, average wave direction, sea level pressure, air temperature, sea surface temperature, and dew point temperature; calculating the correlation between any two data in the significant wave height dataset; determining the data in the significant wave height dataset whose correlation with significant wave height meets preset conditions as model input data; and determining the significant wave height after primary and secondary decomposition as input data; wherein the primary decomposition includes: based on adaptive noise complete set empirical modes. K-means clustering of decomposition and modal components; secondary decomposition includes variational mode decomposition; the number of decompositions and penalty factors of variational mode decomposition are optimized based on the Crowned Porcupine optimization algorithm; the model input data is fed into a bidirectional long short-term memory network based on an attention mechanism until a preset condition is reached to obtain the significant wave height prediction model; the target feature data is input into the significant wave height prediction model, and the significant wave height prediction value is output; firstly, data with high correlation to significant wave height are selected as input data to reduce the amount of computation, then significant wave height is decomposed into two layers to weaken the nonlinearity of significant wave height and reduce data complexity, and finally, the data features are fully extracted through a bidirectional long short-term memory network based on an attention mechanism to make comprehensive predictions of the data, thereby improving the accuracy of significant wave height prediction. Attached Figure Description
[0038] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0039] Figure 1 This is a flowchart of an effective wave height prediction method provided in an embodiment of the present invention;
[0040] Figure 2A correlation diagram provided for an embodiment of the present invention;
[0041] Figure 3 This is a schematic diagram of a single decomposition result of wave height data provided in an embodiment of the present invention;
[0042] Figure 4 This is a schematic diagram of a first modal component K-means clustering result provided in an embodiment of the present invention;
[0043] Figure 5 This is a schematic diagram of the fitness iteration curves of various optimization algorithms provided in an embodiment of the present invention;
[0044] Figure 6 This is a schematic diagram of a high-frequency component decomposition result provided in an embodiment of the present invention;
[0045] Figure 7 A schematic diagram illustrating an effective wave height prediction result provided in an embodiment of the present invention;
[0046] Figure 8 This is a schematic diagram of the structure of an effective wave height prediction device provided in an embodiment of the present invention;
[0047] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention.
[0048] Icons: 310 - Data processing module; 320 - First input data determination module; 330 - Second input data determination module; 340 - Prediction model processing module; 350 - Data prediction module; 400 - Memory; 401 - Processor; 402 - Bus; 403 - Communication interface. Detailed Implementation
[0049] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0050] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0051] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0052] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship commonly used when the product of this invention is in use. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this invention. In addition, the terms "first," "second," "third," etc., are only used to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0053] Furthermore, terms such as "horizontal," "vertical," and "sag" do not imply that components must be absolutely horizontal or suspended, but rather that they can be slightly tilted. For example, "horizontal" simply means that its direction is more horizontal relative to "vertical," and does not mean that the structure must be completely horizontal, but can be slightly tilted.
[0054] In the description of this invention, it should also be noted that, unless otherwise explicitly specified and limited, the terms "set," "install," "connect," and "link" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0055] Wave energy, as a clean and renewable energy source, boasts higher energy density compared to wind and solar power. Significant wave height (SWH) is a crucial parameter in wave energy power generation, and accurate prediction of SWH can provide reliable recommendations for power generation. However, waves are influenced by numerous factors such as wind, ocean currents, and topography, exhibiting highly random and sudden changes, which significantly complicates SWH prediction. Therefore, as wave energy develops as a renewable energy source, establishing a new SWH prediction algorithm is of paramount importance.
[0056] Existing effective wave height prediction methods are mainly divided into two categories: numerical models and statistical models. Numerical models simulate ocean waves by solving computational equations based on theoretical models. Commonly used numerical models include Waveprediction Model (WAM), Simulating Wave Nearshore (SWAN), and WAVEWATCH III. While numerical wave prediction models can accurately simulate parameters such as wave height, period, and direction, they require large amounts of meteorological and oceanographic data, resulting in high computational complexity and a large workload. Furthermore, their accuracy depends on the quality of the input data; inaccurate or incomplete data will affect prediction accuracy.
[0057] With the continuous improvement of computer computing performance and the development of marine observation technologies such as buoys and observation vessels, machine learning (ML) and deep learning (DL) methods based on statistical theory have provided new feasible solutions for the accurate prediction of significant wave height. However, machine learning models such as artificial neural networks (ANN) and support vector machines (SVM) cannot capture long-term dependencies in time series data and have certain limitations in processing complex data and poor generalization ability.
[0058] In recent years, many deep learning models have been used for effective wave height prediction, such as recurrent neural networks (RNNs), long short-term memory networks (LSTMs), and gated recurrent unit networks (GRUs). Among them, LSTMs, through their unique gating mechanism, can effectively capture nonlinear features and long-term dependencies in time series. While AI-based nonlinear models have advantages in processing time series, their predictive performance may be limited when dealing with highly non-stationary sequences, as they may struggle to adapt to the time-varying characteristics of the data.
[0059] The generation mechanism of ocean waves is complex, and wave time series always exhibit strong volatility, nonlinearity, and non-stationarity. To address this issue, smoothing nonlinear data using decomposition algorithms to improve prediction accuracy is an effective method. However, EMD-like algorithms are prone to mode aliasing during further decomposition and may leave white noise in the decomposition results. In contrast, Variational Mode Decomposition (VMD) offers a different solution. VMD abandons the noise-assisted approach, effectively overcoming mode aliasing and avoiding noise residue by using preset frequency band constraints and a variational optimization framework. However, manually setting parameters cannot achieve optimal decomposition results, thus affecting prediction accuracy.
[0060] Traditional data decomposition algorithms (such as EMD and EEMD) struggle to address mode aliasing, limiting the accuracy of significant wave height prediction. Significant wave height data exhibits strong volatility and nonlinearity; even a single decomposition yields high-frequency components with significant complexity, impacting prediction performance. While VMD decomposition offers relatively good results, the number of decompositions requires manual setting. and penalty factor However, this method is subjective and limited, and cannot achieve optimal decomposition results. Furthermore, the LSTM one-way network ignores the influence of backward information on the prediction results, leading to insufficient extraction of effective wave height sequence features.
[0061] To address the aforementioned issues and improve the accuracy of significant wave height prediction, a method based on bilayer decomposition and BiLSTM-Attention is proposed. The method utilizes Spearman correlation coefficients to select wave and meteorological characteristic parameters with strong correlation to significant wave height as input sequences. Bilayer decomposition reduces the nonlinearity of the significant wave height sequence and decreases data complexity. BiLSTM captures the long-term dependence of significant wave height, and the attention mechanism assigns weights to the time-series state information output by the BiLSTM layer. A fully connected layer is used to predict the data, and the predicted subsequences are accumulated to obtain the prediction result.
[0062] The following detailed description of some embodiments of the present invention is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0063] Example 1
[0064] This invention provides an effective wave height prediction method, see [link to relevant documentation]. Figure 1 The flowchart shown in this embodiment of the invention provides an effective wave height prediction method, which includes:
[0065] Step S102: Obtain historical feature data for wave height prediction, preprocess the historical feature data to obtain a significant wave height dataset; wherein, the significant wave height dataset includes: significant wave height, wind direction, average wind speed, instantaneous wind speed, dominant wave period, average wave period, average wave direction, sea level pressure, air temperature, sea surface temperature and dew point temperature.
[0066] Specifically, the stored historical buoy data is used as historical feature data, which includes various categories such as: significant wave height (SWH), wind direction (WDIR), mean wind speed (WSPD), instantaneous wind speed (GST), dominant wave period (DPD), mean wave period (APD), mean wave direction (MWD), sea level pressure (PRES), air temperature (ATMP), sea surface temperature (WTMP), and dew point temperature (DEWP). The feature data is preprocessed, and the processed dataset is determined as the significant wave height dataset.
[0067] Furthermore, in some preferred embodiments of the present invention, the preprocessing includes: outlier removal, missing data imputation, and normalization.
[0068] Specifically, data collected from the natural environment exhibits significant randomness at individual data points, but tends to be stable overall. Based on the overall stability of the data, outliers in time-series data are corrected. Correction methods include removing outliers and imputing missing data. Common outlier removal methods include standard deviation and interquartile range methods. Common missing data imputation methods include mean, median, linear interpolation, and polynomial interpolation.
[0069] To reduce the influence of different dimensions among different feature data, normalization is used to transform multiple data into a unified dimension. Commonly used normalization methods include Min-Max normalization and vector normalization.
[0070] Step S104: Select the data in the significant wave height dataset that have a correlation with the significant wave height that meets the preset conditions as the model input data.
[0071] First, calculate the correlation between any two data points in the significant wave height dataset. There are several methods for calculating data correlation, including Pearson correlation coefficient and Kendall rank correlation coefficient.
[0072] Since the feature data are not normally distributed, or contain outliers or nonlinear relationships, in some preferred embodiments of the present invention, the Spearman correlation coefficient is determined based on the following formula as the correlation between the two types of data: Where ρ represents the correlation, with a value ranging from [-1, 1]. The larger the absolute value, the greater the correlation between x and y; R(x i ) is the variable x i The order of things; R(y) is the average rank of all x values. i ) is the variable y i The order of things; The average rank of all y values; n is the number of data pairs; x iLet y be the i-th sample data in variable x; x is a variable data in correlation calculation; y i Let be the i-th sample data in the variable y; y is another variable data in the correlation calculation.
[0073] Then, the data other than the significant wave height in the significant wave height dataset are used as marine environmental characteristic parameters. Based on the above formula, the correlation coefficient between the significant wave height and the marine environmental characteristic parameters is determined, such as... Figure 2 The diagram illustrates a correlation profile provided by an embodiment of the present invention. The preset condition is generally that the absolute value is greater than a preset value; in some preferred embodiments of the invention, the preset value is 0.5. Based on this, MWD, GST, WSPD, and WDIR show a high positive correlation with significant wave height, with Spearman correlation coefficients of 0.76, 0.68, 0.66, and 0.51, respectively, and are used as core model input data. Furthermore, DEWP and DPD show a high negative correlation with significant wave height, with Spearman correlation coefficients of -0.75 and -0.63, respectively, and are used as auxiliary parameters in the model input data. To reduce redundancy caused by massive amounts of data, APD, PRES, ATMP, and WTMP, which have low correlation with significant wave height, are removed and not used as model input data.
[0074] Step S106: The effective wave heights after the first and second decompositions are determined as input data; wherein, the first decomposition includes: empirical mode decomposition based on adaptive noise complete set and K-means clustering of mode components; the second decomposition includes: variational mode decomposition; the number of decompositions and the penalty factor of variational mode decomposition are optimized based on the Crowned Porcupine optimization algorithm.
[0075] Specifically, in some preferred embodiments of the present invention, the adaptive noise complete set empirical mode decomposition is a step including: adding Gaussian white noise to all original sequences to be decomposed with significant wave heights to obtain data to be decomposed; performing empirical mode decomposition on the data to be decomposed and then performing set averaging to obtain first mode components and residual terms; adding Gaussian white noise to all sequences to be decomposed after each empirical mode decomposition and then performing empirical mode decomposition and set averaging again until a preset condition is met to obtain multiple first mode components.
[0076] The significant wave height data is decomposed into a first layer. CEEMDAN (a method based on EMD theory that solves the problem of mode aliasing in EMD decomposition by adding adaptive white noise) is used to decompose the original significant wave height data with strong volatility into multiple modal components of different complexity, and the data is then smoothed.
[0077] The specific steps include: adding n times Gaussian white noise to each original sequence to be decomposed in the original time series y(t) to obtain the sequence to be decomposed y.i (t); for each y i (t) Perform EMD decomposition, and take the average of the first modal components obtained from each as the first modal component IMF1 and the remaining components, i.e., the residual term r1(t), obtained from CEEMDAN decomposition; add Gaussian white noise to each sequence to be decomposed in the residual term, and perform EMD decomposition again to obtain another first modal component IMF2 and the second residual term r2(t) of the original sequence; repeat the above steps until the stopping condition is met, and the original data is decomposed into several modal components and residual terms; smooth the first modal component, see [link to documentation]. Figure 3 The diagram shown is a schematic of a single decomposition result of wave height data provided by an embodiment of the present invention. The complexity of each first mode component of the effective wave height after decomposition gradually decreases from IMF1 to IMF11. Since wave height is affected by weather and topography and has strong volatility, the changing trend of the effective wave height sequence can be fully explored through a single decomposition.
[0078] However, after CEEMDAN decomposition, the first-mode components at different frequencies still exhibit relatively high fuzzy entropy in some modes. Since higher fuzzy entropy values indicate greater complexity and the potential presence of significant noise, a secondary decomposition is employed to reduce the complexity of high-frequency components. Performing a secondary decomposition on all components would not only increase the computational scale but also accumulate errors. To reduce these errors and computational load, it is necessary to first aggregate the first-mode components.
[0079] In some preferred embodiments of the present invention, the step of K-means clustering of modal components includes: calculating the fuzzy entropy of a plurality of first modal components; performing K-means clustering on the plurality of fuzzy entropies to obtain high-frequency component, mid-frequency component and low-frequency component; and aggregating the high-frequency component, mid-frequency component and low-frequency component respectively.
[0080] Specifically, K-means clustering is used to cluster all first-mode components. The aggregation of each mode component is then performed; the aggregation results are shown below. Figure 4 The schematic diagram of the first modal component K-means clustering result provided by the embodiment of the present invention shown is divided into high-frequency part IMF1, mid-frequency part IMF2, and low-frequency part IMF3.
[0081] Furthermore, in some preferred embodiments of the present invention, the secondary decomposition step includes: performing variational mode decomposition on the high-frequency component after polymerization to obtain multiple second mode components.
[0082] Specifically, VMD (Variational Mode Decomposition) decomposes a time series into K center frequencies ω by solving a variational problem. kThe modal components have limited bandwidth, thus reducing the complexity of the effective wave height data. Generally, hyperparameters need to be set manually: the number of decompositions K and the penalty factor α. Different parameter settings will result in different decomposition effects.
[0083] However, manually determining the parameters increases the influence of human factors and cannot achieve the best decomposition effect. Therefore, in some preferred embodiments of the present invention, the method further includes: determining the number of decompositions and the penalty factor of variational mode decomposition through the following steps: initializing the search range of the number of decompositions of variational mode decomposition, the search range of the penalty factor, the population size of the hog optimization algorithm, and the maximum number of iterations of the hog optimization algorithm, and defining a convergence threshold; iteratively optimizing the number of decompositions and the penalty factor based on the hog optimization algorithm until the maximum number of iterations is reached, to obtain the final number of decompositions and the final penalty factor.
[0084] Specifically, the VMD hyperparameters are optimized using the CPO optimization algorithm to find the optimal [K, α] parameter combination; first, the number of VMD mode decompositions is initialized. and penalty factor The search range, CPO population size, and maximum number of iterations are defined, and a convergence threshold is defined. VMD is used to decompose the significant wavelength (SWH) to obtain multiple modal components (IMFs). Information entropy is selected as the fitness function to evaluate the decomposition effect of VMD on the SWH sequence under each set of [K, α] parameters. During iteration, the CPO updates the population parameter combination based on its four core defense strategies: visual intimidation, auditory intimidation, olfactory attack, and physical attack, combined with the current optimal individual location. If the maximum number of iterations is reached or the convergence condition is met, the globally optimal [K, α] parameter combination is output; otherwise, decomposition evaluation and population updates continue until the termination condition is met.
[0085] Further, see Figure 5The diagram illustrates the fitness iteration curves of various optimization algorithms provided in this embodiment of the invention. The diagram shows the iterative optimization curves of the Crowned Porcupine Optimization Algorithm (CPO), Northern Eagle Optimization Algorithm (NGO), Sand Cat Group Optimization Algorithm (SCSO), Gold Rush Optimization Algorithm (GRO), and Grey Wolf Optimization Algorithm (GWO). The population size for each optimization algorithm is set to 10, the number of iterations to 30, the search range for the number of decompositions K to be [2, 14], and the search range for the penalty factor α to be [200, 3000]. The GWO optimization algorithm has the slowest convergence speed, converging after 27 iterations. The SCSO and GRO optimization algorithms have relatively better convergence speeds, converging after 12 and 16 iterations respectively, but their fitness values after decomposition are relatively high, at 3.33189 and 3.33181 respectively. NGO shows a significant improvement in decomposition performance, with a fitness value of 3.32886 after convergence. CPO exhibits superior optimization performance, rapidly reducing the fitness value in the early stages of iteration, demonstrating strong global search capabilities. After convergence, the fitness value of CPO was 3.32275, and the optimal parameters were [8, 1987]. By adding CPO to the two-layer decomposition for parameter optimization, the VMD decomposition capability was further improved, helping the neural network to better extract features from the original time series.
[0086] Based on the optimization results, CPO-VMD was used to perform a secondary decomposition on the high-frequency components after the primary decomposition. The results of the secondary decomposition are shown below. Figure 6 The schematic diagram shown in this embodiment of the invention provides a high-frequency component decomposition result, which decomposes the high-frequency component into eight second-mode components of different frequencies. The complexity of each second-mode component after decomposition is lower than that of the high-frequency component after one decomposition, which is more conducive to model prediction.
[0087] Step S108: Input the model input data into a bidirectional long short-term memory network based on an attention mechanism until the preset conditions are met to obtain an effective wave height prediction model.
[0088] Specifically, the first mode component corresponding to the mid-frequency component, the first mode component corresponding to the low-frequency component, the second mode component, and marine environmental feature parameters highly correlated with significant wave height are combined and input into a BiLSTM network. Through its unique bidirectional gating mechanism, the network captures complex relationships in the time-series data, and its output is the hidden layer feature. The hidden features are shown below:
[0089] ;
[0090] in, To output hidden layer features, w y For weights, This is the positive output vector. b is the reverse output vector.y This is the offset.
[0091] Furthermore, in some preferred embodiments of the present invention, in the bidirectional long short-term memory network based on the attention mechanism, the attention mechanism layer is disposed between the bidirectional long short-term memory network and the fully connected layer.
[0092] Different weights are assigned to the output features of the BiLSTM layer, allowing the model to focus more on key information in the input sequence. After the Attention layer, a fully connected layer maps the features to individual output nodes, and a regression layer completes continuous value prediction. Finally, the predicted values of each modal component of the effective wave height are superimposed to obtain the overall prediction result. BiLSTM combines forward and backward LSTM layers to fully explore the temporal data dependencies from both directions, resulting in better prediction performance.
[0093] Specifically, Attention assigns different weights to the output features of the BiLSTM layer. The specific steps are as follows: Input sequence The hidden state is output after the BiLSTM layer. And obtain a set of query vectors q, and calculate the similarity s between the query vectors and each hidden state. i Then, the attention weights k are obtained by normalization using Softmax. i Finally, the attention weights are summed with their corresponding values to obtain the hidden state c with attention scores. i .
[0094] ;
[0095] ;
[0096] ;
[0097] Among them, s i Let k be the similarity probability distribution; i h is the output value of the BiLSTM hidden layer. i Attention weights for the current input; c i The hidden state is the one with attention score; , , , These are the learning parameters of the model, which are continuously updated during the model training process.
[0098] By combining BiLSTM with an attention mechanism, different weights are assigned to the output features of the BiLSTM layer, allowing the model to focus more on key information in the input sequence. Following the attention layer, a fully connected layer maps features to individual output nodes, and a regression layer performs continuous value prediction. Finally, the predicted values of each modal component of the effective wave height are superimposed to obtain the overall prediction result. The BiLSTM network in the model uses the Adam optimizer. The hyperparameters of the BiLSTM network, including time step, number of neurons, random dropout ratio, maximum number of iterations, and learning rate, are set as shown in Table 1.
[0099] Table 1
[0100]
[0101] See Figure 7 The diagram shown in this embodiment of the invention illustrates an effective wave height prediction result. By combining a decomposition algorithm and inputting the decomposition result into a neural network, it effectively solves the problem of lag in prediction by single LSTM and BiLSTM models, and demonstrates good performance in predicting peaks, thus significantly improving the prediction effect of the neural network. The prediction performance of the single model is significantly improved after incorporating the Attention mechanism. Integrating the Attention mechanism into the hybrid model further enhances the model's prediction performance. Attention enhances the importance of BiLSTM in generating key feature information in the hidden layer, thereby increasing its contribution to the overall model output, showing a good fitting effect in both overall trends and local fluctuations.
[0102] Furthermore, to validate the model's prediction performance, LSTM, BiLSTM, BiLSTM-Attention, and CEEMDAN-CPO-VMD-BiLSTM were selected as comparison models to compare the prediction results of one step. Mean absolute error (MAE), root mean square error (RMSE), and mean absolute percentage error (MAPE) were used as evaluation metrics.
[0103] The evaluation indicators are constrained by the following formula:
[0104] ;
[0105] ;
[0106] ;
[0107] Among them, X i Y represents the true value. i is the predicted value, and N is the length of the time series.
[0108] The evaluation results are shown in Table 2. The prediction results of the model provided in this embodiment of the invention are MAE, RMSE and MAPE of 0.0544, 0.0670 and 2.6051, respectively, which are better than the model.
[0109]
[0110] Step S110: Input the target feature data into the effective wave height prediction model and output the effective wave height prediction value.
[0111] Specifically, target feature data is obtained, which is the feature data to be predicted. It is preprocessed, and the significant wave height is further decomposed into two layers. The result is then input into the significant wave height prediction model, and the significant wave height prediction value is output.
[0112] The significant wave height prediction method provided in this invention is based on two-layer decomposition and BiLSTM-Attention. It utilizes the Spearman correlation coefficient to select wave and meteorological characteristic parameters with strong correlation to significant wave height as input sequences; two-layer decomposition reduces the nonlinearity of the significant wave height sequence and lowers data complexity; BiLSTM captures the long-term dependence of significant wave height, and the attention mechanism assigns weights to the time-series state information output by the BiLSTM layer; a fully connected layer predicts the data, and the predicted subsequences are accumulated to obtain the prediction result.
[0113] This invention provides a method for predicting significant wave height, comprising: acquiring historical feature data for wave height prediction; preprocessing the historical feature data to obtain a significant wave height dataset; wherein the significant wave height dataset includes: significant wave height, wind direction, average wind speed, instantaneous wind speed, dominant wave period, average wave period, average wave direction, sea level pressure, air temperature, sea surface temperature, and dew point temperature; calculating the correlation between any two data in the significant wave height dataset; determining the data in the significant wave height dataset whose correlation with significant wave height meets preset conditions as model input data; and determining the significant wave height after primary and secondary decomposition as input data; wherein the primary decomposition includes: empirical mode decomposition based on adaptive noise complete set and mode... The model employs K-means clustering of components; secondary decomposition includes variational mode decomposition; the number of decompositions and penalty factors for variational mode decomposition are optimized based on the Crowned Porcupine optimization algorithm; the model input data is fed into a bidirectional long short-term memory network based on an attention mechanism until a preset condition is met to obtain the significant wave height prediction model; the target feature data is input into the significant wave height prediction model, and the significant wave height prediction value is output; firstly, data with high correlation to significant wave height are selected as input data to reduce computational load; then, significant wave height is decomposed into two layers to weaken the nonlinearity of significant wave height and reduce data complexity; finally, the data features are fully extracted through a bidirectional long short-term memory network based on an attention mechanism to comprehensively predict the data, thereby improving the accuracy of significant wave height prediction.
[0114] Example 2
[0115] Based on the above embodiments, this invention provides an effective wave height prediction device, see [link to relevant documentation]. Figure 8 The diagram shown is a structural schematic of an effective wave height prediction device provided in an embodiment of the present invention. The device includes:
[0116] The data processing module 310 is used to acquire historical feature data for wave height prediction, preprocess the historical feature data to obtain a significant wave height dataset; wherein, the significant wave height dataset includes: significant wave height, wind direction, average wind speed, instantaneous wind speed, dominant wave period, average wave period, average wave direction, sea level pressure, air temperature, sea surface temperature and dew point temperature.
[0117] The first input data determination module 320 is used to determine the data in the effective wave height dataset that have a correlation with the effective wave height that meets the preset conditions as model input data.
[0118] The second input data determination module 330 is used to determine the effective wave height after primary and secondary decomposition as input data; wherein, primary decomposition includes: empirical mode decomposition based on adaptive noise complete set and K-means clustering of mode components; secondary decomposition includes: variational mode decomposition; the number of decompositions and the penalty factor of variational mode decomposition are optimized based on the Crowned Porcupine optimization algorithm.
[0119] The prediction model processing module 340 is used to input the model input data into a bidirectional long short-term memory network based on an attention mechanism until the preset conditions are met, thereby obtaining an effective wave height prediction model.
[0120] The data prediction module 350 is used to input target feature data into the significant wave height prediction model and output the significant wave height prediction value.
[0121] Furthermore, in some preferred embodiments of the present invention, the data processing module 310 is used to preprocess the data by removing abnormal data, imputing missing data, and normalizing the data.
[0122] Furthermore, in some preferred embodiments of the present invention, the first input data determination module 320 is used to determine the correlation based on the following formula: Where ρ represents the correlation; R(x) i ) is the variable x i The order of things; R(y) is the average rank of all x values. i ) is the variable y i The order of things; The average rank of all y values; n is the number of data pairs; x i Let y be the i-th sample data in variable x; x is a variable data in correlation calculation; y i Let be the i-th sample data in the variable y; y is another variable data in the correlation calculation.
[0123] Furthermore, in some preferred embodiments of the present invention, the second input data determination module 330 is used to add Gaussian white noise to all original sequences to be decomposed with significant wave height to obtain data to be decomposed; perform empirical mode decomposition on the data to be decomposed and then perform ensemble averaging to obtain first mode components and residual terms; after each empirical mode decomposition, Gaussian white noise is added to all sequences to be decomposed, and then empirical mode decomposition and ensemble averaging are performed again until a preset condition is met to obtain multiple first mode components.
[0124] Furthermore, in some preferred embodiments of the present invention, the second input data determination module 330 is used to calculate the fuzzy entropy of multiple first modal components; perform K-means clustering on the multiple fuzzy entropies to obtain high-frequency component, mid-frequency component and low-frequency component; and aggregate the high-frequency component, mid-frequency component and low-frequency component respectively.
[0125] Furthermore, in some preferred embodiments of the present invention, the second input data determination module 330 is used to perform variational mode decomposition on the aggregated high-frequency components to obtain multiple second mode components.
[0126] Furthermore, in some preferred embodiments of the present invention, the second input data determination module 330 is used to determine the number of decompositions and the penalty factor of the variational mode decomposition through the following steps: initializing the search range of the number of decompositions of the variational mode decomposition, the search range of the penalty factor, the population size of the hog optimization algorithm, and the maximum number of iterations of the hog optimization algorithm, and defining a convergence threshold; iteratively optimizing the number of decompositions and the penalty factor based on the hog optimization algorithm until the maximum number of iterations is reached, to obtain the final number of decompositions and the final penalty factor.
[0127] Furthermore, in some preferred embodiments of the present invention, in the bidirectional long short-term memory network based on the attention mechanism, the attention mechanism layer is disposed between the bidirectional long short-term memory network and the fully connected layer.
[0128] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the effective wave height prediction device described above can be referred to the corresponding process in the embodiments of the aforementioned effective wave height prediction method, and will not be repeated here.
[0129] Example 3
[0130] This invention also provides an electronic device for running a significant wave height prediction method; see [link to related documentation]. Figure 9 The schematic diagram of an electronic device provided by the embodiment of the present invention shown includes a memory 400 and a processor 401. The memory 400 is used to store one or more computer instructions, which are executed by the processor 401 to implement the above-mentioned effective wave height prediction method.
[0131] Furthermore, Figure 9 The electronic device shown also includes a bus 402 and a communication interface 403. The processor 401, the communication interface 403 and the memory 400 are connected via the bus 402.
[0132] The memory 400 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 403 (which can be wired or wireless), such as the Internet, wide area network, local area network, or metropolitan area network. The bus 402 may be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 9 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0133] Processor 401 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 401 or by instructions in software form. Processor 401 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a readily available storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 400, and processor 401 reads information from memory 400 and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiments.
[0134] This invention also provides a computer-readable storage medium storing computer-executable instructions. When these computer-executable instructions are called and executed by a processor, they cause the processor to implement the above-described effective wave height prediction method. For specific implementation details, please refer to the method embodiments, which will not be repeated here.
[0135] The effective wave height prediction method, apparatus, and electronic device computer program products provided in the embodiments of the present invention include a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods in the preceding method embodiments. For specific implementation, please refer to the method embodiments, which will not be repeated here.
[0136] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and / or device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0137] Furthermore, in the description of the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention based on the specific circumstances.
[0138] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0139] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. An effective wave height prediction method, characterized in that, include: Historical feature data for wave height prediction is obtained, and the historical feature data is preprocessed to obtain an effective wave height dataset; The data in the effective wave height dataset that satisfy a preset condition for correlation with the effective wave height are determined as the model input data; The effective wave heights after primary and secondary decompositions are determined as the input data; wherein, the primary decomposition includes: empirical mode decomposition based on adaptive noise complete set and K-means clustering of mode components; the secondary decomposition includes: variational mode decomposition; the number of decompositions and the penalty factor of the variational mode decomposition are optimized based on the Crowned Porcupine optimization algorithm; The model input data is fed into a bidirectional long short-term memory network based on an attention mechanism until a preset condition is met, thus obtaining an effective wave height prediction model. The target feature data is input into the effective wave height prediction model, and the effective wave height prediction value is output.
2. The effective wave height prediction method according to claim 1, characterized in that, The preprocessing includes: outlier removal, missing data imputation, and normalization.
3. The effective wave height prediction method according to claim 1, characterized in that, The correlation is determined based on the following formula: ; Where ρ represents the correlation; R(x) i ) is the variable x i The order of things; R(y) is the average rank of all x values. i ) is the variable y i The order of things; The average rank of all y values; n is the number of data pairs; x i Let y be the i-th sample data in variable x; x is a variable data in correlation calculation; y i Let be the i-th sample data in the variable y; y is another variable data in the correlation calculation.
4. The effective wave height prediction method according to claim 1, characterized in that, The adaptive noise complete set empirical mode decomposition is a set of steps, including: Gaussian white noise is added to all sequences to be decomposed based on the effective wave height to obtain the data to be decomposed; After performing empirical mode decomposition on the data to be decomposed, ensemble averaging is performed to obtain the first mode component and residual term; Gaussian white noise is added to all the original sequences to be decomposed after each empirical mode decomposition, and then empirical mode decomposition and ensemble averaging are performed again until the preset conditions are met to obtain multiple first mode components.
5. The effective wave height prediction method according to claim 4, characterized in that, The K-means clustering step of the modal components includes: Calculate the fuzzy entropy of multiple first mode components; K-means clustering is performed on the multiple fuzzy entropies to obtain high-frequency components, mid-frequency components and low-frequency components; The high-frequency component, the mid-frequency component, and the low-frequency component are aggregated respectively.
6. The effective wave height prediction method according to claim 5, characterized in that, The secondary decomposition step includes: Variational mode decomposition is performed on the high-frequency components after aggregation to obtain multiple second mode components.
7. The effective wave height prediction method according to claim 6, characterized in that, The method further includes: determining the number of decompositions and the penalty factor of the variational mode decomposition through the following steps: Initialize the search range for the number of decompositions in the variational mode decomposition, the search range for the penalty factor, the population size of the hog optimization algorithm, and the maximum number of iterations of the hog optimization algorithm, and define the convergence threshold; The number of decompositions and the penalty factor are iteratively optimized based on the Crowned Porcupine optimization algorithm until the maximum number of iterations is reached, thus obtaining the final number of decompositions and the final penalty factor.
8. The effective wave height prediction method according to claim 1, characterized in that, In a bidirectional long short-term memory network based on an attention mechanism, the attention mechanism layer is positioned between the bidirectional long short-term memory network and the fully connected layer.
9. An effective wave height prediction device, characterized in that, include: The data processing module is used to acquire historical feature data for wave height prediction, preprocess the historical feature data, and obtain an effective wave height dataset. The first input data determination module is used to determine the data in the effective wave height dataset whose correlation with the effective wave height meets a preset condition as model input data. The second input data determination module is used to determine the effective wave height after primary and secondary decomposition as the input data; wherein, the primary decomposition includes: empirical mode decomposition based on adaptive noise complete set and K-means clustering of mode components; the secondary decomposition includes: variational mode decomposition; the number of decompositions and the penalty factor of the variational mode decomposition are optimized based on the Crowned Porcupine optimization algorithm; The prediction model processing module is used to input the model input data into a bidirectional long short-term memory network based on an attention mechanism until a preset condition is met to obtain an effective wave height prediction model. The data prediction module is used to input target feature data into the effective wave height prediction model and output the effective wave height prediction value.
10. An electronic device, characterized in that, The method includes a processor and a memory, the memory storing computer-executable instructions that can be executed by the processor, the processor executing the computer-executable instructions to implement the effective wave height prediction method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Method for predicting significant wave height of sea waves based on multi-sine function decomposition neural network
CN111811465A
Improved variational mode decomposition and BiGRU fused water quality prediction method
CN116451553A