Electric tug energy consumption prediction method based on attention mechanism and deep learning
Through the LSTM-Transformer hybrid model based on attention mechanism and deep learning, the dynamic environmental adaptability and data utilization efficiency problems in the prediction of electric tugs are solved, and accurate prediction of electric tugs' energy consumption is achieved, reducing operating costs and improving energy utilization efficiency.
Patent Information
- Application Number
- CN202510441785.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-09
- Publication Date
- 2025-08-01
AI Technical Summary
In the energy consumption prediction of electric tugs, there are problems such as insufficient dynamic environmental adaptability, inefficient utilization of multi-source heterogeneous data, poor model adaptability, and lack of multi-time scale prediction in the energy consumption prediction of electric tugs, which is difficult to meet the energy management needs of pure electric tugs with varying working conditions.
The LSTM-Transformer hybrid model based on attention mechanism and deep learning is adopted, combining real-time data acquisition, data preprocessing, fuzzy C-mean clustering and multi-task prediction branching to build an energy consumption prediction model to achieve accurate prediction of energy consumption per nautical mile.
It has achieved accurate prediction of the energy consumption of electric tugs, reduced operating costs, improved energy utilization efficiency, enhanced navigation safety, and provided key technical guarantees for the intelligent development of green ships.
Smart Images

