Coastal erosion prediction method and system based on adaptive STL decomposition and CNN-LSTM

By combining adaptive STL decomposition with CNN-LSTM, the seasonal window length is dynamically adjusted, solving the problem of inaccurate extraction of seasonal components in traditional methods and achieving high-precision prediction of coastal erosion.

CN121579926APending Publication Date: 2026-02-27SOUTHERN BRANCH OF CHINA COMM CONSTR CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511795551.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-02
Publication Date
2026-02-27

AI Technical Summary

Technical Problem

Traditional methods cannot effectively adapt to dynamic seasonal characteristics in the seasonal analysis of coastline erosion sequences, resulting in inaccurate extraction of seasonal components and affecting the reliability of coastline erosion prediction models.

Method used

An adaptive STL decomposition and CNN-LSTM combined model is adopted. By dynamically adjusting the seasonal window length, the three-dimensional spatiotemporal dataset is decomposed in combination with the adaptive seasonal window length. The CNN-LSTM combined model is then used to predict the elevation value, thereby improving the accuracy of the seasonal components.

Benefits of technology

It enables efficient capture of complex seasonal dynamics, improves the accuracy and robustness of coastal erosion prediction, and enhances the ability to respond to non-stationary seasonal changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121579926A_ABST
    Figure CN121579926A_ABST
Patent Text Reader

Abstract

The invention provides a coastal erosion prediction method and system based on adaptive STL decomposition and CNN-LSTM, and the method comprises the steps: obtaining the elevation scatter data of a coastal zone region in a specified time period, and constructing a three-dimensional spatio-temporal data set according to the elevation scatter data; subsequence data is extracted from the three-dimensional spatiotemporal data set through a specified sliding time window for calculating the window length, a seasonal stability index value is calculated according to the subsequence data, and the seasonal stability index value is converted into a corresponding adaptive seasonal window length according to a preset mapping relation; performing STL decomposition processing on the three-dimensional spatiotemporal data set in combination with the adaptive seasonal window length to obtain a seasonal item sequence, a trend item sequence and a residual item sequence; and performing elevation value prediction on the seasonal term sequence, the trend term sequence and the residual term sequence based on the trained CNN-LSTM combination model to obtain a final coast erosion prediction result. According to the method, the accuracy of coastal zone space-time erosion feature prediction can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of coastal erosion prediction technology, and in particular to a coastal erosion prediction method and system based on adaptive STL decomposition and CNN-LSTM. Background Technology

[0002] Coastal erosion prediction is one of the core topics in coastal engineering, marine geology, and ecological environmental protection. Accurate prediction of coastline changes is crucial for the protection of coastal infrastructure, national spatial planning, and addressing sea-level rise. Time series analysis techniques, especially sequence decomposition methods that can separate trend, seasonal, and residual terms, have become important tools for characterizing and predicting the periodic evolution of coastlines.

[0003] In existing technologies, when performing seasonal analysis on coastline erosion sequences (such as monthly coastline location sequences retrieved from remote sensing images), traditional methods typically rely on fixed-length seasonal windows to extract seasonal components. The length of this window is generally preset to a fixed value (e.g., 12 months) based on prior knowledge (such as the assumption that it is primarily controlled by the annual monsoon cycle). While this method is simple and intuitive, its core drawback lies in its inability to effectively adapt to the inherent dynamic seasonal characteristics of the coastal dynamic environment, such as seasonal cycle drift, seasonal amplitude variations, and sudden disturbances. This makes it difficult for the fixed window to adapt to complex seasonal dynamics, ultimately weakening the accuracy of the extracted seasonal components and significantly affecting the reliability of coastline erosion prediction models that depend on these components. Summary of the Invention

[0004] This invention provides a coastal erosion prediction method and system based on adaptive STL decomposition and CNN-LSTM to address the problems existing in related technologies. The technical solution is as follows: In a first aspect, embodiments of the present invention provide a coastal erosion prediction method based on adaptive STL decomposition and CNN-LSTM, comprising: Obtain elevation scatter data of the coastal zone within a specified time period, and construct a three-dimensional spatiotemporal dataset based on the elevation scatter data; Subsequence data is extracted from the three-dimensional spatiotemporal dataset through a sliding time window of a specified computation window length. Seasonal stability index values ​​are calculated based on the subsequence data, and the seasonal stability index values ​​are converted into the corresponding adaptive seasonal window length according to a preset mapping relationship. By combining the adaptive seasonal window length, the three-dimensional spatiotemporal dataset is decomposed using STL to obtain the seasonal term sequence, the trend term sequence, and the residual term sequence. The trained CNN-LSTM combined model is used to predict elevation values ​​for the seasonal, trend, and residual sequences, respectively, to obtain prediction results for the three components. The final coastal erosion prediction result is then output by combining the prediction results of the three components.

