Marine main engine energy consumption prediction method and device based on uncertainty estimation

Through the method based on uncertainty estimation, the confidence interval for ship energy consumption is generated, which solves the problem of lack of credibility of the point prediction value in the prior art, and achieves more stable and reliable energy consumption prediction, supporting decision-making of intelligent shipping and energy efficiency management systems.

CN120448764APending Publication Date: 2025-08-08JIMEI UNIV

Patent Information

Application Number
CN202510939664.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-08
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

The existing ship energy consumption prediction methods only provide point prediction values, lack of uncertainty quantification, resulting in a lack of credibility in the prediction results, especially in the face of data noise and environmental changes, which makes it difficult to support decision support.

Method used

Using a method based on uncertainty estimation, after receiving historical navigation data and standardized processing, the base model is selected to generate residual samples, a Stacking integrated model is constructed, and a MAPIE library is used for conformal prediction, combined with Optuna optimization hyperparameters, to generate confidence intervals for energy consumption of each ship.

Benefits of technology

The generated prediction interval has statistical coverage guarantee, which improves the stability and reliability of the prediction, provides a reliable confidence boundary reference, and enhances the decision-making support capabilities of intelligent shipping scheduling and energy efficiency management systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120448764A_ABST
    Figure CN120448764A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of ship energy consumption prediction, in particular to a ship main engine energy consumption prediction method and device based on uncertainty estimation, and the method comprises the steps: receiving historical navigation data of a target ship, dividing the historical navigation data into a training set and a test set, and carrying out the standardization processing; training the base model by using the training set and generating a residual sample; taking a prediction result of the base model as a new input feature, and training a linear regression meta-model to construct a Stacking integrated model; calculating quantiles according to the residual samples and constructing a prediction interval; calling an MAPIE library to automatically realize a CV + conformal prediction process, and automatically optimizing hyper-parameters of the base model by using Optuna to obtain an optimal model parameter combination; and outputting the energy consumption predicted value of each target ship and the corresponding confidence interval. According to the method, the stability and reliability of the ship energy consumption prediction result can be improved, quantitative expression of the confidence coefficient of the prediction result in an energy efficiency management system is realized, and the practicability and decision support capability of the method in scenes such as intelligent shipping scheduling are enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of ship energy consumption prediction, and in particular to a method and device for predicting ship main engine energy consumption based on uncertainty estimation. Background Art

[0002] Ship energy consumption is not only directly related to the operating costs of shipping companies, but also closely related to national energy security and environmental protection. Ship energy consumption forecasting, as an important prerequisite for optimizing ship energy consumption, can provide further decision-making support for ship shipping mission arrangements. Ship energy consumption is mainly affected by a variety of factors, including ship type, sailing speed, load, climate conditions, and marine environment.

[0003] Currently, ship energy consumption forecasting mainly relies on machine learning models trained on historical navigation data to output point predictions of energy consumption. However, in practical applications, a single prediction value alone is insufficient to support key decisions such as ship scheduling and carbon emission assessments. This is especially true when faced with data noise, model bias, or changes in the external environment. The uncertainty of the prediction results is particularly prominent. Most existing energy efficiency analysis systems fail to provide an expression of the uncertainty of the prediction results, resulting in a lack of credibility reference for the prediction values, which can easily lead to decision-making biases. In addition, traditional confidence interval construction methods often rely on data distribution assumptions (such as normal distribution and homoscedasticity), which are often difficult to meet in actual navigation data, resulting in an inability to guarantee coverage or extremely unstable intervals. Summary of the Invention

[0004] In view of this, the purpose of the present invention is to provide a method and device for predicting ship main engine energy consumption based on uncertainty estimation, so as to at least solve the problem that existing ship energy consumption prediction methods only provide point predictions and lack uncertainty quantification.

[0005] The present invention solves the above technical problems through the following technical means: In a first aspect, an embodiment of the present invention provides a method for predicting energy consumption of a ship main engine based on uncertainty estimation, comprising the following steps: Receive the historical navigation data of the target ship, divide the historical navigation data into a training set and a test set, and perform standardization processing; Select a base model, use the training set to train the base model and generate residual samples; The prediction results of the base model are used as new input features to train the linear regression meta-model to build the Stacking ensemble model; Calculate quantiles and construct prediction intervals based on residual samples; Call the MAPIE library to automatically implement the CV+ conformal prediction process, and use Optuna to automatically optimize the hyperparameters of the base model to obtain the optimal model parameter combination; Output the predicted energy consumption value of each target ship and its corresponding confidence interval.