Figure CN120409767A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of energy consumption management of electric tugboats, and particularly relates to an energy consumption prediction method for electric tugboats based on an attention mechanism and deep learning. Background Art
[0002] In port operations, tugboats have long played a crucial role, undertaking functions such as assisting various types of ships in berthing, shifting berths, and escorting in the port. Currently, most of the main driving power sources of tugboats are still diesel engines. Although they have advantages such as high power density, few intermediate links, and high reliability, traditional diesel engine-driven tugboats will release a large amount of carbon dioxide during operation.
[0003] In recent years, driven by the "dual carbon" goal, green ship technology has developed rapidly. Pure electric tugboats, with the advantages of zero emissions and low energy consumption, have become important equipment in the fields of port towing and offshore operations. However, their endurance is significantly limited by the battery capacity, and it is urgent to achieve efficient energy planning and management through accurate energy consumption prediction. In this context, accurate energy consumption prediction technology has become the core requirement for optimizing ship energy distribution, extending the endurance mileage, and reducing operation risks.
[0004] The current existing technologies for ship energy consumption prediction mainly include mechanism-based, statistical regression, and machine learning algorithms, but there are problems such as insufficient adaptability to dynamic environments, inefficient utilization of multi-source heterogeneous data, poor model self-adaptability, and lack of multi-time scale prediction, which are not applicable to pure electric tugboats with variable working conditions. Summary of the Invention
[0005] The present invention proposes a technical solution for energy consumption prediction of electric tugboats based on an attention mechanism and deep learning to solve the difficulties and problems existing in the above background art.
[0006] The present invention provides an energy consumption prediction method for electric tugboats based on an attention mechanism and deep learning, including the following processes.
[0007] Real-time collect the parameters of the ship's power battery, propulsion system, navigation state, and navigation environment, and perform data preprocessing.
[0008] Classify and identify the working conditions of the tugboat, encode the working condition identification results, and construct a data set for energy consumption prediction.
[0009] Construct a pure electric tugboat energy consumption prediction model based on the LSTM-Transformer hybrid architecture, train and test the constructed prediction model, and finally achieve minute energy consumption prediction and energy consumption prediction per nautical mile.
[0010] Moreover, the preprocessing operation includes data repair processing, time synchronization processing, and data normalization.
[0011] Moreover, the implementation of the time synchronization process is not to determine whether the timestamps of the shipborne energy consumption data and the sea condition data are the same by traversing the data set. If the timestamps are the same, interpolation is performed according to the latitude and longitude coordinates. If the timestamps are different, the two sea condition data timestamps before and after the current timestamp of the shipborne energy consumption data are selected as the time window for interpolation calculation; the cubic spline interpolation method is used to interpolate each time point in the time window; and quadratic interpolation is performed according to the time point and the latitude and longitude coordinates to generate the final energy consumption data set.
[0012] Moreover, the fuzzy C-means clustering algorithm is used to classify and identify the tugboat working conditions.
[0013] Moreover, for the three working conditions of cruising, pushing, and waiting, the clustering results of the working conditions are re-encoded according to the working condition labels.
[0014] Moreover, the pure electric tugboat energy consumption prediction model based on the LSTM-Transformer hybrid architecture includes a hybrid network prediction layer based on LSTM-Transformer and a multi-task prediction branch layer. The hybrid network prediction layer based on LSTM-Transformer combines the global data context processing ability of Transformer and the time series modeling advantage of LSTM.
[0015] Moreover, the multi-task prediction branch layer further processes the energy consumption prediction value obtained by the hybrid network prediction layer based on LSTM-Transformer to obtain the energy consumption prediction value for the next minute and the energy consumption prediction value per nautical mile.
[0016] On the other hand, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the above-mentioned electric tugboat energy consumption prediction method based on the attention mechanism and deep learning.
[0017] On the other hand, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the above-mentioned electric tugboat energy consumption prediction method based on the attention mechanism and deep learning.
[0018] On the other hand, the present invention also provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the above-mentioned electric tugboat energy consumption prediction method based on the attention mechanism and deep learning.
[0019] Compared with the prior art, the differences and advantages of the present invention are as follows:
[0020] The present invention provides an electric tug prediction method based on an LSTM-Transformer hybrid model and a multi-source data fusion mechanism, which can fully exploit the temporal correlation and non-linear pattern of energy consumption data, realize the prediction of the energy consumption per minute and per nautical mile of the electric tug, reduce the operation cost and enhance the navigation safety, and provide key technical support for the intelligent development of green ships.
[0021] The solution of the present invention is simple and convenient to implement, and has strong practicability. It solves the problems of low practicability and inconvenient practical application existing in the related technologies, can improve the user experience, and has important market value. Brief Description of the Drawings
[0022] Figure 1 is the module structure diagram of an embodiment of the present invention;
[0023] Figure 2 is the architecture diagram of the data acquisition module of an embodiment of the present invention;
[0024] Figure 3 is the working condition clustering result diagram of an embodiment of the present invention;
[0025] Figure 4 is the network structure diagram of an embodiment of the present invention;
[0026] Figure 5 is the model prediction result diagram of an embodiment of the present invention;
[0027] Figure 6 is the performance comparison diagram between the solution of an embodiment of the present invention and the prior art solution. Detailed Embodiments
[0028] The following will further illustrate the concept, specific structure and technical effects of the present invention in conjunction with the drawings and embodiments, so as to fully understand the purpose, features and effects of the present invention.
[0029] Embodiment 1
[0030] The embodiment of the present invention provides an electric tug energy consumption prediction method based on an attention mechanism and deep learning, including the following processes,
[0031] (1) Real-time collect the parameters of the ship's power battery, propulsion system, navigation state, and navigation environment, and perform data preprocessing, mainly including time synchronization and data normalization, etc.;
[0032] Specifically, in this embodiment, the parameters of the ship's power battery, propulsion system, navigation state, and navigation environment are collected in real time, and data preprocessing is performed.
[0033] The parameters of the ship's power battery include: charge and discharge status, charge and discharge power, battery system voltage, battery system current, state of charge (SOC) of the battery, state of health (SOH) of the battery, ambient temperature, and electrical insulation resistance.
[0034] The parameters of the propulsion system include: left inverter output power, left rudder propeller motor speed, left rudder propeller motor power, left rudder propeller rudder angle, right inverter output power, right rudder propeller motor speed, right rudder propeller motor power, and right rudder propeller rudder angle.
[0035] Navigation status parameters: ship draft, inclination angle, water depth, ship position, heading, speed over ground, speed through water, and navigation mileage.
[0036] Navigation environment parameters: wind speed, wind direction, flow velocity, flow direction, and significant wave height.
[0037] The architecture diagram of the data acquisition module in the embodiment of the present invention is as Figure 2 shown. The operating data of the pure electric tugboat is collected from marine sensors and synchronized with the shore-based database, and both the shore-based and tugboat can view the operating status of the tugboat in real time. The flow velocity, flow direction, and significant wave height in the navigation environment data are obtained from the European Centre for Medium-Range Weather Forecasts (ECMWF). Take the pure electric tugboat Yun Gang Electric Tug No. 2 as an example. The tugboat is 39 meters long, with a battery capacity of 7224 kwh and a horsepower of 5400 HP. It is equipped with a power management system, a BMS battery management system, a log, an AIS, a GPS, a server, and a switch. The collected data can be viewed through the on-board data exchange interface provided by the on-board database.
[0038] The preprocessing operations include data repair processing, time synchronization processing, and data normalization: Data repair processing means that for null value data, data filling is performed by fitting and interpolation according to other data in the data group where the data is located; for abnormal data or data segments that deviate from the reasonable range of the original data, the abnormal data should be deleted and then regarded as null value data for data filling.
[0039] Since the sampling frequency of the ship-end energy consumption data is 0.1 Hz, while the sampling frequency of the sea condition data including flow velocity and flow direction downloaded from the European Centre for Medium-Range Weather Forecasts is 1 hour, and the minimum grid accuracy is 0.125°×0.125°, in order to correspond the ship-end data with the sea condition data sampling frequency, time synchronization processing needs to be performed on the sea condition data.
[0040] (2) Classify and identify the tugboat working conditions, and construct a data set for energy consumption prediction;
[0041] In the embodiment, fuzzy C-means clustering is used to classify and identify the ship working conditions. The specific operation steps are as follows:
[0042] Step 1: Collect the operation data of the tugboat, establish a sample data set including three working conditions: cruising, pushing, and waiting time. The sample feature dimension includes energy consumption-related parameters. The total number of samples is denoted as N, and the preset number of clustering centers C corresponds to the three working condition types.
[0043] Step 2: Initialize the parameters of the fuzzy C-means clustering algorithm: Set the number of clustering clusters m to satisfy 1 ≤ m < ∞, and randomly generate the initial membership matrix μ ij , where μ ij represents the probability that the i-th sample belongs to the j-th clustering center, and satisfies
[0044] Step 3: Calculate the clustering center c j according to the current membership matrix. The calculation formula is as follows:
[0045]
[0046] where x i is the feature vector of the i-th sample, and the calculation result needs to keep c j consistent with the sample feature dimension. represents the probability that the i-th sample belongs to the j-th clustering center of the m-th cluster.
[0047] Step 4: Based on the updated clustering center, recalculate the membership matrix μ ij The calculation formula is as follows:
[0048]
[0049] where ‖·‖ represents the Euclidean norm, and c k represents the k-th clustering center. The calculation result needs to ensure that all μ ij ∈[0,1] and the sum of elements in each row is 1.
[0050] Step 5: Establish the iteration termination condition: Calculate the maximum difference between the elements of the new and old membership matrices When this difference is less than the preset convergence threshold ε, stop the iteration; otherwise, return to Step 3 to continue the calculation. The value range of ε is set according to the actual accuracy requirements. Among them, represents the probability that the i-th sample belongs to the j-th clustering center of the (t + 1)-th cluster, represents the probability that the i-th sample belongs to the j-th clustering center of the t-th cluster, and t is the cluster identifier.
[0051] Step 6: Use the fuzzy C-means clustering algorithm to identify and classify the tugboat working conditions for the input data. The clustering results are as Figure 3, when the ship speed is at a medium to high level and the propeller power is at a low to medium level, the data points are clustered in orange with a label of 1. These orange clusters represent the data points when the tugboat is cruising at high speed. When the ship speed is at a medium level and the propeller power is at a low to medium level, the data points are clustered in blue with a label of 0. These blue clusters represent the data points when the tugboat is cruising at medium speed. When the ship speed is at a low level and the propeller power is at a low to medium level, the data points are clustered in green with a label of 2. These green clusters represent the data points when the tugboat is starting to accelerate or decelerating at the end section during non-operating navigation. When the ship speed is at a low level and the propeller power is at a medium to high level, the data points are clustered in red with a label of 3. These red clusters represent the data points when the tugboat is towing. And the clustering results of the working conditions are re-encoded according to the working condition labels, with cruising encoded as 1, pushing encoded as 2, and waiting encoded as 3.
[0052] Further, in this embodiment, the generated cruising data set in the working condition recognition module will be used for the training of the pure electric tugboat energy consumption prediction model. This data set divides the preprocessed data into groups of 10 data each, and splits the energy consumption rate of the next minute's data as the model target value. And it is divided according to 80% for the training set, 10% for the validation set, and 10% for the test set.
[0053] (3) Build a pure electric tugboat energy consumption prediction model based on the LSTM-Transformer hybrid architecture, train and test the built prediction model, and finally realize the prediction of energy consumption per minute and energy consumption per nautical mile.
[0054] The energy consumption prediction model provided by the embodiment includes a hybrid network prediction layer based on LSTM-Transformer and a multi-task prediction branch layer. The hybrid network prediction layer combines the global data context processing ability of Transformer with the time series modeling advantage of LSTM to improve the accuracy of tugboat energy consumption prediction. The construction and training steps of the hybrid network prediction layer based on LSTM-Transformer in the model are as follows:
[0055] Step 1: Build a hybrid network based on LSTM-Transformer. The first layer is the input layer for receiving data input, the second layer is the LSTM layer, the third layer is the Transformer layer, the fourth layer is the fully connected layer, and the fifth layer is the output layer. The network structure is as Figure 4 shown. The input of the input layer is X1, X2,..., X T, where X is a batch of input feature sequences, T is the total number of batches. The feature data is input into the LSTM layer (it is preferably recommended to use 3 layers of LSTM, and experiments have proved that the effect is better) for processing sequence data, capturing long-term and short-term dependencies in the sequence. Subsequently, it is connected to the Transformer layer, whose multi-head self-attention mechanism can globally model the dynamic associations between temporal features, retain temporal information through positional encoding, and use layer normalization to improve training stability. Subsequently, the features are mapped by the first fully connected module Linear1 in the fully connected layer and processed by random inactivation Dropout1 to prevent gradient explosion. Then, after linear mapping through the second fully connected module Linera2, the energy consumption prediction result is output through the output layer Output Linera1.
[0056] The specific implementation of the LSTM layer can refer to the prior art, and each unit includes: an input gate, a forget gate, an output gate, and a cell state. The specific implementation of the Transformer layer can refer to the prior art, and each unit includes input encoding, positional encoding, multi-head attention, backpropagation, residual connection, and normalization.
[0057] Step 2: Train the prediction model. Set the learning rate to 0.0001, the number of LSTM layers to 3, the Dropout rate to 0.2, and train for 500 rounds. During the training process, for each iteration, use the validation set to perform cross-validation on the model, and dynamically adjust the learning rate according to the accuracy to increase the model prediction accuracy, and adjust to obtain an LSTM-Transformer pre-trained model for predicting the energy consumption of tugboats.
[0058] Step 3: Retrain the dataset including the training set and the validation set to obtain a trained model. Use the test set to test the trained model, and use the RMSE loss function to calculate the model loss. The loss function formula is:
[0059]
[0060] where y i represents the actual value; represents the predicted value, represents the average value of all y i ; n represents the number of samples. The prediction result of the model test set is as Figure 5 shown. From the curve fitting degree in the figure, it can be seen that the model prediction effect is good. In actual use, this module directly uses the trained pure electric tugboat energy consumption prediction model to predict the unit-minute power consumption of future tugboats.
[0061] Further, in this embodiment, the multi-task prediction branch layer further processes the energy consumption prediction value of the LSTM-Transformer model to obtain the energy consumption prediction value for the next minute and the energy consumption prediction value per nautical mile. The specific operation steps of the multi-task prediction branch layer are as follows:
[0062] Step 1: Obtain the real-time output E of the pure electric tug energy consumption prediction model t , at this time, the energy consumption per minute is E t , and record the real-time ground speed of the current tug.
[0063] Step 2: Calculate the navigation distance per minute
[0064] Step 3: Calculate the energy consumption per nautical mile
[0065] Embodiment 2
[0066] On the basis of the technical solution of an electric tug energy consumption prediction method based on the attention mechanism and deep learning provided in Embodiment 1, further, the specific implementation steps of time synchronization processing are as follows:
[0067] Step 1: Determine whether the timestamps of the shipboard energy consumption data and the sea condition data are the same by traversing the data set.
[0068] Step 2: If the timestamps are the same, perform interpolation according to the longitude and latitude coordinates. If the timestamps are different, select the two sea condition data times before and after the current timestamp of the shipboard energy consumption data as the time window for interpolation calculation.
[0069] Step 3: Use the cubic spline interpolation method to interpolate each time point in the time window.
[0070] Step 4: Perform quadratic interpolation according to the time points and longitude and latitude coordinates and generate the final energy consumption data set.
[0071] Preferably, the collected data is normalized using the Min-Max method, and the original data is mapped to the range of [0, 1]. The normalization formula is as follows:
[0072]
[0073] where n is the number of samples, x i is the i-th original data, y i is the i-th normalized data, represents the maximum value in the original data, represents the minimum value in the original data.
[0074] Embodiment 3
[0075] Based on the technical solution of an electric towing wheel energy consumption prediction method based on the attention mechanism and deep learning provided in Embodiment 1, further, when training the LSTM-Transformer hybrid model, the update method of the model unit includes the following steps:
[0076] (1) LSTM forget gate update and historical state screening.
[0077] Based on the previous hidden state and the current input, determine how much historical information to retain through the forget gate. At the same time, globally screen the historical states using the attention weights of the Transformer.
[0078] f t =σ(W f ·[h t-1 ,x t +b f )oα t-1
[0079] where f t is the output value of the LSTM forget gate, h t-1 is the previous hidden state, α t-1 is the historical state attention weight output by the Transformer layer, and o is the Hadamard product, which is used to strengthen the retention of key timing features.
[0080] (2) LSTM input gate and Transformer encoding fusion.
[0081] Combine the current input information through the LSTM input gate and the encoding layer of the Transformer to capture local timing features and global context associations:
[0082] i t =σ(W i ·[h t-1 ,x t +b i )
[0083]
[0084] where i t is the output of the input gate, is the LSTM cell candidate state, is the global state after Transformer encoding, and is weighted and fused with the LSTM candidate state :
[0085]
[0086] λ is a learnable fusion coefficient.
[0087] (3) Node state update.
[0088] Combine the information of the forget gate and the input gate to update the cell state of the LSTM, and superimpose the long-term dependence correction of the Transformer:
[0089]
[0090] where c t is the cell state of the LSTM.
[0091] (4) Collaboration between the LSTM output gate and the Transformer attention.
[0092] Control the generation of the current hidden state through the output gate, and optimize the output using the attention mechanism of the Transformer decoder:
[0093] o t = σ(W o · [h t-1 , x t + b o )
[0094]
[0095] where o t is the output of the LSTM output gate, is the final hidden state of the LSTM layer, W Q , W K and W V are the learning matrices of the Transformer. Calculate Q as the target for which the attention needs to be calculated currently, K as the historical information used to match Q, V as the information actually weighted and aggregated, and Attention(Q, K, V) is the Transformer attention mechanism.
[0096] (5) Output the prediction result of the fully connected layer. <(
[0097] Input the final hidden state into the fully connected layer to output the predicted energy consumption per minute:
[0098]
[0099] In the above formula, TransformerEncoder and TransformerDecoder are the encoder and decoder modules respectively, which contain multi-head self-attention and feed-forward networks. σ is the Sigmoid function, and tanh is the hyperbolic tangent function. W f , W i , W c , W o are the weight matrices of the LSTM, bf , b i , b c , b o is the bias term. W e is the weight of the fully connected layer, is the predicted energy consumption per minute.
[0100] Embodiment 4
[0101] See Figure 1 , the embodiment of the present invention includes a data acquisition module, a working condition recognition module and an energy consumption prediction module, which integrates ship energy consumption data and meteorological data, and uses an energy consumption prediction model for electric tugboats based on the LSTM neural network and Transformer to realize the energy consumption prediction of electric tugboats.
[0102] The data acquisition module is used to collect ship power battery parameters, propulsion system parameters, navigation status parameters and navigation environment parameters in real time, and perform data preprocessing;
[0103] The working condition recognition module is used to classify and identify the working conditions of the tugboat, encode the working condition recognition results, and construct a data set for energy consumption prediction;
[0104] The energy consumption prediction module is used to construct an energy consumption prediction model for pure electric tugboats based on the LSTM-Transformer hybrid architecture, train and test the constructed prediction model, and finally realize the prediction of energy consumption per minute and energy consumption per nautical mile.
[0105] In this embodiment, the brief process of the model deployment operation is as follows. First, load the trained model in the computer, then collect energy consumption data and navigation data through the data acquisition module, use the energy consumption analysis module to identify the working conditions, and finally input the data into the model. The model outputs the predicted result of energy consumption per minute and uses the multi-task branch to simultaneously predict the energy consumption per nautical mile.
[0106] In summary, the present invention obtains an energy consumption prediction model for pure electric tugboats based on the LSTM-Transformer network by using clustering algorithms and machine learning algorithms, and realizes the functions of data acquisition, working condition recognition, energy consumption prediction per minute and energy consumption prediction per nautical mile for pure electric tugboats. Therefore, the present invention can accurately predict the energy consumption of pure electric tugboats, and the economic efficiency of pure electric tugboats can be improved through the energy consumption prediction results. Moreover, it also has a positive impact on the management and scheduling of tugboats, etc., which can help improve the energy utilization efficiency and thus reduce the operating cost.
[0107] For the convenience of understanding the technical effects of the present invention, see Figure 6The results of the present invention and the prior art provided in Table 1 show that, based on the performance comparison of different energy consumption prediction models in the table, the pure electric tugboat energy consumption prediction model based on LSTM-Transformer exhibits optimal performance in all evaluation indicators: its coefficient of determination reaches 0.969, which is higher than other energy consumption prediction models, indicating that the model has a strong ability to explain data variation; at the same time, the prediction error index based on LSTM-Transformer is the lowest value, which is better than LSTM and traditional models. This result shows that the pure electric tugboat energy consumption prediction model based on LSTM-Transformer improves the prediction accuracy and stability by integrating the attention mechanism and sequence modeling ability.
[0108] Table 1
[0109]
[0110] In specific implementation, the method proposed by the technical solution of the present invention can be automatically run by those skilled in the art using computer software technology. The system device for implementing the method, such as a computer-readable storage medium storing the corresponding computer program of the technical solution of the present invention and a computer device including running the corresponding computer program, should also be within the protection scope of the present invention.
[0111] Next, the electric tugboat energy consumption prediction device based on the attention mechanism and deep learning provided by the present invention will be described. The electric tugboat energy consumption prediction device based on the attention mechanism and deep learning described below can be mutually referred to the electric tugboat energy consumption prediction method based on the attention mechanism and deep learning described above.
[0112] On the other hand, the present invention also provides an electronic device, which may include: a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete communication with each other through the communication bus. The processor can call the logical instructions in the memory to execute the above-mentioned electric tugboat energy consumption prediction method based on the attention mechanism and deep learning.
[0113] In addition, when the logical instructions in the above-mentioned memory are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.
[0114] On the other hand, the present invention also provides a computer program product, where the computer program product includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the electric tugboat energy consumption prediction method based on the attention mechanism and deep learning provided by the above-mentioned various methods.
[0115] On another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it is implemented to execute the electric tugboat energy consumption prediction method based on the attention mechanism and deep learning provided by the above-mentioned various methods.
[0116] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative efforts.
[0117] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the technical solution, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disks, optical discs, etc., and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments.
[0118] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. An electric tugboat energy consumption prediction method based on the attention mechanism and deep learning, characterized in that: It includes the following processes: collecting the parameters of the ship's power battery, propulsion system, navigation status, and navigable environment in real time, and performing data preprocessing; classifying and identifying the tugboat working conditions, encoding the results of the working condition identification, and constructing a dataset for energy consumption prediction; constructing an energy consumption prediction model for pure electric tugboats based on the LSTM-Transformer hybrid architecture, training and testing the constructed prediction model, and finally realizing the prediction of energy consumption per minute and energy consumption per nautical mile.
2. The method for predicting the energy consumption of an electric tugboat based on the attention mechanism and deep learning according to claim 1, wherein: The preprocessing operations include data repair processing, time synchronization processing, and data normalization.
3. The method for predicting the energy consumption of an electric tugboat based on the attention mechanism and deep learning according to claim 2, characterized in that: The implementation method of the time synchronization processing is as follows: by traversing the dataset to judge whether the timestamps of the shipboard energy consumption data and the sea condition data are the same. If the timestamps are the same, interpolation is performed according to the longitude and latitude coordinates. If the timestamps are different, the two sea condition data timestamps before and after the current timestamp of the shipboard energy consumption data are selected as the time window for interpolation calculation; the cubic spline interpolation method is used to interpolate each time point in the time window; quadratic interpolation is performed according to the time point and the longitude and latitude coordinates to generate the final energy consumption dataset.
4. The method for predicting the energy consumption of an electric tugboat based on an attention mechanism and deep learning according to claim 1, wherein: The fuzzy C-means clustering algorithm is used to classify and identify the tugboat working conditions.
5. The method for predicting the energy consumption of an electric tugboat based on the attention mechanism and deep learning according to claim 1, wherein: For the three working conditions of cruising, pushing, and waiting, the clustering results of the working conditions are re-encoded according to the working condition labels.
6. The energy consumption prediction method for electric tugboats based on the attention mechanism and deep learning according to claim 1, characterized in that: The energy consumption prediction model for pure electric tugboats based on the LSTM-Transformer hybrid architecture includes a hybrid network prediction layer based on LSTM-Transformer and a multi-task prediction branch layer. The hybrid network prediction layer based on LSTM-Transformer combines the global data context processing ability of Transformer and the time series modeling advantage of LSTM.
7. The method for predicting the energy consumption of an electric tugboat based on the attention mechanism and deep learning according to claim 6, wherein: The multi-task prediction branch layer further processes the energy consumption prediction value obtained by the hybrid network prediction layer based on LSTM-Transformer to obtain the energy consumption prediction value for the next minute and the energy consumption prediction value per nautical mile.
8. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that: When the processor executes the program, it realizes the energy consumption prediction method for electric tugboats based on the attention mechanism and deep learning as described in any one of claims ① to ⑦.
9. A non-transitory computer-readable storage medium storing a computer program thereon, characterized in that: When the computer program is executed by the processor, it realizes the energy consumption prediction method for electric tugboats based on the attention mechanism and deep learning as described in any one of claims ① to ⑦.
10. A computer program product, comprising a computer program, characterized in that: When the computer program is executed by the processor, it realizes the energy consumption prediction method for electric tugboats based on the attention mechanism and deep learning as described in any one of claims ① to ⑦. It should be noted that in the above translation, the reference signs in the original text seem to be inconsistent in some places. For example, the reference signs in claims ① to ⑦ in , , and are not clearly defined in the provided text. It is recommended to check and correct the original text for a more accurate translation. Also, the "" at the beginning and end is just a delimiter in the original text and is translated as is.
Citation Information
Cited By
Marine main engine power real-time optimization method based on hybrid network model
CN120850815A
Electric ship zero-emission navigation control method and system based on energy optimization
CN121084573A