[0005] In one implementation, constructing a three-dimensional spatiotemporal dataset based on elevation scatter data includes: The coastal zone is divided into regular orthogonal grids, resulting in multiple grid cells; An interpolation algorithm is used to smoothly distribute the elevation scatter data to each grid cell to construct a continuous elevation field, resulting in a three-dimensional spatiotemporal dataset with longitude, latitude, and time as dimensions.

[0006] In one implementation, calculating the seasonal stability index value based on subsequence data includes: Obtain the preset calculation window length and the preset seasonal cycle length, and determine the first data window and the second data window. The second data window is composed of the data points corresponding to each data point in the first data window after shifting forward by one seasonal cycle. The covariance value is obtained by summing the products of the deviations of corresponding data points in the first data window and the second data window from their joint mean; where the joint mean is the arithmetic mean obtained by combining all data points in the first data window and the second data window. Calculate the standard deviations of the first data window and the second data window respectively, and then multiply them to obtain the standard deviation product value; Dividing the covariance by the product of the standard deviations yields the seasonal stability index value at the current time point.

[0007] In one implementation, converting the seasonal stability index value into a corresponding adaptive seasonal window length according to a preset mapping relationship includes: Obtain the stability threshold range corresponding to the seasonal stability index value, compare the seasonal stability index value with the stability threshold range, and map the scaling factor based on the comparison result. Obtain the preset window length boundary, and calculate the adaptive seasonal window length within the window length boundary based on the scaling factor using the linear interpolation method.

[0008] In one implementation, STL decomposition of a 3D spatiotemporal dataset incorporating an adaptive seasonal window length includes: Subtracting the initial trend from the original sequence in the three-dimensional spatiotemporal dataset yields the detrended sequence; Based on the adaptive seasonal window length, the detrended sequence is decomposed into multiple periodic subsequences, and each periodic subsequence is smoothed using LOESS. The smoothing results of all periodic subsequences are then recombined according to the original time order to obtain the seasonal term sequence. The trend term and residual term are updated based on the seasonal term sequence to obtain the trend term sequence and the residual term sequence.

[0009] In one implementation, it further includes: Supervised learning samples are constructed using a sliding time window approach. Based on these samples, Bayesian optimization is employed to search for the optimal hyperparameter combination for the CNN-LSTM ensemble model, thereby completing the training of the CNN-LSTM ensemble model.

[0010] In one implementation, it further includes: The performance of the CNN-LSTM combined model is evaluated based on preset evaluation metrics. If the performance evaluation results do not meet the expected standards, the CNN-LSTM combined model is retrained and used for prediction. The preset evaluation metrics include structural similarity index, root mean square error, mean absolute error, and coefficient of determination.

[0011] Secondly, embodiments of the present invention provide a coastal erosion prediction system based on adaptive STL decomposition and CNN-LSTM, comprising: The data processing module is used to acquire elevation scatter data of the coastal zone within a specified time period and construct a three-dimensional spatiotemporal dataset based on the elevation scatter data. The window length adjustment module is used to extract subsequence data from the three-dimensional spatiotemporal dataset through a sliding time window with a specified calculation window length, calculate the seasonal stability index value based on the subsequence data, and convert the seasonal stability index value into the corresponding adaptive seasonal window length according to a preset mapping relationship. The STL decomposition module is used to perform STL decomposition on a 3D spatiotemporal dataset by combining an adaptive seasonal window length, to obtain seasonal term sequences, trend term sequences, and residual term sequences. The prediction module uses a trained CNN-LSTM combined model to predict elevation values ​​for the seasonal, trend, and residual sequences, respectively, to obtain prediction results for the three components. The final coastal erosion prediction result is then output by combining the prediction results of the three components.

[0012] Thirdly, embodiments of the present invention provide an electronic device comprising a memory and a processor. The memory and the processor communicate with each other via an internal connection path. The memory stores instructions, and the processor executes the instructions stored in the memory. When the processor executes the instructions stored in the memory, it causes the processor to perform the method described in any of the above embodiments.

[0013] Fourthly, embodiments of the present invention provide a computer-readable storage medium that stores a computer program, wherein when the computer program is run on a computer, the methods in any of the embodiments described above are executed.

[0014] The advantages or beneficial effects of the above technical solutions include at least the following: This invention quantifies the stability and consistency of the seasonal pattern at the current moment by calculating the seasonal stability index value. Based on a preset mapping relationship, the seasonal stability index value is transformed into an adaptive seasonal window length, realizing real-time dynamic adjustment of the seasonal window length. This not only captures the characteristics of the complete seasonal cycle but also adapts to seasonal fluctuations, achieving an adaptive smoothing effect. Combined with the adaptive seasonal window length, the STL decomposition algorithm is used to decompose the time series into seasonal, trend, and residual terms, which can effectively improve the accuracy of time series decomposition. Furthermore, the elevation value is predicted based on the CNN-LSTM combined model, thereby improving the accuracy of predicting the spatiotemporal erosion characteristics of the coastal zone.

