Ship carbon emission prediction method and device based on AIS data and medium
By combining the measured CO2 emission data with AIS data, and using the reinforcement learning framework to dynamically optimize the prediction model, the problem of insufficient comprehensive and accurate ship carbon emission monitoring data in the existing technology is solved, and high-precision and high-real-time CO2 emission prediction is achieved.
Patent Information
- Application Number
- CN202510207340.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-25
- Publication Date
- 2025-06-17
AI Technical Summary
The prior art has problems such as cumbersome data collection, incomplete and accurate enough in the monitoring of ship carbon emissions. Traditional methods rely on empirical emission factors and cannot guarantee the accuracy of prediction.
By combining the CO2 emission data of the actual measured ship with the AIS data, a CO2 emission prediction model is built, and the model is dynamically optimized using the reinforcement learning framework, and the model parameters and feature weights are adjusted using real-time AIS data.
It significantly improves the accuracy of ship carbon emission forecasting, can efficiently train models under limited actual measured data, and achieve reliable and accurate prediction of ship CO2 emissions, with high real-time, reliability and applicability.
Smart Images

Figure CN120163590A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of ship carbon emission estimation, and particularly to a ship carbon emission prediction and device based on AIS data. Background Art
[0002] In the context of the increasingly deepening global economy, the shipping industry plays a crucial role in international trade and exchanges. However, the rapid expansion of the shipping industry has also brought about the problem of ship carbon emissions, which has become a key point in the global environmental protection issue. The operation of ships inevitably generates a large amount of carbon dioxide emissions, which not only exacerbate the greenhouse effect but also pose potential threats to the marine ecosystem and human health. At present, there are certain limitations in the monitoring technology of ship carbon emissions. Traditional in-situ monitoring methods and bench test methods have many limitations in ship emission research. In-situ monitoring requires long-term tracking, is affected by the navigation environment and operating conditions, and the data collection is cumbersome and it is difficult to ensure comprehensiveness and accuracy. At the same time, the equipment cost is high and the test cycle is long. Although the bench test method can provide a relatively stable experimental environment, the difference from the actual operating conditions results in its results often not fully reflecting the true emission situation of the ship. Therefore, there is an urgent need for a more efficient method to make up for these deficiencies. With the development of machine learning technology, its powerful data processing and pattern recognition capabilities have brought new opportunities for ship carbon emission prediction. Machine learning can not only process complex and multi-dimensional data but also automatically identify patterns, thereby achieving more accurate emission predictions. AIS (Automatic Identification System) is a system that transmits ship information in real time through radio frequency. The AIS system can provide key navigation data of ships, including information such as position (latitude and longitude), speed, heading, voyage, destination, etc. By analyzing the changes in the ship's speed, heading, and position, and using AIS data and the measured CO2 emissions at the same moment for machine learning modeling, it is possible to achieve a relatively accurate prediction of ship emissions, and thus provide an important decision-making basis for carbon emission management and environmental protection in the shipping industry.
[0003] Patent CN202310645870.3 discloses a ship carbon emission characteristic prediction method based on the dynamic method and the attention mechanism. In the patent, the ship dynamic method is adopted, and the carbon emissions of the main engine, auxiliary engine, and boiler of the ship in different navigation states and different port facilities are calculated respectively by using AIS data, ship Lloyd's data, emission factor parameters, and geographical information. The prediction method in the patent borrows the information in AIS data and combines empirical emission factors to calculate the CO2 emissions, and the empirical emission factors rather than measured values are used, which cannot guarantee the accuracy of the predicted carbon emissions. At the same time, the carbon emission characteristics analyzed in the patent are the macroscopic analysis of the carbon emission laws between ships, rather than the carbon emission laws of a single ship under different working conditions.
[0004] Patent CN202311412061.4 discloses a method and device for calculating the emission flux of ship pollutants for a specific time and space. In the patent, the pollutant emission factors, STSD, and AIS data of the ship pollutants are obtained, and the ship emission flux within a given time and space range of specific pollutants is calculated. However, the empirical emission factors rather than the measured values are used to calculate ship pollutants in the patent. Only the time interval and some ship parameters are referred to for emission calculation, and the calculated value of pollutant emissions cannot guarantee accuracy.
[0005] Patent CN202411027395.4 discloses a method for estimating ship air pollutant emissions in a shallow water environment based on AIS. Aiming at the emission characteristics in the shallow water environment, by integrating ship static data, waterway water level, and AIS data, the influence of the shallow water effect is corrected to estimate the emissions of ships. This patent uses the emission factors in the IMO International Maritime Organization report for emission estimation. The use of AIS data is to obtain the ship speed, timestamp, and longitude and latitude data information in AIS for auxiliary calculation, and the emission estimation method still uses empirical formulas and empirical emission factors.
[0006] The calculation methods of ship emission values in the above schemes all consider the emission factors of ships, and calculate the ship emission values through ship parameters combined with empirical formulas. However, there are no measured ship emission data, and the accuracy of the calculation results obtained using empirical emission factors cannot be guaranteed. At the same time, the emissions of ships are calculated only relying on ship emission factors, time intervals, and ship parameters. This method will ignore many details in ship operation, resulting in further reduced accuracy. Summary of the Invention
[0007] The purpose of the present invention is to overcome the defects of the above-mentioned existing technologies and provide a ship carbon emission prediction method and device based on AIS data.
[0008] The purpose of the present invention can be achieved through the following technical solutions:
[0009] As the first aspect of the present invention, a ship carbon emission prediction method based on AIS data is provided, and the steps include:
[0010] Measure the CO2 emission data of the ship and merge it with the AIS data into a dataset;
[0011] Using the AIS data as the input feature variable and the CO2 emission of the ship at the same moment as the output target variable, construct a CO2 emission prediction model, and use the dataset to train the CO2 emission prediction model;
[0012] Obtain the AIS data of real-time ships, dynamically optimize and continuously iterate the CO2 emission prediction model using a reinforcement learning framework, and based on the CO2 emission prediction model, predict the CO2 emissions of the current ship.
[0013] As a preferred technical solution, the method uses a gaseous emissions tester to measure the instantaneous value of the CO2 emissions of a ship for a period of time.
[0014] As a preferred technical solution, detect and process missing values, outliers, and abnormal data points in the measured ship CO2 emission data and AIS data.
[0015] As a preferred technical solution, the dataset merges the measured CO2 emission data of the ship and the AIS dataset using an inner join according to the timestamp, and combines the data into a dataset of feature variables and target variables at the same moment.
[0016] As a preferred technical solution, the CO2 emission prediction model uses a machine learning algorithm, with the ship's draft, heading, track angle, turning rate, ship speed, longitude, and latitude as input feature variables; the CO2 emissions at the same moment as the output target variable, and uses the dataset for model training.
[0017] As a preferred technical solution, the method continuously evaluates the performance of the CO2 emission prediction model and dynamically optimizes the CO2 emission prediction model using a reinforcement learning framework. The reinforcement learning agent dynamically adjusts the model parameters and feature weights according to the changes in real-time AIS data, and at the same time, the agent optimizes the prediction window length through an online learning mechanism.
[0018] As a preferred technical solution, the optimization process of the reinforcement learning agent is expressed as follows:
[0019] State S: Use the AIS data in the current navigation state and the historical prediction error e t-1 as the input of the state vector;
[0020] Action A: Adjust including the model parameters θ, feature weights w, and prediction window length T, that is:
[0021] A t ={Δθ t , Δw t , ΔT t}
[0022] Reward function R: Use the negative logarithm of the prediction error of the model after the current adjustment:
[0023]
[0024] where, MSE t is the mean square error, is a regular term;
[0025] Policy update: The agent uses the policy gradient method to optimize the policy π(A t |S t ), to maximize the reward:
[0026]
[0027] Prediction window length optimization: The window length T is dynamically adjusted by the reinforcement learning agent, and the optimal time span is found by calculating the prediction error at different Ts:
[0028]
[0029] As a preferred technical solution, the method uses the correlation coefficient R 2 and the mean square error MSE as evaluation indicators to continuously evaluate the model performance.
[0030] As a second aspect of the present invention, there is provided a ship carbon emission prediction device based on AIS data, including:
[0031] One or more processors;
[0032] A memory for storing one or more programs;
[0033] When the one or more programs are executed by the one or more processors, the one or more processors implement the ship carbon emission prediction method based on AIS data as described above.
[0034] As a third aspect of the present invention, there is provided a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the steps of the ship carbon emission prediction method based on AIS data as described above are implemented.
[0035] Compared with the prior art, the present invention has the following beneficial effects:
[0036] 1) The present invention is driven by a machine learning algorithm based on AIS data combined with measured CO2 emission data. By using the measured CO2 emissions instead of traditional empirical values, the prediction accuracy is significantly improved. At the same time, by adopting a reinforcement learning framework, the machine learning algorithm can automatically learn data features and optimize the prediction model, without the need for additional meteorological or load data, and can efficiently train a model suitable for AIS data under limited measured data conditions. Furthermore, in the case of no measured data, the CO2 of the ship can be predicted and estimated more reliably and accurately through AIS data, with high real-time performance, reliability and applicability..
[0037] 2) The present invention fully exploits the ship dynamic information variables contained in AIS data, including ship draft, heading, track angle, turning rate, ship speed, longitude and latitude, and constructs a comprehensive prediction model. By introducing a reinforcement learning framework, a model applicable to AIS data is trained under the condition of limited measured data, so that the CO2 emissions of ships can be reliably and accurately estimated using AIS data even without measured data. Description of the Drawings
[0038] Figure 1 It is a flowchart of the ship carbon emission prediction method based on machine learning algorithm and AIS data according to the present invention;
[0039] Figure 2 It is a schematic diagram of the fitting effect of the performance index of the optimized model according to the present invention. Detailed Embodiments
[0040] The present invention will be described in detail below with reference to the drawings and specific embodiments. This embodiment is implemented on the premise of the technical solution of the present invention, and gives detailed implementation manners and specific operation processes, but the protection scope of the present invention is not limited to the following embodiments.
[0041] Embodiment 1
[0042] The present invention proposes a method for predicting CO2 emissions by combining measured ship CO2 emission data with AIS data at the same time. By using measured CO2 emissions instead of empirical values of CO2 emission factors, the accuracy of emission prediction is better guaranteed. At the same time, all dynamic data related to the ship operation process in AIS data are fully utilized for machine learning modeling, and by introducing a reinforcement learning framework, the model is verified, evaluated, dynamically optimized and continuously iterated to continuously improve the CO2 emission prediction model. Finally, the trained ship CO2 emission prediction model is fully applicable to AIS data, and only by obtaining the AIS data of the ship, reliable and accurate estimation of ship CO2 emissions can be achieved.
[0043] Specifically, the method of the present invention combines the measured CO2 data of a ship over a period of time with the AIS data at the same moment to form a machine learning prediction model with the input feature variable being AIS data and the output target variable being the CO2 emission value. The feature variables include seven variables: ship draft, heading, track angle, turning rate, ship speed, longitude and latitude, and these variables represent the dynamic information of the ship.
[0044] The present invention aims to construct a high-precision CO2 emission prediction model based on measured CO2 data and AIS data of ships. By merging the measured CO2 data of a ship over a period of time with the AIS data at the same moment, using seven dynamic characteristic variables in the AIS data: ship draft, heading, track angle, turning rate, ship speed, longitude, and latitude as input features, and the CO2 emission as the output target variable, a machine learning algorithm is used for model training, and the coefficient of determination R 2 and the mean square error MSE are used as evaluation indicators to evaluate and optimize the model performance. Further, in the process of model optimization, a reinforcement learning framework is introduced to enable the model to dynamically adjust the feature weights and prediction parameters according to real-time AIS data, thereby improving the adaptability to complex operating environments. The model is evaluated by the mean square error (MSE) and the coefficient of determination (R 2 ), and continuously improves the prediction performance under the incremental optimization of reinforcement learning. This method does not require additional meteorological or load data, can efficiently train a model applicable to AIS data under limited measured data, and then can reliably and accurately predict and estimate the CO2 of ships through AIS data in the absence of measured data, with high real-time performance, reliability, and applicability. The implementation scheme of the method of the present invention is as shown in Figure 1 and the specific implementation content is as follows:
[0045] 1) Conduct actual measurement of the target variable CO2
[0046] Use an OBS-2200 vehicle-mounted gaseous pollutant emission tester to measure the instantaneous value of the CO2 emission of a ship over a period of time to ensure the accuracy of the target variable data.
[0047] 2) Process the AIS data and the measured data
[0048] Detect and process missing values in the data, detect and process outliers or abnormal data points. Outliers may have a negative impact on the model, so they can be considered for deletion, replacement, or processed by other methods. Ensure the consistency of the data format, convert the date and time to the standard format, accurate to seconds, and convert the data type to a type suitable for analysis.
[0049] 3) Merge the feature variables in the AIS data at the same moment with the CO2 emission data
[0050] In the second step, the AIS data and CO2 emission data have been refined to the second. Using the pandas library in Python, the pd.merge() function is used to merge the two datasets according to the timestamp. Adding how='inner' specifies the merge method as an inner join (retaining the time points that exist in both datasets), and the data is merged into a dataset with seven feature variables and one target variable at the same moment.
[0051] 4) Build a CO2 emission prediction model based on machine learning with AIS data as feature variables
[0052] The present invention selects a machine learning algorithm, takes seven variables including ship draft, heading, track angle, turning rate, ship speed, longitude, and latitude as input feature variables, and takes the CO2 emission at the same moment as the output target variable, and uses this dataset for model training.
[0053] The present invention establishes a machine learning prediction emission model by combining the measured CO2 emission data of ships with the AIS data at the same time. The measured CO2 emissions rather than the empirical values of CO2 emission factors ensure the accuracy of emission prediction more. At the same time, all dynamic data related to the ship operation process in the AIS data is fully utilized for machine learning modeling. The relationship between the feature variables and the target variable is as shown in Equation (1):
[0054] E(CO2) = f(D, H, Cg, R, V, λ, Φ) (1)
[0055] Among them, E(CO2) is the CO2 emission, D is the ship draft, H is the heading, C g is the track angle, R is the turning rate, V is the ship speed, λ is the longitude, and Φ is the latitude.
[0056] 5) Introduce reinforcement learning for dynamic optimization prediction
[0057] Based on the machine learning model, the prediction model is dynamically optimized in combination with the reinforcement learning framework. The reinforcement learning agent dynamically adjusts the model parameters and feature weights according to the changes in real-time AIS data to adapt to the changes in the operating environment. At the same time, the agent optimizes the prediction window length through an online learning mechanism, thereby improving the adaptability of the model to complex operating scenarios and further enhancing the accuracy and reliability of the model for CO2 emission prediction.
[0058] 5) Introduce reinforcement learning for dynamic optimization prediction
[0059] Based on the machine learning model, the prediction model is dynamically optimized by combining the reinforcement learning framework, enabling it to adapt to different navigation environments and improve the accuracy and reliability of CO2 emissions prediction. The reinforcement learning agent dynamically adjusts the model parameters and feature weights according to the changes in real-time AIS data to adapt to different navigation states. Among them, the adjusted model parameters include key hyperparameters such as learning rate, regularization coefficient, and tree depth to optimize the generalization ability and stability of the model. Feature weight refers to the relative contribution of each feature variable (such as ship draft, heading, speed, etc.) in AIS data to the CO2 emissions prediction. The agent continuously adjusts the weights of each feature variable through the policy network to make the model more accurately predict CO2 emissions in different navigation environments.
[0060] In addition, reinforcement learning is also used to optimize the prediction window length, that is, to determine the most appropriate time span in historical data to achieve the best balance between short-term and long-term trends. The agent adopts a dynamic time adjustment strategy according to the temporal characteristics of AIS data and optimizes the window length by maximizing the cumulative reward to ensure that the model can obtain optimal input data in various navigation states.
[0061] The optimization process of the reinforcement learning agent can be expressed as follows:
[0062] 1. State Definition (State, S): Use the AIS data (ship draft d t , heading θ t , speed v t , etc.) in the current navigation state and the historical prediction error e t-1 as the input of the state vector.
[0063] 2. Action Selection (Action, A): The agent selects to adjust the model parameters θ, feature weights w, and prediction window length T, that is:
[0064] A t ={Δθ t , Δw t , ΔT t}(2)
[0065] 3. Reward Function (Reward, R): Calculate the reward according to the prediction result of the model after the current adjustment. The commonly used reward function is the negative logarithm of the prediction error, such as:
[0066]
[0067] where MSE t is the mean square error, It is a regularization term to prevent the feature weights from being overly concentrated on certain variables.
[0068] 4. Policy Update: The agent uses the Policy Gradient method to optimize the policy π(A t |S t ) to maximize the reward:
[0069]
[0070] 5. Prediction Window Length Optimization: The window length T is dynamically adjusted by the reinforcement learning agent, and the optimal time span is found by calculating the prediction errors under different Ts:
[0071]
[0072] Through the dynamic optimization of the reinforcement learning framework, the model can automatically adjust parameters under different AIS data inputs and navigation conditions, improve the accuracy and adaptability of CO2 emission prediction, and ultimately achieve more intelligent and reliable prediction.
[0073] 6) Verify and evaluate the constructed prediction model
[0074] Use the correlation coefficient R 2 and the mean square error MSE as evaluation indicators to measure the accuracy and effectiveness of the model in predicting CO2 emissions. Due to the limited measured data, cross-validation is also used to ensure the robustness of the evaluation.
[0075] 7) Iterate and improve according to the evaluation results
[0076] By continuously evaluating the model performance, analyzing the prediction errors and adjusting the optimization parameters of the model, combined with the dynamic optimization ability of the reinforcement learning agent, gradually improve the model structure and characteristics. Finally, a ship CO2 emission prediction model with high precision, high adaptability and high reliability is constructed. The performance indicators of the optimized model are: coefficient of determination (R2): 0.9880447, mean square error (MSE): 325.7384233, and the fitting effect is as Figure 2 shown.
[0077] The method of the present invention combines the measured CO2 data of a ship over a period of time with the AIS data at the same moment to construct a machine learning prediction model with the input feature variable being the AIS data and the output target variable being the CO2 emission value. The feature variables include seven variables: ship draft, heading, track angle, turning rate, ship speed, longitude, and latitude. These variables represent the dynamic information of the ship. During the model optimization process, a reinforcement learning framework is introduced to enable the model to dynamically adjust the feature weights and prediction parameters according to real-time AIS data, thereby improving the adaptability to complex operating environments. The model is evaluated by the mean square error (MSE) and the coefficient of determination (R 2 ).) and continuously improves the prediction performance under the incremental optimization of reinforcement learning. This method does not require additional meteorological or load data and can efficiently train a model applicable to AIS data with limited measured data. Furthermore, it can reliably and accurately predict and estimate the CO2 of ships through AIS data without measured data, featuring high real-time performance, reliability, and applicability.
[0078] Embodiment 2
[0079] As a second aspect of the present invention, the present application also provides an electronic device, including: one or more processors; a memory for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the method for predicting ship carbon emissions based on AIS data as described above. In addition to the above-mentioned processors, memory, and interfaces, any device with data processing capabilities where the device in the embodiment is located usually includes other hardware according to the actual functions of the device with data processing capabilities, which will not be elaborated herein.
[0080] Embodiment 3
[0081] As a third aspect of the present invention, the present application further provides a computer-readable storage medium, on which computer instructions are stored. When the instructions are executed by a processor, the above-mentioned ship carbon emission prediction method based on AIS data is implemented. The computer-readable storage medium may be an internal storage unit of any device with data processing capabilities described in any of the foregoing embodiments, such as a hard disk or a memory. The computer-readable storage medium may also be an external storage device, such as a plug-in hard disk, a Smart Media Card (SMC), an SD card, a Flash Card, etc. equipped on the device. Further, the computer-readable storage medium may also include both an internal storage unit of any device with data processing capabilities and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by any device with data processing capabilities, and may also be used to temporarily store data that has been output or is to be output.
[0082] The preferred specific embodiments of the present invention have been described in detail above. It should be understood that those of ordinary skill in the art can make many modifications and variations based on the concept of the present invention without creative work. Therefore, all technical solutions that can be obtained by those skilled in the art in the technical field of the present invention through logical analysis, reasoning, or limited experiments based on the concept of the present invention on the basis of the prior art should be within the protection scope determined by the claims.
Claims
1. A method for predicting ship carbon emissions based on AIS data, characterized in that the steps include: Measure the CO2 emission data of ships and merge it with AIS data into a data set; Using AIS data as the input feature variable and the CO2 emissions of ships at the same time as the output target variable, a CO2 emission prediction model is constructed and trained using the data set; Real-time ship AIS data is obtained, and the CO2 emission prediction model is dynamically optimized and continuously iterated using a reinforcement learning framework. Based on the CO2 emission prediction model, the CO2 emissions of the current ship are predicted.
2. A ship carbon emission prediction method based on AIS data according to claim 1, characterized in that: The method adopts a gaseous emission tester to measure the instantaneous value of CO2 emission of a ship over a period of time.
3. The method for predicting ship carbon emissions based on AIS data according to claim 1, characterized in that: The method detects and processes missing values, outliers and abnormal data points in measured ship CO2 emission data and AIS data.
4. The method for predicting ship carbon emissions based on AIS data according to claim 1, characterized in that: The data set combines the measured CO2 emission data of the ship with the AIS data set by inner joining according to the timestamp, and combines the data into a data set of the characteristic variable and the target variable at the same time.
5. The method for predicting ship carbon emissions based on AIS data according to claim 1, characterized in that: The CO2 emission prediction model adopts a machine learning algorithm, with ship draft, bow direction, track direction, turning rate, ship speed, longitude and latitude as input feature variables; CO2 emissions at the same time as the output target variable, and a data set is used for model training.
6. The method for predicting ship carbon emissions based on AIS data according to claim 1, characterized in that: The method continuously evaluates the performance of the CO2 emission prediction model and dynamically optimizes the CO2 emission prediction model using a reinforcement learning framework. The reinforcement learning agent dynamically adjusts the model parameters and feature weights according to the changes in real-time AIS data. At the same time, the agent optimizes the prediction window length through an online learning mechanism.
7. A ship carbon emission prediction method based on AIS data according to claim 6, characterized in that: The optimization process of the reinforcement learning agent is expressed as follows: State S: AIS data under the current navigation state and historical prediction error e t-1 As state vector input; Action A: Adjust the model parameters θ, feature weights w, and prediction window length T, namely: A t ={Δθ t ,Δw t ,ΔT t } Reward function R: takes the negative logarithm of the model's prediction error after the current adjustment: Among them, MSE t is the mean square error, is the regularization term; Policy update: The agent uses the policy gradient method to optimize the policy π(A t |S t ), so that the reward is maximized: Prediction window length optimization: The window length T is dynamically adjusted by the reinforcement learning agent, and the optimal time span is found by calculating the prediction error under different T:
8. A method for predicting ship carbon emissions based on AIS data according to claim 6, characterized in that: The method uses the correlation coefficient R 2 And mean square error MSE are used as evaluation indicators to continuously evaluate the model performance.
9. A ship carbon emission prediction device based on AIS data, characterized in that: include: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the ship carbon emission prediction method based on AIS data as described in any one of claims 1 to 8.
10. 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 ship carbon emission prediction method based on AIS data as described in any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Ship carbon emission characteristic prediction method based on dynamic method and attention mechanism
CN116775783A
Accounting method and device for ship pollutant emission flux aiming at specific time and space
CN117473422A
AIS-based shallow water environment ship atmospheric pollutant emission estimation method
CN118964799A