Developing an Artificial Intelligence-Based Method for Predicting the Trajectory of Surface Drifting Buoys Using a Hybrid Multi-Layer Neural Network Model

: Accurately predicting the long-term trajectory of a surface drifting buoy (SDB) is challenging. This paper proposes a promising solution to the SDB trajectory prediction based on artificial intelligence (AI) technologies. Initially, a scalable mathematical model for trajectory prediction is developed, transforming the challenge of predicting trajectory points into predicting velocities in eastward and northward directions. Subsequently, a four-layer trajectory prediction calculation framework (FLTPCF) is established, outlining a complete workflow for the real-time online training of marine environment data and SDBs’ trajectory prediction. Thirdly, for facilitating accurate long-term trajectory prediction, a hybrid artificial neural network trajectory prediction model, named CNN–BiGRU–Attention, integrates a Convolutional Neural Network (CNN), Bidirectional Gated Recurrent Unit (BiGRU), and Attention mechanism (AM), tuned for spatiotemporal feature extraction and extended time-series reasoning. Extensive experiments, including ablation studies, comparative analyses with state-of-the-art models like BiLSTM and Transformer, evaluations against numerical methods, and adaptability tests, were conducted for justifying the CNN–BiGRU–Attention model. The results highlight the CNN–BiGRU–Attention model’s excellent convergence, accuracy, and generalization capabilities in predicting 24, 48, and 72 h trajectories for SDBs with varying drogue statuses and under different sea conditions. This work has great potential to promote the intelligent degree of marine environmental monitoring.


Introduction
SDB, which is a disposal-type buoy floating on the surface of an ocean, drifting with seawater and collecting a wide range of wind, temperature, humidity, barometric pressure, precipitation, currents, ecology, seawater targets, and other data, plays an important role in the global marine monitoring.National ocean administrations around the world carried out numerous ocean observation programs on SDBs, including the global Argo real-time ocean observation network [1], the Global Drifter Program (GDP) conducted by the National Oceanic and Atmospheric Administration (NOAA) of the United States [2,3], and the Ocean of Things project established by the Defense Advanced Research Projects Agency (DARPA) of the United States [4].These famous drifter programs have proved that SDBs offer a compelling solution for high-density ocean observation in diverse sea areas.The trajectory prediction of SDBs plays an important role not only in the selection of strategically valuable deployment locations to optimize observation efficiency, but also estimating the likelihood and time of reaching their intended destinations.In practice, both the initial deployment and periodic replenishment of SDBs depend on the accurate computation of deployment point position derived from trajectory prediction.However, the movement of SDBs at sea is significantly influenced by marine environmental elements, including the wind, current, and wave fields of the sea surface.The complexity and variability of a marine environment make SDBs' trajectories' prediction very challenging.Artificial intelligence technology such as an artificial neural network (ANN) presented outstanding performance on data mining and reasoning, and produced considerable economic benefits in various fields such as industry, agriculture, engineering, economy, transportation, and science [5].In the field of marine environmental monitoring, dedicated researchers and engineers have been actively exploring AI-driven innovations and applications to address the challenges associated with a fault diagnosis of marine monitoring equipment [6], siting of marine monitoring stations [7,8], a marine environment forecast [9], and numerical prediction [10].The SBD trajectory prediction problem is a classical time-series reasoning problem of a nonlinear and stochastic process.How to utilize AI technologies to achieve SDBs' trajectory prediction has become a significant topic.This paper explores an intelligent solution based on ANNs to predict SDB trajectories, in order to provide a valuable tool to assist in the SDB deployment planning.
The remainder of this paper is organized as follows: Section 2 presents a comparative analysis of domestic and international studies on the prediction of drifting buoy trajectories.In Section 3, a mathematical model is established for predicting buoy trajectories.In Section 4, a data-driven approach and AI algorithms are employed to develop the computational framework for surface drifter trajectory prediction using a hybrid neural network model, which organically integrates CNN, BiGRU, and AM.In Section 5, the convergence and prediction accuracy of the CNN-BiGRU-Attention model are validated through a series of experiments, which are conducted on different types of drifters in different sea regions, along with an evaluation of prediction error and adaptability.Finally, Section 6 provides a summary and outlines prospects, highlighting the primary contributions and innovations of this study.

Related Work
Artificial intelligence techniques, especially ANNs, have the advantage of handling large amounts of nonlinear data, displaying good performance on data fitting and prediction.Especially, in the field of marine environment monitoring, ANNs have proven to be promising methods for solving random-patterned and long time-series prediction problems [11].Typical ANNs including a CNN and recurrent neural network (RNN) provide possibilities for the accurate prediction of long time-series data (such as trajectory prediction) [12].CNN is of the ability to extract both local and global features from contextual data [13].However, in the case of long time-series inference, vanishing gradient and gradient explosion problems arise.To address these issues, a long-term short-term memory network (LSTM), which is an improved RNN, is developed [14].In LSTM, three gating mechanisms-input, forget, and output gates-are designed to control information flow, providing a strong ability to extract contextual features for time-series prediction [15].On this basis, bidirectional LSTM (BiLSTM) is constructed [16], comprising two LSTM layers, which can simultaneously obtain past and future contextual information, enhancing predictive capabilities.However, as the length of the time series increases, the training process of LSTM is very time-consuming and takes a lot of computing resources.To solve this issue, Cho et al. proposed a gate recurrent unit (GRU), which combines the input and forget gates in the LSTM into a single gate, called an update gate [17].Compared with LSTM, GRU has a simpler network structure, achieves results similar to those of LSTM, and speeds up the training process using fewer computing resources.In addition, BiGRU significantly enhances the performance of tasks such as natural language processing by combining two GRU layers [18], one processing the forward sequence and the other handling the backward sequence.However, as the length of the time series increases, the BiGRU network may cause important time-series features to be lost.To overcome this short-age, the AM is involved to enable an ANN model to focus on information relevant to the current moment by tuning weights of calculation factors, capturing long-term dependent relationships [19].Meanwhile, the famous Transformer model is considered the state-ofthe-art large model [20], demonstrating outstanding intelligent reasoning performance in the field of natural language processing.Data-driven ocean numerical models, such as the Regional Ocean Modeling System (ROMS) [21], have implemented the Lagrange particle tracking algorithm to simulate the movement of floating objects.Although these models have achieved notable results, their performance in predicting the trajectories of surface drifting buoys is still uncertain.
The development and maturity of AI technologies have brought great opportunities to explore data-driven intelligent trajectory prediction solutions.AI algorithms for the trajectory prediction of marine targets such as ships, beacons, floating objects at sea, anchored buoys, and self-sinking floating drifting buoys have also made great progress [22,23].Li et al. built a backpropagation (BP) neural network to predict beacon drifting position and built a deep neural network (DNN) to simulate purely data-driven Lagrange drifting for floating objects at sea [24], which achieves good agreement with numerical simulations [25].Sue et al. (2020) adopted the GRU model to predict the trajectory of ships, improving the computational efficiency of prediction while maintaining accuracy compared with LSTM [26].Xu et al. constructed an improved complex-valued neural network that uses latitude and longitude as inputs to predict the drifting position of anchored buoys [27].Fang and Jauregui-Correa designed a fractional step decline model of a radial basis function (RBF) neural network with meteorological data, hydrological data, latitude, and longitude as inputs to predict the position of navigation beacons and obtained prediction results of high accuracy [28].Moreover, in a recent study on trajectory prediction at sea, on one hand, it is found that hybrid multi-layer ANN-based models achieved better performance than a single-layer model [29][30][31].On the other hand, it is necessary to select closely related marine environmental factors as the inputs of ANN-based models, according to the actual physical floating characteristics of maritime targets and marine monitoring equipment.Based on marine environmental variables such as wind, ocean current, and target physical structure attributes as inputs, a LSTM-based deep neural network (LSTM-DNN) was built to improve the drifting trajectory prediction of floating objects at sea [32].With the speed of water flow and wind as inputs, a ResNet-GRU model based on the AM was designed to predict short-term drifting of multi-functional buoys in inland rivers [33].Dagestad and Röhrs found that using current velocity data from high-resolution non-assimilative ocean models to predict drifting of underwater flotsam provided better results than those using satellite-based current velocity [34].Tamtare et al. verified that the current vertical shear impacted on the surface drift predictions [35,36].Durgadoo et al. found that it was very important to consider buoyancy characteristics of drifting objects in simulating floating objects in the ocean [37].The drift trajectory of a buoy is affected by changes in its structure, such as the loss or length of the flags as well [38].The marine environment is extremely complex, and buoys exhibit different drifting trajectory characteristics under different marine environmental conditions, such as vortices and turbulence [39].The shape, mass, and mechanical structure of SDB are different from those of beacons, floating objects, and anchored buoys.ANNs' model urgently needs to be customized for SDB trajectory prediction.
Developing an AI-based method to predict SDB trajectory has many practical applications ranging from SDB deployment site selection and rescue operations to evaluating SDB deployment value and observation efficiency in the field of ocean engineering.However, the accurate prediction of floating trajectories faces the following challenges: (1) Constructing the Mathematical Model-How to construct the mathematical model of an SDB trajectory prediction problem, seamlessly transform the trajectory point prediction problem into the velocity prediction problem, and ensure that both scalar and vector marine environment data can be integrated into the model to participate in trajectory calculation.(2) Learning Spatial-Temporal Characteristics-How to automatically learn spatial-temporal change characteristics of marine environmental factors and the historical trajectory information of SDB to fit structural changes in SDB and gentle, vortex, and turbulent flows.(3) Integrating Neural Networks-How to organically integrate hybrid neural network models (like CNN, GRU, and DNN) and fine-tune hyper-parameters to enhance prediction accuracy of SDB trajectory.