[0006] Furthermore, the receiving of historical navigation data of the target ship, dividing the historical navigation data into a training set and a test set, and performing standardization processing includes: Receiving historical navigation data of a target vessel from a voyage recording system; Perform data cleaning on historical navigation data; The cleaned navigation data is divided into training set and test set in the ratio of 8:2, which are used as input features of various models; The input features are normalized. The formula for normalization is as follows:

[0007] Where, X is the original eigenvalue, is the mean value of the feature in the training set, is the standard deviation of the feature in the training set.

[0008] Furthermore, the navigation data includes ship speed, average draft, wind speed, engine power, trim, relative wind direction, wave height, relative wave direction, current speed, and relative current direction.

[0009] Furthermore, the selecting of a base model, using a training set to train the base model and generating residual samples includes: Four models, K-nearest neighbor, extreme gradient boosting, decision tree and multi-layer perceptron, were selected as base models; Use the training set to train four base models to form an initial prediction model; A 5-fold cross-validation model evaluation method was used to test the generalization ability of the initial prediction model; Predict the unseen data on each fold and record the residual, and construct a residual sample set. The residual calculation formula is as follows:

[0010] Where, r i For the i The residual of the sample, y i For the i The true value of the sample, is the model prediction value; the residual sample set , k is the first k subsets.

[0011] Furthermore, the four models of K-nearest neighbor, extreme gradient boosting, decision tree and multi-layer perceptron are selected as base models, including: Based on the type of prediction model, linear regression, extreme gradient boosting, lightweight gradient boosting machine, K nearest neighbor, support vector machine, multi-layer perceptron, and decision tree candidate models are selected; Perform correlation analysis on the residuals of the prediction output of the candidate model to obtain the correlation coefficient matrix; The degree of linear correlation between candidate models is revealed through heat map visualization; Through 5-fold cross-validation, the goodness of fit and mean square error of each candidate model are obtained to evaluate the prediction accuracy and generalization ability of the candidate model; The models with the highest fit and the smallest error are selected as the base models, namely the K nearest neighbor, extreme gradient boosting, decision tree and multi-layer perceptron models.

[0012] Furthermore, the calculation of quantiles based on residual samples and the construction of prediction intervals include: Calculate the quantile value based on the desired confidence level based on the residual sample Q 1-α ,as follows:

[0013] Where, is the residual set, is the total number of elements, It is a binary indicator function that outputs 1 when the condition is met, otherwise it outputs 0. is the lower bound; Use the trained Stacking ensemble model to predict the test data and obtain the point prediction value; Use quantile values to symmetrically expand the point prediction value and construct the prediction interval .

[0014] Furthermore, the use of Optuna to automatically optimize the hyperparameters of the base model to obtain the optimal model parameter combination includes: Calculate the prediction interval coverage as follows:

[0015] Where: Is an indicator function, a logical judgment function; if y i Falls within the prediction interval Inside, The value of is 1, otherwise it is 0; n is the sample size, and They are i The lower and upper bounds of the sample prediction interval; Calculate the average width of the interval as follows:

[0016] Calculate the interval score as follows:

[0017] Where: α is the significance level, which represents the allowable error rate, y i For the i The true value of the sample, If the true value y i Greater than the upper limit of the prediction interval u i , then take the difference, otherwise take 0; If the true value y i Less than the lower limit of the prediction interval l i , then take the difference, otherwise take 0.

[0018] In the second aspect, the present invention also provides a ship main engine energy consumption prediction device based on uncertainty estimation, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in the first aspect above when executing the computer program.

[0019] In a third aspect, the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.