[0015] The above overview is for illustrative purposes only and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments, and features described above, further aspects, embodiments, and features of the invention will become readily apparent from the accompanying drawings and the following detailed description. Attached Figure Description

[0016] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the various drawings denote the same or similar parts or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings depict only some embodiments disclosed in the invention and should not be construed as limiting the scope of the invention.

[0017] Figure 1 This is a schematic flowchart of the coastal erosion prediction method of the present invention; Figure 2 This is a schematic diagram of the training and prediction process of the CNN-LSTM combined model of the present invention; Figure 3 This is a schematic diagram of the CNN-LSTM combined model structure of the present invention; Figure 4 This is a structural block diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0018] In the following description, only certain exemplary embodiments are briefly described. As those skilled in the art will recognize, the described embodiments can be modified in various ways without departing from the spirit or scope of the invention. Therefore, the drawings and description are considered to be exemplary in nature and not restrictive.

[0019] Example 1 This embodiment provides a coastal erosion prediction method based on adaptive STL decomposition and CNN-LSTM. By integrating adaptive STL decomposition and CNN-LSTM neural network algorithms, it can accurately predict the temporal characteristics of coastal zone spatial features. This solves the problem of insufficient adaptability of fixed-period subsequences in traditional STL methods to non-stationary seasonal cycles and seasonal amplitude variations, effectively improves the accuracy of temporal decomposition, enhances the ability to capture complex seasonal dynamics, and thus enhances the accuracy of coastal erosion prediction.

[0020] like Figure 1 As shown, the coastal erosion prediction method based on adaptive STL decomposition and CNN-LSTM specifically includes: Step S1: Obtain elevation scatter data of the coastal zone within a specified time period, and construct a three-dimensional spatiotemporal dataset based on the elevation scatter data.

[0021] like Figure 2 As shown, this embodiment extracts elevation data of the coastal zone region at fixed time intervals (such as monthly or quarterly) within a certain time period. Based on research needs, the coastal zone region is divided into regular orthogonal grids, resulting in multiple grid cells. An interpolation algorithm is then used to smoothly distribute the scattered elevation data to each grid cell, constructing a continuous elevation field. Ultimately, a three-dimensional spatiotemporal dataset with longitude, latitude, and time as dimensions is obtained, used to describe the spatial distribution characteristics of elevation evolution over time within the study area.

[0022] Step S2: Extract subsequence data from the three-dimensional spatiotemporal dataset through a sliding time window of a specified calculation window length, calculate the seasonal stability index value based on the subsequence data, and convert the seasonal stability index value into the corresponding adaptive seasonal window length according to a preset mapping relationship.

[0023] This embodiment addresses the insufficient adaptability of fixed-period subsequences in traditional STL methods to non-stationary seasonal periodicity and amplitude variations. It enhances the responsiveness of seasonal components to non-stationary seasonal changes by dynamically adjusting the length of the seasonal smoothing window, thereby improving the robustness and accuracy of time series decomposition. Specifically: Step S21: Input the time series data of the three-dimensional spatiotemporal dataset, and set the current time point t, the seasonal cycle length P, and the calculation window length MM; in a preferred embodiment, the seasonal cycle length P=12, and the calculation window length NN, whose value range is usually 3 to 5 times the seasonal cycle length P, that is, NN∈[3P, 5P].

[0024] Step S22: Based on the calculation window length and the seasonal cycle length, determine the two data windows used for calculation, namely the first data window and the second data window.

[0025] It should be noted that the data pair formed by the first data window and the second data window is the subsequence data used to calculate seasonal stability. By calculating the local correlation between two specific subsequences, the seasonal stability index is determined.

[0026] The first data window contains data that traces back a continuous historical period from the current point in time (when seasonal stability needs to be assessed). Specifically, the first data window ends at time t-1 before the current time t, and begins at time t-NN, a total of N time points backward from the current time t. This window contains data values ​​from all consecutive time points between the start and end points, expressed as:

[0027] The second data window consists of the data points corresponding to each data point in the first data window shifted forward by one seasonal period P.

[0028] Step S23: Calculate the sum of the products of the deviations of corresponding data points in the first data window and the second data window from their joint mean to obtain the covariance value. The formula is as follows: ; in, The joint mean is calculated by taking the first data window W. current and the second data window W seasonal The arithmetic mean of all data points is calculated.

[0029] Step S24: Calculate the standard deviation of the first data window and the standard deviation of the second data window respectively, and then multiply them to obtain the standard deviation product value. The formula is as follows: ; Step S25: Divide the covariance value by the product of the standard deviations to obtain the seasonal stability index value at the current time point. The formula is as follows: .

[0030] in is the time series being decomposed; t is the current time point in the time series; P is the seasonal cycle length, which refers to the cycle of a complete seasonal cycle in the time series. In this embodiment, the seasonal cycle length is 12; NN is the computation window length, used to estimate the local seasonal stability index, and its value is usually 3 to 5 times the seasonal cycle length. This is the joint mean within the window. In this embodiment, the seasonal stability index is selected from the local autocorrelation coefficient r. sThe aim is to quantify the stability and consistency of seasonal patterns at that moment.

