Ship energy efficiency optimization method for ship greenhouse gas emission reduction
By adopting the multi-task learning model of LSTM and Multi-head attention mechanism in ship energy efficiency optimization, the problem of lack of scientific strategies for ship carbon reduction in shipping is solved, and an intelligent shipping energy efficiency optimization strategy is realized, which improves the scientificity and safety of ship energy efficiency management.
Patent Information
- Application Number
- CN202411615371.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-03-04
AI Technical Summary
The carbon reduction process of ships during shipping lacks scientific strategies, making it difficult to ensure the safe operation of the host and the limited speed reduction of the ship within the acceptable speed range of the market.
The multi-task learning deep neural network model based on long and short-term memory (LSTM) and the multi-head attention mechanism are used to analyze the relationship between ship navigation trends and carbon emissions, and optimize multi-task Loss allocation through gradient standardization to provide scientific shipping carbon reduction strategies.
It realizes intelligent optimization of ship navigation parameters, provides scientific carbon reduction strategies, improves the scientificity and intelligence of ship energy efficiency management, and ensures the safe operation and controllability of hosts.
Smart Images

Figure CN119558527A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of ship energy efficiency optimization, and in particular relates to a ship energy efficiency optimization method for reducing greenhouse gas emissions from ships. Background Art
[0002] Shipping accounts for 80% to 90% of global trade, but the resulting air pollution emissions from ships pose a huge challenge. According to statistics from the International Maritime Organization (IMO), CO2 and NO x The annual emissions account for 13% and 15% of global emissions respectively. At present, IMO is actively participating in the process of reducing greenhouse gas emissions from shipping, and has gone through the start-up period, technology development period, mechanism review period, strategy development period and other stages, and is now entering the implementation period. The International Maritime Organization (IMO) set emission reduction targets for the first time in the "Preliminary Strategy for Reducing Greenhouse Gas Emissions from Ships" it released, striving to peak the total greenhouse gas emissions from shipping as soon as possible, reduce them by 50% in 2050, and gradually stop greenhouse gas emissions within this century. Based on this strategy, 2023, 2030 and 2050 are taken as key time nodes, and an alternative list of short-term, medium-term and long-term response measures is proposed. Taking into account the 2030 carbon intensity reduction target, relevant short-term measures will be formulated and enforced in the final strategy to be reviewed and released in 2023.
[0003] In the "IMO 4th Greenhouse Gas Research Report", IMO proposed measures to use non-carbon green energy and reduce navigation speed at the same time. In the "Guiding Opinions on Accelerating the Establishment and Improvement of a Green, Low-carbon and Circular Development Economic System", my country proposed to update and eliminate old ships to achieve the 2030 carbon reduction target. Among them, the update and elimination of old ships requires high-precision technology and high cost consumption, which is not economical compared to its emission reduction effect. With the improvement of IMO's emission reduction requirements, modified ships may be eliminated from the market after a few years because they do not meet the requirements. Reduced speed operation is the most economical and effective and widely used means to meet IMO's emission reduction requirements. However, there is a limit to the speed reduction. At present, most ships choose to "reduce it once and for all" for the degree of speed reduction. There is a lack of scientific strategies, which makes it difficult to ensure the safe operation of the main engine and to ensure that the ship can reduce speed within the acceptable speed range of the market. A more scientific and intelligent analysis and optimization system is urgently needed for ship energy efficiency management. Summary of the invention
[0004] The present invention solves the problem of lack of scientific strategies in the current shipping carbon reduction process, provides a ship energy efficiency optimization method for ship greenhouse gas emission reduction, and provides an intelligent optimization method for reasonable carbon reduction in navigation.
[0005] The technical solution claimed in the present invention is as follows:
[0006] A ship energy efficiency optimization method for reducing greenhouse gas emissions from ships comprises the following steps:
[0007] S1: Collect the navigation parameters of the ship during navigation and sort them by time to form time series data;
[0008] S2: Construct a recurrent neural network based on long short-term memory, and input the time series data obtained in S1 into the recurrent neural network for training to mine ship navigation characteristics;
[0009] S3: A Multi-head based attention mechanism is introduced on the basis of the recurrent neural network, and the navigation parameters collected by S1 are used for training. During the training process, the gradient normalization method is used to optimize the multi-task loss allocation, and finally a LSTM+Multi-head multi-task learning deep neural network model is obtained. The LSTM+Multi-head multi-task learning deep neural network model is used to analyze the relationship between the navigation status of the ship and the carbon emissions of the ship; the attention mechanism focuses on the navigation parameters related to the carbon reduction and emission reduction strategy.
[0010] Preferably, the navigation parameters include: main engine operating conditions, fuel type, ship type, speed and deadweight tonnage; the navigation parameters related to the carbon reduction and emission reduction strategy include: speed, heading and fuel.
[0011] Preferably, the recurrent neural network in S2 uses a 2-layer LSTM structure. The LSTM structure can model time series data and capture the evolution of data patterns. Each layer of the LSTM performs the following transformations:
[0012] f t =σ(W f ·[h t-1 ,x t ]+b f ) (1)
[0013] i t =σ(W f ·[h t-1 ,x t ]+b f ) (2)
[0014] c t =f t *c t -1+i t *tanh(W f ··[h t -1,x t ]+b f ) (3)
[0015] o t=σ(W f ·[h t -1,x t ]+b f ) (4)
[0016] h t =σ t tanh(C t ) (5)
[0017] Where: t represents the time step; h t 、c t 、x t represents the hidden state, unit state and previous hidden state corresponding to time t; f t 、i t , o t Respectively represent the forget gate, input gate and output gate; W f represents the linear coefficient; b f represents the bias coefficient; σ represents the activation function; σ t represents the activation function at time t; C t Represents the classification output at time t.
[0018] Preferably, during the training process in S2, the softmax function Linear projection for LSTM output for classification prediction. i and j in the softmax function represent time indexes, and x i and x j Represents the hidden state corresponding to time i and j.
[0019] Preferably, the classification prediction formula is:
[0020]
[0021] in: Represents the classification prediction result; o T represents the final output of LSTM; Wf represents the linear coefficient; b f Represents the bias coefficient.
[0022] Preferably, the Multi-head based attention mechanism in S3 is a weighted sum of feature vectors, whose weights are obtained by learning; i} represents all feature vectors extracted from navigation parameters, then the weighted sum calculation formula of Multi-head attention feature vector is as follows:
[0023] f attention =∑ i α i ·f i (7)
[0024] Where: f attention Represents the weighted sum of Multi-head attention feature vectors; α i is the weight of the i-th eigenvector, all α i The sum is 1; f i Indicates the extraction of the i-th eigenvector of navigation parameters; the eigenvector f considering the main engine power and ship speed attributes attr The influence of , the learning of weight α is expressed as follows:
[0025] β i =<σ(f attr ),f i > (8)
[0026]
[0027] Where: β i represents the weight of the ith attribute feature vector; <·> represents the vector inner product operation, and formula (8) represents the activation function σ that transforms the feature vector f attr The linear map is f i Vectors of the same length; α i is the weight of the i-th eigenvector, all α i The sum is 1; f attr represents the characteristic vector considering the main engine power and ship speed attributes; f i Indicates the i-th eigenvector extracted from navigation parameters;
[0028] The Multi-head attention mechanism adds multiple "heads" on the basis of the attention mechanism. This mechanism concatenates the attention results generated by each head and multiplies them by the output matrix to fuse the information. It combines the macro features obtained by the LSTM model to calculate the overall loss and back-propagates the loss to all models. The loss function l for each prediction category c in the softmax classifier c The cross entropy loss is expressed as:
[0029]
[0030] in: Represents the classification prediction result; y i,c Represents the prediction result of the cth category using the i-th feature vector.
[0031] Preferably, the specific formula for optimizing the model by multi-task Loss allocation is as follows: Define the gradient loss function as the function of weight w i (t) function to measure the quality of each task Loss weight, including:
[0032] Step 1: Define variables to measure the magnitude of task loss:
[0033]
[0034] Where: W is a subset of the entire multi-task learning network parameters; represents the normalized value of the gradient of the i-th task, which is the weight w of the i-th task i (t) and Loss L i The L2 norm of the gradient of the parameter W is obtained by multiplying (t) by , which can measure the magnitude of the loss of a task. is the expectation of the normalized values of all task gradients, through all Find the mean value;
[0035] Step 2: Define variables to measure the learning speed of the task:
[0036]
[0037]
[0038] Where: L i (0) and L i (t) represents the Loss of the 0th and tth steps of subtask i respectively; To some extent, it measures the reverse training speed of task i. The larger it is, the slower the network training is; represents the expected reverse training speed of each task; r i (t) is the relative reverse training speed of the task, r i The larger (t) is, the slower the training of task i is among all tasks. Based on the above variables, the gradient loss function is expressed as:
[0039]
[0040] in: represents the ideal gradient normalization value; t represents the time step; w i (t) represents the weight of the i-th task; Represents the normalized value of the gradient for the i-th task.
[0041] Preferably, during the model training process in S3, the weight w is adjusted by the following function i (t) To update:
[0042] w i (t+1)=w i (t)+λ*Gradient(L grad ,w i (t)) (16)
[0043] Where: t represents the time step; w i (t) represents the weight of the i-th task; λ represents the learning rate of the model, which is set to 0.01 by default; L grad represents the gradient loss function.
[0044] Preferably, during the training in S2, a Dropout mechanism is applied.
[0045] Preferably, the LSTM+Multi-head multi-task learning deep neural network model includes an input layer, a convolutional layer, a shared hidden layer, an output layer and several network optimization mechanisms; the input layer includes ship navigation descriptions such as main engine operating conditions, speed, deadweight tonnage, etc.; time series navigation parameter feature extraction is completed through the long short-term memory (LSTM) neural network; the shared hidden layer completes feature fusion in the form of a fully connected layer; and finally completes the multi-task output of ship control optimization such as speed, heading, fuel, etc.
[0046] Beneficial effects:
[0047] The present invention provides a ship energy efficiency optimization method for greenhouse gas emission reduction of ships, collects navigation parameters of ships in navigation, and sorts the navigation parameters in time to form time series data; constructs a recurrent neural network based on long short-term memory (LSTM), and inputs the time series data into the recurrent neural network for training and mining ship navigation characteristics, LSTM can better capture the time dependence of navigation parameters of different types of ships, and form a more robust prediction model; introduces an attention mechanism based on Multi-head on the basis of the recurrent neural network, and adopts the navigation parameters collected by S1 for learning, and uses the gradient standardization method to optimize the multi-task Loss allocation in the learning process, so as to achieve the synchronous optimization of multiple ship control tasks related to the carbon reduction strategy, and provide an intelligent shipping energy efficiency optimization strategy for the low-carbon development of ship shipping; finally obtains a multi-task learning deep neural network model of LSTM+Multi-head, and analyzes the relationship between the navigation situation of the ship and the carbon emissions of the ship. When learning the model, the attention is focused on the parameters related to carbon emissions, and the navigation parameters corresponding to the optimized carbon emissions are found through model analysis, so as to provide a scientific shipping carbon reduction strategy, and solve the problem that the current shipping carbon reduction process lacks scientific strategies.
[0048] During the training process in S2, the Dropout mechanism is applied to reduce fitting and ensure the accuracy of subsequent model predictions. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 This is a flow chart of a method for optimizing ship energy efficiency for reducing greenhouse gas emissions from ships according to an embodiment of the present invention.
[0050] Figure 2 This is the overall architecture diagram of the LSTM+Multi-head multi-task learning deep neural network model in an embodiment of the present invention.
[0051] Figure 3 The present invention is an embodiment of the actual ship detection platform and data acquisition flow chart.
[0052] Figure 4 The main engine flue sampling and detection instrument calibration is carried out in the embodiment of the present invention.
[0053] Figure 5 This is a graph showing the change of ship speed over time under different working conditions in an embodiment of the present invention. DETAILED DESCRIPTION
[0054] The present invention is described in detail below in conjunction with the accompanying drawings:
[0055] The present invention provides a ship energy efficiency optimization method for reducing greenhouse gas emissions from ships, such as Figure 1 As shown, the following steps are included:
[0056] S1: Collect the navigation parameters of the ship in sailing, and sort the navigation parameters by time to form time series data; the navigation parameters include: main engine operating conditions, fuel type, ship type, speed and deadweight tonnage; the navigation parameters related to the carbon reduction and emission reduction strategy include: speed, heading, and fuel.
[0057] S2: Construct a recurrent neural network based on long short-term memory, and input the time series data obtained in S1 into the recurrent neural network for training to mine ship navigation characteristics; the recurrent neural network uses a 2-layer LSTM structure. The LSTM structure can model time series data, using time-ordered ship navigation parameters as time series input to capture the evolution of data patterns. Each layer of LSTM performs the following transformations:
[0058] f t =σ(W f ·[h t -1,x t ]+b f ) (1)
[0059] i t =σ(W f ·[h t -1,x t ]+b f ) (2)
[0060] c t =f t *c t -1+i t *tanh(Wf ·[h t -1,x t ]+b f ) (3)
[0061] o t =σ(W f ·[h t -1,x t ]+b f ) (4)
[0062] h t =σ t tanh(C t ) (5)
[0063] Where: t represents the time step; h t 、c t 、x t represents the hidden state, unit state and previous hidden state corresponding to time t; f t 、i t , o t Respectively represent the forget gate, input gate and output gate at time t; W f represents the linear coefficient; b f represents the bias coefficient; σ represents the activation function; σ t represents the activation function at time t; C t Represents the classification output at time t.
[0064] During LSTM training, the softmax function For LSTM output o T The linear projection of i and x j Represents the hidden state corresponding to time i and j for classification prediction To avoid overfitting, a Dropout mechanism is also applied.
[0065] Formula (1)-(5) represents the operation process of LSTM feature extraction. The result o obtained by formula 1)-(5) t Input formula (6) to get the final output classification prediction result of LSTM The classification prediction results The formula is:
[0066]
[0067] Among them: Among them: Represents the classification prediction result; o T represents the final output of LSTM; Wf represents the linear coefficient; b fRepresents the bias coefficient.
[0068] LSTM can better capture the time dependency of navigation parameters of different types of ships and form a more robust prediction model.
[0069] In a specific embodiment of the present invention, a two-layer LSTM structure uses a shared hidden layer to fuse the features of multiple time series data. Sparse sharing is used instead of the common hard sharing and soft sharing strategies. The specific idea of the algorithm is: for each task, a corresponding sub-network is extracted from the base network to process the task. These sub-networks partially overlap. The algorithm extracts similar sub-networks for strongly related tasks and extracts sub-networks with large differences for weakly related tasks. These sub-networks are merged to obtain a multi-task sparse sharing structure. Finally, the data of multiple tasks are used for joint training results. Multi-task refers to the strategy that the model can output multiple variable adjustments, as shown in the attached figure. Figure 1 , speed adjustment strategy is one task, heading adjustment strategy is the second task, and fuel adjustment strategy is the third task.
[0070] S3: A Multi-head based attention mechanism is introduced on the basis of the recurrent neural network, so that in a certain navigation strategy prediction task, the model will focus on the navigation parameters with more relevant strategies, and then use the navigation parameters collected by S1 for training. During the training process, the gradient normalization method is used to optimize the multi-task loss allocation, and finally a LSTM+Multi-head multi-task learning deep neural network model is obtained. The LSTM+Multi-head multi-task learning deep neural network model is used to analyze the relationship between the navigation status of the ship and the carbon emissions of the ship; the attention mechanism focuses on the navigation parameters related to the carbon reduction and emission reduction strategy.
[0071] The Multi-head based attention mechanism is a weighted sum of feature vectors, whose weights are obtained through learning; i} represents all feature vectors extracted from navigation parameters, then:
[0072] f attention =∑ i α i ·f i (7)
[0073] Where: f attention Represents the weighted sum of Multi-head attention feature vectors; α i is the weight of the i-th eigenvector, all α i The sum is 1; f i Indicates the extraction of the i-th eigenvector of navigation parameters; the eigenvector f considering the main engine power and ship speed attributes attr The influence of , the learning of weight α is expressed as follows:
[0074] β i =<σ(f attr ),f i > (8)
[0075]
[0076] Where: β i represents the weight of the ith attribute feature vector; <·> represents the vector inner product operation, and formula (8) represents the activation function σ that transforms the feature vector f attr The linear map is f i Vectors of the same length; α i is the weight of the i-th eigenvector, all α i The sum is 1; f attr represents the characteristic vector considering the main engine power and ship speed attributes; f i Indicates the i-th eigenvector extracted from the navigation parameters.
[0077] The Multi-head attention mechanism adds multiple "heads" on the basis of the attention mechanism. The mechanism concatenates the attention results generated by each head and multiplies them by the output matrix to fuse the information. The overall loss is calculated by combining the macro features obtained by the LSTM model, and the loss is back-propagated to all models. The loss function of each predicted category c in the softmax classifier is expressed as cross entropy loss:
[0078]
[0079] in: Represents the classification prediction result; yi,c represents the prediction result of the c-th prediction category using the ith eigenvector; in a specific embodiment of the present invention, different tasks correspond to different prediction categories, for example: the speed prediction category (output) includes increasing the speed, reducing the speed, and remaining unchanged; the heading prediction category (output) includes turning left, turning right, and remaining unchanged.
[0080] In order to make the Loss magnitudes of the ship control optimization tasks such as speed, heading, fuel, etc. in the model close and learn at a similar speed, the gradient normalization method is used to optimize the multi-task Loss allocation; the specific formula for optimizing the model by the multi-task Loss allocation is as follows: Define the gradient loss function as the weight w i (t) function to measure the quality of each task Loss weight, including:
[0081] Step 1: Define variables to measure the magnitude of task loss:
[0082]
[0083] Where: W is a subset of the entire multi-task learning network parameters; represents the normalized value of the gradient of the i-th task, which is the weight w of the i-th task i (t) and Loss L i The L2 norm of the gradient of the parameter W is obtained by multiplying (t) by , which can measure the magnitude of the loss of a task; is the expectation of the normalized values of all task gradients, through all Find the mean value;
[0084] Step 2: Define variables to measure the learning speed of the task:
[0085]
[0086] Where: L i (0) and L i (t) represents the Loss of step 0 and step t of subtask i respectively; To some extent, it measures the reverse training speed of task i. The larger it is, the slower the network training is; represents the expected reverse training speed of each task; r i (t) is the relative reverse training speed of the task, r i The larger (t) is, the slower the training of task i is among all tasks. Based on the above variables, the gradient loss function can be expressed as:
[0087]
[0088] in: represents the ideal gradient normalization value; t represents the time step; w i (t) represents the weight of the i-th task; Represents the normalized value of the gradient for the i-th task.
[0089] During the model training process in S3, the weight w is adjusted by the following function i (t) To update:
[0090] w i (t+1)=w i (t)+λ*Gradient(L grad ,w i (t)) (16)
[0091] Where: t represents the time step; w i(t) represents the weight of the i-th task; λ represents the learning rate of the model, which is set to 0.01 by default; L grad represents the gradient loss function.
[0092] Based on the above multi-task Loss allocation optimization scheme, the synchronous optimization of various ship control tasks including speed, heading, fuel, etc. is achieved, providing an intelligent shipping energy efficiency optimization strategy for the low-carbon development of ship shipping.
[0093] The overall structure of the LSTM+Multi-head multi-task learning deep neural network model is as follows: Figure 2 As shown, it includes an input layer, a convolutional layer, a shared hidden layer, an output layer and several network optimization mechanisms; the input layer includes ship navigation descriptions such as main engine operating conditions, speed, deadweight tonnage, etc.; the time series navigation parameter feature extraction is completed through the long short-term memory (LSTM) neural network; the shared hidden layer completes feature fusion in the form of a fully connected layer; the speed and heading are adjusted to achieve fuel control, and finally the multi-task output of ship control optimization such as speed, heading, fuel, etc. is completed.
[0094] The present application proposes to use multi-task learning to simultaneously output multiple results such as speed, heading, fuel, etc. Each output task corresponds to a loss function (Loss function) shown in formula (10). In order to make the loss function of each task learn at a similar speed, the synchronous optimization method introduced in formulas (11)-(16) is used for optimization, so that the loss function shown in formula (10) of each task in multi-task learning can be learned at a similar speed.
[0095] Experimental example
[0096] A real ship was built to verify the model established by the present invention. First, the main engine flue was sampled and opened according to the gas emission detection procedure. This sampling port is located above the main engine exhaust gas boiler, about 9m away from the main engine flue outlet. Then a standard flange was fixed on the sampling port and a corresponding sampling probe was installed. The sampling probe was inserted into the main engine flue through the sampling port on the flange ( Figure 3 ). The pollutant detection instrument used is the RJ-SEMS type equipment. The equipment can realize continuous online detection and can record the latitude and longitude position and ship speed in real time. The ship emission pollutant detection system uses non-dispersive infrared technology (NDIR) to measure carbon dioxide concentration and uses the pressure difference method to measure exhaust flow.
[0097] The stainless steel probe for sampling is inserted into the main engine flue through the sampling port ( Figure 4), in order to prevent the sampling probe from being blocked by flue gas impurities, the sampling pipeline is automatically back-blown every two hours with compressed air on board during testing. The stainless steel probe in the flue can continuously detect the concentration of carbon dioxide in the ship's exhaust gas, and can also detect the exhaust flow rate. The gas pressure, temperature and humidity in the flue are obtained through the instruments in the engine room control room, and finally the exhaust gas is corrected according to the international standard ISO 8178; the real-time power of the ship's main engine can be obtained through the instruments in the engine room control room; the ship's position and speed relative to the ground in the ship's real-time operating data are obtained by the ship's GPS, and the ship's speed relative to the water and the voyage are obtained by the ship's odometer. The ship's GPS speed is mainly used in this emission test and emission pollutant analysis; the start and end times of different ship operating conditions are obtained from the ship's clock record book and navigation log. In this actual ship inspection test, the ship mainly used two types of fuel. When berthing and leaving the port, maneuvering in the port, and before and after anchoring, in order to ensure the ship has good maneuverability, the main engine uses MGO as the fuel; but in order to save costs, the fuel used by the ship during the cruising stage is HFO, which leads to the fuel replacement before and after the ship's cruising condition. During the ship's channel speed increase stage, the main engine begins to gradually change from MGO to HFO, and when decelerating before anchoring, the main engine gradually changes from MGO to HFO. Therefore, in these two stages, the main engine uses mixed fuel, and the time when the main engine changes fuel can be obtained from the engine log. The fuel consumption data of the main engine can be directly read by the fuel flow meter on the main engine oil line of the test ship.
[0098] The ship working conditions in this test can be divided into ( Figure 5 ):
[0099] (1) Berthing condition: idling speed from the start of the main engine starting to the end before all cables are untied;
[0100] (2) Maneuvering navigation condition in port: the ship performs departure operation in port after all the cables are untied;
[0101] (3) Speed-up maneuvering condition in the channel: after leaving the port, the ship starts to gradually increase its speed in the channel until it reaches a constant speed;
[0102] (4) Constant speed cruising condition: In this stage, the ship's main engine power is set at a fixed value, and the ship sails at a relatively stable speed;
[0103] (5) Deceleration maneuvering before anchoring: The vessel gradually decelerates and starts to anchor when it reaches the designated position of the anchorage;
[0104] (6) Anchoring condition: from the time the ship drops anchor until the main engine is finished running.
[0105] This study uses the time series ship navigation data obtained from the actual ship test as an example to test the analysis accuracy of the ship energy efficiency optimization algorithm based on the attention mechanism and LSTM model. During the training of the neural network, the maximum epoch value is set to 100; the Dropout value is set to 0.5, and the learning rate is set to 0.01. The emission of the two gases after optimization, carbon dioxide, is selected for comparison, and the results are shown in Table 1 below.
[0106] Table 1. Comparison of CO2 emissions of different ship energy efficiency optimization methods and non-optimized values
[0107]
[0108]
[0109] As shown in Table 1, after the ship's carbon emissions are optimized using the method of the present invention, the emission values under all compared working conditions are lower than the values before optimization.
[0110] The above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit the present invention. Although the present invention has been described in detail through the above preferred embodiments, those skilled in the art should understand that various changes can be made in form and details without departing from the scope defined by the claims of the present invention.
Claims
1. A ship energy efficiency optimization method for reducing greenhouse gas emissions from ships, characterized in that: The steps include: S1: Collect the navigation parameters of the ship during navigation and sort them by time to form time series data; S2: Construct a recurrent neural network based on long short-term memory, and input the time series data obtained in S1 into the recurrent neural network for training to mine ship navigation characteristics; S3: A Multi-head based attention mechanism is introduced on the basis of the recurrent neural network, and the navigation parameters collected by S1 are used for training. During the training process, the gradient normalization method is used to optimize the multi-task loss allocation, and finally a LSTM+Multi-head multi-task learning deep neural network model is obtained. The LSTM+Multi-head multi-task learning deep neural network model is used to analyze the relationship between the navigation status of the ship and the carbon emissions of the ship; the attention mechanism focuses on the navigation parameters related to the carbon reduction and emission reduction strategy.
2. The ship energy efficiency optimization method for reducing greenhouse gas emissions from ships according to claim 1, characterized in that: The navigation parameters include: main engine operating conditions, fuel type, ship type, speed and deadweight tonnage; the navigation parameters related to the carbon reduction and emission reduction strategy include: speed, heading and fuel.
3. The ship energy efficiency optimization method for reducing greenhouse gas emissions from ships according to claim 1 or 2, characterized in that: The recurrent neural network described in S2 uses a 2-layer LSTM structure. The LSTM structure is able to model time series data and capture the evolution of data patterns. Each layer of the LSTM performs the following transformations: f t =σ(W f ·[h t -1,x t ]+b f ) (1) i t =σ(W f ·[h t -1,x t ]+b f ) (2) c t =f t *c t -1+i t *tanh(W f ·[h t -1,x t ]+b f ) (3) the t =σ(W f ·[h t -1, x t ]+b f ) (4) h t =σ t tanh(C t ) (5) Where: t represents the time step; h t 、c t 、x t represents the hidden state, unit state and previous hidden state corresponding to time t; f t 、i t , o t Respectively represent the forget gate, input gate and output gate at time t; W f represents the linear coefficient; b f represents the bias coefficient; σ represents the activation function; σ t represents the activation function at time t; C t Represents the classification output at time t.
4. The ship energy efficiency optimization method for reducing greenhouse gas emissions from ships according to claim 3 is characterized in that: During the training process in S2, the softmax function Linear projection for LSTM output for classification prediction. i and j in the softmax function represent time indexes, and x i and x j Represents the hidden state corresponding to time i and j.
5. The ship energy efficiency optimization method for reducing greenhouse gas emissions from ships according to claim 4, characterized in that: The classification prediction formula is: in: Represents the classification prediction result; o T represents the final output of LSTM; W f represents the linear coefficient; b f Represents the bias coefficient.
6. The ship energy efficiency optimization method for reducing greenhouse gas emissions from ships according to claim 5, characterized in that: The Multi-head based attention mechanism described in S3 is a weighted sum of feature vectors, whose weights are learned; i } represents all feature vectors extracted from navigation parameters, then the weighted sum calculation formula of Multi-head attention feature vector is as follows: f attention =∑ i a i ·f i (7) Where: f attention Represents the weighted sum of Multi-head attention feature vectors; α i is the weight of the i-th eigenvector, all α i The sum is 1; considering the eigenvector f of the main engine power and ship speed attributes attr The influence of the weight α is expressed as follows: i Indicates the i-th eigenvector extracted from navigation parameters; b i =<σ(f attr ),f i > (8) Where: β i represents the weight of the ith attribute feature vector; <·> represents the vector inner product operation, and formula (8) represents the activation function σ that transforms the feature vector f attr The linear map is f i Vectors of the same length; α i is the weight of the i-th eigenvector, all α i The sum is 1; f attr represents the characteristic vector considering the main engine power and ship speed attributes; f i Indicates the i-th eigenvector extracted from navigation parameters; The Multi-head attention mechanism adds multiple heads on top of the attention mechanism. The mechanism concatenates the attention results generated by each head and multiplies them by the output matrix to fuse the information. The overall loss is calculated by combining the macro features obtained by the LSTM model and back-propagating the loss to all models. The loss function l for each prediction category c in the softmax classifier is c The cross entropy loss is expressed as: in: Represents the classification prediction result; y i,c It represents the prediction result of the cth category using the i-th feature vector; c represents the category.
7. The ship energy efficiency optimization method for reducing greenhouse gas emissions from ships according to claim 6, characterized in that: The specific formula for optimizing the model by multi-task Loss allocation is: Define the gradient loss function as the weight w i (t) function to measure the quality of each task Loss weight, including: Step 1: Define variables to measure the magnitude of task loss: Where: W is a subset of the entire multi-task learning network parameters; represents the normalized value of the gradient of the i-th task, which is the weight w of the i-th task i (t) and Loss L i The L2 norm of the gradient of the parameter W is obtained by multiplying (0) by , which can measure the magnitude of the loss of a task. is the expectation of the normalized values of all task gradients, through all Find the mean value; Step 2: Define variables to measure the learning speed of the task: Where: L i (0) and L i (0) represents the Loss of the 0th and tth steps of subtask i respectively; To some extent, it measures the reverse training speed of task i. The larger it is, the slower the network training is; represents the expected reverse training speed of each task; r i (t) is the relative reverse training speed of the task, r i The larger (t) is, the slower the training of task i is among all tasks. Based on the above variables, the gradient loss function is expressed as: in: represents the ideal gradient normalization value; t represents the time step; w i (t) represents the weight of the i-th task; Represents the normalized value of the gradient for the i-th task.
8. The ship energy efficiency optimization method for reducing greenhouse gas emissions from ships according to claim 7, characterized in that: During the model training process in S3, the weight w is adjusted by the following function i (t) To update: w i (t+1)=w i (t)+λ*Gradient(L grad ,w i (t)) (16) Where: t represents the time step; w i (t) represents the weight of the i-th task; λ represents the learning rate of the model, which is set to 0.01 by default; L grad represents the gradient loss function.
9. The ship energy efficiency optimization method for reducing greenhouse gas emissions from ships according to claim 3, characterized in that: During the training process in S2, the Dropout mechanism is applied.
10. The ship energy efficiency optimization method for reducing greenhouse gas emissions from ships according to claim 1, characterized in that: The LSTM+Multi-head multi-task learning deep neural network model includes an input layer, a convolutional layer, a shared hidden layer, an output layer and several network optimization mechanisms; the input layer includes ship navigation descriptions such as main engine operating conditions, speed, deadweight tonnage, etc.; the time series navigation parameter feature extraction is completed through the long short-term memory neural network; the shared hidden layer completes feature fusion in the form of a fully connected layer; and finally completes the multi-task output of ship control optimization such as speed, heading, fuel, etc.