[0020] The ship main engine energy consumption prediction method based on uncertainty estimation of the present invention has the advantages of being independent of data distribution assumptions and having strong interval stability. It adopts the CV+ method in the conformal prediction framework and constructs the prediction interval by performing quantile estimation on the empirical distribution of the model residual, avoiding the assumptions of error normality and homoscedasticity. It is suitable for complex, nonlinear and heteroscedastic data environments and has stronger adaptability and stability in actual ship operation data. The ship main engine energy consumption prediction method based on uncertainty estimation of the present invention has the advantages of statistical coverage guarantee and improved prediction reliability. The prediction interval generated by it has a theoretical coverage guarantee of 1-α, which is significantly better than the traditional method based on standard deviation estimation and can provide a reliable confidence boundary reference for the ship energy efficiency management system. The ship main engine energy consumption prediction method based on uncertainty estimation of the present invention integrates multi-model information and effectively reduces the influence of single model errors. It adopts a stacking integration strategy to integrate the prediction results of multiple base learners such as KNN, random forest, decision tree, neural network, etc., enhances the model generalization ability, effectively reduces the deviation fluctuation caused by a single model, and significantly improves the prediction performance. The ship main engine energy consumption prediction method based on uncertainty estimation of the present invention supports automatic hyperparameter optimization, has strong adaptability and better performance. It introduces the Optuna optimization framework to realize automatic hyperparameter search, can quickly find the optimal model combination under different data partitions, and avoid the instability problem of manual parameter adjustment.

[0021] The ship main engine energy consumption prediction method based on uncertainty estimation of the present invention can be directly embedded in the ship energy efficiency management system and route optimization system. It is applicable to energy consumption data of different ship types and different environments, and improves the credibility of the model output of the intelligent shipping system. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 This is a flow chart of a method for predicting energy consumption of ship main engines based on uncertainty estimation; Figure 2 This is a system architecture diagram of a method for predicting ship main engine energy consumption based on uncertainty estimation; Figure 3 It is a heat map of residual correlation analysis of multiple models. DETAILED DESCRIPTION

[0023] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0024] In the specification and claims herein, the terms "first" and "second" are used to distinguish different objects, rather than to describe a specific order of objects. In the description of the embodiments of this application, unless otherwise specified, the meaning of "plurality" refers to two or more. For example, "multiple processing units" refers to two or more processing units, etc., and "multiple components" refers to two or more components, etc.

[0025] In the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0026] Conformal prediction is a method for constructing prediction intervals that guarantees statistical coverage without relying on data distribution assumptions. However, its application in ship energy consumption forecasting is still limited. To achieve reliable interval representation of ship energy consumption forecasts and address current prediction issues such as the lack of confidence bounds and unstable intervals, a universal, statistically sound, and engineering-friendly interval prediction method is urgently needed to meet the development needs of smart and green shipping.

[0027] This application addresses the problem that existing ship energy consumption prediction methods only provide point predictions and lack uncertainty quantification. This application proposes an interval energy consumption prediction method based on conformal prediction. Combining the Stacking integrated model with an automatic hyperparameter optimization method, through residual calibration and quantile expansion strategies, it generates a prediction interval with statistical coverage guarantee. The energy consumption prediction method of this application can improve the stability and reliability of ship energy consumption prediction results, realize the quantitative expression of the confidence of prediction results in energy efficiency management systems, and enhance its practicality and decision support capabilities in scenarios such as intelligent shipping scheduling and carbon emission control.

[0028] Please refer to Figure 1 The ship main engine energy consumption prediction method based on uncertainty estimation of the present application comprises the following steps: Step 100: receiving historical navigation data of the target ship, dividing the historical navigation data into a training set and a test set, and performing standardization processing; Step 200: Select a base model, use the training set to train the base model and generate residual samples; Step 300: Using the prediction results of the base model as new input features, training the linear regression meta-model to construct a stacking ensemble model; Step 400, calculating quantiles based on the residual samples and constructing prediction intervals; Step 500: Call the MAPIE library to automatically implement the CV+ conformal prediction process, and use Optuna to automatically optimize the hyperparameters of the base model to obtain the optimal model parameter combination; Step 600: Output the predicted energy consumption value of each target ship and its corresponding confidence interval.

[0029] In order to better understand the above technical solution, the following will be combined with the accompanying drawings and specific implementation methods to explain the above technical solution in detail. Figure 1-3 : In step 100, the system receives historical navigation data of the target vessel from the navigation recording system. This navigation data includes various indicators such as ship speed, average draft, wind speed, engine power, trim, relative wind direction, wave height, relative wave direction, current velocity, and relative current direction. Ship energy consumption data primarily comes from multi-source sensors. During actual collection, it is often affected by sensor signal drift, environmental interference, electromagnetic wave disturbances, and communication failures, resulting in missing values, outliers, and signal mutations. To prevent these problems from interfering with the model training results, the data is cleaned, missing values, outliers, noise values, etc. are deleted, and missing value processing is performed to delete or interpolate missing values that cannot be repaired in the data; noise value filtering is performed by using statistical methods such as moving average and Gaussian filtering to smooth periodic noise and reduce the interference of data noise on the model. For example, high-frequency noise caused by equipment vibration in the main engine speed data can be filtered by the sliding window averaging method; outlier detection is performed based on domain knowledge or statistical methods such as Z-score and IQR to identify and correct outliers. For example, if the "speed over ground" at a certain moment is significantly higher than the design speed of the ship, it is determined to be an outlier and verified and corrected. The cleaned data is divided into training and test sets in an 8:2 ratio, and the input features are standardized to ensure the stability of the model training, and finally a ship energy consumption prediction database is formed. The formula for the standardization process is as follows:

[0030] In the above formula, X is the original eigenvalue, is the mean value of the feature in the training set, is the standard deviation of the feature in the training set.

[0031] In step 200, the selection of base models should follow the principle of diversity to ensure that their prediction results complement each other, thereby improving the overall prediction performance of the model. Based on the model type, Linear Regression, XGBoost, LightGBM, KNN, SVM, MLP, and Decision Tree are selected as candidate base models. First, a correlation analysis is performed on the residuals of the prediction outputs of the candidate models to obtain a correlation coefficient matrix. The steps of the correlation analysis are as follows: (1) For each candidate model, its residual vector on the test set is defined as:

[0032] In the above formula: is the predicted value of the model, is the true value, is the residual vector.

[0033] (2) Two models i and j The residual vectors are and , their Pearson correlation coefficient calculation formula is:

[0034] In the above formula: For the model i No. k The residual of the sample, Model i The numerator is the covariance of the residuals from the two models, and the denominator is the product of the standard deviations of the two sets of residuals.

[0035] The degree of linear correlation between models is revealed through heat map visualization. Figure 3 If the correlation coefficient is higher than 0.8, the model outputs are considered to be highly similar, and only the one with better performance is retained to improve the integration effect. The goodness of fit (R 2 ) and mean squared error (MSE) were used to evaluate the model's prediction accuracy and generalization ability, prioritizing models with high fit and low error. Ultimately, four models were selected as base models: K-nearest neighbor (KNN), extreme gradient boosting (XGBoost), decision tree (DT), and multi-layer perceptron (MLP).

[0036] After selecting the base model, the training set is used to train the base model, including KNN, XGBoost, DT, and MLP, to form an initial prediction model. Cross-validation (K=5) is then used. 5-fold cross-validation is a commonly used model evaluation method to test the generalization ability of the initial prediction model and avoid overfitting or underfitting. The details are as follows: (1) The entire historical navigation data set is divided into five equal parts (each part is called a "fold"). The five parts are roughly equal in size.

[0037] (2) Select one of the samples as the validation set (test set) and the remaining four samples as the training set. Use the training set to train the model, and then use the validation set to test the model performance.

[0038] (3) Repeat step (2) 5 times, selecting a different set as the validation set each time, and the remaining 4 sets as the training set.

[0039] (4) Finally, the results of the five verifications (such as accuracy, error, and other indicators) are averaged as the overall evaluation result of the model.

[0040] Then make predictions on the unseen data on each fold and record the residuals r i (the absolute value of the difference between the true value and the predicted value), the formula is as follows:

[0041] In the above formula, r i For the i The residual of the sample, y i For the i The true value of the sample, is the model's predicted value.