[0031] Subsequently, based on the calculated seasonal stability index value, this index value is converted into a corresponding adaptive seasonal window length through a preset mapping relationship. The seasonal window length used for analysis is dynamically and smoothly adjusted according to the strength of seasonal stability; the higher the stability, the longer the window; the lower the stability, the shorter the window, in order to quickly adapt to changes. Specifically: Step S26: Obtain the stability threshold range corresponding to the seasonal stability index value, compare the seasonal stability index value with the stability threshold range, and obtain the scaling factor based on the comparison result.

[0032] It should be noted that the pre-set stability threshold range specifically includes the upper stability threshold r. max and the lower limit threshold r of stability min To ensure that the seasonal stability index is mapped reasonably, this embodiment sets the upper limit threshold for the seasonal autocorrelation coefficient to 0.95 and the lower limit threshold to 0.4.

[0033] The seasonal stability index value r s With stability upper limit threshold r max Stability lower limit threshold r min The comparison results are as follows: If r s >r max If we consider the seasonality to be extremely stable, and take the maximum length of the corresponding seasonal window, then let r s ′=r max ; If r s <r min If we consider it as having weak or unstable seasonality, and take the minimum window length, then let r s ′=r min ; If r min ≤r s ≤r max Then let r s ′=r s ; Where, r s ′ represents the seasonal stability index value r s The value after truncation.

[0034] The truncated r s The scaling factor Ratio mapped to the interval [0, 1]:

[0035] When r s ′=rmin At that time, Ratio=0; When r s ′=r max At that time, Ratio=1; When r s When the value is between the two, the ratio is also between 0 and 1.

[0036] Step S27: Obtain the preset window length boundary, and calculate the adaptive seasonal window length within the window length boundary based on the linear interpolation method and the scaling factor.

[0037] It should be noted that the window length boundaries include both the minimum and maximum window lengths.

[0038] This embodiment uses linear interpolation to calculate the final adaptive seasonal window length between the minimum and maximum window lengths based on the scaling factor Ratio. The formula is as follows: W(t) = W min +(W max W min )×Ratio; in, The minimum window length is set to 0.5P. The maximum window length is set to 2P to ensure that the seasonal window length can capture the characteristics of the entire seasonal cycle while adapting to seasonal fluctuations, thus achieving an adaptive smoothing effect.

[0039] Step S3: Combine the adaptive seasonal window length to perform STL decomposition on the three-dimensional spatiotemporal dataset to obtain the seasonal term sequence, trend term sequence, and residual term sequence.

[0040] It should be noted that the STL decomposition algorithm includes a core iterative process consisting of an inner loop and an outer loop. The inner loop iterates multiple times to gradually and accurately separate the trend and seasonal components. The inner and outer loops work together to ultimately decompose the time series into three main components: the trend component, the seasonal component, and the residual component.

[0041] The inner loop refers to the process of alternately updating the seasonal and trend components during each iteration. This process is repeated several times to allow the two components to gradually converge, thereby better fitting the original time series. After each round of the inner loop, the seasonal and trend components are updated once each. Round, assuming the time series being decomposed is , length is , The range is 1 to Now the first The cycle within the wheel has ended, and the cycle is now in progress. Internal circulation. At this point, it has passed... The trend and seasonal components, which are iteratively selected and have the same length as the decomposed time series, are respectively denoted as follows: and , The range is 1 to The inner loop steps are as follows: Step S31: From the raw data of the decomposed time series Subtract the current trend term from the middle This yields the detrended sequence: ; Step S32: According to the adaptive seasonal window length W(t), detrended series The process is decomposed into multiple periodic subsequences, and each periodic subsequence is smoothed using LOESS to extract the corresponding seasonal components. This operation is continuously iterated and updated over time, repeating the above calculation-mapping-smoothing process. This allows the seasonal window length to automatically change according to the seasonal characteristics of the current data, achieving a sensitive response to seasonal cycle changes and amplitude fluctuations. This enables it to adapt to seasonal cycle drift, seasonal amplitude changes, and sudden disturbances, improving the accuracy and robustness of the seasonal components. Finally, the multiple periodic subsequences are reconstructed back into the original time series form, that is, the smoothed results of all periodic subsequences are recombined in their original chronological order to obtain the seasonal component sequence. .

[0042] Step S33: For the seasonal item sequence Perform a low-pass filter to retain the slowly changing trend portion, denoted as... ;in, The value range is from 1 to N.

[0043] Step S34: Detrend the periodic subsequence, its representative formula is: ,in, The value range is from 1 to N.

[0044] Detrending the periodic subsequences yields the seasonal terms of each periodic subsequence after removing trend interference. These seasonal terms are then reassembled in their original time order to form a complete and updated seasonal term. .