Mechanical Structure of SDB
The SDB is composed of a surface float and a drogue, which are interconnected by a long tether, as depicted in Figure 1.The surface float is equipped with a battery compartment, electronic compartment, and solar panel affixed to its upper surface, to ensure a continuous power supply to the internal equipment.The drogue whose center is positioned 15 m beneath the sea surface is a cylinder of porous canvas structure that can be folded for storage before being transported and laid.In addition, a satellite communication module is installed on top of the metal pole on the float to transfer data on marine environmental parameters to the data center on land.The suspension design of the SDB enables it to remain anchored in the upper ocean layer, drifting with the current, while maintaining high stability and good flow performance of SDB at sea.The mechanical structure of SDB plays a pivotal role in affecting its motion characteristics [40].In practical scenarios, the intricate underwater conditions in the ocean often lead to structural damage in the drifter, with the most prevalent issue being drogue detachment.Furthermore, the complex movements of seawater cause the drifting trajectory to exhibit various patterns such as smooth, spiral, or sawtooth shapes.By analyzing the mechanical structure of SDB, the critical marine environmental factors, including current profile data from 0 m to 30 m depths, wind velocity, geostrophic current, wave height data, and water temperature and salinity, which impact on SDB motion, are selected for the mathematical model of trajectory prediction.(2) Learning Spatial-Temporal Characteristics-How to automatically learn spatial-temporal change characteristics of marine environmental factors and the historical trajectory information of SDB to fit structural changes in SDB and gentle, vortex, and turbulent flows.
(3) Integrating Neural Networks-How to organically integrate hybrid neural network models (like CNN, GRU, and DNN) and fine-tune hyper-parameters to enhance prediction accuracy of SDB trajectory.

Mechanical Structure of SDB
The SDB is composed of a surface float and a drogue, which are interconnected by a long tether, as depicted in Figure 1.The surface float is equipped with a ba ery compartment, electronic compartment, and solar panel affixed to its upper surface, to ensure a continuous power supply to the internal equipment.The drogue whose center is positioned 15 m beneath the sea surface is a cylinder of porous canvas structure that can be folded for storage before being transported and laid.In addition, a satellite communication module is installed on top of the metal pole on the float to transfer data on marine environmental parameters to the data center on land.The suspension design of the SDB enables it to remain anchored in the upper ocean layer, drifting with the current, while maintaining high stability and good flow performance of SDB at sea.The mechanical structure of SDB plays a pivotal role in affecting its motion characteristics [40].In practical scenarios, the intricate underwater conditions in the ocean often lead to structural damage in the drifter, with the most prevalent issue being drogue detachment.Furthermore, the complex movements of seawater cause the drifting trajectory to exhibit various pa erns such as smooth, spiral, or sawtooth shapes.By analyzing the mechanical structure of SDB, the critical marine environmental factors, including current profile data from 0 m to 30 m depths, wind velocity, geostrophic current, wave height data, and water temperature and salinity, which impact on SDB motion, are selected for the mathematical model of trajectory prediction.

