Bulk cargo wharf ship operation time prediction method and system, terminal and storage medium
By classifying berths and training the Stacking model, combined with meteorological and time characteristic data, the problem of inability to accurately predict ship operation time at bulk cargo terminals in the existing technology is solved, achieving accurate prediction of operation time and improving terminal operation efficiency.
Patent Information
- Application Number
- CN202410801641.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-20
- Publication Date
- 2024-08-23
AI Technical Summary
Existing machine learning models cannot accurately predict ship operation times at bulk cargo terminals, as they are affected by a variety of uncontrollable factors, and there are differences in operation times at different berths.
By obtaining the carrying capacity data and location data of the berths, the berths are divided into multiple categories, and Stacking models are trained for each category, including multiple linear regression models, random forest models, XGBoost models and support vector regression models, using genetic algorithms and The K-means algorithm performs clustering and combines meteorological and time characteristic data for prediction.
It achieves accurate prediction of ship operation time, has reliable design principles, simple structure, and has wide application prospects.
Smart Images

Figure CN118536676A
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of Stacking ensemble learning, and in particular relates to a method, system, terminal and storage medium for predicting ship operation time at a bulk cargo terminal. Background Art
[0002] The ship operation time is defined as the pure operation time of the ship from the start of operation to the end of operation, excluding downtime caused by various reasons. After arriving at the port, the ship will first wait for dispatch at the anchorage, and then be assigned to the designated berth for loading and unloading operations. Generally, bulk cargo terminals are composed of units such as loading and unloading operation areas, yards, auxiliary facilities areas, management areas, and maintenance and repair areas. The loading and unloading operation area is the core area of the terminal, including several berths, which are responsible for specific cargo loading and unloading operations. Different berths are equipped with different numbers and types of loading and unloading equipment, which work together to achieve efficient transfer of cargo from ship to land or from land to ship.
[0003] Studying the ship operation time at bulk cargo terminals is of great significance for formulating scientific and efficient berth plans and improving terminal operation efficiency. However, the ship operation time is affected by a variety of uncontrollable factors, including but not limited to weather conditions, the performance of loading and unloading equipment, and the efficiency of human operation. The operation time of different berths is also different. Therefore, some existing machine learning models cannot accurately predict the operation time. Summary of the invention
[0004] In view of the above-mentioned deficiencies in the prior art, the present invention provides a method, system, terminal and storage medium for predicting ship operation time at a bulk cargo terminal to solve the above-mentioned technical problems.
[0005] In a first aspect, the present invention provides a method for predicting ship operation time at a bulk cargo terminal, comprising: acquiring carrying capacity data and location data of the berths, and classifying the berths of the bulk cargo terminal into a plurality of categories based on the carrying capacity data and location data of the berths; A corresponding Stacking model is trained for each category, wherein the base models of the Stacking model include a multivariate linear regression model, a random forest model, an XGBoost model, and a support vector regression model; The basic data and characteristic data of the ship to be moored are obtained, a corresponding target Stacking model is retrieved for the ship to be moored based on a category corresponding to the basic data, and the target Stacking model is used to predict the operation time based on the characteristic data.
[0006] In an optional embodiment, the carrying capacity data and the location data of the berth are obtained, and the berths of the bulk cargo terminal are divided into multiple categories based on the carrying capacity data and the location data of the berth, including: Acquire the carrying capacity data and location data of the berth, wherein the carrying capacity data includes the average tonnage and type of cargo handled by the berth, and save the carrying capacity data and location data of one berth as one data point; Set the value range of the number of categories, and use the genetic algorithm to obtain the optimal number of clusters k based on the silhouette coefficient of different numbers of categories; The K-means algorithm is used to cluster the berths of the bulk cargo terminal based on the optimal number of clusters k to obtain k categories.
[0007] In an optional implementation, a value range of the number of categories is set, and a genetic algorithm is used to obtain an optimal number of clusters k based on silhouette coefficients of different numbers of categories, including: Set the value range to the population range, set the individual to an integer within the population range, and set the number of iterations; Calculating the fitness of the individuals, including clustering the berths based on the individuals, and calculating the average silhouette coefficient based on the clusters; Select the two individuals with the highest fitness as the excellent individuals of this iteration; Randomly select 4 new individuals from the excellent data range defined by the current excellent individuals, and randomly select 1 individual from outside the excellent data range; Iterate continuously until the optimal individual is found or the number of iterations is reached, select the optimal individual with the highest fitness, and output the optimal individual as the optimal cluster number k.
[0008] In an optional embodiment, a corresponding Stacking model is trained for each category, and the base model of the Stacking model includes a multivariate linear regression model, a random forest model, an XGBoost model and a support vector regression model, including: Collect the operation record data of the berth, calculate the correlation between each parameter item in the operation record data and the operation duration by using the Pearson correlation coefficient calculation method, and screen out the relevant parameter items whose correlation reaches the preset threshold, extract the parameter values of the relevant parameter items from the operation record data, and obtain the operation data; The operation data of berths of the same category are saved in the same data set to obtain a data set corresponding to each category of berth; the operation data includes operation time, cargo type, hull length, deadweight tonnage, cargo tonnage, weather data and operation downtime; The data sets corresponding to each category of berths are used to train the respective Stacking models to obtain the Stacking models corresponding to each category.
[0009] In an optional embodiment, basic data and characteristic data of the ship to be moored are obtained, a corresponding target Stacking model is retrieved for the ship to be moored based on a category corresponding to the basic data, and an operation time is predicted based on the characteristic data using the target Stacking model, including: Obtaining basic data of the ship to be moored, the basic data including cargo type and cargo tonnage; Acquire matching berth categories based on the basic data, and retrieve corresponding target Stacking models; Obtain the deadweight tonnage, cargo tonnage, hull length and cargo type of the vessel to be moored from the interactive interface, and calculate the loading rate based on the deadweight tonnage and cargo tonnage; Acquire meteorological data within a specified period from a meteorological forecast platform, and quantify the meteorological data into meteorological characteristic values; Acquiring system time, and quantifying the system time into a time characteristic value; The cargo type, hull length, loading rate, meteorological characteristic values and time characteristic values are input into the target Stacking model to obtain the predicted operation time.
[0010] In a second aspect, the present invention provides a bulk cargo terminal ship operation time prediction system, comprising: A berth classification module, used for obtaining the carrying capacity data and location data of the berth, and classifying the berths of the bulk cargo terminal into multiple categories based on the carrying capacity data and location data of the berth; A model training module is used to train a corresponding Stacking model for each category, wherein the base models of the Stacking model include a multivariate linear regression model, a random forest model, an XGBoost model, and a support vector regression model; The time prediction module is used to obtain basic data and characteristic data of the ship to be moored, retrieve the corresponding target Stacking model for the ship to be moored based on the category corresponding to the basic data, and use the target Stacking model to predict the operation time based on the characteristic data.
[0011] In an optional embodiment, the berth classification module includes: A data collection unit, used for acquiring carrying capacity data and location data of a berth, wherein the carrying capacity data includes average tonnage and types of cargo handled by the berth, and storing the carrying capacity data and location data of a berth as a data point; A quantity determination unit is used to set a value range of the number of categories and obtain an optimal number of clusters k based on silhouette coefficients of different numbers of categories using a genetic algorithm; The clustering processing unit is used to perform clustering processing on the berths of the bulk cargo terminal based on the optimal cluster number k by using the K-means algorithm to obtain k categories.
[0012] In an optional implementation, the quantity determination unit includes: A parameter setting subunit, used to set the value range to a population range, set the individual to an integer within the population range, and set the number of iterations; A fitness calculation subunit, used for calculating the fitness of individuals, including clustering the berths based on the individuals and calculating the average silhouette coefficient based on the clusters; The individual selection subunit is used to select the two individuals with the highest fitness as the excellent individuals of this iteration; The individual genetic subunit is used to randomly select 4 new individuals from within the excellent data range defined by the current excellent individuals, and randomly select 1 individual from outside the excellent data range; The individual screening subunit is used to continuously iterate until the optimal individual is found or the number of iterations is reached, screen out the optimal individual with the highest fitness, and output the optimal individual as the optimal cluster number k.
[0013] In a third aspect, a terminal is provided, including: processor, memory, wherein: The memory is used to store computer programs. The processor is used to call and run the computer program from the memory, so that the terminal executes the above-mentioned terminal method.
[0014] According to a fourth aspect, a computer storage medium is provided, wherein the computer-readable storage medium stores instructions, and when the instructions are executed on a computer, the computer executes the methods described in the above aspects.
[0015] The beneficial effect of the present invention lies in that the method, system, terminal and storage medium for predicting the operation time of ships at bulk cargo terminals provided by the present invention classify berths by analyzing the similarities and differences between berths, and then establish corresponding Stacking models based on the berth categories, thereby realizing accurate prediction of the operation time of ships.
[0016] In addition, the invention has a reliable design principle, a simple structure and a very broad application prospect. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention.
[0019] Figure 2 It is a schematic diagram of a model of a method according to an embodiment of the present invention.
[0020] Figure 3 It is a schematic diagram of model training of a method according to an embodiment of the present invention.
[0021] Figure 4 is a schematic block diagram of a system according to an embodiment of the present invention.
[0022] Figure 5 A schematic diagram of the structure of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0023] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0024] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.
[0025] The bulk cargo terminal ship operation time prediction method provided by the embodiment of the present invention is executed by a computer device, and accordingly, the bulk cargo terminal ship operation time prediction system runs in the computer device.
[0026] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention. Figure 1 The execution subject may be a bulk cargo terminal ship operation time prediction system. According to different requirements, the order of the steps in the flow chart may be changed, and some may be omitted.
[0027] like Figure 1 As shown, the method includes: Step 110, obtaining the carrying capacity data and location data of the berths, and dividing the berths of the bulk cargo terminal into multiple categories based on the carrying capacity data and location data of the berths; Step 120, training a corresponding Stacking model for each category, wherein the base model of the Stacking model includes a multivariate linear regression model, a random forest model, an XGBoost model, and a support vector regression model; Step 130, obtaining basic data and characteristic data of the ship to be moored, calling a corresponding target Stacking model for the ship to be moored based on the category corresponding to the basic data, and using the target Stacking model to predict the operation time based on the characteristic data.
[0028] To facilitate understanding of the present invention, the following further describes the method for predicting ship operation time at a bulk cargo terminal provided by the present invention based on the principle of the method for predicting ship operation time at a bulk cargo terminal provided by the present invention and in combination with the process of predicting ship operation time at a bulk cargo terminal in an embodiment.
[0029] Specifically, the bulk cargo terminal ship operation time prediction method includes: S1. Obtaining carrying capacity data and location data of a berth, and dividing the berths of a bulk cargo terminal into multiple categories based on the carrying capacity data and location data of the berth.
[0030] S101. Acquire the carrying capacity data and location data of a berth, wherein the carrying capacity data includes the average tonnage and types of cargo handled by the berth, and save the carrying capacity data and location data of a berth as a data point.
[0031] S102, setting a value range of the number of categories, and using a genetic algorithm to obtain an optimal number of clusters k based on silhouette coefficients of different numbers of categories.
[0032] Set the value range to the population range, set the individual to an integer within the population range, and set the number of iterations; calculate the fitness of the individual, including clustering the berths based on the individual, and calculate the average silhouette coefficient based on the clustering clusters; select the two individuals with the highest fitness as the excellent individuals of this iteration; randomly select 4 new individuals from the excellent data range limited by the current excellent individuals, and randomly select 1 individual from outside the excellent data range; continue to iterate until the optimal individual is found or the number of iterations is reached, screen out the optimal individual with the highest fitness, and output the optimal individual as the optimal cluster number k.
[0033] The calculation method of the average silhouette coefficient includes: The silhouette coefficient comprehensively considers the similarity (cohesion) of samples within the same cluster and the dissimilarity (separation) of samples between different clusters. Its value range is between -1 and 1. The larger the value, the better the clustering effect. The silhouette coefficient is:
[0034] in It is a data point The average distance to other data points in the same cluster, It is a data point The average distance of all data points to the nearest different cluster. For a given number of clusters , calculate the mean of the silhouette coefficients of all data points , called the average silhouette coefficient under this number of clusters:
[0035] For a bulk cargo terminal with n berths, the candidate The value set is .
[0036] S103 , using a K-means algorithm to cluster the berths of the bulk cargo terminal based on the optimal number of clusters k, to obtain k categories.
[0037] K-means clustering algorithm is an unsupervised learning method used to solve the problem of clustering data points in multidimensional space. The core idea is to iteratively assign data points to the cluster represented by the nearest centroid (center point of the cluster), and then update the centroid of each cluster to the average value of all points in the cluster until a certain convergence condition is reached or the preset maximum number of iterations is reached. The goal of the K-means clustering algorithm is to minimize the sum of the squared distances between the data points in the cluster and the center of the cluster to which they belong. For a data set { x 1, x 2,…, x n}, the objective function is defined as follows:
[0038] in K is the number of clusters, is the jth cluster, It is a cluster The data points in It is a cluster The K-means clustering process is as follows: first, randomly select K centers, denoted as For each data point , calculate its distance to each center point, and then Assigned to the cluster corresponding to the nearest center point. Then for each cluster , calculate the mean of all its data points as the new center point. Repeat the assignment and update steps until the cluster center no longer changes or the maximum number of iterations is reached.
[0039] By allocating ships of different tonnage to berths of corresponding sizes, it is possible to effectively avoid waste of resources and reduce interference between different ships. By rationally allocating berth resources according to the type and quantity of cargo, the port can maximize its role as a logistics hub.
[0040] S2. A corresponding Stacking model is trained for each category, wherein the base models of the Stacking model include a multivariate linear regression model, a random forest model, an XGBoost model and a support vector regression model.
[0041] S201, collecting operation record data of the berth, calculating the correlation between each parameter item in the operation record data and the operation duration using the Pearson correlation coefficient calculation method, and screening out relevant parameter items whose correlation reaches a preset threshold, extracting parameter values of the relevant parameter items from the operation record data, and obtaining operation data.
[0042] Different characteristics have different correlations with homework time. The Pearson correlation coefficient, also known as the Pearson product-moment correlation coefficient, is a linear correlation coefficient widely used in statistics, which can measure the degree of linear correlation between two variables. Its value range is [-1,1], where 1 indicates a perfect positive correlation, -1 indicates a perfect negative correlation, and 0 indicates no correlation. The larger the absolute value of the Pearson correlation coefficient, the stronger the linear relationship between the two variables. The overall Pearson correlation coefficient between two variables is defined as the quotient of the product of the covariance and the standard deviation between the two variables, and is defined as follows:
[0043] in is the covariance, is the standard deviation. In practical applications, the calculation of the Pearson correlation coefficient is based on the covariance and standard deviation of the sample. It is usually represented by the letter r. The sample expectation, variance, and covariance estimation formulas are as follows.
[0044]
[0045]
[0046]
[0047] The final sample correlation coefficient calculation formula is as follows.
[0048]
[0049] The Pearson correlation coefficient was used to calculate the correlation between the characteristics of each type of berth and the operation time, and the importance of the characteristics of each type of berth was obtained as shown in Table 1. In general, the correlation between the characteristics of various berths and their operation time showed diversity and complexity. The core transportation parameters such as tonnage, length, deadweight tonnage showed a high correlation in all berths, which reflects the fundamental influence of these basic transportation attributes on the berth operation time. At the same time, time factors such as year and month also had an impact on the operation time, which may involve the operation mode, operation arrangement and cyclical changes of port operations in different years and seasons. In addition, the types of goods such as aluminum ore, coal and ore also had different degrees of influence on the operation time. This may be related to the loading and unloading efficiency, operation difficulty and transportation demand of different goods. Weather factors also showed a certain correlation in multiple berths, and adverse weather conditions usually prolonged the operation time. It is worth noting that there are also certain differences in the correlation of characteristics between different berths. This may be related to a variety of factors such as the geographical location, equipment conditions, operation process and management level of the berth.
[0050] Table 1. Ranking of characteristics of various berths
[0051] The relevant parameter items obtained by the Pearson correlation coefficient calculation method are also the parameter items involved in the subsequent acquisition of ship characteristic data.
[0052] S202, and saving the operation data of berths of the same category into the same data set to obtain a data set corresponding to each category of berth; the operation data includes operation time, cargo type, hull length, deadweight tonnage, cargo tonnage, weather data and operation stop time; using the data sets corresponding to each category of berth to train their respective Stacking models, respectively, to obtain a Stacking model corresponding to each category.
[0053] Ship operation time prediction is to extract features from historical data to form a feature set , and then find the best mapping function ,in are the function's parameters, is the prediction target, i.e., the ship operation time. When it appears, its operation time can be predicted by this function .
[0054]
[0055] Among the existing methods for predicting ship berthing time, both the traditional calculation model based on cargo volume and loading and unloading efficiency and the emerging machine learning methods have certain limitations.
[0056] Please refer to Figure 2 , Stacking algorithm is a special integration method that generates a meta-learner by combining the prediction results of different individual learners, and then predicts the data. In Stacking, the base learners are usually different types of machine learning algorithms that learn from the data independently and make predictions. These predictions are then used as input to another model, the meta-learner, whose task is to synthesize these predictions to make the final decision.
[0057] in C 1,…, C m It is a base learner (base model). In the first layer, each base learner predicts the training data and produces a series of meta-features P 1, P 2,…, P m In the second layer, the meta-learner uses the prediction results of the base learner as input features for training and obtains the final prediction results. The advantage of Stacking ensemble learning is that it can take advantage of the complementary advantages of different models to improve the overall performance. By combining the prediction results of multiple models, Stacking can better adapt to different types of data distributions and patterns, thereby improving the generalization ability of the model.
[0058] Please refer to Figure 3 In the actual use of Stacking ensemble learning methods, in order to avoid the risk of overfitting, cross-validation operations are often used. First, the original data set is divided into a training set and a test set. In each cross-validation, each base learner is trained on the current training data and predicted on the validation data to obtain the prediction results. In this way, each base learner can obtain k The prediction results of the validation set are the prediction values of the original training set. Similarly, for the test set, the current base learner will be used for prediction in each cross-validation, so that the prediction of each base learner on the test set can be obtained. k The stacking model is a set of three models that are trained on the test set. The stacking model is used to generate predictions for the test set, and then averages these predictions to get the final prediction of each base learner on the test set. Next, these predictions are combined to form new features as the input of the meta-learner. The task of the meta-learner is to train based on these new features and get the final prediction. Through cross-validation, the stacking model can make full use of the information in the data set and improve the prediction performance of the model by integrating the advantages of multiple base learners.
[0059] The base model includes: (1) Multivariate Linear Ensemble Learning Multiple Linear Regression is a statistical method used to analyze the relationship between multiple independent variables and a continuous dependent variable. Its basic idea is to describe the relationship between the independent variables and the dependent variable by fitting a linear equation. Its mathematical form can be expressed as: ; in, is the dependent variable, , ,…, is the independent variable, , ,…, are model parameters, is the error term. The goal of a multiple linear regression model is to determine the best parameter estimates by minimizing the difference between the predicted values and the true values (usually using the least squares method). The resulting model can be used to predict the value of the dependent variable given the value of the independent variable, as well as to assess the degree of influence of each variable on the dependent variable.
[0060] (2) Random Forest Regression Random Forest Regression is an ensemble learning method based on decision trees. It predicts continuous dependent variables by constructing multiple decision trees and combining their prediction results. The core idea of random forest regression is to construct multiple decision trees by randomly selecting subsets of training data and subsets of features. When predicting, each decision tree will give a prediction result, and then the final prediction result is obtained by taking the average. In essence, random forest is a decision tree optimization that combines several decision trees, each tree corresponds to an independently sampled sample set, and the final classification result depends on the classification ability of each tree. The construction of random forest includes the following steps: generating a training set of a single decision tree from the original data set by random and replacement sampling; randomly selecting several features to divide the nodes and constructing an unpruned decision tree; and finally running the random forest algorithm to obtain the classification result. The idea of randomness makes the random forest algorithm highly noise-robust, and its integration method not only effectively reduces overfitting, but also significantly improves the generalization ability of the model.
[0061] (3) XGBoost XGBoost (Extreme Gradient Boosting) is an optimized distributed gradient boosting library designed to solve many data science problems efficiently, flexibly and portable. The core idea is to optimize the objective function by continuously adding new decision trees, and each new tree aims to correct the prediction residuals of all previous trees. The objective function of XGBoost is as follows: ; in, is the loss function, which measures the model prediction value With the true value The difference between is a regular term used to control the complexity of the model and prevent overfitting; K is the number of trees; Represents model parameters.
[0062] XGBoost uses a second-order Taylor expansion to approximate the loss function, allowing the model to find the optimal solution more accurately in each iteration. In addition, the regularization term in XGBoost includes the number of leaf nodes in the tree and the L2 norm of the leaf node weights, which helps control the complexity of the model and prevent the model from overfitting on the training data. The introduction of the regularization term allows XGBoost to maintain good generalization performance while pursuing prediction accuracy.
[0063] (4) Support Vector Regression Support Vector Regression (SVR) is a regression method based on support vector machines. Its core idea is to find a hyperplane in the feature space that minimizes the distance from the data point to the hyperplane while maintaining the flatness of the hyperplane. The optimization goal of SVR is to find an optimal hyperplane, and its mathematical form is as follows: ; ; in is the weight vector, is the bias term, and is the slack variable, is the regularization parameter, is the tolerance deviation, is the input feature vector, is the corresponding target value. The optimization goal is to find the weight vector and the bias term , so that the model has the smallest error on the entire data set, and at the same time through the regularization term Control model complexity.
[0064] In the nonlinear case, SVR maps the input space to a high-dimensional feature space through a nonlinear mapping, and constructs a linear SVR model in this high-dimensional space. It is used to calculate the inner product in high-dimensional feature space, thus avoiding complex calculations directly in high-dimensional space.
[0065] The multivariate linear regression model is simple and easy to explain, and has good fitting ability for linear relationship data. Random forest is a combined prediction algorithm that makes predictions by building multiple decision trees and voting or taking the average. The random forest algorithm is not only highly accurate, can handle complex data sets and automatically adapt to nonlinear relationships, but also has strong robustness and good tolerance to noise and outliers. XGBoost is an efficient and scalable gradient boosting decision tree algorithm that reduces overfitting by optimizing the objective function and introducing regularization terms. It also uses column subsampling and parallelization techniques to improve training speed and model stability. It can handle high-dimensional data and nonlinear relationships, and has strong robustness to noise and outliers. The SVM model is good at handling small samples, high-dimensional data and nonlinear classification problems, and may have better performance in some scenarios. For the meta-learner, this paper chooses linear regression as the meta-learner, which can further learn and integrate the prediction results of the base model to obtain more accurate and stable predictions.
[0066] S3. Obtain basic data and characteristic data of the ship to be moored, retrieve a corresponding target Stacking model for the ship to be moored based on a category corresponding to the basic data, and use the target Stacking model to predict the operation time based on the characteristic data.
[0067] Obtain the basic data of the ship to be berthed, including the type of cargo and tonnage of cargo; obtain the matching berth category based on the basic data, and call the corresponding target Stacking model.
[0068] The deadweight tonnage, cargo tonnage, hull length and cargo type of the ship to be moored are obtained from the interactive interface, and the loading rate is calculated based on the deadweight tonnage and cargo tonnage; the loading rate calculation formula is: ; in, is the cargo tonnage, For deadweight tons.
[0069] Acquire meteorological data within a specified period (such as three days of weather data starting from the day the ship berths) from the meteorological forecast platform, and quantify the meteorological data into meteorological characteristic values; for example, sunny and windless weather is quantified as 1, wind force 7 is quantified as 2, and heavy rain is quantified as 3.
[0070] The system time is obtained and quantified into a time characteristic value, which is quantified into a month according to a current date.
[0071] The cargo type, hull length, loading rate, meteorological characteristic values and time characteristic values are input into the target Stacking model to obtain the predicted operation time.
[0072] In some embodiments, the bulk cargo terminal ship operation time prediction system may include multiple functional modules composed of computer program segments. The computer program of each program segment in the bulk cargo terminal ship operation time prediction system may be stored in the memory of a computer device and executed by at least one processor to execute (see Figure 1 Description) Function to predict ship operation time at bulk cargo terminal.
[0073] In this embodiment, the bulk cargo terminal ship operation time prediction system can be divided into multiple functional modules according to the functions it performs, such as Figure 4 As shown. The functional modules of the system 400 may include: a berth classification module 410, a model training module 420 and a time prediction module 430. The module referred to in the present invention refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, which are stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.
[0074] A berth classification module, used for obtaining the carrying capacity data and location data of the berth, and classifying the berths of the bulk cargo terminal into multiple categories based on the carrying capacity data and location data of the berth; A model training module is used to train a corresponding Stacking model for each category, wherein the base models of the Stacking model include a multivariate linear regression model, a random forest model, an XGBoost model, and a support vector regression model; The time prediction module is used to obtain basic data and characteristic data of the ship to be moored, retrieve the corresponding target Stacking model for the ship to be moored based on the category corresponding to the basic data, and use the target Stacking model to predict the operation time based on the characteristic data.
[0075] Optionally, as an embodiment of the present invention, the berth classification module includes: A data collection unit, used for acquiring carrying capacity data and location data of a berth, wherein the carrying capacity data includes average tonnage and types of cargo handled by the berth, and storing the carrying capacity data and location data of a berth as a data point; A quantity determination unit is used to set a value range of the number of categories and obtain an optimal number of clusters k based on silhouette coefficients of different numbers of categories using a genetic algorithm; The clustering processing unit is used to perform clustering processing on the berths of the bulk cargo terminal based on the optimal cluster number k by using the K-means algorithm to obtain k categories.
[0076] Optionally, as an embodiment of the present invention, the quantity determination unit includes: A parameter setting subunit, used to set the value range to a population range, set the individual to an integer within the population range, and set the number of iterations; A fitness calculation subunit, used for calculating the fitness of individuals, including clustering the berths based on the individuals and calculating the average silhouette coefficient based on the clusters; The individual selection subunit is used to select the two individuals with the highest fitness as the excellent individuals of this iteration; The individual genetic subunit is used to randomly select 4 new individuals from within the excellent data range defined by the current excellent individuals, and randomly select 1 individual from outside the excellent data range; The individual screening subunit is used to continuously iterate until the optimal individual is found or the number of iterations is reached, screen out the optimal individual with the highest fitness, and output the optimal individual as the optimal cluster number k.
[0077] Figure 5 The present invention is a schematic diagram of the structure of a terminal 500 provided in an embodiment of the present invention. The terminal 500 can be used to execute the bulk cargo terminal ship operation time prediction method provided in an embodiment of the present invention.
[0078] The terminal 500 may include: a processor 510, a memory 520 and a communication unit 530. These components communicate via one or more buses. Those skilled in the art will appreciate that the server structure shown in the figure does not limit the present invention, and it may be a bus structure or a star structure, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0079] The memory 520 can be used to store the execution instructions of the processor 510, and the memory 520 can be implemented by any type of volatile or non-volatile storage terminal or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. When the execution instructions in the memory 520 are executed by the processor 510, the terminal 500 can execute some or all of the steps in the following method embodiments.
[0080] The processor 510 is the control center of the storage terminal, and uses various interfaces and lines to connect various parts of the entire electronic terminal. It runs or executes software programs and / or modules stored in the memory 520, and calls data stored in the memory to perform various functions of the electronic terminal and / or process data. The processor can be composed of an integrated circuit (IC), for example, it can be composed of a single packaged IC, or it can be composed of multiple packaged ICs with the same or different functions. For example, the processor 510 can only include a central processing unit (CPU). In the embodiment of the present invention, the CPU can be a single computing core or multiple computing cores.
[0081] The communication unit 530 is used to establish a communication channel so that the storage terminal can communicate with other terminals, receive user data sent by other terminals or send user data to other terminals.
[0082] The present invention also provides a computer storage medium, wherein the computer storage medium may store a program, and when the program is executed, the program may include some or all of the steps in each embodiment provided by the present invention. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).
[0083] Therefore, the present invention classifies berths by analyzing the similarities and differences between berths, and then establishes corresponding Stacking models based on the berth categories to achieve accurate prediction of the operation time of the ship. The technical effects that can be achieved by this embodiment can be found in the description above and will not be repeated here.
[0084] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present invention, in essence or in other words, the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes, including several instructions for enabling a computer terminal (which can be a personal computer, a server, or a second terminal, a network terminal, etc.) to execute all or part of the steps of the methods described in each embodiment of the present invention.
[0085] In this specification, the same or similar parts between the various embodiments can be referred to each other. In particular, for the terminal embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.
[0086] In the several embodiments provided by the present invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of systems or modules, which can be electrical, mechanical or other forms.
[0087] In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0088] Although the present invention has been described in detail with reference to the accompanying drawings and in combination with the preferred embodiments, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, a person of ordinary skill in the art may make various equivalent modifications or substitutions to the embodiments of the present invention, and these modifications or substitutions shall be within the scope of the present invention. Any person of ordinary skill in the art may easily think of changes or substitutions within the technical scope disclosed by the present invention, and these shall be within the scope of protection of the present invention.
Claims
1. A method for predicting ship operation time at a bulk cargo terminal, characterized in that: include: acquiring carrying capacity data and location data of the berths, and classifying the berths of the bulk cargo terminal into a plurality of categories based on the carrying capacity data and location data of the berths; A corresponding Stacking model is trained for each category, wherein the base models of the Stacking model include a multivariate linear regression model, a random forest model, an XGBoost model, and a support vector regression model; The basic data and characteristic data of the ship to be moored are obtained, a corresponding target Stacking model is retrieved for the ship to be moored based on a category corresponding to the basic data, and the target Stacking model is used to predict the operation time based on the characteristic data.
2. The method according to claim 1, characterized in that The carrying capacity data and location data of the berths are obtained, and the berths of the bulk cargo terminal are divided into multiple categories based on the carrying capacity data and location data of the berths, including: Acquire the carrying capacity data and location data of the berth, wherein the carrying capacity data includes the average tonnage and type of cargo handled by the berth, and save the carrying capacity data and location data of one berth as one data point; Set the value range of the number of categories, and use the genetic algorithm to obtain the optimal number of clusters k based on the silhouette coefficient of different numbers of categories; The K-means algorithm is used to cluster the berths of the bulk cargo terminal based on the optimal number of clusters k to obtain k categories.
3. The method according to claim 2, characterized in that Set the value range of the number of categories and use the genetic algorithm to obtain the optimal number of clusters k based on the silhouette coefficient of different numbers of categories, including: Set the value range to the population range, set the individual to an integer within the population range, and set the number of iterations; Calculating the fitness of the individuals, including clustering the berths based on the individuals, and calculating the average silhouette coefficient based on the clusters; Select the two individuals with the highest fitness as the excellent individuals of this iteration; Randomly select 4 new individuals from the excellent data range defined by the current excellent individuals, and randomly select 1 individual from outside the excellent data range; Iterate continuously until the optimal individual is found or the number of iterations is reached, select the optimal individual with the highest fitness, and output the optimal individual as the optimal cluster number k.
4. The method according to claim 1, characterized in that: include: A corresponding Stacking model is trained for each category. The base model of the Stacking model includes a multivariate linear regression model, a random forest model, an XGBoost model, and a support vector regression model, including: Collect the operation record data of the berth, calculate the correlation between each parameter item in the operation record data and the operation duration by using the Pearson correlation coefficient calculation method, and screen out the relevant parameter items whose correlation reaches the preset threshold, extract the parameter values of the relevant parameter items from the operation record data, and obtain the operation data; The operation data of berths of the same category are saved in the same data set to obtain a data set corresponding to each category of berth; the operation data includes operation time, cargo type, hull length, deadweight tonnage, cargo tonnage, weather data and operation downtime; The data sets corresponding to each category of berths are used to train the respective Stacking models to obtain the Stacking models corresponding to each category.
5. The method according to claim 1, characterized in that Acquiring basic data and characteristic data of the ship to be moored, retrieving a corresponding target Stacking model for the ship to be moored based on a category corresponding to the basic data, and using the target Stacking model to predict the operation time based on the characteristic data, including: Obtaining basic data of the ship to be moored, the basic data including cargo type and cargo tonnage; Acquire matching berth categories based on the basic data, and retrieve corresponding target Stacking models; Obtain the deadweight tonnage, cargo tonnage, hull length and cargo type of the vessel to be moored from the interactive interface, and calculate the loading rate based on the deadweight tonnage and cargo tonnage; Acquire meteorological data within a specified period from a meteorological forecast platform, and quantify the meteorological data into meteorological characteristic values; Acquiring system time, and quantifying the system time into a time characteristic value; The cargo type, hull length, loading rate, meteorological characteristic value and time characteristic value are input into the target Stacking model to obtain the predicted operation time.
6. A bulk cargo terminal ship operation time prediction system, characterized in that: include: A berth classification module, used for obtaining the carrying capacity data and location data of the berth, and classifying the berths of the bulk cargo terminal into multiple categories based on the carrying capacity data and location data of the berth; A model training module is used to train a corresponding Stacking model for each category, wherein the base models of the Stacking model include a multivariate linear regression model, a random forest model, an XGBoost model, and a support vector regression model; The time prediction module is used to obtain basic data and characteristic data of the ship to be moored, retrieve the corresponding target Stacking model for the ship to be moored based on the category corresponding to the basic data, and use the target Stacking model to predict the operation time based on the characteristic data.
7. The system according to claim 6, characterized in that: The berth classification module includes: A data collection unit, used for acquiring carrying capacity data and location data of a berth, wherein the carrying capacity data includes average tonnage and types of cargo handled by the berth, and storing the carrying capacity data and location data of a berth as a data point; A quantity determination unit is used to set a value range of the number of categories and obtain an optimal number of clusters k based on silhouette coefficients of different numbers of categories using a genetic algorithm; The clustering processing unit is used to perform clustering processing on the berths of the bulk cargo terminal based on the optimal cluster number k by using the K-means algorithm to obtain k categories.
8. The system according to claim 7, characterized in that The quantity determination unit comprises: A parameter setting subunit, used to set the value range to a population range, set the individual to an integer within the population range, and set the number of iterations; A fitness calculation subunit, used for calculating the fitness of individuals, including clustering the berths based on the individuals and calculating the average silhouette coefficient based on the clusters; The individual selection subunit is used to select the two individuals with the highest fitness as the excellent individuals of this iteration; The individual genetic subunit is used to randomly select 4 new individuals from within the excellent data range defined by the current excellent individuals, and randomly select 1 individual from outside the excellent data range; The individual screening subunit is used to continuously iterate until the optimal individual is found or the number of iterations is reached, screen out the optimal individual with the highest fitness, and output the optimal individual as the optimal cluster number k.
9. A terminal, characterized in that: include: A memory for storing a bulk cargo terminal ship operation time prediction program; A processor, configured to implement the steps of the bulk cargo terminal ship operation time prediction method as claimed in any one of claims 1 to 5 when executing the bulk cargo terminal ship operation time prediction program.
10. A computer-readable storage medium storing a computer program, characterized in that: The readable storage medium stores a bulk cargo terminal ship operation time prediction program, and when the bulk cargo terminal ship operation time prediction program is executed by the processor, the steps of the bulk cargo terminal ship operation time prediction method according to any one of claims 1 to 5 are implemented.
Citation Information
Cited By
Ship berthing time prediction method based on EEMD-SSA-SVR model
CN119398252A
Stockyard inventory prediction method, system, equipment and medium
CN122636094A
Storage Yard Inventory Forecasting Methods, Systems, Equipment and Media
CN122636094B