[0045] Step S35: From the raw data Y v Subtract the updated seasonal term calculated in step S34 from the middle. The deseasonal sequence is obtained, and its expression is: The sequence mainly contains a trend term and a residual term (noise).

[0046] Step S36: Trend Smoothing: Perform LOESS smoothing (locally weighted regression) on the deseasoned series to extract the long-term trend component and obtain the updated trend term. .

[0047] This inner loop process will be repeated many times (i.e., iterated multiple times) until the changes in the trend and seasonal terms are small enough to converge.

[0048] The outer loop consists of the inner loop and robust weights. The robust weights take effect in the next iteration, ensuring that the inner loop's decomposition of the time series is unaffected by outliers and abrupt changes. The outer loop executes... wheel: Step S37: The residual term is passed through R v =Y v S v T v The calculation yielded the result.

[0049] Step S38: Take the absolute value of the obtained residuals, then take the median and multiply it by a fixed coefficient, which can be 6, to obtain the coefficient. Then, divide the absolute value of the residual by the coefficient h and put it into the function. In this process, robust weights are obtained: ; in The function is represented as follows: .

[0050] When calculating LOESS, Multiply by the weight of the corresponding point, that is, use robust weights to further adjust the weights w of adjacent points. i If this point is an outlier, its residual is very large, resulting in a low robustness coefficient. Consequently, after the robustness is multiplied by the adjacent weights, the importance of this point to the regression also decreases, thus eliminating the impact of outliers on the stability of the decomposition.

[0051] It's important to explain that LOESS stands for Locally Weighted Regression: A set of neighboring points is selected around a given point in a time series, and these neighboring points are weighted to perform a local prediction fit. Samples (points) closer to the prediction point have higher weights, while samples (points) farther away have lower weights. A cubic weighting function is typically used to determine the weights. Since the prediction for each point is based on its surrounding neighboring data points, it effectively captures local trends.

[0052] For any time point x0 on any latitude and longitude coordinate in the entire time series, perform the following operation: Selecting neighboring points: Determine the size of a window (bandwidth). We select the h points closest to x0 as a local subset. The bandwidth can be expressed as the proportion of the total samples (e.g., 0.3 means using 30% of the sample points).

[0053] Weighted weighting: Weights are applied to neighboring points, with closer points receiving larger weights. A commonly used method is the cubic weighting function.

[0054] Where x i w is a neighboring point of x0 in the neighborhood. i is the weight of that point, and d is the periodic subsequence with the largest distance in the neighborhood.

[0055] It needs to be explained that a periodic subsequence refers to a series of subsequences with the same relative position extracted by dividing or recombining the original data in a time series according to a specified period length (such as day, week, month, year, etc.).

[0056] Step S4: Based on the trained CNN-LSTM combined model, predict the elevation values ​​of the seasonal term sequence, the trend term sequence, and the residual term sequence respectively to obtain the prediction results of the three components; combine the prediction results of the three components to output the final coastal erosion prediction result.

[0057] This embodiment uses the STL decomposition method to decompose the elevation time series of each spatial point into a seasonal term, a residual term, and a trend term, obtaining three three-dimensional spatiotemporal datasets with longitude, latitude, and time as dimensions for the seasonal term, residual term, and trend term, respectively. All subsequent operations are performed simultaneously on these three datasets. The specific subsequent operations include: Min-Max normalization is applied to the three datasets for seasonality, trend, and residuals respectively. This is a linear transformation of the original data, mapping the resulting values ​​to the range [0 - 1]. The transformation function is as follows: ; in, The original data, It is transformed data. The maximum value of the sample data. This represents the minimum value of the sample data.

[0058] In this embodiment, the CNN-LSTM combined model uses a sliding time window approach to construct supervised learning samples. Specifically, the prediction mode is as follows: using elevation values ​​from n consecutive time steps as input, it predicts the elevation value at the (n+1)th time step. Taking a 12-month time window as an example, the model uses the elevation sequence from January to December 2019 to predict the elevation value for January 2020; then, it uses data from February 2019 to January 2020 to predict the value for February 2020, and so on, gradually constructing the input-output pairs for the entire time series.

[0059] The constructed sample data is divided into training and testing sets according to a preset ratio (e.g., 80% training set and 20% testing set) to ensure the independence of the model in the training and evaluation phases.

[0060] During the training of the CNN-LSTM ensemble model, the model extracts samples from the training set using a sliding window approach, inputs them into the network for forward propagation, and calculates the prediction error using a loss function. Commonly used loss functions include mean squared error (MSE), mean absolute error (MAE), and structural similarity (SSIM) metrics.

[0061] The gradient is then calculated using the backpropagation algorithm, and the network parameters are iteratively updated using an optimizer (such as Adam). Training is performed using minibatch training, and a learning rate scheduler is set to improve convergence speed and model stability.

[0062] Hyperparameters are important factors affecting model training efficiency and final performance, and mainly involve the following types of parameters: network structure parameters: including the number of ConvLSTM layers, the number of hidden units per layer, and the kernel size; training parameters: such as learning rate, batch size, number of training epochs, and dropout rate; optimizer-related parameters: such as momentum and weight decay.

