Ship berthing time prediction method based on EEMD-SSA-SVR model
Through the EEMD-SSA-SVR model, the ship's mooring time series is decomposed and optimized, and the problem of low prediction accuracy in the prior art is solved, and a higher accuracy and robust ship's mooring time prediction is achieved.
Patent Information
- Application Number
- CN202411499635.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-02-07
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art is difficult to accurately predict the ship's mooring time, the prediction accuracy is low and the robustness of the ship's mooring period is not considered.
The prediction method based on the EEMD-SSA-SVR model is adopted, and the time series in the dormant is decomposed through the EEMD algorithm, and the parameters of the SVR model are optimized by SSA, and the EEMD-SSA-SVR model is constructed for prediction.
It significantly improves the prediction accuracy of ship mooring time, enhances the robustness and generalization ability of the model, and can more accurately reflect the nonlinear dynamic interaction relationships of time series influencing factors.
Smart Images

Figure CN119398252A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of ship monitoring, and in particular relates to a ship berthing time prediction method based on an EEMD-SSA-SVR model. Background Art
[0002] In recent years, the rapid development of global trade has driven the prosperity of the transportation industry. The increasing ocean freight turnover and the intensified competition among ports have put forward higher requirements on the service level of the terminal. Since berths are one of the key resources of ports, it is very important to study the issue of ship berthing time. By reasonably arranging berthing plans, the production efficiency of ports can be significantly improved on the basis of shortening the time of ships in port, thereby enhancing the overall competitiveness of ports.
[0003] The ship's berthing time mainly refers to the continuous process from the ship's berthing to loading and unloading cargo to leaving the berth. Affected by factors such as ship type, ship loading and unloading tonnage, and type of loaded cargo, its data presents nonlinear characteristics, making it difficult to predict. The main factors affecting the ship's berthing time are:
[0004] 1) Ship size. Different ship types have different lengths and widths, and the time required for berthing or unberthing varies. The larger the ship, the more difficult it is to move, and the more space and higher technical requirements are required during the berthing process, which leads to increased berthing time, especially in ports with narrow berths. At the same time, ships with deeper drafts require berths of specific depths, which may limit berthing options and increase berthing time.
[0005] 2) Ship deadweight. The adaptability of port facilities has an important impact on the berthing time of large deadweight ships. Large ships require specific berths and more efficient loading and unloading equipment. If port facilities cannot fully meet the needs of large ships, it may lead to reduced loading and unloading efficiency, thereby extending the berthing time.
[0006] 3) Cargo types and loading and unloading volume. The types of cargo loaded on the ship, such as bulk cargo, general cargo and container cargo, will have an impact on the loading and unloading time due to the limitations of the operating tools or cleaning requirements during loading and unloading operations. For example, large dry bulk cargo can be dumped directly in the yard with a grab bucket, while container cargo requires large yard equipment such as quay cranes and cranes to assist in loading and unloading operations. The loading and unloading volume of cargo will directly affect the ship's berthing time. The different loading and unloading volumes of the same ship type will result in significant differences in berthing time.
[0007] 4) Weather. In the actual operation of terminal operations, bad weather reduces the safety capacity of berthing operations and may be accompanied by situations such as ship displacement, difficulty in loading and unloading cargo, equipment damage and casualties, which further prolongs the berthing time.
[0008] Since the data of ship berthing time has complex data characteristics such as volatility, nonlinearity, and non-stationary timeliness, it is affected by many factors such as port operation efficiency, cargo loading and unloading speed, weather conditions, route arrangements, and macro factors such as economy, policy, and technological progress. There are complex nonlinear dynamic interactions between the influencing factors. Therefore, the ship berthing time prediction model needs to have a strong and robust feature learning ability to scientifically and effectively mine the complex features of the berthing time data. In addition, the ship berthing time prediction model also needs to be able to effectively reflect the nonlinear dynamic interaction relationship of time series influencing factors and have a strong generalization ability to achieve accurate and stable prediction of future trends. Some scholars have conducted relevant research on the process of ships entering the port. The focus of existing research is mainly on predicting the arrival time of ships and optimizing the operation time of ships in the port, while there are relatively few studies on the prediction of ship berthing time.
[0009] Traditional ship berthing time prediction usually adopts the method of dividing the planned container loading and unloading volume of the ship by the loading and unloading efficiency of the quay crane to obtain the fixed value of the container ship berthing time. In fact, the ship berthing time is dynamically affected by multiple factors at the same time. Obviously, under the nonlinear interweaving and superposition of these factors, the traditional method has low prediction accuracy and does not consider the robustness of the ship during the berthing period. It is generally only suitable for ideal research. With the advent of the era of artificial intelligence, domestic and foreign research on ship berthing time prediction mainly focuses on the use of ship historical data and various artificial intelligence technologies. More and more algorithms are gradually being applied to berthing time prediction. Since the ship berthing time series has a strong nonlinear trend, it is difficult to solve it through traditional prediction methods such as linear regression, exponential smoothing, and autoregressive moving average. In contrast, common methods include back propagation neural networks (BP) in deep learning, which can better fit nonlinear trends. However, these algorithms are easy to fall into local optimality, and often have the problem that the amount of data is too small to accurately train BP neural networks. Therefore, although studies have shown that deep learning models have strong prediction capabilities, their black box characteristics make the decision process of the model difficult to explain.
[0010] In summary, the current method for predicting ship berthing time still needs to be improved. Therefore, how to improve the prediction accuracy of ship berthing time is a technical problem that needs to be solved urgently. Summary of the invention
[0011] The object of the present invention is to provide a method for predicting ship berthing time based on the EEMD-SSA-SVR model to solve the above technical problems.
[0012] To achieve the above object, the present invention provides the following technical solutions:
[0013] The present invention discloses a method for predicting ship berthing time based on an EEMD-SSA-SVR model, the method comprising the following steps:
[0014] Step 1, data acquisition and processing: The ship berthing and unberthing operation data of the target port in a certain period of time are obtained as the original data, and the original data are cleaned to obtain data including the ship length, ship width, cargo type, loading and unloading operation tons and berthing time. The ship length, ship width, cargo type and loading and unloading operation tons are used as different characteristic factors, and the correlation between these characteristic factors and berthing time is analyzed to extract the characteristic factor with the highest correlation with berthing time;
[0015] Using the EEMD algorithm, the time series s (t) decompose it into multiple IMF components with different frequencies and a residual component to stabilize the predicted time series; use the normalization formula to normalize the generated IMF components and residual components to the interval [0,1];
[0016] Step 2, parameter optimization: Use SSA to optimize parameters, that is, take the normalized data as input, initialize SSA parameters, including the maximum number of iterations, population size, discoverer ratio and safety value, and divide the population into discoverers and followers, calculate the fitness values of all sparrow individuals, find the current global optimal value and determine their positions; update the positions of discoverers, followers and sentinels, and evaluate the fitness values of individuals after the positions are updated to determine the position of the best individual; check whether the termination condition is met, that is, whether the global optimal value is found or the maximum number of iterations is reached. If the termination condition is met, output the coordinates of the best sparrow position as the optimal value of the penalty coefficient C and kernel function parameter g of the SVR model, otherwise continue the above process until the termination condition is met;
[0017] Step 3: Prediction model construction and training: Use the optimal value obtained in step 2 as the penalty coefficient C and kernel function parameter g of the SVR model to construct a prediction model, namely the EEMD-SSA-SVR model; divide the extracted characteristic factor data with the highest correlation into a training set and a test set, 90% of the data is used as the training data, and the remaining 10% of the data is used as the test set. The kernel function selects the RBF kernel function, and the loss function is the ε-insensitive loss function. The EEMD-SSA-SVR model is trained, and then the trained prediction model is used to predict the ship's berthing time;
[0018] Step 4: Forecast accuracy evaluation: using the coefficient of determination R 2 Three statistical indicators, namely, mean absolute error (MAE) and root mean square error (RMSE), are used to quantitatively evaluate the prediction performance of the prediction model.
[0019] Furthermore, the characteristic factor with the highest correlation with the mooring time extracted in step 1 is displayed through a heat map, and the darker the color in the map, the higher the correlation.
[0020] Furthermore, the specific steps of decomposing the time series s(t) by using the EEMD algorithm in step 1 are:
[0021] (1) Add m white noises n with standard normal distribution to the initial signal, that is, to the Boolean time series s(t). i (t), thus generating m new signals S i (t) = s(t) + n i (t);
[0022] (2) For a new signal S containing noise i (t) Perform EEMD decomposition, and each signal will obtain l eigenmode functions c ij (t) and a residual r i (t), where i = 1, 2, ..., m; j = 1, 2, ... l, the expression of the new signal is:
[0023]
[0024] (3) Repeat steps (1) and (2) m times, adding a random white noise signal each time to obtain m groups of IMF components at the park time;
[0025] (4) Based on the principle that the statistical mean of uncorrelated sequences is zero, the corresponding IMF components are averaged to obtain the final IMF components of EEMD decomposition, which is formula (2):
[0026]
[0027] In the formula, c j (t) is the final IMF component of EEMD decomposition.
[0028] Furthermore, the normalization formula in step 1 is:
[0029]
[0030] Where x is the sample point data; x' is the normalized data and x'∈[0,1], max(x) and min(x) are the maximum and minimum values in the sample point data, respectively.
[0031] Furthermore, the specific methods for updating the positions of the discoverer, follower and sentinel in step 2 are respectively formulas (4), (5) and (6):
[0032]
[0033] In the formula, represents the position information matrix of the i-th individual in the j-th dimension at the t-th iteration; α is a random number in the interval [0, 1]; T is the maximum number of iterations; Q is a random number following a normal distribution; L is a matrix of all 1s; R2 is the warning value, which is a random number in the interval [0, 1]; ST is the safety value, which is a random number in the interval [0.5, 1]; when R2 < ST, the discoverer is in a safe position, otherwise it is in a dangerous position;
[0034]
[0035] In the formula, represents the position information matrix of the worst individual at the t-th iteration; is the position information matrix of the optimal individual at the (t + 1)-th iteration; A is a matrix randomly assigned 1 or -1, A + = A T (AA T ) -1 ; n is the number of joiners, represents being located at the rear of the joiner population;
[0036]
[0037] In the formula, β represents a random number following a normal distribution with a mean of 0 and a variance of 1; H is a random number in the interval [-1, 1]; δ is a constant; f i , f g , f w represent the current individual fitness, the optimal fitness, and the worst fitness, respectively.
[0038] Furthermore, the calculation formulas for the determination coefficient R 2 , the mean absolute error MAE, and the root mean square error RMSE are respectively:
[0039]
[0040]
[0041]
[0042] In the formula, is the predicted data at the berthing time, y i is the actual data at the berthing time, is the average value of the actual values at the berthing time, and N is the number of groups of actual data.
[0043] The beneficial effects of the present invention are as follows: the method of the present invention realizes high-precision prediction of ship berthing time based on the EEMD-SSA-SVR model, which greatly improves the prediction accuracy compared with other traditional models, improves the accuracy of ship berthing time prediction, and provides a scientific basis for realizing the intensive, green and sustainable development of ports, as well as improving the navigation efficiency and competitiveness of ports.
[0044] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific implementation methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 is a flow chart of the method of the present invention;
[0046] Figure 2 The heat map and result display of the correlation between the characteristic factors affecting the berthing time;
[0047] Figure 3 This is a schematic diagram of the EEMD decomposition results of the time series in Mooring;
[0048] Figure 4 This is a comparison chart between the model prediction results and the actual berth time;
[0049] Figure 5 This is a comparison chart of the prediction results of each model;
[0050] Figure 6 This is a comparison chart of the prediction error time of each model. DETAILED DESCRIPTION
[0051] The present invention discloses a method for predicting ship berthing time based on EEMD-SSA-SVR model, such as Figure 1 As shown, the method comprises the following steps:
[0052] Step 1, data acquisition and processing: The ship berthing and unberthing operation information table of a certain period of the target port, that is, the ship berthing and unberthing operation data, is obtained as the original data, and the original data is cleaned to remove the data information irrelevant to the prediction or the data records with obvious errors in the original data. After the original data is cleaned, the data including the serial number, ship ID, ship length, ship width, cargo type, loading and unloading operation tons and berthing time are obtained. The above-mentioned ship length, ship width, cargo type and loading and unloading operation tons are taken as four different characteristic factors, among which the ship length, ship width and other ship dimensions are taken from the ship information table provided by the port; the cargo type is numbered according to the definition; the loading and unloading operation tons is the difference between the current cargo tonnage of the ship under different operation types. Then, the regression analysis method is used to obtain the correlation between the above-mentioned characteristic factors and the ship berthing time, and the characteristic factors with the highest correlation with the ship berthing time are extracted. The results can be displayed through a heat map. The darker the color in the figure, the higher the correlation. This heat map helps to identify which variables have a significant impact on the berthing time, thereby providing a basis for the construction of subsequent models and variable selection.
[0053] Then, the EEMD (Ensemble Empirical Mode Decomposition) algorithm is used to decompose the time series s (t) is decomposed into multiple IMF (Intrinsic Mode Function) components of different frequencies and a residual component to stabilize the predicted time series.
[0054] EEMD is a signal processing technology that aims to decompose nonlinear and non-stationary signals into IMF components. Compared with traditional EMD (Empirical Mode Decomposition), EEMD improves the modal aliasing problem by adding white noise of different amplitudes to the original signal and using the statistical characteristics of noise to effectively suppress the overlap between different modes of the signal during the decomposition process. This method greatly improves the performance of EMD in processing complex signals, making it more reliable and effective in practical applications.
[0055] The specific steps of decomposition using the EEMD algorithm are as follows:
[0056] (1) Add m white noises n with standard normal distribution to the initial signal, that is, to the Boolean time series s(t). i (t), thus generating m new signals S i (t) = s(t) + n i (t);
[0057] (2) For a new signal S containing noisei (t) Perform EEMD decomposition, and each signal will obtain l intrinsic mode functions c ij (t) and a residual r i (t), where i = 1, 2, ..., m; j = 1, 2, ... l, the expression of the new signal is shown in formula (1);
[0058]
[0059] (3) Repeat steps (1) and (2) m times, adding a random white noise signal each time to obtain m groups of IMF components at the park time;
[0060] (4) Based on the principle that the statistical mean of uncorrelated sequences is zero, the corresponding IMF components are averaged to obtain the final IMF component c of EEMD decomposition. j (t), that is, formula (2):
[0061]
[0062] In order to solve the error problem caused by the large difference in order of magnitude between the sample data, the normalization formula is used to normalize the sample data, that is, the generated IMF components and residual components, so that they are normalized to the interval [0,1]. The normalization formula is:
[0063]
[0064] Where x is the sample point data; x' is the normalized data and x'∈[0,1], max(x) and min(x) are the maximum and minimum values in the sample point data, respectively.
[0065] Step 2: Parameter optimization: Use SSA (Sparrow Search Algorithm) to optimize the parameters to optimize the penalty coefficient C and kernel function parameter g of the SVR (Support Vector Regression) model, providing the optimal parameter values for the subsequent construction of the prediction model.
[0066] Specifically, the normalized data is used as the input, and the SSA parameters are initialized, mainly including the maximum number of iterations, population size, discoverer ratio, and safety value. At the same time, the population is divided into discoverers and followers, the fitness values of all sparrow individuals are calculated, the current global optimum is found and its position is determined. Update the positions of the discoverers, followers, and vigilant individuals, and evaluate the fitness values of the individuals after the position update to determine the position of the best individual. Check whether the termination condition is met, that is, whether the global optimum has been found or the maximum number of iterations has been reached. If the termination condition is met, the coordinates of the best sparrow position are output as the optimal values of the penalty coefficient C and kernel function parameter g of the SVR model; otherwise, continue the above process until the termination condition is met.
[0067] In the traditional SVR model, the penalty coefficient C and kernel function parameter g are randomly assigned, resulting in low computational efficiency and unstable model performance during the prediction process. Therefore, the present invention uses SSA to optimize the penalty coefficient and kernel function parameter of the SVR model. SSA first sorts the individuals according to their fitness from good to bad. The discoverers are the population composed of individuals with better fitness, the followers are the population composed of individuals with worse fitness, and the vigilant individuals are randomly selected individuals. The position update methods of the discoverers, followers, and vigilant individuals are shown in equations (4), (5), and (6) respectively.
[0068]
[0069] In the formula, represents the position information matrix of the i-th individual in the j-th dimension at the t-th iteration; α is a random number in the interval [0, 1]; T is the maximum number of iterations; Q is a random number subject to a normal distribution; L is a matrix of all 1s; R2 is the early warning value, which is a random number in the interval [0, 1]; ST is the safety value, which is a random number in the interval [0.5, 1]. When R2 < ST, the discoverer is in a safe position; otherwise, it is in a dangerous position.
[0070]
[0071] In the formula, represents the position information matrix of the worst individual at the t-th iteration; is the position information matrix of the optimal individual at the (t + 1)-th iteration; A is a matrix randomly assigned 1 or -1, A + = A T (AA T ) -1 ; n is the number of followers, indicating the rear of the follower population.
[0072]
[0073] In the formula, β represents a random number that follows a normal distribution with a mean of 0 and a variance of 1; H is a random number in the interval [-1,1]; δ is a very small constant; f i ,f g ,f w They represent the current individual fitness, the best fitness and the worst fitness respectively.
[0074] Step 3: Prediction model construction and training: Use the two optimal values obtained in step 2 as the penalty coefficient C and kernel function parameter g of the SVR model to construct the prediction model, namely the EEMD-SSA-SVR model.
[0075] The SVR model is a regression version of the support vector machine, which is divided into two categories: linear regression and nonlinear regression. Nonlinear support vector regression uses a nonlinear transformation φ to map the samples in the original space to a higher feature space, converts it into a linear model in the feature space, and then performs linear regression on it. For the data set (x i ,y i ), where x i is the input vector, y i For x i The corresponding target value. In the high-dimensional space, there exists a linear function f(x) to describe x i With y i The corresponding relationship is shown in formula (7).
[0076]
[0077] Where f(x) is the predicted value; ω T is the independent variable coefficient of the function, and b is the bias. Both need to be estimated through a training set G. is a nonlinear mapping function that can map input data to a high-dimensional feature space. In addition, in order to prevent overfitting, a regularization parameter is introduced to improve generalization performance. The model consists of model complexity and empirical risk, and then the parameter ω is T and b are estimated, thus forming a constrained quadratic optimization problem as shown in Equations (8) and (9).
[0078]
[0079]
[0080] In the formula, Used to control the complexity of the model. represents the empirical risk, where C is the penalty factor, which is used to calculate the penalty when an error occurs, ε is the fitting accuracy, and ξ and ξ * is the slack variable.
[0081] According to the duality, the above problem is transformed into a quadratic programming problem for solution. The linear expression of the function f(x) is shown in formula (10).
[0082]
[0083] In the formula, β and β * is the Lagrange multiplier; K is the kernel function used in nonlinear support vector regression.
[0084] The core of the SVR model is the kernel function. By introducing the kernel function, the inner product operation of the high-dimensional feature space and the nonlinear classification and prediction problems are cleverly solved. Commonly used kernel functions mainly include linear kernel functions, polynomial kernel functions, radial basis functions (RBF) and S-shaped kernel functions. Among them, RBF is the most widely used kernel function, which can realize nonlinear mapping, has better performance for large and small samples, and has fewer parameters than the polynomial kernel function. In the present invention, the SVR model uses RBF as the kernel function. The expression of the kernel function is shown in formula (11).
[0085]
[0086] Among them, through the RBF kernel function mapping, each sample point (x i ,y i ) is as close as possible to the linear model in (6).
[0087] The extracted characteristic factor data with the highest correlation are divided into training set and test set, 90% of the data are used as training data, and the remaining 10% of the data are used as test set. The kernel function selects RBF kernel function, the loss function is ε-insensitive loss function, the penalty coefficient C and kernel function parameter g are set according to the optimal values obtained by SSA algorithm, the EEMD-SSA-SVR model is trained, and then the trained prediction model is used to predict the ship's berthing time.
[0088] Step 4: Forecast accuracy evaluation: To quantitatively evaluate the forecast accuracy, the determination coefficient R is used. 2 The three commonly used statistical indicators of mean absolute error (MAE) and root mean square error (RMSE) are used to quantitatively evaluate the prediction performance of the prediction model. 2 Indicates the degree of agreement between the predicted value and the actual value, taking a value in the interval [0,1], with higher values indicating higher agreement between the two. MAE reflects the actual error in the predicted value, while RMSE is highly sensitive to larger errors and can indicate the accuracy of the prediction. For both MAE and RMSE, smaller values of the two metrics are desirable. Therefore, the present invention adopts R 2, MAE and RMSE are used as evaluation indicators of the prediction model, and the calculation formulas are shown in equations (12), (13) and (14).
[0089]
[0090]
[0091]
[0092] In the formula, is the predicted data of the ship’s berthing time, y i is the actual data of the mooring time, is the average value of the actual value of the mooring time, and N is the number of groups of actual data.
[0093] Embodiment 1
[0094] This embodiment is an application example of the above method.
[0095] This embodiment discloses a method for predicting ship berthing time based on the EEMD-SSA-SVR model, the method comprising the following steps:
[0096] Step 1. Data acquisition and processing: In this embodiment, a port in Guangxi Zhuang Autonomous Region is selected as the target port, and the ship berthing and unberthing operation information table from January 1, 2023 to January 1, 2024 is obtained from the port comprehensive dispatching system as the original data, as shown in Table 1.
[0097] Table 1 Ship berthing and unberthing operation information
[0098]
[0099] In order to facilitate data analysis, the operation information of the same ship at the berth was integrated, and the original data was cleaned to obtain the ship operation information table after data cleaning, as shown in Table 2. Table 2 shows the length, width, cargo type, loading and unloading operation tons and berthing time corresponding to the selected 1000 groups of ship IDs. The ship dimensions such as length and width are taken from the ship information table provided by the port, and are numbered from 1 to 5 according to the defined cargo type (1 for dry bulk, 2 for liquid bulk, 3 for general cargo, 4 for container cargo, and 5 for other cargo); the loading and unloading operation tons are the difference in the current cargo tonnage of the ship under different operation types.
[0100] Table 2 Ship operation information table after data cleaning
[0101]
[0102] In order to evaluate the characteristic factors affecting the berthing time, the ship length, ship width, cargo type and cargo tonnage in Table 2 are defined as four different characteristic factors, and the correlation between these characteristic factors and the ship's berthing time is obtained by regression analysis to extract the most effective characteristic factors affecting the ship's berthing time. Figure 2 The heat map and results of the correlation between the characteristic factors affecting the ship's berthing time. It can be seen that the type of cargo has the highest correlation with the ship's berthing time, so it is considered as the most important characteristic factor affecting the ship's berthing time in the prediction model.
[0103] Using the EEMD algorithm, the time series s (t) is decomposed into 8 IMF components of different frequencies and a residual. The results are as follows Figure 3 As shown in Figure 1, the frequency of each IMF component decreases in sequence. The high-frequency components (such as components 1 and 2) are s (t) varies greatly, while the low-frequency component is relatively stable, and the residual is s (t) shows the overall trend of change. Each component represents s (t), therefore, it is necessary to predict the components and residuals separately to reduce the mutual interference between the components.
[0104] Then, the normalization formula is used to perform linear normalization on the generated IMF components and residual components to normalize them to the interval [0,1].
[0105] Step 2, parameter optimization: Take the normalized data as input, initialize the population and SSA parameters, and divide the population into discoverers, followers, and guards. Calculate the fitness values of all sparrow individuals, find the current global optimal value and determine their positions. Update the positions of discoverers, followers, and guards, and evaluate the fitness values of individuals after the positions are updated to determine the position of the best individual. Check whether the termination condition is met, that is, the global optimal value is found or the maximum number of iterations is reached. If the termination condition is met, the best sparrow position is output as the optimal value of the penalty coefficient C and the kernel function parameter g. Otherwise, continue the above process until the termination condition is met.
[0106] Step 3: Prediction model construction and training: Use the two optimal parameters obtained by the SSA algorithm as the penalty coefficient C and kernel function parameter g of the SVR model to construct a prediction model, namely the EEMD-SSA-SVR model. Divide the extracted cargo type data into a training set and a test set, 90% of the data as training data, and the remaining 10% of the data as a test set. The kernel function selects the RBF kernel function, the type of support vector machine selects Epsilon-SVR, and the penalty coefficient C and kernel function parameter g are set according to the optimal values obtained by the SSA algorithm. The EEMD-SSA-SVR model is trained, and then the trained prediction model is used to predict the ship's berthing time. During the prediction, the model input is a set of new cargo type data, and the output is the predicted ship's berthing time.
[0107] This example uses the EEMD-SSA-SVR model to predict the ship's berthing time and compares it with the actual berthing time. The results are as follows: Figure 4 By comparing the points and lines in the figure, we can intuitively see that the model prediction value is highly consistent with the true value, indicating that the model has a high prediction accuracy.
[0108] Step 4: Forecast accuracy evaluation: using the coefficient of determination R 2 Three statistical indicators, namely, mean absolute error (MAE) and root mean square error (RMSE), are used to quantitatively evaluate the prediction performance of the prediction model.
[0109] In order to verify the prediction performance of the model described in this embodiment, the same data is predicted in the EEMD-SSA-SVR model, EEMD-SVR model, PSO-BP model, BiLSTM model, and SVR model respectively, and the prediction results are compared. Figure 5 As shown in Figure 2, it can be seen that the prediction curve of the EEMD-SSA-SVR model is highly consistent with the true value curve, indicating that the prediction performance of the model is good. 2 The results of each model were calculated using the mean absolute error (MAE) and the root mean square error (RMSE) to obtain the prediction accuracy comparison results of each model, as shown in Table 3.
[0110] Table 3 Comparison of prediction accuracy of each model
[0111]
[0112] As shown in Table 3, the EEMD-SSA-SVR model performs best in all evaluation indicators, R 2The results show that the EEMD-SVR model has the strongest explanatory power for the ship's berthing time, the smallest error, and the best fitting effect. Compared with the traditional SVR model, the results are optimized by 41.18%, 77.65% and 75.23% respectively, which greatly improves the model effect and accuracy. The EEMD-SVR model follows closely, and although it is slightly inferior to the EEMD-SSA-SVR model, it still shows strong prediction ability. The PSO-BP model also performs well, but compared with the EEMD series model, the error is slightly larger and the explanatory power is slightly weaker. Finally, the BiLSTM model and the SVR model perform poorly, especially the BiLSTM model. Although it can predict the next moment without relying on the data information of the previous moment by stacking two layers of LSTM, it cannot perform parallel calculation, that is, it needs to calculate the result of the previous moment to calculate the next moment. Compared with the SVR model that can be mapped to a high-dimensional feature space, this model cannot accurately predict the ship's berthing time.
[0113] Figure 6 The prediction errors of different models for berthing time are shown. The horizontal axis represents the time series of berthing time, and the vertical axis represents the prediction error time under different models. The height of the bar chart reflects the size and distribution of the error values of different prediction models, and provides an intuitive comparison of the prediction accuracy of each model. The analysis results show that the prediction errors of the single BiLSTM model and the SVR model are large, with error times of approximately 6 hours and 3 hours, respectively. In contrast, the prediction errors of other models are all less than 3 hours, especially the EEMD-SVR and EEMD-SSA-SVR models, which have small errors and uniform distribution. Under the EEMD-SSA-SVR model, only a few error values are significantly higher. In summary, the EEMD-SSA-SVR model performs well in the prediction of ship berthing time, and is recommended as the optimal model due to its high accuracy and low error.
[0114] From the above analysis, it can be seen that the reason why the EEMD-SSA-SVR model can perform well in the prediction of ship berthing time is mainly attributed to the powerful data decomposition ability of EEMD, which provides more stable and clear input features for the prediction model, the strong optimization ability of SSA, which efficiently optimizes the parameters of the prediction model, and the nonlinear mapping ability of SVR when dealing with regression problems. The EEMD-SSA-SVR model obtains the local characteristic signals of berthing time at different scales through EEMD, weakens the interference of original data noise, and uses SSA to optimize parameters and model structure, which can achieve high-precision SVR prediction.
[0115] Finally, it should be noted that the above is only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred arrangement scheme, a person skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. A ship berthing time prediction method based on EEMD-SSA-SVR model, characterized in that: The method comprises the following steps: Step 1, data acquisition and processing: The ship berthing and unberthing operation data of the target port in a certain period of time are obtained as the original data, and the original data are cleaned to obtain data including the ship length, ship width, cargo type, loading and unloading operation tons and berthing time. The ship length, ship width, cargo type and loading and unloading operation tons are used as different characteristic factors, and the correlation between these characteristic factors and berthing time is analyzed to extract the characteristic factor with the highest correlation with berthing time; Using the EEMD algorithm, the time series s (t) decompose it into multiple IMF components with different frequencies and a residual component to stabilize the predicted time series; use the normalization formula to normalize the generated IMF components and residual components to the interval [0,1]; Step 2, parameter optimization: Use SSA to optimize parameters, that is, take the normalized data as input, initialize SSA parameters, including the maximum number of iterations, population size, discoverer ratio and safety value, and divide the population into discoverers and followers, calculate the fitness values of all sparrow individuals, find the current global optimal value and determine their positions; update the positions of discoverers, followers and sentinels, and evaluate the fitness values of individuals after the positions are updated to determine the position of the best individual; check whether the termination condition is met, that is, whether the global optimal value is found or the maximum number of iterations is reached. If the termination condition is met, output the coordinates of the best sparrow position as the optimal value of the penalty coefficient C and kernel function parameter g of the SVR model, otherwise continue the above process until the termination condition is met; Step 3: Prediction model construction and training: Use the optimal value obtained in step 2 as the penalty coefficient C and kernel function parameter g of the SVR model to construct a prediction model, namely the EEMD-SSA-SVR model; divide the extracted characteristic factor data with the highest correlation into a training set and a test set, 90% of the data is used as the training data, and the remaining 10% of the data is used as the test set. The kernel function selects the RBF kernel function, and the loss function is the ε-insensitive loss function. The EEMD-SSA-SVR model is trained, and then the trained prediction model is used to predict the ship's berthing time; Step 4: Forecast accuracy evaluation: using the coefficient of determination R 2 Three statistical indicators, namely, mean absolute error (MAE) and root mean square error (RMSE), are used to quantitatively evaluate the prediction performance of the prediction model.
2. The method for predicting ship berthing time based on the EEMD-SSA-SVR model according to claim 1, characterized in that: The characteristic factor with the highest correlation with the mooring time extracted in step 1 is displayed by a heat map. The darker the color in the map, the higher the correlation.
3. The method for predicting ship berthing time based on EEMD-SSA-SVR model according to claim 1, characterized in that: The specific steps of decomposing the time series s(t) using the EEMD algorithm in step 1 are as follows: (1) Add m white noises n with standard normal distribution to the initial signal, that is, to the Boolean time series s(t). i (t), thus generating m new signals S i (t) = s(t) + n i (t); (2) For a new signal S containing noise i (t) Perform EEMD decomposition, and each signal will obtain l eigenmode functions c ij (t) and a residual r i (t), where i = 1, 2, ..., m; j = 1, 2, ... l, the expression of the new signal is: (3) Repeat steps (1) and (2) m times, adding a random white noise signal each time to obtain m groups of IMF components at the park time; (4) Based on the principle that the statistical mean of uncorrelated sequences is zero, the corresponding IMF components are averaged to obtain the final IMF components of EEMD decomposition, which is formula (2): In the formula, c j (t) is the final IMF component of EEMD decomposition.
4. The method for predicting ship berthing time based on EEMD-SSA-SVR model according to claim 1, characterized in that: The normalization formula described in step 1 is: Where x is the sample point data; x' is the normalized data and x'∈[0,1], max(x) and min(x) are the maximum and minimum values in the sample point data, respectively.
5. The method for predicting ship berthing time based on EEMD-SSA-SVR model according to claim 1, characterized in that: The specific methods for updating the positions of the discoverer, follower, and sentinel in step 2 are formulas (4), (5), and (6) respectively: In the formula, represents the position information matrix of the i-th individual in the j-th dimension at the t-th iteration; α is a random number in the interval [0, 1]; T is the maximum number of iterations; Q is a random number following a normal distribution; L is a matrix of all 1s; R2 is the warning value, which is a random number in the interval [0, 1]; ST is the safety value, which is a random number in the interval [0.5, 1]; when R2 < ST, the discoverer is in a safe position, otherwise it is in a dangerous position; In the formula, Represents the position information matrix of the worst individual in the tth iteration; is the optimal individual position information matrix in the t+1th iteration; A is a matrix randomly assigned 1 or -1, A + =A T (AA T ) -1 ; n is the number of participants, It means it is at the rear of the joiner population; In the formula, β represents a random number that follows a normal distribution with a mean of 0 and a variance of 1; H is a random number in the interval [-1,1]; δ is a constant; f i ,f g ,f w They represent the current individual fitness, the best fitness and the worst fitness respectively.
6. The method for predicting ship berthing time based on EEMD-SSA-SVR model according to claim 1, characterized in that: The coefficient of determination R described in step 4 2 The calculation formulas for mean absolute error MAE and root mean square error RMSE are: In the formula, is the predicted data of the berthing time, y i is the actual data of the mooring time, is the average value of the actual value of the mooring time, and N is the number of groups of actual data.
Citation Information
Patent Citations
Ship motion forecasting method based on improved EMD-AR model
CN113378387A
Ship arrival and departure time prediction method based on ship AIS big data
CN114330640A
Ship motion attitude prediction method based on multiple combinations
CN115994481A
Electricity price prediction method and system based on EMD decomposition and SSA-SVM model
CN117541291A
Bulk cargo wharf ship operation time prediction method and system, terminal and storage medium
CN118536676A
Cited By
Ship departure time prediction method and device, electronic equipment, medium and chip
CN122175483A