Tide level prediction method, system, equipment and program product
By combining a hybrid neural network model of Transformer network and BiGRU with Bayesian optimization algorithm, the problems of insufficient accuracy and limited generalization ability in tidal prediction are solved, and high-precision tidal level prediction is achieved in complex marine environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CCCC FOURTH HARBOR ENG CO LTD
- Filing Date
- 2025-12-26
- Publication Date
- 2026-04-14
Smart Images

Figure CN121859280A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of tide level prediction technology, and in particular to a tide level prediction method, system, device and program product. Background Technology
[0002] Tide level forecasting plays a crucial role in flood control, shipping scheduling, marine engineering, and ecological environment management in coastal areas.
[0003] Accurate nearshore tide forecasting is a crucial foundation for shipping scheduling, operations, and safety mitigation. It serves short-term operations such as channel navigation, vessel scheduling, and disaster preparedness, and also provides important boundary conditions for engineering planning. Traditional astronomical tide forecasting mainly depicts the periodic rise and fall dominated by tidal forces. However, in marine areas where "air-sea-land" forcing is significant, such as wind, air pressure, estuary runoff, and boundary currents, simple concordance analysis often fails to meet the requirements for operational accuracy and timeliness.
[0004] Traditional tidal forecasting mainly relies on harmonic analysis. (Tchilibou M, Carrere L, Lyard F, et al. 2025. Internal tides outside the Amazon shelf in the western tropical Atlantic: SWOT calibration / validation data analysis [J]. Marine Science, 21(1):325–342) The least squares method is used to estimate the amplitude and phase of the main tidal constituents such as O1, K1, M2, and S2 to reconstruct astronomical tides, emphasizing the physical interpretability and ease of implementation of the method; (Zhang H, Cui N, Yang K, et al. 2025. Comparative evaluation of harmonic analysis and neural networks in sea level prediction in the northern South China Sea [J]. Sustainability, 17(13):6081.) A hybrid framework of harmonic residual analysis (HRA) and singular spectrum analysis (SSA) is used to carry out online short-term forecasting, and residual decomposition is used to absorb some non-astronomical components; (Huang S, Nie H, Jiao J et al. Tide prediction model based on VMD-LSTM neural network [J]. Water, 2024, 16(17): 2452. ) Stepwise regression and quadratic analysis are used to improve the screening and combination of tidal constituents to enhance robustness; this type of method can only characterize the tidal force of celestial bodies, and lacks explicit characterization of forcing such as wind pressure, wind waves, runoff backing and nearshore shallow water nonlinearity, resulting in peak-valley systematic deviation and phase drift, which is difficult to stably meet the operational threshold in the complex topography of estuary / nearshore and micro-tidal range environment.
[0005] Physics-based hydrodynamic models offer a pathway to improve the spatial continuity and forced consistency of forecasts. (Wu C, Wan J, Wang Y, et al. Evaluation of the impact of shore sewage discharge on water quality fluctuations in the tidal river section of Dongguan based on the MIKE21 model [J]. Physics and Chemistry of the Earth, 2024, 136: 103730.) MIKE21 was used to simulate the tidal process along the Zhejiang coast at the regional scale. (Hu X, Fang G, Ge Y. Simplified model of wind-wave relationship in shallow waters near the coast of China based on SWAN+ADCIRC simulation [J]. Ocean Engineering, 2024, 305: 117983.) ADCIRC and SWAN coupled framework were used to jointly characterize storm surge and significant wave height. (Yang H, Wu Q, Li G. Multi-stage daily-scale ocean tidal energy prediction system based on secondary decomposition, optimized gated cyclic unit and error correction [J]. Journal of Cleaner Production, 2024, 449: 141303.) A multi-stage tidal energy prediction system was used to advance the decomposition of physical processes. Although these models possess good physical interpretability and spatial extrapolation capabilities, their accuracy at the station scale is still constrained by nearshore grid resolution, topographic roughness, and boundary / initial value quality. Real-time responses to high-frequency wind pressure and wave-induced flooding rely on high-quality external forcing and assimilation systems. Furthermore, computational and operational costs are high, and available forward views are often limited. Some studies have begun to use statistical and classical time series methods for prediction. (Wang N. A sequential coastal current prediction method based on hierarchical decomposition [J]. Frontiers in Marine Science, 2025, 12: 1668-178) uses ARIMA to predict tides in the Bay of Fundy and employs the Akaike information criterion for order selection to maximize the capture of linear structures; further, Gaussian process regression is used to quantify uncertainty and improve the probabilistic consistency of short-term fitting. These methods have clear structures and strong interpretability, but their adaptability to nonstationarity and multi-source nonlinear drives is limited.
[0006] Shallow machine learning provides early evidence for nonparametric mapping. (Cai Yue, Xu Jun, Li Jiang. Application of GRU combined tidal forecasting model in summer storm surge of typical ports in Shandong [J / OL]. Bulletin of Oceanography and Limnology, 2025: 1–10 [2025–10–16].) Summer tide levels in Shandong port waters are predicted using EMD-BiGRU and harmonic analysis. (Erkoç MH, Do an U. Machine learning model based on altimeter tide gauge station and grid altimeter data for long-term trend comparison estimation: a case study of Shikoku Island, Japan [J]. Applied Ocean Research, 2024, 150: 104-132. ) A daily mean tide level model was established using support vector machine (SVM) to enhance generalization under small sample conditions. (Umgiesser G, Canu DM, Cucco A, et al. Finite element model of Venice Lagoon [J]. Development, set up, 2004.) A NARX neural network was used to carry out tide level / storm surge forecasts at multiple stations in Venice Lagoon to verify the gain introduced by exogenous factors. Furthermore, (Zhai M, Cao Q, Huo P, et al. A method for predicting estuarine-tidal residual water level based on variational mode decomposition and backpropagation neural network [J]. Journal of Marine Science and Engineering, 2025, 13(9): 1755.) used a combination of MLP / BPNN and heuristic / intelligent optimization to optimize the network structure and weights, showing usable accuracy on the hourly-daily scale. However, most shallow models are insufficient in representing long-term dependence and cross-variable interactions, and the error drift becomes significant after the look-forward is extended, with performance fluctuations intensifying under extreme processes.
[0007] (Chen Z, Zong Y, Wu Z, et al. Prediction of tidal river flow based on LSTM sequence-to-sequence model [J]. Acta Oceanologica Sinica, 2024, 43(7): 40–51.) The ability to characterize long-term dependence was verified by LSTM at multiple stations. (Hou J, Akbar MK, Samad MD, et al. Spatiotemporal deep learning model for storm surge level and storm path prediction: a case study of Hurricane Harvey [J]. Journal of Marine Science and Engineering, 2025, 13(9): 1780.) A storm surge model was established at Chiwan Station in Shenzhen using multivariate LSTM to improve the response to tropical storm anomalies. (Gao S, Feng X, Xu H, et al. Hybrid deep learning model based on EMD algorithm for non-stationary water level prediction in estuary system [J]. Estuarine, Coastal and Shelf Science, 2025, 314: 109-128. ) An improved tidal level forecast at Nanjing Station was achieved using a coupled framework of LSTM and non-stationary harmonic analysis (Li Z, Li X, Wang Z, et al. Hydrodynamically Adaptive Dual-Model LSTM-Transformer Network Framework for Total Nitrogen / Total Phosphorus Prediction in Tidal Rivers [J]. Journal of Hydrology, 2025: 134-231.). Bidirectional Attention LSTM (BALSSA) was further used to enhance temporal dependency capture and key driver saliency expression. Meanwhile, architectures such as CNN, GRU, BiGRU, and Transformer networks were used for collaborative modeling of local morphological features and global dependencies, demonstrating end-to-end fusion potential under multi-source forcing. However, model performance is highly sensitive to hyperparameters, and cross-site / cross-scenario robustness and interpretability of extreme processes still require systematic evaluation.
[0008] The hybrid mode of time-frequency decomposition-reconstruction is geared towards non-stationarity and noise suppression. (Pavithra R, Ramachandran P. Non-stationary signal analysis based on VMD and EMD algorithms for industrial multi-fault classification [J]. Journal of Intelligent & Fuzzy Systems, 2025, 49(1): 291–309.) VMD+1D-CNN is used to process non-stationary wave sequences. (Zhang S, Zhao Z, Wu J, et al. A novel VMD-LSTM model to solve the time lag problem in local significant wave height prediction [J]. Ocean Engineering, 2024, 313: 119385.) VMD+LSTM is used for tide level prediction and the contribution of decomposition-reconstruction to sequence stabilization is verified. (Wang J, Bethel BJ, Xie W, et al. Hybrid significant wave height prediction model based on improved empirical wavelet transform decomposition and long short-term memory network [J]. Ocean Modelling, 2024, 189: 102367.) Improved empirical wavelet transform (IEWT) + LSTM is used to predict significant wave height. This approach is effective in mitigating nonstationarity, but a single decomposition or a single deep architecture still cannot simultaneously address global dependencies, local mutations, and cross-variable interactions.
[0009] To address the operational needs of combining multi-source driving forces with varying time-to-date forecasts, the idea of separating astronomical and non-astronomical components has been further promoted. Overall, the three-element coupling of decomposition, residual, and deep learning is an important direction for improving the robustness and generalization of short-term tidal level forecasts. For example, Chinese patent application CN120781703A provides a method that: using a harmonic analysis model, the original tidal level data is processed to determine the astronomical tidal prediction value and non-astronomical tidal data; the non-astronomical tidal data is decomposed and denoised to determine various modal components of the non-astronomical tidal data, and based on a gated cyclic model and modal components, the non-astronomical tidal prediction value is determined; the non-astronomical tidal prediction value and the astronomical tidal prediction value are superimposed to determine the target tidal level prediction value.
[0010] Since tidal changes are affected by multiple factors such as astronomical tides and meteorological disturbances, traditional harmonic methods are difficult to meet the peak-valley accuracy and phase consistency requirements in non-astronomical forcing-dominated scenarios. Hydrodynamic models are limited by grid and forcing quality as well as computational and maintenance costs. Shallow machine learning is effective in short windows but is difficult to extend to medium and long looks. Although deep learning has end-to-end advantages, it is sensitive to hyperparameters, lacks cross-scenario robustness, and is insufficient in interpretability for extreme events. Time-frequency decomposition-reconstruction can alleviate non-stationarity and noise, but it still needs to be coupled with strong representation models and systematic optimization strategies.
[0011] In summary, existing tidal prediction methods suffer from insufficient accuracy and limited generalization ability. Summary of the Invention
[0012] The purpose of this invention is to overcome the problems of insufficient accuracy and limited generalization ability in existing tidal prediction methods, and to provide a tidal prediction method, system, device and program product.
[0013] In a first aspect, the present invention provides a method for predicting tide levels, comprising the following steps: S1. Collect hydrological data and construct a tidal data set; S2. Perform modal decomposition on the tide level data; S3. Construct a tide level prediction model; wherein, the tide level prediction model includes: a Transformer network and a bidirectional gated recurrent unit; S4. Optimize the hyperparameter combination of the tide level prediction model using the tide level dataset and Bayesian optimization. S5. Use the optimized tide prediction model to predict the tide level.
[0014] According to a preferred embodiment, the tide data set includes several tide time series of the target location.
[0015] According to a preferred embodiment, variational mode decomposition is used to decompose the tide time series into several intrinsic mode data.
[0016] According to a preferred embodiment, the Transformer network: The collected tidal level and intrinsic modal data are respectively time-encoded and location-encoded to form the model input; By utilizing a multi-head attention mechanism module, we can mine the temporal dependence features of deformable sequences and their correlation with intrinsic modes; The features of the multi-head attention output are nonlinearly mapped time-by-time using a feedforward network module.
[0017] According to a preferred embodiment, the bidirectional gated loop unit includes: The input layer receives the tidal time series features processed by the Transformer network and performs dimension mapping, time step rearrangement, missing test masking and normalization on them. The forward propagation layer sequentially feeds the input sequence into the gate control loop unit in chronological order. Through the alternating control of the update gate and the reset gate, it automatically learns the short-term dependencies and local dynamic characteristics of tidal level changes. The backpropagation layer inputs the input sequence into the gated loop unit in reverse chronological order to extract the contextual information of tidal changes in the reverse time dimension. The output layer concatenates or merges the hidden state vectors of the forward and backward propagation layers at corresponding time steps, and generates the next time step or multi-step prediction value of the target tide level through a fully connected regression network.
[0018] According to a preferred embodiment, S4 includes: constructing a probabilistic proxy model of the objective function of the tide level prediction verification error, and collecting the hyperparameter combination of the Transformer network and the bidirectional gated recurrent unit through a collection function.
[0019] According to a preferred embodiment, in S4, after obtaining the hyperparameter combination, the hyperparameter combination is optimized using the tide level dataset using Bayesian optimization until the relative improvement of the verification error does not exceed a set threshold. The optimized hyperparameter combination is then input into the tide level prediction model.
[0020] The present invention also provides a tide level prediction system, comprising: an input unit, a processing unit, and an output unit. The input unit is used to input hydrological data of the prediction location. The processing unit obtains tide level prediction results according to the tide level prediction method provided by the present invention. The output unit is used to output the tide level prediction results.
[0021] The present invention also provides an electronic device. The electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the tide prediction method provided by the present invention.
[0022] The present invention also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the tide prediction method provided by the present invention.
[0023] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention utilizes a hybrid neural network model constructed from Transformer networks and BiGRU (Bidirectional Gated Recurrent Unit), and combines this with a Bayesian optimization algorithm to optimize the hybrid model, thereby improving the accuracy and stability of tide level forecasts. The Transformer network, based on multi-head self-attention, models global dependencies across time periods and variables within a longer time window. It can automatically select the most relevant information from multiple meteorological sources, making it suitable for modeling non-stationary tide level sequences with noise interference; its attention weights also provide a degree of interpretability to the model. BiGRU, through bidirectional gated recursion, characterizes local temporal dynamics and phase lag, maintaining stable gradient propagation and fine-grained pattern capture under controllable parameter parameters. The two cascaded elements complement each other: the Transformer network is responsible for extracting global context and cross-channel interactions, while BiGRU enhances nearest-neighbor evolution and short-term memory, thus balancing accuracy, robustness, and generalization ability in tide level prediction. Attached Figure Description
[0024] Figure 1 To reconcile and analyze the theoretical tide level of a certain location.
[0025] Figure 2 This is to determine the error between the theoretical and measured values of the tide level in a certain location, based on harmonic analysis.
[0026] Figure 3 This is a schematic diagram of a preferred embodiment of the tide level prediction method of the present invention.
[0027] Figure 4 This is a schematic diagram of tide level signal decomposition according to a preferred embodiment of the present invention.
[0028] Figure 5 This is a schematic diagram of a Transformer network according to a preferred embodiment of the present invention.
[0029] Figure 6 This is a schematic diagram of a bidirectional gated loop unit according to a preferred embodiment of the present invention.
[0030] Figure 7 This is a schematic diagram comparing the predicted and measured values of the tide level prediction method of the present invention at different hours.
[0031] Figure 8 A graph showing the prediction errors of each prediction model.
[0032] Figure 9 This diagram illustrates the comparison of prediction errors for each prediction model. Detailed Implementation
[0033] Tides are caused by astronomical factors such as astronomical tides, meteorological tides, and shallow-sea tides. In harmonic analysis, the amplitudes of most tides are very small and can be ignored. Increasing the number of tides increases truncation error, leading to a decrease in analytical accuracy. In harmonic analysis of tides at a specific location, the seven basic tides O1, K1, M2, S2, M4, MS4, and S4 are typically selected.
[0034] The theoretical tidal level of a certain location is calculated through harmonic analysis, such as... Figure 1 As shown, the blue line represents the measured tide level at that location, and the orange line represents the theoretical value of the harmonic analysis of the tide level. Although harmonic analysis can predict the tide level at that location, the difference between the measured value and the actual value is too large at the peak and trough points, such as... Figure 2 As shown, some predicted values differ from the measured values by 1.2m.
[0035] To address the issues of insufficient accuracy and limited generalization ability in existing tidal prediction methods, this invention provides a tidal prediction method, system, device, and program product.
[0036] The present invention will now be described in further detail with reference to specific embodiments. However, this should not be construed as limiting the scope of the present invention to the following embodiments; all technologies implemented based on the content of the present invention fall within the scope of the present invention.
[0037] Unless otherwise specified, the use of terms such as "upper," "lower," "left," "right," "center," "inner," and "outer" to indicate orientation or positional relationships in the description of specific embodiments of the present invention is based on the orientation or positional relationships shown in the accompanying drawings, or the orientation or positional relationship in which the product / equipment / device is typically placed during use. These terms are merely for the purpose of facilitating the description of the present invention or simplifying the description in specific embodiments, enabling those skilled in the art to quickly understand the solution, and do not indicate or imply that a particular device / component / element must have a specific orientation, or be constructed and operated in a specific positional relationship. Therefore, they should not be construed as limitations on the present invention.
[0038] Furthermore, the use of terms such as "horizontal," "vertical," "suspended," and "parallel" does not imply that the corresponding device / component / element must be absolutely horizontal, vertical, suspended, or parallel, but rather that it can be slightly tilted or have a deviation. For example, "horizontal" merely means that its direction is more horizontal relative to "vertical," not that the structure must be completely horizontal, but that it can be slightly tilted. Alternatively, it can be simplified to mean that the corresponding device / component / element, when set in a "horizontal," "vertical," "suspended," or "parallel" direction, can have an error / deviation of ±10% relative to the corresponding direction, more preferably within ±8%, more preferably within ±6%, more preferably within ±5%, and more preferably within ±4%. As long as the corresponding device / component / element is within the error / deviation range, it can still achieve its function in the present invention.
[0039] Furthermore, the use of terms such as "first," "second," and "third" in terminology is merely for distinguishing descriptions of identical or similar components and should not be interpreted as emphasizing or implying the relative importance of a particular component.
[0040] Furthermore, in the description of the embodiments of the present invention, "several", "more than", and "a number of" represent at least two. The number can be any number, such as 2, 3, 4, 5, 6, 7, 8, or 9, and can even exceed nine.
[0041] Furthermore, in the description of the technical solution of this invention, unless otherwise explicitly specified / limited / restricted, the terms "set up," "install," "connect," "link," "provided with," "laid out," and "arranged" should be interpreted broadly. For example, they can refer to fixed connections, detachable connections, or integral connections; they can refer to common connection methods in the art, such as welding, riveting, bolting, and threaded connections. Such connections can be mechanical, electrical, or communication connections; they can be direct connections or indirect connections through an intermediate medium; and they can refer to the internal communication between two components.
[0042] Example 1 This embodiment provides a method for predicting tide levels. See also: Figure 3 The tide level prediction method provided in this embodiment includes the following steps: S1. Collect hydrological data and construct a tidal data set; S2. Perform modal decomposition on the tide level data; S3. Construct a tide level prediction model; the tide level prediction model includes: a Transformer network and a bidirectional gated recurrent unit; S4. Optimize the hyperparameter combination of the tide level prediction model using the tide level dataset and Bayesian optimization. S5. Use the optimized tide prediction model to predict the tide level.
[0043] This embodiment utilizes a hybrid neural network model constructed using Transformer and BiGRU, and further optimizes the hybrid model using a Bayesian optimization algorithm, thereby improving the accuracy and stability of tide level forecasts. The Transformer network, based on multi-head self-attention, models global dependencies across time periods and variables within a longer time window. It can automatically select the most relevant information from multiple meteorological sources, making it suitable for modeling non-stationary tide level sequences with noise interference; its attention weights also provide a degree of interpretability to the model. BiGRU, through bidirectional gated recursion, characterizes local temporal dynamics and phase lag, maintaining stable gradient propagation and fine-grained pattern capture under controllable parameter parameters. The two cascaded elements complement each other: the Transformer network is responsible for extracting global context and cross-channel interactions, while BiGRU enhances nearest-neighbor evolution and short-term memory, thus balancing accuracy, robustness, and generalization ability in tide level prediction.
[0044] Example 2 This embodiment is a further explanation and improvement of embodiment 1, and repeated content will not be repeated.
[0045] Preferably, the method for collecting hydrological data in S1 can be: using JYB-SW or other online hydrological monitoring systems to monitor the water level of the target waterway in real time. The main measurement principle is to transmit radar pulses from the radar water level sensing antenna, receive the pulses reflected back from the water surface, and record the time T. Since the propagation speed C of electromagnetic waves is a constant, the distance D to the water surface can be obtained.
[0046] Preferably, the tide level dataset includes one year of hydrological observation data for the target location. Preferably, 70% of the samples in the tide level dataset are used as the training dataset to learn the parameters of the Transformer network; 30% of the data is used as the test dataset to evaluate the predictive performance of the Transformer network at future times.
[0047] See Figure 3 and Figure 4In S2, mode decomposition uses variational mode decomposition to decompose the tide level time series into several intrinsic mode data. In tide level prediction, the complexity of the time series often stems from the nonlinear characteristics of tides and the variable marine environmental factors, making it difficult for traditional linear methods to accurately capture the dynamic changes in tide level. To address this issue, this embodiment employs Variational Mode Decomposition (VMD) to decompose complex tidal time series into several Intrinsic Modes (IMFs). Different IMFs have different frequency components. High-frequency IMFs primarily contain rapid fluctuations caused by wind and wave disturbances, station noise, and local transient hydrodynamics, with characteristic frequencies typically ranging from several minutes to tens of minutes. Mid-frequency IMFs often exhibit variations caused by shallow-sea effects, nonlinear tidal wave interactions, and local water oscillations, with frequencies usually on an hourly scale. Low-frequency IMFs correspond to the periodic variations of major astronomical tides (such as semi-diurnal and diurnal tides), with characteristic frequencies on a 12- to 24-hour scale. Even lower-frequency IMFs reflect slow trends such as storm surges and seasonal water level rises, typically on a days or even longer scale. These IMFs of different frequencies collectively constitute the multi-timescale structure of the tidal series, enabling the Transformer network to specifically capture high-frequency disturbances, periodic tidal components, and low-frequency slow trends in tidal levels, thereby significantly improving the accuracy and stability of predictions.
[0048] See Figure 4 Variational mode decomposition of the Dongguan tide level yielded IMF1~IMF9, which are represented as periodic modal components from high frequency to low frequency.
[0049] See Figure 3 and Figure 5 This paper utilizes the Transformer network to process several intrinsic modalities obtained from decomposition. The Transformer network was initially developed for natural language processing and quickly achieved great success in computer vision and time series prediction. As a neural network model based on a self-attention mechanism, the Transformer network can globally model each element in a sequence and establish connections between elements. Compared with recurrent neural network models, this model has better parallel performance and shorter training time.
[0050] Transformer network entities such as Figure 5 As shown, it mainly includes a multi-layer encoder and decoder, with each layer consisting of a multi-head attention mechanism module and a feedforward network module.
[0051] The connectivity and normalization module consists of residual connections and layer normalization, which are used to preserve sublayer input information and stabilize feature distribution, respectively. Residual connections enable the network to avoid degradation of original temporal features while performing attention modeling and nonlinear mapping; layer normalization effectively mitigates the differences in amplitude and energy scales of different IMF components, improving the numerical stability and convergence speed of the model training process.
[0052] The feedforward network module performs time-by-time nonlinear mapping on the features of the multi-head attention output. Its main function is to enhance the model's nonlinear expressive power and to reorganize and reweight different IMF components along the feature dimension, thereby further exploring the nonlinear coupling relationships between the multiple frequency components of tidal level. This module improves the model's ability to fit complex tidal level change patterns without introducing additional time dependencies.
[0053] The encoder encodes the input sequence into a high-dimensional feature vector, while the decoder decodes that vector into the target sequence. In Transformer networks, residual connections and normalization are commonly used to accelerate model convergence and improve model performance.
[0054] This embodiment uses multiple IMF components obtained from VMD decomposition of the original tide level sequence as input data for a Transformer network. Specifically, the multiple IMF components obtained from VMD decomposition of the original tide level sequence are time-encoded and location-encoded respectively, and then input into the encoder in parallel using a multi-channel approach. The encoder can jointly model different frequency components at the same time. This structure differs from the traditional Transformer network's approach of only processing univariate sequences, enabling the model to explicitly capture the multi-frequency components and multi-timescale coupling relationships of the tide level.
[0055] This embodiment introduces output embedding and output bias mechanisms at the decoding and output layers of the Transformer network. Specifically, the target tide sequence used for decoding undergoes isomorphic dimensional mapping, temporal encoding, and positional encoding, forming an output embedding vector containing temporal positional information. This ensures alignment and interaction between the vector and the intrinsic mode features (IMF) of the encoder input in the feature space. Simultaneously, an adaptively learnable output bias term is introduced in the final regression prediction stage. This structure differs from traditional models that directly fit absolute values. By explicitly representing the static reference surface (such as mean sea level) or systematic translational components of the tide sequence using the output bias, the model can decouple "dynamic fluctuation feature learning" from "static reference correction," thereby significantly improving the convergence speed and prediction accuracy when dealing with tide data with non-zero means and systematic errors.
[0056] Meanwhile, the attention structure of the Transformer network was improved for the tide prediction task, constructing a cross-modal attention mechanism based on multimodal input. Specifically, the hidden state of the decoder at the current time step is linearly mapped to serve as Query(Q), while the high-dimensional representations extracted by the encoder from each VMD-IMF component are used as Key(K) and Value(V), respectively. This is achieved by calculating... V obtains the fusion result of cross-frequency features. This mechanism can automatically allocate attention weights based on the high-frequency, mid-frequency, and low-frequency information contained in different IMFs when predicting the tide level at the next moment, and realize the joint modeling of multi-timescale dependencies in the tide level sequence. This allows the model to simultaneously pay attention to the dynamic features from different sources such as astronomical tide cycle changes, shallow water effects, and wind and wave disturbances, thereby significantly improving the accuracy and stability of tide level prediction.
[0057] The tidal sequence exhibits complex characteristics, characterized by strong periodicity, non-stationarity, and local abrupt changes, due to the coupled effects of multiple factors including astronomical tides, the Dongjiang River runoff, monsoons, and typhoon storm surges. Traditional recurrent neural networks, limited by their sequence recursive structure, suffer from information decay when capturing long-period tides (such as semi-lunar and lunar tides) and multi-scale interaction effects. In contrast, the Transformer network, through its self-attention mechanism, can directly model the dependency between any two time steps, making it suitable for handling the frequent occurrence of multi-peak tides, phase shifts, and extreme high tide events in Dongguan's tidal range. (See also...) Figure 5 First, the collected tide level sequences and environmental parameters such as wind speed, air pressure, and tidal currents are encoded both temporally and spatially. This allows the model to simultaneously identify the temporal sequence and periodicity of different variables, forming a unified vector representation that can be processed by the Transformer network. Subsequently, these multi-source input data are fed into an improved multi-head attention mechanism, which extracts the intervariate dependencies between tide level changes and environmental factors by computing multiple attention subspaces in parallel.
[0058] Specifically, by calculating the scaled dot product of the Query and Key and then normalizing it using Softmax, an attention weight matrix is obtained. This matrix reflects the relative contribution of different times and environmental variables to tidal changes. Subsequently, the Value matrix is weighted and summed using these attention weights to obtain a high-dimensional temporal feature representation that integrates multiple environmental driving factors. This feature simultaneously characterizes the comprehensive response of tidal levels to astronomical tides, wind pressure effects, and tidal current changes in both the time and feature dimensions, providing a sufficiently informative and structurally clear input for subsequent tidal level prediction by the decoder.
[0059] See Figure 3 and Figure 6The high-dimensional temporal feature sequences of the Transformer network are processed using bidirectional gated recurrent units.
[0060] The bidirectional gated recurrent unit processes the high-dimensional temporal feature sequence output by the Transformer network, rather than the predicted value itself. Its role is to further extract the local dynamics and short-term dependencies of tidal changes, so that the final prediction result has both the global feature representation ability of the Transformer network and the short sequence sensitivity of BiGRU.
[0061] The Gated Recurrent Unit (GRU) is an improved recurrent neural network (RNN) that effectively alleviates the gradient vanishing problem faced by traditional RNNs in long sequence training by introducing update gate and reset gate mechanisms.
[0062] See Figure 6 To further enhance the ability of tidal prediction models to represent the overall contextual information of time series, this invention introduces a bidirectional gated recurrent unit (BiGRU) to perform deep time modeling of the feature sequences after the Transformer network extracts features.
[0063] Specifically, Transformer networks have obtained high-dimensional feature sequences that integrate historical tidal data with environmental factors (such as wave height, wind speed, and air pressure), but their internal self-attention mechanism is better at capturing global dependencies, while their ability to extract local temporal smoothness and short-term trends is still insufficient.
[0064] To compensate for this deficiency, BiGRU performs bidirectional time processing on the feature sequences output by the Transformer network: Forward GRU models the cumulative process of tidal level changes in chronological order, highlighting the trend evolution; Backward GRU reverse sequence analysis enables the model to leverage "future context" (i.e., statistical patterns in the latter part of the sequence) to enhance the understanding of short-term fluctuations.
[0065] The hidden states from both directions are concatenated at the current moment to form a tidal feature representation that simultaneously incorporates past, present, and future information. This makes the prediction results more sensitive and stable to periodic tidal fluctuations, short-term abrupt changes, and environmental stimuli. Finally, the fused temporal features output by BiGRU are input into the fully connected layer to generate the tidal level prediction for the next moment.
[0066] The relationship between BiGRU and the Transformer network is a "serial feature enhancement relationship". BiGRU is located after the encoder (or decoder) of the Transformer network. Its input is the temporal feature sequence output by the Transformer network, and its output is the enhanced temporal feature representation after bidirectional temporal modeling, which serves as the input to the final prediction layer (regression layer).
[0067] The Transformer network is responsible for "multi-feature-multi-frequency fusion", while the BiGRU is responsible for "causal and anti-causal compensation in the time direction".
[0068] The bidirectional gated loop unit described in S4 includes: The input layer receives the tidal time-series features processed by the Transformer network, performs dimensional mapping, time step rearrangement, missing data masking, and normalization on them to construct a feature sequence that meets the input requirements of a gated recurrent network. This layer effectively solves the problems of noise, missing data, and scale inconsistencies in tidal monitoring data, ensuring that the input sequence is continuous in the time dimension and stable in the numerical dimension, enabling the subsequent bidirectional recurrent structure to accurately capture the dynamic patterns of tidal evolution.
[0069] The forward propagation layer sequentially feeds the input sequence into the gate control loop unit in chronological order (from past to present). Through the alternating control of update and reset gates, it automatically learns the short-term dependencies and local dynamic characteristics of tidal level changes. This layer can simulate the physical process of the natural evolution of tidal level over time, and has a strong ability to characterize the changing trends of high tide, low tide, and storm surge in the early stages. It can also extract the causal influence of historical tidal levels on the current tidal level.
[0070] The backpropagation layer is used to input the same input sequence in reverse chronological order (from future to past) into the gated recurrent unit to extract the contextual information of tidal changes in the reverse time dimension. This layer can capture the overall periodic structure of tidal levels, the correlation between different periods, and the global patterns of sequence morphology. This helps the model identify the relative positions of high and low tides and the continuous variation characteristics of the tidal cycle, and enhances its ability to learn the correlation between abnormal tidal level changes.
[0071] The output layer is used to concatenate or fuse the hidden state vectors of the forward propagation layer and the backward propagation layer at the corresponding time steps, and generate the next time step or multi-step prediction value of the target tide level through a fully connected regression network.
[0072] Among them, the fully connected regression network in the output layer is the prediction head, which is used to map the temporal hidden state of BiGRU to specific tide level values; while the feedforward fully connected layer (FFN) in the Transformer network is a feature transformation module, which is only used to improve the ability of intermediate features to express themselves and does not directly produce prediction results.
[0073] This layer jointly expresses local dynamics and global trend information, enabling the model to maintain high temporal resolution while possessing strong tidal cycle recognition capabilities. Optional normalization and random deactivation mechanisms further enhance the stability and generalization ability of the prediction results. The input layer data is transmitted to the forward propagation layer and the backward propagation layer respectively; the outputs of the forward propagation layer and the backward propagation layer are concatenated and transmitted to the output layer.
[0074] In deep learning modeling for tide prediction, the selection of hyperparameters has a decisive impact on model performance. To overcome the problems of low efficiency and susceptibility to local optima in manual hyperparameter tuning, this invention introduces the Bayesian Optimization (BO) algorithm to automatically search for the optimal hyperparameter combination of the Transformer network + BiGRU hybrid model. Bayesian optimization is a sequential optimization method based on a probabilistic model, particularly suitable for black-box optimization problems where the objective function has high computational cost, unavailable derivatives, or is non-convex. Its core idea is to gradually approach the global optimum by constructing a probabilistic surrogate model of the objective function and combining it with an acquisition function to balance exploration and exploitation.
[0075] See Figure 3 The output of the bidirectional gated recurrent unit is processed using the Bayesian optimization algorithm to determine the hyperparameter combination. After obtaining the hyperparameter combination, the optimized hyperparameter combination is input into the Transformer network. S3~S5 are executed in a loop until the relative improvement of the validation set error MAE does not exceed the set threshold.
[0076] This invention employs a two-stage framework of "VMD decomposition + Transformer network + BiGRU prediction" to optimize tidal level inversion: first, VMD decomposition is performed on the tidal level sequence to reduce non-stationarity and noise; then, the selected modes are used as multi-channel inputs, and the Transformer network is used to capture global dependencies and the BiGRU is used to represent bidirectional temporal features to output target parameters.
[0077] The bidirectional temporal fusion features obtained after processing by the BiGRU module are input to the output layer (fully connected regression layer). This output layer maps the features and ultimately generates the tide level prediction value. Therefore, the final prediction result of this invention is given by the regression output layer at the back end of the BiGRU module, rather than being directly generated by the Transformer network or the BiGRU module itself. The output layer is a regression prediction output layer, consisting of one or more fully connected neural networks, used to map the bidirectional temporal fusion features output by the BiGRU into physically meaningful tide level prediction values.
[0078] To verify the effectiveness of the proposed tide prediction model, a simulation study was conducted using monitoring data collected from the field. This dataset contains one year of observational data. To enhance the model's ability to capture high and low tides, the IMF parameters of VMD decomposition were explicitly introduced when constructing the input features, enabling the model to learn the direct impact of rising and falling tides on high and low tides. 70% of the sample data was used as training data to train the network for parameter learning; 30% of the data was used as test data to evaluate the model's predictive performance at future times.
[0079] The mean absolute error (MAE), mean absolute percentage error (MAPE), and coefficient of determination (R²) are used to evaluate the model performance, as shown in the following formula:
[0080]
[0081]
[0082] Among them, y i Let be the true value of the i-th sample. Let be the predicted value of the i-th sample, and n be the total number of samples. This is the average of all true values.
[0083] MAE reflects the average absolute deviation between the predicted and actual values; the smaller the value, the more accurate the prediction. RMSE expresses the root mean square value of the error between the predicted and actual values, reflecting the degree of dispersion of the prediction error.
[0084] R 2 R is used to measure how well a model explains the variance of the data, and its value typically ranges from 0 to 1 (when the model performs very poorly, R0 is much lower than 1). 2 (It may be a negative number). The closer the value is to 1, the better the model's explanatory power and the better the prediction effect.
[0085] Comparison of predicted and measured values of the prediction method provided by this invention at different hours Figure 7 As shown. From Figure 7 As can be seen, with the increase of the prediction duration, the prediction results of the prediction method provided by this invention gradually deviate from the actual tide level. The prediction results for 1 hour and 3 hours are closest to the measured values, with the 1-hour prediction having the smallest error. As the prediction duration increases, the errors in the 24-hour and 48-hour predictions increase, but overall they remain within an acceptable range, demonstrating strong predictive ability.
[0086] See Figure 8 and Figure 9 The paper provides error comparison results for different models, including three evaluation metrics: MAE (Mean Absolute Error), RMSE (Root Mean Square Error), and R² (Coefficient of Determination). Among all prediction durations, the proposed Transformer network + BiGRU hybrid model (BO-T + BiGRU) exhibits the best performance. For predictions of 1 hour and 3 hours, both MAE and RMSE are low, and the R² value is close to 1, indicating that the model fits the data well and has high prediction accuracy. Although the error gradually increases with the prediction duration, the prediction method provided by this invention still maintains an MAE of 0.0878, an RMSE of 0.1225, and an R² of 0.9765 for 48-hour predictions, demonstrating strong robustness and stability.
[0087] In contrast, other models (such as CNN-BiLSTM, GRU, and LSTM) also performed well in predictions at different time lengths, but their overall errors were relatively large. The CNN-BiLSTM model, when predicting over 48 hours, had an MAE of 0.0932, an RMSE of 0.1327, and an R² of 0.9727, which, while close to BO-T+BiGRU, still had a significant overall error.
[0088] By comparing the prediction results of different models, it can be determined that: (1) The BO-T+BiGRU hybrid model proposed in this invention has shown excellent performance in tide prediction. Whether in short-term prediction of 1 hour or long-term prediction of 24 hours and 48 hours, this invention shows small prediction error. The MAE and RMSE of the model are significantly lower than those of other models, and the R² value is close to 1, which has extremely high prediction accuracy.
[0089] (2) Compared with traditional CNN-BiLSTM, GRU and LSTM models, BO-T+BiGRU showed significant improvements in different prediction durations. In 1-hour and 3-hour tide predictions, the MAE and RMSE of BO-T+BiGRU were improved by about 66% and 58% respectively compared with the CNN-BiLSTM model. In the 24-hour and 48-hour long-term predictions, the improvement was also more than 30%, showing stronger generalization ability under complex hydrological and meteorological conditions.
[0090] (3) Although the error increases relatively over long periods, BO-T+BiGRU still maintains a low error in 48-hour predictions, with an MAE of 0.0878, an RMSE of 0.1225, and an R² of 0.9765, demonstrating strong robustness and stability. The proposed model can adapt to complex changes in tidal levels and provide reliable forecast results at different time scales.
[0091] This invention introduces a hybrid architecture of "VMD preprocessing + Transformer network + BiGRU" to achieve joint optimization of structure and hyperparameters through Bayesian optimization. It compares the results with baseline models such as CNN-BiLSTM, GRU, and LSTM using metrics such as CF, MAE, RMSE, and R² over multiple time windows from 1 to 48 hours. The aim is to achieve a balance between accuracy, timeliness, and robustness and support engineering applications.
[0092] Example 3 This embodiment provides a tide level prediction system, including: an input unit, a processing unit, and an output unit. The input unit is used to input hydrological data of the prediction location. The processing unit obtains tide level prediction results according to the tide level prediction method involved in Embodiment 1 or Embodiment 2. The output unit is used to output the tide level prediction results.
[0093] Example 4 This embodiment provides an electronic device. The electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor. The memory stores a computer program executable by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the tide prediction method involved in Embodiment 1 or Embodiment 2.
[0094] Example 5 This embodiment provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the tide prediction method involved in Embodiment 1 or Embodiment 2.
[0095] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for predicting tide levels, characterized in that, Includes the following steps: S1. Collect hydrological data and construct a tidal data set; S2. Perform modal decomposition on the tide level data; S3. Construct a tide level prediction model; wherein, the tide level prediction model includes: a Transformer network and a bidirectional gated recurrent unit; S4. Optimize the hyperparameter combination of the tide level prediction model using the tide level dataset and Bayesian optimization. S5. Use the optimized tide prediction model to predict the tide level.
2. The tide level prediction method according to claim 1, characterized in that, The tide data set includes several tide time series for the target location.
3. The tidal level prediction method according to claim 2, characterized in that, In S2, the mode decomposition uses variational mode decomposition to decompose the tide time series into several intrinsic mode data.
4. The tide level prediction method according to claim 3, characterized in that, The Transformer network: The collected tidal level and intrinsic modal data are respectively time-encoded and location-encoded to form the model input; By utilizing a multi-head attention mechanism module, we can mine the temporal dependence features of deformable sequences and their correlation with intrinsic modes; The features of the multi-head attention output are nonlinearly mapped time-by-time using a feedforward network module.
5. The tide level prediction method according to claim 4, characterized in that, The bidirectional gated loop unit includes: The input layer receives the tidal time series features processed by the Transformer network and performs dimension mapping, time step rearrangement, missing test masking and normalization on them. The forward propagation layer sequentially feeds the input sequence into the gate control loop unit in chronological order. Through the alternating control of the update gate and the reset gate, it automatically learns the short-term dependencies and local dynamic characteristics of tidal level changes. The backpropagation layer inputs the input sequence into the gated loop unit in reverse chronological order to extract the contextual information of tidal changes in the reverse time dimension. The output layer concatenates or merges the hidden state vectors of the forward and backward propagation layers at corresponding time steps, and generates the next time step or multi-step prediction value of the target tide level through a fully connected regression network.
6. The tide level prediction method according to claim 5, characterized in that, S4 include: A probabilistic proxy model for the objective function of tide level prediction verification error is constructed, and the hyperparameter combination of the Transformer network and the bidirectional gated recurrent unit is collected through the acquisition function.
7. The tidal level prediction method according to claim 6, characterized in that, In S4, after obtaining the hyperparameter combination, Bayesian optimization is performed on the hyperparameter combination using the tide level dataset until the relative improvement of the verification error does not exceed the set threshold. The optimized hyperparameter combination is then input into the tide level prediction model.
8. A tide level prediction system, characterized in that, include: The input unit is used to input hydrological data for the predicted location. The processing unit obtains the tide prediction result according to the tide prediction method as described in any one of claims 1 to 7; The output unit is used to output the tide level prediction results.
9. An electronic device, characterized in that, The electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the tide prediction method according to any one of claims 1 to 7.
10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the tide prediction method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Tide level prediction method and device and server
CN120781703A