[0063] This embodiment focuses on using the Bayesian optimization method to improve the efficiency and accuracy of parameter search. Bayesian optimization models the hyperparameter space by constructing a surrogate model (usually a Gaussian process) and selects the most promising hyperparameter combination for the next round of evaluation based on previous experimental results. This method balances "exploration" (exploring unknown regions) and "utilization" (utilizing known excellent regions) during the optimization process, and can quickly converge to the optimal solution with a limited computational budget.

[0064] The basic process of Bayesian optimization is as follows: Select a surrogate model (such as Gaussian process GP) to predict the objective function value (such as validation error) corresponding to the hyperparameter combination; construct an acquisition function to determine the next set of parameter evaluation positions; update the surrogate model and repeat the above steps until the set number of iterations is reached or the performance converges.

[0065] After training the CNN-LSTM combined model, a fitted prediction model is obtained. This model can be used to predict on the test set, and its performance can be quantitatively evaluated using metrics such as SSIM, RMSE, MAE, and R². Specifically: The test set data is input into the trained model to generate elevation field prediction results for each time node within the test period. This yields prediction results for three different datasets: seasonal, trend, and residual terms. Adding these three results together gives the true prediction result. The prediction results are then visualized and compared with the corresponding measured (real) elevation fields to intuitively evaluate the model's ability to capture changes in coastal topography.

[0066] In addition, evaluation metrics (such as structural similarity index SSIM, root mean square error RMSE, mean absolute error MAE, coefficient of determination R², etc.) are calculated on the test set to quantitatively evaluate the model's predictive performance. If the evaluation results do not meet the expected standards, the model training phase is returned, the network structure or hyperparameters are adjusted, and training and prediction are carried out again to improve the model's performance.

[0067] It's important to explain SSIM (Structural Similarity Index): The Structural Similarity Index is a metric for evaluating image similarity. It considers brightness, contrast, and structure, and is commonly used in spatial prediction tasks to determine the structural similarity between predicted and ground truth images. Its value ranges from -1 to 1, with values ​​closer to 1 indicating greater similarity.

[0068] In the formula It refers to the average of the real image x and the predicted image y; The variance of the image; Covariance between images; It is a constant, and is generally set to a value used for stability calculations. , where L is the maximum number of pixels in the image.

[0069] RMSE (Root Mean Squared Error): RMSE is the square root of the average of the squared differences between the actual and predicted values. It reflects the standard deviation of the prediction error and is sensitive to outliers. The unit should be consistent with the original data; a smaller value is better.

[0070]

[0071] In the formula, This represents the i-th true value; This represents the i-th predicted value; n is the total number of samples.

[0072] MAE (Mean Absolute Error): MAE is the average of the absolute values ​​of all prediction errors. It measures the overall deviation of the model and is not sensitive to outliers. It is the square of RMSE.

[0073] R 2 (Determination coefficient): R 2 R-squared (coefficient of determination) reflects the model's ability to fit the fluctuations in real data and is an important metric in regression models. Its value range is (-∞, 1). 2 A value approaching 1 indicates strong model interpretability; R 2 <0 indicates that the model performs worse than using the average value directly.

[0074]

[0075] In the formula, This represents the i-th true value. This represents the i-th predicted value. The average of the true values.

[0076] This embodiment arranges the collected multi-year elevation scatter data in a spatiotemporal manner, uses an adaptive STL decomposition algorithm to decompose the time series into seasonal, trend, and residual terms, and then inputs the processed data into a CNN-LSTM combined model for training, resulting in a model that can predict the spatiotemporal erosion characteristics of the coastal zone.

[0077] It needs to be explained that, such as Figure 3 As shown, the CNN-LSTM combined model mainly consists of an input layer, CNN convolutional layers, pooling layers, fully connected layers, LSTM layers, and an output layer. The process of a two-dimensional prediction task based on CNN-LSTM is as follows: ① Standardize the input data and feed it into the CNN convolutional layer, then use wide convolutional kernels to adaptively extract features; ② The extracted features are then subjected to pooling operations in the max pooling layer to reduce data dimensionality while retaining the main feature information; ③Then the dimensionality-reduced feature data is used as the feature input of the LSTM layer to train the neural network and automatically learn sequence features; ④ Backpropagate the training error and update the model parameters layer by layer; ⑤ Use an activation function to predict the input features and output the predicted values.