Modelling SDB Trajectory Prediction Problem
Trajectory is defined as a sequence of coordinate points comprising the latitude and longitude of a drifting buoy in continuous time.The objective of SDB trajectory prediction is to forecast the coordinates of future position points based on the marine environmental data and its own historical trajectory sequence.The trajectory of the SDB i is represented by Path i , as shown in Equation (1).The marine environmental data sequence at the corresponding trajectory points is represented by E i , as expressed in Equation (3).The goal of the SDB i trajectory prediction is to predict the future trajectory sequence Path H f uture (Equation ( 7)) of the buoy in H time steps, according to the marine environment data E L i (Equation ( 5)), and of buoy historical trajectory Path L i (Equation ( 6)) in the past L time steps.
where n represents the number of time steps; m represents the number of marine environment elements; L denotes the number of historical point-in-time elements; H denotes the number of predicted time steps; and t j represents the jth timestamp.Each trajectory point, denoted as p i,j , comprises a pair of longitude and latitude coordinates, indicating the geographic coordinates of the ith buoy at the jth timestamp.The symbol e(p i,j ) representing marine environmental feature data at location p i,j and timestamp t j is an m-dimensional variable encompassing geostrophic currents, winds, waves, temperature, salinity, and other marine environmental data, which can be represented as se(p i,j ) k , standing for the kth marine environment feature at location p i,j and timestamp t j .The selection of specific marine environment features depends on the prevailing circumstances.The movement of the SDB is characterized by irregular motion in seawater with a non-smooth velocity.This motion velocity is integrated over time to generate drifting trajectory.Essentially, a change in the trajectory point position is the result of a change in velocity.Consequently, the problem of predicting SDB trajectory can be reformulated as a velocity prediction problem, to simplify and align more closely with the physical characteristics of SDB motion, the movement of sea water, and the changes in sea surface wind fields.
So, the eastward and northward velocities prediction model for SDB is established by improving Equations ( 1)-( 7) as follows: Firstly, the velocity of the SDB i is decomposed into two separate components, eastward and northward velocities, denoted as U buoy i and V buoy i , respectively, which are represented as follows: Secondly, vector environmental elements such as winds and currents within the marine environmental data series E i (as depicted in Equation ( 3)), at the trajectory point of buoy i, also undergo a decomposition process into eastward and northward velocities.In contrast, scalar environmental elements like wave heights, water temperatures, and salinities remain unaltered.Consequently, the E i in Equation ( 3) is partitioned into E u i and E v i , designated as u(p i,j ) = (u(p i,j ) 1 , u(p i,j ) 2 , . . ., u(p i,j ) k , se(p i,j ) 1 , se(p i,j ) 2 , . . ., se(p i,j ) g )(k v(p i,j ) = (v(p i,j ) 1 , v(p i,j ) 2 , . . ., v(p i,j ) k , se(p i,j ) 1 , se(p i,j ) 2 , . . ., se(p i,j ) g )(k Here, n represents the number of timestamps, and t j denotes the timestamp; u(p i,j ) k corresponds to the eastward velocity component of a vector marine environmental element at point p i,j and timestamp t j , with k indicating the total number of vector marine environmental elements; se(p i,j ) g stands for a scalar marine environmental element at point p i,j and timestamp t j ; and g represents the total number of scalar feature elements.The sum of k and g equals m as defined in Equation (4).Finally, v(p i,j ) k represents the northward velocity component. Hence

Transformation between SDB Latitude and Longitude Positions and Drifting Velocity
In accordance with the trajectory prediction model outlined in Section 3.2, it is essential to transform the latitude and longitude of the SDB trajectory points into speed and then separate this into eastward and northward velocities.These historical velocities are used to compute the trajectory prediction in Section 4. For an error analysis and visualization, the predicted eastward and northward velocities of the SDB are integrated over time to calculate the latitude and longitude coordinates of the trajectory points, which are used to generate the travel distance.
(1) Calculating eastward and northward velocities from latitude and longitude coordinates Calculating the SDB drifting speed using the coordinates of latitude and longitude, which are obtained from the GPS positioning module, involves several steps.First, the distance d between the latitude and longitude coordinates of consecutive trajectory points at two adjacent timestamps is computed using Equation ( 14); subsequently, this drift distance is divided by the time interval between the two consecutive timestamps (denoted as ∆t) to determine the buoy drifting speed.Finally, the drifting speed s (Equation ( 15)) is decomposed as in Figure 2 into eastward speed u buoy and northward d rift speed v buoy according to Equations ( 16) and (17).
Here, d is measured in meters; r denotes the radius of the Earth; (lat1,lon1) correspond to the latitude and longitude coordinates of the first point; (lat2,lon2) refer to the latitude and longitude coordinates of the second point; and θ represents the azimuthal angle of (lat2,lon2) with respect to (lat1,lon1), which is calculated by spherical coordinates' calculation formulas [41].
Here, d is measured in meters; denotes the radius of the Earth; (lat1,lon1) correspond to the latitude and longitude coordinates of the first point; (lat2,lon2) refer to the latitude and longitude coordinates of the second point; and θ represents the azimuthal angle of (lat2,lon2) with respect to (lat1,lon1), which is calculated by spherical coordinates' calculation formulas [41].
(2) Calculating coordinates of drifter trajectory points from eastward and northward velocities First, the magnitude speed (|s|) and direction (θ) of the buoy drifting speed can be inverted based on the eastward velocity ( buoy i U ) and northward velocity ( buoy i V ) of the buoy using the vector synthesis in Equations ( 18) and (19), respectively.Subsequently, the drifting distance (d) is computed by performing a fourth-order Runge-Ku a time integration on | | over time [42].Finally, the coordinates (lat2,lon2) of the end point in time, as determined by Equations ( 20)-( 22), provide the starting coordinates (lat1,lon1) and drifting distance (d).
buoy buoy (2) Calculating coordinates of drifter trajectory points from eastward and northward velocities First, the magnitude speed (|s|) and direction (θ) of the buoy drifting speed can be inverted based on the eastward velocity (U buoy i ) and northward velocity (V buoy i ) of the buoy using the vector synthesis in Equations ( 18) and ( 19), respectively.Subsequently, the drifting distance (d) is computed by performing a fourth-order Runge-Kutta time integration on |s| over time [42].Finally, the coordinates (lat2,lon2) of the end point in time, as determined by Equations ( 20)-( 22), provide the starting coordinates (lat1,lon1) and drifting distance (d). |s| In this context, rl signifies the radius of the latitudinal tangent plane; r denotes the radius of the Earth; and θ indicates the direction of the buoy drifting.

Evaluation Metrics of Trajectory Prediction Errors
The gap between the predicted trajectory and the actual trajectory is assessed using two metrics, distance error and angular error, as shown in Figure 3.The distance error, represented by d i , refers to the separation between a real trajectory point and its corresponding predicted trajectory point at a specific timestamp.The average of all distances within the H time steps is represented by D error , which is calculated using Equation ( 23).The angular error a i illustrated in Figure 3 (∠AOB) is the angle formed between the line connecting the actual trajectory point and the initial position at a specific time and the line connecting the predicted trajectory point and the initial position.The average of all these angles within the H time steps is denoted as A error .The angular error is calculated using Equation (24).The trajectory prediction error over a given period is calculated using D error and A error . 1 1

Computational Modeling Using Hybrid ANNs for Trajectory Prediction of SDB
The FLTPCF and the hybrid artificial neural network trajectory prediction model CNN-BiGRU-A ention are established to solve the SDB trajectory prediction mathematical model defined in Section 3. The FLTPCF provides a complete workflow to train the MED online in real time and predict drifter trajectories.The CNN-BiGRU-A ention integrates CNN, BiGRU, and AM and is tuned for spatiotemporal feature extraction and long time-series reasoning to predict SDB trajectories based on the related marine environmental data.

Four-Layer Trajectory Prediction Computational Framework
The four-layer trajectory prediction computational framework for SDB is illustrated in Figure 4, containing the data acquisition layer, the data preprocessing layer, the intelligent prediction computation layer, and the data postprocessing layer.
 The first layer is the data acquisition layer.

Computational Modeling Using Hybrid ANNs for Trajectory Prediction of SDB
The FLTPCF and the hybrid artificial neural network trajectory prediction model CNN-BiGRU-Attention are established to solve the SDB trajectory prediction mathematical model defined in Section 3. The FLTPCF provides a complete workflow to train the MED online in real time and predict drifter trajectories.The CNN-BiGRU-Attention integrates CNN, BiGRU, and AM and is tuned for spatiotemporal feature extraction and long time-series reasoning to predict SDB trajectories based on the related marine environmental data.

Four-Layer Trajectory Prediction Computational Framework
The four-layer trajectory prediction computational framework for SDB is illustrated in Figure 4, containing the data acquisition layer, the data preprocessing layer, the intelligent prediction computation layer, and the data postprocessing layer.
■ The first layer is the data acquisition layer.
The data acquisition layer is responsible for the automatic retrieval of real-time marine environment and drifting buoy data.Marine environment data encompass parameters such as geostrophic currents, wave heights, surface currents, profile currents, and sea surface heights within specific spatial and temporal ranges.The data are collected in real time from worldwide operational research institutions, including the National Oceanic and Atmospheric Administration (NOAA) of the U.S., the U.S. National Centers for Environmental Prediction (NCEP), and the Center for Ocean-Atmospheric Prediction Studies (COAPS) of the U.S. Specifically, drifting buoy trajectory and status data with the same spatial and temporal scope as the marine environment data are automatically acquired from the Global Drifter Buoy Program (GDP) data center.Continuous updates and data supplementation are also performed.
■ The second layer is the data preprocessing layer.
The data preprocessing layer is responsible for refining the raw data collected in the first layer and executing data preprocessing tasks including addressing missing data, upsampling, spatial interpolation, spatiotemporal alignment, and normalization calculation.The latitude and longitude coordinates of the historical trajectory points of SDBs are processed to calculate the eastward and northward velocities according to the procedures described in Section 3.3.The spatiotemporal alignment and data integration of eastward and northward velocities of SDB are conducted for the marine environmental data to yield the input dataset represented by Equations ( 12) and ( 13) in Section 3.2.Then, each feature dimension of the input dataset is normalized using the maximum-minimum value normalization method, which standardizes the attributes to a range of [0, 1], facilitating faster convergence of the hybrid ANN-based trajectory prediction model to obtain optimal solutions and enhance learning accuracy.For each SDB, two normalized feature matrices with (n, m) shapes are generated, respectively, for eastward and northward components.Here, n stands for the number of timestamps and m stands for the number of input data dimensions.

Hybrid Artificial Neural Network Trajectory Prediction Model
In this section, by fusing CNN, BiGRU, and AM, a hybrid artificial neural network trajectory prediction model, CNN-BiGRU-A ention, is developed to autonomously learn the weight coefficients of input a ributes, which are composed of marine environment data and historical eastward and northward velocities of SDB, to achieve accurate predictions of eastward and northward velocities of long time series of SDB.The structural overview of the CNN-BiGRU-A ention is depicted in Figure 5, encompassing the input layer, CNN layer, BiGRU layer, AM layer, fla en layer, fully connected layers, and output layer.■ The third layer is the intelligent prediction computation layer.
The primary role of the intelligent prediction computation layer is to integrate machine learning techniques and algorithms, including deep learning, time-series prediction, and AM, to mine the spatial and temporal distribution characteristics of marine environmental data and predict the SDB drifting speed and trajectory.In the third layer, a hybrid artificial neural network trajectory prediction model, CNN-BiGRU-Attention, is established by integrating CNN, BiGRU, and AM.The working mechanism of the CNN-BiGRU-Attention model will be elaborated on in detail in Section 4.2.The two feature matrices with the shape of (n, m), generated in the second layer, are injected into the CNN-BiGRU-Attention model for iterative training, and the resulting model parameters are stored in a dedicated model file.This process is repeated, yielding the predicted sequences for eastward and northward velocities through a large number of iterations.
■ The fourth layer is the data postprocessing layer.
The data postprocessing layer plays a vital role in processing the predicted sequences generated by the CNN-BiGRU-Attention.In the fourth layer, inverse normalization is executed using the maximum-minimum normalization method to derive the actual eastward and northward velocities of SDB generated in the third layer.Subsequently, the drifting velocity and direction angle of SDB are calculated using Equations ( 18) and ( 19) in Section 3.3.A sequence of trajectory points comprising the latitude and longitude coordinates are calculated using the Earth sphere calculations elucidated by Equations ( 20)-( 22) in Section 3.3.Finally, the results of the trajectory prediction are stored for visualization and other pertinent applications.

Hybrid Artificial Neural Network Trajectory Prediction Model
In this section, by fusing CNN, BiGRU, and AM, a hybrid artificial neural network trajectory prediction model, CNN-BiGRU-Attention, is developed to autonomously learn the weight coefficients of input attributes, which are composed of marine environment data and historical eastward and northward velocities of SDB, to achieve accurate predictions of eastward and northward velocities of long time series of SDB.The structural overview of the CNN-BiGRU-Attention is depicted in Figure 5, encompassing the input layer, CNN layer, BiGRU layer, AM layer, flatten layer, fully connected layers, and output layer.In the CNN-BiGRU-Attention, one-dimensional (1-D) CNN computation is customized to extract temporal and multifactor features of marine environment data, using BiGRU computation to execute the reasoning of lengthy time-series features and AM computation to enable trajectory prediction focusing on critical features.To mitigate overfitting, a specific proportion of neuron dropouts was implemented between the layers.
In conjunction with the structure described in Figure 5, the function and implementation of each layer in the CNN-BiGRU-Attention model are explained as follows: Firstly, the initial hyper-parameters, including the learning rate (η), the number of iteration rounds (epoch), the batch size (b), the chosen loss function, the time step (L), the size of the convolutional kernel (c), and the number of convolutional kernels (f ), are set in the input layer.Normalized marine environmental data along with SDB historical eastward and northward velocities are organized as attributes formatted according to Equations (12) and (13).The corresponding eastward and northward velocities of the SDB in the next time point serve as the sample labels.This arrangement creates an input layer, which contains training samples in the shape of (n, m).To facilitate the neural network gradient descent calculation within each layer, the training samples are divided into smaller batches of the size b and the dimension m.Each batch has a shape of (b, L, m), as marked in Figure 5.There are ((n/b) + 1) small batches in total.Such a small batch-wise partitioning strategy is employed in the CNN-BiGRU-Attention model to facilitate efficient training.
Secondly, each batch sample is then injected into the constructed CNN layer for training.In the CNN layer, f convolution kernels are utilized to perform one-dimensional convolution calculations for each batch along the temporal dimension to capture the local features of both the marine environmental feature data and buoy drifting velocities.The ReLU function is adopted as the activation function for the CNN layer to better capture the nonlinear relationships among the vast oceanic datasets.The feature data are extracted by each of the f convolution kernels, generating a three-dimensional feature matrix in the shape of (b, L, f ).This transformation augments the dimensionality and feature of the original data, which is conducive to integrating data features from the temporal and vertical profile dimensions.This approach can effectively capture the intricate correlations between marine environmental elements, providing a richer time-series feature array for the BiGRU layer.
Subsequently, to achieve long time-series intelligent inference, a three-dimensional feature matrix in the shape of (b, L, f ) of each batch is injected into the BiGRU neural network framed in the red rectangular box in Figure 5.The BiGRU comprises two GRU layers that train independently on both the forward and reverse sequences of the same batch data, simultaneously capturing the temporal features of marine environmental data and SDB drifting velocities from both past and future directions.Each GRU layer is configured using g GRU neural units.At each time step, each neural unit in the GRU performs gating operations to process the input data, resulting in the generation of memory states and outputs.The g GRU neural units collectively contribute to the output of a single-layer GRU after feature extraction across all time steps.The outputs from both the forward and reverse GRUs are concatenated to yield the overall output of the entire BiGRU layer.To mitigate the risk of overfitting, a dropout layer is positioned following the BiGRU layer.In the CNN-BiGRU-A ention, one-dimensional (1-D) CNN computation is customized to extract temporal and multifactor features of marine environment data, using BiGRU computation to execute the reasoning of lengthy time-series features and AM computation to enable trajectory prediction focusing on critical features.To mitigate overfi ing, a specific proportion of neuron dropouts was implemented between the layers.In conjunction with the structure described in Figure 5, the function and implementation of each layer in the CNN-BiGRU-A ention model are explained as follows: Firstly, the initial hyper-parameters, including the learning rate (η), the number of iteration rounds (epoch), the batch size (b), the chosen loss function, the time step (L), the size of the convolutional kernel (c), and the number of convolutional kernels (f), are set in the input layer.Normalized marine environmental data along with SDB historical eastward and northward velocities are organized as a ributes forma ed according to Equations ( 12) and ( 13).The corresponding eastward and northward velocities of the SDB in the next time point serve as the sample labels.This arrangement creates an input layer, which contains training samples in the shape of (n, m).To facilitate the neural network Following the inference of time-series features by BiGRU, the AM layer further extracts crucial data features, which allows the CNN-BiGRU-Attention model to concentrate on key factors that affect the buoy drifting motion while reducing attention to non-essential factors in order to save computing resources.The AM layer shown by the orange box in Figure 5 works as follows: Firstly, the AM utilizes a fully connected layer to compute the attention scores for each time step within the output of the BiGRU according to Equation (25).These scores are employed to gauge the significance of different segments of the input data within a current context.Subsequently, the computed attention scores are transformed using the Softmax function, converting them into a probability distribution such that the sum of all weight coefficients equals 1, as demonstrated in Equation (26).Finally, the resulting probability distribution is multiplied by the output of BiGRU to obtain a weighted feature representation, thereby forming the output of the AM according to Equation (27).
In the equations, h t represents the input feature; w h corresponds to the weight coefficient matrix of the AM; b h represents the bias of the AM; a t signifies the weight associated with feature h t ; and v represents the attention weight.
Finally, to streamline the AM output into the fully connected layer as input, a flattened layer is added after the attention layer.This layer serves to reduce the dimensionality of the data.At this stage, the features of each batch are no longer segregated by a specific time step (L), but instead organized into a continuous one-dimensional vector, producing an output in the shape of (b, 2*L* g GRU ), which is directly injected into the fully connected layer.The fully connected layer merges the features of each batch to generate the final output through nonlinear mapping and weight learning.
To ensure computational efficiency without compromising model accuracy, during the model training process, original data are divided into smaller batches, and a round-robin training approach is utilized within these small batches.Finally, the SDB eastward and northward velocities are predicted and the trained model, which contains a mass of weight coefficients, is stored in the files.

Evaluation Metrics for Trajectory Prediction Model Performance
In this study, the root mean square error (RMSE), mean absolute error (MAE), and coefficient of determination (R 2 ) are employed as the performance evaluation metrics.RMSE, defined in Equation ( 28), computes the average of the squared errors between the true and predicted values, followed by the square root.A smaller RMSE signifies a closer alignment between the model predictions and actual observed values.The MAE calculated using Equation (29) represents the average of the absolute errors between the true and predicted values.A smaller MAE indicates a closer match between the model predictions and actual observed values.R 2 expressed in Equation ( 30) ranges from 0 to 1 and measures the proportion of variance between the predicted and true values of the model obtained from the formula.A value of R 2 closer to one indicates a better fit of the model to the data.R 2 is a widely used indicator in regression models [43].
where m represents the number of values; y i signifies the ith true value; y i denotes the ith predicted value; and y i represents the average of the true values.

Experimental Validation and Result Analysis
In this section, a series of experiments, including ablation studies, comparative analyses with state-of-the-art models like BiLSTM and Transformer, evaluations against numerical methods, and adaptability tests, are conducted on marine environment data and trajectory data of SDBs with different mechanical structures in a sea area of different states to verify the outstanding performance of the CNN-BiGRU-Attention model in terms of convergence, accuracy, generalization capability, and prediction errors.The SDBs with and without a drogue are selected from the GDP, and the sea areas where the experimental SDBs are located contain three kinds, including gentle, vortex, and turbulent flow sea areas.

Experimental Data
The experimental dataset utilized in this study encompasses marine environmental data, including sea surface height, waves, surface water temperature, surface current, profile current, and latitude and longitude data of SDB trajectory points.Marine environmental data were derived from the HYCOM model provided by the Center for Ocean-Atmospheric Prediction Studies (COAPS) via the website https://www.hycom.orgaccessed on 7 April 2023.The spatial scope of the marine environmental data extended from 14 • N to 50 • N and from 146 • E to 177 • E, with a spatial resolution of 0.08 • × 0.04 • (0.08 • in longitude and 0.04 • in latitude).The temporal scope of the dataset spans from 0:00 on 1 July 2019 to 21:00 on 30 October 2022, with a temporal resolution of 3 h.The vertical profile of the current data contains 11 layers, incorporating eastward and northward velocities at water depths ranging from 0 to 30 m. Geostrophic current data were derived via the gradient computation of the sea surface height data.The wave data consisted of reanalyzed data sourced from NCEP, featuring temporal and spatial resolutions of 1 h and 0.5 • , respectively.Drifting buoy data were obtained from the GDP via the NOAA website (https://www.aoml.noaa.gov/phod/gdp/index.php) accessed on 13 April 2023.The SDBs utilized in our experiments were with WMO numbers including 2101598, 2101662, 5201720, and 4601780.The temporal resolution of the SDBs' trajectory data was 1 h, and the temporal spans and drifting areas of the buoy data are detailed in Table 1 and Figure 6.These buoys belong to the surface velocity profiler (SVP) and surface velocity profiler barometer (SVPB) types, which are the most common types employed in the GDP system.They are equipped to measure the ocean surface temperature, ocean surface wind direction and speed, and other parameters, and their drifting trajectories are determined using GPS.Each entry within the experimental dataset comprises 1-dimensional geostrophic current data, 11-layer current data, 1-D wave data, 1-D surface water temperature data, and 1-D historical drifting velocity of the drifting buoys, totaling 15 feature attribute dimensions.By leveraging the Pearson correlation calculation method, we ascertained that the correlation coefficients between each feature attribute and the drift velocity of the drifting buoys all exceeded 0.7 and ranged from 0.7 to 0.8.This reaffirms the robust correlation between the selected marine environmental data and buoy drift velocity, thus validating that our data selection is reasonable.The spatial distributions of all SDBs' trajectories are illustrated in Figure 6.

Performance Analysis of the CNN-BiGRU-Attention Model
The experiments conducted in this section involve a surface drifting buoy with the WMO number of 2101598.The CNN-BiGRU-Attention model uses features of 15 dimensions as inputs, as detailed in Section 5.1.The output of the model is the predicted drifting velocity at a future time point.The input dataset is partitioned, with 80% of the dataset allocated for the training set and 20% of the dataset designated as the test set to assess the performance of the trained model.The selection of model hyper-parameters is a critical factor that influences model performance.To determine the optimal hyper-parameters of the CNN-BiGRU-Attention model, a comprehensive series of comparative experiments are conducted and a set of hyper-parameters that would yield the most favorable prediction results is presented in Table 2.According to the hyper-parameters in Table 2, the time step is set to 16, which indicates that the input data from 16 historical moments are selected at each time step to predict the drifting velocity of the SDB at a future moment.The training data are trained 100 times for both the eastward and northward directions.The training and validation loss values for these epochs are shown in Figure 7.As depicted in Figure 7, it is evident that as the training progress goes on, the loss value gradually decreases.In both the training and validation sets, the loss converged to close to zero after 100 epochs.Figures 8 and 9 demonstrate the effectiveness of the final trained model on the test set by comparing true and predicted eastward drifting velocities for Drifter No. 2101598.For both eastward velocity and northward velocity, the predicted value is in good agreement with the true value.The above results show that the CNN-BiGRU-Attention model has excellent convergence and prediction accuracy under the hyper-parameters described in Table 2.
values for these epochs are shown in Figure 7.As depicted in Figure 7, it is evident that as the training progress goes on, the loss value gradually decreases.In both the training and validation sets, the loss converged to close to zero after 100 epochs.Figures 8 and 9 demonstrate the effectiveness of the final trained model on the test set by comparing true and predicted eastward drifting velocities for Drifter No. 2101598.For both eastward velocity and northward velocity, the predicted value is in good agreement with the true value.The above results show that the CNN-BiGRU-A ention model has excellent convergence and prediction accuracy under the hyper-parameters described in Table 20.

Ablation Study on the CNN-BiGRU-A ention Model
In this section, an ablation study is conducted to assess the effectiveness of each component within the CNN-BiGRU-A ention model, thereby confirming the essential nature of integrating CNN, BiGRU, and AM.Firstly, CNN, BiGRU, and CNN-BiGRU models are employed to predict the trajectory of buoy No. 2101598 in the test set, utilizing the same hyper-parameters outlined in Table 2.The prediction results of these three models are then compared with those of the CNN-BiGRU-A ention model.Figure 10a

Ablation Study on the CNN-BiGRU-A ention Model
In this section, an ablation study is conducted to assess the effectiveness of each component within the CNN-BiGRU-A ention model, thereby confirming the essential nature of integrating CNN, BiGRU, and AM.Firstly, CNN, BiGRU, and CNN-BiGRU models are employed to predict the trajectory of buoy No. 2101598 in the test set, utilizing the same hyper-parameters outlined in Table 2.The prediction results of these three models are then compared with those of the CNN-BiGRU-A ention model.Figure 10a,b show the comparison of R 2 , RMSE, and MAE of the four models for the eastward and northward

Ablation Study on the CNN-BiGRU-Attention Model
In this section, an ablation study is conducted to assess the effectiveness of each component within the CNN-BiGRU-Attention model, thereby confirming the essential nature of integrating CNN, BiGRU, and AM.Firstly, CNN, BiGRU, and CNN-BiGRU models are employed to predict the trajectory of buoy No. 2101598 in the test set, utilizing the same hyper-parameters outlined in Table 2.The prediction results of these three models are then compared with those of the CNN-BiGRU-Attention model.Figure 10a,b show the comparison of R 2 , RMSE, and MAE of the four models for the eastward and northward velocity prediction.It can be observed that the R 2 , RMSE, and MAE metrics (represented by blue bars in Figure 10) of the CNN-BiGRU model, which combines the CNN and BiGRU, are superior to those of the standalone CNN and the single BiGRU.This demonstrates that the integration of CNN and BiGRU is both necessary and effective.Further, the CNN-BiGRU-Attention model, which adds the AM to the CNN-BiGRU model, shows improved R 2 , RMSE, and MAE metrics (represented by brown bars in Figure 10) compared to the CNN-BiGRU model alone.This indicates that the prediction performance is significantly enhanced with the inclusion of the AM.These experiments conclusively demonstrate that the combination of CNN, BiGRU, and Attention is not only effective but also offers substantial advantages in terms of R 2 , RMSE, and MAE metrics.Additionally, the 24, 48, and 72 h predicted trajectories with CNN, BiGRU, CNN-BiGRU, and CNN-BiGRU-A ention models are visualized and displayed in Figure 11.The buoy trajectories predicted by the CNN-BiGRU-A ention model (represented by red lines in Figure 11) are the closest to the actual trajectories of the buoy (depicted by black lines in Figure 11).As the prediction duration increases, the CNN-BiGRU-A ention model exhibits the smallest deviation from the real trajectory.Moreover, the trend and direction of the predicted trajectories by the CNN-BiGRU-A ention model, as indicated by the bending changes in the trajectory lines, are largely consistent with the real trajectory.This consistency is maintained even as the prediction duration extends.In contrast, the CNN, BiGRU, and CNN-BiGRU models do not demonstrate these advantages.Additionally, the 24, 48, and 72 h predicted trajectories with CNN, BiGRU, CNN-BiGRU, and CNN-BiGRU-Attention models are visualized and displayed in Figure 11.The buoy trajectories predicted by the CNN-BiGRU-Attention model (represented by red lines in Figure 11) are the closest to the actual trajectories of the buoy (depicted by black lines in Figure 11).As the prediction duration increases, the CNN-BiGRU-Attention model exhibits the smallest deviation from the real trajectory.Moreover, the trend and direction of the predicted trajectories by the CNN-BiGRU-Attention model, as indicated by the bending changes in the trajectory lines, are largely consistent with the real trajectory.This consistency is maintained even as the prediction duration extends.In contrast, the CNN, BiGRU, and CNN-BiGRU models do not demonstrate these advantages.
The distance and angle errors are calculated according to Section 3.4 and are presented in Figures 12 and 13, respectively.The CNN-BiGRU-Attention model exhibits distance errors (shown as brown bars in Figure 12) of 1.831 km, 1.732 km, and 1.996 km for the 24, 48, and 72 h trajectory predictions, respectively.Similarly, its angle errors (brown bars in Figure 13) are 3.556 • , 2.427 • , and 2.234 • for the same respective time duration.All distance errors are under 2 km and all angle errors are below 4 • , which are smaller than those recorded for the standalone CNN, BiGRU, and CNN-BiGRU models.
model exhibits the smallest deviation from the real trajectory.Moreover, the trend and direction of the predicted trajectories by the CNN-BiGRU-A ention model, as indicated by the bending changes in the trajectory lines, are largely consistent with the real trajectory.This consistency is maintained even as the prediction duration extends.In contrast, the CNN, BiGRU, and CNN-BiGRU models do not demonstrate these advantages.The distance and angle errors are calculated according to Section 3.4 a sented in Figure 12 and Figure 13, respectively.The CNN-BiGRU-A ention m its distance errors (shown as brown bars in Figure 12) of 1.831 km, 1.732 km, an for the 24, 48, and 72 h trajectory predictions, respectively.Similarly, its a (brown bars in Figure 13) are 3.556°, 2.427°, and 2.234° for the same respective tion.All distance errors are under 2 km and all angle errors are below 4°, which than those recorded for the standalone CNN, BiGRU, and CNN-BiGRU mode   In summary, the results of ablation experiments indicate that the CNN-BiGRU-Attention model offers significant advantages in terms of R 2 , RMSE, MAE, distance error and angle error, and visualization results compared to the CNN, BiGRU, and CNN-BiGRU models.In summary, the results of ablation experiments show that the CNN-BiGRU-Attention model has significant advantages in terms of R 2 , RMSE, MAE, distance error and angle error, and visualization results, with comparing with CNN, BiGRU, and CNN-BiGRU models, which indicates that the combination of CNN, BiGRU, and Attention is effective.In summary, the results of ablation experiments indicate that the CNNtention model offers significant advantages in terms of R 2 , RMSE, MAE, distan angle error, and visualization results compared to the CNN, BiGRU, and C models.In summary, the results of ablation experiments show that the CNNtention model has significant advantages in terms of R 2 , RMSE, MAE, distanc angle error, and visualization results, with comparing with CNN, BiGRU, BiGRU models, which indicates that the combination of CNN, BiGRU, and effective.

Comparing CNN-BiGRU-A ention with Transformer, BiLSTM, and ROMS
In order to further verify the performance of the CNN-BiGRU-A ention section constructs comparative experiments using the state-of-the-art time-se including Transformer and BiLSTM.The trajectory data of buoy No. 2101598 in comparative experiments.Figure 14a,b show the performance comparis former, BiLSTM and CNN-BiGRU-A ention models in terms of R 2 , RMSE, a the test set.It can be observed that the performance of the CNN-BiGRU-A en  Additionally, the Lagrange particle tracking model of the Regional Ocean Modeling System (ROMS) is utilized to simulate the movement of Drifter No. 2101598 in water and predict its trajectories.This model is incorporated into the experiments described above, and a comparative analysis of the results is conducted as follows.Figure 15   Additionally, the Lagrange particle tracking model of the Regional Ocean Modeling System (ROMS) is utilized to simulate the movement of Drifter No. 2101598 in water and predict its trajectories.This model is incorporated into the experiments described above, and a comparative analysis of the results is conducted as follows.Figure 15 illustrates the 24, 48, and 72 h trajectories predicted by the CNN-BiGRU-Attention model, alongside those predicted by the BiLSTM, Transformer, and ROMS models.Notably, the trajectories predicted by the CNN-BiGRU-Attention model (represented by red lines in Figure 15) are closest to the actual trajectory of the buoy (depicted by black lines in Figure 15).The distance error and angle error of the predicted trajectories of CNN-BiGRU-Attention, BiLSTM, Transformer, and ROMS are calculated as outlined in Section 3.4.The results are presented in Figures 16 and 17       trajectory.The CNN-BiGRU-A ention model is employed to predict their trajectories for 24, 48, and 72 h.From the visualized trajectories in Figures 19-21, it can be observed that the predicted trajectories (red lines) calculated by the CNN-BiGRU-A ention model remain as the similar drifting trends, directions, and shapes to the real trajectories (dark gray lines), regardless of whether they are smooth, spiral, or sawtooth in nature.This capability also extends to vortex and turbulent sea areas.provide distance and angle errors, respectively.In Figure 22, the distance error for the 24 h prediction remains within a 5 km threshold, while the 48 h distance error is limited to 10 km, and the 72 h distance error remains under 15 km; the computing errors of the CNN-BiGRU-Attention model accumulate with longer prediction duration, resulting in increased distance errors.The distance error of 24 h trajectory prediction is less than 5 km, and the minimum distance error is 1.6 km.The distance error of 48 h prediction is within 10 km, reaching a minimum of 2.8 km.The 72 h distance error is within 15 km, with the minimum reaching 3.7 km.The distance errors for all buoys are confined within the 15 km.In Figure 23, the angular errors exhibit a considerable degree of randomness, which is primarily influenced by the specific environmental conditions in the respective sea areas.Drifter No. 2101662 with a drogue displays the highest angular error, averaging approximately 15 • .Conversely, the buoys Drifter No. 2101598 and Drifter No. 2101662 without a drogue operating in sea areas characterized by smooth current changes, and Drifter No. 5201720 drifting in vortex sea areas, display smaller angular errors, consistently remaining within 5 • , with some even as low as 2 • .Drifter No. 4601780, operating in turbulent flow sea areas, exhibits a relatively large angular error, reaching as high as 12 • .From a holistic perspective, the angular error remains below 20 • , which is well within the acceptable range of error tolerance.out a drogue operating in sea areas characterized by smooth current changes, and Drifter No. 5201720 drifting in vortex sea areas, display smaller angular errors, consistently remaining within 5°, with some even as low as 2°.Drifter No. 4601780, operating in turbulent flow sea areas, exhibits a relatively large angular error, reaching as high as 12°.From a holistic perspective, the angular error remains below 20°, which is well within the acceptable range of error tolerance.out a drogue operating in sea areas characterized by smooth current changes, and Drifter No. 5201720 drifting in vortex sea areas, display smaller angular errors, consistently remaining within 5°, with some even as low as 2°.Drifter No. 4601780, operating in turbulent flow sea areas, exhibits a relatively large angular error, reaching as high as 12°.From a holistic perspective, the angular error remains below 20°, which is well within the acceptable range of error tolerance.The above experiments show that the CNN-BiGRU-Attention model shows good adaptability in the trajectory prediction of SDBs with drogues, without drogues, and in mixed states in different sea environments, including smooth, vortex, and turbulence, and for 72 h long-term prediction, the minimum distance error reaches 3.7 km and the minimum angle error reaches 3.17 As delineated above, the experimental outcomes reveal that the CNN-BiGRU-Attention trajectory prediction model attains a high level of accuracy, robust generalization capabilities, and universal applicability.The CNN-BiGRU-Attention model predicts the trajectories of several SDBs from the GDB system, exhibiting congruent movement trends and directions with the observed trajectories.In summary, these findings confirm that the CNN-BiGRU-Attention model possesses a degree of robustness, enabling effective forecasting of SDB trajectories under diverse mechanical structures and in different sea areas.However, due to domain adaptation issues, guaranteeing the consistency of the domain in marine environmental data is challenging.Specifically, if the domain of the marine environment data in the test set falls outside the domain of the training dataset, the CNN-BiGRU-Attention model may not perform optimally.

Conclusions
In this study, the problem of drifting buoy trajectory prediction in the ocean is systematically addressed by establishing a comprehensive mathematical model and developing a hybrid multi-layer neural network model using deep learning and artificial intelligence technologies.The key innovations of this study include the following: (1) Establishing a Trajectory Prediction Mathematical Model-This model offers good expansibility and scalability.The prediction of the trajectory point position is converted into drift velocity prediction, which is more consistent with the physical motion characteristics of the buoy in the ocean, making trajectory prediction more accurate.The mathematical model, which is based on vector decomposition and synthesis, is compatible with vector and scalar marine environmental factors, as well as buoy historical trajectory data.(2) Organic Integration of CNN, BiGRU, and AM-A hybrid multi-layer neural network model, named CNN-BiGRU-Attention, is developed to solve the trajectory prediction mathematical model.(3) Conducting Extensive Experiments-These include ablation studies, comparative analyses with state-of-the-art models like Transformer and BiLSTM, evaluations against the numerical method of ROMS, and adaptability tests, highlighting the CNN-BiGRU-Attention model's excellent convergence, accuracy, and generalization capabilities.(4) Adapting the CNN-BiGRU-Attention Model-The CNN-BiGRU-Attention model has strong adaptability and can provide accurate prediction results for surface drifting buoys with and without drogues in gentle, vortex, and turbulent sea areas.( 5) Achieving High Prediction Accuracy-The experimental results show that the CNN-BiGRU-Attention model has high prediction accuracy.The R 2 is maintained above 0.75, and the highest value is 0.9.The trajectory prediction accuracy is high, and the forecast results of the various surface drifting buoys are consistent with the actual trajectory, maintaining the same drift trend, and small distance errors and angle errors.The distance error of 24 h trajectory prediction is less than 5 km, reaching the minimum of 1.6 km.The distance error of 48 h prediction is within 10 km, reaching a minimum of 2.8 km.The 72 h distance error is within 15 km, with the minimum reaching 3.7 km.The error angle is within 20 • , reaching the minimum of 2 • .This article has made some progress.However, the work performed also has some limitations and requires further research and exploration: (1) The publicly available marine environmental data dataset currently has a low spatial resolution.A further acquisition of marine environmental data with higher spatial resolution is needed to improve the predictive performance of the model.(2) There is a certain error in the conversion between the speed of buoy drift and the latitude and longitude of buoy drift, which reduces the effectiveness of model prediction.Further consideration will be given to more accurate methods such as geodesy for calculations.
In summary, this study introduces a comprehensive computational solution for predicting the trajectories of ocean surface drifting buoys, leveraging mathematical modeling and a hybrid neural network approach.The innovations described herein significantly enhance both prediction accuracy and model performance, as validated through rigorous experiments using real drifting data from NOAA's Global Drifter Program (GDP).The adoption of artificial neural networks (ANNs) for predicting drifting buoy trajectories effectively broadens the application scope of AI technologies, significantly advancing the level of intelligence in marine environment monitoring with broad application prospects.
and Qilu University of Technology (Shandong Academy of Sciences) Major innovation project of science, education, and production integration pilot project "Key Technologies of Ocean Intelligent Perception and Information Processing based on End-edge Cloud Architecture" (2023JBZ02).

Institutional Review Board Statement: Not applicable.
Informed Consent Statement: Not applicable.

Figure 1 .
Figure 1.Mechanical structure of surface drifting buoy.Figure 1. Mechanical structure of surface drifting buoy.

Figure 1 .
Figure 1.Mechanical structure of surface drifting buoy.Figure 1. Mechanical structure of surface drifting buoy.

Figure 3 .
Figure 3. Illustration of distance and angle errors.

Figure 3 .
Figure 3. Illustration of distance and angle errors.

Figure 4 .
Figure 4. Four-layer trajectory prediction computational framework of surface drifting buoy.

Figure 4 .
Figure 4. Four-layer trajectory prediction computational framework of surface drifting buoy.

Figure 7 .
Figure 7. Loss of the CNN-BiGRU-Attention model on training and validation sets.

FOR PEER REVIEW 16 of 28 Figure 7 .
Figure 7. Loss of the CNN-BiGRU-A ention model on training and validation sets.

Figure 8 .
Figure 8.Comparison of true and predicted eastward drifting velocities for Drifter 2101598.

Figure 9 .
Figure 9.Comparison of true and predicted northward drifting velocities for Drifter 2101598.

,b show the 2 Figure 8 .
Figure 8.Comparison of true and predicted eastward drifting velocities for Drifter 2101598.

FOR PEER REVIEW 16 of 28 Figure 7 .
Figure 7. Loss of the CNN-BiGRU-A ention model on training and validation sets.

Figure 8 .
Figure 8.Comparison of true and predicted eastward drifting velocities for Drifter 2101598.

Figure 9 .
Figure 9.Comparison of true and predicted northward drifting velocities for Drifter 2101598.

Figure 9 .
Figure 9.Comparison of true and predicted northward drifting velocities for Drifter 2101598.

Figure 21 .
Figure 21.Visualization comparison of 24, 48, and 72 h predicted trajectories of Drifter No. 4601780 in turbulent flow sea areas; (a) 24 h, (b) 48 h, (c) 72 h.(3) Analysis of trajectory prediction errors across diverse buoys To further assess the prediction accuracy of the CNN-BiGRU-Attention model, the 24, 48, and 72 h trajectory prediction results for five buoys, Drifter No. 2101598, Drifter No. 2101662 with a drogue, Drifter No. 2101662 without a drogue, Drifter No. 5201720, and Drifter No. 4601780, are analyzed for distance and angle errors.Figures 22 and 23provide distance and angle errors, respectively.In Figure22, the distance error for the 24 h prediction remains within a 5 km threshold, while the 48 h distance error is limited to 10 km, and the 72 h distance error remains under 15 km; the computing errors of the CNN-BiGRU-Attention model accumulate with longer prediction duration, resulting in increased distance errors.The distance error of 24 h trajectory prediction is less than 5 km, and the minimum distance error is 1.6 km.The distance error of 48 h prediction is within 10 km, reaching a minimum of 2.8 km.The 72 h distance error is within 15 km, with the minimum reaching 3.7 km.The distance errors for all buoys are confined within the 15 km.In Figure23, the angular errors exhibit a considerable degree of randomness, which is primarily influenced by the specific environmental conditions in the respective sea areas.Drifter No. 2101662 with a drogue displays the highest angular error, averaging approximately 15 • .Conversely, the buoys Drifter No. 2101598 and Drifter No. 2101662 without a drogue operating in sea areas characterized by smooth current changes, and Drifter No. 5201720 drifting in vortex sea areas, display smaller angular errors, consistently remaining within 5 • , with some even as low as 2 • .Drifter No. 4601780, operating in turbulent flow sea areas, exhibits a relatively large angular error, reaching as high as 12 • .From a holistic perspective, the angular error remains below 20 • , which is well within the acceptable range of error tolerance.

Figure 22 .
Figure 22.Distance error comparison for different SDBs' trajectories predicted by the CNN-BiGRU-A ention model.

Figure 22 .
Figure 22.Distance error comparison for different SDBs' trajectories predicted by the CNN-BiGRU-Attention model.

Figure 22 .
Figure 22.Distance error comparison for different SDBs' trajectories predicted by the CNN-BiGRU-A ention model.

Figure 23 .
Figure 23.Angle error comparison for different buoy trajectories predicted by CNN-BiGRU-Attention.

Table 1 .
Information of surface drifting buoys used in experiments.

Table 2 .
Optimal hyper-parameter settings for the CNN-BiGRU-Attention model.

unit : degree) Forecast duration Angle error comparison among four models
Angle error comparison of predicted trajectories for Drifter No. 2101598 using CNN, BiGRU, CNN-BiGRU, and CNN-BiGRU-Attention models.

unit : degree) Forecast duration Angle error comparison of Transformer, BiLSTM, ROMS and CNN-BiGRU-Attention models
Distance error comparison of predicted trajectory for Drifter No. 2101598 among Transformer, BiLSTM, ROMS, and CNN-BiGRU-Attention models.

