An ecological shoreline wave parameter prediction method based on a space-time graph neural network
By constructing an ecological shoreline wave parameter prediction model using a spatiotemporal graph neural network, the complexity of wave propagation in ecological shoreline areas, which is difficult to capture by traditional methods, is solved. This model achieves efficient and accurate wave parameter prediction and is adaptable to complex environments and scenarios with missing data.
Patent Information
- Application Number
- CN202511132893.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-13
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2045-08-13
AI Technical Summary
Traditional wave prediction models in marine and coastal engineering are computationally expensive and difficult to analyze local small-scale processes. Furthermore, traditional data-driven methods struggle to capture the complexity and non-uniform effects of wave propagation processes in ecological shoreline areas, especially when there is interference from revetment structures, resulting in insufficient prediction accuracy and adaptability.
A spatiotemporal graph neural network-based approach is adopted to obtain ecological shoreline wave parameters by constructing a wave causal-driven spatial graph, LSTM temporal encoding, GCN spatial propagation, and cross-attention fusion modules. Combined with a data completion strategy, wave parameter prediction is achieved.
It enhances the ability to model non-Euclidean space, possesses strong physical mechanism mining capabilities, achieves adaptive modeling of spatiotemporal interactions, maintains stable performance in scenarios with missing data, and improves prediction accuracy and adaptability to complex environments.
Smart Images