[0078] Example 2 This embodiment provides a coastal erosion prediction system based on adaptive STL decomposition and CNN-LSTM. The system executes the coastal erosion prediction method based on adaptive STL decomposition and CNN-LSTM as described in Embodiment 1. The system includes: The data processing module is used to acquire elevation scatter data of the coastal zone within a specified time period and construct a three-dimensional spatiotemporal dataset based on the elevation scatter data. The window length adjustment module is used to extract subsequence data from the three-dimensional spatiotemporal dataset through a sliding time window with a specified calculation window length, calculate the seasonal stability index value based on the subsequence data, and convert the seasonal stability index value into the corresponding adaptive seasonal window length according to a preset mapping relationship. The STL decomposition module is used to perform STL decomposition on a 3D spatiotemporal dataset by combining an adaptive seasonal window length, to obtain seasonal term sequences, trend term sequences, and residual term sequences. The prediction module uses a trained CNN-LSTM combined model to predict elevation values ​​for the seasonal, trend, and residual sequences, respectively, to obtain prediction results for the three components. The final coastal erosion prediction result is then output by combining the prediction results of the three components.

[0079] This embodiment proposes a combined prediction system integrating improved STL time series decomposition, convolutional neural networks (CNNs), and long short-term memory networks (LSTMs) to address the nonlinear, periodic, and abrupt changes in the dynamic evolution of coastlines. This significantly improves the accuracy and robustness of coastline prediction. A dynamic adaptive window is added to the traditional STL decomposition method, solving the problem of insufficient adaptability of fixed-period subsequences in traditional STL methods to non-stationary seasonal cycles and seasonal amplitude variations. This system effectively improves the accuracy of time series decomposition, enhances the ability to capture complex seasonal dynamics, effectively removes seasonal, trend, and random disturbance components from time series, and improves the model's ability to identify multi-scale time series features. It strengthens the model's ability to learn spatial features, enabling the mining of spatial correlations and local structural information between coastal areas, and enhances the modeling ability for long-term temporal dependencies, adapting to the delayed response and nonlinear trends in coastline evolution. Through this multi-model fusion strategy, the solution overcomes the limitations of traditional methods, such as dependence on a single coastline type, lack of spatial features, and insufficient trend extraction capabilities. It achieves more refined and reliable predictions of coastline changes with high spatiotemporal resolution and long time series, providing technical support for coastal ecological protection, land use optimization, and disaster prevention and mitigation.

[0080] The functions of each module in this embodiment can be found in the corresponding descriptions in the above methods, and will not be repeated here.

[0081] Example 3 This embodiment provides an electronic device. Figure 4 A structural block diagram of an electronic device according to an embodiment of the present invention is shown. Figure 4 As shown, the electronic device includes a memory 100 and a processor 200. The memory 100 stores a computer program that can run on the processor 200. When the processor 200 executes the computer program, it implements the coastal erosion prediction method based on adaptive STL decomposition and CNN-LSTM in the above embodiments. The number of memories 100 and processors 200 can be one or more.

[0082] The electronic device also includes: The communication interface 300 is used to communicate with external devices and perform data exchange and transmission.

[0083] If the memory 100, processor 200, and communication interface 300 are implemented independently, they can be interconnected via a bus to communicate with each other. This bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into address bus, data bus, control bus, etc.

[0084] Optionally, in a specific implementation, if the memory 100, processor 200, and communication interface 300 are integrated on a single chip, then the memory 100, processor 200, and communication interface 300 can communicate with each other through an internal interface.

[0085] This invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method provided in this invention.

[0086] This invention also provides a chip, which includes a processor for calling and executing instructions stored in a memory, causing a communication device on which the chip is installed to perform the method provided in this invention.

[0087] This invention also provides a chip, including: an input interface, an output interface, a processor, and a memory. The input interface, output interface, processor, and memory are connected through an internal connection path. The processor is used to execute code in the memory. When the code is executed, the processor is used to execute the method provided in this invention.

[0088] It should be understood that the aforementioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. General-purpose processors can be microprocessors or any conventional processor. It is worth noting that the processor can be a processor supporting the Advanced Reduced Instruction Set Computing (RISC) machine (ARM) architecture.

[0089] Further, optionally, the aforementioned memory may include read-only memory and random access memory, and may also include non-volatile random access memory. The memory may be volatile or non-volatile, or may include both. Non-volatile memory may include read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which serves as an external cache. Many forms of RAM are available by way of example, but not limitation. Examples include static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).

[0090] In the above embodiments, implementation can be achieved, in whole or in part, by software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the present invention is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another.

[0091] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of those different embodiments or examples.

[0092] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0093] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various variations or substitutions within the technical scope disclosed in the present invention, and these should all be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A coastal erosion prediction method based on adaptive STL decomposition and CNN-LSTM, characterized in that, include: Obtain elevation scatter data of a coastal zone within a specified time period, and construct a three-dimensional spatiotemporal dataset based on the elevation scatter data; Subsequence data is extracted from the three-dimensional spatiotemporal dataset through a sliding time window of a specified computation window length. Seasonal stability index values ​​are calculated based on the subsequence data, and the seasonal stability index values ​​are converted into corresponding adaptive seasonal window lengths according to a preset mapping relationship. The three-dimensional spatiotemporal dataset is decomposed using an adaptive seasonal window length to obtain seasonal term sequences, trend term sequences, and residual term sequences. Based on the trained CNN-LSTM combined model, elevation values ​​are predicted for the seasonal term sequence, the trend term sequence, and the residual term sequence, respectively, to obtain prediction results for the three components. The final coastal erosion prediction result is output by combining the prediction results of the three components.