unit : degree) Forecast duration Angle error comparison of Transformer, BiLSTM, ROMS and CNN-BiGRU-Attention models
To assess the applicability of the CNN-BiGRU-Attention model for SDBs with different drogue status under varying sea conditions, comparison experiments are conducted on trajectories in gentle, vortex, and turbulent sea areas.These experiments involve SDBs with drogues, without drogues, and in mixed states.In this section, a set of experiments involves Drifter No. 2101662 drifting in gentle sea areas as described in Table1.The time span of Drifter No. 2101662 trajectories ranges from 6:00 on 14 August 2020 to 23:00 on 30 October 2022; its drogue fell off at 0:00 on 14 September 2021.The trajectories of Drifter No. 2101662 before and after the shedding of its drogue are, respectively, predicted using the CNN-BiGRU-Attention model.The second set of experiments involves Drifter No. 5201720 and Drifter No. 4601780 into the CNN-BiGRU-Attention model.As described in Table 1, the trajectory data of Drifter No. 5201720 span the period from 14 July 2020 to 30 October 2022 in vortex sea areas and the data of Drifter No. 4601780 cover the period from 10 May 2020 to 30 October 2022 in sea areas characterized by increased turbulence with complex directional changes.The drogue of Drifter No. 5201720 detached on 23 June 2021.The drogue of Drifter No. 4601780 detached on 1 July 2020.In the second group of experiments, Drifter No. 5201720 and Drifter No. 4601780 are in a mixed mechanical state, featuring both drogue and non-drogue configurations.