Figure CN121052117B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of interdisciplinary integration of marine engineering and artificial intelligence, and in particular to a method for predicting ecological shoreline wave parameters based on spatiotemporal graph neural networks. Background Technology
[0002] In traditional marine and coastal engineering practice, wave prediction mainly relies on numerical models based on solving governing equations, such as SWAN, FUNWAVE-TVD, and WW3. These models typically require input boundary conditions such as wind field, tide level, and water depth, and employ complex differential or spectral methods for simulation. Although these numerical models are widely used for hydrodynamic parameter simulation, their computational cost is high, and they struggle to analyze local small-scale processes. Especially in ecological coastline areas, wave propagation is disturbed by revetment structures (such as artificial oyster reefs), and the local wave field characteristics vary drastically with space and time, exhibiting strong irregularity and complexity. Furthermore, because traditional numerical models rely on preset boundary conditions and idealized physical parameters, they struggle to dynamically respond to the non-uniform effects of structures in the actual environment, thus failing to comprehensively capture wave propagation paths and their energy dissipation processes.
[0003] In recent years, with the development of data-driven methods, machine learning models such as Artificial Neural Networks (ANN), Support Vector Machines (SVM), and Long Short-Term Memory (LSTM) networks have been increasingly applied to wave prediction research, demonstrating a certain level of prediction accuracy and computational efficiency. However, these methods often model based on a single measurement point, neglecting the spatial relationships between multiple observation stations, making it difficult to effectively characterize the wave propagation process in ecological shoreline areas, especially in complex environments with topographic changes or nearshore structure interference. Furthermore, traditional data-driven machine learning models are highly dependent on the completeness of observation data and often lack robust mechanisms to cope with missing data, limiting their adaptability and generalizability in practical marine monitoring systems. Therefore, there is an urgent need for a deep learning method that can simultaneously consider spatial structural characteristics, possess physical interpretation capabilities, and adapt to incomplete data, in order to more realistically reflect the complex and ever-changing wave evolution characteristics within ecological shoreline areas. Summary of the Invention
[0004] This invention provides a method for predicting ecological shoreline wave parameters based on spatiotemporal graph neural networks to overcome the aforementioned technical problems.
[0005] To achieve the above objectives, the technical solution of the present invention is as follows:
[0006] A method for predicting ecological shoreline wave parameters based on spatiotemporal graph neural networks includes the following steps:
[0007] S1: Acquire time-series marine observation data of the preset ecological coastline marine area;
[0008] The time-series ocean observation data includes at least wind speed data, wind direction data, water level data, and wave height sequence data sampled and acquired by preset observation stations at preset timestamps;
[0009] The sample data is obtained by using wind speed, wind direction, and water level data from time-series ocean observation data as feature data and wave height sequence data as label data, thereby generating a sample dataset, and randomly dividing the sample dataset into a training set and a validation set.
[0010] S2: Construct a predictive model for wave parameters of ecological shorelines;
[0011] The prediction model includes a wave-causal driven spatial graph construction module, an LSTM-based temporal feature acquisition module, a GCN-based spatial feature acquisition module, a cross-attention fusion module, and a prediction output module.
[0012] S21: Using the spatial graph construction module, based on the wave height sequence data, the discrete-time derivative of the wave height sequence data obtained by each observation station is obtained by solving the Euler forward difference method. The sample covariance of the observation station is obtained by combining the discrete-time derivative with the wave height sequence data. The directional causal influence intensity between observation stations is calculated and obtained based on the sample covariance of the observation stations. The directed edges between each observation station are confirmed based on the directional causal influence intensity to construct a spatial directed graph.
[0013] S22: The time feature acquisition module obtains the comprehensive time features corresponding to each observation station based on the sample data, and stacks the comprehensive time features by row to obtain the time feature matrix;
[0014] S23: Through the spatial feature acquisition module, graph convolution propagation is performed on the spatial directed graph to obtain a spatial feature matrix that integrates the structural information of the spatial directed graph;
[0015] S24: The temporal feature matrix and the spatial feature matrix are dynamically fused through the cross-attention fusion module to obtain the fused feature representation;
[0016] S25: Through the prediction output module, predict and obtain the predicted wave heights corresponding to each observation station at one or more future times based on the fusion feature representation;
[0017] S3: Train the prediction model using the training set to obtain an optimized prediction model, and validate the optimized prediction model based on the model loss function and the validation set to obtain the optimal prediction model; and use the optimal prediction model to predict the wave parameters of the ecological shoreline.
[0018] Furthermore, step S21 specifically includes the following steps:
[0019] S211: Acquire wave height sequence data The discrete-time derivatives of wave height sequence data for each observation station are obtained by solving the Euler forward difference method.
[0020] And the formula for obtaining the discrete-time derivative is:
[0021]
[0022] In the formula: This represents the wave height data of observation station i. The corresponding discrete-time derivative; k represents the set forward step size; Δt represents the sampling interval; t represents the time parameter;
[0023] S212: Obtain the covariance of the observation station samples based on the discrete-time derivative and wave height sequence data, and the formula for obtaining the covariance of the observation station samples is as follows:
[0024]
[0025]
[0026] In the formula: Let represent the covariance between the wave height sequences of observation station i and observation station j; This represents the covariance between the wave height sequence at observation station i and the wave height change rate at observation station j; Let represent the covariance between the wave height sequence of observation station i and its own wave height change rate; This represents the average wave height of observation station i over the entire time period; Represents the time average of the wave height at observation station j; T represents the number of time steps. This represents the wave height data of observation station j. The corresponding discrete-time derivative;
[0027] S213: Calculate and obtain the intensity of directional causal influence between observation stations based on the sample covariance of the observation stations, and the formula for obtaining the intensity of directional causal influence is as follows:
[0028]
[0029] In the formula: This indicates the strength of the directional causal effect of observation station j on observation station i;
[0030] S214: Obtain the time-averaged causal strength based on the intensity of directional causal influence. And based on threshold filtering rules, directed edges between observation stations were identified;
[0031] The threshold filtering rule: Where τ represents the threshold parameter;
[0032] If the threshold screening rule is met, and it is confirmed that observation station j has a significant causal influence on observation station i, then a directed edge from observation station j to observation station i is added during the construction of the spatial directed graph; otherwise, no directed edge is added.
[0033] The adjacency matrix A∈{0,1} is obtained based on the directed edges between each observation station. N×N And A ji ∈A, where N represents the total number of observation stations, A ji Let A represent the decision variable that indicates whether there exists a directed edge from node j (observation station j) to another node i (observation station i). If it exists, then A... ji =1; otherwise, A ji =0; and based on the adjacency matrix A, a spatial directed graph of all observation stations is obtained.
[0034] Furthermore, step S22 specifically includes the following steps:
[0035] S221: Obtain the model input tensor based on time-series ocean observation data Where T represents the backtracking time window; F represents the input feature dimension of each observation station, which includes at least wind speed, wind direction, water level, and wave height;
[0036] And based on the model input tensor X, the input vector of observation station i at time t is defined as follows: Then obtain the historical sequence of length T for observation station i.
[0037] S222: Historical sequence The data is input into an LSTM network for time encoding to obtain the comprehensive temporal characteristics corresponding to each observation station.
[0038] Furthermore, the formula for obtaining the comprehensive time features is:
[0039]
[0040]
[0041] In the formula: σ represents the Sigmoid activation function; tanh represents the hyperbolic tangent function; ⊙ represents element-wise multiplication; d' represents the hidden state of the i-th observation at time t; d' represents the LSTM hidden dimension; U i U f U o U c W i W f W o W c b represents the weight parameters to be trained; i ,b f ,b o ,b c Indicates the bias term; This indicates the hidden state at output time step t-1; Represents the hidden state at time t; i t Indicates the input gate; f t Indicates the gate of forgetting; o t Indicates the output gate; Indicates the candidate cell state; c t Indicates the current cell state;
[0042] S223: Hide the state at time t As a comprehensive time feature, the various comprehensive time features are stacked row-wise to obtain the time feature matrix H. t and
[0043] Furthermore, step S23 specifically includes the following steps:
[0044] S231: Based on the adjacency matrix A∈{0,1} in the directed spatial graph. N×N And A ji ∈A, establish the in-degree matrix and out-degree matrix of observation station i;
[0045] And the in-degree matrix D in,ii With the out-degree matrix D out,ii The formula for establishing is
[0046]
[0047] S232: Based on the GCN network, using the adjacency matrix A and the in-degree matrix D... in,ii With the out-degree matrix D out,ii Graph convolution propagation on a spatially directed graph;
[0048] Furthermore, the expression for graph convolution propagation on a directed graph in space is:
[0049]
[0050] In the formula: H (l+1) H represents the graph convolution propagation result of the (l+1)th layer;(l) The graph convolution propagation result of the l-th layer is represented by T; T represents transpose; D represents the graph convolution propagation result of the l-th layer. in D represents in,ii The abbreviation of D; out D represents out,ii The abbreviated form; This represents the trainable parameters of the l-th layer GCN, namely the weighted weights of the input and output edges; d l ,d l+1 These represent the embedding dimensions of the l-th layer and the (l+1)-th layer, respectively.
[0051] S233: Based on S232, obtain the spatial feature matrix S of the graph structure information in the fused spatial directed graph after L-layer graph convolution propagation. t ,and Where d s Represents the spatial embedding dimension.
[0052] Furthermore, the expression for obtaining the fused feature representation in S24 is:
[0053] Q = H t W Q K = S t W K V = S t W V
[0054]
[0055] In the formula: Each represents a trainable parameter matrix; d represents the feature representation after fusion. att The attention embedding dimension is represented by Q; the query vector by K; the key vector by V; and the value vector by d.
[0056] In S25, the expression for predicting the wave height of each observation station at one or more future times is obtained based on the fused feature representation.
[0057]
[0058] In the formula: W represents the predicted wave height at each observation station at time t; out ,b out This represents the weights and biases of the linear output layer.
[0059] Furthermore, S3 specifically includes the following steps:
[0060] S31: Train the prediction model using the training set to obtain an optimized prediction model;
[0061] S32: Based on the model loss function, the optimized prediction model is validated using the validation set to confirm whether the model output of the optimized prediction model has converged.
[0062] If so, then the optimized prediction model at this time is confirmed to be the optimal prediction model;
[0063] Otherwise, the model parameter weights of the prediction model are adaptively adjusted and optimized based on the backpropagation method, and step S31 is repeated.
[0064] S32: Predict wave parameters of ecological shoreline based on the optimal prediction model.
[0065] Furthermore, the expression for the model loss function in S32 is as follows:
[0066]
[0067] In the formula: This represents the mean squared error loss function; This represents the predicted and acquired wave height value of observation station i at time t; This represents the actual observed wave height value at observation station i at time t.
[0068] Furthermore, S1 also includes preprocessing the acquired temporal ocean observation data of the preset ecological coastline marine area, the preprocessing including:
[0069] S11: For each moment of the time-series ocean observation data, construct a mask matrix M∈{0,1}. N×F Where N represents the number of observation stations; F represents the feature dimension of the ocean observation data;
[0070] S12: Confirm whether there are any missing data in the time-series ocean observation data;
[0071] If so, the positions corresponding to the missing data are set to 1 based on the mask matrix M; otherwise, they are set to 0, in order to obtain the time-series ocean observation data to be completed.
[0072] S13: Based on the interpolation method, perform data filling on the time-series ocean observation data to be completed to obtain complete time-series ocean observation data; and the interpolation method includes, but is not limited to, any one of median interpolation, mean interpolation and linear interpolation.
[0073] Furthermore, the true observed wave height value in the mean square error is calculated using the model loss function. The selection criteria are as follows: only real observation data from time-series ocean observation data are selected, not interpolated observation data that is used to fill in missing data.
[0074] This invention provides a method for predicting ecological shoreline wave parameters based on spatiotemporal graph neural networks, with the following beneficial effects:
[0075] 1. Compared to traditional ANNs and Convolutional Neural Networks (CNNs), this invention enhances the ability to model non-Euclidean space: Conventional neural networks (such as ANNs) can only process vectorized inputs, failing to capture spatial correlations or capture continuous temporal effects; while CNNs, although capable of handling local spatial correlations on regular grids, are not suitable for geographically unevenly distributed observation stations. This invention, by introducing a spatial feature acquisition module based on GCN spatial propagation, overcomes the limitations of Euclidean space, enabling the extraction of spatial propagation features of wave fields in graph structures with irregular node distributions and sparse connections. This results in superior performance in fitting spatial wave propagation trends, and effectively avoids over-smoothing of local features.
[0076] 2. Possesses strong physical mechanism mining capabilities: The prediction model can automatically identify the main energy transfer paths between observation stations, which is consistent with the physical intuition of the main wind and wave direction; at the same time, for wave field abrupt change regions caused by special structural interference (such as oyster reef groups), this invention, based on the wave causal driven spatial graph construction module, reflects its "energy blocking" effect through low connection strength or directional edge weight attenuation, showing good physical consistency.
[0077] 3. An adaptive modeling mechanism for spatiotemporal interaction is realized: This invention breaks through the traditional serial spatiotemporal modeling method of processing time first and then space by adopting a cross-attention fusion module; this mechanism can calculate the fusion weight in real time for each time series sample and each time step according to its current state and environmental conditions, and dynamically integrate its temporal evolution information and spatial correlation information, which greatly enhances the model's response capability and generalization performance in complex and unstable marine environments.
[0078] 4. Even with missing temporal oceanographic observation data, the prediction model maintains stable performance: To address the issue of incomplete observation data, this invention also designs a data completion strategy combining a masking mechanism and interpolation, effectively mitigating the training instability risk caused by missing input tensors. Furthermore, the GCN structure within the prediction model enables local compensation of missing data by aggregating relevant information from neighboring observation stations through an adjacency matrix via a message passing mechanism. This achieves structural fault tolerance for missing data at the model level, possessing the potential to transform missing data into information reasoning problems within a graph structure, further enhancing the model's practicality and fault tolerance. Attached Figure Description
[0079] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the 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 based on these drawings without creative effort.
[0080] Figure 1 This is a flowchart of the ecological shoreline wave parameter prediction method based on spatiotemporal graph neural network of the present invention;
[0081] Figure 2 This is a schematic diagram of the target area for collecting multi-source time-series ocean observation data in this embodiment;
[0082] Figure 3 This is a structural block diagram of the prediction model for ecological shoreline wave parameters in this embodiment;
[0083] Figure 4 This is a graph showing the evolution of causal information flow between wave observation stations over time in this embodiment.
[0084] Figure 5 This is a schematic diagram of a spatially directed graph in this embodiment;
[0085] Figure 6 This is a comparison chart of wave height time series under different prediction lead amounts corresponding to wave meter WG2 in this embodiment;
[0086] Figure 7 This is a comparison chart of wave height time series under different prediction lead times corresponding to wave meter WG3 in this embodiment;
[0087] Figure 8 This is a comparison chart of wave height time series under different prediction lead amounts corresponding to wave meter WG4 in this embodiment;
[0088] Figure 9 This is a comparison chart of wave height time series under different prediction lead amounts corresponding to wave meter WG5 in this embodiment;
[0089] Figure 10 This is a comparison chart of wave height time series under different prediction lead times corresponding to wave meter WG6 in this embodiment. Detailed Implementation
[0090] 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, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0091] This embodiment provides a method for predicting ecological shoreline wave parameters based on a spatiotemporal graph neural network, such as... Figure 1 As shown, it includes the following steps:
[0092] S1: Obtain time-series ocean observation data of a preset ecological coastline marine area; the time-series ocean observation data includes at least wind speed data, wind direction data, water level data, and wave height sequence data sampled and obtained by a preset observation station at a preset timestamp; obtain sample data by using wind speed data, wind direction data, and water level data from the time-series ocean observation data as feature data, and wave height sequence data as label data, thereby generating a sample dataset, and randomly dividing the sample dataset into a training set and a validation set;
[0093] Specifically, such as Figure 2 The data collected includes time-series ocean observation data from multiple sources within the target area, including variables such as wind speed, wind direction, water level, and wave height. Among these, for example... Figure 2 (a) Schematic diagram of the location of the Delaware Bay study area: white dot represents the study area (Gandys Beach), and yellow dot represents the nearby NOAA weather station; Figure 2 (b) Coastline and wave observation station distribution in the study area: Orange dots indicate the locations of wave meters (WG) at the observation stations, showing the coastline extent of the study area. Dashed lines indicate the locations of oyster reefs. Specifically, wind speed data were obtained from three weather stations (DELD1, LWSD1, and CMAN4) deployed by the National Oceanic and Atmospheric Administration (NOAA) in Delaware Bay, with a recording interval of 30 minutes, simultaneously obtaining east-west (u) and north-south (v) wind speed components; water level data came from the tide gauge station SJSN4 located near the study area; wave height data were provided by five wave meters (WG2–WG6) deployed before and after the artificial oyster reef at Gandys Beach. All of the above marine observation data were timestamped and aligned to a preset unified time base, while also meeting the requirements for spatiotemporal synchronization. In this embodiment, the organization of the input and labels of the prediction model is as follows: First, the input of the prediction model is constructed using a sliding time window of 5 hours (corresponding to 10 30-minute sampling points). For each time window, observation data from all observation stations within that time period are collected, including U-wind component, V-wind component, water level, and wave height data. These data are then stitched together to form a three-dimensional tensor. Where N represents the number of observation stations (5 wave meters); T = 10 represents the time step; F = 4 represents the variable dimensions (u wind, v wind, water level, and wave height), and each observation station has these four types of observation data at each time step. Before inputting into the prediction model, all variables are standardized in their respective dimensions, i.e., the mean is subtracted and the standard deviation is divided, to improve the model convergence speed and reduce the interference of different units on the learning process. The input features of the i-th observation station at the t-th time step can be represented as... Subsequently, the window is slid forward in 30-minute time steps, generating training samples sequentially to achieve data augmentation and maintain temporal continuity. For each input window, the effective wave heights are predicted 1 hour, 3 hours, and 6 hours ahead on the time axis, i.e., the measured wave heights at the 2nd, 6th, and 12th time steps after the end of the window are taken as labels. Therefore, the input to the prediction model is a sliding tensor containing 5 hours of historical wind-tide-wave information, and the labels are the wave height values of the same set of observation stations in the next 1 hour, 3 hours, or 6 hours. For example, when the input window covers the observation sequence from 07:00 to 11:00, the corresponding prediction targets are the effective wave height values at 12:00, 14:00, or 17:00, rather than the average or cumulative values within these time periods.
[0094] S2: Construct a predictive model for wave parameters of ecological shorelines;
[0095] like Figure 3 As shown, the prediction model includes a wave-causal driven spatial graph construction module, an LSTM-based temporal feature acquisition module, a GCN-based spatial feature acquisition module, a cross-attention fusion module, and a prediction output module.
[0096] S21: Using the spatial graph construction module, based on the wave height sequence data, the discrete-time derivative of the wave height sequence data obtained by each observation station is obtained by solving the Euler forward difference method. The sample covariance of the observation station is obtained by combining the discrete-time derivative with the wave height sequence data. The directional causal influence intensity between observation stations is calculated and obtained based on the sample covariance of the observation stations. The directed edges between each observation station are confirmed based on the directional causal influence intensity to construct a spatial directed graph.
[0097] In this embodiment, to obtain a physically interpretable and sufficiently sparse spatiotemporal graph structure, a causal-driven edge construction method, namely a wave causal-driven spatial graph construction module, is constructed. This method calculates the causal influence intensity between observation stations to build the spatial graph structure. Each node, i.e., the observation station, corresponds to a wave observation station. The direction of the edge represents the flow of causal relationships, i.e., which observation station's change affects another observation station. The edge weight is equivalent to the calculated causal information flow intensity between the two stations; the larger the value, the more significant the influence relationship. The graph generated in this way has clear physical meaning and directionality, reflecting the dominant path of wave energy propagation within the ecological shoreline area, thus constructing an interpretable spatiotemporal directed graph structure in non-Euclidean space. The specific steps include:
[0098] S211: Acquire wave height sequence data from time-series ocean observation data The discrete-time derivatives of wave height sequence data for each observation station are obtained by solving the Euler forward difference method.
[0099] And the formula for obtaining the discrete-time derivative is:
[0100]
[0101] In the formula: This represents the wave height data of observation station i. The corresponding discrete-time derivative; k represents the set forward step size. In this embodiment, a smaller k (e.g., k=1) is preferred to obtain higher time resolution, while a larger k helps to smooth high-frequency fluctuations and noise; Δt represents the sampling interval, which is 30 min in this embodiment; t represents the time parameter.
[0102] S212: Obtain the covariance of the observation station samples based on the discrete-time derivative and wave height sequence data, and the formula for obtaining the covariance of the observation station samples is as follows:
[0103]
[0104]
[0105] In the formula: Let represent the covariance between the wave height sequences of observation station i and observation station j; This represents the covariance between the wave height sequence at observation station i and the wave height change rate at observation station j; Let represent the covariance between the wave height sequence of observation station i and its own wave height change rate; This represents the average wave height of observation station i over the entire time period; Represents the time average of the wave height at observation station j; T represents the number of time steps. This represents the wave height data of observation station j. The corresponding discrete-time derivative; This represents the covariance between the wave height sequence at observation station j and the rate of change of wave height at observation station i;
[0106] S213: As Figure 4 The causal information flow estimation shown: This embodiment uses the Liang-Kleeman information flow estimator to calculate and obtain the directional causal influence strength between observation stations based on the sample covariance of the observation stations. The formula for obtaining the directional causal influence strength is as follows:
[0107]
[0108] In the formula: This represents the strength of the directional causal effect of observation station j on observation station i; where The magnitude of indicates the strength of the causal effect of observation station j on observation station i;
[0109] S214: Obtain the time-averaged causal strength based on the intensity of directional causal influence. And based on threshold filtering rules, directed edges between observation stations were identified;
[0110] The threshold filtering rule: Where τ represents the threshold parameter; when the threshold screening rule is met, it is confirmed that observation station j has a significant causal influence on observation station i, then a directed edge from observation station j to observation station i is added during the construction of the spatial directed graph; otherwise, no directed edge is added.
[0111] The adjacency matrix A∈{0,1} is obtained based on the directed edges between each observation station. N×N And A ji ∈A, where N represents the total number of observation stations, A ji Let A represent the decision variable indicating whether there exists a directed edge from node j to node i. If so, then A... ji =1; otherwise, A ji =0; and based on the adjacency matrix A, a spatially directed graph of all observation stations is obtained. In this embodiment, the adjacency matrix constructed using this method is sparse and directional, capable of representing the main wave energy propagation channels under the combined influence of offshore dynamics and oyster reef local effects. For example... Figure 5 As shown, the sparse directed causal diagram between wave observation stations WG2 to WG6 along the Delaware Bay ecological coastline shows that the arrows represent the directions of significant causal influences obtained based on the Liang-Kleeman information flow (τ = 0.1), which can reflect the main wave energy transmission paths under the influence of artificial oyster reefs. It can be seen that WG5 in the oyster reef-shaded area has extremely weak connections with other observation stations.
[0112] S22: The time feature acquisition module obtains the comprehensive time features corresponding to each observation station based on the sample data, and stacks the comprehensive time features by row to obtain the time feature matrix;
[0113] The specific steps include:
[0114] S221: Let N represent the number of observation stations; F represent the input feature dimension of each observation station (such as wind speed, water level, and wave height). Obtain the model input tensor based on time-series ocean observation data. Where T represents the backtracking time window; F represents the input feature dimension of each observation station, which includes at least wind speed, wind direction, water level, and wave height; and based on the model input tensor X, the input vector of observation station i at time t is defined as follows: Then obtain the historical sequence of length T for observation station i.
[0115] S222: Historical sequence The data is input into an LSTM network for time encoding to obtain the comprehensive temporal characteristics corresponding to each observation station.
[0116] Furthermore, the formula for obtaining the comprehensive time features is:
[0117]
[0118] In the formula: σ represents the Sigmoid activation function; tanh represents the hyperbolic tangent function; ⊙ represents element-wise multiplication; d' represents the hidden state of the i-th observation at time t; d' represents the LSTM hidden dimension; U i U f U o U c W i W f W o W c b represents the weight parameters to be trained; i ,b f ,b o ,b c Indicates the bias term; This indicates the hidden state at output time step t-1; Represents the hidden state at time t; i t This represents the input gate, used to control the proportion of the current input written to memory; f t This represents the forgetting gate, which determines the degree to which memories from the previous moment are retained or discarded in the current moment; t This represents the output gate, which adjusts the strength of the current memory output to the hidden state; The candidate cell state is generated jointly by the current input and the previous hidden state, and is used to update the memory with new information; ct This represents the current cell state, i.e., the memory representation after combining forgetting and writing;
[0119] S223: Hide the state at time t As a comprehensive time feature, the various comprehensive time features are stacked row-wise to obtain the time feature matrix H. t and
[0120] S23: Through the spatial feature acquisition module, graph convolution propagation is performed on the spatial directed graph to obtain a spatial feature matrix that integrates the structural information of the spatial directed graph;
[0121] The specific steps include:
[0122] S231: To simultaneously characterize temporal evolution and spatial dependence, this embodiment adopts an overall framework of "LSTM temporal encoding - GCN spatial propagation - cross-attention fusion": First, the historical sequences of each observation station are temporally encoded using an LSTM network to obtain the temporal feature matrix H at the end of the window. t Subsequently, graph convolution propagation is performed on a directed graph constructed based on causal information flow: the graph is denoted as G=(V,E), where V={1,2,…,N} represents the set of nodes consisting of wave observation stations. The adjacency matrix A ∈ {0,1} is a set of directed edges used to characterize the causal relationship between one site and another. N×N Let A represent the edge structure of a graph. If there exists a directed edge from node j to node i, then A ji =1; based on the adjacency matrix A∈{0,1} in the directed graph. N×N And A ji ∈A, establish the in-degree matrix and out-degree matrix of observation station i;
[0123] And the in-degree matrix D in,ii With the out-degree matrix D out,ii The formula for establishing is
[0124]
[0125] S232: Based on the GCN network, using the adjacency matrix A and the in-degree matrix D... in,ii With the out-degree matrix D out,ii Perform graph convolution forward propagation on a spatially directed graph;
[0126] Furthermore, the expression for graph convolution forward propagation on a directed graph in space is:
[0127]
[0128] In the formula: H (l+1) H represents the graph convolution propagation result of the (l+1)th layer;(l) The graph convolution propagation result of the l-th layer is represented by T; T represents transpose; D represents the graph convolution propagation result of the l-th layer. in D represents in,ii The abbreviation of D; out D represents out,ii The abbreviated form; This represents the trainable parameters of the l-th layer GCN, namely the weighted weights of the input and output edges; d l ,d l+1 These represent the embedding dimensions of the l-th and l+1-th layers, respectively. This embodiment makes full use of the information of the incoming and outgoing edges of each observation station in the spatially directed graph, thereby improving the network's robustness to incomplete observations or boundary effects.
[0129] S233: Based on S232, obtain the spatial feature matrix S of the graph structure information in the fused spatial directed graph after L-layer graph convolution propagation. t ,and Where d s =d L Represents the spatial embedding dimension;
[0130] S24: The temporal feature matrix and the spatial feature matrix are dynamically fused through the cross-attention fusion module to obtain the fused feature representation;
[0131] Specifically, unlike the traditional sequential modeling approach that processes time before space, this embodiment introduces a cross-attention mechanism, or cross-attention fusion module, with selective attention capabilities to implement the temporal feature H. t Spatial characteristics S t The dynamic fusion of the two elements, after linear mapping, serves as the Query, Key, and Value inputs to the cross-attention module to obtain a fused feature representation. The expression for obtaining the fused feature representation is:
[0132] Q = H t W Q K = S t W K V = S t W V
[0133]
[0134] In the formula: Each represents a trainable parameter matrix; d represents the feature representation after fusion. att The attention embedding dimension is represented by Q; the query vector by K; the key vector by V; and the value vector by d.
[0135] S25: Through the prediction output module, predict and obtain the predicted wave heights corresponding to each observation station at one or more future times based on the fused feature representation. The formula for obtaining the corresponding predicted wave heights is as follows:
[0136]
[0137] In the formula: This represents the predicted wave height at each observation station at time t, such as... Figures 6 to 10 The image shows a comparison of the 1-hour lead time for the Delaware Bay ecological coastline observation stations WG2 to WG6, using the GCN-LSTM model (i.e., the prediction model) and the observed wave height (where blue represents the observed value and the orange dashed line represents the predicted value); W out ,b out The weights and biases of the linear output layer are represented here. In this embodiment, a three-layer stacked LSTM network is used to extract deep dynamic features of the observation stations over time, layer by layer. Compared to a single-layer structure, this design can fully capture multi-scale temporal dependencies, improving the model's ability to express complex wave changes. Simultaneously, a two-layer GCN network is used to hierarchically model the spatial dependencies between observation stations: the first layer focuses on the propagation of information from local causal structures, while the second layer further expands the spatial perception range, enhancing the ability to characterize the correlations between distant observation stations. Based on this, a cross-attention mechanism with selective attention capability is introduced to dynamically fuse the temporal feature matrix output by the LSTM network with the spatial feature matrix extracted by the GCN network, achieving collaborative perception and joint modeling of spatiotemporal information, thereby enhancing the model's ability to cope with the non-stationary characteristics of wind and wave systems. Given historical wind speed, water level, and wave height sequences as input, this prediction model can simultaneously output wave height prediction results for all observation stations. This embodiment achieves integrated modeling of "time-space-fusion": a time feature acquisition module based on LSTM time encoding is responsible for extracting time memory through an LSTM network; a space feature acquisition module based on GCN spatial propagation is responsible for depicting the interaction path between stations on a causal directed graph through a GCN network; and a cross-attention fusion module adaptively weights the two modules according to the current scenario, thereby improving the response capability and overall prediction accuracy to non-stationary processes such as sudden changes in wind and waves. This not only enhances the flexibility and expressive power of spatiotemporal feature fusion, but also avoids information loss or sequence dependency problems in serial structures, and enhances the robustness and generalization ability of the model in highly dynamic scenarios.
[0138] S3: Train the prediction model using the training set to obtain an optimized prediction model, and validate the optimized prediction model based on the model loss function and the validation set to obtain the optimal prediction model; and use the optimal prediction model to predict the wave parameters of the ecological shoreline.
[0139] Specifically, the following steps are included:
[0140] S31: Train the prediction model using the training set to obtain an optimized prediction model;
[0141] S32: Based on the model loss function, the optimized prediction model is validated using the validation set to confirm whether the model output of the optimized prediction model has converged.
[0142] Specifically, the expression for the model loss function is as follows:
[0143]
[0144] In the formula: This represents the mean squared error loss function; This represents the predicted and acquired wave height value of observation station i at time t; This represents the actual observed wave height value at observation station i at time t;
[0145] If so, then the optimized prediction model at this time is confirmed to be the optimal prediction model;
[0146] Otherwise, the model parameter weights (including the weights of the LSTM network, GCN network, cross-attention fusion module, and final linear layer) of the prediction model are adaptively adjusted and optimized based on the backpropagation method, and step S31 is repeated.
[0147] S32: Predict wave parameters of ecological shoreline based on the optimal prediction model.
[0148] In a specific embodiment, S1 further includes preprocessing the acquired temporal ocean observation data of a preset ecological coastline marine area, the preprocessing including:
[0149] S11: For each moment of the time-series ocean observation data, construct a mask matrix M∈{0,1}. N×F Where N represents the number of observation stations; F represents the feature dimension of the ocean observation data;
[0150] S12: Confirm whether there are any missing data in the time-series ocean observation data;
[0151] If so, the positions corresponding to the missing data are set to 1 based on the mask matrix M; otherwise, they are set to 0, in order to obtain the time-series ocean observation data to be completed.
[0152] S13: Based on interpolation methods, the time-series ocean observation data to be completed is filled to obtain complete time-series ocean observation data; and the interpolation methods include, but are not limited to, any one of median interpolation, mean interpolation, and linear interpolation. Furthermore, in a specific embodiment, the true observed wave height value in the mean square error is calculated using a model loss function. The selection criteria are as follows: only real observation data from time-series ocean observation data are selected, not interpolated observation data that is used to fill in missing data.
[0153] This embodiment addresses the common problem of missing data in marine observation data by introducing a data processing strategy that combines masking mechanisms with interpolation methods to improve the model's adaptability and stability under incomplete data conditions. Missing values are imputed using the median (or alternatively, mean or linear interpolation can be used depending on the specific needs), and the imputed complete data is then input into the model. Simultaneously, during the training phase, the loss function is calculated based on a weighted average of the mask matrix, calculating the error only at locations where true observations exist. This effectively avoids interpolation noise interference, enhancing the model's robustness and engineering adaptability to missing data.
[0154] This embodiment also includes the statistical results of the prediction errors of the method described in this embodiment and existing models: Table 1 shows a comparison of the statistical errors of different wave prediction models (1-hour, 3-hour, and 6-hour forecast lead times), listing the RMSE, MAE, and R values of ARIMA, SVR, ANN, and the LSTM-GCN prediction model described in this embodiment. 2 index;
[0155] Table 1. Comparison of Error Statistics of Different Wave Prediction Models
[0156]
[0157] Table 2 shows a comparison of model performance under different graph edge construction methods (with significant wave height as the prediction target). This table compares the model prediction performance under three edge construction strategies (causal graph, fully connected graph, and random graph).
[0158] Table 2. Comparison of model performance under different graph edge construction methods
[0159]
[0160] The results in Table 2 show that introducing a physics-driven causal graph structure can improve the interpretability of the model without increasing the error, while achieving a relatively better accuracy. This verifies the effectiveness and rationality of the wave-based causal-driven spatial graph construction module in characterizing spatial dependencies.
[0161] Table 3 shows the impact of the number of missing observation sites on the model's prediction performance. This table demonstrates the impact of the median interpolation strategy on the prediction accuracy of the LSTM-GCN model under different numbers of missing observation sites.
[0162] Table 3. Impact of the number of missing observation sites on model prediction performance
[0163]
[0164] As shown in Table 3, as the number of missing observation sites increases from 0 to 4, the RMSE and MAE indices of the model gradually increase, while R... 2 The slight decrease in the metrics indicates that the model maintained strong stability and robustness even with incomplete observation data. This performance is attributed to the graph neural network's utilization of spatial correlation information; even with missing nodes, the model can still perform effective inference using information from neighboring sites.
[0165] Table 4 shows the impact of different spatiotemporal feature fusion strategies on model performance. Compared with traditional static fusion methods such as addition, multiplication and concatenation, the cross-attention mechanism significantly improves prediction accuracy by introducing a dynamic weighting strategy, verifying its advantages in spatiotemporal information alignment and extraction.
[0166] Table 4. Impact of different spatiotemporal feature fusion strategies on model performance
[0167]
[0168] Compared with existing methods, the beneficial effects of the method described in this embodiment are as follows:
[0169] 1. Superior to traditional numerical models in terms of efficiency and boundary adaptability: Traditional wave numerical simulations rely on complete initial boundary conditions and grid configurations, resulting in large computational loads and long running times, making it difficult to meet the rapid response requirements in sudden disaster events. The method described in this embodiment uses deep neural networks to replace the control equations for solving, and can complete multi-step predictions relying only on nearshore observation data, significantly reducing dependence on boundary conditions and possessing stronger generalization ability and computational efficiency.
[0170] 2. Compared to traditional ANNs and CNNs, this method enhances non-Euclidean space modeling capabilities: Conventional neural networks (such as ANNs) can only process vectorized inputs, failing to capture spatial correlations or capture continuous temporal effects; while CNNs, although capable of handling local spatial correlations on regular grids, are not suitable for geographically unevenly distributed observation stations. The method described in this embodiment, by introducing a spatial feature acquisition module based on GCN spatial propagation, overcomes the Euclidean space limitation, enabling the extraction of spatial propagation features of wave fields in graph structures with irregular node distributions and sparse connections. Experimental results show that, compared to the ANN model, the method described in this embodiment performs better in fitting spatial wave propagation trends, especially effectively avoiding over-smoothing of local features.
[0171] 3. Strong ability to uncover physical mechanisms: The predictive model can automatically identify the main energy transfer paths between observation stations, such as the propagation chain WG2→WG3→WG6, which aligns with the physical intuition of the main wind and wave direction. Furthermore, for wavefield abrupt changes caused by special structural disturbances (such as oyster reef formations), this invention, based on a wave causal-driven spatial graph construction module, demonstrates the "energy blocking" effect through low connection strength or directional edge weight attenuation, showing good physical consistency. For example, in the visualization analysis of the causal graph, it was found that WG5 has a significant connection only with WG4, further confirming the shielding effect of oyster reefs on its frontal wave propagation. This identification capability provides a new technical means to reveal the wave propagation mechanism under complex nearshore disturbance fields.
[0172] 4. Even with missing time-series oceanographic observation data, the prediction model maintains stable performance: To address the issue of incomplete observation data, the method described in this embodiment employs a data completion strategy combining masking and interpolation, effectively mitigating the training instability risk caused by missing input tensors. Experimental results show that even when the missing data ratio exceeds 30%, the model maintains a low error level, demonstrating good robustness and engineering adaptability. Furthermore, the GCN structure within the prediction model enables local compensation of missing data by aggregating relevant information from neighboring observation stations through a message passing mechanism. This achieves structural fault tolerance for missing data at the model level, possessing the potential to transform missing data into information reasoning problems within a graph structure, further enhancing the model's practicality and fault tolerance.
[0173] 5. An adaptive modeling mechanism for spatiotemporal interaction is implemented: The method described in this embodiment breaks through the traditional sequential spatiotemporal modeling approach that processes time first and then space by employing a cross-attention fusion module. This mechanism can calculate the fusion weight in real time for each time series sample and each time step based on its current state and environmental conditions, dynamically integrating its temporal evolution information and spatial correlation information. For example, under extreme weather conditions such as storm surges, hydrodynamic parameters often fluctuate drastically, and the model will automatically strengthen its reliance on surrounding stations to more accurately perceive regional changes; while under normal weather conditions, the model tends to use the historical evolution information of its own station for stable predictions. This adaptive modeling mechanism greatly enhances the model's response capability and generalization performance in complex and unstable marine environments.
[0174] 6. A rolling multi-step prediction process closely resembling reality is achieved: The method described in this embodiment employs an autoregressive prediction strategy, using the model's prediction result from the previous moment as the input for the next moment, constructing a continuous closed-loop prediction process. This process aligns with situations where real-world future observations are unavailable in actual forecasts, avoiding the performance overestimation problem caused by artificially using real-world future values to assist predictions in some traditional studies. Compared to methods that directly predict multiple future moments, this approach better reflects real-world feedback mechanisms and is applicable to systems with time-series feedback characteristics, such as storm surges, shipping scheduling, and energy allocation. Experimental results show that even when continuously predicting for multiple hours, the model maintains high prediction accuracy, possesses the ability to automatically adjust and correct after initial error accumulation, and is less prone to continuously expanding prediction deviations, demonstrating good stability and engineering adaptability.
[0175] In summary, the method described in this embodiment has broad application prospects in typical scenarios such as ecological shoreline wave early warning, storm surge disaster prevention and control, natural shoreline protection effectiveness assessment, and hydrodynamic environment simulation. The prediction model adopts a progressive rolling prediction approach, avoiding reliance on future real-world observations. Compared to directly predicting multiple future moments, this method more closely resembles the temporal feedback mechanism in real systems, making it particularly suitable for feedback-oriented systems requiring dynamic responses, such as storm surge evolution simulation, shipping scheduling optimization, and marine energy allocation. This method not only possesses strong generalization ability and stability but also effectively addresses complex issues such as data gaps and spatiotemporal heterogeneity. It is applicable to marine environmental modeling and risk management in ecologically sensitive areas such as urban coastal zones, deltas, mangroves, and artificial wetlands, facilitating the promotion and implementation of "nature-based solutions" in engineering practice. Furthermore, the method described in this embodiment has good system compatibility and embedding capability, and can be integrated as an intelligent prediction module into underwater sensor networks, intelligent buoy systems, marine observation stations and marine information platforms to improve the response capability of the entire system under extreme weather or emergencies, accelerate the construction of a future-oriented intelligent marine infrastructure system, and has significant engineering application value and market promotion potential.
[0176] 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. A method for predicting ecological shoreline wave parameters based on spatiotemporal graph neural networks, characterized in that, Includes the following steps: S1: Acquire time-series marine observation data of the preset ecological coastline marine area; The time-series ocean observation data includes at least wind speed data, wind direction data, water level data, and wave height sequence data sampled and acquired by preset observation stations at preset timestamps; The sample data is obtained by using wind speed, wind direction, and water level data from time-series ocean observation data as feature data and wave height sequence data as label data, thereby generating a sample dataset, and randomly dividing the sample dataset into a training set and a validation set. S2: Construct a predictive model for wave parameters of ecological shorelines; The prediction model includes a wave-causal driven spatial graph construction module, an LSTM-based temporal feature acquisition module, a GCN-based spatial feature acquisition module, a cross-attention fusion module, and a prediction output module. S21: Using the spatial graph construction module, based on the wave height sequence data, the discrete-time derivative of the wave height sequence data obtained by each observation station is obtained by solving the Euler forward difference method. The sample covariance of the observation station is obtained by combining the discrete-time derivative with the wave height sequence data. The directional causal influence intensity between observation stations is calculated and obtained based on the sample covariance of the observation stations. The directed edges between each observation station are confirmed based on the directional causal influence intensity to construct a spatial directed graph. S22: The time feature acquisition module obtains the comprehensive time features corresponding to each observation station based on the sample data, and stacks the comprehensive time features by row to obtain the time feature matrix; S23: Through the spatial feature acquisition module, graph convolution propagation is performed on the spatial directed graph to obtain a spatial feature matrix that integrates the structural information of the spatial directed graph; S24: The temporal feature matrix and the spatial feature matrix are dynamically fused through the cross-attention fusion module to obtain the fused feature representation; S25: Through the prediction output module, predict and obtain the predicted wave heights corresponding to each observation station at one or more future times based on the fusion feature representation; S3: Train the prediction model using the training set to obtain an optimized prediction model, and validate the optimized prediction model based on the model loss function and the validation set to obtain the optimal prediction model; and use the optimal prediction model to predict the wave parameters of the ecological shoreline.
2. The method for predicting ecological shoreline wave parameters based on a spatiotemporal graph neural network according to claim 1, characterized in that, S21 specifically includes the following steps: S211: Acquire wave height sequence data The discrete-time derivatives of wave height sequence data for each observation station are obtained by solving the Euler forward difference method. And the formula for obtaining the discrete-time derivative is: In the formula: This represents the wave height data of observation station i. The corresponding discrete-time derivative; k represents the set forward step size; Δt represents the sampling interval; t represents the time parameter; S212: Obtain the covariance of the observation station samples based on the discrete-time derivative and wave height sequence data, and the formula for obtaining the covariance of the observation station samples is as follows: In the formula: Let represent the covariance between the wave height sequences of observation station i and observation station j; This represents the covariance between the wave height sequence at observation station i and the wave height change rate at observation station j; Let represent the covariance between the wave height sequence of observation station i and its own wave height change rate; Represents the average wave height of observation station i over the entire time period; Represents the time average of wave height at observation station j; T represents the number of time steps. This represents the wave height data of observation station j. The corresponding discrete-time derivative; This represents the covariance between the wave height sequence at observation station j and the rate of change of wave height at observation station i. S213: Calculate and obtain the intensity of directional causal influence between observation stations based on the sample covariance of the observation stations, and the formula for obtaining the intensity of directional causal influence is as follows: In the formula: This indicates the strength of the directional causal effect of observation station j on observation station i; S214: Obtain the time-averaged causal strength based on the intensity of directional causal influence. And based on threshold filtering rules, directed edges between observation stations were identified; The threshold filtering rule: Where τ represents the threshold parameter; If the threshold screening rule is met, and it is confirmed that observation station j has a significant causal influence on observation station i, then a directed edge from observation station j to observation station i is added during the construction of the spatial directed graph; otherwise, no directed edge is added. The adjacency matrix A∈{0,1} is obtained based on the directed edges between each observation station. N×N And A ji ∈A, where N represents the total number of observation stations, A ji Let A represent the decision variable that indicates whether there exists a directed edge from node j (observation station j) to another node i (observation station i). If it exists, then A... ji =1; otherwise A ji =0; and based on the adjacency matrix A, a spatial directed graph of all observation stations is obtained.
3. The method for predicting ecological shoreline wave parameters based on a spatiotemporal graph neural network according to claim 2, characterized in that, S22 specifically includes the following steps: S221: Obtain the model input tensor based on time-series ocean observation data Where T represents the backtracking time window; F represents the input feature dimension of each observation station, which includes at least wind speed, wind direction, water level, and wave height; And based on the model input tensor X, the input vector of observation station i at time t is defined as follows: Then obtain the historical sequence of length T for observation station i. S222: Transfer the historical sequence The data is input into an LSTM network for time encoding to obtain the comprehensive temporal characteristics corresponding to each observation station. Furthermore, the formula for obtaining the comprehensive time features is: In the formula: σ represents the Sigmoid activation function; tanh represents the hyperbolic tangent function; ⊙ represents element-wise multiplication; d' represents the hidden state of the i-th observation at time t; d' represents the LSTM hidden dimension; U i U f U o U c W i W f W o W c b represents the weight parameters to be trained; i ,b f ,b o ,b c Indicates the bias term; This indicates the hidden state at output time step t-1; Represents the hidden state at time t; i t Indicates the input gate; f t Indicates the gate of forgetting; o t Indicates the output gate; Indicates the candidate cell state; c t Indicates the current cell state; S223: Hide the state at time t As a comprehensive time feature, the various comprehensive time features are stacked row-wise to obtain the time feature matrix H. t and 4. The method for predicting ecological shoreline wave parameters based on a spatiotemporal graph neural network according to claim 3, characterized in that, S23 specifically includes the following steps: S231: Based on the adjacency matrix A∈{0,1} in the directed spatial graph. N×N And A ji ∈A, establish the in-degree matrix and out-degree matrix of observation station i; And the in-degree matrix D in,ii With the out-degree matrix D out,ii The formula for establishing is S232: Based on the GCN network, using the adjacency matrix A and the in-degree matrix D... in,ii With the out-degree matrix D out,ii Graph convolution propagation on a spatially directed graph; Furthermore, the expression for graph convolution propagation on a directed graph in space is: In the formula: H (l+1) H represents the graph convolution propagation result of the (l+1)th layer; (l) This represents the graph convolution propagation result of the l-th layer; Indicates transpose; D in D represents in,ii The abbreviation of D; out D represents out,ii The abbreviated form; This represents the trainable parameters of the l-th layer GCN, namely the weighted weights of the input and output edges; d l ,d l+1 These represent the embedding dimensions of the l-th layer and the (l+1)-th layer, respectively. S233: Based on S232, obtain the spatial feature matrix S of the graph structure information in the fused spatial directed graph after L-layer graph convolution propagation. t ,and Where d s Represents the spatial embedding dimension.
5. The method for predicting ecological shoreline wave parameters based on a spatiotemporal graph neural network according to claim 4, characterized in that, The expression for obtaining the fused feature representation in S24 is: Q=H t W Q ,K=S t W K ,V=S t W V In the formula: Each represents a trainable parameter matrix; This represents the feature representation after fusion; d att The attention embedding dimension is represented by Q; the query vector by K; the key vector by V; and the value vector by d. In S25, the expression for predicting the wave height of each observation station at one or more future times is obtained based on the fused feature representation. In the formula: W represents the predicted wave height at each observation station at time t; out ,b out This represents the weights and biases of the linear output layer.
6. The method for predicting ecological shoreline wave parameters based on a spatiotemporal graph neural network according to claim 5, characterized in that, S3 specifically includes the following steps: S31: Train the prediction model using the training set to obtain an optimized prediction model; S32: Based on the model loss function, the optimized prediction model is validated using the validation set to confirm whether the model output of the optimized prediction model has converged. If so, then the optimized prediction model at this time is confirmed to be the optimal prediction model; Otherwise, the model parameter weights of the prediction model are adaptively adjusted and optimized based on the backpropagation method, and step S31 is repeated. S32: Predict wave parameters of ecological shoreline based on the optimal prediction model.
7. The method for predicting ecological shoreline wave parameters based on a spatiotemporal graph neural network according to claim 6, characterized in that, The expression for the model loss function in S32 is: In the formula: This represents the mean squared error loss function; This represents the predicted and acquired wave height value of observation station i at time t; This represents the actual observed wave height value at observation station i at time t.
8. The method for predicting ecological shoreline wave parameters based on a spatiotemporal graph neural network according to claim 7, characterized in that, S1 also includes preprocessing the acquired temporal ocean observation data of the preset ecological coastline marine area, the preprocessing including: S11: For each moment of the time-series ocean observation data, construct a mask matrix M∈{0,1}. N×F Where N represents the number of observation stations; F represents the feature dimension of the ocean observation data; S12: Confirm whether there are any missing data in the time-series ocean observation data; If so, the positions corresponding to the missing data are set to 1 based on the mask matrix M; otherwise, they are set to 0, in order to obtain the time-series ocean observation data to be completed. S13: Based on the interpolation method, perform data filling on the time-series ocean observation data to be completed to obtain complete time-series ocean observation data; and the interpolation method includes, but is not limited to, any one of median interpolation, mean interpolation and linear interpolation.
9. The method for predicting ecological shoreline wave parameters based on a spatiotemporal graph neural network according to claim 8, characterized in that, The true observed wave height value is calculated from the mean square error using the model loss function. The selection criteria are as follows: only real observation data from time-series ocean observation data are selected, not interpolated observation data that is used to fill in missing data.
Citation Information
Patent Citations
GCN-LSTM ship traffic flow prediction method based on attention mechanism
CN114881295A
Space-time multi-source offshore water quality time sequence prediction method of LSTM coupling mechanism model
CN116187210A