2. The coastal erosion prediction method based on adaptive STL decomposition and CNN-LSTM according to claim 1, characterized in that, The construction of the three-dimensional spatiotemporal dataset based on the elevation scatter data includes: The coastal zone is divided into regular orthogonal grids, resulting in multiple grid cells; An interpolation algorithm is used to smoothly distribute the elevation scatter data to each grid cell to construct a continuous elevation field, resulting in the three-dimensional spatiotemporal dataset with longitude, latitude, and time as dimensions.

3. The coastal erosion prediction method based on adaptive STL decomposition and CNN-LSTM according to claim 1, characterized in that, The calculation of the seasonal stability index value based on the subsequence data includes: Obtain the preset calculation window length and the preset seasonal cycle length, and determine the first data window and the second data window, wherein the second data window is composed of the data points corresponding to each data point in the first data window after being shifted forward by one seasonal cycle; The covariance value is obtained by summing the products of the deviations of corresponding data points in the first data window and the second data window from their joint mean; wherein, the joint mean is obtained by combining all data points in the first data window and the second data window to calculate the arithmetic mean; Calculate the standard deviations of the first data window and the second data window respectively, and then multiply them to obtain the standard deviation product value; Dividing the covariance value by the product of the standard deviations yields the seasonal stability index value at the current time point.

4. The coastal erosion prediction method based on adaptive STL decomposition and CNN-LSTM according to claim 1, characterized in that, The step of converting the seasonal stability index value into the corresponding adaptive seasonal window length according to the preset mapping relationship includes: Obtain the stability threshold range corresponding to the seasonal stability index value, compare the seasonal stability index value with the stability threshold range, and map the scaling factor based on the comparison result; Obtain the preset window length boundary, and calculate the adaptive seasonal window length within the window length boundary based on the linear interpolation method and the scaling factor.

5. The coastal erosion prediction method based on adaptive STL decomposition and CNN-LSTM according to claim 1, characterized in that, The STL decomposition process of the three-dimensional spatiotemporal dataset, combined with an adaptive seasonal window length, includes: Subtract the initial trend from the original sequence in the three-dimensional spatiotemporal dataset to obtain the detrended sequence; Based on the adaptive seasonal window length, the detrended sequence is decomposed into multiple periodic subsequences, and each periodic subsequence is smoothed using LOESS. The smoothing results of all periodic subsequences are then recombined according to their original time order to obtain the seasonal term sequence. The trend term and residual term are updated based on the seasonal term sequence to obtain the trend term sequence and the residual term sequence.

6. The coastal erosion prediction method based on adaptive STL decomposition and CNN-LSTM according to claim 1, characterized in that, Also includes: Supervised learning samples are constructed using a sliding time window approach. Based on these supervised learning samples, Bayesian optimization is used to search for the optimal hyperparameter combination for the CNN-LSTM ensemble model in order to complete the training of the CNN-LSTM ensemble model.

7. The coastal erosion prediction method based on adaptive STL decomposition and CNN-LSTM according to claim 1, characterized in that, Also includes: The performance of the CNN-LSTM combined model is evaluated based on the preset evaluation index. If the performance evaluation results do not meet the expected standards, the CNN-LSTM combined model is retrained and re-predicted. The preset evaluation indicators include structural similarity index, root mean square error, mean absolute error, and coefficient of determination.

8. A coastal erosion prediction system based on adaptive STL decomposition and CNN-LSTM, characterized in that, include: The data processing module is used to acquire elevation scatter data of the coastal zone within a specified time period and construct a three-dimensional spatiotemporal dataset based on the elevation scatter data. The window length adjustment module is used to extract subsequence data from the three-dimensional spatiotemporal dataset through a sliding time window with a specified calculation window length, calculate the seasonal stability index value based on the subsequence data, and convert the seasonal stability index value into the corresponding adaptive seasonal window length according to a preset mapping relationship. The STL decomposition module is used to perform STL decomposition on the three-dimensional spatiotemporal dataset in combination with an adaptive seasonal window length to obtain seasonal term sequences, trend term sequences, and residual term sequences. The prediction module predicts the elevation values ​​of the seasonal term sequence, the trend term sequence, and the residual term sequence based on the trained CNN-LSTM combined model, respectively, and obtains the prediction results of the three components. The final coastal erosion prediction result is output by combining the prediction results of the three components.

9. An electronic device, characterized in that, include: A processor and a memory, wherein the memory stores instructions that are loaded and executed by the processor to implement the coastal erosion prediction method based on adaptive STL decomposition and CNN-LSTM as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the coastal erosion prediction method based on adaptive STL decomposition and CNN-LSTM as described in any one of claims 1 to 7.