[0042] Use the calculated residuals to construct the residual sample set , k is the first k subset (i.e. k This step is the key to conformal prediction and provides the confidence bounds required for subsequent interval estimation.

[0043] For example, assuming there are 6 samples and K=3-fold cross validation, the validation is shown in Table 1: Table 1

[0044] The final residual set is:

[0045] When constructing a 95% confidence prediction interval, sort the residual set and take the 95% quantile (such as the 6th largest value):

[0046] In step 300, the prediction results of the four base models are used as new input features to train a linear regression meta-model to construct a stacking ensemble model. This step is used to combine the strengths of each model, reduce instability caused by overfitting or prediction bias in the base models, and improve the consistency and accuracy of the final prediction.

[0047] In step 400, the residual samples obtained in step 200 are aggregated and their quantile values are calculated based on the required confidence level (e.g., 95%). Q 1-α The calculation formula is as follows:

[0048] In the above formula, is the residual set, is the size of the set, that is, the total number of elements, It is a binary indicator function that outputs 1 when the condition is met and 0 otherwise. , As the lower bound, take the minimum that meets the conditions r value, that is, all the values that satisfy the cumulative ratio ≥ 1-α r The lower bound of .

[0049] Then, the final trained Stacking ensemble model is used to predict the test data to obtain the point prediction value. The quantile value is symmetrically expanded to the point prediction value to construct the prediction interval. , which reflects the confidence level of the model at this point. The formula is as follows:

[0050] In the above formula, Predict samples for new inputs, is the final model trained on the full training set, For the final model right The predicted value of Q 1-α is the residual quantile.

[0051] In step 500, the entire process of residual generation, quantile estimation, and interval generation is automatically performed by calling the MapieRegressor interface in the MAPIE library, specifying method='plus' and cv=5. This tool is compatible with sklearn and can be used with any regression model, significantly improving deployment efficiency and reducing the probability of human error.

[0052] To further improve the model's point prediction performance and interval convergence, we introduced the Optuna framework for automated hyperparameter search, adjusting parameters such as the number of neighbors for KNN, the number of trees for XGBoost, the depth of the DT, the hidden layer dimension of the MLP, and the regularization term. Using the average interval score under 5-fold cross-validation as the objective function, we used Optuna to perform a Bayesian optimization search to obtain the optimal hyperparameter combination, ensuring consistent performance across different data partitions. The interval prediction metrics are calculated as follows: (1) Prediction interval coverage probability (PICP) The prediction interval coverage reflects the probability that the target value will appear within the prediction interval and is an important indicator for measuring the reliability of interval predictions. A higher coverage means that more target values will fall within the constructed prediction interval, while a lower coverage means that fewer target values will fall within the prediction interval. Its definition is as follows:

[0053] In the above formula, Is an indicator function, which is a logical judgment function. If y i Falls within the prediction interval Inside, The value is 1 if yes, otherwise it is 0. n is the sample size, and They are i The lower and upper bounds of the sample prediction interval.

[0054] (2) Prediction Interval Average Width (PINAW) The average prediction interval width measures the width of the prediction interval. A narrower interval indicates that the model has less uncertainty about the prediction results, indicating that the model can more accurately grasp the distribution of the data. Its calculation formula is as follows:

[0055] (3) Interval Score (IS) The interval score IS takes into account the width and coverage of the prediction interval. It encourages the model to generate narrower intervals because the interval width It is part of the interval score. A narrower interval can reduce the interval score. At the same time, it punishes those cases where the true value falls outside the interval. When the true value falls outside the interval, or If it is not 0, the interval score will be increased. The calculation formula is as follows:

[0056] In the above formula, α is the significance level, which indicates the error rate we allow. For example, α=0.05 means we want a 95% confidence level. y i For the i The true value of the samples. If the true value y i Greater than the upper limit of the prediction interval u i , then take the difference, otherwise take 0. If the true value y i Less than the lower limit of the prediction interval l i , then take the difference, otherwise take 0.

[0057] In step 600, after completing steps 100 through 500, the system outputs each ship's energy consumption forecast and its corresponding confidence interval, indicating that, at a 95% confidence level, the probability that the unit energy consumption for that voyage falls within that interval is at least 95%. This result can be directly embedded in the energy efficiency assessment system to assist with scheduling, cost forecasting, and carbon emissions monitoring.

[0058] After actual application tests, the ship main engine energy consumption prediction method based on uncertainty estimation in this application has a stable average actual coverage rate (PICP) of more than 94% at a 95% confidence level, which is significantly better than the traditional method based on standard deviation estimation and can provide a reliable confidence boundary reference for the ship energy efficiency management system.

[0059] In some embodiments, the CV+ method in this application can be replaced by the Split Conformal Prediction or Jackknife+ method, which can also be used to construct prediction intervals with statistical coverage guarantees, and is suitable for scenarios with different requirements for computational efficiency or sample independence.

[0060] In some embodiments, the base model in the Stacking integration model in the present application can be replaced by other regression models, such as support vector regression (SVR), gradient boosting tree (GBDT), extreme gradient boosting (XGBoost), etc., to adapt to different data characteristics and business scenarios.

[0061] In some embodiments, the hyperparameter optimization algorithm in this application can be replaced by grid search (GridSearchCV), random search (RandomizedSearchCV) or other parameter adjustment algorithms based on Bayesian optimization, such as Hyperopt, SMAC, etc., to achieve automatic selection of hyperparameters under different computing power and time constraints.

[0062] In some embodiments, the residual non-compliance metric in this application can be the absolute residual Replaced by squared residual Or other forms such as symmetric multiplication residuals are used to adapt to the requirements of error definition for different tasks.

[0063] In some embodiments, the Mapie library in this application can be replaced by a user-defined conformal prediction module, which is manually completed using the same logical steps (such as cross-validation, quantile calculation, and interval construction) to achieve higher degrees of freedom in controlling the underlying algorithm process.

[0064] Another embodiment of the present invention provides a device for predicting energy consumption of a ship main engine based on uncertainty estimation, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, such as a program for predicting energy consumption of a ship main engine based on uncertainty estimation. When the processor executes the computer program, the steps in each of the above-mentioned embodiments of the method for predicting energy consumption of a ship main engine based on uncertainty estimation are implemented, such as Figure 1 steps.

[0065] Exemplarily, the above-mentioned computer program can be divided into one or more modules / units, one or more modules / units are stored in a memory and executed by a processor to complete the present invention. One or more modules / units can be a series of computer program instruction segments that can complete specific functions. The instruction segments are used to describe the execution process of the computer program in the ship main engine energy consumption prediction device based on uncertainty estimation. For example, the computer program can be divided into a data acquisition and processing module, a model training module, an integrated model construction module, a prediction interval construction module, an optimal model acquisition module and a result output module. The specific functions of each module are as follows: The data acquisition and processing module is used to receive the historical navigation data of the target ship, divide the historical navigation data into a training set and a test set, and perform standardization processing; The model training module is used to select a base model, train the base model using the training set, and generate residual samples; The ensemble model building module is used to use the prediction results of the base model as new input features to train the linear regression meta-model and build the stacking ensemble model; The prediction interval construction module is used to calculate quantiles and construct prediction intervals based on residual samples; The optimal model acquisition module is used to call the MAPIE library to automatically implement the CV+ conformal prediction process and use Optuna to automatically optimize the hyperparameters of the base model to obtain the optimal model parameter combination; The result output module is used to output the predicted energy consumption value of each target ship and its corresponding confidence interval.

[0066] The device for predicting energy consumption of a ship's main engine based on uncertainty estimation can be a computing device such as a desktop computer, laptop, PDA, or cloud server. The device can include, but is not limited to, a processor and memory. For example, it can also include output devices, network access devices, and buses.

[0067] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the device for predicting energy consumption of ship main engines based on uncertainty estimation, and utilizes various interfaces and lines to connect various parts of the device for predicting energy consumption of ship main engines based on uncertainty estimation.

[0068] The memory can be used to store computer programs and / or modules. The processor realizes various functions of the ship main engine energy consumption prediction device based on uncertainty estimation by running or executing the computer programs and / or modules stored in the memory, and calling the data stored in the memory.

[0069] If the modules / units integrated into the device for predicting energy consumption of a ship's main engine based on uncertainty estimation are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the present invention can also implement all or part of the processes in the above-mentioned embodiment method by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When executed by a processor, the computer program can implement the steps of each embodiment of the above-mentioned method for predicting energy consumption of a ship's main engine based on uncertainty estimation.

[0070] The computer program includes computer program code, which may be in source code form, object code form, executable file, or some intermediate form. Computer-readable media may include any entity or device capable of carrying computer program code, recording media, USB flash drives, mobile hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunications signals, and software distribution media.

[0071] The above embodiments are intended only to illustrate the technical solutions of the present invention and are not intended to limit the scope of the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art will appreciate that the technical solutions of the present invention may be modified or replaced with equivalents without departing from the spirit and scope of the technical solutions of the present invention, and such modifications or equivalents shall be encompassed by the claims of the present invention. Any techniques, shapes, and structures not described in detail herein are well known.

Claims

1. A method for predicting ship main engine energy consumption based on uncertainty estimation, characterized in that: The following steps are involved: Receive the historical navigation data of the target ship, divide the historical navigation data into a training set and a test set, and perform standardization processing; Select a base model, use the training set to train the base model and generate residual samples; The prediction results of the base model are used as new input features to train the linear regression meta-model to build the Stacking ensemble model; Calculate quantiles and construct prediction intervals based on residual samples; Call the MAPIE library to automatically implement the CV+ conformal prediction process, and use Optuna to automatically optimize the hyperparameters of the base model to obtain the optimal model parameter combination; Output the predicted energy consumption value of each target ship and its corresponding confidence interval.

2. The method for predicting energy consumption of a ship main engine based on uncertainty estimation according to claim 1 is characterized in that: The receiving of historical navigation data of the target ship, dividing the historical navigation data into a training set and a test set, and performing standardization processing includes: Receiving historical navigation data of a target vessel from a voyage recording system; Perform data cleaning on historical navigation data; The cleaned navigation data is divided into training set and test set in the ratio of 8:2, which are used as input features of various models; The input features are normalized. The formula for normalization is as follows: ; Where, X is the original eigenvalue, is the mean value of the feature in the training set, is the standard deviation of the feature in the training set.

3. The method for predicting energy consumption of a ship main engine based on uncertainty estimation according to claim 2 is characterized in that: The navigation data includes ship speed, average draft, wind speed, engine power, trim, relative wind direction, wave height, relative wave direction, current speed, and relative current direction.

4. The method for predicting energy consumption of a ship main engine based on uncertainty estimation according to claim 1, characterized in that: The step of selecting a base model, training the base model using a training set, and generating residual samples includes: Four models, K-nearest neighbor, extreme gradient boosting, decision tree and multi-layer perceptron, were selected as base models; Use the training set to train four base models to form an initial prediction model; A 5-fold cross-validation model evaluation method was used to test the generalization ability of the initial prediction model; Predict the unseen data on each fold and record the residual, and construct a residual sample set. The residual calculation formula is as follows: ; Where, r i For the i The residual of the sample, y i For the i The true value of the sample, is the model prediction value; the residual sample set , k is the first k subsets.

5. The method for predicting energy consumption of a ship main engine based on uncertainty estimation according to claim 4 is characterized in that: The four models selected as base models are K-nearest neighbor, extreme gradient boosting, decision tree and multi-layer perceptron, including: Based on the type of prediction model, linear regression, extreme gradient boosting, lightweight gradient boosting machine, K nearest neighbor, support vector machine, multi-layer perceptron, and decision tree candidate models are selected; Perform correlation analysis on the residuals of the prediction output of the candidate model to obtain the correlation coefficient matrix; The degree of linear correlation between candidate models is revealed through heat map visualization; Through 5-fold cross-validation, the goodness of fit and mean square error of each candidate model are obtained to evaluate the prediction accuracy and generalization ability of the candidate model; The models with the highest fit and the smallest error are selected as the base models, namely the K nearest neighbor, extreme gradient boosting, decision tree and multi-layer perceptron models.

6. The method for predicting energy consumption of a ship main engine based on uncertainty estimation according to claim 5 is characterized in that: The method of calculating quantiles and constructing prediction intervals based on residual samples includes: Calculate the quantile value based on the desired confidence level based on the residual sample Q 1-α ,as follows: ; Where, is the residual set, is the total number of elements, It is a binary indicator function that outputs 1 when the condition is met, otherwise it outputs 0. is the lower bound; Use the trained Stacking ensemble model to predict the test data and obtain the point prediction value; Use quantile values to symmetrically expand the point prediction value and construct the prediction interval .

7. The method for predicting energy consumption of a ship main engine based on uncertainty estimation according to claim 6, characterized in that: The use of Optuna to automatically optimize the hyperparameters of the base model to obtain the optimal model parameter combination includes: Calculate the prediction interval coverage as follows: ; Where: Is an indicator function, a logical judgment function; if y i Falls within the prediction interval Inside, The value of is 1, otherwise it is 0; n is the sample size, and They are i The lower and upper bounds of the sample prediction interval; Calculate the average width of the interval as follows: ; Calculate the interval score as follows: ; Where: α is the significance level, which represents the allowable error rate, y i For the i The true value of the sample, If the true value y i Greater than the upper limit of the prediction interval u i , then take the difference, otherwise take 0; If the true value y i Less than the lower limit of the prediction interval l i , then take the difference, otherwise take 0.

8. A device for predicting energy consumption of a ship main engine based on uncertainty estimation, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Method for predicting fuel consumption of wing-aided ship based on meta-learning enhancement

    CN118153750A

  • Stacking ensemble learning-based ship fuel consumption prediction and speed optimization method

    CN118643277A

Cited By

  • Ship energy consumption prediction method and system integrating mechanism knowledge and data driving

    CN121615107A

  • Trusted demand response potential evaluation method and device, electronic equipment and storage medium

    CN121903255A

  • Automatic control system for boiling state of traditional Chinese medicine decoction

    CN122219116A